Blizzard changed GARRISON_FOLLOWER_MAX_UPGRADE_QUALITY to an array
Alar of Runetotem [03-29-17 - 07:29]
Blizzard changed GARRISON_FOLLOWER_MAX_UPGRADE_QUALITY to an array
Fix: Message: Interface\AddOns\GarrisonCommander\FollowerCache.lua:25: attempt to perform arithmetic on local 'GARRISON_FOLLOWER_MAX_UPGRADE_QUALITY' (a table value)
diff --git a/FollowerCache.lua b/FollowerCache.lua
index f869f50..4a41532 100644
--- a/FollowerCache.lua
+++ b/FollowerCache.lua
@@ -14,7 +14,6 @@ local tinsert=tinsert
local tContains=tContains
local wipe=wipe
local Mbase = {}
-local GARRISON_FOLLOWER_MAX_UPGRADE_QUALITY=GARRISON_FOLLOWER_MAX_UPGRADE_QUALITY
local GARRISON_FOLLOWER_MAX_LEVEL=GARRISON_FOLLOWER_MAX_LEVEL
local format=format
local tostring=tostring
@@ -22,7 +21,8 @@ local GetItemInfo=GetItemInfo
local LE_FOLLOWER_TYPE_GARRISON_6_0=_G.LE_FOLLOWER_TYPE_GARRISON_6_0
local LE_FOLLOWER_TYPE_SHIPYARD_6_2=_G.LE_FOLLOWER_TYPE_SHIPYARD_6_2
local LE_FOLLOWER_TYPE_GARRISON_7_0=_G.LE_FOLLOWER_TYPE_GARRISON_7_0
-local maxrank=GARRISON_FOLLOWER_MAX_UPGRADE_QUALITY*1000+GARRISON_FOLLOWER_MAX_LEVEL
+local maxrank=_G.GARRISON_FOLLOWER_MAX_UPGRADE_QUALITY[LE_FOLLOWER_TYPE_GARRISON_6_0]*1000+GARRISON_FOLLOWER_MAX_LEVEL
+local maxrankoh=_G.GARRISON_FOLLOWER_MAX_UPGRADE_QUALITY[LE_FOLLOWER_TYPE_GARRISON_7_0]*1000+110
local module=addon:NewSubClass('FollowerCache') --#module
local cache={} --#cache
local followerTypes={}
@@ -155,7 +155,7 @@ function cache:AddExtraData(follower)
follower.fullname=format("%3d %s",follower.rank,follower.coloredname)
follower.maxed=follower.qLevel>=maxrank
if follower.followerTypeID==LE_FOLLOWER_TYPE_GARRISON_7_0 then
- follower.maxed=false
+ follower.maxed=follower.qLevel>=maxrankoh
end
local weaponItemID, weaponItemLevel, armorItemID, armorItemLevel = G.GetFollowerItems(follower.followerID);
follower.weaponItemID=weaponItemID
diff --git a/GarrisonCommander.lua b/GarrisonCommander.lua
index 184d2ee..c4e88a6 100644
--- a/GarrisonCommander.lua
+++ b/GarrisonCommander.lua
@@ -95,7 +95,10 @@ local GARRISON_MISSION_PERCENT_CHANCE="%d%%"-- GARRISON_MISSION_PERCENT_CHANCE
--local GARRISON_FOLLOWER_BUSY_COLOR=GARRISON_FOLLOWER_BUSY_COLOR
--local GARRISON_FOLLOWER_INACTIVE_COLOR=GARRISON_FOLLOWER_INACTIVE_COLOR
--local GARRISON_CURRENCY=GARRISON_CURRENCY --824
---local GARRISON_FOLLOWER_MAX_UPGRADE_QUALITY=GARRISON_FOLLOWER_MAX_UPGRADE_QUALITY -- 4
+local LE_FOLLOWER_TYPE_GARRISON_6_0=LE_FOLLOWER_TYPE_GARRISON_6_0
+local LE_FOLLOWER_TYPE_SHIPYARD_6_2=LE_FOLLOWER_TYPE_SHIPYARD_6_2
+local LE_FOLLOWER_TYPE_GARRISON_7_0=LE_FOLLOWER_TYPE_GARRISON_7_0
+local GARRISON_FOLLOWER_MAX_UPGRADE_QUALITY=GARRISON_FOLLOWER_MAX_UPGRADE_QUALITY[LE_FOLLOWER_TYPE_GARRISON_6_0]
--local GARRISON_FOLLOWER_MAX_LEVEL=GARRISON_FOLLOWER_MAX_LEVEL -- 100
local GARRISON_CURRENCY=GARRISON_CURRENCY
diff --git a/OrderHall.lua b/OrderHall.lua
index 05918c6..48022a5 100644
--- a/OrderHall.lua
+++ b/OrderHall.lua
@@ -12,13 +12,13 @@ local strsplit=strsplit
local select=select
local GetCurrencyInfo=GetCurrencyInfo
local generated
-local GARRISON_FOLLOWER_MAX_UPGRADE_QUALITY=GARRISON_FOLLOWER_MAX_UPGRADE_QUALITY
local GARRISON_CURRENCY=GARRISON_CURRENCY
local GARRISON_SHIP_OIL_CURRENCY=GARRISON_SHIP_OIL_CURRENCY
local GARRISON_FOLLOWER_MAX_LEVEL=GARRISON_FOLLOWER_MAX_LEVEL
local LE_FOLLOWER_TYPE_GARRISON_6_0=LE_FOLLOWER_TYPE_GARRISON_6_0
local LE_FOLLOWER_TYPE_SHIPYARD_6_2=LE_FOLLOWER_TYPE_SHIPYARD_6_2
local LE_FOLLOWER_TYPE_GARRISON_7_0=LE_FOLLOWER_TYPE_GARRISON_7_0
+local GARRISON_FOLLOWER_MAX_UPGRADE_QUALITY=GARRISON_FOLLOWER_MAX_UPGRADE_QUALITY[LE_FOLLOWER_TYPE_GARRISON_7_0]
local module=addon:NewSubClass('OrderHall') --#Module
local GameTooltip=GameTooltip
local GCS
@@ -307,8 +307,8 @@ print("Adding Menu",GCS.Menu,GHF.MissionTab:IsVisible(),GHF.FollowerTab:IsVisibl
frame:SetFrameStrata(GCS:GetFrameStrata())
frame:SetFrameLevel(GCS:GetFrameLevel()+2)
local label=AceGUI:Create("Label")
- label:SetText(L["Support for Order Hall missions is being moved to OrderHallCommander.\nPlease install and update it"])
- label:SetColor(C.Orange())
+ label:SetText(L["Support for Order Hall missions has been moved to OrderHallCommander.\nPlease install it NOW! (no need to remove GarrisoCommander)"])
+ label:SetColor(C.Red())
label:SetWidth(380)
menu:AddChild(label)
menu:ClearAllPoints()
diff --git a/ShipYard.lua b/ShipYard.lua
index 96474c1..e667ae1 100644
--- a/ShipYard.lua
+++ b/ShipYard.lua
@@ -16,12 +16,12 @@ local strsplit=strsplit
local select=select
local GetCurrencyInfo=GetCurrencyInfo
local generated
-local GARRISON_FOLLOWER_MAX_UPGRADE_QUALITY=GARRISON_FOLLOWER_MAX_UPGRADE_QUALITY
local GARRISON_CURRENCY=GARRISON_CURRENCY
local GARRISON_SHIP_OIL_CURRENCY=GARRISON_SHIP_OIL_CURRENCY
local GARRISON_FOLLOWER_MAX_LEVEL=GARRISON_FOLLOWER_MAX_LEVEL
local LE_FOLLOWER_TYPE_GARRISON_6_0=LE_FOLLOWER_TYPE_GARRISON_6_0
local LE_FOLLOWER_TYPE_SHIPYARD_6_2=LE_FOLLOWER_TYPE_SHIPYARD_6_2
+local GARRISON_FOLLOWER_MAX_UPGRADE_QUALITY=GARRISON_FOLLOWER_MAX_UPGRADE_QUALITY[LE_FOLLOWER_TYPE_SHIPYARD_6_2]
local module=addon:NewSubClass('ShipYard') --#Module
local GameTooltip=GameTooltip
local GarrisonShipyardMapMissionTooltip=GarrisonShipyardMapMissionTooltip
@@ -413,12 +413,12 @@ function module:RefreshMenu()
end
end
function module:AddMenu()
---@debug@
-print("Adding Menu",GCS.Menu,GSF.MissionTab:IsVisible(),GSF.FollowerTab:IsVisible())
---@end-debug@
if not GCS or GCS.Menu then
return
end
+--@debug@
+ print("Adding Menu",GCS.Menu,GSF.MissionTab:IsVisible(),GSF.FollowerTab:IsVisible())
+--@end-debug@
local menu,size
self.currentmenu=GSF.FollowerTab
menu,size=self:CreateOptionsLayer('SHIPMOVEPANEL','SHIPENHA','SGCSKIPEPIC','SGCMINLEVEL','SGCRIG')