Merge branch 'atys' into ryzom/ui/improvements

ryzom/ui/improvements
Nuno 4 years ago
commit b9d29d5cfe

@ -102,6 +102,7 @@ SET(RYZOM_CLIENT_CREATE_ACCOUNT_URL "https://open.ryzom.dev/ams/" CACHE STRING
SET(RYZOM_CLIENT_EDIT_ACCOUNT_URL "https://open.ryzom.dev/ams/" CACHE STRING "Ryzom Client Edit Account URL")
SET(RYZOM_CLIENT_FORGET_PASSWORD_URL "https://open.ryzom.dev/ams/" CACHE STRING "Ryzom Client Forget Password URL")
SET(RYZOM_CLIENT_PATCH_URL "https://cdn.ryzom.dev/open/patch/" CACHE STRING "Ryzom Client Patch URL")
SET(RYZOM_CLIENT_APP_NAME "default")
SET(RYZOM_WEBIG_MAIN_URL "https://open.ryzom.dev/" CACHE STRING "Ryzom Client WebIG Main URL")
SET(RYZOM_WEBIG_TRUSTED_DOMAIN "open.ryzom.dev" CACHE STRING "Ryzom Client WebIG Trusted Domain")
@ -114,6 +115,7 @@ IF(WITH_RYZOM_LIVE)
SET(RYZOM_CLIENT_EDIT_ACCOUNT_URL "https://account.ryzom.com/payment_profile/index.php")
SET(RYZOM_CLIENT_FORGET_PASSWORD_URL "https://account.ryzom.com/payment_profile/lost_secure_password.php")
SET(RYZOM_CLIENT_PATCH_URL "http://dl.ryzom.com/patch_live")
SET(RYZOM_CLIENT_APP_NAME "ryzom_live")
SET(RYZOM_WEBIG_MAIN_URL "https://app.ryzom.com/")
SET(RYZOM_WEBIG_TRUSTED_DOMAIN "app.ryzom.com")

@ -37,6 +37,7 @@
#cmakedefine RYZOM_CLIENT_EDIT_ACCOUNT_URL "${RYZOM_CLIENT_EDIT_ACCOUNT_URL}"
#cmakedefine RYZOM_CLIENT_FORGET_PASSWORD_URL "${RYZOM_CLIENT_FORGET_PASSWORD_URL}"
#cmakedefine RYZOM_CLIENT_PATCH_URL "${RYZOM_CLIENT_PATCH_URL}"
#cmakedefine RYZOM_CLIENT_APP_NAME "${RYZOM_CLIENT_APP_NAME}"
#cmakedefine RYZOM_WEBIG_MAIN_URL "${RYZOM_WEBIG_MAIN_URL}"
#cmakedefine RYZOM_WEBIG_TRUSTED_DOMAIN "${RYZOM_WEBIG_TRUSTED_DOMAIN}"

@ -4686,7 +4686,7 @@ class CHandlerOutgameNaviGetKeys : public IActionHandler
id = "sel";
if (event != -1)
- CLuaManager::getInstance().executeLuaScript(toString("outgame:eventChar%sKeyGet(%i)", id.c_str(), event));
CLuaManager::getInstance().executeLuaScript(toString("outgame:eventChar%sKeyGet(%i)", id.c_str(), event));
}
// reset previous input
Driver->AsyncListener.reset();

@ -257,7 +257,7 @@ void CDBGroupListSheetTrade::CSheetChildTrade::updateViewText(CDBGroupListSheetT
case CDBCtrlSheet::Pact: text= CI18N::get("uiBotChatPact") + text; break;
case CDBCtrlSheet::Skill: text= CI18N::get("uiBotChatSkill") + text; break;
case CDBCtrlSheet::GuildFlag: text= CI18N::get("uiBotChatSkill") + text; break;
case CDBCtrlSheet::Phrase: text= CI18N::get("uiBotChatPhrase") + text; break;
case CDBCtrlSheet::Phrase: text= text; break;
default: break;
}
@ -536,12 +536,12 @@ bool CDBGroupListSheetTrade::CSheetChildTrade::isSheetValid(CDBGroupListSheetTex
nlwarning("Brick %d has type %s", (int) k, BRICK_TYPE::toString(bs->getBrickType()).c_str());
}
else
{
{
nlwarning("Brick %d : not a brick sheet", (int) k);
}
}
}
*/
*/
if (phraseSheet)
{
@ -563,7 +563,7 @@ bool CDBGroupListSheetTrade::CSheetChildTrade::isSheetValid(CDBGroupListSheetTex
break;
}
}
return true;

