I want to change the appearance of the troop icons on the OrderHallCommandBar:
Lua Code:
-- ignore the "CreateEventHandler" function as it basically just handles my events in an easier way
em:CreateEventHandler("GARRISON_UPDATE", function()
if (type(OrderHallCommandBar.TroopSummary) == "table") then
for id, troop in ipairs(OrderHallCommandBar.TroopSummary) do
-- do stuff
end
end
end);
The only problem is that I have no clue when this "OrderHallCommandBar.TroopSummary" table fills up with data, nor when the troop icons appear on the bar. I've tried "GARRISON_UPDATE" but this doesn't work. It works when you reload the UI when you are already in the Class Hall but not when you log out, login, and then enter the Class Hall. I've tried hooking all functions inside "Blizzard_OrderHallCommandBar.lua" but in that file there is no code that mentions "TroopSummary" and it is inherited from "Blizzard_OrderHallCommandBar.xml":
XML Code:
<Frame name="OrderHallClassSpecCategoryTemplate" parentArray="TroopSummary" virtual="true" mixin="OrderHallClassSpecCategory">
I've also tried running my troops reskinning code after "PLAYER_ENTERING_WORLD" and when the "Blizzard_OrderHallUI" AddOn is loaded but the TroopSummary table is always empty and then it shows. I just don't know what event/function to hook.
Does anyone know anything about this?
Thanks