Has anyone worked with garrison followers already?
Is it possible to generate a tooltip/info window in the follower overview that generates the follower items and itemlevel?
API:
http://wowprogramming.com/docs/api
The following functions sound interesting
- C_Garrison.GetFollowerInfo
- C_Garrison.GetFollowerItemLevelAverage
- C_Garrison.GetFollowerItems
It would be super helpful if one could enhance the follower view by that information.
Useful files seem to be:
https://github.com/tekkub/wow-ui-sou...werTooltip.lua
https://github.com/tekkub/wow-ui-sou...werTooltip.xml
https://github.com/tekkub/wow-ui-sou...werTooltip.lua
https://github.com/tekkub/wow-ui-sou...werTooltip.xml
https://github.com/tekkub/wow-ui-sou...ard_GarrisonUI
That button on the minimap seems to link to:
https://github.com/tekkub/wow-ui-sou...andingPage.lua
https://github.com/tekkub/wow-ui-sou...gPage.xml#L573
Hmm...
There are frames for itemArmor, itemWeapon and itemAverageLevel already.
https://github.com/tekkub/wow-ui-sou...gPage.xml#L797
Interesting...actually the info should be there. Here is the condition that will show items for a given follower.
https://github.com/tekkub/wow-ui-sou...lates.lua#L787
GarrisonFollowerPage_SetItem generates the items and shows the frame if items are found.
https://github.com/tekkub/wow-ui-sou...lates.lua#L595
Hmm.
So the info should be there right? Maybe sth on the condition is odd preventing it from firing properly.
Hmm yeah. Actually there is. The condition checks for landing page. And the item level is not displayed if isLandingPage is true.
But what other follower lists do we have?
Hmmm....
I'm curious what this might do
lua Code:
local function AfterGarrisonFollowerPage_ShowFollower(self,followerID)
print(followerID)
local followerInfo = C_Garrison.GetFollowerInfo(followerID)
local weaponItemID, weaponItemLevel, armorItemID, armorItemLevel = C_Garrison.GetFollowerItems(followerInfo.followerID)
print(weaponItemID, weaponItemLevel, armorItemID, armorItemLevel)
GarrisonFollowerPage_SetItem(self.ItemWeapon, weaponItemID, weaponItemLevel)
GarrisonFollowerPage_SetItem(self.ItemArmor, armorItemID, armorItemLevel)
self.ItemAverageLevel.Level:SetText(ITEM_LEVEL_ABBR.." ".. followerInfo.iLevel)
self.ItemAverageLevel.Level:Show()
end
hooksecurefunc("GarrisonFollowerPage_ShowFollower",AfterGarrisonFollowerPage_ShowFollower)