aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/EasternKingdoms/ScarletEnclave
diff options
context:
space:
mode:
authorModoX <moardox@gmail.com>2024-12-29 00:17:07 +0100
committerModoX <moardox@gmail.com>2024-12-29 00:17:07 +0100
commit6b96facee3389f79e579e8a325440051891fa27e (patch)
tree0692c6ce3310971b57f84d55fcb3c4e73ad1a739 /src/server/scripts/EasternKingdoms/ScarletEnclave
parent309ba22a15e5e0b4321b99f7157ccb18e0adc8dd (diff)
Core/AI: Remove default arguments for inter-script communication
Diffstat (limited to 'src/server/scripts/EasternKingdoms/ScarletEnclave')
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp
index 9c2969e0704..ccd5dbe4b7d 100644
--- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp
@@ -73,6 +73,11 @@ enum UnworthyInitiatePhase
PHASE_ATTACKING,
};
+enum UnworthyInitiateData
+{
+ DATA_PRISONER_GUID = 0
+};
+
uint32 acherus_soul_prison[12] =
{
191577,
@@ -191,7 +196,7 @@ public:
{
if (Creature* anchor = me->FindNearestCreature(29521, 30))
{
- anchor->AI()->SetGUID(me->GetGUID());
+ anchor->AI()->SetGUID(me->GetGUID(), DATA_PRISONER_GUID);
anchor->CastSpell(me, SPELL_SOUL_PRISON_CHAIN, true);
anchorGUID = anchor->GetGUID();
}
@@ -312,8 +317,11 @@ public:
ObjectGuid prisonerGUID;
- void SetGUID(ObjectGuid const& guid, int32 /*id*/) override
+ void SetGUID(ObjectGuid const& guid, int32 id) override
{
+ if (id != DATA_PRISONER_GUID)
+ return;
+
prisonerGUID = guid;
}
@@ -337,7 +345,7 @@ class go_acherus_soul_prison : public GameObjectScript
{
if (Creature* anchor = me->FindNearestCreature(29521, 15))
{
- ObjectGuid prisonerGUID = anchor->AI()->GetGUID();
+ ObjectGuid prisonerGUID = anchor->AI()->GetGUID(DATA_PRISONER_GUID);
if (!prisonerGUID.IsEmpty())
if (Creature* prisoner = ObjectAccessor::GetCreature(*player, prisonerGUID))
ENSURE_AI(npc_unworthy_initiate::npc_unworthy_initiateAI, prisoner->AI())->EventStart(anchor, player);