From 5255c236c3b5f0f66e4c0577e3bc6327580f69ac Mon Sep 17 00:00:00 2001 From: Arthur Ice Date: Wed, 22 May 2013 23:01:43 -0700 Subject: [PATCH] added std:: to a lot of locations which where missed and added NOMINMAX to cmakelist --- common/CMakeLists.txt | 3 ++ common/EQStream.cpp | 1 - common/ProcLauncher.cpp | 4 +- eqlaunch/CMakeLists.txt | 2 +- loginserver/CMakeLists.txt | 1 + loginserver/Encryption.cpp | 3 +- queryserv/CMakeLists.txt | 2 +- shared_memory/CMakeLists.txt | 1 + tests/CMakeLists.txt | 1 + ucs/CMakeLists.txt | 2 +- utils/CMakeLists.txt | 5 +++ world/CMakeLists.txt | 2 +- zone/CMakeLists.txt | 1 + zone/bot.cpp | 74 ++++++++++++++++++------------------ zone/botspellsai.cpp | 8 ++-- zone/client.h | 15 +++++--- zone/entity.h | 2 +- 17 files changed, 71 insertions(+), 56 deletions(-) diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index 9d97b1eca..cc518ee1a 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -315,6 +315,9 @@ INCLUDE_DIRECTORIES(Patches SocketLib StackWalker TinyXML) ADD_LIBRARY(Common ${common_sources} ${common_headers}) +IF(MSVC) + ADD_DEFINITIONS(-DNOMINMAX) +ENDIF(MSVC) IF(UNIX) ADD_DEFINITIONS(-fPIC) diff --git a/common/EQStream.cpp b/common/EQStream.cpp index 1aaf39527..2127fc31e 100644 --- a/common/EQStream.cpp +++ b/common/EQStream.cpp @@ -20,7 +20,6 @@ #include #include #include -#include #include #ifdef _WINDOWS #include diff --git a/common/ProcLauncher.cpp b/common/ProcLauncher.cpp index d2db2f6d4..b4b95bb91 100644 --- a/common/ProcLauncher.cpp +++ b/common/ProcLauncher.cpp @@ -165,8 +165,8 @@ ProcLauncher::ProcRef ProcLauncher::Launch(Spec *&to_launch) { // Create the child process. //glue together all the nice command line arguments - string args(it->program); - vector::iterator cur, end; + std::string args(it->program); + std::vector::iterator cur, end; cur = it->args.begin(); end = it->args.end(); for(; cur != end; cur++) { diff --git a/eqlaunch/CMakeLists.txt b/eqlaunch/CMakeLists.txt index 6097279d2..843c66499 100644 --- a/eqlaunch/CMakeLists.txt +++ b/eqlaunch/CMakeLists.txt @@ -16,7 +16,7 @@ ADD_EXECUTABLE(eqlaunch ${eqlaunch_sources} ${eqlaunch_headers}) TARGET_LINK_LIBRARIES(eqlaunch Common debug ${MySQL_LIBRARY_DEBUG} optimized ${MySQL_LIBRARY_RELEASE} ${ZLIB_LIBRARY}) IF(MSVC) - + ADD_DEFINITIONS(-DNOMINMAX) SET_TARGET_PROPERTIES(eqlaunch PROPERTIES LINK_FLAGS_RELEASE "/OPT:REF /OPT:ICF") TARGET_LINK_LIBRARIES(eqlaunch "Ws2_32.lib") ENDIF(MSVC) diff --git a/loginserver/CMakeLists.txt b/loginserver/CMakeLists.txt index fd13b8041..abc271522 100644 --- a/loginserver/CMakeLists.txt +++ b/loginserver/CMakeLists.txt @@ -13,6 +13,7 @@ SET(eqlogin_sources ) IF(MSVC OR MINGW) + ADD_DEFINITIONS(-DNOMINMAX) SET(eqlogin_sources ${eqlogin_sources} Encryption.cpp) ENDIF(MSVC OR MINGW) diff --git a/loginserver/Encryption.cpp b/loginserver/Encryption.cpp index 129ab18e3..bd947593b 100644 --- a/loginserver/Encryption.cpp +++ b/loginserver/Encryption.cpp @@ -18,10 +18,11 @@ #include "../common/debug.h" #include "Encryption.h" #include "ErrorLog.h" +#include extern ErrorLog *server_log; -bool Encryption::LoadCrypto(string name) +bool Encryption::LoadCrypto(std::string name) { if(!Load(name.c_str())) { diff --git a/queryserv/CMakeLists.txt b/queryserv/CMakeLists.txt index dca29b2cf..f22116a4b 100644 --- a/queryserv/CMakeLists.txt +++ b/queryserv/CMakeLists.txt @@ -22,7 +22,7 @@ ADD_DEFINITIONS(-DQSERV) TARGET_LINK_LIBRARIES(queryserv Common debug ${MySQL_LIBRARY_DEBUG} optimized ${MySQL_LIBRARY_RELEASE} ${ZLIB_LIBRARY}) IF(MSVC) - + ADD_DEFINITIONS(-DNOMINMAX) SET_TARGET_PROPERTIES(queryserv PROPERTIES LINK_FLAGS_RELEASE "/OPT:REF /OPT:ICF") TARGET_LINK_LIBRARIES(queryserv "Ws2_32.lib") ENDIF(MSVC) diff --git a/shared_memory/CMakeLists.txt b/shared_memory/CMakeLists.txt index 2c665443c..ff55dcab9 100644 --- a/shared_memory/CMakeLists.txt +++ b/shared_memory/CMakeLists.txt @@ -22,6 +22,7 @@ ADD_EXECUTABLE(shared_memory ${shared_memory_sources} ${shared_memory_headers}) TARGET_LINK_LIBRARIES(shared_memory Common debug ${MySQL_LIBRARY_DEBUG} optimized ${MySQL_LIBRARY_RELEASE} ${ZLIB_LIBRARY}) IF(MSVC) + ADD_DEFINITIONS(-DNOMINMAX) SET_TARGET_PROPERTIES(shared_memory PROPERTIES LINK_FLAGS_RELEASE "/OPT:REF /OPT:ICF") TARGET_LINK_LIBRARIES(shared_memory "Ws2_32.lib") ENDIF(MSVC) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 649285b8b..ae3a247ae 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -18,6 +18,7 @@ ADD_EXECUTABLE(tests ${tests_sources} ${tests_headers}) TARGET_LINK_LIBRARIES(tests Common cppunit) IF(MSVC) + ADD_DEFINITIONS(-DNOMINMAX) SET_TARGET_PROPERTIES(tests PROPERTIES LINK_FLAGS_RELEASE "/OPT:REF /OPT:ICF") TARGET_LINK_LIBRARIES(tests "Ws2_32.lib") ENDIF(MSVC) diff --git a/ucs/CMakeLists.txt b/ucs/CMakeLists.txt index 30af23655..cc2e9eee5 100644 --- a/ucs/CMakeLists.txt +++ b/ucs/CMakeLists.txt @@ -24,7 +24,7 @@ ADD_DEFINITIONS(-DUCS) TARGET_LINK_LIBRARIES(ucs Common debug ${MySQL_LIBRARY_DEBUG} optimized ${MySQL_LIBRARY_RELEASE} ${ZLIB_LIBRARY}) IF(MSVC) - + ADD_DEFINITIONS(-DNOMINMAX) SET_TARGET_PROPERTIES(ucs PROPERTIES LINK_FLAGS_RELEASE "/OPT:REF /OPT:ICF") TARGET_LINK_LIBRARIES(ucs "Ws2_32.lib") ENDIF(MSVC) diff --git a/utils/CMakeLists.txt b/utils/CMakeLists.txt index 4aec544ee..0eebb44fb 100644 --- a/utils/CMakeLists.txt +++ b/utils/CMakeLists.txt @@ -4,4 +4,9 @@ IF(UNIX) ADD_DEFINITIONS(-fPIC) ENDIF(UNIX) +IF(MSVC) + ADD_DEFINITIONS(-DNOMINMAX) +ENDIF(MSVC) + + ADD_SUBDIRECTORY(azone2) diff --git a/world/CMakeLists.txt b/world/CMakeLists.txt index 1586ca49c..db1aba474 100644 --- a/world/CMakeLists.txt +++ b/world/CMakeLists.txt @@ -70,7 +70,7 @@ ADD_DEFINITIONS(-DWORLD) TARGET_LINK_LIBRARIES(world Common ${PERL_LIBRARY} debug ${MySQL_LIBRARY_DEBUG} optimized ${MySQL_LIBRARY_RELEASE} ${ZLIB_LIBRARY}) IF(MSVC) - + ADD_DEFINITIONS(-DNOMINMAX) SET_TARGET_PROPERTIES(world PROPERTIES LINK_FLAGS_RELEASE "/OPT:REF /OPT:ICF") TARGET_LINK_LIBRARIES(world "Ws2_32.lib") ENDIF(MSVC) diff --git a/zone/CMakeLists.txt b/zone/CMakeLists.txt index 2e459e33e..c70246fc6 100644 --- a/zone/CMakeLists.txt +++ b/zone/CMakeLists.txt @@ -159,6 +159,7 @@ ADD_DEFINITIONS(-DZONE) TARGET_LINK_LIBRARIES(zone Common ${PERL_LIBRARY} debug ${MySQL_LIBRARY_DEBUG} optimized ${MySQL_LIBRARY_RELEASE} ${ZLIB_LIBRARY}) IF(MSVC) + ADD_DEFINITIONS(-DNOMINMAX) SET_TARGET_PROPERTIES(zone PROPERTIES LINK_FLAGS_RELEASE "/OPT:REF /OPT:ICF") TARGET_LINK_LIBRARIES(zone "Ws2_32.lib") ENDIF(MSVC) diff --git a/zone/bot.cpp b/zone/bot.cpp index 2de1796eb..c88ad72b7 100644 --- a/zone/bot.cpp +++ b/zone/bot.cpp @@ -1576,7 +1576,7 @@ void Bot::ApplyAABonuses(uint32 aaid, uint32 slots, StatBonuses* newbon) return; } - for (map::const_iterator iter = aa_effects[aaid].begin(); iter != aa_effects[aaid].end(); ++iter) { + for (std::map::const_iterator iter = aa_effects[aaid].begin(); iter != aa_effects[aaid].end(); ++iter) { effect = iter->second.skill_id; base1 = iter->second.base1; base2 = iter->second.base2; @@ -4779,7 +4779,7 @@ void Bot::LoadAndSpawnAllZonedBots(Client* botOwner) { std::list ActiveBots = Bot::GetGroupedBotsByGroupId(botOwner->GetGroup()->GetID(), &errorMessage); if(errorMessage.empty() && !ActiveBots.empty()) { - for(list::iterator itr = ActiveBots.begin(); itr != ActiveBots.end(); itr++) { + for(std::list::iterator itr = ActiveBots.begin(); itr != ActiveBots.end(); itr++) { Bot* activeBot = Bot::LoadBot(*itr, &errorMessage); if(!errorMessage.empty()) { @@ -6701,7 +6701,7 @@ int16 Bot::CalcBotAAFocus(BotfocusType type, uint32 aa_ID, uint16 spell_id) return 0; } - for (map::const_iterator iter = aa_effects[aa_ID].begin(); iter != aa_effects[aa_ID].end(); ++iter) + for (std::map::const_iterator iter = aa_effects[aa_ID].begin(); iter != aa_effects[aa_ID].end(); ++iter) { effect = iter->second.skill_id; base1 = iter->second.base1; @@ -11136,7 +11136,7 @@ int32 Bot::CalcBaseEndurance() int BonusUpto800 = int( at_most_800 / 4 ) ; if(Stats > 400) { Bonus400to800 = int( (at_most_800 - 400) / 4 ); - HalfBonus400to800 = int( max( ( at_most_800 - 400 ), 0 ) / 8 ); + HalfBonus400to800 = int( std::max( ( at_most_800 - 400 ), 0 ) / 8 ); if(Stats > 800) { Bonus800plus = int( (Stats - 800) / 8 ) * 2; @@ -11598,7 +11598,7 @@ void Bot::ProcessClientZoneChange(Client* botOwner) { if(botOwner) { std::list BotList = entity_list.GetBotsByBotOwnerCharacterID(botOwner->CharacterID()); - for(list::iterator itr = BotList.begin(); itr != BotList.end(); itr++) { + for(std::list::iterator itr = BotList.begin(); itr != BotList.end(); itr++) { Bot* tempBot = *itr; if(tempBot) { @@ -12322,7 +12322,7 @@ void Bot::ProcessBotCommands(Client *c, const Seperator *sep) { if(std::string(sep->arg[2]).compare("all") == 0) listAll = true; else { - string botName = std::string(sep->arg[2]); + std::string botName = std::string(sep->arg[2]); Bot* tempBot = entity_list.GetBotByBotName(botName); @@ -15981,12 +15981,12 @@ void Bot::ProcessBotCommands(Client *c, const Seperator *sep) { Bot* leaderBot = *botListItr; if(leaderBot->GetInHealRotation() && leaderBot->GetHealRotationLeader() == leaderBot) { //start all heal rotations - list rotationMemberList; + std::list rotationMemberList; int index = 0; rotationMemberList = GetBotsInHealRotation(leaderBot); - for(list::iterator rotationMemberItr = rotationMemberList.begin(); rotationMemberItr != rotationMemberList.end(); rotationMemberItr++) { + for(std::list::iterator rotationMemberItr = rotationMemberList.begin(); rotationMemberItr != rotationMemberList.end(); rotationMemberItr++) { Bot* tempBot = *rotationMemberItr; if(tempBot) { @@ -16014,7 +16014,7 @@ void Bot::ProcessBotCommands(Client *c, const Seperator *sep) { } if(leaderBot) { - list botList; + std::list botList; int index = 0; if (leaderBot->GetBotOwner() != c) { c->Message(13, "You must target a bot that you own."); @@ -16023,7 +16023,7 @@ void Bot::ProcessBotCommands(Client *c, const Seperator *sep) { botList = GetBotsInHealRotation(leaderBot); - for(list::iterator botListItr = botList.begin(); botListItr != botList.end(); botListItr++) { + for(std::list::iterator botListItr = botList.begin(); botListItr != botList.end(); botListItr++) { Bot* tempBot = *botListItr; if(tempBot) { @@ -16058,11 +16058,11 @@ void Bot::ProcessBotCommands(Client *c, const Seperator *sep) { Bot* leaderBot = *botListItr; if(leaderBot->GetInHealRotation() && leaderBot->GetHealRotationLeader() == leaderBot) { //start all heal rotations - list rotationMemberList; + std::list rotationMemberList; rotationMemberList = GetBotsInHealRotation(leaderBot); - for(list::iterator rotationMemberItr = rotationMemberList.begin(); rotationMemberItr != rotationMemberList.end(); rotationMemberItr++) { + for(std::list::iterator rotationMemberItr = rotationMemberList.begin(); rotationMemberItr != rotationMemberList.end(); rotationMemberItr++) { Bot* tempBot = *rotationMemberItr; if(tempBot) { @@ -16087,7 +16087,7 @@ void Bot::ProcessBotCommands(Client *c, const Seperator *sep) { } if(leaderBot) { - list botList; + std::list botList; if (leaderBot->GetBotOwner() != c) { c->Message(13, "You must target a bot that you own."); return; @@ -16095,7 +16095,7 @@ void Bot::ProcessBotCommands(Client *c, const Seperator *sep) { botList = GetBotsInHealRotation(leaderBot); - for(list::iterator botListItr = botList.begin(); botListItr != botList.end(); botListItr++) { + for(std::list::iterator botListItr = botList.begin(); botListItr != botList.end(); botListItr++) { Bot* tempBot = *botListItr; if(tempBot && tempBot->GetBotOwnerCharacterID() == c->CharacterID()) { @@ -16146,7 +16146,7 @@ void Bot::ProcessBotCommands(Client *c, const Seperator *sep) { } if(leaderBot) { - list botList; + std::list botList; if (leaderBot->GetBotOwner() != c) { c->Message(13, "You must target a bot that you own."); return; @@ -16158,7 +16158,7 @@ void Bot::ProcessBotCommands(Client *c, const Seperator *sep) { c->Message(0, "Bot Heal Rotation- Leader: %s", leaderBot->GetCleanName()); c->Message(0, "Bot Heal Rotation- Timer: %1.1f", ((float)leaderBot->GetHealRotationTimer()/1000.0f)); - for(list::iterator botListItr = botList.begin(); botListItr != botList.end(); botListItr++) { + for(std::list::iterator botListItr = botList.begin(); botListItr != botList.end(); botListItr++) { Bot* tempBot = *botListItr; if(tempBot && tempBot->GetBotOwnerCharacterID() == c->CharacterID()) { @@ -16208,7 +16208,7 @@ void Bot::ProcessBotCommands(Client *c, const Seperator *sep) { } if(leaderBot) { - list botList; + std::list botList; if (leaderBot->GetBotOwner() != c) { c->Message(13, "You must target a bot that you own."); return; @@ -16216,7 +16216,7 @@ void Bot::ProcessBotCommands(Client *c, const Seperator *sep) { botList = GetBotsInHealRotation(leaderBot); - for(list::iterator botListItr = botList.begin(); botListItr != botList.end(); botListItr++) { + for(std::list::iterator botListItr = botList.begin(); botListItr != botList.end(); botListItr++) { Bot* tempBot = *botListItr; if(tempBot && tempBot->GetBotOwnerCharacterID() == c->CharacterID()) @@ -16248,7 +16248,7 @@ void Bot::ProcessBotCommands(Client *c, const Seperator *sep) { if(leaderBot) { bool fastHeals = false; - list botList; + std::list botList; if (leaderBot->GetBotOwner() != c) { c->Message(13, "You must target a bot that you own."); return; @@ -16264,7 +16264,7 @@ void Bot::ProcessBotCommands(Client *c, const Seperator *sep) { botList = GetBotsInHealRotation(leaderBot); - for(list::iterator botListItr = botList.begin(); botListItr != botList.end(); botListItr++) { + for(std::list::iterator botListItr = botList.begin(); botListItr != botList.end(); botListItr++) { Bot* tempBot = *botListItr; if(tempBot && tempBot->GetBotOwnerCharacterID() == c->CharacterID()) @@ -16548,7 +16548,7 @@ Bot* EntityList::GetBotByBotID(uint32 botID) { Bot* Result = 0; if(botID > 0) { - for(list::iterator botListItr = bot_list.begin(); botListItr != bot_list.end(); botListItr++) { + for(std::list::iterator botListItr = bot_list.begin(); botListItr != bot_list.end(); botListItr++) { Bot* tempBot = *botListItr; if(tempBot && tempBot->GetBotID() == botID) { @@ -16565,7 +16565,7 @@ Bot* EntityList::GetBotByBotName(std::string botName) { Bot* Result = 0; if(!botName.empty()) { - for(list::iterator botListItr = bot_list.begin(); botListItr != bot_list.end(); botListItr++) { + for(std::list::iterator botListItr = bot_list.begin(); botListItr != bot_list.end(); botListItr++) { Bot* tempBot = *botListItr; if(tempBot && std::string(tempBot->GetName()) == botName) { @@ -16609,11 +16609,11 @@ void EntityList::AddBot(Bot *newBot, bool SendSpawnPacket, bool dontqueue) { } } -list EntityList::GetBotsByBotOwnerCharacterID(uint32 botOwnerCharacterID) { - list Result; +std::list EntityList::GetBotsByBotOwnerCharacterID(uint32 botOwnerCharacterID) { + std::list Result; if(botOwnerCharacterID > 0) { - for(list::iterator botListItr = bot_list.begin(); botListItr != bot_list.end(); botListItr++) { + for(std::list::iterator botListItr = bot_list.begin(); botListItr != bot_list.end(); botListItr++) { Bot* tempBot = *botListItr; if(tempBot && tempBot->GetBotOwnerCharacterID() == botOwnerCharacterID) @@ -16676,7 +16676,7 @@ bool EntityList::RemoveBot(uint16 entityID) { bool Result = false; if(entityID > 0) { - for(list::iterator botListItr = bot_list.begin(); botListItr != bot_list.end(); botListItr++) + for(std::list::iterator botListItr = bot_list.begin(); botListItr != bot_list.end(); botListItr++) { Bot* tempBot = *botListItr; @@ -16695,7 +16695,7 @@ void EntityList::ShowSpawnWindow(Client* client, int Distance, bool NamedOnly) { const char *WindowTitle = "Bot Tracking Window"; - string WindowText; + std::string WindowText; int LastCon = -1; int CurrentCon = 0; @@ -17228,9 +17228,9 @@ bool Bot::AddHealRotationMember( Bot* healer ) { //update leader's previous member (end of list) to new member and update rotation data SetPrevHealRotationMember(healer); - list botList = GetBotsInHealRotation(this); + std::list botList = GetBotsInHealRotation(this); - for(list::iterator botListItr = botList.begin(); botListItr != botList.end(); botListItr++) { + for(std::list::iterator botListItr = botList.begin(); botListItr != botList.end(); botListItr++) { Bot* tempBot = *botListItr; if(tempBot) @@ -17276,9 +17276,9 @@ bool Bot::RemoveHealRotationMember( Bot* healer ) { } //update rotation data - list botList = GetBotsInHealRotation(leader); + std::list botList = GetBotsInHealRotation(leader); - for(list::iterator botListItr = botList.begin(); botListItr != botList.end(); botListItr++) { + for(std::list::iterator botListItr = botList.begin(); botListItr != botList.end(); botListItr++) { Bot* tempBot = *botListItr; if(tempBot) { @@ -17349,11 +17349,11 @@ bool Bot::AddHealRotationTarget( Mob* target ) { if (_healRotationTargets[i] == 0) { - list botList = GetBotsInHealRotation(this); + std::list botList = GetBotsInHealRotation(this); _healRotationTargets[i] = target->GetID(); - for(list::iterator botListItr = botList.begin(); botListItr != botList.end(); botListItr++) { + for(std::list::iterator botListItr = botList.begin(); botListItr != botList.end(); botListItr++) { Bot* tempBot = *botListItr; if(tempBot && tempBot != this) { @@ -17386,12 +17386,12 @@ bool Bot::RemoveHealRotationTarget( Mob* target ) { //notify all heal rotation members to remove target for(int i=0; iGetID()) { - list botList = GetBotsInHealRotation(this); + std::list botList = GetBotsInHealRotation(this); _healRotationTargets[i] = 0; index = i; removed = true; - for(list::iterator botListItr = botList.begin(); botListItr != botList.end(); botListItr++) { + for(std::list::iterator botListItr = botList.begin(); botListItr != botList.end(); botListItr++) { Bot* tempBot = *botListItr; if(tempBot) @@ -17499,8 +17499,8 @@ Mob* Bot::GetHealRotationTarget( uint8 index ) { return target; } -list Bot::GetBotsInHealRotation(Bot* rotationLeader) { - list Result; +std::list Bot::GetBotsInHealRotation(Bot* rotationLeader) { + std::list Result; if(rotationLeader != nullptr) { Result.push_back(rotationLeader); diff --git a/zone/botspellsai.cpp b/zone/botspellsai.cpp index 58d94d03b..10d3fa7af 100644 --- a/zone/botspellsai.cpp +++ b/zone/botspellsai.cpp @@ -559,7 +559,7 @@ bool Bot::AICastSpell(Mob* tar, uint8 iChance, uint16 iSpellTypes) { std::list inCombatBuffList = GetBotSpellsBySpellType(this, SpellType_InCombatBuff); - for(list::iterator itr = inCombatBuffList.begin(); itr != inCombatBuffList.end(); itr++) { + for(std::list::iterator itr = inCombatBuffList.begin(); itr != inCombatBuffList.end(); itr++) { BotSpell selectedBotSpell = *itr; if(selectedBotSpell.SpellId == 0) @@ -646,7 +646,7 @@ bool Bot::AICastSpell(Mob* tar, uint8 iChance, uint16 iSpellTypes) { const int maxDotSelect = 5; int dotSelectCounter = 0; - for(list::iterator itr = dotList.begin(); itr != dotList.end(); itr++) { + for(std::list::iterator itr = dotList.begin(); itr != dotList.end(); itr++) { BotSpell selectedBotSpell = *itr; if(selectedBotSpell.SpellId == 0) @@ -2049,7 +2049,7 @@ BotSpell Bot::GetBestBotSpellForCure(Bot* botCaster, Mob *tar) { //Check for group cure first if(countNeedsCured > 2) { - for(list::iterator itr = cureList.begin(); itr != cureList.end(); itr++) { + for(std::list::iterator itr = cureList.begin(); itr != cureList.end(); itr++) { BotSpell selectedBotSpell = *itr; if(IsGroupSpell(itr->SpellId) && CheckSpellRecastTimers(botCaster, itr->SpellIndex)) { @@ -2086,7 +2086,7 @@ BotSpell Bot::GetBestBotSpellForCure(Bot* botCaster, Mob *tar) { //no group cure for target- try to find single target spell if(!spellSelected) { - for(list::iterator itr = cureList.begin(); itr != cureList.end(); itr++) { + for(std::list::iterator itr = cureList.begin(); itr != cureList.end(); itr++) { BotSpell selectedBotSpell = *itr; if(CheckSpellRecastTimers(botCaster, itr->SpellIndex)) { diff --git a/zone/client.h b/zone/client.h index 21005949c..296f5c4cd 100644 --- a/zone/client.h +++ b/zone/client.h @@ -19,6 +19,8 @@ #define CLIENT_H class Client; + + #include "../common/timer.h" #include "../common/ptimer.h" #include "../common/emu_opcodes.h" @@ -49,6 +51,7 @@ class Client; #include "../common/item_struct.h" #include "../common/clientversions.h" #include "QGlobals.h" +#include #define CLIENT_TIMEOUT 90000 #define CLIENT_LD_TIMEOUT 30000 // length of time client stays in zone after LDing @@ -1101,7 +1104,7 @@ public: void DuplicateLoreMessage(uint32 ItemID); void GarbleMessage(char *, uint8); - void TickItemCheck(); + void TickItemCheck(); void TryItemTick(int slot); int16 GetActSTR() { return( std::min(GetMaxSTR(), GetSTR()) ); } int16 GetActSTA() { return( std::min(GetMaxSTA(), GetSTA()) ); } @@ -1110,9 +1113,9 @@ public: int16 GetActINT() { return( std::min(GetMaxINT(), GetINT()) ); } int16 GetActWIS() { return( std::min(GetMaxWIS(), GetWIS()) ); } int16 GetActCHA() { return( std::min(GetMaxCHA(), GetCHA()) ); } - void LoadAccountFlags(); - void SetAccountFlag(std::string flag, std::string val); - std::string GetAccountFlag(std::string flag); float GetDamageMultiplier(SkillType); + void LoadAccountFlags(); + void SetAccountFlag(std::string flag, std::string val); + std::string GetAccountFlag(std::string flag); float GetDamageMultiplier(SkillType); int mod_client_damage(int damage, SkillType skillinuse, int hand, ItemInst* weapon, Mob* other); bool mod_client_message(char* message, uint8 chan_num); bool mod_can_increase_skill(SkillType skillid, Mob* against_who); @@ -1431,9 +1434,9 @@ private: uint8 MaxXTargets; bool XTargetAutoAddHaters; - struct XTarget_Struct XTargets[XTARGET_HARDCAP]; + struct XTarget_Struct XTargets[XTARGET_HARDCAP]; - Timer ItemTickTimer; + Timer ItemTickTimer; std::map accountflags; }; diff --git a/zone/entity.h b/zone/entity.h index 812d229bb..f6fcd7d46 100644 --- a/zone/entity.h +++ b/zone/entity.h @@ -441,7 +441,7 @@ private: Mob* GetMobByBotID(uint32 botID); Bot* GetBotByBotID(uint32 botID); Bot* GetBotByBotName(std::string botName); - list GetBotsByBotOwnerCharacterID(uint32 botOwnerCharacterID); + std::list GetBotsByBotOwnerCharacterID(uint32 botOwnerCharacterID); bool Bot_AICheckCloseBeneficialSpells(Bot* caster, uint8 iChance, float iRange, uint16 iSpellTypes); // TODO: Evaluate this closesly in hopes to eliminate void ShowSpawnWindow(Client* client, int Distance, bool NamedOnly); // TODO: Implement ShowSpawnWindow in the bot class but it needs entity list stuff