ItemName from ItemLink
I'm going throught the guild sales transactions and pulling the data out using the GetGuildEventInfo method, which when dealing with a guild store sale returns the item link of the item that was sold. My question is, the item link sometimes has a ^n or ^p and I'm not sure why. Why are they being included in the item link?
Examples: "|H0:item:54512:81:50:45870:81:50:0:0:0:0:0:0:0:0:0:5:0:0:0:0|hruby necklace of reduce spell cost^n|h" "|H0:item:45100:51:50:26580:51:50:0:0:0:0:0:0:0:0:0:1:0:0:10000:0|hcalcinium pauldron of health^p|h" I'm also curious why sometimes the names come back in all lower case and sometimes in proper case. Is there a trick I'm missing here? Thanks in advance. |
- the suffixes ^p , ^m, etc are here for translation help for the UI.
- some part of the UI add to the item link a string which will replace the original name of the item. on link handler system if a name is providen (between the |h) it's this one which is show. - if sometimes the string is in lowercase its generally an abscence of the function zo_strformat (which also translate ^p ^n ^f etc). a good start to play with zo_strformat is http://www.esoui.com/forums/showthread.php?t=1443 |
Quote:
Garkin made a great post about it here: ^p chars He also gives a way to format the strings so they dont show up. The difference in upper or lower case depend on where it is displayed in the game, but I'm not sure if theres a reason. Although if you are wanting the item name you can use this: Lua Code:
If your wanting to keep the link, but formatted so it doesn't have the ^chars & has proper casing: Lua Code:
t: - converts first letter to upper case in all words that have more than 1 character (used by default to format item links)If you want some other kind of formatting for masculine, feminine, plural, or different casing see the link I posted above & scroll down about 3/4 of the way to garkins 3rd post. It has a big list of different things you can do. |
Quote:
If you want to get item name, you should always use GetItemLinkName(itemLink). |
Thank you all for your answers. It looks like zo_strformat is what I'm needing.
|
All times are GMT -6. The time now is 10:59 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI