mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 01:37:37 +01:00
*Fix the bug that door state of naxx is not loaded.
--HG-- branch : trunk
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -162,9 +162,6 @@ class TRINITY_DLL_SPEC InstanceData : public ZoneScript
|
||||
std::vector<BossInfo> bosses;
|
||||
DoorInfoMap doors;
|
||||
MinionInfoMap minions;
|
||||
|
||||
virtual void OnObjectCreate(GameObject *) {}
|
||||
virtual void OnCreatureCreate(Creature *, uint32 entry) {}
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user