diff options
| author | ModoX <moardox@gmail.com> | 2024-12-29 00:17:07 +0100 |
|---|---|---|
| committer | ModoX <moardox@gmail.com> | 2024-12-29 00:17:07 +0100 |
| commit | 6b96facee3389f79e579e8a325440051891fa27e (patch) | |
| tree | 0692c6ce3310971b57f84d55fcb3c4e73ad1a739 /src/server/scripts/Kalimdor | |
| parent | 309ba22a15e5e0b4321b99f7157ccb18e0adc8dd (diff) | |
Core/AI: Remove default arguments for inter-script communication
Diffstat (limited to 'src/server/scripts/Kalimdor')
| -rw-r--r-- | src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp | 10 | ||||
| -rw-r--r-- | src/server/scripts/Kalimdor/Firelands/boss_baleroc.cpp | 2 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp index c44c56bb0f1..2889c7e4e05 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp @@ -85,7 +85,8 @@ enum InnEventLines enum InnEventMisc { DATA_REQUEST_FACING = 0, - DATA_REACHED_WP = 1 + DATA_REACHED_WP = 1, + DATA_INVOKING_PLAYER_GUID, }; class npc_hearthsinger_forresten_cot : public CreatureScript @@ -158,8 +159,11 @@ class npc_hearthsinger_forresten_cot : public CreatureScript } // Player has hit the Belfast stairs areatrigger, we are taking him over for a moment - void SetGUID(ObjectGuid const& guid, int32 /*id*/) override + void SetGUID(ObjectGuid const& guid, int32 id) override { + if (id != DATA_INVOKING_PLAYER_GUID) + return; + if (_hadBelfast) return; _hadBelfast = true; @@ -226,7 +230,7 @@ class at_stratholme_inn_stairs_cot : public AreaTriggerScript if (instance->GetData(DATA_INSTANCE_PROGRESS) <= CRATES_IN_PROGRESS) // Forrest's script will handle Belfast for this, since SmartAI lacks the features to do it (we can't pass a custom target) if (Creature* forrest = player->FindNearestCreature(NPC_FORREST, 200.0f, true)) - forrest->AI()->SetGUID(player->GetGUID()); + forrest->AI()->SetGUID(player->GetGUID(), DATA_INVOKING_PLAYER_GUID); return true; } }; diff --git a/src/server/scripts/Kalimdor/Firelands/boss_baleroc.cpp b/src/server/scripts/Kalimdor/Firelands/boss_baleroc.cpp index fc9e400c7a0..b59e43a4075 100644 --- a/src/server/scripts/Kalimdor/Firelands/boss_baleroc.cpp +++ b/src/server/scripts/Kalimdor/Firelands/boss_baleroc.cpp @@ -218,7 +218,7 @@ struct boss_baleroc : public firelands_bossAI firelands_bossAI::UpdateAI(diff); } - void SetGUID(ObjectGuid const& guid, int32 type = 0) override + void SetGUID(ObjectGuid const& guid, int32 type) override { switch (type) { |
