|
|
@ -573,6 +573,7 @@ void CLuaIHMRyzom::RegisterRyzomFunctions(NLGUI::CLuaState &ls)
|
|
|
|
LUABIND_FUNC(isDynStringAvailable),
|
|
|
|
LUABIND_FUNC(isDynStringAvailable),
|
|
|
|
LUABIND_FUNC(isFullyPatched),
|
|
|
|
LUABIND_FUNC(isFullyPatched),
|
|
|
|
LUABIND_FUNC(getSheetType),
|
|
|
|
LUABIND_FUNC(getSheetType),
|
|
|
|
|
|
|
|
LUABIND_FUNC(getSheetShape),
|
|
|
|
LUABIND_FUNC(getSheetFamily),
|
|
|
|
LUABIND_FUNC(getSheetFamily),
|
|
|
|
LUABIND_FUNC(getSheetName),
|
|
|
|
LUABIND_FUNC(getSheetName),
|
|
|
|
LUABIND_FUNC(getFameIndex),
|
|
|
|
LUABIND_FUNC(getFameIndex),
|
|
|
@ -3598,6 +3599,30 @@ std::string CLuaIHMRyzom::getSheetType(const std::string &sheet)
|
|
|
|
return CEntitySheet::typeToString(sheetPtr->Type);
|
|
|
|
return CEntitySheet::typeToString(sheetPtr->Type);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ***************************************************************************
|
|
|
|
|
|
|
|
std::string CLuaIHMRyzom::getSheetShape(const std::string &sheet)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
//H_AUTO(Lua_CLuaIHM_getSheetType)
|
|
|
|
|
|
|
|
const CEntitySheet *sheetPtr = SheetMngr.get(CSheetId(sheet));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!sheetPtr)
|
|
|
|
|
|
|
|
return "";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (sheetPtr->type() == CEntitySheet::ITEM)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
CItemSheet *sheet = (CItemSheet*)sheetPtr;
|
|
|
|
|
|
|
|
return sheet->getShape();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else if (sheetPtr->type() == CEntitySheet::FAUNA)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
CCharacterSheet *sheet = (CCharacterSheet*)(sheetPtr);
|
|
|
|
|
|
|
|
return sheet->Body.getItem();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return "";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ***************************************************************************
|
|
|
|
// ***************************************************************************
|
|
|
|
std::string CLuaIHMRyzom::getSheetFamily(const std::string &sheet)
|
|
|
|
std::string CLuaIHMRyzom::getSheetFamily(const std::string &sheet)
|
|
|
@ -4032,42 +4057,42 @@ sint32 CLuaIHMRyzom::getPlayerLevel()
|
|
|
|
// ***************************************************************************
|
|
|
|
// ***************************************************************************
|
|
|
|
std::string CLuaIHMRyzom::getPlayerVpaHex()
|
|
|
|
std::string CLuaIHMRyzom::getPlayerVpaHex()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
sint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E0:P" + toString("%d", CLFECOMMON::PROPERTY_VPA))->getValue64();
|
|
|
|
uint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E0:P" + toString("%d", CLFECOMMON::PROPERTY_VPA))->getValue64();
|
|
|
|
return NLMISC::toString("%X", prop);
|
|
|
|
return NLMISC::toString("%X", prop);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// ***************************************************************************
|
|
|
|
// ***************************************************************************
|
|
|
|
std::string CLuaIHMRyzom::getPlayerVpbHex()
|
|
|
|
std::string CLuaIHMRyzom::getPlayerVpbHex()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
sint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E0:P" + toString("%d", CLFECOMMON::PROPERTY_VPB))->getValue64();
|
|
|
|
uint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E0:P" + toString("%d", CLFECOMMON::PROPERTY_VPB))->getValue64();
|
|
|
|
return NLMISC::toString("%X", prop);
|
|
|
|
return NLMISC::toString("%X", prop);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// ***************************************************************************
|
|
|
|
// ***************************************************************************
|
|
|
|
std::string CLuaIHMRyzom::getPlayerVpcHex()
|
|
|
|
std::string CLuaIHMRyzom::getPlayerVpcHex()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
sint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E0:P" + toString("%d", CLFECOMMON::PROPERTY_VPB))->getValue64();
|
|
|
|
uint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E0:P" + toString("%d", CLFECOMMON::PROPERTY_VPC))->getValue64();
|
|
|
|
return NLMISC::toString("%X", prop);
|
|
|
|
return NLMISC::toString("%X", prop);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// ***************************************************************************
|
|
|
|
// ***************************************************************************
|
|
|
|
sint64 CLuaIHMRyzom::getPlayerVpa()
|
|
|
|
sint64 CLuaIHMRyzom::getPlayerVpa()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
sint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E0:P" + toString("%d", CLFECOMMON::PROPERTY_VPA))->getValue64();
|
|
|
|
uint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E0:P" + toString("%d", CLFECOMMON::PROPERTY_VPA))->getValue64();
|
|
|
|
return prop;
|
|
|
|
return prop;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// ***************************************************************************
|
|
|
|
// ***************************************************************************
|
|
|
|
sint64 CLuaIHMRyzom::getPlayerVpb()
|
|
|
|
sint64 CLuaIHMRyzom::getPlayerVpb()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
sint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E0:P" + toString("%d", CLFECOMMON::PROPERTY_VPB))->getValue64();
|
|
|
|
uint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E0:P" + toString("%d", CLFECOMMON::PROPERTY_VPB))->getValue64();
|
|
|
|
return prop;
|
|
|
|
return prop;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// ***************************************************************************
|
|
|
|
// ***************************************************************************
|
|
|
|
sint64 CLuaIHMRyzom::getPlayerVpc()
|
|
|
|
sint64 CLuaIHMRyzom::getPlayerVpc()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
sint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E0:P" + toString("%d", CLFECOMMON::PROPERTY_VPB))->getValue64();
|
|
|
|
uint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E0:P" + toString("%d", CLFECOMMON::PROPERTY_VPC))->getValue64();
|
|
|
|
return prop;
|
|
|
|
return prop;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -4127,7 +4152,7 @@ std::string CLuaIHMRyzom::getTargetVpaHex()
|
|
|
|
CEntityCL *target = getTargetEntity();
|
|
|
|
CEntityCL *target = getTargetEntity();
|
|
|
|
if (!target) return 0;
|
|
|
|
if (!target) return 0;
|
|
|
|
|
|
|
|
|
|
|
|
sint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E" + toString("%d", getTargetSlotNr()) + ":P" + toString("%d", CLFECOMMON::PROPERTY_VPA))->getValue64();
|
|
|
|
uint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E" + toString("%d", getTargetSlotNr()) + ":P" + toString("%d", CLFECOMMON::PROPERTY_VPA))->getValue64();
|
|
|
|
return NLMISC::toString("%X", prop);
|
|
|
|
return NLMISC::toString("%X", prop);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -4137,7 +4162,7 @@ std::string CLuaIHMRyzom::getTargetVpbHex()
|
|
|
|
CEntityCL *target = getTargetEntity();
|
|
|
|
CEntityCL *target = getTargetEntity();
|
|
|
|
if (!target) return 0;
|
|
|
|
if (!target) return 0;
|
|
|
|
|
|
|
|
|
|
|
|
sint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E" + toString("%d", getTargetSlotNr()) + ":P" + toString("%d", CLFECOMMON::PROPERTY_VPB))->getValue64();
|
|
|
|
uint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E" + toString("%d", getTargetSlotNr()) + ":P" + toString("%d", CLFECOMMON::PROPERTY_VPB))->getValue64();
|
|
|
|
return NLMISC::toString("%X", prop);
|
|
|
|
return NLMISC::toString("%X", prop);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -4147,7 +4172,7 @@ std::string CLuaIHMRyzom::getTargetVpcHex()
|
|
|
|
CEntityCL *target = getTargetEntity();
|
|
|
|
CEntityCL *target = getTargetEntity();
|
|
|
|
if (!target) return 0;
|
|
|
|
if (!target) return 0;
|
|
|
|
|
|
|
|
|
|
|
|
sint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E" + toString("%d", getTargetSlotNr()) + ":P" + toString("%d", CLFECOMMON::PROPERTY_VPB))->getValue64();
|
|
|
|
uint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E" + toString("%d", getTargetSlotNr()) + ":P" + toString("%d", CLFECOMMON::PROPERTY_VPC))->getValue64();
|
|
|
|
return NLMISC::toString("%X", prop);
|
|
|
|
return NLMISC::toString("%X", prop);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -4157,7 +4182,7 @@ sint64 CLuaIHMRyzom::getTargetVpa()
|
|
|
|
CEntityCL *target = getTargetEntity();
|
|
|
|
CEntityCL *target = getTargetEntity();
|
|
|
|
if (!target) return 0;
|
|
|
|
if (!target) return 0;
|
|
|
|
|
|
|
|
|
|
|
|
sint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E" + toString("%d", getTargetSlotNr()) + ":P" + toString("%d", CLFECOMMON::PROPERTY_VPA))->getValue64();
|
|
|
|
uint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E" + toString("%d", getTargetSlotNr()) + ":P" + toString("%d", CLFECOMMON::PROPERTY_VPA))->getValue64();
|
|
|
|
|
|
|
|
|
|
|
|
return prop;
|
|
|
|
return prop;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -4179,7 +4204,7 @@ sint64 CLuaIHMRyzom::getTargetVpc()
|
|
|
|
CEntityCL *target = getTargetEntity();
|
|
|
|
CEntityCL *target = getTargetEntity();
|
|
|
|
if (!target) return 0;
|
|
|
|
if (!target) return 0;
|
|
|
|
|
|
|
|
|
|
|
|
sint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E" + toString("%d", getTargetSlotNr()) + ":P" + toString("%d", CLFECOMMON::PROPERTY_VPB))->getValue64();
|
|
|
|
sint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E" + toString("%d", getTargetSlotNr()) + ":P" + toString("%d", CLFECOMMON::PROPERTY_VPC))->getValue64();
|
|
|
|
|
|
|
|
|
|
|
|
return prop;
|
|
|
|
return prop;
|
|
|
|
}
|
|
|
|
}
|
|
|
|