Fixed bad conversion in getPlayerVp*Hex and getTargetVp*Hex

fx
Nuno 4 years ago
parent b984e2e3d8
commit 9771d79bc3

@ -3904,40 +3904,40 @@ sint32 CLuaIHMRyzom::getPlayerLevel()
// *************************************************************************** // ***************************************************************************
std::string CLuaIHMRyzom::getPlayerVpaHex() std::string CLuaIHMRyzom::getPlayerVpaHex()
{ {
uint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E0:P" + toString("%d", CLFECOMMON::PROPERTY_VPA))->getValue64(); sint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E0:P" + toString("%d", CLFECOMMON::PROPERTY_VPA))->getValue64();
return NLMISC::toString("%X", prop); return NLMISC::toString("%" NL_I64 "X", prop);
} }
// *************************************************************************** // ***************************************************************************
std::string CLuaIHMRyzom::getPlayerVpbHex() std::string CLuaIHMRyzom::getPlayerVpbHex()
{ {
uint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E0:P" + toString("%d", CLFECOMMON::PROPERTY_VPB))->getValue64(); sint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E0:P" + toString("%d", CLFECOMMON::PROPERTY_VPB))->getValue64();
return NLMISC::toString("%X", prop); return NLMISC::toString("%" NL_I64 "X", prop);
} }
// *************************************************************************** // ***************************************************************************
std::string CLuaIHMRyzom::getPlayerVpcHex() std::string CLuaIHMRyzom::getPlayerVpcHex()
{ {
uint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E0:P" + toString("%d", CLFECOMMON::PROPERTY_VPC))->getValue64(); sint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E0:P" + toString("%d", CLFECOMMON::PROPERTY_VPC))->getValue64();
return NLMISC::toString("%X", prop); return NLMISC::toString("%" NL_I64 "X", prop);
} }
// *************************************************************************** // ***************************************************************************
sint64 CLuaIHMRyzom::getPlayerVpa() uint64 CLuaIHMRyzom::getPlayerVpa()
{ {
uint64 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() uint64 CLuaIHMRyzom::getPlayerVpb()
{ {
uint64 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() uint64 CLuaIHMRyzom::getPlayerVpc()
{ {
uint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E0:P" + toString("%d", CLFECOMMON::PROPERTY_VPC))->getValue64(); uint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E0:P" + toString("%d", CLFECOMMON::PROPERTY_VPC))->getValue64();
return prop; return prop;
@ -3989,8 +3989,8 @@ std::string CLuaIHMRyzom::getTargetVpaHex()
CEntityCL *target = getTargetEntity(); CEntityCL *target = getTargetEntity();
if (!target) return 0; if (!target) return 0;
uint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E" + toString("%d", getTargetSlotNr()) + ":P" + toString("%d", CLFECOMMON::PROPERTY_VPA))->getValue64(); sint64 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("%" NL_I64 "X", prop);
} }
// *************************************************************************** // ***************************************************************************
@ -3999,8 +3999,8 @@ std::string CLuaIHMRyzom::getTargetVpbHex()
CEntityCL *target = getTargetEntity(); CEntityCL *target = getTargetEntity();
if (!target) return 0; if (!target) return 0;
uint64 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_VPB))->getValue64();
return NLMISC::toString("%X", prop); return NLMISC::toString("%" NL_I64 "X", prop);
} }
// *************************************************************************** // ***************************************************************************
@ -4009,40 +4009,37 @@ std::string CLuaIHMRyzom::getTargetVpcHex()
CEntityCL *target = getTargetEntity(); CEntityCL *target = getTargetEntity();
if (!target) return 0; if (!target) return 0;
uint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E" + toString("%d", getTargetSlotNr()) + ":P" + toString("%d", CLFECOMMON::PROPERTY_VPC))->getValue64(); sint64 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("%" NL_I64 "X", prop);
} }
// *************************************************************************** // ***************************************************************************
sint64 CLuaIHMRyzom::getTargetVpa() uint64 CLuaIHMRyzom::getTargetVpa()
{ {
CEntityCL *target = getTargetEntity(); CEntityCL *target = getTargetEntity();
if (!target) return 0; if (!target) return 0;
uint64 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;
} }
// *************************************************************************** // ***************************************************************************
sint64 CLuaIHMRyzom::getTargetVpb() uint64 CLuaIHMRyzom::getTargetVpb()
{ {
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 prop; return prop;
} }
// *************************************************************************** // ***************************************************************************
sint64 CLuaIHMRyzom::getTargetVpc() uint64 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_VPC))->getValue64(); uint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E" + toString("%d", getTargetSlotNr()) + ":P" + toString("%d", CLFECOMMON::PROPERTY_VPC))->getValue64();
return prop; return prop;
} }

@ -272,9 +272,9 @@ private:
static std::string getPlayerVpaHex(); static std::string getPlayerVpaHex();
static std::string getPlayerVpbHex(); static std::string getPlayerVpbHex();
static std::string getPlayerVpcHex(); static std::string getPlayerVpcHex();
static sint64 getPlayerVpa(); static uint64 getPlayerVpa();
static sint64 getPlayerVpb(); static uint64 getPlayerVpb();
static sint64 getPlayerVpc(); static uint64 getPlayerVpc();
static sint32 getTargetLevel(); // get current, precise level of the selected target, or -1 if there's no such selected target static sint32 getTargetLevel(); // get current, precise level of the selected target, or -1 if there's no such selected target
static sint32 getTargetForceRegion(); // get 'force region' for current target, or -1 if there's no selected target static sint32 getTargetForceRegion(); // get 'force region' for current target, or -1 if there's no selected target
static sint32 getTargetLevelForce(); // get 'level force' for current target, or -1 if there's no selected target static sint32 getTargetLevelForce(); // get 'level force' for current target, or -1 if there's no selected target
@ -282,9 +282,9 @@ private:
static std::string getTargetVpaHex(); static std::string getTargetVpaHex();
static std::string getTargetVpbHex(); static std::string getTargetVpbHex();
static std::string getTargetVpcHex(); static std::string getTargetVpcHex();
static sint64 getTargetVpa(); static uint64 getTargetVpa();
static sint64 getTargetVpb(); static uint64 getTargetVpb();
static sint64 getTargetVpc(); static uint64 getTargetVpc();
static bool isTargetNPC(); // return 'true' if the target is an npc static bool isTargetNPC(); // return 'true' if the target is an npc
static bool isTargetPlayer(); // return 'true' if the target is a player static bool isTargetPlayer(); // return 'true' if the target is a player
static bool isTargetUser(); // return 'true' if the target is the user static bool isTargetUser(); // return 'true' if the target is the user

Loading…
Cancel
Save