View Single Post
09/22/20, 05:00 PM   #7
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,959
Code:
Ideally the unit tag for group[n]
Read my last answer then?

And maybe check the ESOUIDocumentationPxx.txt for current "Stonethorn" API:
https://www.esoui.com/forums/attachm...5&d=1598294293

There exist several GetUnit and Displayname etc. functions you are able to use.


And if I understand the code corectly "pin" is a mappin, so pin will be e.g. something like
ZO_MapPin.PIN_DATA[MAP_PIN_TYPE_GROUP_LEADER]
So pin:GetUnitTag() would be something like
ZO_MapPin.PIN_DATA[MAP_PIN_TYPE_GROUP_LEADER]:GetUnitTag()

But this should also return the same as GetGroupLeaderUnitTag() then, imo


Edit:
After checking votan's addon code:

Lua Code:
  1. addon.IconMemberSimple = function(pin) GetUnitTag(pin) return iconMember end
This is a function accepting a pin as parameter.
The function is assigned in the settings to e.g.
Lua Code:
  1. if settings.pveIcon == const.Simple then
  2.             leader.texture = addon.IconLeaderSimple

So leader.texture will be the function accepting the pin.
You need to search where leader.texture is used then and where the pin parameter comes from.

eh voila:
Lua Code:
  1. local leader = ZO_MapPin.PIN_DATA[MAP_PIN_TYPE_GROUP_LEADER]
As I though above, this ZO_MapPin.PIN_DATA[MAP_PIN_TYPE_GROUP_LEADER] should be the "pin".
Whenever this pin (leader, or ZO_MapPin.PIN_DATA[MAP_PIN_TYPE_GROUP_LEADER]) will update it's texture it will call the function assigned to it (addon.IconLeaderSimple) passing in itsself (the "pin" parameter).
At least this is what I understood.


Try to use the addon merTorchbug or zgoo to inspect ingame the variable
ZO_MapPin.PIN_DATA[MAP_PIN_TYPE_GROUP_LEADER]
via e.g.
/tbug ZO_MapPin.PIN_DATA[MAP_PIN_TYPE_GROUP_LEADER]
You'll see the possible functions and variables of it then in a table grid view, and below __index you see other functions etc. which are from "parent classes" of this variable/table, and so on.

You'll understand more easily what function belongs where and what value is updated when this way, at least this is what I did :-)

Last edited by Baertram : 09/22/20 at 05:09 PM.
  Reply With Quote