diff --git a/FollowerCache.lua b/FollowerCache.lua index 97fa23d..1171c21 100644 --- a/FollowerCache.lua +++ b/FollowerCache.lua @@ -62,7 +62,7 @@ local function AddExtraData(follower,refreshrank) follower.abilities=G.GetFollowerAbilities(follower.followerID) end function addon:FollowerCacheInit() - GarrisonFollowerList_UpdateFollowers(Mbase) + pcall(GarrisonFollowerList_UpdateFollowers,Mbase) end function addon:CanCounter(followerID,id) local abilities=self:GetFollowerData(followerID,'abilities') diff --git a/GarrisonCommander.lua b/GarrisonCommander.lua index b5c1c48..b9b3589 100644 --- a/GarrisonCommander.lua +++ b/GarrisonCommander.lua @@ -406,7 +406,6 @@ function addon:OnInitialized() self:AddSlider("MINPERC",50,0,100,L["Minimun chance success under which ignore missions"],nil,5) self:AddToggle("ILV",true,L["Show weapon/armor level"],L["When checked, show on each follower button weapon and armor level for maxed followers"]) self:AddToggle("IXP",true,L["Show xp to next level"],L["When checked, show on each follower button missing xp to next level"]) - self:AddToggle("STP",true,L["Show time left"],L["When checked, show on each follower button time left for on mission followers"]) --self:AddPrivateAction("ShowMissionControl",L["Mission control"],L["You can choose some criteria and have GC autosumbit missions for you"]) --@debug@ self:AddLabel("Developers options") @@ -1297,6 +1296,7 @@ function addon:GenerateMissionButton() if self.type==Type2 then self.frame.Percent:SetFormattedText("%d%%",party.perc) self.frame.Percent:SetTextColor(addon:GetDifficultyColors(party.perc)) + _G.AX=self.frame end end @@ -1339,8 +1339,9 @@ function addon:GenerateMissionButton() local indicators=CreateFrame("Frame",nil,frame,"GarrisonCommanderIndicators") indicators.Percent:SetJustifyH("LEFT") indicators.Percent:SetJustifyV("CENTER") - indicators:SetPoint("LEFT",70,-20) + indicators:SetPoint("LEFT",70,0) indicators.Age:Hide() + frame.Indicators=indicators frame.Percent=indicators.Percent frame.Failure=frame:CreateFontString() frame.Success=frame:CreateFontString() @@ -1350,9 +1351,9 @@ function addon:GenerateMissionButton() frame.Success:SetText(SUCCESS) frame.Failure:Hide() frame.Success:Hide() - frame.Title:SetPoint("LEFT",frame.Percent,"RIGHT",-20,30) - frame.Success:SetPoint("LEFT",frame.Percent,"RIGHT",-20,0) - frame.Summary:SetPoint("LEFT",frame.Percent,"RIGHT",-20,-30) + frame.Title:SetPoint("TOPLEFT",frame.Indicators,"TOPRIGHT",0,0) + frame.Success:SetPoint("BOTTOMLEFT",frame.Indicators,"BOTTOMRIGHT",0,10) + frame.Failure:SetPoint("BOTTOMLEFT",frame.Indicatprs,"BOTTOMRIGHT",0,10) --widget.frame.MissionType:Hide() --widget.frame.IconBG:Hide() @@ -1617,24 +1618,13 @@ function addon:RenderFollowerPageFollowerButton(frame,follower,showCounters) if not frame.GCIt then frame.GCIt=frame:CreateFontString(nil,"ARTWORK","GameFontHighlightSmall") frame.GCIt:SetPoint("BOTTOMLEFT",frame.Name,"TOPLEFT",0,2) - frame.GCTime=frame:CreateFontString(nil,"ARTWORK","GameFontHighlightSmall") - frame.GCTime:SetPoint("TOPLEFT",frame.Status,"TOPRIGHT",5,0) frame.GCXp=frame:CreateFontString(nil,"ARTWORK","GameFontHighlightSmall") end if not frame.isCollected then - frame.GCTime:Hide() frame.GCXp:Hide() frame.GCIt:Hide() return end - if self:GetToggle("IST") then - if (frame.Status:GetText() == GARRISON_FOLLOWER_ON_MISSION) then - frame.GCTime:SetText(self:GetFollowerStatus(follower.followerID,true,true)) - frame.GCTime:Show() - else - frame.GCTime:Hide() - end - end if self:GetToggle("IXP") then if (follower.level < GARRISON_FOLLOWER_MAX_LEVEL or follower.quality < GARRISON_FOLLOWER_MAX_UPGRADE_QUALITY) then frame.GCXp:SetFormattedText(L["To go: %d"],follower.levelXP-follower.xp) @@ -2451,7 +2441,7 @@ function addon:BuildFollowersButtons(button,bg,limit,bigscreen) if (bg.Party) then return end bg.Party={} for numMembers=1,3 do - local f=CreateFrame("Button","fol_"..button.info.missionID.."_"..numMembers,bg,bigscreen and "GarrisonCommanderMissionPageFollowerTemplate" or "GarrisonCommanderMissionPageFollowerTemplateSmall" ) + local f=CreateFrame("Button",nil,bg,bigscreen and "GarrisonCommanderMissionPageFollowerTemplate" or "GarrisonCommanderMissionPageFollowerTemplateSmall" ) if (numMembers==1) then f:SetPoint("BOTTOMLEFT",button.Rewards[1],"BOTTOMRIGHT",10,0) else @@ -2971,9 +2961,9 @@ function addon:DrawSingleSlimButton(page,button,progressing,bigscreen) self:AddStandardDataToButton(page,button,mission,missionID,bigscreen) over.GarrisonMissionButton_SetRewards(button, mission.rewards, mission.numRewards); self:AddFollowersToButton(button,mission,missionID,bigscreen) - frame.Title:SetPoint("TOPLEFT",frame.Percent,"TOPLEFT",0,15) - frame.Success:SetPoint("LEFT",frame.Percent,"RIGHT",0,0) - frame.Failure:SetPoint("LEFT",frame.Percent,"RIGHT",0,0) + frame.Title:SetPoint("TOPLEFT",frame.Indicators,"TOPRIGHT",0,-5) + frame.Success:SetPoint("LEFT",frame.Indicators,"RIGHT",0,0) + frame.Failure:SetPoint("LEFT",frame.Indicators,"RIGHT",0,0) frame.Summary:ClearAllPoints() frame.Summary:SetPoint("TOPLEFT",frame.Title,"BOTTOMLEFT",0,-10) button:Show(); diff --git a/MissionCompletion.lua b/MissionCompletion.lua index d632127..aa43e45 100644 --- a/MissionCompletion.lua +++ b/MissionCompletion.lua @@ -55,17 +55,19 @@ function addon:GenerateMissionCompleteList(title) function m:AddMissionName(missionID,success) local mission=self.missions[missionID] if mission then + local frame=mission.frame if success then - mission.frame.Success:Show() - mission.frame.Failure:Hide() - for i=1,#mission.Rewards do - mission.Rewards[i].Icon:SetDesaturated(true) + frame.Success:Show() + frame.Failure:Hide() + for i=1,#frame.Rewards do + frame.Rewards[i].Icon:SetDesaturated(false) end else - mission.frame.Success:Hide() - mission.frame.Failure:Show() - for i=1,#mission.Rewards do - mission.Rewards[i].Icon:SetDesaturated(true) + frame.Success:Hide() + frame.Failure:Show() + for i=1,#frame.Rewards do + frame.Rewards[i].Icon:SetDesaturated(true) + frame.Rewards[i].Quantity:Hide() end end end diff --git a/MissionControl.lua b/MissionControl.lua index 53923ce..6c04213 100644 --- a/MissionControl.lua +++ b/MissionControl.lua @@ -24,7 +24,6 @@ local wipe=wipe local pairs=pairs local tinsert=tinsert local xprint=ns.xprint -xprint=print --@debug@ _G.GAC=addon if LibDebug then LibDebug() end @@ -137,7 +136,7 @@ do end return end - if (timeElapsed >=0.1) then + if (timeElapsed >=0.05) then currentMission=currentMission+1 if (currentMission > #aMissions) then wipe(aMissions)