diff --git a/code/nel/tools/misc/branch_patcher/branch_patcher.cpp b/code/nel/tools/misc/branch_patcher/branch_patcher.cpp index b226ec93d..ffd8006f5 100644 --- a/code/nel/tools/misc/branch_patcher/branch_patcher.cpp +++ b/code/nel/tools/misc/branch_patcher/branch_patcher.cpp @@ -52,15 +52,9 @@ BOOL CBranch_patcherApp::InitInstance() { // Standard initialization -#ifdef _AFXDLL - Enable3dControls(); // Call this when using MFC in a shared DLL -#else - Enable3dControlsStatic(); // Call this when linking to MFC statically -#endif - CBranch_patcherDlg dlg; m_pMainWnd = &dlg; - int nResponse = dlg.DoModal(); + INT_PTR nResponse = dlg.DoModal(); if (nResponse == IDOK) { } diff --git a/code/nel/tools/misc/data_mirror/data_mirror.cpp b/code/nel/tools/misc/data_mirror/data_mirror.cpp index e252312f3..4b66fa34b 100644 --- a/code/nel/tools/misc/data_mirror/data_mirror.cpp +++ b/code/nel/tools/misc/data_mirror/data_mirror.cpp @@ -191,7 +191,7 @@ BOOL CData_mirrorApp::InitInstance() while (fgets (line, 512, file)) { // Remove last back - int n = strlen (line); + int n = (int)strlen (line); if (n && (line[n-1] == '\n')) line[n-1] = 0; IgnoreFiles.insert (line); @@ -203,15 +203,9 @@ BOOL CData_mirrorApp::InitInstance() MessageBox (NULL, e.what (), "NeL Data Mirror", MB_OK|MB_ICONEXCLAMATION); } -#ifdef _AFXDLL - Enable3dControls(); // Call this when using MFC in a shared DLL -#else - Enable3dControlsStatic(); // Call this when linking to MFC statically -#endif - CData_mirrorDlg dlg; m_pMainWnd = &dlg; - int nResponse = dlg.DoModal(); + INT_PTR nResponse = dlg.DoModal(); if (nResponse == IDOK) { // TODO: Place code here to handle when the dialog is @@ -241,11 +235,11 @@ bool RegisterDirectoryAppCommand (const char *appName, const char *command, cons if (RegCreateKey (hKey, tmp, &hKey) == ERROR_SUCCESS) { // Set the description - RegSetValue (hKey, "", REG_SZ, command, strlen (command)); + RegSetValue (hKey, "", REG_SZ, command, (DWORD)strlen (command)); if (RegCreateKey (hKey, "command", &hKey) == ERROR_SUCCESS) { // Set the description - RegSetValue (hKey, "", REG_SZ, app, strlen (app)); + RegSetValue (hKey, "", REG_SZ, app, (DWORD)strlen (app)); return true; } } diff --git a/code/nel/tools/misc/data_mirror/data_mirrorDlg.cpp b/code/nel/tools/misc/data_mirror/data_mirrorDlg.cpp index e614be89e..d46f6865c 100644 --- a/code/nel/tools/misc/data_mirror/data_mirrorDlg.cpp +++ b/code/nel/tools/misc/data_mirror/data_mirrorDlg.cpp @@ -432,7 +432,7 @@ void CData_mirrorDlg::OnOK() progress.ShowWindow (SW_SHOW); progress.progress (0); - const uint totalCount = FilesToUpdate[Modified].size () + FilesToUpdate[Added].size () + FilesToUpdate[Removed].size (); + uint totalCount = (uint)FilesToUpdate[Modified].size () + (uint)FilesToUpdate[Added].size () + (uint)FilesToUpdate[Removed].size (); uint currentFile = 0; // System time @@ -443,7 +443,7 @@ void CData_mirrorDlg::OnOK() // Update files std::vector &modifiedList = FilesToUpdate[Modified]; - uint count = modifiedList.size (); + uint count = (uint)modifiedList.size (); uint i; for (i=0; i &addedList = FilesToUpdate[Added]; - count = addedList.size (); + count = (uint)addedList.size (); for (i=0; i &removedList = FilesToUpdate[Removed]; - count = removedList.size (); + count = (uint)removedList.size (); for (i=0; i fileSource; CPath::getPathContent (MainDirectory+CurrentDir, true, false, true, fileSource); uint i; - const uint count = fileSource.size (); + uint count = (uint)fileSource.size (); for (i=0; i &fileArray, set &filen // if we're pointing at a string the first 4 bytes ar the string length uint len=*(uint *)(arrayPointer+i); - // if the stringlength could be valid + // if the stringlength could be valid if (len>0 && len+i<=size) - { + { uint k; for (k=j; k alternateExtensions; alternateExtensions.insert (map::value_type (".tga", ".dds")); - + // String array set inputFiles; - + // String array set usedFiles; - + // String array map availableFiles; diff --git a/code/nel/tools/misc/log_analyser_plug_ins/extract_warnings/extract_warnings.cpp b/code/nel/tools/misc/log_analyser_plug_ins/extract_warnings/extract_warnings.cpp index 11864cb79..50f3d875c 100644 --- a/code/nel/tools/misc/log_analyser_plug_ins/extract_warnings/extract_warnings.cpp +++ b/code/nel/tools/misc/log_analyser_plug_ins/extract_warnings/extract_warnings.cpp @@ -25,15 +25,13 @@ // be enabled in the DLL, and vice versa. // -#include "stdafx.h" - #define LOG_ANALYSER_PLUGIN_EXPORTS #include "extract_warnings.h" #include #include using namespace std; -#include +#include "nel/misc/mem_displayer.h" #include "nel/misc/app_context.h" // Using directly the log report class from nelns diff --git a/code/nel/tools/misc/log_analyser_plug_ins/extract_warnings/extract_warnings.h b/code/nel/tools/misc/log_analyser_plug_ins/extract_warnings/extract_warnings.h index 1f6e86078..c6e96839d 100644 --- a/code/nel/tools/misc/log_analyser_plug_ins/extract_warnings/extract_warnings.h +++ b/code/nel/tools/misc/log_analyser_plug_ins/extract_warnings/extract_warnings.h @@ -18,7 +18,7 @@ #ifndef EXTRACT_WARNINGS_H #define EXTRACT_WARNINGS_H -#include +#include "nel/misc/types_nl.h" #include #include diff --git a/code/nel/tools/misc/message_box/message_box.cpp b/code/nel/tools/misc/message_box/message_box.cpp index 9d09b0268..17b71eaa0 100644 --- a/code/nel/tools/misc/message_box/message_box.cpp +++ b/code/nel/tools/misc/message_box/message_box.cpp @@ -14,7 +14,7 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -#include "stdafx.h" +#include #include #include diff --git a/code/nel/tools/misc/multi_cd_setup_fix/multi_cd_setup_fix.cpp b/code/nel/tools/misc/multi_cd_setup_fix/multi_cd_setup_fix.cpp index 3ee165eda..3b685d6a2 100644 --- a/code/nel/tools/misc/multi_cd_setup_fix/multi_cd_setup_fix.cpp +++ b/code/nel/tools/misc/multi_cd_setup_fix/multi_cd_setup_fix.cpp @@ -14,7 +14,8 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -#include "stdafx.h" +#include +#include #include "resource.h" INT_PTR CALLBACK MyDialogProc( @@ -105,7 +106,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, RegCreateKey (HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Runonce", &hKey); char batFileReg[1024]; sprintf (batFileReg, "\"%s\"", batFile); - RegSetValueEx(hKey, "RyzomSetupClean", 0, REG_SZ, (const unsigned char*)batFileReg, strlen (batFileReg)+1); + RegSetValueEx(hKey, "RyzomSetupClean", 0, REG_SZ, (const unsigned char*)batFileReg, (DWORD)strlen (batFileReg)+1); pump (); // Get the current path diff --git a/code/nel/tools/misc/words_dic/DicSplashScreen.cpp b/code/nel/tools/misc/words_dic/DicSplashScreen.cpp index 3e472a0f1..c98c6bf1b 100644 --- a/code/nel/tools/misc/words_dic/DicSplashScreen.cpp +++ b/code/nel/tools/misc/words_dic/DicSplashScreen.cpp @@ -14,7 +14,7 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -#include "stdafx.h" +#include "StdAfx.h" #include "words_dic.h" #include "DicSplashScreen.h" diff --git a/code/nel/tools/misc/words_dic/StdAfx.cpp b/code/nel/tools/misc/words_dic/StdAfx.cpp index fde90cc1b..9a3495fca 100644 --- a/code/nel/tools/misc/words_dic/StdAfx.cpp +++ b/code/nel/tools/misc/words_dic/StdAfx.cpp @@ -14,7 +14,7 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -#include "stdafx.h" +#include "StdAfx.h" diff --git a/code/nel/tools/misc/words_dic/words_dic.cpp b/code/nel/tools/misc/words_dic/words_dic.cpp index c2a1026fb..aec773cf9 100644 --- a/code/nel/tools/misc/words_dic/words_dic.cpp +++ b/code/nel/tools/misc/words_dic/words_dic.cpp @@ -14,7 +14,7 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -#include "stdafx.h" +#include "StdAfx.h" #include "words_dic.h" #include "words_dicDlg.h" #include "nel/misc/app_context.h" @@ -61,15 +61,10 @@ BOOL CWords_dicApp::InitInstance() // the specific initialization routines you do not need. NLMISC::CApplicationContext myApplicationContext; -#ifdef _AFXDLL - Enable3dControls(); // Call this when using MFC in a shared DLL -#else - Enable3dControlsStatic(); // Call this when linking to MFC statically -#endif CWords_dicDlg dlg; m_pMainWnd = &dlg; - int nResponse = dlg.DoModal(); + INT_PTR nResponse = dlg.DoModal(); if (nResponse == IDOK) { // TODO: Place code here to handle when the dialog is diff --git a/code/nel/tools/misc/words_dic/words_dic.h b/code/nel/tools/misc/words_dic/words_dic.h index 91004ad64..a00813324 100644 --- a/code/nel/tools/misc/words_dic/words_dic.h +++ b/code/nel/tools/misc/words_dic/words_dic.h @@ -22,7 +22,7 @@ #endif // _MSC_VER > 1000 #ifndef __AFXWIN_H__ - #error include 'stdafx.h' before including this file for PCH + #error include 'StdAfx.h' before including this file for PCH #endif #include "resource.h" // main symbols diff --git a/code/nel/tools/misc/words_dic/words_dicDlg.cpp b/code/nel/tools/misc/words_dic/words_dicDlg.cpp index 4c413171c..f900d3d8b 100644 --- a/code/nel/tools/misc/words_dic/words_dicDlg.cpp +++ b/code/nel/tools/misc/words_dic/words_dicDlg.cpp @@ -14,7 +14,7 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -#include "stdafx.h" +#include "StdAfx.h" #include "words_dic.h" #include "words_dicDlg.h" #include "DicSplashScreen.h" @@ -25,7 +25,7 @@ static char THIS_FILE[] = __FILE__; #endif -#include +#include "nel/misc/words_dictionary.h" using namespace std; using namespace NLMISC; diff --git a/code/ryzom/client/src/interface_v3/chat_window.cpp b/code/ryzom/client/src/interface_v3/chat_window.cpp index 2affd9afe..8895b09fe 100644 --- a/code/ryzom/client/src/interface_v3/chat_window.cpp +++ b/code/ryzom/client/src/interface_v3/chat_window.cpp @@ -626,7 +626,6 @@ void CChatGroupWindow::displayTellMessage(const ucstring &msg, NLMISC::CRGBA col gcChat->requireAttention(); CInterfaceManager::getInstance()->setTopWindow(gcChat); - // add the text to this window CGroupList *gl = dynamic_cast(gcChat->getGroup("text_list")); @@ -1253,7 +1252,7 @@ public: if ( NLMISC::ICommand::exists( cmd ) ) { NLMISC::ICommand::execute( cmdWithArgs, g_log ); - } + } else { CInterfaceManager *im = CInterfaceManager::getInstance(); diff --git a/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_trade.cpp b/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_trade.cpp index 8fd33da9d..f519f07ef 100644 --- a/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_trade.cpp +++ b/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_trade.cpp @@ -640,7 +640,7 @@ bool CDBGroupListSheetTrade::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup prop= (char*) xmlGetProp( cur, (xmlChar*)"filter_seller_type" ); if(prop) { - string lwrFilter= toLower((const char *)prop); + string lwrFilter= toLower(std::string((const char *)prop)); if(lwrFilter=="npc") _SellerTypeFilter= NPC; else if(lwrFilter=="resale") diff --git a/code/ryzom/client/src/interface_v3/group_html.h b/code/ryzom/client/src/interface_v3/group_html.h index 5a71bad1b..daf0792e9 100644 --- a/code/ryzom/client/src/interface_v3/group_html.h +++ b/code/ryzom/client/src/interface_v3/group_html.h @@ -52,7 +52,7 @@ class CGroupHTML : public CGroupScrollText { public: friend void TextAdd (struct _HText *me, const char * buf, int len); - friend void TextBeginElement (_HText *me, int element_number, const BOOL *present, const char ** value); + friend void TextBeginElement (_HText *me, int element_number, const BOOL *present, const char ** value); friend void TextEndElement (_HText *me, int element_number); friend void TextLink (struct _HText *me, int element_number, int attribute_number, struct _HTChildAnchor *anchor, const BOOL *present, const char **value); friend void TextBuild (HText * me, HTextStatus status); diff --git a/code/ryzom/client/src/net_manager.cpp b/code/ryzom/client/src/net_manager.cpp index de9c011d8..a13b9feab 100644 --- a/code/ryzom/client/src/net_manager.cpp +++ b/code/ryzom/client/src/net_manager.cpp @@ -790,7 +790,7 @@ void CInterfaceChatDisplayer::displayChat(TDataSetIndex compressedSenderIndex, c } finalString = ""; } - else + else { PeopleInterraction.ChatInput.AroundMe.displayMessage(finalString, col, 2, &windowVisible); } @@ -1129,7 +1129,7 @@ static void setupBotChatBotGift(CInterfaceGroup *botChatGroup) //----------------------------------------------- // impulseBotChatSetInterface : //----------------------------------------------- -/* +#if 0 void impulseBotChatSetInterface(NLMISC::CBitMemStream &impulse) { // received ADD_DYN_STR @@ -1174,10 +1174,10 @@ void impulseBotChatSetInterface(NLMISC::CBitMemStream &impulse) inter2->NetworkTextId.Args.push_back(20); inter2->NetworkTextId.Args.push_back(1); inter2->NetworkTextId.Args.push_back(2); -*/ /*} +*/ } // FOR THE DEMO, find and set a fake news: -/* setFakeNews (); +// setFakeNews (); string interfaceName = getInterfaceNameFromId (botType, interfaceId); @@ -1206,7 +1206,8 @@ void impulseBotChatSetInterface(NLMISC::CBitMemStream &impulse) } } } -}*/ +} +#endif @@ -1824,7 +1825,7 @@ void impulseTeamContactRemove(NLMISC::CBitMemStream &impulse) } CGuildManager::getInstance()->init(AllMembers); -}/* +}*/ //----------------------------------------------- @@ -3186,7 +3187,7 @@ private: } contentStr = ucstring("http://atys.ryzom.com/start/")+web_app+ucstring(".php?")+contentStr.substr(i+1); nlinfo("contentStr = %s", contentStr.toString().c_str()); - } + } else if(contentStr.size()>=5 && contentStr[0]=='@' && contentStr[1]=='{' && contentStr[2]=='W') { uint i; @@ -3604,7 +3605,7 @@ void initializeNetwork() GenericMsgHeaderMngr.setCallback( "NPC_ICON:SET_DESC", impulseSetNpcIconDesc ); GenericMsgHeaderMngr.setCallback( "NPC_ICON:SVR_EVENT_MIS_AVL", impulseServerEventForMissionAvailability ); - GenericMsgHeaderMngr.setCallback( "NPC_ICON:SET_TIMER", impulseSetNpcIconTimer ); + GenericMsgHeaderMngr.setCallback( "NPC_ICON:SET_TIMER", impulseSetNpcIconTimer ); } diff --git a/code/ryzom/server/src/entities_game_service/guild_manager/guild_manager.cpp b/code/ryzom/server/src/entities_game_service/guild_manager/guild_manager.cpp index 08ac024d5..cd3189c23 100644 --- a/code/ryzom/server/src/entities_game_service/guild_manager/guild_manager.cpp +++ b/code/ryzom/server/src/entities_game_service/guild_manager/guild_manager.cpp @@ -167,7 +167,7 @@ void CGuildManager::release() #ifndef USE_PDS if(_Instance->_Container) { - + for ( map::iterator it = _Instance->_Container->getGuildsBegin(); it != _Instance->_Container->getGuildsEnd();++it ) { CGuild * guild = EGS_PD_CAST( (*it).second ); @@ -175,7 +175,7 @@ void CGuildManager::release() _Instance->saveGuild(guild); } } -#endif +#endif delete _Instance; _Instance = NULL; } @@ -311,7 +311,7 @@ void CGuildManager::saveGuild( CGuild* guild ) EGS_PD_AST( guild ); if (guild->isProxy()) return; - + uint32 id = guild->getId(); { H_AUTO( CGuildManagerSaveGUILD_FAME ) @@ -333,7 +333,7 @@ void CGuildManager::saveGuild( CGuild* guild ) } else { - + string fileName = NLMISC::toString("guilds/guild_%05u.bin", id & 0x000fffff); if( UseBS ) { @@ -429,7 +429,7 @@ CGuild *CGuildManager::createGuildProxy(uint32 guildId, const ucstring & guildNa EGSPD::CGuildFameContainerPD * fameCont = EGSPD::CGuildFameContainerPD::create(CEntityId(RYZOMID::guild,guildId)); EGS_PD_AST(fameCont); - guild->setFameContainer( fameCont ); + guild->setFameContainer( fameCont ); /// register guild in other system guild->registerGuild(); @@ -449,7 +449,7 @@ CGuild *CGuildManager::createGuildProxy(uint32 guildId, const ucstring & guildNa // { // guild->setRolemastersValid( (EGSPD::CSPType::TSPType)i, false ); // } - + // init the guild strings guild->setName(guildName); guild->setDescription(description); @@ -485,7 +485,7 @@ void CGuildManager::dumpGuilds( bool onlyLocal, NLMISC::CLog & log )const count++; const ucstring & name = guild->getName(); log.displayNL(" id = %s %s %s, name = '%s', %u members", - guildIdToString(it->first).c_str(), + guildIdToString(it->first).c_str(), (it->first)>>20 == IService::getInstance()->getShardId() ? "(Local)" : "(Foreign)", guild->getEId().toString().c_str(), name.toString().c_str(), @@ -568,7 +568,7 @@ CGuild * CGuildManager::getGuildFromId( EGSPD::TGuildId id ) // std::pair< std::map::iterator, std::map::iterator > thePair = _GuildsAwaitingString.equal_range( str ); // if ( thePair.first == thePair.second ) // return false; -// +// // for ( std::map::iterator it = thePair.first; it != thePair.second;++it ) // { // TGuildId guildId = it->second; @@ -586,7 +586,7 @@ bool CGuildManager::checkGuildMemberShip( const EGSPD::TCharacterId & userId, co // if we have no container, it means that the shard is not initialized yet and that players are loaded for check purpose if ( !_Container ) return true; - + EGSPD::CGuildPD * guild = _Container->getGuilds( guildId ); if ( ! guild ) return false; @@ -732,7 +732,7 @@ void CGuildManager::createGuild(CGuildCharProxy & proxy,const ucstring & guildNa uint32 guildId = getFreeGuildId(); // boris 2006 : validate the name with the Shard unifier and store guild creation info when SU returns - // store the creation data + // store the creation data TPendingGuildCreate pgc; pgc.CreatorChar = proxy.getId(); pgc.GuildName = guildName; @@ -753,7 +753,7 @@ void CGuildManager::createGuildStep2(uint32 guildId, const ucstring &guildName, BOMB_IF(it == _PendingGuildCreates.end(), "CGuildManager::createGuildStep2 : can't find guild "<second; _PendingGuildCreates.erase(it); - + if (result != CHARSYNC::TCharacterNameResult::cnr_ok) { // no valid name @@ -789,7 +789,7 @@ void CGuildManager::createGuildStep2(uint32 guildId, const ucstring &guildName, proxy.sendSystemMessage( "GUILD_CREATED" ); proxy.spendMoney( GuildCreationCost.get() ); - + // create the guild through PDS CGuild * guild = EGS_PD_CAST( EGSPD::CGuildPD::create(guildId) ); EGS_PD_AST( guild ); @@ -799,7 +799,7 @@ void CGuildManager::createGuildStep2(uint32 guildId, const ucstring &guildName, EGSPD::CGuildFameContainerPD * fameCont = EGSPD::CGuildFameContainerPD::create(CEntityId(RYZOMID::guild,guildId)); EGS_PD_AST(fameCont); - guild->setFameContainer( fameCont ); + guild->setFameContainer( fameCont ); /// register guild in other system guild->registerGuild(); @@ -807,7 +807,7 @@ void CGuildManager::createGuildStep2(uint32 guildId, const ucstring &guildName, // inform the SU that a new guild now exist (to update the ring database). if (IShardUnifierEvent::getInstance()) IShardUnifierEvent::getInstance()->addGuild(guildId, guildName); - + // set initial guild fames guild->setStartFameAndAllegiance( proxy.getId() ); @@ -823,7 +823,7 @@ void CGuildManager::createGuildStep2(uint32 guildId, const ucstring &guildName, // { // guild->setRolemastersValid( (EGSPD::CSPType::TSPType)i, false ); // } - + // init the guild strings guild->setName(guildName); guild->setDescription(pgc.Description); @@ -834,7 +834,6 @@ void CGuildManager::createGuildStep2(uint32 guildId, const ucstring &guildName, // EGSPD::PDSLib.getStringManager().addString( stringEId, guildName ); // stringEId.setType( RYZOMID::guildDescription ); // EGSPD::PDSLib.getStringManager().addString( stringEId, pgc.Description ); - // create a new guild member CGuildMember * memberCore = guild->newMember( proxy.getId() ); @@ -844,21 +843,21 @@ void CGuildManager::createGuildStep2(uint32 guildId, const ucstring &guildName, memberCore->setEnterTime( CTickEventHandler::getGameCycle() ); STOP_IF(!guild->setMemberGrade(memberCore, EGSPD::CGuildGrade::Leader), "Failed to set grade to leader for new guild"<getId().toString()); // memberCore->setMemberGrade( EGSPD::CGuildGrade::Leader ); - + // create the leader module to init properties // CGuildLeaderModule * leader = new CGuildLeaderModule( proxy, memberCore ); // guild->setMemberOnline( memberCore, proxy.getId().getDynamicId() ); // broadcast the new guild info IGuildUnifier::getInstance()->guildCreated(guild); - + // close guild creation interface PlayerManager.sendImpulseToClient( proxy.getId(),"GUILD:ABORT_CREATION" ); - + /// end current bot chat proxy.endBotChat(); proxy.updateTarget(); - _ExistingGuildNames.insert( NLMISC::toLower( guild->getName().toString().c_str() ) ); + _ExistingGuildNames.insert( NLMISC::toLower( guild->getName().toString() ) ); // ask the client to open it's guild interface PlayerManager.sendImpulseToClient( proxy.getId(),"GUILD:OPEN_GUILD_WINDOW" ); @@ -901,11 +900,11 @@ void CGuildManager::deleteGuild(uint32 id) if (!guild->isProxy()) { CMailForumValidator::removeGuild(name); - + CStatDB::getInstance()->removeGuild(id); } - _ExistingGuildNames.erase( NLMISC::toLower( guild->getName().toString().c_str() ) ); + _ExistingGuildNames.erase( NLMISC::toLower( guild->getName().toString() ) ); guild->unregisterGuild(); if (!guild->isProxy()) @@ -936,7 +935,7 @@ void CGuildManager::deleteGuild(uint32 id) // } // else // _FreeGuildIds.insert(id); - + } //---------------------------------------------------------------------------- @@ -956,25 +955,25 @@ void CGuildManager::characterDeleted( CCharacter & user ) nlwarning("invalid guild id %s", guildIdToString(user.getGuildId()).c_str() ); return; } - + if (guild->isProxy()) { // for proxyfied guild, we wait the action of the origin shard return; } - + CGuildMember* userMember = EGS_PD_CAST( guild->getMembers( user.getId() ) ); if ( !userMember ) { nlwarning("'%s' is not in guild %s", user.getId().toString().c_str(), guildIdToString(user.getGuildId()).c_str() ); return; } - + if ( userMember->getGrade() == EGSPD::CGuildGrade::Leader ) { // the leader quits : find a successor CGuildMember * successor = NULL; - // best successor is the member with best grade. If more than 1 user fits, take the older in the guild + // best successor is the member with best grade. If more than 1 user fits, take the older in the guild for (map::iterator it = guild->getMembersBegin(); it != guild->getMembersEnd(); ++it ) @@ -992,7 +991,7 @@ void CGuildManager::characterDeleted( CCharacter & user ) successor = member; } } - + // if the guild is still valid, set the successor as leader if ( successor ) @@ -1000,13 +999,13 @@ void CGuildManager::characterDeleted( CCharacter & user ) guild->decGradeCount( successor->getGrade() ); guild->incGradeCount( EGSPD::CGuildGrade::Leader ); successor->setMemberGrade( EGSPD::CGuildGrade::Leader ); - + // tell guild SM_STATIC_PARAMS_1( params,STRING_MANAGER::player ); params[0].setEIdAIAlias( successor->getIngameEId(), CAIAliasTranslator::getInstance()->getAIAlias(successor->getIngameEId()) ); - + guild->sendMessageToGuildMembers("GUILD_NEW_LEADER",params ); - + // If the player is online, the module must be recreated. Do as the reference was destroyed CGuildMemberModule * successorModule = NULL; if ( successor->getReferencingModule(successorModule) ) @@ -1025,7 +1024,7 @@ void CGuildManager::characterDeleted( CCharacter & user ) guild->incGradeCount( EGSPD::CGuildGrade::Member ); guild->decGradeCount( EGSPD::CGuildGrade::Leader ); } - + guild->deleteMember( userMember ); if ( guild->getMembersBegin() == guild->getMembersEnd() ) { @@ -1156,7 +1155,7 @@ void CGuildManager::callback(const CFileDescription& fileDescription, NLMISC::IS static CPersistentDataRecord pdr; pdr.clear(); pdr.fromBuffer(dataStream); - + guild = EGS_PD_CAST( EGSPD::CGuildPD::create(guildId) ); EGS_PD_AST(guild); // store it as loast loaded guild @@ -1245,7 +1244,7 @@ void CGuildManager::callback(const CFileDescription& fileDescription, NLMISC::IS // nlinfo("Loading outposts from save files..."); // COutpostManager::getInstance().loadOutpostSaveFiles(); // -// // Send the guild list to SU to synchronize the ring database and name manager +// // Send the guild list to SU to synchronize the ring database and name manager // // (and eventualy rename some conflicting guilds) // { // std::vector guildInfos; @@ -1287,7 +1286,7 @@ void CGuildManager::callback(const CFileDescription& fileDescription, NLMISC::IS // gi.setGuildName(guild->getName()); // // guildInfos.push_back(gi); -// +// // IShardUnifierEvent::getInstance()->registerLoadedGuildNames(guildInfos); // } // @@ -1305,7 +1304,7 @@ void CGuildManager::loadGuilds() return; IService::getInstance()->setCurrentStatus("Loading Guilds"); - + // create the container if it was not loaded if ( _Container == NULL ) _Container = EGSPD::CGuildContainerPD::create( 1 ); @@ -1366,7 +1365,7 @@ void CGuildManager::loadGuilds() nlinfo("Loading outposts from save files..."); COutpostManager::getInstance().loadOutpostSaveFiles(); - // Send the guild list to SU to synchronize the ring database and name manager + // Send the guild list to SU to synchronize the ring database and name manager // (and eventualy rename some conflicting guilds) if (DontUseSU.get() == 0) { @@ -1424,8 +1423,8 @@ void CGuildManager::registerGuildAfterLoading(CGuild *guildToRegister) // const ucstring & str = guildToRegister->getDescription(); // _GuildsAwaitingString.insert( make_pair( str, guildToRegister->getId() ) ); // } - - _ExistingGuildNames.insert( NLMISC::toLower( guildToRegister->getName().toString().c_str() ) ); + + _ExistingGuildNames.insert( NLMISC::toLower( guildToRegister->getName().toString() ) ); } } @@ -1447,7 +1446,7 @@ void CGuildManager::checkMemberConsistency(CGuild *guildToCheck) first->first.toString().c_str(), gid, guildToCheck->getId()); - + memberToRemove.insert(first->first); } else @@ -1469,9 +1468,9 @@ void CGuildManager::checkMemberConsistency(CGuild *guildToCheck) //---------------------------------------------------------------------------- bool CGuildManager::checkGuildStrings(CGuildCharProxy & proxy,const ucstring & name, const ucstring & description) { - if( name.empty() ) + if( name.empty() ) return false; - + // check if name already exists in the player list if ( NLMISC::CEntityIdTranslator::getInstance()->entityNameExists( name ) ) { @@ -1508,7 +1507,7 @@ bool CGuildManager::checkGuildStrings(CGuildCharProxy & proxy,const ucstring & n { proxy.sendSystemMessage("GUILD_NAME_BAD_CHAR"); return false; - } + } prevBlank = true; } else @@ -1668,7 +1667,7 @@ restartMemberLoop: // A character connect/disconnect on another shard, update the online tags void CGuildManager::characterConnectionEvent(const NLMISC::CEntityId &eid, bool online) { - + // iterate over all guild, for each look the member list and update online state if it is the concerned character if (_Container == NULL) @@ -1830,7 +1829,7 @@ NLMISC_CLASS_COMMAND_IMPL(CGuildManager, unloadGuild) // force a save of the guild saveGuild(guild); - // a little fake : we make the guild 'foreign' to skip deletion of the file + // a little fake : we make the guild 'foreign' to skip deletion of the file guild->setProxy(true); // remove all but the last members @@ -1930,7 +1929,7 @@ NLMISC_CLASS_COMMAND_IMPL(CGuildManager, addGuildMember) // return false; // // TGuildId guildId = atoi(args[0].c_str()); -// +// // CGuild *guild = getGuildFromId(guildId); // if (guild == NULL) // { diff --git a/code/ryzom/server/src/server_share/bmp4image.h b/code/ryzom/server/src/server_share/bmp4image.h index 30133abf3..0f13ffe04 100644 --- a/code/ryzom/server/src/server_share/bmp4image.h +++ b/code/ryzom/server/src/server_share/bmp4image.h @@ -43,7 +43,7 @@ public: for (int j=0;j