Thread Tools Display Modes
04/24/16, 10:05 PM   #1
cyxui
AddOn Author - Click to view addons
Join Date: Nov 2015
Posts: 62
color code at the end of player id

I have noticed that on some people's machine player id would have some color code string + some number at the end. specifically the seller field returned by GetTradingHouseSearchResultItemInfo function.

For example @exampleid|c000000;1;14 99|r

I wonder what is causing that?? is it from addon or ZOS? If it is from ZOS is there a function to remove the post fix? if it is from an addon is there a way I can get the original player ID?

Thanks.
  Reply With Quote
04/25/16, 01:40 AM   #2
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,979
To get the original player id just strip everything starting at "|". The shouldn't be a | in a player name if I'm correct.
You can use the lua string functions, especially

Lua Code:
  1. local startDelimiter = string.find(s, '|')

To find the "|" delimiter.

And then substring to get the string from the start until the found "|" character.
Assuming the total string including the color codes is in a variable called "accountName":
Lua Code:
  1. local accountName = string.sub(accountName ,  startDelimiter)

Maybe you need to male startDelimiter = startDelimiter -1 to strip the "|" character itsself. i'm not sure if the string.find function will give you the value before or including the "|"
  Reply With Quote
04/25/16, 05:32 AM   #3
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,578
This is the result of one of the many bad practices used in Master Merchant. It would be better if this information was put into its own field on the data table of the entry instead of being attached to an existing field.
  Reply With Quote
04/25/16, 07:05 PM   #4
cyxui
AddOn Author - Click to view addons
Join Date: Nov 2015
Posts: 62
Originally Posted by sirinsidiator View Post
This is the result of one of the many bad practices used in Master Merchant. It would be better if this information was put into its own field on the data table of the entry instead of being attached to an existing field.
I see. thanks!
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » color code at the end of player id


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