View Single Post
03-27-09, 03:18 AM   #9
Tristanian
Andúril
Premium Member
AddOn Author - Click to view addons
Join Date: Nov 2007
Posts: 279
After considerable digging and playing around with almost every faction related function in the game, I believe that the NPC faction is unfortunately hardcoded in the tooltip. If that is indeed the case, then your only chance to get the faction without "guessing" the tooltip line each and every time (which can be entirely inaccurate), would be to set the target tooltip, scan each line (except maybe the first) and try to match it to a faction name present in the player's faction index, hoping to get a positive match.

The problem with this method is that the player's faction index does not include inactive factions or factions that belong to collapsed headers, so if any of these 2 conditions are met, you have a problem. Not an impossible one, but would require considerable coding to get around it and at the end of the day, I'm not even sure its worth the trouble.
__________________
  Reply With Quote