Merge commit 'ce5817721a725f74429fad188b8be7acacd7ebb2' into feature/core4-atys

feature/core4-atys
kaetemi 3 years ago
commit e508082ce1

@ -111,9 +111,9 @@ SET(RYZOM_CLIENT_RELEASENOTES_RING_URL "https://open.ryzom.dev/releasenotes_rin
# urls when compiling ryzom live client
IF(WITH_RYZOM_LIVE)
MESSAGE("Using RYZOM_LIVE urls")
SET(RYZOM_CLIENT_CREATE_ACCOUNT_URL "https://account.ryzom.com/signup/from_client.php")
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_CREATE_ACCOUNT_URL "https://me.ryzom.com")
SET(RYZOM_CLIENT_EDIT_ACCOUNT_URL "https://me.ryzom.com")
SET(RYZOM_CLIENT_FORGET_PASSWORD_URL "https://me.ryzom.com/?forget_password=1")
SET(RYZOM_CLIENT_PATCH_URL "http://dl.ryzom.com/patch_live")
SET(RYZOM_CLIENT_APP_NAME "ryzom_live")

@ -1093,7 +1093,19 @@ namespace NLGUI
// first loop -> true
// second loop -> false && break
loop = !loop;
if (next < parts.size())
if (next >= parts.size())
break;
val = toLower(parts[next]);
if (val == "center")
{
if (bgPositionX.empty()) bgPositionX = "center";
if (bgPositionY.empty()) bgPositionY = "center";
// consume 'center'
next++;
}
else if (val == "left" || val == "right")
{
val = toLowerAscii(parts[next]);
if (val == "center")

@ -909,17 +909,77 @@ void CClientConfig::setValues()
READ_STRING_FV(FSHost)
READ_BOOL_DEV(DisplayAccountButtons)
READ_STRING_DEV(CreateAccountURL)
READ_STRING_DEV(EditAccountURL)
READ_STRING_DEV(ForgetPwdURL)
READ_STRING_FV(CreateAccountURL)
READ_STRING_FV(EditAccountURL)
READ_STRING_FV(ForgetPwdURL)
READ_STRING_DEV(BetaAccountURL)
READ_STRING_DEV(FreeTrialURL)
// defined in client_default.cfg
READ_STRING_FV(ConditionsTermsURL)
READ_STRING_FV(NamingPolicyURL)
READ_STRING_FV(LoginSupportURL)
// read NamingPolicyURL from client_default.cfg
//READ_STRING_FV(NamingPolicyURL)
std::string languageCo = "wk";
CConfigFile::CVar *languageCodeVarPtr = ClientCfg.ConfigFile.getVarPtr("LanguageCode");
if (languageCodeVarPtr)
{
languageCo = languageCodeVarPtr->asString();
}
CConfigFile::CVar *policyurl = ClientCfg.ConfigFile.getVarPtr("NamingPolicyURL");
if (policyurl)
{
for (uint i = 0; i < policyurl->size(); ++i)
{
std::string entry = policyurl->asString(i);
if (entry.size() >= languageCo.size())
{
if (nlstricmp(entry.substr(0, languageCo.size()), languageCo) == 0)
{
std::string::size_type pos = entry.find("=");
if (pos != std::string::npos)
{
ClientCfg.NamingPolicyURL = entry.substr(pos + 1);
}
}
}
}
}
// read NamingPolicyURL from client_default.cfg
//READ_STRING_FV(ConditionsTermsURL)
CConfigFile::CVar *coturl = ClientCfg.ConfigFile.getVarPtr("ConditionsTermsURL");
if (coturl)
{
for (uint i = 0; i < coturl->size(); ++i)
{
std::string entry = coturl->asString(i);
if (entry.size() >= languageCo.size())
{
if (nlstricmp(entry.substr(0, languageCo.size()), languageCo) == 0)
{
std::string::size_type pos = entry.find("=");
if (pos != std::string::npos)
{
ClientCfg.ConditionsTermsURL = entry.substr(pos + 1);
}
}
}
}
}
#ifndef RZ_NO_CLIENT
// if cookie is not empty, it means that the client was launch
// by the nel_launcher, so it can't be local

@ -1136,7 +1136,7 @@ TInterfaceState globalMenu()
charSelect = LoginCharsel;
WaitServerAnswer = false;
if (charSelect == -1)
if (charSelect == -1 || FarTP.isReselectingChar())
{
CCDBNodeLeaf *pNL = NLGUI::CDBManager::getInstance()->getDbProp("UI:SERVER_RECEIVED_CHARS", false);
if (pNL != NULL)

@ -1907,9 +1907,17 @@ void getItemText (CDBCtrlSheet *item, string &itemText, const CItemSheet*pIS)
const CClientItemInfo &itemInfo = getInventory().getItemInfo(getInventory().getItemSlotId(item) );
if (!itemInfo.CustomText.empty())
{
strFindReplace(itemText, "%custom_text", "\n@{FFFF}" + itemInfo.CustomText.toUtf8() + "\n");
string itemMFC = CI18N::get("uiItemTextMessageFromCrafter");
strFindReplace(itemText, "%mfc", itemMFC);
std::string text = itemInfo.CustomText.toUtf8();
if (text.size() > 3 && text[0]=='@' && ((text[1]=='W' && text[2]=='E' && text[3]=='B') || (text[1]=='L' && text[2]=='U' && text[3]=='A')))
{
strFindReplace(itemText, "%custom_text", string() );
}
else
{
strFindReplace(itemText, "%custom_text", "\n@{FFFF}" + itemInfo.CustomText.toUtf8() + "\n");
ucstring itemMFC = CI18N::get("uiItemTextMessageFromCrafter");
strFindReplace(itemText, "%mfc", itemMFC);
}
}
else
strFindReplace(itemText, "%custom_text", string() );

@ -423,8 +423,12 @@ CViewBase *CChatTextManager::createMsgTextComplex(const string &msg, NLMISC::CRG
string::size_type pos = 0;
string::size_type startTr = msg.find("{:");
string::size_type endOfOriginal = msg.find("}@{");
// Manage Translations
CCDBNodeLeaf *node= NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:CHAT:SHOW_TRANSLATION_ONLY_AS_TOOLTIP_CB", false);
bool originalFirst = node ? node->getValueBool() : true;
string::size_type startTr = msg.find(ucstring("{:"));
string::size_type endOfOriginal = msg.find(ucstring("}@{"));
// Original/Translated case, example: {:enHello the world!}@{ Bonjour le monde !
if (startTr != string::npos && endOfOriginal != string::npos)

@ -3665,6 +3665,15 @@ void CInventoryManager::updateItemInfoQueue()
TItemInfoWaiters::iterator it;
for(it= _ItemInfoWaiters.begin();it!=_ItemInfoWaiters.end();it++)
{
/* yoyo remove: temp patch to be sure that the client does not send messages before the
CONNECTION:READY is sent
Ulukyn: this only happens if player ask to reselect a char before end of update items.
On this case, skip it...
*/
if (!ConnectionReadySent)
continue;
IItemInfoWaiter *waiter=*it;
uint itemSlotId= waiter->ItemSlotId;
TItemInfoMap::iterator it= _ItemInfoMap.find(itemSlotId);

@ -1951,8 +1951,11 @@ class CAHOpenURL : public IActionHandler
#else
// TODO: for Linux and Mac OS
#endif
if (sParams == "cfg_EditAccountURL")
if (sParams == "cfg_CreateAccountURL")
{
url = ClientCfg.CreateAccountURL;
}
else if (sParams == "cfg_EditAccountURL")
{
url = ClientCfg.EditAccountURL;
}
@ -1991,31 +1994,34 @@ class CAHOpenURL : public IActionHandler
return;
}
// modify existing languages
if(sParams != "cfg_ConditionsTermsURL" && sParams != "cfg_NamingPolicyURL")
{
// modify existing languages
// old site
string::size_type pos_lang = url.find("/en/");
// old site
string::size_type pos_lang = url.find("/en/");
// or new forums
if (pos_lang == string::npos)
pos_lang = url.find("=en#");
// or new forums
if (pos_lang == string::npos)
pos_lang = url.find("=en#");
if (pos_lang != string::npos)
{
url.replace(pos_lang + 1, 2, ClientCfg.getHtmlLanguageCode());
}
else
{
// append language
if (url.find('?') != string::npos)
url += "&";
if (pos_lang != string::npos)
{
url.replace(pos_lang + 1, 2, ClientCfg.getHtmlLanguageCode());
}
else
url += "?";
{
// append language
if (url.find('?') != string::npos)
url += "&";
else
url += "?";
url += "language=" + ClientCfg.LanguageCode;
url += "language=" + ClientCfg.LanguageCode;
if (!LoginCustomParameters.empty())
url += LoginCustomParameters;
if (!LoginCustomParameters.empty())
url += LoginCustomParameters;
}
}
openURL(url);

Loading…
Cancel
Save