Im currently working on making tomtomtargetarrow an even better addon to support regular actions in BG's both as healer but also as CC and just plain DPS. My goal is to make this addon capabable of optimizing some of the things that you do all the time in BG's like figure out where people are and get to key fighting areas fast and such.
In particular i found out to work well for me, to use the world map a lot. I orientate myself in relation to others using the worldmap more than i use the strategic map, mostly because it takes too much space up or have to be so small that it gets useless because all icons are too cluttered up in one spot.
So to my question.
I figured out to attach an eventhandler to the frame that represents the dots (player) on the worldmap. Since the frame is not a button, i can't react to OnClick event. Then i figured out that i could react to OnMouseDown/Up and that works ok, but the real problem is now, that since i have the name of the player (i save that in a property on the dotFrame) i want to target that player like TargetUnit("Bloodyhelln"), but since 2.0 or something that api call has been protected. How can i accomplish that now in 3.1?
One approach that i thought of but haven't tried out yet, would be to apply a button inheriting from SecureActionButtonTemplate and then use "SetAttribute()" to attach a macro to. That way, when the user clicks a dot on the map, he's not really hitting the original dot-frame, but the SecureActionButtonTemplate-dotFrame which triggers the macro. This however seems extremely complicated and im not even sure i can get that to work... so if anyone else have suggestions i'd love to hear from you.