diff --git a/OrderHallCommander.lua b/OrderHallCommander.lua
index 3707c17..f1784c7 100644
--- a/OrderHallCommander.lua
+++ b/OrderHallCommander.lua
@@ -462,9 +462,19 @@ function MixinFollowerIcon:ShowTooltip()
return
--@end-non-debug@]===]
end
- local link = C_Garrison.GetFollowerLink(self.followerID);
- if link then
- local garrisonFollowerID=select(2,strsplit(":", link))
+ -- fix by fuba
+ local garrisonFollowerID = self.followerID
+
+ local link = C_Garrison.GetFollowerLink(self.followerID)
+ if link then
+ local _, dbID, id3 = strsplit(":", link)
+
+ if id3 and id3 ~= "" then
+ garrisonFollowerID = id3
+ elseif dbID and dbID ~= "" then
+ garrisonFollowerID = dbID
+ end
+
local data=GarrisonFollowerTooltipTemplate_BuildDefaultDataForID(garrisonFollowerID)
data.levelxp=G.GetFollowerLevelXP(self.followerID)
data.xp=G.GetFollowerXP(self.followerID)
diff --git a/OrderHallCommander.toc b/OrderHallCommander.toc
index c46afe0..c6cf075 100644
--- a/OrderHallCommander.toc
+++ b/OrderHallCommander.toc
@@ -1,4 +1,4 @@
-## Interface: 110200, 110205
+## Interface: 110200, 110205, 110207
## Title: OrderHallCommander
## IconTexture: 134414
## Category-enUS: Expansion Features
diff --git a/OrderHallCommander.xml b/OrderHallCommander.xml
index 1ac5ea6..f00b9fc 100644
--- a/OrderHallCommander.xml
+++ b/OrderHallCommander.xml
@@ -103,7 +103,32 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/cache.lua b/cache.lua
index 9eb07c0..c5feb0a 100644
--- a/cache.lua
+++ b/cache.lua
@@ -630,8 +630,10 @@ function module:DrawTroopStatus(main)
frame:SetScript("OnDragStop",function(frame) OHF:StopMovingOrSizing() end)
frame:SetScript("OnClick",function(frame) local value=not addon:GetBoolean(frame.key) addon:SetVar(frame.key,value) paintCat(frame) addon:Apply(frame.key,value) end)
frame.OnEnter=frame:GetScript("OnEnter")
- frame:SetScript("OnEnter",function(frame)
- frame:OnEnter()
+ frame:SetScript("OnEnter",function(f)
+ if f.OnEnter then
+ f:OnEnter()
+ end
if addon:GetBoolean(frame.key) then
GameTooltip:AddLine(KEY_BUTTON1 .. " " .. C(ENABLE,"green"))
else
@@ -701,7 +703,9 @@ function module:GARRISON_LANDINGPAGE_SHIPMENTS()
end
function module:Refresh(event,...)
if (event == "CURRENCY_DISPLAY_UPDATE") then
- resources = C_CurrencyInfo.GetCurrencyInfo(currency)['quantity']
+ if currency then -- fix by fuba
+ resources = C_CurrencyInfo.GetCurrencyInfo(currency)['quantity']
+ end
return
elseif event=="GARRISON_FOLLOWER_REMOVED" or
event=="GARRISON_FOLLOWER_ADDED" then
@@ -716,10 +720,12 @@ end
function module:OnInitialized()
C_AddOns.LoadAddOn("Blizzard_OrderHallUI")
currency, _ = C_Garrison.GetCurrencyTypes(garrisonType);
- currencyName, resources, currencyTexture = addon:GetCurrencyInfo(currency)
---@debug@
+ if currency then
+ currencyName, resources, currencyTexture = addon:GetCurrencyInfo(currency)
+--[==[@debug@
print("Currency init",currencyName, resources, currencyTexture)
---@end-debug@
+--@end-debug@]==]
+ end
addon.resourceFormat=COSTS_LABEL .." %d"
self:ParseFollowers()
end
@@ -742,7 +748,7 @@ end
---- Public Interface
--
function addon:GetResources(refresh)
- if refresh then
+ if refresh and currency then -- fix by fuba
resources = C_CurrencyInfo.GetCurrencyInfo(currency)['quantity']
end
return resources,currencyName,currencyTexture
diff --git a/missionlist.lua b/missionlist.lua
index 9ba2e0e..82a183d 100644
--- a/missionlist.lua
+++ b/missionlist.lua
@@ -1,4 +1,5 @@
-local __FILE__=tostring(debugstack(1,2,0):match("(.*):1:")) -- Always check line number in regexp and file, must be 1
+--local faction,_,level=GetFactionInfoByID(factionID)
+ __FILE__=tostring(debugstack(1,2,0):match("(.*):1:")) -- Always check line number in regexp and file, must be 1
--@debug@
print('Loaded',__FILE__)
--@end-debug@
@@ -318,7 +319,9 @@ function module:RewardWarning(this)
end
local factionID=addon.allReputationGain[this.itemID]
if factionID then
- local faction,_,level=GetFactionInfoByID(factionID)
+ local factionData = C_Reputation.GetFactionDataByID(factionID)
+ local faction = factionData and factionData.name or ""
+ local level = factionData and factionData.currentStanding or nil
if level then
level=_G['FACTION_STANDING_LABEL' .. level]
tip:AddLine(FACTION_STANDING_CHANGED:format(C(level,"GREEN"),C(faction,"GREEN")),C.Orange())