Merge branch 'atys' into develop-atys

feature/develop-atys
Nimetu 4 years ago
commit 36f9888b91

@ -117,6 +117,9 @@ namespace NLGUI
// Browse error // Browse error
void browseError (const char *msg); void browseError (const char *msg);
// Error message with html content
void browseErrorHtml(const std::string &html);
bool isBrowsing(); bool isBrowsing();
// Update coords // Update coords

@ -2640,6 +2640,17 @@ namespace NLGUI
invalidateCoords(); invalidateCoords();
} }
void CGroupHTML::browseErrorHtml(const std::string &html)
{
releaseDownloads();
removeContent();
renderHtmlString(html);
updateRefreshButton();
invalidateCoords();
}
// *************************************************************************** // ***************************************************************************
bool CGroupHTML::isBrowsing() bool CGroupHTML::isBrowsing()
@ -3959,11 +3970,22 @@ namespace NLGUI
{ {
if (!success) if (!success)
{ {
CUrlParser uri(_CurlWWW->Url);
// potentially unwanted chars
std::string url = _CurlWWW->Url;
url = strFindReplaceAll(url, string("<"), string("%3C"));
url = strFindReplaceAll(url, string(">"), string("%3E"));
url = strFindReplaceAll(url, string("\""), string("%22"));
url = strFindReplaceAll(url, string("'"), string("%27"));
std::string err; std::string err;
err = "Connection failed with cURL error: "; err = "<html><head><title>cURL error</title></head><body>";
err += "<h1>Connection failed with cURL error</h1>";
err += error; err += error;
err += "\nURL '" + _CurlWWW->Url + "'"; err += "<hr>(" + uri.scheme + "://" + uri.host + ") <a href=\"" + url + "\">reload</a>";
browseError(err.c_str()); err += "</body></html>";
browseErrorHtml(err);
return; return;
} }

@ -180,6 +180,7 @@ int main(int argc, char **argv)
Args.setVersion(getDisplayVersion()); Args.setVersion(getDisplayVersion());
Args.setDescription("Ryzom client"); Args.setDescription("Ryzom client");
Args.addArg("n", "nopatch", "value", "Use this to not use patch system");
Args.addArg("p", "profile", "id", "Use this profile to determine what directory to use by default"); Args.addArg("p", "profile", "id", "Use this profile to determine what directory to use by default");
Args.addAdditionalArg("login", "Login to use", true, false); Args.addAdditionalArg("login", "Login to use", true, false);
Args.addAdditionalArg("password", "Password to use", true, false); Args.addAdditionalArg("password", "Password to use", true, false);

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

@ -52,6 +52,7 @@ bool hasPrivilegeEM();
bool hasPrivilegeEG(); bool hasPrivilegeEG();
bool hasPrivilegeVG(); bool hasPrivilegeVG();
bool hasPrivilegeOBSERVER(); bool hasPrivilegeOBSERVER();
bool hasPrivilegeTESTER();
// connection with the server. (login, shard list, etc.). // connection with the server. (login, shard list, etc.).

@ -49,12 +49,12 @@
#include "login_progress_post_thread.h" #include "login_progress_post_thread.h"
#include "interface_v3/action_handler_base.h" #include "interface_v3/action_handler_base.h"
#include "item_group_manager.h" #include "item_group_manager.h"
#include "nel/misc/cmd_args.h"
#ifdef DEBUG_NEW #ifdef DEBUG_NEW
#define new DEBUG_NEW #define new DEBUG_NEW
#endif #endif
using namespace NLMISC; using namespace NLMISC;
using namespace NLNET; using namespace NLNET;
using namespace NL3D; using namespace NL3D;
@ -210,6 +210,7 @@ extern bool IsInRingSession;
extern void selectTipsOfTheDay (uint tips); extern void selectTipsOfTheDay (uint tips);
#define BAR_STEP_TP 2 #define BAR_STEP_TP 2
extern NLMISC::CCmdArgs Args;
CLoginStateMachine::TEvent CLoginStateMachine::waitEvent() CLoginStateMachine::TEvent CLoginStateMachine::waitEvent()
{ {
@ -464,12 +465,14 @@ void CLoginStateMachine::run()
case st_check_patch: case st_check_patch:
/// check the data to check if patch needed /// check the data to check if patch needed
CLoginProgressPostThread::getInstance().step(CLoginStep(LoginStep_PostLogin, "login_step_post_login")); 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 ! // client don't want to be patched !
_CurrentState = st_display_eula; _CurrentState = st_display_eula;
break; break;
} }
initPatchCheck(); initPatchCheck();
SM_BEGIN_EVENT_TABLE SM_BEGIN_EVENT_TABLE
#ifdef RYZOM_BG_DOWNLOADER #ifdef RYZOM_BG_DOWNLOADER
@ -1529,4 +1532,3 @@ void CFarTP::farTPmainLoop()
if(welcomeWindow) if(welcomeWindow)
initWelcomeWindow(); initWelcomeWindow();
} }

