Changes made after code-to-root-atys branch

13-inventory-fixes
Nuno 3 years ago
parent d7d1bc60c2
commit 557f5d3d6c

@ -978,9 +978,10 @@ void CLodCharacterManager::addTextureCompute(CLodCharacterInstance &instance,
return;
// get lookup ptr.
nlassert(lodTexture.Texture.size()==NL3D_CLOD_TEXT_SIZE);
if (lodTexture.Texture.size() < NL3D_CLOD_TEXT_SIZE)
return;
nlassert(lodTexture.Texture.size()==NL3D_CLOD_TEXT_SIZE);
const CLodCharacterTexture::CTUVQ *lookUpPtr= &lodTexture.Texture[0];

@ -326,8 +326,8 @@ CClientConfig::CClientConfig()
Local = false; // Default is Net Mode.
FSHost = ""; // Default Host.
TexturesInterface.push_back("texture_interfaces_v3");
TexturesInterfaceDXTC.push_back("texture_interfaces_dxtc");
TexturesInterface.push_back("texture_interfaces_v3_2x");
TexturesInterfaceDXTC.push_back("texture_interfaces_dxtc_2x");
TexturesOutGameInterface.push_back("texture_interfaces_v3_outgame_ui");
@ -788,8 +788,8 @@ void CClientConfig::setValues()
READ_STRINGVECTOR_FV(TexturesOutGameInterfaceDXTC);
// interface textures ingame and r2
READ_STRINGVECTOR_FV(TexturesInterface);
READ_STRINGVECTOR_FV(TexturesInterfaceDXTC);
//READ_STRINGVECTOR_FV(TexturesInterface);
//READ_STRINGVECTOR_FV(TexturesInterfaceDXTC);
// interface files login menus
READ_STRINGVECTOR_FV(XMLLoginInterfaceFiles);
@ -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

@ -193,6 +193,7 @@ bool hasPrivilegeG() { return (UserPrivileges.find(":G:") != std::string::npos);
bool hasPrivilegeEM() { return (UserPrivileges.find(":EM:") != std::string::npos); }
bool hasPrivilegeEG() { return (UserPrivileges.find(":EG:") != std::string::npos); }
bool hasPrivilegeOBSERVER() { return (UserPrivileges.find(":OBSERVER:") != std::string::npos); }
bool hasPrivilegeTESTER() { return (UserPrivileges.find(":TESTER:") != std::string::npos); }
// Restore the video mode (fullscreen for example) after the connection (done in a window)
@ -1127,7 +1128,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)

@ -49,12 +49,12 @@
#include "login_progress_post_thread.h"
#include "interface_v3/action_handler_base.h"
#include "item_group_manager.h"
#include "nel/misc/cmd_args.h"
#ifdef DEBUG_NEW
#define new DEBUG_NEW
#endif
using namespace NLMISC;
using namespace NLNET;
using namespace NL3D;
@ -210,6 +210,7 @@ extern bool IsInRingSession;
extern void selectTipsOfTheDay (uint tips);
#define BAR_STEP_TP 2
extern NLMISC::CCmdArgs Args;
CLoginStateMachine::TEvent CLoginStateMachine::waitEvent()
{
@ -462,12 +463,14 @@ void CLoginStateMachine::run()
case st_check_patch:
/// check the data to check if patch needed
CLoginProgressPostThread::getInstance().step(CLoginStep(LoginStep_PostLogin, "login_step_post_login"));
if (!ClientCfg.PatchWanted)
if (!ClientCfg.PatchWanted || (Args.haveArg("n") && Args.getLongArg("nopatch").front() == "1"))
{
// client don't want to be patched !
_CurrentState = st_display_eula;
break;
}
initPatchCheck();
SM_BEGIN_EVENT_TABLE
if (isBGDownloadEnabled())
@ -1523,4 +1526,3 @@ void CFarTP::farTPmainLoop()
if(welcomeWindow)
initWelcomeWindow();
}

@ -3658,9 +3658,6 @@ void CInventoryManager::updateItemInfoQueue()
return;
}
// CONNECTION:READY not yet sent, so we cannot send requests yet!
nlassert(ConnectionReadySent || !_ItemInfoWaiters.size());
// For All waiters, look if one need update.
TItemInfoWaiters::iterator it;
for(it= _ItemInfoWaiters.begin();it!=_ItemInfoWaiters.end();it++)

@ -1932,8 +1932,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;
}
@ -1971,32 +1974,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);
@ -3283,7 +3289,6 @@ bool loginIntroSkip;
void loginIntro()
{
// Display of nevrax logo is done at init time (see init.cpp) just before addSearchPath (second one)
#if 0
for (uint i = 0; i < 1; i++) // previously display nevrax then nvidia
{
if (i != 0)
@ -3321,7 +3326,6 @@ void loginIntro()
NLGUI::CDBManager::getInstance()->flushObserverCalls();
}
}
#endif
beginLoading(StartBackground);
ProgressBar.finish();
}

@ -33,6 +33,7 @@
#include "game_share/chat_group.h"
#include "game_share/character_summary.h"
#include "game_share/sphrase_com.h"
#include "game_share/outpost.h"
#include "game_share/msg_client_server.h"
#include "game_share/ryzom_database_banks.h"
#include "game_share/msg_encyclopedia.h"
@ -3206,9 +3207,11 @@ void impulseUserBars(NLMISC::CBitMemStream &impulse)
void impulseOutpostChooseSide(NLMISC::CBitMemStream &impulse)
{
// read message
uint8 type;
bool outpostInFire;
bool playerGuildInConflict;
bool playerGuildIsAttacker;
impulse.serial(type);
impulse.serial(outpostInFire);
impulse.serial(playerGuildInConflict);
impulse.serial(playerGuildIsAttacker);
@ -3220,7 +3223,7 @@ void impulseOutpostChooseSide(NLMISC::CBitMemStream &impulse)
impulse.serial( declTimer );
// start
OutpostManager.startPvpJoinProposal(outpostInFire, playerGuildInConflict, playerGuildIsAttacker,
OutpostManager.startPvpJoinProposal((OUTPOSTENUMS::TPVPType)type, outpostInFire, playerGuildInConflict, playerGuildIsAttacker,
ownerGuildNameId, attackerGuildNameId, declTimer);
}

Loading…
Cancel
Save