Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions OrderHallCommander.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion OrderHallCommander.toc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Interface: 110200, 110205
## Interface: 110200, 110205, 110207
## Title: OrderHallCommander
## IconTexture: 134414
## Category-enUS: Expansion Features
Expand Down
27 changes: 26 additions & 1 deletion OrderHallCommander.xml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,32 @@
<OnShow method="OnShow"/>
</Scripts>
</Frame>
<Frame name="OHCTroop" enableMouse="true" inherits="OrderHallClassSpecCategoryTemplate" virtual="true" />
<!-- fix by fuba -->
<Frame name="OHCTroop" enableMouse="true" virtual="true">
<Size x="80" y="23"/>
<Layers>
<Layer level="ARTWORK">
<Texture parentKey="Icon">
<Size x="46" y="23"/>
<Anchors>
<Anchor point="BOTTOMLEFT" x="5" y="1"/>
</Anchors>
</Texture>
<FontString inherits="GameFontNormal" justifyH="LEFT" parentKey="Count">
<Anchors>
<Anchor point="LEFT" relativePoint="RIGHT" relativeKey="$parent.Icon" x="5" y="1"/>
</Anchors>
</FontString>
</Layer>
<Layer level="OVERLAY">
<Texture parentKey="TroopPortraitCover" atlas="orderhall-commandbar-iconmask" useAtlasSize="true">
<Anchors>
<Anchor point="CENTER" relativePoint="CENTER" relativeKey="$parent.Icon"/>
</Anchors>
</Texture>
</Layer>
</Layers>
</Frame>
<Frame name="OHCFollowerIcon" mixin="OrderHallCommanderMixin,OrderHallCommanderMixinFollowerIcon" enableMouse="true" inherits="GarrisonFollowerPortraitTemplate" virtual="true" >
<Size x="52" y="60"/>
<Scripts>
Expand Down
20 changes: 13 additions & 7 deletions cache.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
7 changes: 5 additions & 2 deletions missionlist.lua
Original file line number Diff line number Diff line change
@@ -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@
Expand Down Expand Up @@ -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())
Expand Down