@ -268,7 +268,7 @@ void CGameContextMenu::update()
setupContextMenuCantTalk(); // can't talk by default setupContextMenuCantTalk(); // can't talk by default
bool showGMOptions = (hasPrivilegeDEV() || hasPrivilegeSGM() || hasPrivilegeGM() || hasPrivilegeVG() || hasPrivilegeSG() || hasPrivilegeEM() || hasPrivilegeEG() || hasPrivilegeOBSERVER()); bool showGMOptions = (hasPrivilegeDEV() || hasPrivilegeSGM() || hasPrivilegeGM() || hasPrivilegeVG() || hasPrivilegeSG() || hasPrivilegeEM() || hasPrivilegeEG() || hasPrivilegeOBSERVER() || hasPrivilegeTESTER());
if (_TextInvisible) if (_TextInvisible)
_TextInvisible->setActive(showGMOptions); _TextInvisible->setActive(showGMOptions);

@ -1129,6 +1129,7 @@ void CDBCtrlSheet::clearIconBuffs()
{ {
_EnchantIcons.clear(); _EnchantIcons.clear();
_BuffIcons.clear(); _BuffIcons.clear();
_BoostIcons.clear();
} }
// *************************************************************************** // ***************************************************************************
@ -1161,8 +1162,15 @@ void CDBCtrlSheet::infoReceived()
if (brick) if (brick)
{ {
if (!brick->isRoot() && !brick->isCredit() && !brick->isParameter()) if (!brick->isRoot() && !brick->isCredit() && !brick->isParameter())
if (brick->BrickFamily == BRICK_FAMILIES::BSGMCB) // Boost of Allegories, use it as boost icon
{ {
if (!haveRoot) if (!haveRoot)
_BoostIcons.push_back(SBuffIcon(rVR.getTextureIdFromName(brick->getIcon()), brick->IconColor));
rVR.getTextureSizeFromId(_BoostIcons.back().TextureId, _BoostIcons.back().IconW, _BoostIcons.back().IconH);
}
else if (!brick->isRoot() && !brick->isCredit() && !brick->isParameter())
{
if (!haveRoot && !brick->getIconBack().empty())
{ {
_EnchantIcons.push_back(SBuffIcon(rVR.getTextureIdFromName(brick->getIconBack()), brick->IconBackColor)); _EnchantIcons.push_back(SBuffIcon(rVR.getTextureIdFromName(brick->getIconBack()), brick->IconBackColor));
rVR.getTextureSizeFromId(_EnchantIcons.back().TextureId, _EnchantIcons.back().IconW, _EnchantIcons.back().IconH); rVR.getTextureSizeFromId(_EnchantIcons.back().TextureId, _EnchantIcons.back().IconW, _EnchantIcons.back().IconH);
@ -2572,10 +2580,18 @@ void CDBCtrlSheet::drawSheet (sint32 x, sint32 y, bool draging, bool showSelecti
} }
yIcon -= hIcon; yIcon -= hIcon;
rVR.drawRotFlipBitmap(_RenderLayer + 1, xIcon, yIcon, wIcon, hIcon, 0, false, _EnchantIcons[0].TextureId, fastMulRGB(curSheetColor, _EnchantIcons[0].Color)); rVR.drawRotFlipBitmap(_RenderLayer + 1, xIcon, yIcon, wIcon, hIcon, 0, false, _EnchantIcons[0].TextureId, fastMulRGB(curSheetColor, _EnchantIcons[0].Color));
rVR.drawRotFlipBitmap(_RenderLayer+1, xIcon, yIcon, wIcon, hIcon, 0, false, _EnchantIcons[i].TextureId, fastMulRGB(curSheetColor, _EnchantIcons[i].Color)); rVR.drawRotFlipBitmap(_RenderLayer + 1, xIcon, yIcon, wIcon, hIcon, 0, false, _EnchantIcons[i].TextureId, fastMulRGB(curSheetColor, _EnchantIcons[i].Color));
if ((i - 1) < _BoostIcons.size()) {
nlinfo("Boost icon = %s", rVR.getTextureNameFromId(_BoostIcons[i-1].TextureId).c_str());
rVR.drawRotFlipBitmap(_RenderLayer + 2, xIcon+wIcon-_BoostIcons[i-1].IconW, yIcon, _BoostIcons[i-1].IconW, _BoostIcons[i-1].IconH, 0, false, _BoostIcons[i-1].TextureId, fastMulRGB(curSheetColor, _BoostIcons[i-1].Color));
}
} }
} }
// Draw Quality. -1 for lookandfeel. Draw it with global color // Draw Quality. -1 for lookandfeel. Draw it with global color
if (_DispQuality != -1) if (_DispQuality != -1)
{ {
@ -3938,6 +3954,7 @@ void CDBCtrlSheet::resetAllTexIDs()
_ItemInfoChanged = true; _ItemInfoChanged = true;
_EnchantIcons.clear(); _EnchantIcons.clear();
_BuffIcons.clear(); _BuffIcons.clear();
_BoostIcons.clear();
} }

@ -701,6 +701,7 @@ protected:
}; };
std::vector<SBuffIcon> _BuffIcons; std::vector<SBuffIcon> _BuffIcons;
std::vector<SBuffIcon> _EnchantIcons; std::vector<SBuffIcon> _EnchantIcons;
std::vector<SBuffIcon> _BoostIcons;
// Level Brick or Quality // Level Brick or Quality
union union

