mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2025-11-29 17:38:24 +08:00
fix(Scripts/SethekkHalls): Prevent multiple spawns of Anzu (#19636)
* fix(Scripts/SethekkHalls): Prevent multiple spawns of Anzu * Update instance_sethekk_halls.cpp * Update instance_sethekk_halls.cpp * Update rev_1723763212128826500.sql
This commit is contained in:
@@ -0,0 +1,2 @@
|
|||||||
|
--
|
||||||
|
DELETE FROM `event_scripts` WHERE `id` = 14797;
|
||||||
@@ -31,6 +31,14 @@ ObjectData const gameObjectData[] =
|
|||||||
{ 0, 0 }
|
{ 0, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
ObjectData const creatureData[] =
|
||||||
|
{
|
||||||
|
{ NPC_VOICE_OF_THE_RAVEN_GOD, DATA_VOICE_OF_THE_RAVEN_GOD },
|
||||||
|
{ 0, 0 }
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint32 anzuSummonEventId = 14797;
|
||||||
|
|
||||||
class instance_sethekk_halls : public InstanceMapScript
|
class instance_sethekk_halls : public InstanceMapScript
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -48,14 +56,14 @@ public:
|
|||||||
SetHeaders(DataHeaders);
|
SetHeaders(DataHeaders);
|
||||||
SetBossNumber(EncounterCount);
|
SetBossNumber(EncounterCount);
|
||||||
LoadDoorData(doorData);
|
LoadDoorData(doorData);
|
||||||
LoadObjectData(nullptr, gameObjectData);
|
LoadObjectData(creatureData, gameObjectData);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnCreatureCreate(Creature* creature) override
|
void ProcessEvent(WorldObject* /*obj*/, uint32 eventId) override
|
||||||
{
|
{
|
||||||
if (creature->GetEntry() == NPC_ANZU || creature->GetEntry() == NPC_VOICE_OF_THE_RAVEN_GOD)
|
if (eventId == anzuSummonEventId)
|
||||||
if (GetBossState(DATA_ANZU) == DONE)
|
if (!GetCreature(DATA_VOICE_OF_THE_RAVEN_GOD) && GetBossState(DATA_ANZU) != DONE)
|
||||||
creature->DespawnOrUnsummon(1);
|
instance->SummonCreature(NPC_VOICE_OF_THE_RAVEN_GOD, Position(-88.02f, 288.18f, 75.2f, 6.0f));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -41,7 +41,8 @@ enum eTypes
|
|||||||
|
|
||||||
enum InstanceData
|
enum InstanceData
|
||||||
{
|
{
|
||||||
DATA_GO_TALON_KING_COFFER
|
DATA_GO_TALON_KING_COFFER,
|
||||||
|
DATA_VOICE_OF_THE_RAVEN_GOD
|
||||||
};
|
};
|
||||||
|
|
||||||
enum eIds
|
enum eIds
|
||||||
|
|||||||
Reference in New Issue
Block a user