mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-19 11:55:43 +00:00
fix(Scripts/Sunken Temple): Fix Shade of Eranikus (#10891)
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
#include "ScriptMgr.h"
|
||||
#include "SpellScript.h"
|
||||
#include "sunken_temple.h"
|
||||
#include "Unit.h"
|
||||
|
||||
class instance_sunken_temple : public InstanceMapScript
|
||||
{
|
||||
@@ -48,6 +49,10 @@ public:
|
||||
case NPC_JAMMAL_AN_THE_PROPHET:
|
||||
_jammalanGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_SHADE_OF_ERANIKUS:
|
||||
_shadeOfEranikusGUID = creature->GetGUID();
|
||||
creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
break;
|
||||
}
|
||||
|
||||
if (creature->IsAlive() && creature->GetSpawnId() && creature->GetCreatureType() == CREATURE_TYPE_DRAGONKIN && creature->GetEntry() != NPC_SHADE_OF_ERANIKUS)
|
||||
@@ -58,6 +63,12 @@ public:
|
||||
{
|
||||
if (unit->GetTypeId() == TYPEID_UNIT && unit->GetCreatureType() == CREATURE_TYPE_DRAGONKIN && unit->GetEntry() != NPC_SHADE_OF_ERANIKUS)
|
||||
_dragonkinList.remove(unit->GetGUID());
|
||||
if (unit->GetEntry() == NPC_JAMMAL_AN_THE_PROPHET)
|
||||
{
|
||||
if (Creature* cr = instance->GetCreature(_shadeOfEranikusGUID))
|
||||
cr->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void OnGameObjectCreate(GameObject* gameobject) override
|
||||
@@ -193,6 +204,7 @@ public:
|
||||
|
||||
ObjectGuid _forcefieldGUID;
|
||||
ObjectGuid _jammalanGUID;
|
||||
ObjectGuid _shadeOfEranikusGUID;
|
||||
GuidList _dragonkinList;
|
||||
EventMap _events;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user