View Single Post
01/24/15, 01:14 AM   #3
circonian
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 613
Originally Posted by trou23 View Post
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 ^chars are used to display the names in masculine, feminine, singular, plural, exc... forms of the words.
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:
  1. -- Will produce Ruby Necklace of Reduced Spell Cost  (your first link you posted)
  2. zo_strformat(SI_TOOLTIP_ITEM_NAME, link)

If your wanting to keep the link, but formatted so it doesn't have the ^chars & has proper casing:
Lua Code:
  1. z
  2. zo_strformat("<<t:1>>", link)
The t in that line of code does this (from Garkins post):
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.
  Reply With Quote