mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-27 19:30:54 +00:00
Changed: #1433 Merge changes from patch 1.13
This commit is contained in:
parent
2c45bbf981
commit
0fd1d9eed7
12 changed files with 31 additions and 22 deletions
|
@ -628,7 +628,7 @@ void CCDBNodeBranch::display (const std::string &prefix)
|
|||
}
|
||||
}
|
||||
|
||||
void CCDBNodeBranch::removeNode (CTextId& id)
|
||||
void CCDBNodeBranch::removeNode (const CTextId& id)
|
||||
{
|
||||
// Look for the node
|
||||
CCDBNodeBranch *pNode = dynamic_cast<CCDBNodeBranch*>(getNode(id,false));
|
||||
|
|
|
@ -165,7 +165,7 @@ public:
|
|||
|
||||
virtual void display (const std::string &prefix);
|
||||
|
||||
void removeNode (CTextId& id);
|
||||
void removeNode (const CTextId& id);
|
||||
|
||||
/**
|
||||
* add an observer to a property
|
||||
|
|
|
@ -1877,7 +1877,6 @@ void CCharacterCL::updateVisualPropertyPvpMode(const NLMISC::TGameCycle &/* game
|
|||
void CCharacterCL::updateVisualPropertyPvpClan(const NLMISC::TGameCycle &/* gameCycle */, const sint64 &prop)
|
||||
{
|
||||
_LeagueId = uint32(prop);
|
||||
buildInSceneInterface();
|
||||
|
||||
if (isUser())
|
||||
{
|
||||
|
|
|
@ -1174,7 +1174,7 @@ class CHandlerTell : public IActionHandler
|
|||
ucstring finalMsg;
|
||||
CChatWindow::encodeColorTag(prop.getRGBA(), finalMsg, false);
|
||||
|
||||
ucstring csr = CHARACTER_TITLE::isCsrTitle(UserEntity->getTitleRaw()) ? "(CSR) " : "";
|
||||
ucstring csr(CHARACTER_TITLE::isCsrTitle(UserEntity->getTitleRaw()) ? "(CSR) " : "");
|
||||
finalMsg += csr + CI18N::get("youTell") + ": ";
|
||||
prop.readRGBA("UI:SAVE:CHAT:COLORS:TELL"," ");
|
||||
CChatWindow::encodeColorTag(prop.getRGBA(), finalMsg, true);
|
||||
|
@ -1182,7 +1182,7 @@ class CHandlerTell : public IActionHandler
|
|||
// display msg with good color
|
||||
// TDataSetIndex dsi; // not used ....
|
||||
PeopleInterraction.ChatInput.Tell.displayTellMessage(/*dsi, */finalMsg, receiver, prop.getRGBA());
|
||||
|
||||
|
||||
ucstring s = CI18N::get("youTellPlayer");
|
||||
strFindReplace(s, "%name", receiver);
|
||||
strFindReplace(finalMsg, CI18N::get("youTell"), s);
|
||||
|
|
|
@ -2539,7 +2539,7 @@ NLMISC::CRGBA CEntityCL::getColor () const
|
|||
if (isEnemy())
|
||||
{
|
||||
if (getPvpMode()&PVP_MODE::PvpFaction)
|
||||
return CRGBA::CRGBA(min(255, _PvpEnemyColor.R+150), min(255, _PvpEnemyColor.G+150), min(255, _PvpEnemyColor.B+150),_PvpEnemyColor.A);
|
||||
return CRGBA(min(255, _PvpEnemyColor.R+150), min(255, _PvpEnemyColor.G+150), min(255, _PvpEnemyColor.B+150),_PvpEnemyColor.A);
|
||||
else
|
||||
return _PvpEnemyColor;
|
||||
}
|
||||
|
@ -2551,8 +2551,8 @@ NLMISC::CRGBA CEntityCL::getColor () const
|
|||
if (getPvpMode() & PVP_MODE::PvpFactionFlagged)
|
||||
{
|
||||
if(isInSameLeague())
|
||||
return CRGBA::CRGBA(max(0, _PvpAllyColor.R-100), max(0, _PvpAllyColor.G-100), max(0, _PvpAllyColor.B-100),_PvpAllyColor.A);
|
||||
return CRGBA::CRGBA(max(0, _PvpAllyInTeamColor.R-100), max(0, _PvpAllyInTeamColor.G-100), max(0, _PvpAllyInTeamColor.B-100),_PvpAllyInTeamColor.A);
|
||||
return CRGBA(max(0, _PvpAllyColor.R-100), max(0, _PvpAllyColor.G-100), max(0, _PvpAllyColor.B-100),_PvpAllyColor.A);
|
||||
return CRGBA(max(0, _PvpAllyInTeamColor.R-100), max(0, _PvpAllyInTeamColor.G-100), max(0, _PvpAllyInTeamColor.B-100),_PvpAllyInTeamColor.A);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2572,7 +2572,7 @@ NLMISC::CRGBA CEntityCL::getColor () const
|
|||
|
||||
// neutral
|
||||
if (isInSameLeague())
|
||||
return CRGBA::CRGBA(min(255, _GroupColor.R+50), min(255, _GroupColor.G+50), min(255, _GroupColor.B+50),_GroupColor.A);
|
||||
return CRGBA(min(255, _GroupColor.R+50), min(255, _GroupColor.G+50), min(255, _GroupColor.B+50),_GroupColor.A);
|
||||
|
||||
if (isInSameGuild())
|
||||
return _GuildColor;
|
||||
|
|
|
@ -148,7 +148,7 @@ CViewBase *CChatTextManager::createMsgText(const ucstring &cstMsg, NLMISC::CRGBA
|
|||
vt->setMultiLineSpace(getTextMultiLineSpace());
|
||||
vt->setModulateGlobalColor(false);
|
||||
|
||||
ucstring cur_time = "";
|
||||
ucstring cur_time;
|
||||
static CCDBNodeLeaf* node = CInterfaceManager::getInstance()->getDbProp("UI:SAVE:CHAT:SHOW_TIMES_IN_CHAT_CB", false);
|
||||
if (node)
|
||||
{
|
||||
|
|
|
@ -473,7 +473,7 @@ void CChatWindow::displayLocalPlayerTell(const ucstring &receiver, const ucstrin
|
|||
prop.readRGBA("UI:SAVE:CHAT:COLORS:SPEAKER"," ");
|
||||
encodeColorTag(prop.getRGBA(), finalMsg, false);
|
||||
|
||||
ucstring csr = CHARACTER_TITLE::isCsrTitle(UserEntity->getTitleRaw()) ? "(CSR) " : "";
|
||||
ucstring csr(CHARACTER_TITLE::isCsrTitle(UserEntity->getTitleRaw()) ? "(CSR) " : "");
|
||||
finalMsg += csr + CI18N::get("youTell") + ": ";
|
||||
prop.readRGBA("UI:SAVE:CHAT:COLORS:TELL"," ");
|
||||
encodeColorTag(prop.getRGBA(), finalMsg, true);
|
||||
|
|
|
@ -587,6 +587,12 @@ bool CGroupCompasMenu::parse(xmlNodePtr cur, CInterfaceGroup *parent /*=NULL*/)
|
|||
return true;
|
||||
}
|
||||
|
||||
// Helper for sorting landmarks
|
||||
static inline bool UserLandMarksSortPredicate(const CUserLandMark& lm1, const CUserLandMark& lm2)
|
||||
{
|
||||
return toLower(lm1.Title) < toLower(lm2.Title);
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
// Called when we activate the compass menu
|
||||
void CGroupCompasMenu::setActive (bool state)
|
||||
|
@ -803,6 +809,10 @@ void CGroupCompasMenu::setActive (bool state)
|
|||
}
|
||||
// User landmarks
|
||||
uint nbUserLandMarks = std::min( uint(currCont->UserLandMarks.size()), CContinent::getMaxNbUserLandMarks() );
|
||||
|
||||
// Sort the landmarks
|
||||
std::sort(currCont->UserLandMarks.begin(), currCont->UserLandMarks.end(), UserLandMarksSortPredicate);
|
||||
|
||||
for(k = 0; k < nbUserLandMarks; ++k)
|
||||
{
|
||||
if (currCont->UserLandMarks[k].Type < CUserLandMark::UserLandMarkTypeCount)
|
||||
|
|
|
@ -74,6 +74,7 @@ void addWebIGParams (string &url, bool trustedDomain)
|
|||
string("shardid=") + toString(CharacterHomeSessionId) +
|
||||
string("&name=") + UserEntity->getLoginName().toUtf8() +
|
||||
string("&lang=") + CI18N::getCurrentLanguageCode() +
|
||||
string("&datasetid=") + toString(UserEntity->dataSetId()) +
|
||||
string("&ig=1");
|
||||
if (trustedDomain)
|
||||
{
|
||||
|
@ -82,7 +83,6 @@ void addWebIGParams (string &url, bool trustedDomain)
|
|||
|
||||
if (url.find('$') != string::npos)
|
||||
{
|
||||
strFindReplace(url, "$datasetid$", toString(UserEntity->dataSetId()));
|
||||
strFindReplace(url, "$gender$", GSGENDER::toString(UserEntity->getGender()));
|
||||
strFindReplace(url, "$displayName$", UserEntity->getDisplayName().toString());
|
||||
strFindReplace(url, "$posx$", toString(UserEntity->pos().x));
|
||||
|
|
|
@ -1944,12 +1944,12 @@ static sint32 getTargetSlotNr()
|
|||
const char *dbPath = "UI:VARIABLES:TARGET:SLOT";
|
||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||
CCDBNodeLeaf *node = im->getDbProp(dbPath, false);
|
||||
if (!node) return NULL;
|
||||
if (!node) return 0;
|
||||
if ((uint8) node->getValue32() == (uint8) CLFECOMMON::INVALID_SLOT)
|
||||
{
|
||||
return NULL;
|
||||
return 0;
|
||||
}
|
||||
return node->getValue32();
|
||||
return node->getValue32();
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
|
@ -1963,13 +1963,13 @@ static CEntityCL *getTargetEntity()
|
|||
{
|
||||
return NULL;
|
||||
}
|
||||
return EntitiesMngr.entity((uint) node->getValue32());
|
||||
return EntitiesMngr.entity((uint) node->getValue32());
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
static CEntityCL *getSlotEntity(uint slot)
|
||||
{
|
||||
return EntitiesMngr.entity(slot);
|
||||
return EntitiesMngr.entity(slot);
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
|
@ -2032,7 +2032,7 @@ sint32 CLuaIHM::getTargetLevel()
|
|||
ucstring CLuaIHM::getTargetSheet()
|
||||
{
|
||||
CEntityCL *target = getTargetEntity();
|
||||
if (!target) return "";
|
||||
if (!target) return ucstring();
|
||||
|
||||
return target->sheetId().toString();
|
||||
}
|
||||
|
|
|
@ -468,12 +468,12 @@ void CPeopleList::displayLocalPlayerTell(const ucstring &receiver, uint index, c
|
|||
return;
|
||||
}
|
||||
|
||||
ucstring csr = CHARACTER_TITLE::isCsrTitle(UserEntity->getTitleRaw()) ? "(CSR) " : "";
|
||||
ucstring csr(CHARACTER_TITLE::isCsrTitle(UserEntity->getTitleRaw()) ? "(CSR) " : "");
|
||||
ucstring finalMsg = csr + CI18N::get("youTell") + ": " + msg;
|
||||
// display msg with good color
|
||||
CInterfaceProperty prop;
|
||||
prop.readRGBA("UI:SAVE:CHAT:COLORS:TELL"," ");
|
||||
|
||||
|
||||
ucstring s = CI18N::get("youTellPlayer");
|
||||
strFindReplace(s, "%name", receiver);
|
||||
strFindReplace(finalMsg, CI18N::get("youTell"), s);
|
||||
|
@ -935,7 +935,7 @@ class CHandlerContactEntry : public IActionHandler
|
|||
ucstring final;
|
||||
CChatWindow::encodeColorTag(prop.getRGBA(), final, false);
|
||||
|
||||
ucstring csr = CHARACTER_TITLE::isCsrTitle(UserEntity->getTitleRaw()) ? "(CSR) " : "";
|
||||
ucstring csr(CHARACTER_TITLE::isCsrTitle(UserEntity->getTitleRaw()) ? "(CSR) " : "");
|
||||
final += csr + CI18N::get("youTell")+": ";
|
||||
prop.readRGBA("UI:SAVE:CHAT:COLORS:TELL"," ");
|
||||
CChatWindow::encodeColorTag(prop.getRGBA(), final, true);
|
||||
|
|
|
@ -107,7 +107,7 @@ public:
|
|||
|
||||
// Get the Localized Title name
|
||||
static const ucchar *getTitleLocalizedName(const std::string &titleId, bool women);
|
||||
static std::vector<ucstring> CStringManagerClient::getTitleInfos(const std::string &titleId, bool women);
|
||||
static std::vector<ucstring> getTitleInfos(const std::string &titleId, bool women);
|
||||
// Get the Localized name of a classification type
|
||||
static const ucchar *getClassificationTypeLocalizedName(EGSPD::CClassificationType::TClassificationType type);
|
||||
|
||||
|
|
Loading…
Reference in a new issue