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