diff --git a/CMakeLists.txt b/CMakeLists.txt index c156b6667..dd3ba2cd3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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") diff --git a/nel/src/gui/css_style.cpp b/nel/src/gui/css_style.cpp index 912ff04d4..22792993c 100644 --- a/nel/src/gui/css_style.cpp +++ b/nel/src/gui/css_style.cpp @@ -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") diff --git a/ryzom/client/src/client_cfg.cpp b/ryzom/client/src/client_cfg.cpp index 9768d84f1..8a68b1140 100644 --- a/ryzom/client/src/client_cfg.cpp +++ b/ryzom/client/src/client_cfg.cpp @@ -909,16 +909,76 @@ 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 diff --git a/ryzom/client/src/connection.cpp b/ryzom/client/src/connection.cpp index 222ad6a1e..fe5ec64f3 100644 --- a/ryzom/client/src/connection.cpp +++ b/ryzom/client/src/connection.cpp @@ -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) diff --git a/ryzom/client/src/interface_v3/action_handler_help.cpp b/ryzom/client/src/interface_v3/action_handler_help.cpp index 7840d1ef7..0bab7fd35 100644 --- a/ryzom/client/src/interface_v3/action_handler_help.cpp +++ b/ryzom/client/src/interface_v3/action_handler_help.cpp @@ -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() ); diff --git a/ryzom/client/src/interface_v3/chat_text_manager.cpp b/ryzom/client/src/interface_v3/chat_text_manager.cpp index e2474b6a2..7c2e6938a 100644 --- a/ryzom/client/src/interface_v3/chat_text_manager.cpp +++ b/ryzom/client/src/interface_v3/chat_text_manager.cpp @@ -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) diff --git a/ryzom/client/src/interface_v3/inventory_manager.cpp b/ryzom/client/src/interface_v3/inventory_manager.cpp index a3e1541e5..8c0241acc 100644 --- a/ryzom/client/src/interface_v3/inventory_manager.cpp +++ b/ryzom/client/src/interface_v3/inventory_manager.cpp @@ -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); diff --git a/ryzom/client/src/login.cpp b/ryzom/client/src/login.cpp index 671f70a6b..16ab6698c 100644 --- a/ryzom/client/src/login.cpp +++ b/ryzom/client/src/login.cpp @@ -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; } @@ -1990,32 +1993,35 @@ class CAHOpenURL : public IActionHandler nlwarning("no URL found"); return; } + + if(sParams != "cfg_ConditionsTermsURL" && sParams != "cfg_NamingPolicyURL") + { + // modify existing languages - // 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);