@ -2652,7 +2652,7 @@ void CGroupMap::createContinentLandMarks()
static void hideTeleportButtonsInPopupMenuIfNotEnoughPriv() static void hideTeleportButtonsInPopupMenuIfNotEnoughPriv()
{ {
bool showTeleport = (hasPrivilegeDEV() || hasPrivilegeSGM() || hasPrivilegeGM() || hasPrivilegeVG() || hasPrivilegeSG() || hasPrivilegeEM() || hasPrivilegeEG() || hasPrivilegeOBSERVER()); bool showTeleport = (hasPrivilegeDEV() || hasPrivilegeSGM() || hasPrivilegeGM() || hasPrivilegeVG() || hasPrivilegeSG() || hasPrivilegeEM() || hasPrivilegeEG() || hasPrivilegeOBSERVER()|| hasPrivilegeTESTER());
CInterfaceManager *im = CInterfaceManager::getInstance(); CInterfaceManager *im = CInterfaceManager::getInstance();
CInterfaceElement *ie = CWidgetManager::getInstance()->getElementFromId("ui:interface:map_menu:teleport"); CInterfaceElement *ie = CWidgetManager::getInstance()->getElementFromId("ui:interface:map_menu:teleport");

@ -558,6 +558,7 @@ namespace BRICK_FAMILIES
NL_STRING_CONVERSION_TABLE_ENTRY(BSCMC) NL_STRING_CONVERSION_TABLE_ENTRY(BSCMC)
NL_STRING_CONVERSION_TABLE_ENTRY(BSCMD) NL_STRING_CONVERSION_TABLE_ENTRY(BSCMD)
NL_STRING_CONVERSION_TABLE_ENTRY(BSGMC) NL_STRING_CONVERSION_TABLE_ENTRY(BSGMC)
NL_STRING_CONVERSION_TABLE_ENTRY(BSGMCB)
NL_STRING_CONVERSION_TABLE_ENTRY(BSXCA) NL_STRING_CONVERSION_TABLE_ENTRY(BSXCA)

@ -675,7 +675,8 @@ namespace BRICK_FAMILIES
BSCMD, // heal Focus BSCMD, // heal Focus
EndPowerParameter = BSCMD, EndPowerParameter = BSCMD,
BSGMC, // jewels s2e0 BSGMC, // allegories
BSGMCB, // boost allegories
BeginMagicPowerCredit, BeginMagicPowerCredit,
BSXCA = BeginMagicPowerCredit, // recast time BSXCA = BeginMagicPowerCredit, // recast time

@ -633,7 +633,7 @@ sint32 CStaticFames::getStaticFameIndexed(uint factionIndex1, uint factionIndex2
if (factionIndex1 >= _FameTableSize || factionIndex2 >= _FameTableSize) if (factionIndex1 >= _FameTableSize || factionIndex2 >= _FameTableSize)
{ {
nlwarning("FAME: CStaticFames::getStaticFame invalid faction, return 0"); //nlwarning("FAME: CStaticFames::getStaticFame invalid faction, return 0");
return 0; return 0;
} }

Loading…
Cancel
Save