From 0e6e4fff64d0d264bb77c2993db0691fc278215d Mon Sep 17 00:00:00 2001 From: megamage Date: Sat, 13 Jun 2009 11:23:50 -0500 Subject: *Fix the bug that door state of naxx is not loaded. --HG-- branch : trunk --- src/bindings/scripts/include/sc_creature.cpp | 3 +++ src/game/InstanceData.cpp | 2 ++ src/game/InstanceData.h | 3 --- 3 files changed, 5 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/bindings/scripts/include/sc_creature.cpp b/src/bindings/scripts/include/sc_creature.cpp index a1736689522..f893eb6c1bf 100644 --- a/src/bindings/scripts/include/sc_creature.cpp +++ b/src/bindings/scripts/include/sc_creature.cpp @@ -599,6 +599,9 @@ BossAI::BossAI(Creature *c, uint32 id) : ScriptedAI(c) void BossAI::_Reset() { + if(!me->isAlive()) + return; + events.Reset(); summons.DespawnAll(); if(instance) diff --git a/src/game/InstanceData.cpp b/src/game/InstanceData.cpp index cca4d7ca786..d2b341b2d2c 100644 --- a/src/game/InstanceData.cpp +++ b/src/game/InstanceData.cpp @@ -125,6 +125,7 @@ void InstanceData::UpdateDoorState(GameObject *door) } door->SetGoState(open ? GO_STATE_ACTIVE : GO_STATE_READY); + //sLog.outError("Door %u is %s.", door->GetEntry(), open ? "opened" : "closed"); } void InstanceData::AddDoor(GameObject *door, bool add) @@ -190,6 +191,7 @@ bool InstanceData::SetBossState(uint32 id, EncounterState state) if(bossInfo->state == TO_BE_DECIDED) // loading { bossInfo->state = state; + //sLog.outError("Inialize boss %u state as %u.", id, (uint32)state); return false; } else diff --git a/src/game/InstanceData.h b/src/game/InstanceData.h index d5be00580ea..819185eacaa 100644 --- a/src/game/InstanceData.h +++ b/src/game/InstanceData.h @@ -162,9 +162,6 @@ class TRINITY_DLL_SPEC InstanceData : public ZoneScript std::vector bosses; DoorInfoMap doors; MinionInfoMap minions; - - virtual void OnObjectCreate(GameObject *) {} - virtual void OnCreatureCreate(Creature *, uint32 entry) {} }; #endif -- cgit v1.2.3