Hello there! We are conducting a survey to better understand the user experience in making a first edit. If you have ever made an edit on Gamepedia, please fill out the survey. Thank you!

API GetTitleName

From Wowpedia
Jump to: navigation, search

Returns the name of a Title ID.

name, playerTitle = GetTitleName(titleId)

Arguments

titleId 
number - Ranging from 1 to GetNumTitles. Not necessarily an index as there can be missing/skipped IDs in between.

Returns

name 
string - Name of the title.
playerTitle 
boolean - Seems to be true for all existing titles.

Details

  • If the name has a trailing space, then the title is prefixed, otherwise it's suffixed.
/dump GetTitleName(2) -- "Corporal " → Corporal Bob (prefix)
/dump GetTitleName(36) -- "Champion of the Naaru" → Alice, Champion of the Naaru (suffix)
  • If the suffix starts with an uppercase char then a comma is added. Exceptions are single word suffixes as "Jenkins" and "Ironbane".
"%s, Champion of the Frozen Wastes" and "%s, Destroyer's End" have a comma.
"%s the Explorer" and "%s Jenkins" don't have a comma.
  • The foolproof way to determine prefix/suffix would be by parsing CharTitles.db2

Patch changes

See also