@ -2755,6 +2755,8 @@ CGroupMap::CLandMarkButton *CGroupMap::createArkPointButton(const CArkPoint &poi
lmb->setParamsOnLeftClick(point.LeftClickParam);
lmb->setActionOnRightClick(point.RightClickAction);
lmb->setParamsOnRightClick(point.RightClickParam);
lmb->setActionOnOver(point.OverClickAction);
lmb->setParamsOnOver(point.OverClickParam);
lmb->setColor(point.Color);
lmb->setColorOver(point.Color);
lmb->setColorPushed(point.Color);

@ -95,6 +95,8 @@ public:
std::string LeftClickParam;
std::string RightClickAction;
std::string RightClickParam;
std::string OverClickAction;
std::string OverClickParam;
public:
CArkPoint()
@ -230,7 +232,7 @@ public:
void addUserLandMark(const NLMISC::CVector2f &pos, const ucstring &title, NLMISC::CRGBA color);
void addUserRespawnPoint(const NLMISC::CVector2f &pos);
void delArkPoints();
// set landmarks visibility based text query
void setLandmarkFilter(const std::string &s);
@ -602,7 +604,7 @@ private:
CLandMarkButton *createLandMarkButton(const CLandMarkOptions &options);
// Create a Ark landmark button, but do not add it to this group
CLandMarkButton *createArkPointButton(const CArkPoint &point);
// update a landmark button
void updateLandMarkButton(CLandMarkButton *lmb, const CLandMarkOptions &options);

@ -565,6 +565,7 @@ void CLuaIHMRyzom::RegisterRyzomFunctions(NLGUI::CLuaState &ls)
LUABIND_FUNC(isDynStringAvailable),
LUABIND_FUNC(isFullyPatched),
LUABIND_FUNC(getSheetType),
LUABIND_FUNC(getSheetShape),
LUABIND_FUNC(getSheetFamily),
LUABIND_FUNC(getSheetName),
LUABIND_FUNC(getFameIndex),
@ -1245,7 +1246,7 @@ int CLuaIHMRyzom::getMousePos(CLuaState &ls)
CTool::getMousePos(x, y);
ls.push(x);
ls.push(y);
return 2;
}
@ -1257,7 +1258,7 @@ int CLuaIHMRyzom::getMouseDown(CLuaState &ls)
ls.push(down);
ls.push(x);
ls.push(y);
return 3;
}
@ -1266,11 +1267,11 @@ int CLuaIHMRyzom::getMouseMiddleDown(CLuaState &ls)
sint32 x, y;
bool down;
CTool::getMouseMiddleDown(down, x, y);
ls.push(down);
ls.push(x);
ls.push(y);
return 3;
}
@ -1279,11 +1280,11 @@ int CLuaIHMRyzom::getMouseRightDown(CLuaState &ls)
sint32 x, y;
bool down;
CTool::getMouseRightDown(down, x, y);
ls.push(down);
ls.push(x);
ls.push(y);
return 3;
}
@ -1294,10 +1295,10 @@ int CLuaIHMRyzom::getShapeIdAt(CLuaState &ls)
CLuaIHM::checkArgCount(ls, funcName, 2);
CLuaIHM::checkArgType(ls, funcName, 1, LUA_TNUMBER);
CLuaIHM::checkArgType(ls, funcName, 2, LUA_TNUMBER);
uint32 x = (uint32)ls.toInteger(1);
uint32 y = (uint32)ls.toInteger(2);
uint32 y = (uint32)ls.toInteger(2);
uint32 w, h;
CViewRenderer &viewRender = *CViewRenderer::getInstance();
viewRender.getScreenSize(w, h);
@ -1308,11 +1309,11 @@ int CLuaIHMRyzom::getShapeIdAt(CLuaState &ls)
float cursX = (float)x/(float)w;
float cursY = (float)y/(float)h;
sint32 instance_idx;
EntitiesMngr.getShapeInstanceUnderPos(cursX, cursY, instance_idx);
ls.push(instance_idx);
return 1;
}
@ -1339,7 +1340,7 @@ int CLuaIHMRyzom::getGroundAtMouse(CLuaState &ls)
worldViewRay.Up = camMatrix.getK().normed();
CVector sceneInter;
CTool::TRayIntersectionType rayInterType = CTool::computeLandscapeRayIntersection(worldViewRay, sceneInter);
ls.push(sceneInter.x);
ls.push(sceneInter.y);
ls.push(sceneInter.z);
@ -1367,7 +1368,7 @@ int CLuaIHMRyzom::moveCam(CLuaState &ls)
float z = (float)ls.toNumber(3);
CVector moves(x, y, z);
UserEntity->setCameraMoves(moves);
return 0;
}
@ -1541,7 +1542,7 @@ int CLuaIHMRyzom::moveToTarget(CLuaState &ls)
const std::string &url = ls.toString(1);
CEntityCL *target = getTargetEntity();
if (!target) return 0;
CLuaManager::getInstance().executeLuaScript("ArkTargetUrl = [["+url+"]]", 0);
UserEntity->moveTo(UserEntity->selection(), 1.0, CUserEntity::OpenArkUrl);
return 0;
@ -2180,7 +2181,7 @@ int CLuaIHMRyzom::addShape(CLuaState &ls)
CLuaIHM::checkArgType(ls, funcName, 1, LUA_TSTRING);
sint32 idx = -1;
if (!Scene)
{
nlwarning("No scene available");
@ -2189,7 +2190,7 @@ int CLuaIHMRyzom::addShape(CLuaState &ls)
}
string shape = ls.toString(1);
float x = 0.0f, y = 0.0f, z = 0.0f;
float scale = 1.0f;
string context, url, skeleton, texture;
@ -2197,7 +2198,7 @@ int CLuaIHMRyzom::addShape(CLuaState &ls)
bool transparency = false;
bool collision = true;
bool inIgZone = false;
if (ls.getTop() >= 2)
{
CLuaIHM::checkArgType(ls, funcName, 2, LUA_TNUMBER);
@ -2223,14 +2224,14 @@ int CLuaIHMRyzom::addShape(CLuaState &ls)
y = UserEntity->pos().y;
z = UserEntity->pos().z;
}
CVector userDir = UserEntity->dir();
if (ls.getTop() >= 5)
{
CLuaIHM::checkArgType(ls, funcName, 5, LUA_TSTRING);
string angle = ls.toString(5);
if (angle != "user")
{
float a;
@ -2238,7 +2239,7 @@ int CLuaIHMRyzom::addShape(CLuaState &ls)
userDir = CVector(sin(a), cos(a), 0.f);
}
}
if (ls.getTop() >= 6)
{
CLuaIHM::checkArgType(ls, funcName, 6, LUA_TNUMBER);
@ -2250,19 +2251,19 @@ int CLuaIHMRyzom::addShape(CLuaState &ls)
CLuaIHM::checkArgType(ls, funcName, 7, LUA_TBOOLEAN);
collision = ls.toBoolean(7);
}
if (ls.getTop() >= 8)
{
CLuaIHM::checkArgType(ls, funcName, 8, LUA_TSTRING);
context = ls.toString(8);
}
if (ls.getTop() >= 9)
{
CLuaIHM::checkArgType(ls, funcName, 9, LUA_TSTRING);
url = ls.toString(9);
}
if (ls.getTop() >= 10)
{
CLuaIHM::checkArgType(ls, funcName, 10, LUA_TBOOLEAN);
@ -2274,25 +2275,25 @@ int CLuaIHMRyzom::addShape(CLuaState &ls)
CLuaIHM::checkArgType(ls, funcName, 11, LUA_TBOOLEAN);
transparency = ls.toBoolean(11);
}
if (ls.getTop() >= 12)
{
CLuaIHM::checkArgType(ls, funcName, 12, LUA_TSTRING);
texture = ls.toString(12);
}
if (ls.getTop() >= 13)
{
CLuaIHM::checkArgType(ls, funcName, 13, LUA_TSTRING);
skeleton = ls.toString(13);
}
if (ls.getTop() >= 14)
{
CLuaIHM::checkArgType(ls, funcName, 14, LUA_TBOOLEAN);
inIgZone = ls.toBoolean(14);
}
CShapeInstanceReference instref = EntitiesMngr.createInstance(shape, CVector(x, y, z), context, url, collision, inIgZone, idx);
UInstance instance = instref.Instance;
@ -2373,9 +2374,9 @@ int CLuaIHMRyzom::addShape(CLuaState &ls)
instance.setPos(CVector(x, y, z));
instance.setRotQuat(dir.getRot());
}
instance.setTransformMode(UTransformable::RotEuler);
// if the shape is a particle system, additionnal parameters are user params
UParticleSystemInstance psi;
psi.cast (instance);
@ -2398,7 +2399,7 @@ int CLuaIHMRyzom::addShape(CLuaState &ls)
}
}
}*/
UMovePrimitive *primitive = instref.Primitive;
if (primitive)
{
@ -2408,7 +2409,7 @@ int CLuaIHMRyzom::addShape(CLuaState &ls)
primitive->setReactionType(UMovePrimitive::Slide);
primitive->setTriggerType(UMovePrimitive::NotATrigger);
primitive->setAbsorbtion(0);
primitive->setPrimitiveType(UMovePrimitive::_2DOrientedBox);
primitive->setSize((bbox.getMax().x - bbox.getMin().x)*scale, (bbox.getMax().y - bbox.getMin().y)*scale);
primitive->setHeight((bbox.getMax().z - bbox.getMin().z)*scale);
@ -2416,10 +2417,10 @@ int CLuaIHMRyzom::addShape(CLuaState &ls)
primitive->setCollisionMask(MaskColPlayer | MaskColNpc | MaskColDoor);
primitive->setOcclusionMask(MaskColPlayer | MaskColNpc | MaskColDoor);
primitive->setObstacle(true);
primitive->setGlobalPosition(instance.getPos(), dynamicWI);
primitive->insertInWorldImage(dynamicWI);
}
}
@ -2434,9 +2435,9 @@ int CLuaIHMRyzom::setupShape(CLuaState &ls)
CLuaIHM::checkArgCount(ls, funcName, 2);
CLuaIHM::checkArgType(ls, funcName, 1, LUA_TNUMBER);
CLuaIHM::checkArgType(ls, funcName, 2, LUA_TTABLE);
uint32 idx = (uint32)ls.toInteger(1);
std::vector<string> keys;
std::vector<string> values;
CLuaObject params;
@ -2459,12 +2460,12 @@ int CLuaIHMRyzom::setupShape(CLuaState &ls)
values.push_back(it.nextValue().toString());
keys.push_back(it.nextKey().toString());
}
if (EntitiesMngr.setupInstance(idx, keys, values))
ls.push(1);
else
ls.pushNil();
return 1;
}
@ -2476,15 +2477,15 @@ int CLuaIHMRyzom::moveShape(CLuaState &ls)
CLuaIHM::checkArgType(ls, funcName, 2, LUA_TSTRING);
CLuaIHM::checkArgType(ls, funcName, 3, LUA_TSTRING);
CLuaIHM::checkArgType(ls, funcName, 4, LUA_TSTRING);
uint32 idx = (uint32)ls.toInteger(1);
CVector pos = EntitiesMngr.getInstancePos(idx);
string x = ls.toString(2);
string y = ls.toString(3);
string z = ls.toString(4);
float move_x = 0;
float move_y = 0;
float move_z = 0;
@ -2502,7 +2503,7 @@ int CLuaIHMRyzom::moveShape(CLuaState &ls)
pos.x = move_x;
}
}
if (!y.empty())
{
if (y[0] == '+')
@ -2516,7 +2517,7 @@ int CLuaIHMRyzom::moveShape(CLuaState &ls)
pos.y = move_y;
}
}
if (!z.empty())
{
if (z[0] == '+')
@ -2530,12 +2531,12 @@ int CLuaIHMRyzom::moveShape(CLuaState &ls)
pos.z = move_z;
}
}
if (EntitiesMngr.setInstancePos(idx, pos))
ls.push(1);
else
ls.pushNil();
return 1;
}
@ -2547,9 +2548,9 @@ int CLuaIHMRyzom::rotateShape(CLuaState &ls)
CLuaIHM::checkArgType(ls, funcName, 2, LUA_TSTRING);
CLuaIHM::checkArgType(ls, funcName, 3, LUA_TSTRING);
CLuaIHM::checkArgType(ls, funcName, 4, LUA_TSTRING);
uint32 idx = (uint32)ls.toInteger(1);
CVector rot = EntitiesMngr.getInstanceRot(idx);
string x = ls.toString(2);
@ -2573,7 +2574,7 @@ int CLuaIHMRyzom::rotateShape(CLuaState &ls)
rot.x = rot_x;
}
}
if (!y.empty())
{
if (y[0] == '+')
@ -2587,7 +2588,7 @@ int CLuaIHMRyzom::rotateShape(CLuaState &ls)
rot.y = rot_y;
}
}
if (!z.empty())
{
if (z[0] == '+')
@ -2601,12 +2602,12 @@ int CLuaIHMRyzom::rotateShape(CLuaState &ls)
rot.z = rot_z;
}
}
if (EntitiesMngr.setInstanceRot(idx, rot))
ls.push(1);
else
ls.pushNil();
return 1;
}
@ -2615,7 +2616,7 @@ int CLuaIHMRyzom::deleteShape(CLuaState &ls)
const char* funcName = "deleteShape";
CLuaIHM::checkArgCount(ls, funcName, 1);
CLuaIHM::checkArgType(ls, funcName, 1, LUA_TNUMBER);
if (EntitiesMngr.deleteInstance((uint32)ls.toInteger(1)))
ls.push(1);
else
@ -2629,9 +2630,9 @@ int CLuaIHMRyzom::getShapePos(CLuaState &ls)
const char* funcName = "getShapePos";
CLuaIHM::checkArgCount(ls, funcName, 1);
CLuaIHM::checkArgType(ls, funcName, 1, LUA_TNUMBER);
uint32 idx = (uint32)ls.toInteger(1);
CVector pos = EntitiesMngr.getInstancePos(idx);
ls.push(pos.x);
@ -2645,9 +2646,9 @@ int CLuaIHMRyzom::getShapeRot(CLuaState &ls)
const char* funcName = "getShapeRot";
CLuaIHM::checkArgCount(ls, funcName, 1);
CLuaIHM::checkArgType(ls, funcName, 1, LUA_TNUMBER);
uint32 idx = (uint32)ls.toInteger(1);
CVector rot = EntitiesMngr.getInstanceRot(idx);
ls.push(rot.x);
@ -2661,11 +2662,11 @@ int CLuaIHMRyzom::getShapeScale(CLuaState &ls)
const char* funcName = "getShapeScale";
CLuaIHM::checkArgCount(ls, funcName, 1);
CLuaIHM::checkArgType(ls, funcName, 1, LUA_TNUMBER);
uint32 idx = (uint32)ls.toInteger(1);
CVector scale = EntitiesMngr.getInstanceScale(idx);
ls.push(scale.x);
ls.push(scale.y);
ls.push(scale.z);
@ -2677,11 +2678,11 @@ int CLuaIHMRyzom::getShapeColPos(CLuaState &ls)
const char* funcName = "getShapeColPos";
CLuaIHM::checkArgCount(ls, funcName, 1);
CLuaIHM::checkArgType(ls, funcName, 1, LUA_TNUMBER);
uint32 idx = (uint32)ls.toInteger(1);
CVector pos = EntitiesMngr.getInstanceColPos(idx);
ls.push(pos.x);
ls.push(pos.y);
ls.push(pos.z);
@ -2693,11 +2694,11 @@ int CLuaIHMRyzom::getShapeColScale(CLuaState &ls)
const char* funcName = "getShapeColScale";
CLuaIHM::checkArgCount(ls, funcName, 1);
CLuaIHM::checkArgType(ls, funcName, 1, LUA_TNUMBER);
uint32 idx = (uint32)ls.toInteger(1);
CVector scale = EntitiesMngr.getInstanceColScale(idx);
ls.push(scale.x);
ls.push(scale.y);
ls.push(scale.z);
@ -2709,11 +2710,11 @@ int CLuaIHMRyzom::getShapeColOrient(CLuaState &ls)
const char* funcName = "getShapeColOrient";
CLuaIHM::checkArgCount(ls, funcName, 1);
CLuaIHM::checkArgType(ls, funcName, 1, LUA_TNUMBER);
uint32 idx = (uint32)ls.toInteger(1);
double orient = EntitiesMngr.getInstanceColOrient(idx);
ls.push(orient);
return 1;
}
@ -3469,6 +3470,30 @@ std::string CLuaIHMRyzom::getSheetType(const std::string &sheet)
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)
@ -3481,7 +3506,7 @@ std::string CLuaIHMRyzom::getSheetFamily(const std::string &sheet)
if (pIS)
return ITEMFAMILY::toString(pIS->Family);
}
return "";
}
@ -3712,7 +3737,7 @@ float CLuaIHMRyzom::setChar3dDBfromVPX(const std::string &branch, const std::str
cs.People = EGSPD::CPeople::fromString(people);
SCharacter3DSetup::setupDBFromCharacterSummary(branch, cs);
return cs.VisualPropC.PropertySubData.CharacterHeight;
}
@ -3880,41 +3905,41 @@ sint32 CLuaIHMRyzom::getPlayerLevel()
std::string CLuaIHMRyzom::getPlayerVpaHex()
{
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()
{
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()
{
sint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E0:P" + toString("%d", CLFECOMMON::PROPERTY_VPB))->getValue64();
return NLMISC::toString("%X", prop);
sint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E0:P" + toString("%d", CLFECOMMON::PROPERTY_VPC))->getValue64();
return NLMISC::toString("%" NL_I64 "X", prop);
}
// ***************************************************************************
sint64 CLuaIHMRyzom::getPlayerVpa()
uint64 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;
}
// ***************************************************************************
sint64 CLuaIHMRyzom::getPlayerVpb()
uint64 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;
}
// ***************************************************************************
sint64 CLuaIHMRyzom::getPlayerVpc()
uint64 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;
}
@ -3965,7 +3990,7 @@ std::string CLuaIHMRyzom::getTargetVpaHex()
if (!target) return 0;
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);
}
// ***************************************************************************
@ -3975,7 +4000,7 @@ std::string CLuaIHMRyzom::getTargetVpbHex()
if (!target) return 0;
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);
}
// ***************************************************************************
@ -3984,40 +4009,37 @@ std::string CLuaIHMRyzom::getTargetVpcHex()
CEntityCL *target = getTargetEntity();
if (!target) return 0;
sint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E" + toString("%d", getTargetSlotNr()) + ":P" + toString("%d", CLFECOMMON::PROPERTY_VPB))->getValue64();
return NLMISC::toString("%X", prop);
sint64 prop = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:Entities:E" + toString("%d", getTargetSlotNr()) + ":P" + toString("%d", CLFECOMMON::PROPERTY_VPC))->getValue64();
return NLMISC::toString("%" NL_I64 "X", prop);
}
// ***************************************************************************
sint64 CLuaIHMRyzom::getTargetVpa()
uint64 CLuaIHMRyzom::getTargetVpa()
{
CEntityCL *target = getTargetEntity();
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;
}
// ***************************************************************************
sint64 CLuaIHMRyzom::getTargetVpb()
uint64 CLuaIHMRyzom::getTargetVpb()
{
CEntityCL *target = getTargetEntity();
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;
}
// ***************************************************************************
sint64 CLuaIHMRyzom::getTargetVpc()
uint64 CLuaIHMRyzom::getTargetVpc()
{
CEntityCL *target = getTargetEntity();
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 prop;
}
@ -4153,7 +4175,7 @@ int CLuaIHMRyzom::addLandMark(CLuaState &ls)
{
const char* funcName = "addLandMark";
CLuaIHM::checkArgMin(ls, funcName, 4);
CLuaIHM::checkArgMax(ls, funcName, 9);
CLuaIHM::checkArgMax(ls, funcName, 11);
CLuaIHM::checkArgType(ls, funcName, 1, LUA_TNUMBER); // x
CLuaIHM::checkArgType(ls, funcName, 2, LUA_TNUMBER); // y
CLuaIHM::checkArgType(ls, funcName, 3, LUA_TSTRING); // title
@ -4162,6 +4184,9 @@ int CLuaIHMRyzom::addLandMark(CLuaState &ls)
CLuaIHM::checkArgType(ls, funcName, 6, LUA_TSTRING); // left click param
CLuaIHM::checkArgType(ls, funcName, 7, LUA_TSTRING); // right click action
CLuaIHM::checkArgType(ls, funcName, 8, LUA_TSTRING); // right click params
CLuaIHM::checkArgType(ls, funcName, 9, LUA_TSTRING); // over click action
CLuaIHM::checkArgType(ls, funcName, 10, LUA_TSTRING); // over click params
// 11 : Color
CArkPoint point;
point.x = (sint32)(ls.toNumber(1)*1000.f);
@ -4172,12 +4197,14 @@ int CLuaIHMRyzom::addLandMark(CLuaState &ls)
point.LeftClickParam = ls.toString(6);
point.RightClickAction = ls.toString(7);
point.RightClickParam = ls.toString(8);
point.OverClickAction = ls.toString(9);
point.OverClickParam = ls.toString(10);
point.Color = CRGBA(255,255,255,255);
if (ls.getTop() >= 9)
if (ls.getTop() >= 11)
CLuaIHM::pop(ls, point.Color);
CGroupMap *pMap = dynamic_cast<CGroupMap*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:map:content:map_content:actual_map"));
if (pMap != NULL)
pMap->addArkPoint(point);

@ -15,7 +15,7 @@ private:
static int luaClientCfgIndex(CLuaState &ls);
static int luaClientCfgNewIndex(CLuaState &ls);
// CInterfaceElement management on stack, stored by a CRefPtr.
public:
@ -204,6 +204,7 @@ private:
static bool isDynStringAvailable(sint32 dynStringId);
static bool isFullyPatched();
static std::string getSheetType(const std::string &sheet);
static std::string getSheetShape(const std::string &sheet);
static std::string getSheetFamily(const std::string &sheet);
static std::string getSheetName(uint32 sheetId);
static sint32 getFameIndex(const std::string &factionName);
@ -251,7 +252,7 @@ private:
static int addRespawnPoint(CLuaState &ls);
static int delArkPoints(CLuaState &ls);
static int setArkPowoOptions(CLuaState &ls);
// open the window to do a tell to 'player', if 'msg' is not empty, then the message will be sent immediatly
// else, current command of the chat window will be replaced with tell 'player'
@ -260,7 +261,7 @@ private:
static void updateTooltipCoords();
// test if the ctrl key is down (NB nico : I didn't add other key,
// because it would be too easy to write a key recorder ...)
static bool isCtrlKeyDown();
static bool isCtrlKeyDown();
static std::string encodeURLUnicodeParam(const ucstring &text);
static std::string encodeURLParam(const std::string &text);
@ -271,9 +272,9 @@ private:
static std::string getPlayerVpaHex();
static std::string getPlayerVpbHex();
static std::string getPlayerVpcHex();
static sint64 getPlayerVpa();
static sint64 getPlayerVpb();
static sint64 getPlayerVpc();
static uint64 getPlayerVpa();
static uint64 getPlayerVpb();
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 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
@ -281,9 +282,9 @@ private:
static std::string getTargetVpaHex();
static std::string getTargetVpbHex();
static std::string getTargetVpcHex();
static sint64 getTargetVpa();
static sint64 getTargetVpb();
static sint64 getTargetVpc();
static uint64 getTargetVpa();
static uint64 getTargetVpb();
static uint64 getTargetVpc();
static bool isTargetNPC(); // return 'true' if the target is an npc
static bool isTargetPlayer(); // return 'true' if the target is a player
static bool isTargetUser(); // return 'true' if the target is the user

@ -191,7 +191,8 @@ struct CClientPatcherTranslations : public NLMISC::CI18N::ILoadProxy
};
// hardcoded URL to not depend on external files
static const std::string PatchUrl = RYZOM_CLIENT_PATCH_URL; // "https://cdn.ryzom.dev/open/patch";
static const std::string DefaultPatchUrl = RYZOM_CLIENT_PATCH_URL; // "https://cdn.ryzom.dev/open/patch";
static const std::string DefaultAppName = RYZOM_CLIENT_APP_NAME; // "default"
int main(int argc, char *argv[])
{
@ -204,10 +205,12 @@ int main(int argc, char *argv[])
Args.addArg("s", "source", "source", "Name of source file to xdelta with patch file");
Args.addArg("d", "destination", "destination", "Name of destination operation (patch or unpack)");
Args.addArg("u", "unpack", "unpack", "Name of bnp file to unpack");
Args.addArg("", "url", "PatchUrl", "Patch server url, ie 'https://dl.ryzom.com/patch_live'");
Args.addArg("", "app", "Application", "Patch application name for version file, ie 'ryzom_live' requests ryzom_live.version from PatchUrl");
if (!Args.parse(argc, argv)) return 1;
if (Args.haveArg("p") && Args.haveArg("p") && Args.haveArg("p"))
if (Args.haveArg("p") && Args.haveArg("s") && Args.haveArg("d"))
{
string patchName = Args.getArg("p").front();
string sourceName = Args.getArg("s").front();
@ -269,14 +272,32 @@ int main(int argc, char *argv[])
// now translations are read, we don't need it anymore
delete trans;
// create minimal client.cfg file in memory for patcher
{
CConfigFile::CVar patchUrl;
patchUrl.forceAsString(DefaultPatchUrl);
if (Args.haveLongArg("url") && !Args.getLongArg("url").empty())
patchUrl.forceAsString(Args.getLongArg("url").front());
CConfigFile::CVar appName;
appName.forceAsString(DefaultAppName);
if (Args.haveLongArg("app") && !Args.getLongArg("app").empty())
appName.forceAsString(Args.getLongArg("app").front());
ClientCfg.ConfigFile.insertVar("PatchUrl", patchUrl);
ClientCfg.ConfigFile.insertVar("Application", appName);
}
//
Args.displayVersion();
printf("\n");
printf("Checking %s files to patch...\n", convert(CI18N::get("TheSagaOfRyzom")).c_str());
printf("Using '%s/%s.version'\n", ClientCfg.ConfigFile.getVar("PatchUrl").asString().c_str(),
ClientCfg.ConfigFile.getVar("Application").asString().c_str());
// use PatchUrl
vector<string> patchURLs;
pPM->init(patchURLs, PatchUrl, "");
pPM->init(patchURLs, ClientCfg.ConfigFile.getVar("PatchUrl").asString(), "");
pPM->startCheckThread(true /* include background patchs */);
ucstring state;

Loading…
Cancel
Save