Added: getSheetLocalizedName and getSheetLocalizedDesc lua bind

--HG--
branch : patches-from-atys
hg/hotfix/patches-from-atys
ulukyn 6 years ago
parent 4f75f92610
commit f7f1a6035e

@ -527,6 +527,8 @@ void CLuaIHMRyzom::RegisterRyzomFunctions(NLGUI::CLuaState &ls)
LUABIND_FUNC(getPlayerSelectedSlot), LUABIND_FUNC(getPlayerSelectedSlot),
LUABIND_FUNC(isInGame), LUABIND_FUNC(isInGame),
LUABIND_FUNC(isPlayerSlotNewbieLand), LUABIND_FUNC(isPlayerSlotNewbieLand),
LUABIND_FUNC(getSheetLocalizedName),
LUABIND_FUNC(getSheetLocalizedDesc),
LUABIND_FUNC(getSkillIdFromName), LUABIND_FUNC(getSkillIdFromName),
LUABIND_FUNC(getSkillLocalizedName), LUABIND_FUNC(getSkillLocalizedName),
LUABIND_FUNC(getMaxSkillValue), LUABIND_FUNC(getMaxSkillValue),
@ -3113,6 +3115,20 @@ bool CLuaIHMRyzom::isPlayerSlotNewbieLand(uint32 slot)
return CharacterSummaries[slot].InNewbieland; return CharacterSummaries[slot].InNewbieland;
} }
// ***************************************************************************
ucstring CLuaIHMRyzom::getSheetLocalizedName(const std::string &sheet)
{
return ucstring(STRING_MANAGER::CStringManagerClient::getItemLocalizedName(CSheetId(sheet)));
}
// ***************************************************************************
ucstring CLuaIHMRyzom::getSheetLocalizedDesc(const std::string &sheet)
{
return ucstring(STRING_MANAGER::CStringManagerClient::getItemLocalizedDescription(CSheetId(sheet)));
}
// *************************************************************************** // ***************************************************************************
sint32 CLuaIHMRyzom::getSkillIdFromName(const std::string &def) sint32 CLuaIHMRyzom::getSkillIdFromName(const std::string &def)
{ {

@ -178,6 +178,8 @@ private:
static bool isPlayerSlotNewbieLand(uint32 slot); // test if one of the player slot is a newbieland one, if not so, client must be patched in order to continue static bool isPlayerSlotNewbieLand(uint32 slot); // test if one of the player slot is a newbieland one, if not so, client must be patched in order to continue
// GameInfo // GameInfo
static ucstring getSheetLocalizedName(const std::string &sheet);
static ucstring getSheetLocalizedDesc(const std::string &sheet);
static sint32 getSkillIdFromName(const std::string &def); static sint32 getSkillIdFromName(const std::string &def);
static ucstring getSkillLocalizedName(sint32 skillId); static ucstring getSkillLocalizedName(sint32 skillId);
static sint32 getMaxSkillValue(sint32 skillId); static sint32 getMaxSkillValue(sint32 skillId);

Loading…
Cancel
Save