Quantcast

Various fixes

Alar of Runetotem [07-19-18 - 00:46]
Various fixes
Filename
GarrisonCommander-Broker/GarrisonCommander-Broker.toc
GarrisonCommander-Broker/ldb.lua
GarrisonCommander.toc
GarrisonCommander.xml
MissionCompletion.lua
MissionControl.lua
OrderHall.lua
RelNotes.lua
ShipControl.lua
Widgets.lua
embeds.xml
diff --git a/GarrisonCommander-Broker/GarrisonCommander-Broker.toc b/GarrisonCommander-Broker/GarrisonCommander-Broker.toc
index 7b70a85..9bf2f65 100644
--- a/GarrisonCommander-Broker/GarrisonCommander-Broker.toc
+++ b/GarrisonCommander-Broker/GarrisonCommander-Broker.toc
@@ -1,4 +1,4 @@
-## Interface: 70200
+## Interface: 80000
 ## Title: GarrisonCommander-Broker
 ## Notes: Data-Broker for GarrisonCommander
 ## Notes-itIT: Data-Broker per GarrisonCommander
diff --git a/GarrisonCommander-Broker/ldb.lua b/GarrisonCommander-Broker/ldb.lua
index f258cad..f635f4f 100644
--- a/GarrisonCommander-Broker/ldb.lua
+++ b/GarrisonCommander-Broker/ldb.lua
@@ -192,7 +192,10 @@ end
 function addon:CheckDateReset()
 	local oldToday=today
 	local reset=GetQuestResetTime()
-	local weekday, month, day, year = CalendarGetDate()
+	local t= C_Calendar.GetDate()
+	local day=t.monthDay
+	local year=t.year
+	local month=t.month
 	if (day <1 or reset<1) then
 		self:ScheduleTimer("CheckDateReset",1)
 		return day,reset
@@ -212,14 +215,11 @@ function addon:CheckDateReset()
 		today=yesterday
 	end
 	self:ScheduleTimer("CheckDateReset",60)
---@debug@
-	if (false and today~=oldToday) then
-		self:Popup(format("o:%s y:%s t:%s r:%s [w:%s m:%s d:%s y:%s] ",oldToday,yesterday,today,reset,CalendarGetDate()))
+	if (today~=oldToday) then
 		dataobj:Update()
 		farmobj:Update()
 		workobj:Update()
 	end
---@end-debug@
 end
 function addon:CountMissing()
 	local tot=0
diff --git a/GarrisonCommander.toc b/GarrisonCommander.toc
index c0a2fc9..62711fd 100644
--- a/GarrisonCommander.toc
+++ b/GarrisonCommander.toc
@@ -1,4 +1,4 @@
-## Interface: 70200
+## Interface: 80000
 ## Title: GarrisonCommander
 ## Notes: Sending all follower to missions with just one click and more
 ## Notes-itIT: Invia tutti i seguaci in missione con un click e molto altro
diff --git a/GarrisonCommander.xml b/GarrisonCommander.xml
index b4c470f..d455748 100644
--- a/GarrisonCommander.xml
+++ b/GarrisonCommander.xml
@@ -424,7 +424,6 @@
 	</Frame>
 	<Button name="GarrisonTraitCounterTemplate" inherits="GarrisonThreatCounterTemplate" virtual="true" enableMouse="true">
 		<Scripts>
-			<OnEnter function="GarrisonTraitCounter_OnEnter"/>
 			<OnLeave function="GameTooltip_Hide"/>
 			<OnClick>
 				PlaySound("igMainMenuOptionCheckBoxOn");
diff --git a/MissionCompletion.lua b/MissionCompletion.lua
index f23b2a6..fa03197 100644
--- a/MissionCompletion.lua
+++ b/MissionCompletion.lua
@@ -311,10 +311,10 @@ function module:GetMissionResults(success,currentMission)
 	stopTimer()
 	if (success) then
 		report:AddMissionResult(currentMission.missionID,true)
-		PlaySound("UI_Garrison_Mission_Complete_Mission_Success")
+		PlaySound(SOUNDKIT.UI_GARRISON_MISSION_COMPLETE_MISSION_SUCCESS)
 	else
 		report:AddMissionResult(currentMission.missionID,false)
-		PlaySound("UI_Garrison_Mission_Complete_Encounter_Fail")
+		PlaySound(SOUNDKIT.UI_GARRISON_MISSION_COMPLETE_MISSION_FAIL_STINGER)
 	end
 	if success then
 		local resourceMultiplier=currentMission.resourceMultiplier or {}
@@ -344,7 +344,7 @@ function module:MissionsPrintResults(success)
 		local qm=addon:GetModule("Quick")
 		addon.ScheduleTimer(qm,"RunQuick",0.2)
 		return
-	end
+	end
 	local reported
 	local followers
 	for k,v in pairs(rewards.currencies) do
@@ -354,7 +354,7 @@ function module:MissionsPrintResults(success)
 			report:AddIconText(v.icon,GetMoneyString(v.qt))
 		else
 			-- Other currency reward
-			report:AddIconText(v.icon,GetCurrencyLink(k),v.qt)
+			report:AddIconText(v.icon,GetCurrencyLink(k,v.qt))
 		end
 	end
 	local items=new()
