Thread Tools Display Modes
09-07-12, 01:35 AM   #1
MrFireal
A Defias Bandit
Join Date: Sep 2012
Posts: 3
Pitbull4 - Display title

I'm probably asking way too much, but can anyone write a code that displays the player title along with the player name? Remember, if the title starts with a space " " it's a suffix. And if not, it's a prefix.

I have OCD when it comes to things such as this, and I'll never be happy about my UI until I can get this to work

Last edited by MrFireal : 09-07-12 at 03:49 AM.
  Reply With Quote
09-07-12, 07:27 AM   #2
myrroddin
A Pyroguard Emberseer
 
myrroddin's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 1,240
Start by reading http://www.wowace.com/addons/pitbull...rames/working/

You will find it either in the LuaTexts or DogTag stuff, I'm not sure which, but titles should be there somewhere.
  Reply With Quote
09-07-12, 04:04 PM   #3
MrFireal
A Defias Bandit
Join Date: Sep 2012
Posts: 3
Thanks for the reply. I got it figured out. But now I'm struggling to figure out how to retrieve the title of my target. If I use GetTitleName(GetCurrentTitle()) it outputs my own title instead of the target's.
  Reply With Quote
09-07-12, 05:04 PM   #4
Talyrius
An Onyxian Warder
 
Talyrius's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 363
You have to use UnitPVPName(unit). This function's naming may seem deceptive, however, it was added when titles were exclusively from PvP ranks.

For example:
Lua Code:
  1. local title = UnitPVPName("target")

Last edited by Talyrius : 09-07-12 at 05:40 PM.
  Reply With Quote
09-07-12, 07:37 PM   #5
MrFireal
A Defias Bandit
Join Date: Sep 2012
Posts: 3
Have my babies, please <3
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Pitbull4 - Display title


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off