Quantcast

* *2.6.11*

Alar of Daggerspine [07-28-15 - 18:44]
* *2.6.11*

Fix: When loaded in a particular order and with
GarrisonCommander-Broker, was running partially broken
Fix: Clash with MP in fleet map, slightly moved GC frame
Fix: Sorting on xp was broken
Fix: Mission title in Mission Control had a debug info attached

Signed-off-by: Alar of Daggerspine <alar@aspide.it>
Filename
CHANGELOG.txt
GarrisonCommander.lua
GarrisonCommander.toc
MissionCompletion.lua
ShipYard.lua
embeds.xml
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index f153f9a..116b32d 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -1,5 +1,11 @@
 *GarrisonCommander helps you when choosing the right follower for the right mission*

+* *2.6.11*
+Fix: When loaded in a particular order and with GarrisonCommander-Broker, was running partially broken
+Fix: Clash with MP in fleet map, slightly moved GC frame
+Fix: Sorting on xp was broken
+Fix: Mission title in Mission Control had a debug info attached
+
 * *2.6.9*
 Fix: Restored GarrisonMissionManager compatibility (sorry guys)
 Feature: Shipyard map enhanced with success chance. Chance is show as a number, and the border around it says if you have oil enough (green good, red not enough)
diff --git a/GarrisonCommander.lua b/GarrisonCommander.lua
index 12020b2..a7ef988 100644
--- a/GarrisonCommander.lua
+++ b/GarrisonCommander.lua
@@ -352,7 +352,10 @@ function addon.Garrison_SortMissions_Duration(missionsList)
 	table.sort(missionsList, sorters.Duration);
 end
 function addon.Garrison_SortMissions_Followers(missionsList)
