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;
}

@ -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()

@ -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),
@ -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)
@ -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,10 +4197,12 @@ 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"));

@ -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);
@ -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