character name function?
I cannot find the function to return your character's name. It looks like you can get the login name but I don't see how to find your currently logged in character. I would expect a simple call for that.
Would GetUnitName("player") be what I need? |
There were 3 functions that returned your name. One for your character , one including the server name and one for your @ name. I put it in one of the threads somewhere but will check again when I get home.
|
Thanks!
I can't test these out until live, but I've been coding an addon and I just couldn't find that functionality. |
Here you go:
local charName = GetUnitName("player") local serverCharName = GetUniqueNameForCharacter(charName) local accountName = GetDisplayName() This was tested during the weekend test before the last one so about a month or so old testing wise. But I don't recall these functions amongst the ones that were deprecated. |
Quote:
I saw GetDisplayName(), but was pretty sure that was the @name. But now, that leads to another question... what's the server? Is that EU/US/PTR? |
Can't remember what was displayed when I tested it on myself but it was something along the lines of charname - server name .. I'll see if I happened to screenshot it but I don't think I did.
nope: Just screenshotted the big data grabs I did in case I needed to check the info. |
Let's follow this up with the extra character after character names.
What is the deal with these? I know all player names from EVENT_COMBAT_EVENT have about 3 extra characters on the end. A few NPC characters do too... Any one know why or have any details here? |
And another interesting name function I hadn't spotted before :
DecorateDisplayName(string displayName) With its UnDecorate and IsDecorated.. sister functions. Wonder what that does. |
Xrystal, I saw that too. I figured it was the extra stuff added to indicate a boss or elite.
|
Ah yeah that would make sense
|
Quote:
|
Quote:
Just remove the '^' and all that follows for the cleanup. But the question is why is it there at all??? |
That looks similar to what I was seeing when I was looking at items looted. I think it was the itemLink or itemString but not 100% sure now.
|
Quote:
The strange characters are because it's a "raw" name. What does that mean? No idea. GetRawUnitName() vs GetUnitName() I don't know how to reliably convert it, either. |
I also noticed after a few item names '^p' being added. Can't think what it is but just added code to remove those characters if they exist in the hopes that it works but not come across another one yet to test it out.
|
All times are GMT -6. The time now is 01:01 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI