summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew <47818697+Nyeriah@users.noreply.github.com>2024-11-16 06:25:36 -0300
committerGitHub <noreply@github.com>2024-11-16 06:25:36 -0300
commit6aa0bc37cc75d2b54179f405cb31a33a1959841d (patch)
treef6dbe58cc71baf8c39d89932abe060edf2d1376a /src
parent905cc7b537de9967aadd8ac8aae782fa1616f50c (diff)
refactor(Scripts/SunwellPlateau): Move summons to the new summon data… (#20586)
refactor(Scripts/SunwellPlateau): Move summons to the new summon data implementation
Diffstat (limited to 'src')
-rw-r--r--src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp41
1 files changed, 15 insertions, 26 deletions
diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp
index 8f2d41cc1e..52acb10322 100644
--- a/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp
+++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp
@@ -59,6 +59,20 @@ ObjectData const gameObjectData[] =
{ 0, 0 }
};
+ObjectData const summonData[] =
+{
+ { NPC_DEMONIC_VAPOR_TRAIL, DATA_FELMYST },
+ { NPC_UNYIELDING_DEAD, DATA_FELMYST },
+ { NPC_DARKNESS, DATA_MURU },
+ { NPC_VOID_SENTINEL, DATA_MURU },
+ { NPC_VOID_SPAWN, DATA_MURU },
+ { NPC_FELFIRE_PORTAL, DATA_KJ_CONTROLLER },
+ { NPC_VOLATILE_FELFIRE_FIEND, DATA_KJ_CONTROLLER },
+ { NPC_SHIELD_ORB, DATA_KJ_CONTROLLER },
+ { NPC_SINISTER_REFLECTION, DATA_KJ_CONTROLLER },
+ { 0, 0 }
+};
+
class instance_sunwell_plateau : public InstanceMapScript
{
public:
@@ -72,6 +86,7 @@ public:
SetBossNumber(MAX_ENCOUNTERS);
LoadDoorData(doorData);
LoadObjectData(creatureData, gameObjectData);
+ LoadSummonData(summonData);
}
void OnPlayerEnter(Player* player) override
@@ -87,32 +102,6 @@ public:
if (creature->GetSpawnId() > 0 || !creature->GetOwnerGUID().IsPlayer())
creature->CastSpell(creature, SPELL_SUNWELL_RADIANCE, true);
- switch (creature->GetEntry())
- {
- case NPC_DEMONIC_VAPOR_TRAIL:
- case NPC_UNYIELDING_DEAD:
- if (Creature* felmyst = GetCreature(DATA_FELMYST))
- felmyst->AI()->JustSummoned(creature);
- break;
-
- case NPC_DARKNESS:
- case NPC_VOID_SENTINEL:
- case NPC_VOID_SPAWN:
- if (Creature* muru = GetCreature(DATA_MURU))
- muru->AI()->JustSummoned(creature);
- break;
-
- case NPC_FELFIRE_PORTAL:
- case NPC_VOLATILE_FELFIRE_FIEND:
- case NPC_SHIELD_ORB:
- case NPC_SINISTER_REFLECTION:
- if (Creature* kiljaedenC = GetCreature(DATA_KJ_CONTROLLER))
- kiljaedenC->AI()->JustSummoned(creature);
- break;
- default:
- break;
- }
-
InstanceScript::OnCreatureCreate(creature);
}
};