WoWInterface SVN Broker_GarrisonReport

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 5 to Rev 6
    Reverse comparison

Rev 5 → Rev 6

trunk/Broker_GarrisonReport/Broker_GarrisonReport.toc
2,7 → 2,7
## Name: Broker_GarrisonReport
## Notes: An LDB plugin to replace the Garrison Report button on your minimap.
## Author: Seerah
## Version: 1.0.3
## Version: 1.0.4
 
LibStub\LibStub.lua
CallBackHandler-1.0\CallbackHandler-1.0.xml
trunk/Broker_GarrisonReport/report.lua
107,20 → 107,22
end
 
local function GetMissions()
missionData.complete = #C_Garrison.GetCompleteMissions(1) --1= garrFollowerTypeID (new usage as of 7.0)
missionData.onMission = #C_Garrison.GetInProgressMissions(1) --all the missions we're working on
missionData.inProgress = missionData.onMission - missionData.complete --let's not include the complete # in our in progress #
missionData.available = #C_Garrison.GetAvailableMissions(1)
 
local textColor
if missionData.onMission == 0 then
textColor = "ffff0000"
elseif missionData.complete == missionData.onMission then
textColor = "ff00f200"
else
textColor = "ffffffff"
if hasGarrison then
missionData.complete = #C_Garrison.GetCompleteMissions(1) --1= garrFollowerTypeID (new usage as of 7.0)
missionData.onMission = C_Garrison.GetInProgressMissions(1) and #C_Garrison.GetInProgressMissions(1) or 0 --all the missions we're working on
missionData.inProgress = missionData.onMission - missionData.complete --let's not include the complete # in our in progress #
missionData.available = C_Garrison.GetAvailableMissions(1) and #C_Garrison.GetAvailableMissions(1) or 0
 
local textColor
if missionData.onMission == 0 then
textColor = "ffff0000"
elseif missionData.complete == missionData.onMission then
textColor = "ff00f200"
else
textColor = "ffffffff"
end
GR.text = strformat("|c%s%d/%d|r", textColor, missionData.complete, missionData.onMission)
end
GR.text = strformat("|c%s%d/%d|r", textColor, missionData.complete, missionData.onMission)
end
 
local function ShowMissions(tt)
174,10 → 176,12
garType = C_Garrison.GetLandingPageGarrisonType()
C_Garrison.GetGarrisonInfo(garType)
end
hasGarrison = C_Garrison.GetGarrisonInfo(garType)
GetMissions()
ScanBuildings()
GetWorkOrders()
if garType then
hasGarrison = C_Garrison.GetGarrisonInfo(garType)
GetMissions()
ScanBuildings()
GetWorkOrders()
end
elseif event == "GARRISON_BUILDING_ACTIVATED" then
local plotID, buildingID = ...
underConstruction[buildingID] = nil