Hey there Chip,
the function GetCharacterInfo() is returning the classId of a character as 4th return parameter:
Code:
--- @return name string,gender [Gender|#Gender],level integer,classId integer,raceId integer,alliance [Alliance|#Alliance],id string,locationId integer
It returns classId = 6 for Templars and classId = 4 for Wardens.
But the function GetClassInfo(classIdndex) is using the classIndex and not the classId so it will not return any data for the classId 6
Code:
--- @return defId integer,lore string,normalIconKeyboard textureName,pressedIconKeyboard textureName,mouseoverIconKeyboard textureName,isSelectable bool,ingameIconKeyboard textureName,ingameIconGamepad textureName,normalIconGamepad textureName,pressedIconGamepad textureName
Code:
[Empty String]
/esoui/art/icons/icon_missing.dds
/esoui/art/icons/icon_missing.dds
/esoui/art/icons/icon_missing.dds
false
/esoui/art/icons/icon_missing.dds
/esoui/art/icons/icon_missing.dds
/esoui/art/icons/icon_missing.dds
/esoui/art/icons/icon_missing.dds
and it will return wrong data for the classId 4. It's the Templar not the Warden:
Code:
6
Diese wandernden Ritter rufen die Mächte des Lichts und der sengenden Sonne an, um ihren Gegnern massiven Schaden zuzufügen, während sie bei ihren Verbündeten Leben, Magicka und Ausdauer wiederherstellen.
/esoui/art/charactercreate/charactercreate_templaricon_up.dds
/esoui/art/charactercreate/charactercreate_templaricon_down.dds
/esoui/art/charactercreate/charactercreate_templaricon_over.dds
true
/esoui/art/icons/class/class_templar.dds
/esoui/art/icons/class/gamepad/gp_class_templar.dds
/esoui/art/charactercreate/gamepad/charactercreate_templaricon_up.dds
/esoui/art/charactercreate/gamepad/charactercreate_templaricon_down.dds
@ZOS
What about a new function GetClassIndexById(classId) using an internally build mapping table between classID and classIndex so we do not need to rebuild it and build our own code each time?