mirror of
https://github.com/EQEmu/Server.git
synced 2026-04-15 21:12:25 +00:00
First attempt at fixing zone shutdown crashes. (Mob timer processing accessing released resources.)
This commit is contained in:
parent
16d47a2c47
commit
52ae78709b
@ -1,5 +1,9 @@
|
|||||||
EQEMu Changelog (Started on Sept 24, 2003 15:50)
|
EQEMu Changelog (Started on Sept 24, 2003 15:50)
|
||||||
-------------------------------------------------------
|
-------------------------------------------------------
|
||||||
|
== 08/24/2014 ==
|
||||||
|
Uleat: Fix (attempted) for zone crashes related to zone shut-down. This change disables all Mob AI and disables/deletes all Mob timers once Zone::ShutDown() is called. More areas will be addressed as reports come in.
|
||||||
|
Note: Perl and Lua quests tested to work..please post any aberrant behavior. (I finally set my spell-check to US English...)
|
||||||
|
|
||||||
== 08/20/2014 ==
|
== 08/20/2014 ==
|
||||||
Uleat: Rework of Trade::AddEntity() - function used to move items into the trade window. Now accepts argument for 'stack_size' and updates client properly.
|
Uleat: Rework of Trade::AddEntity() - function used to move items into the trade window. Now accepts argument for 'stack_size' and updates client properly.
|
||||||
Note: I tested trade with Titanium:{SoF,SoD,UF,RoF} in both directions and no client generated an OP_MoveItem event for attempting to place a stackable
|
Note: I tested trade with Titanium:{SoF,SoD,UF,RoF} in both directions and no client generated an OP_MoveItem event for attempting to place a stackable
|
||||||
|
|||||||
@ -1598,7 +1598,7 @@ Corpse *EntityList::GetCorpseByName(const char *name)
|
|||||||
|
|
||||||
Spawn2 *EntityList::GetSpawnByID(uint32 id)
|
Spawn2 *EntityList::GetSpawnByID(uint32 id)
|
||||||
{
|
{
|
||||||
if (!zone)
|
if (!zone || !zone->IsLoaded())
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
LinkedListIterator<Spawn2 *> iterator(zone->spawn2_list);
|
LinkedListIterator<Spawn2 *> iterator(zone->spawn2_list);
|
||||||
|
|||||||
@ -541,13 +541,40 @@ void NPC::AI_Start(uint32 iMoveDelay) {
|
|||||||
void Mob::AI_Stop() {
|
void Mob::AI_Stop() {
|
||||||
if (!IsAIControlled())
|
if (!IsAIControlled())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
pAIControlled = false;
|
pAIControlled = false;
|
||||||
|
|
||||||
safe_delete(AIthink_timer);
|
safe_delete(AIthink_timer);
|
||||||
safe_delete(AIwalking_timer);
|
safe_delete(AIwalking_timer);
|
||||||
safe_delete(AImovement_timer);
|
safe_delete(AImovement_timer);
|
||||||
safe_delete(AItarget_check_timer)
|
safe_delete(AItarget_check_timer);
|
||||||
safe_delete(AIscanarea_timer);
|
safe_delete(AIscanarea_timer);
|
||||||
safe_delete(AIfeignremember_timer);
|
safe_delete(AIfeignremember_timer);
|
||||||
|
safe_delete(PathingLOSCheckTimer);
|
||||||
|
safe_delete(PathingRouteUpdateTimerShort);
|
||||||
|
safe_delete(PathingRouteUpdateTimerLong);
|
||||||
|
|
||||||
|
attack_timer.Disable();
|
||||||
|
attack_dw_timer.Disable();
|
||||||
|
ranged_timer.Disable();
|
||||||
|
tic_timer.Disable();
|
||||||
|
mana_timer.Disable();
|
||||||
|
spellend_timer.Disable();
|
||||||
|
projectile_timer.Disable();
|
||||||
|
rewind_timer.Disable();
|
||||||
|
bindwound_timer.Disable();
|
||||||
|
stunned_timer.Disable();
|
||||||
|
spun_timer.Disable();
|
||||||
|
bardsong_timer.Disable();
|
||||||
|
gravity_timer.Disable();
|
||||||
|
viral_timer.Disable();
|
||||||
|
flee_timer.Disable();
|
||||||
|
|
||||||
|
for (int sat = 0; sat < MAX_SPECIAL_ATTACK; ++sat) {
|
||||||
|
if (SpecialAbilities[sat].timer)
|
||||||
|
SpecialAbilities[sat].timer->Disable();
|
||||||
|
}
|
||||||
|
|
||||||
hate_list.Wipe();
|
hate_list.Wipe();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -600,9 +600,8 @@ QuestInterface *QuestParserCollection::GetQIByNPCQuest(uint32 npcid, std::string
|
|||||||
}
|
}
|
||||||
|
|
||||||
QuestInterface *QuestParserCollection::GetQIByPlayerQuest(std::string &filename) {
|
QuestInterface *QuestParserCollection::GetQIByPlayerQuest(std::string &filename) {
|
||||||
|
if(!zone || !zone->IsLoaded())
|
||||||
if(!zone)
|
return nullptr;
|
||||||
return nullptr;
|
|
||||||
|
|
||||||
//first look for /quests/zone/player_v[instance_version].ext (precedence)
|
//first look for /quests/zone/player_v[instance_version].ext (precedence)
|
||||||
filename = "quests/";
|
filename = "quests/";
|
||||||
|
|||||||
@ -718,11 +718,24 @@ void Zone::DBAWComplete(uint8 workpt_b1, DBAsyncWork* dbaw) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Zone::IsLoaded() {
|
||||||
|
return ZoneLoaded;
|
||||||
|
}
|
||||||
|
|
||||||
void Zone::Shutdown(bool quite)
|
void Zone::Shutdown(bool quite)
|
||||||
{
|
{
|
||||||
if (!ZoneLoaded)
|
if (!ZoneLoaded)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
std::list<Mob*> mob_list;
|
||||||
|
entity_list.GetMobList(mob_list);
|
||||||
|
std::list<Mob*>::iterator mob_itr = mob_list.begin();
|
||||||
|
while (mob_itr != mob_list.end()) {
|
||||||
|
Mob* mob_inst = *mob_itr;
|
||||||
|
mob_inst->AI_Stop();
|
||||||
|
++mob_itr;
|
||||||
|
}
|
||||||
|
|
||||||
std::map<uint32,NPCType *>::iterator itr;
|
std::map<uint32,NPCType *>::iterator itr;
|
||||||
while(zone->npctable.size()) {
|
while(zone->npctable.size()) {
|
||||||
itr=zone->npctable.begin();
|
itr=zone->npctable.begin();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user