diff --git a/changelog.txt b/changelog.txt index 742edb5a5..8533293f0 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,8 @@ EQEMu Changelog (Started on Sept 24, 2003 15:50) ------------------------------------------------------- +== 11/22/2015 == +Uleat: Fix for loginserver project compile failure + == 11/7/2015 == Akkadius: Implemented #repopclose [distance in units] - Used for development purposes, defaults to 500 units - Real case use: Large zones with 700 NPC's and you are making fast quick tweaks to nearby NPC's you can refresh just the NPC's around you instead of all in the zone diff --git a/loginserver/CMakeLists.txt b/loginserver/CMakeLists.txt index f588cbc48..bdd1bba07 100644 --- a/loginserver/CMakeLists.txt +++ b/loginserver/CMakeLists.txt @@ -43,7 +43,7 @@ ADD_EXECUTABLE(loginserver ${eqlogin_sources} ${eqlogin_headers}) INSTALL(TARGETS loginserver RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}) -TARGET_LINK_LIBRARIES(loginserver common debug ${MySQL_LIBRARY_DEBUG} optimized ${MySQL_LIBRARY_RELEASE}) +TARGET_LINK_LIBRARIES(loginserver common debug ${MySQL_LIBRARY_DEBUG} optimized ${MySQL_LIBRARY_RELEASE} ${ZLIB_LIBRARY}) IF(MSVC) SET_TARGET_PROPERTIES(loginserver PROPERTIES LINK_FLAGS_RELEASE "/OPT:REF /OPT:ICF") diff --git a/loginserver/database_mysql.cpp b/loginserver/database_mysql.cpp index cffec5548..2e69dfca3 100644 --- a/loginserver/database_mysql.cpp +++ b/loginserver/database_mysql.cpp @@ -26,8 +26,6 @@ extern ErrorLog *server_log; extern LoginServer server; -#pragma comment(lib, "mysqlclient.lib") - DatabaseMySQL::DatabaseMySQL(string user, string pass, string host, string port, string name) { this->user = user; diff --git a/zone/bot.cpp b/zone/bot.cpp index 477581eba..9909c6d5d 100644 --- a/zone/bot.cpp +++ b/zone/bot.cpp @@ -2026,6 +2026,16 @@ void Bot::LoadPetBuffs(SpellBuff_Struct* petBuffs, uint32 botPetSaveId) { petBuffs[buffIndex].spellid = atoi(row[0]); petBuffs[buffIndex].level = atoi(row[1]); petBuffs[buffIndex].duration = atoi(row[2]); + //Work around for loading the counters and setting them back to max. Need entry in DB for saved counters + if(CalculatePoisonCounters(petBuffs[buffIndex].spellid) > 0) + petBuffs[buffIndex].counters = CalculatePoisonCounters(petBuffs[buffIndex].spellid); + else if(CalculateDiseaseCounters(petBuffs[buffIndex].spellid) > 0) + petBuffs[buffIndex].counters = CalculateDiseaseCounters(petBuffs[buffIndex].spellid); + else if(CalculateCurseCounters(petBuffs[buffIndex].spellid) > 0) + petBuffs[buffIndex].counters = CalculateCurseCounters(petBuffs[buffIndex].spellid); + else if(CalculateCorruptionCounters(petBuffs[buffIndex].spellid) > 0) + petBuffs[buffIndex].counters = CalculateCorruptionCounters(petBuffs[buffIndex].spellid); + buffIndex++; } query = StringFormat("DELETE FROM `bot_pet_buffs` WHERE `pets_index` = %u;", botPetSaveId); diff --git a/zone/entity.cpp b/zone/entity.cpp index 643b27177..23848f73e 100644 --- a/zone/entity.cpp +++ b/zone/entity.cpp @@ -468,17 +468,27 @@ void EntityList::CorpseProcess() void EntityList::MobProcess() { -#ifdef IDLE_WHEN_EMPTY - if (numclients < 1) - return; -#endif + bool mob_dead; + auto it = mob_list.begin(); while (it != mob_list.end()) { uint16 id = it->first; Mob *mob = it->second; size_t sz = mob_list.size(); - bool p_val = mob->Process(); + +#ifdef IDLE_WHEN_EMPTY + // spawn_events can cause spawns and deaths while zone empty. + // At the very least, process that. + if (numclients < 1) { + mob_dead = mob->CastToNPC()->GetDepop(); + } + else { + mob_dead = !mob->Process(); + } +#else + mob_dead = !mob->Process(); +#endif size_t a_sz = mob_list.size(); if(a_sz > sz) { @@ -491,7 +501,7 @@ void EntityList::MobProcess() ++it; } - if(!p_val) { + if(mob_dead) { if(mob->IsNPC()) { entity_list.RemoveNPC(id); }