diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 8ba57d4..49e1ee6 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,6 +1,12 @@ ==GarrisonCommander helps you when choosing the right follower for the right mission== -* 2.3.8 -** Feature: Quick mission report now accounts for bonuses -** Feature: Quick mission competion button has now a name: GCQuickMissionCompletionButton -** Feature: Easy upgrade. You can now upgraed your followers' equipment with a single click in follower list page -** Feature: In buildings map, working follower are displayed on plots. Plots with no followers but which could have one are marked +* 2.4.0 Loyal Follower +** Mission Completion +*** Feature: Report now accounts for bonuses +*** Feature: Button has now a name: GCQuickMissionCompletionButton +*** Feature: New category: generic. I am stiil workin in improving mission selection by better assogning categories to them +*** Fix: #51 QUick Mission Button was sometimes hard to click +* Yet to be implemented** Followers +*** Feature: Easy follower upgrade. You can now upgraed your followers' equipment with a single click in follower list page +*** Feature: In buildings map, working follower are displayed on plots. Plots with no followers but which could have one are marked +** General +** Feature: threat tooltip in mission list wiht full countering follower list (yet to be implemented) diff --git a/FollowerPage.lua b/FollowerPage.lua index f45b4a1..4f279b8 100644 --- a/FollowerPage.lua +++ b/FollowerPage.lua @@ -87,7 +87,7 @@ local function UpgradeFollower(this) addon:Popup(format(CONFIRM2,losing,name),0,DoUpgradeFollower,true,followerID,true) else if addon:GetToggle("NOCONFIRM") then - --G.CastSpellOnFollower(followerID); + G.CastSpellOnFollower(followerID); else addon:Popup(format(CONFIRM1,mylevel+level,name),0,DoUpgradeFollower,true,followerID,true) end diff --git a/GarrisonCommander.lua b/GarrisonCommander.lua index 88f4f61..754706e 100644 --- a/GarrisonCommander.lua +++ b/GarrisonCommander.lua @@ -547,6 +547,7 @@ function addon:SetThreatColor(obj,threat) local color=self:GetBiasColor(tonumber(bias) or -1,nil,"Green") local c=C[color] obj.Border:SetVertexColor(c()) + return (tonumber(bias)or -1)>-1 else obj.Border:SetVertexColor(C.red()) end @@ -1688,8 +1689,30 @@ function addon.ClonedGarrisonMissionMechanic_OnEnter(this) local button=this:GetParent() tip:SetOwner(button, "ANCHOR_CURSOR_RIGHT"); tip:AddLine(this.Name,C.White()) - tip:AddTexture(this.Icon:GetTexture()) + tip:AddTexture(this.texture) tip:AddLine(this.Description,C.Orange()) + if (this.countered) then + if this.IsEnv then + local t=G.GetFollowersTraitsForMission(this.missionID) + for followerID,k in pairs(t) do + for i=1,#k do + xprint(k[i].icon) + if k[i].icon==this.texture then + tip:AddDoubleLine(addon:GetFollowerData(followerID,'fullname'),this.Name) + end + end + end + else + local t=G.GetBuffedFollowersForMission(this.missionID) + for followerID,k in pairs(t) do + for i=1,#k do + if k[i].name==this.Name then + tip:AddDoubleLine(addon:GetFollowerData(followerID,'fullname'),k[i].counterName) + end + end + end + end + end tip:Show() end function addon:HookedGarrisonFollowerPage_ShowFollower(frame,followerID,force) @@ -2019,6 +2042,8 @@ function addon:CleanUp() if (GarrisonFollowerTooltip.fs) then GarrisonFollowerTooltip.fs:Hide() end + GMFMissions.CompleteDialog:Hide() + self:CloseMissionPanel() --collectgarbage("collect") --@debug@ ns.xprint("Cleaning up") @@ -2876,11 +2901,14 @@ function addon:AddThreatsToButton(button,mission,missionID,bigscreen) button.Env:SetPoint("BOTTOMLEFT",button,165,8) button.GcThreats={} end + button.Env.missionID=missionID local party=self:GetParty(missionID) if mission.typeIcon then button.Env.IsEnv=true button.Env:Show() button.Env.Icon:SetTexture(mission.typeIcon) + button.Env.texture=mission.typeIcon + button.Env.countered=party.isEnvMechanicCountered if (party.isEnvMechanicCountered) then button.Env.Border:SetVertexColor(C.Green()) else @@ -2905,10 +2933,12 @@ function addon:AddThreatsToButton(button,mission,missionID,bigscreen) th:SetPoint("BOTTOMLEFT",button,165 + 35 * threatIndex,8) button.GcThreats[threatIndex]=th end - self:SetThreatColor(th,self:GetParty(missionID,'threats')[threatIndex]) + th.countered=self:SetThreatColor(th,self:GetParty(missionID,'threats')[threatIndex]) th.Icon:SetTexture(mechanic.icon) + th.texture=mechanic.icon th.Name=mechanic.name th.Description=mechanic.description + th.missionID=missionID --GarrisonMissionButton_CheckTooltipThreat(th,missionID,mechanicID,counteredThreats) th:Show() th:SetScript("OnEnter",addon.ClonedGarrisonMissionMechanic_OnEnter) diff --git a/MissionCompletion.lua b/MissionCompletion.lua index 2c8bfb7..af6000a 100644 --- a/MissionCompletion.lua +++ b/MissionCompletion.lua @@ -233,10 +233,14 @@ do self:SafeRegisterEvent("GARRISON_FOLLOWER_XP_CHANGED") end end + function addon:CloseMissionPanel() + if report then + report:Release() + end + end function addon:MissionComplete(this,button) - GMFMissions.CompleteDialog.BorderFrame.ViewButton:SetEnabled(false) + GMFMissions.CompleteDialog.BorderFrame.ViewButton:SetEnabled(false) -- Disabling standard Blizzard Completion missions=G.GetCompleteMissions() - --GMFMissions.CompleteDialog.BorderFrame.ViewButton:SetEnabled(false) -- Disabling standard Blizzard Completion if (missions and #missions > 0) then ns.missionautocompleting=true report=self:GenerateMissionCompleteList("Missions' results")