-	--addon:OnAllGarrisonMissions(function(missionID) addon:MatchMaker(missiaddon:RefreshParties()ison_SortMissions_Xp(missionsList)
+	addon:RefreshParties()
+	table.sort(missionsList, sorters.Followers);
+end
+function addon.Garrison_SortMissions_Xp(missionsList)
 	addon:RefreshParties()
 	table.sort(missionsList, sorters.Xp);
 end
@@ -378,7 +381,6 @@ print("Initialize")
 --@end-debug@
 	self:SafeRegisterEvent("GARRISON_MISSION_COMPLETE_RESPONSE")
 	self:SafeRegisterEvent("GARRISON_MISSION_NPC_CLOSED")
-	self:SafeRegisterEvent("GARRISON_MISSION_NPC_OPENED")
 	self:SafeRegisterEvent("GARRISON_MISSION_STARTED")
 	for _,b in ipairs(GMF.MissionTab.MissionList.listScroll.buttons) do
 		local scale=0.8
@@ -450,7 +452,7 @@ print("Initialize")
 	assert("stringa"==nil or true)
 	assert(pcall(format,"%03d %03d",tonumber(1/0) or 1,tonumber(0/0) or 2))
 --@end-debug@
-	--self:SafeSecureHookScript("GarrisonMissionFrame","OnShow","Setup")
+	self:SafeSecureHookScript("GarrisonMissionFrame","OnShow","Setup")
 	return true
 end
 function addon:showdata(fullargs,action,missionid)
@@ -469,20 +471,9 @@ end

 function addon:CheckMP()
 	if (IsAddOnLoaded("MasterPlan")) then
-		if (GetAddOnMetadata("MasterPlan","Version")=="0.18") then
-		-- Last well behavioured version
-			MPGoodGuy=true
-			return
-		end
-		if GetAddOnMetadata("MasterPlan","Version")>="0.23" then
-			-- New compatible version
-			self:AddToggle("CKMP",true,L["Use GC Interface"],L["GCMPSWITCH"])
-			MPGoodGuy=true
-			MPSwitch=true
-		end
 		MP=true
+		ns.MP=true
 		MPSwitch=true
-		self:AddToggle("CKMP",true,L["Use GC Interface"],L["GCMPSWITCH"])
 	end
 end
 function addon:CheckGMM()
@@ -844,21 +835,7 @@ function addon:WipeMission(missionID)
 	--collectgarbage("step")
 end

----
---@param #string event GARRISON_MISSION_NPC_OPENED
--- Fires after GarrisonMissionFrame OnShow. Pretty useless
-local firstone=true
-function addon:EventGARRISON_MISSION_NPC_OPENED(event,...)
---@debug@
-print("NPC OPENED")
---@end-debug@	if (GCF) then GCF:Show() end
-	if firstone then
-		firstone=nil
-		self:Setup()
-	else
-		self:ScriptGarrisonMissionFrame_OnShow()
-	end
-end
+
 function addon:EventGARRISON_MISSION_NPC_CLOSED(event,...)
 --@debug@
 print("NPC CLOSED")
@@ -1453,6 +1430,7 @@ print("Setup")
 --@end-debug@
 	SIZEV=GMF:GetHeight()
 	self:CheckMP()
+	if MP then self:AddToggle("CKMP",true,L["Use GC Interface"],L["GCMPSWITCH"]) end
 	self:CheckGMM()
 	self:CreateHeader()
 	local tabMC=CreateFrame("CheckButton",nil,GMF,"SpellBookSkillLineTabTemplate")
@@ -2541,7 +2519,7 @@ function addon:AddStandardDataToButton(source,button,mission,missionID,bigscreen
 	end

 	button.Title:SetWidth(0);
-	button.Title:SetText(mission.name.. "addstd")
+	button.Title:SetText(mission.name)
 	local seconds=self:GetMissionData(missionID,'improvedDurationSeconds')
 	local duration=SecondsToTime(seconds)
 	if ( seconds >= GARRISON_LONG_MISSION_TIME ) then
diff --git a/GarrisonCommander.toc b/GarrisonCommander.toc
index f3860eb..9b506fc 100644
--- a/GarrisonCommander.toc
+++ b/GarrisonCommander.toc
@@ -13,7 +13,7 @@
 ## Notes-zhCN: 發送所有的追隨者與點擊多任務
 ## Author: Alar of Daggerspine
 ## Version: @project-version@ 6.2.0
-## X-Version: 2.6.9
+## X-Version: 2.6.11
 ## X-Revision: @project-abbreviated-hash@
 ## eMail: alar@aspide.it
 ## URL: http://wow.aspide.it
diff --git a/MissionCompletion.lua b/MissionCompletion.lua
index 672581f..de5b0f0 100644
--- a/MissionCompletion.lua
+++ b/MissionCompletion.lua
@@ -89,6 +89,7 @@ function module:Events(on)
 		self:RegisterEvent("GARRISON_MISSION_BONUS_ROLL_COMPLETE","MissionAutoComplete")
 		self:RegisterEvent("GARRISON_MISSION_COMPLETE_RESPONSE","MissionAutoComplete")
 		self:RegisterEvent("GARRISON_FOLLOWER_XP_CHANGED","MissionAutoComplete")
+		self:RegisterEvent("GARRISON_FOLLOWER_REMOVED","MissionAutoComplete")
 	else
 		self:UnregisterAllEvents()
 	end
@@ -173,6 +174,9 @@ function module:MissionAutoComplete(event,ID,arg1,arg2,arg3,arg4)
 			rewards.items[format("%d:%s",0,ID)]=1
 		end
 		return
+	-- GARRISON_FOLLOWER_REMOVED
+	elseif (event=="GARRISON_FOLLOWER_REMOVED") then
+		-- gestire la distruzione di un follower... senza il follower
 	-- GARRISON_MISSION_COMPLETE_RESPONSE: missionID, requestCompleted, succeeded
 	elseif (event=="GARRISON_MISSION_COMPLETE_RESPONSE") then
 		if (not arg1) then
diff --git a/ShipYard.lua b/ShipYard.lua
index 4d16747..108ca39 100644
--- a/ShipYard.lua
+++ b/ShipYard.lua
@@ -19,12 +19,6 @@ local module=addon:NewSubClass('ShipYard') --#Module
 local GameTooltip=GameTooltip
 local GarrisonShipyardMapMissionTooltip=GarrisonShipyardMapMissionTooltip

-function sprint(nome,this,...)
-
---@debug@
-print(nome,this:GetName(),...)
---@end-debug@
-end
 function module:Test()

 --@debug@
@@ -32,6 +26,8 @@ print("test")
 --@end-debug@
 end
 function module:OnInitialize()
+	--GARRISON_SHIPYARD_NPC_OPEN
+	--GARRISON_SHIPYARD_NPC_CLOSE
 	self:SafeSecureHook("GarrisonFollowerButton_UpdateCounters")
 	self:SafeSecureHook(GSF,"OnClickMission","HookedGSF_OnClickMission")
 	self:SafeSecureHook("GarrisonShipyardMapMission_OnEnter")
@@ -73,9 +69,10 @@ function module:HookedGarrisonShipyardMap_SetupBonus(missionList,frame,mission)
 		if mission.inProgress then return end
 		i=i+1
 		addendum=CreateFrame("Frame",nil,frame)
-		addendum:SetPoint("TOPLEFT",frame,"TOPRIGHT",-15,0)
 		addendum:SetFrameStrata("MEDIUM")
 		addendum:SetFrameLevel(GSF:GetFrameLevel()+5)
+		addendum:SetPoint("TOPLEFT",frame,"TOPRIGHT",-10,-15)
+
 		AddBackdrop(addendum)
 		addendum:SetBackdropColor(0,0,0,0.5)
 		addendum:SetWidth(50)
@@ -141,10 +138,10 @@ end


 function module:Setup(this,...)
-
 --@debug@
 print("Doing one time initialization for",this:GetName(),...)
 --@end-debug@
+	addon:CheckMP()
 	self:SafeSecureHookScript("GarrisonShipyardFrame","OnShow")
 	GSF:EnableMouse(true)
 	GSF:SetMovable(true)
diff --git a/embeds.xml b/embeds.xml
index 1db6ca4..a7ad1af 100644
--- a/embeds.xml
+++ b/embeds.xml
@@ -1,5 +1,15 @@
 <Ui xmlns="http://www.blizzard.com/wow/ui/">
 	<Script file="libs\Ace3\LibStub\LibStub.lua"/>
+	<Include file="libs\Ace3\CallbackHandler-1.0\CallbackHandler-1.0.xml"/>
+	<Include file="libs\Ace3\AceAddon-3.0\AceAddon-3.0.xml"/>
+	<Include file="libs\Ace3\AceConfig-3.0\AceConfig-3.0.xml"/>
+	<Include file="libs\Ace3\AceHook-3.0\AceHook-3.0.xml"/>
+	<Include file="libs\Ace3\AceEvent-3.0\AceEvent-3.0.xml"/>
+	<Include file="libs\Ace3\AceTimer-3.0\AceTimer-3.0.xml"/>
+	<Include file="libs\Ace3\AceLocale-3.0\AceLocale-3.0.xml"/>
+	<Include file="libs\Ace3\AceDB-3.0\AceDB-3.0.xml"/>
+	<Include file="libs\Ace3\AceConsole-3.0\AceConsole-3.0.xml"/>
+	<Include file="libs\Ace3\AceGUI-3.0\AceGUI-3.0.xml"/>
 	<Include file="libs\LibDeformat-3.0\lib.xml"/>
 	<Include file="libs\LibInit\LibInit.xml"/>
 </Ui>