diff --git a/MissionControl.lua b/MissionControl.lua
index dc922e0..c30d8c8 100644
--- a/MissionControl.lua
+++ b/MissionControl.lua
@@ -146,7 +146,7 @@ function module:RunMission(missionID,start)
 	local GMC=GMF.MissionControlTab
 	if (start) then
 		G.StartMission(missionID)
-		PlaySound("UI_Garrison_CommandTable_MissionStart")
+		PlaySound(SOUNDKIT.UI_GARRISON_COMMAND_TABLE_MISSION_START)
 		addon:RefreshFollowerStatus()
 		return
 	end
@@ -162,7 +162,7 @@ function module:RunMission(missionID,start)
 				if (not missionID) then
 					coroutine.yield(true)
 					G.StartMission(party.missionID)
-					PlaySound("UI_Garrison_CommandTable_MissionStart")
+					PlaySound(SOUNDKIT.UI_GARRISON_COMMAND_TABLE_MISSION_START)
 					coroutine.yield(true)
 				else
 					self:ScheduleTimer("RunMission",0.25,party.missionID,true)
diff --git a/OrderHall.lua b/OrderHall.lua
index 48022a5..57e8b4e 100644
--- a/OrderHall.lua
+++ b/OrderHall.lua
@@ -34,10 +34,7 @@ function module:OnInitialize(...)
 	OHFFollowerTab=OrderHallMissionFrame.FollowerTab -- Contains model view
 	if GetAddOnEnableState(UnitName("player"),"OrderHallCommander") > 0 then
 		ns.ignoreHall=true
-		self:Print("Delegating hall management to OrderHallCommander")
 		return
-	else
-		self:Print(L["Support for Order Hall missions is being moved to OrderHallCommander.\nPlease install and update it"])
 	end
 	GHF=ns.GHF
 	GHFMissions=ns.GHFMissions
diff --git a/RelNotes.lua b/RelNotes.lua
index 73e9777..8a4a43b 100644
--- a/RelNotes.lua
+++ b/RelNotes.lua
@@ -22,6 +22,18 @@ self:Wiki([[
 == Silent mode ==
 typing /gac silent in chat will eliminate every chat message from GarrisonCommander
 ]])
+self:RelNotes(2,18,5,[[
+Fix: OrderHallCommander advertising removed. I still stronlgy suggest to install it because Order Hall support in GC is totally outdated
+]])
+self:RelNotes(2,18,4,[[
+Fix: Error when playing sounds
+]])
+self:RelNotes(2,18,2,[[
+Fix: Message: Interface\AddOns\GarrisonCommander\FollowerCache.lua:25: attempt to perform arithmetic on local 'GARRISON_FOLLOWER_MAX_UPGRADE_QUALITY' (a table value)
+]])
+self:RelNotes(2,18,1,[[
+Toc bump
+]])
 self:RelNotes(2,18,0,[[
 Feature: Improved autologout management. Now you are logged out on timeout ONLY if you started mission control via ctrl-click on table.
 Popup message should be informative
diff --git a/ShipControl.lua b/ShipControl.lua
index 33c2007..cd1d834 100644
--- a/ShipControl.lua
+++ b/ShipControl.lua
@@ -178,7 +178,8 @@ function module:RunMission(missionID,start)
 	local GMC=GSF.MissionControlTab
 	if (start) then
 		G.StartMission(missionID)
-		PlaySound("UI_Garrison_CommandTable_MissionStart")
+		PlaySound(SOUNDKIT.UI_GARRISON_COMMAND_TABLE_MISSION_START)
+
 		addon:RefreshFollowerStatus()
 		return
 	end
@@ -197,7 +198,7 @@ function module:RunMission(missionID,start)
 				if (not missionID) then
 					coroutine.yield(true)
 					G.StartMission(party.missionID)
-					PlaySound("UI_Garrison_CommandTable_MissionStart")
+					PlaySound(SOUNDKIT.UI_GARRISON_COMMAND_TABLE_MISSION_START)
 					coroutine.yield(true)
 				else
 					self:ScheduleTimer("RunMission",0.25,party.missionID,true)
diff --git a/Widgets.lua b/Widgets.lua
index 71359d4..e9f4274 100644
--- a/Widgets.lua
+++ b/Widgets.lua
@@ -127,7 +127,7 @@ print(follower)
 		local quality=G.GetFollowerQuality(followerID) or follower.quality
 		local level=G.GetFollowerLevel(followerID) or follower.level
 		if levelup then
-			PlaySound("UI_Garrison_CommandTable_Follower_LevelUp");
+			PlaySound(SOUNDKIT.UI_GARRISON_COMMAND_TABLE_FOLLOWER_LEVEL_UP);
 		end
 		return self:AddFollowerIcon(followerType,
 			addon:GetFollowerTexture(follower),
diff --git a/embeds.xml b/embeds.xml
index a87b286..5455b88 100644
--- a/embeds.xml
+++ b/embeds.xml
@@ -3,5 +3,6 @@
 	<Include file="libs\LibDeformat-3.0\lib.xml"/>
 	<Include file="libs\Ace3\AceBucket-3.0\AceBucket-3.0.xml" />
 	<Include file="libs\Ace3\AceSerializer-3.0\AceSerializer-3.0.xml" />
+	<Include file="libs\MSA-DropDownMenu-1.0\MSA-DropDownMenu-1.0.xml"/>
 	<Include file="libs\LibItemUpgradeInfo-1.0\LibItemUpgradeInfo-1.0.xml"/>
 </Ui>