develop
kaetemi 4 years ago
parent 298e912949
commit 52e3ca024f

@ -58,7 +58,7 @@ CGroupHTMLForum::~CGroupHTMLForum()
void CGroupHTMLForum::addHTTPGetParams (string &url, bool /*trustedDomain*/)
{
ucstring user_name = UserEntity->getLoginName ();
string user_name = UserEntity->getLoginName ();
const SGuild &guild = CGuildManager::getInstance()->getGuild();
string gname = guild.Name;
@ -76,7 +76,7 @@ void CGroupHTMLForum::addHTTPGetParams (string &url, bool /*trustedDomain*/)
url += ((url.find('?') != string::npos) ? "&" : "?") +
string("shard=") + toString(CharacterHomeSessionId) +
string("&user_login=") + user_name.toString() +
string("&user_login=") + user_name +
string("&forum=") + gname +
string("&session_cookie=") + NetMngr.getLoginCookie().toString();
}
@ -90,14 +90,14 @@ void CGroupHTMLForum::addHTTPGetParams (string &url, bool /*trustedDomain*/)
void CGroupHTMLForum::addHTTPPostParams (SFormFields &formfields, bool /*trustedDomain*/)
{
ucstring user_name = UserEntity->getLoginName ();
string user_name = UserEntity->getLoginName ();
const SGuild &guild = CGuildManager::getInstance()->getGuild();
string gname = guild.Name;
if (!gname.empty())
{
formfields.add("shard", toString(CharacterHomeSessionId));
formfields.add("user_login", user_name.toString());
formfields.add("user_login", user_name);
formfields.add("forum", gname);
formfields.add("session_cookie", NetMngr.getLoginCookie().toString());
}

@ -57,10 +57,10 @@ CGroupHTMLMail::~CGroupHTMLMail()
void CGroupHTMLMail::addHTTPGetParams (string &url, bool /*trustedDomain*/)
{
ucstring user_name = UserEntity->getLoginName ();
string user_name = UserEntity->getLoginName ();
url += ((url.find('?') != string::npos) ? "&" : "?") +
string("shard=") + toString(CharacterHomeSessionId) +
string("&user_login=") + user_name.toString() +
string("&user_login=") + user_name + // FIXME: UrlEncode
string("&session_cookie=") + NetMngr.getLoginCookie().toString() +
string("&lang=") + CI18N::getCurrentLanguageCode();
}
@ -69,9 +69,9 @@ void CGroupHTMLMail::addHTTPGetParams (string &url, bool /*trustedDomain*/)
void CGroupHTMLMail::addHTTPPostParams (SFormFields &formfields, bool /*trustedDomain*/)
{
ucstring user_name = UserEntity->getLoginName ();
string user_name = UserEntity->getLoginName ();
formfields.add("shard", toString(CharacterHomeSessionId));
formfields.add("user_login", user_name.toString());
formfields.add("user_login", user_name); // FIXME: UrlEncode
formfields.add("session_cookie", NetMngr.getLoginCookie().toString());
formfields.add("lang", CI18N::getCurrentLanguageCode());
}

@ -66,7 +66,7 @@ static string getWebAuthKey()
// authkey = <sharid><name><cid><cookie>
uint32 cid = NetMngr.getLoginCookie().getUserId() * 16 + PlayerSelectedSlot;
string rawKey = toString(CharacterHomeSessionId) +
UserEntity->getLoginName().toString() +
UserEntity->getLoginName() +
toString(cid) +
NetMngr.getLoginCookie().toString();
string key = getMD5((const uint8*)rawKey.c_str(), (uint32)rawKey.size()).toString();
@ -85,7 +85,7 @@ void addWebIGParams (string &url, bool trustedDomain)
uint32 cid = NetMngr.getLoginCookie().getUserId() * 16 + PlayerSelectedSlot;
url += ((url.find('?') != string::npos) ? "&" : "?") +
string("shardid=") + toString(CharacterHomeSessionId) +
string("&name=") + UserEntity->getLoginName().toUtf8() +
string("&name=") + UserEntity->getLoginName() + // FIXME: UrlEncode
string("&lang=") + CI18N::getCurrentLanguageCode() +
string("&datasetid=") + toString(UserEntity->dataSetId()) +
string("&ig=1");
@ -384,7 +384,7 @@ void CGroupHTMLAuth::addHTTPPostParams (SFormFields &formfields, bool trustedDom
uint32 cid = NetMngr.getLoginCookie().getUserId() * 16 + PlayerSelectedSlot;
formfields.add("shardid", toString(CharacterHomeSessionId));
formfields.add("name", UserEntity->getLoginName().toUtf8());
formfields.add("name", UserEntity->getLoginName());
formfields.add("lang", CI18N::getCurrentLanguageCode());
formfields.add("ig", "1");
if (trustedDomain)

@ -614,8 +614,8 @@ static CInterfaceChatDisplayer InterfaceChatDisplayer;
void CInterfaceChatDisplayer::colorizeSender(string &text, const string &senderName, CRGBA baseColor)
{
// find the sender/text separator to put color tags
ucstring::size_type pos = senderName.length() - 1;
if (pos != ucstring::npos)
string::size_type pos = senderName.length() - 1;
if (pos != string::npos)
{
string str;
@ -666,7 +666,7 @@ void CInterfaceChatDisplayer::displayChat(TDataSetIndex compressedSenderIndex, c
for(;;)
{
string::size_type index = finalString.find("{break}");
if (index == ucstring::npos) break;
if (index == string::npos) break;
finalString = finalString.substr(0, index) + finalString.substr(index+7,finalString.size());
}
@ -819,7 +819,7 @@ void CInterfaceChatDisplayer::displayChat(TDataSetIndex compressedSenderIndex, c
else
{
string::size_type index = finalString.find("<BPFX>");
if (index != ucstring::npos)
if (index != string::npos)
{
bubbleWanted = false;
finalString = finalString.substr(index+6,finalString.size());
@ -1015,7 +1015,7 @@ void inpulseDynStringInChatGroup(NLMISC::CBitMemStream &impulse)
// impulse.serialBit(huff);
//
// uint32 index;
// ucstring ucstr;
// ucstring ucstr; // OLD
//
// impulse.serial( index );
// impulse.serial( ucstr );
@ -1109,15 +1109,15 @@ void setFakeNews ()
CViewText *inter2 = (CViewText *)inter->getView("title0");
nlassert (inter2 != NULL);
inter2->setText(ucstring(shortNews[rnd*3]));
inter2->setText(ucstring(shortNews[rnd*3])); // OLD
CViewText *inter3 = (CViewText *)inter->getView("title1");
nlassert (inter3 != NULL);
inter3->setText(ucstring(shortNews[rnd*3+1]));
inter3->setText(ucstring(shortNews[rnd*3+1])); // OLD
CViewText *inter4 = (CViewText *)inter->getView("title2");
nlassert (inter4 != NULL);
inter4->setText(ucstring(shortNews[rnd*3+2]));
inter4->setText(ucstring(shortNews[rnd*3+2])); // OLD
}
{ // set test for the neutral main
string iname;
@ -1134,11 +1134,11 @@ void setFakeNews ()
CViewText *inter2 = (CViewText *)inter->getView("title0");
nlassert (inter2 != NULL);
inter2->setText(ucstring(shortNews[rnd*3]));
inter2->setText(ucstring(shortNews[rnd*3])); // OLD
CViewText *inter3 = (CViewText *)inter->getView("title1");
nlassert (inter3 != NULL);
inter3->setText(ucstring(shortNews[rnd*3+1]));
inter3->setText(ucstring(shortNews[rnd*3+1])); // OLD
}
{ // set test for the more news
string iname;
@ -1155,15 +1155,15 @@ void setFakeNews ()
CViewText *inter2 = (CViewText *)inter->getView("title0");
nlassert (inter2 != NULL);
inter2->setText(ucstring(longNews[rnd*3]));
inter2->setText(ucstring(longNews[rnd*3])); // OLD
CViewText *inter3 = (CViewText *)inter->getView("title1");
nlassert (inter3 != NULL);
inter3->setText(ucstring(longNews[rnd*3+1]));
inter3->setText(ucstring(longNews[rnd*3+1])); // OLD
CViewText *inter4 = (CViewText *)inter->getView("title2");
nlassert (inter4 != NULL);
inter4->setText(ucstring(longNews[rnd*3+2]));
inter4->setText(ucstring(longNews[rnd*3+2])); // OLD
}
}
}
@ -1180,7 +1180,7 @@ void setFakeNews ()
static void setupBotChatChoiceList(CInterfaceGroup *botChatGroup)
{
// Temp for test. Should then be read from server msg
std::vector<ucstring> choices;
std::vector<string> choices;
for(uint k = 0; k < 90; ++k)
{
choices.push_back("Choice " + toString(k));
@ -1195,7 +1195,7 @@ static void setupBotChatChoiceList(CInterfaceGroup *botChatGroup)
/*
static void setupBotChatDescription(CInterfaceGroup *botChatGroup)
{
ucstring desc;
string desc;
for(uint k = 0; k < 90; ++k)
{
desc += "This is a multi line description. ";
@ -1216,7 +1216,7 @@ static void setupBotChatBotGift(CInterfaceGroup *botChatGroup)
NLGUI::CDBManager::getInstance()->getDbProp("SERVER:INVENTORY:20:0:QUALITY")->setValue32(0);
NLGUI::CDBManager::getInstance()->getDbProp("SERVER:INVENTORY:20:1:SHEET")->setValue32(CSheetId("fyros_sword_lvl_01_05.item").asInt());
NLGUI::CDBManager::getInstance()->getDbProp("SERVER:INVENTORY:20:1:QUALITY")->setValue32(2);
CBotChat::setBotGift(botChatGroup, ucstring("Thanks to have succeeded the mission"), ucstring("Here's your reward"), ucstring("The bot has taken the object quest from your inventory"));
CBotChat::setBotGift(botChatGroup, "Thanks to have succeeded the mission", "Here's your reward", "The bot has taken the object quest from your inventory");
}
*/
@ -1798,7 +1798,7 @@ void impulseTeamContactInit(NLMISC::CBitMemStream &impulse)
{
vector<uint32> vFriendListName;
vector<TCharConnectionState> vFriendListOnline;
vector<ucstring> vIgnoreListName;
vector<ucstring> vIgnoreListName; // TODO: UTF-8 (serial)
impulse.serialCont(vFriendListName);
uint32 nbState;
@ -2136,9 +2136,9 @@ void impulseWhere(NLMISC::CBitMemStream &impulse)
void impulseWho(NLMISC::CBitMemStream &impulse)
{
nlinfo("impulseWho Received");
CInterfaceManager::getInstance()->displaySystemInfo(ucstring("Players currently in the game :"));
CInterfaceManager::getInstance()->displaySystemInfo("Players currently in the game :");
ucstring name;
ucstring name; // OLD
uint32 loginId;
uint16 dist;
uint8 dirshort;
@ -2176,7 +2176,7 @@ void impulseWho(NLMISC::CBitMemStream &impulse)
};
str = toString (" - uid %d - distance %hu meters - direction ", loginId, dist);
CInterfaceManager::getInstance()->displaySystemInfo(ucstring(name + ucstring(str) + CI18N::get(txts[direction])));
CInterfaceManager::getInstance()->displaySystemInfo(name + str + CI18N::get(txts[direction]));
}
}// impulseWho //
*/
@ -2185,9 +2185,9 @@ void impulseWho(NLMISC::CBitMemStream &impulse)
void impulseWhoGM(NLMISC::CBitMemStream &impulse)
{
nlinfo("impulseWhoGM Received");
CInterfaceManager::getInstance()->displaySystemInfo(ucstring("Players currently in the game :"));
CInterfaceManager::getInstance()->displaySystemInfo("Players currently in the game :");
ucstring name;
ucstring name; // OLD
uint32 loginId;
uint16 dist;
uint8 dirshort;
@ -2225,7 +2225,7 @@ void impulseWhoGM(NLMISC::CBitMemStream &impulse)
};
str = toString (" - uid %d - distance %hu meters - direction ", loginId, dist);
CInterfaceManager::getInstance()->displaySystemInfo(ucstring(name + ucstring(str) + CI18N::get(txts[direction])));
CInterfaceManager::getInstance()->displaySystemInfo(name + str + CI18N::get(txts[direction]));
}
}// impulseWho //
*/
@ -3115,12 +3115,12 @@ void impulsePVPChooseClan(NLMISC::CBitMemStream &impulse)
CCtrlTextButton * butClan1 = dynamic_cast<CCtrlTextButton*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:join_pvp_clan_proposal:content:clan1"));
if( butClan1 == NULL )
return;
butClan1->setText( ucstring(EGSPD::CPeople::toString( clan1 )) );
butClan1->setText( EGSPD::CPeople::toString( clan1 ) );
CCtrlTextButton * butClan2 = dynamic_cast<CCtrlTextButton*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:join_pvp_clan_proposal:content:clan2"));
if( butClan2 == NULL )
return;
butClan2->setText( ucstring(EGSPD::CPeople::toString( clan2 )) );
butClan2->setText( EGSPD::CPeople::toString( clan2 ) );
}
*/
@ -3316,8 +3316,8 @@ private:
if(i!=digitMaxEnd)
{
// get the width
ucstring digitStr= contentStr.substr(digitStart, i-digitStart);
fromString(digitStr.toString(), w);
string digitStr= contentStr.substr(digitStart, i-digitStart);
fromString(digitStr, w);
// remove the first tag
contentStr= contentStr.substr(i+1);
}

@ -312,7 +312,7 @@ void CProgress::internalProgress (float value)
// More help
TextContext->setFontSize((uint)(12.f * fontFactor));
/* todo tips of the day uncomment
ucstring ucstr = CI18N::get ("uiTipsEnd");
string ucstr = CI18N::get ("uiTipsEnd");
TextContext->printAt(0.5f, fY, ucstr); */
fY = nextLine (TextContext->getFontSize(), Driver->getWindowHeight(), fY);
fY = nextLine (TextContext->getFontSize(), Driver->getWindowHeight(), fY);
@ -360,11 +360,9 @@ void CProgress::internalProgress (float value)
(uint)RT.getRyzomTime(),
CI18N::get ("uiSeason"+toStringEnum(CRyzomTime::getSeasonByDay(day))).c_str(),
CI18N::get (WeatherManager.getCurrWeatherState().LocalizedName).c_str());
ucstring ucstr;
ucstr.fromUtf8 (str);
TextContext->setHotSpot(UTextContext::MiddleBottom);
TextContext->setColor(CRGBA(186, 179, 163, 255));
TextContext->printAt(0.5f, 25/768.f, ucstr);
TextContext->printAt(0.5f, 25/768.f, str);
}
// apply text commands

@ -968,9 +968,7 @@ void CDisplayerVisualEntity::updateName()
//H_AUTO(R2_CDisplayerVisualEntity_updateName)
if (!_Entity) return;
std::string name = getString(&getProps(), "Name");
ucstring ucName;
ucName.fromUtf8(name);
std::string ucName = getString(&getProps(), "Name");
if (ucName.empty())
{
ucName = CI18N::get("uiR2EDNoName");
@ -1011,13 +1009,11 @@ void CDisplayerVisualEntity::updateName()
actName = NLMISC::toString(" [%s]", actName.c_str());
ucstring ucActName;
ucActName.fromUtf8(actName);
ucName += ucActName;
ucName += actName;
{
//BENCH(setEntityName)
_Entity->setEntityName(ucName.toUtf8());
_Entity->setEntityName(ucName);
}
{
//BENCH(buildInSceneInterface)

@ -971,7 +971,7 @@ restartLoop:
return referenceFile;
}
void CLoadProxy::loadStringFile(const string &filename, ucstring &text)
void CLoadProxy::loadStringFile(const string &filename, ucstring &text) // TODO: UTF-8 (serial)
{
vector<TStringInfo> reference;
vector<TStringInfo> addition;
@ -1015,7 +1015,7 @@ restartLoop:
context.Diff.push_back(context.Addition[addIndex]);
//nldebug("Adding new string '%s' in CI18N", context.Addition[addIndex].Identifier.c_str());
if (ClientCfg.DebugStringManager)
context.Diff.back().Text = ucstring("<NEW>")+context.Diff.back().Text;
context.Diff.back().Text = ucstring("<NEW>")+context.Diff.back().Text; // TODO: UTF-8 (serial)
}
void CLoadProxy::onRemove(uint /* addIndex */, uint /* refIndex */, TStringDiffContext &/* context */)
{
@ -1027,7 +1027,7 @@ restartLoop:
context.Diff.push_back(context.Addition[addIndex]);
//nldebug("Using changed string '%s' in CI18N", context.Addition[addIndex].Identifier.c_str());
if (ClientCfg.DebugStringManager)
context.Diff.back().Text = ucstring("<CHG>")+context.Diff.back().Text;
context.Diff.back().Text = ucstring("<CHG>")+context.Diff.back().Text; // TODO: UTF-8 (serial)
}
void CLoadProxy::onSwap(uint /* newIndex */, uint /* refIndex */, TStringDiffContext &/* context */)
{
@ -1041,7 +1041,7 @@ restartLoop:
class CReadWorkSheetFile : public TWorkSheetDiff::IDiffCallback
{
public:
void readWorkSheetFile(const string &filename, ucstring &text)
void readWorkSheetFile(const string &filename, ucstring &text) // TODO: UTF-8 (serial)
{
TWorksheet addition;
TWorksheet reference;
@ -1178,9 +1178,9 @@ bool CStringManagerClient::checkWordFileDates(vector<CFileCheck> &fileChecks, co
// ***************************************************************************
void CStringManagerClient::initI18NSpecialWords(const string &languageCode)
{
ucstring womenNameColIdent = ucstring("women_name");
ucstring descColIdent = ucstring("description");
ucstring descColIdent2 = ucstring("description2");
ucstring womenNameColIdent = ucstring("women_name"); // TODO: UTF-8 (serial)
ucstring descColIdent = ucstring("description"); // TODO: UTF-8 (serial)
ucstring descColIdent2 = ucstring("description2"); // TODO: UTF-8 (serial)
// List of words to append to the local CI18N system.
static const char *specialWords[]=
@ -1219,11 +1219,11 @@ void CStringManagerClient::initI18NSpecialWords(const string &languageCode)
{
uint32 profile0= (uint32)ryzomGetLocalTime();
ucstring ucs;
ucstring ucs; // TODO: UTF-8 (serial)
string fileName = fileNames[i];
string keyExtenstion = specialWords[i*3+2];
// read the ucstring and make diffs with data in ./translation/work.
// read the ucstring and make diffs with data in ./translation/work. // TODO: UTF-8 (serial)
CReadWorkSheetFile rwsf;
rwsf.readWorkSheetFile(fileName, ucs);
if(ucs.empty())
@ -1235,9 +1235,9 @@ void CStringManagerClient::initI18NSpecialWords(const string &languageCode)
// Get the Key and Data ColIndex.
uint nameColIndex = 0, keyColIndex = 0;
if( !ws.findCol(ucstring("name"), nameColIndex) )
if( !ws.findCol(ucstring("name"), nameColIndex) ) // TODO: UTF-8 (serial)
continue;
if( !ws.findCol(ucstring(specialWords[i*3+1]), keyColIndex) )
if( !ws.findCol(ucstring(specialWords[i*3+1]), keyColIndex) ) // TODO: UTF-8 (serial)
continue;
// Get the women name index if possible.
@ -1282,7 +1282,7 @@ void CStringManagerClient::initI18NSpecialWords(const string &languageCode)
// insert in map of Women Name if OK.
if(womenNameColIndex!=std::numeric_limits<uint>::max())
{
const ucstring &womenName= ws.getData(j, womenNameColIndex);
const ucstring &womenName= ws.getData(j, womenNameColIndex); // TODO: UTF-8 (serial)
_SpecItem_TempMap[keyStr].WomenName= womenName.toUtf8();
// replace all \n in the women name with true \n
while(strFindReplace(_SpecItem_TempMap[keyStr].WomenName, "\\n", "\n"));
@ -1291,7 +1291,7 @@ void CStringManagerClient::initI18NSpecialWords(const string &languageCode)
// insert in map of Description if OK.
if(descColIndex!=std::numeric_limits<uint>::max())
{
const ucstring &desc= ws.getData(j, descColIndex);
const ucstring &desc= ws.getData(j, descColIndex); // TODO: UTF-8 (serial)
_SpecItem_TempMap[keyStr].Desc= desc.toUtf8();
// replace all \n in the desc with true \n
while(strFindReplace(_SpecItem_TempMap[keyStr].Desc, "\\n", "\n"));
@ -1300,7 +1300,7 @@ void CStringManagerClient::initI18NSpecialWords(const string &languageCode)
// insert in map of Description2 if OK.
if(descColIndex2!=std::numeric_limits<uint>::max())
{
const ucstring &desc= ws.getData(j, descColIndex2);
const ucstring &desc= ws.getData(j, descColIndex2); // TODO: UTF-8 (serial)
_SpecItem_TempMap[keyStr].Desc2= desc.toUtf8();
// replace all \n in the desc with true \n
while(strFindReplace(_SpecItem_TempMap[keyStr].Desc2, "\\n", "\n"));

@ -187,7 +187,7 @@ private:
struct TStringWaiter
{
/// Pointer to the ucstring to fill
/// Pointer to the utf-8 string to fill
std::string *Result;
/// Pointer to the remover that contains this string reference
const IStringWaiterRemover *Remover;
@ -277,10 +277,10 @@ private:
else
{
nlassert(f.isReading());
ucstring name;
ucstring womenName;
ucstring desc;
ucstring desc2;
ucstring name; // Old UTF-16 serial
ucstring womenName; // Old UTF-16 serial
ucstring desc; // Old UTF-16 serial
ucstring desc2; // Old UTF-16 serial
f.serial(name);
if (ver >= 1)
f.serial(womenName);
@ -419,7 +419,7 @@ public:
*/
class CLoadProxy : public NLMISC::CI18N::ILoadProxy, public TStringDiff::IDiffCallback
{
void loadStringFile(const std::string &filename, ucstring &text);
void loadStringFile(const std::string &filename, ucstring &text); // TODO: UTF-8 (serial)
void onEquivalent(uint addIndex, uint refIndex, TStringDiffContext &context);
void onAdd(uint addIndex, uint refIndex, TStringDiffContext &context);

@ -15,7 +15,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#if 0
#include "stdpch.h"
@ -55,14 +55,14 @@ CTextManager::CTextManager()
//-----------------------------------------------
/// Return the text according to the Id.
//-----------------------------------------------
ucstring CTextManager::text(uint textId)
ucstring CTextManager::text(uint textId) // OLD
{
map<uint, ucstring>::iterator it = _Texts.find(textId);
map<uint, ucstring>::iterator it = _Texts.find(textId); // OLD
if(it != _Texts.end())
return (*it).second;
// Return an empty string.
return ucstring();
return ucstring(); // OLD
}
//-----------------------------------------------
@ -70,13 +70,14 @@ ucstring CTextManager::text(uint textId)
//-----------------------------------------------
void CTextManager::text(uint textId, const std::string &str)
{
_Texts.insert(make_pair(textId, ucstring(str)));
_Texts.insert(make_pair(textId, ucstring(str))); // OLD
}
//-----------------------------------------------
/// Set the text for 'textId'.
//-----------------------------------------------
void CTextManager::text(uint textId, const ucstring &str)
void CTextManager::text(uint textId, const ucstring &str) // OLD
{
_Texts.insert(make_pair(textId, str));
}
#endif

@ -14,8 +14,9 @@
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// Lost code
#if 0
#ifndef NL_TEXT_MANAGER_H
#define NL_TEXT_MANAGER_H
@ -25,7 +26,7 @@
/////////////
// Misc
#include "nel/misc/types_nl.h"
#include "nel/misc/ucstring.h"
#include "nel/misc/ucstring.h" // OLD
// Std
#include <map>
@ -42,18 +43,18 @@
class CTextManager
{
protected:
std::map<uint, ucstring> _Texts;
std::map<uint, ucstring> _Texts; // OLD
public:
/// Constructor
CTextManager();
/// Return the text according to the Id.
ucstring text(uint textId);
ucstring text(uint textId); // OLD
/// Set the text for 'textId'.
void text(uint textId, const std::string &str);
/// Set the text for 'textId'.
void text(uint textId, const ucstring &str);
void text(uint textId, const ucstring &str); // OLD
};
@ -65,5 +66,6 @@ extern CTextManager TextMngr;
#endif // NL_TEXT_MANAGER_H
#endif
/* End of text_manager.h */

@ -3078,7 +3078,7 @@ void CUserEntity::setAFK(bool b, string afkTxt)
nlwarning("CUserEntity:setAFK: unknown message named '%s'.", msgName.c_str());
// custom afk txt
ucstring ucstr;
ucstring ucstr; // TODO: UTF-8 (serial)
ucstr.fromUtf8( afkTxt );
CBitMemStream outTxt;
static const string msgNameTxt = "STRING:AFK_TXT";
@ -3828,11 +3828,10 @@ void CUserEntity::CSkillPointsObserver::update(ICDBNode* node )
string deltaStr = toString("%+d", delta);
// get the sp title
ucstring spTitle;
spTitle= CI18N::get(toString("uiSkillPointsBold%d",SpType));
const string &spTitle = CI18N::get(toString("uiSkillPointsBold%d",SpType));
// run the popup
CAHManager::getInstance()->runActionHandler("message_popup", NULL, "text1="+deltaStr+"|text0="+spTitle.toUtf8());
CAHManager::getInstance()->runActionHandler("message_popup", NULL, "text1="+deltaStr+"|text0="+spTitle);
// Context help
contextHelp ("skill_point");

@ -485,7 +485,7 @@ public:
/// true if current behaviour allows to change front
bool canChangeFront();
ucstring getLoginName()
string getLoginName()
{
if (_LoginName.empty())
_LoginName = getDisplayName();
@ -772,7 +772,7 @@ private:
CItemSnapshot _PreviousRightHandItem;
CItemSnapshot _PreviousLeftHandItem;
ucstring _LoginName;
std::string _LoginName;
};
/// Out game received position

Loading…
Cancel
Save