aboutsummaryrefslogtreecommitdiff
path: root/src/server/game
diff options
context:
space:
mode:
authorModoX <moardox@gmail.com>2024-12-29 00:17:07 +0100
committerOvahlord <dreadkiller@gmx.de>2024-12-29 12:17:25 +0100
commit74f9ad8c2e3efa6b18ecb0f7df6a6e37a85d3c3f (patch)
tree2c4b208e5aebf6f37ef271ff6ee1e471238841a2 /src/server/game
parent1f81c961f24337abdc8de25bd23d9834d0c7392b (diff)
Core/AI: Remove default arguments for inter-script communication
(cherry picked from commit 6b96facee3389f79e579e8a325440051891fa27e)
Diffstat (limited to 'src/server/game')
-rw-r--r--src/server/game/AI/CoreAI/AreaTriggerAI.h6
-rw-r--r--src/server/game/AI/CoreAI/ConversationAI.h6
-rw-r--r--src/server/game/AI/CoreAI/GameObjectAI.h6
-rw-r--r--src/server/game/AI/CoreAI/UnitAI.h10
-rw-r--r--src/server/game/AI/PlayerAI/PlayerAI.cpp2
-rw-r--r--src/server/game/AI/SmartScripts/SmartAI.h8
6 files changed, 19 insertions, 19 deletions
diff --git a/src/server/game/AI/CoreAI/AreaTriggerAI.h b/src/server/game/AI/CoreAI/AreaTriggerAI.h
index 55e8f188586..c1639291143 100644
--- a/src/server/game/AI/CoreAI/AreaTriggerAI.h
+++ b/src/server/game/AI/CoreAI/AreaTriggerAI.h
@@ -61,10 +61,10 @@ class TC_GAME_API AreaTriggerAI
// Pass parameters between AI
virtual void DoAction([[maybe_unused]] int32 param) { }
- virtual uint32 GetData([[maybe_unused]] uint32 id = 0) const { return 0; }
+ virtual uint32 GetData([[maybe_unused]] uint32 id) const { return 0; }
virtual void SetData([[maybe_unused]] uint32 id, [[maybe_unused]] uint32 value) { }
- virtual void SetGUID([[maybe_unused]] ObjectGuid const& guid, [[maybe_unused]] int32 id = 0) { }
- virtual ObjectGuid GetGUID([[maybe_unused]] int32 id = 0) const { return ObjectGuid::Empty; }
+ virtual void SetGUID([[maybe_unused]] ObjectGuid const& guid, [[maybe_unused]] int32 id) { }
+ virtual ObjectGuid GetGUID([[maybe_unused]] int32 id) const { return ObjectGuid::Empty; }
// Gets the id of the AI (script id)
uint32 GetId() const { return _scriptId; }
diff --git a/src/server/game/AI/CoreAI/ConversationAI.h b/src/server/game/AI/CoreAI/ConversationAI.h
index 25adc8bc68b..3a41d0f1b60 100644
--- a/src/server/game/AI/CoreAI/ConversationAI.h
+++ b/src/server/game/AI/CoreAI/ConversationAI.h
@@ -55,10 +55,10 @@ class TC_GAME_API ConversationAI
// Pass parameters between AI
virtual void DoAction([[maybe_unused]] int32 param) { }
- virtual uint32 GetData([[maybe_unused]] uint32 id = 0) const { return 0; }
+ virtual uint32 GetData([[maybe_unused]] uint32 id) const { return 0; }
virtual void SetData([[maybe_unused]] uint32 id, [[maybe_unused]] uint32 value) { }
- virtual void SetGUID([[maybe_unused]] ObjectGuid const& guid, [[maybe_unused]] int32 id = 0) { }
- virtual ObjectGuid GetGUID([[maybe_unused]] int32 id = 0) const { return ObjectGuid::Empty; }
+ virtual void SetGUID([[maybe_unused]] ObjectGuid const& guid, [[maybe_unused]] int32 id) { }
+ virtual ObjectGuid GetGUID([[maybe_unused]] int32 id) const { return ObjectGuid::Empty; }
// Gets the id of the AI (script id)
uint32 GetId() const { return _scriptId; }
diff --git a/src/server/game/AI/CoreAI/GameObjectAI.h b/src/server/game/AI/CoreAI/GameObjectAI.h
index b99a9e8180c..40e56887244 100644
--- a/src/server/game/AI/CoreAI/GameObjectAI.h
+++ b/src/server/game/AI/CoreAI/GameObjectAI.h
@@ -63,9 +63,9 @@ class TC_GAME_API GameObjectAI
virtual void Reset() { }
// Pass parameters between AI
- virtual void DoAction(int32 /*param = 0 */) { }
- virtual void SetGUID(ObjectGuid const& /*guid*/, int32 /*id = 0 */) { }
- virtual ObjectGuid GetGUID(int32 /*id = 0 */) const { return ObjectGuid::Empty; }
+ virtual void DoAction([[maybe_unused]] int32 param) { }
+ virtual void SetGUID([[maybe_unused]] ObjectGuid const& guid, [[maybe_unused]] int32 id) { }
+ virtual ObjectGuid GetGUID([[maybe_unused]] int32 id) const { return ObjectGuid::Empty; }
static int32 Permissible(GameObject const* go);
diff --git a/src/server/game/AI/CoreAI/UnitAI.h b/src/server/game/AI/CoreAI/UnitAI.h
index b5cda811617..6da9179b961 100644
--- a/src/server/game/AI/CoreAI/UnitAI.h
+++ b/src/server/game/AI/CoreAI/UnitAI.h
@@ -69,11 +69,11 @@ class TC_GAME_API UnitAI
virtual void OnCharmed(bool isNew);
// Pass parameters between AI
- virtual void DoAction(int32 /*param*/) { }
- virtual uint32 GetData(uint32 /*id = 0*/) const { return 0; }
- virtual void SetData(uint32 /*id*/, uint32 /*value*/) { }
- virtual void SetGUID(ObjectGuid const& /*guid*/, int32 /*id*/ = 0) { }
- virtual ObjectGuid GetGUID(int32 /*id*/ = 0) const { return ObjectGuid::Empty; }
+ virtual void DoAction([[maybe_unused]] int32 param) { }
+ virtual uint32 GetData([[maybe_unused]] uint32 id) const { return 0; }
+ virtual void SetData([[maybe_unused]] uint32 id, [[maybe_unused]] uint32 value) { }
+ virtual void SetGUID([[maybe_unused]] ObjectGuid const& guid, [[maybe_unused]] int32 id) { }
+ virtual ObjectGuid GetGUID([[maybe_unused]] int32 id) const { return ObjectGuid::Empty; }
// Select the best target (in <targetType> order) from the threat list that fulfill the following:
// - Not among the first <offset> entries in <targetType> order (or SelectTargetMethod::MaxThreat order,
diff --git a/src/server/game/AI/PlayerAI/PlayerAI.cpp b/src/server/game/AI/PlayerAI/PlayerAI.cpp
index d4aa01e1a54..cc992d12d13 100644
--- a/src/server/game/AI/PlayerAI/PlayerAI.cpp
+++ b/src/server/game/AI/PlayerAI/PlayerAI.cpp
@@ -950,7 +950,7 @@ PlayerAI::TargetedSpell SimpleCharmedPlayerAI::SelectAppropriateCastForSpec()
case SPEC_SHAMAN_ELEMENTAL:
if (Unit* victim = me->GetVictim())
{
- if (victim->GetAuraOfRankedSpell(SPELL_FLAME_SHOCK, GetGUID()))
+ if (victim->GetAuraOfRankedSpell(SPELL_FLAME_SHOCK, me->GetGUID()))
VerifyAndPushSpellCast(spells, SPELL_LAVA_BURST, TARGET_VICTIM, 5);
else
VerifyAndPushSpellCast(spells, SPELL_FLAME_SHOCK, TARGET_VICTIM, 3);
diff --git a/src/server/game/AI/SmartScripts/SmartAI.h b/src/server/game/AI/SmartScripts/SmartAI.h
index 16a7790a645..02e9b73bb76 100644
--- a/src/server/game/AI/SmartScripts/SmartAI.h
+++ b/src/server/game/AI/SmartScripts/SmartAI.h
@@ -174,20 +174,20 @@ class TC_GAME_API SmartAI : public CreatureAI
void OnCharmed(bool isNew) override;
// Used in scripts to share variables
- void DoAction(int32 param = 0) override;
+ void DoAction(int32 param) override;
// Used in scripts to share variables
- uint32 GetData(uint32 id = 0) const override;
+ uint32 GetData(uint32 id) const override;
// Used in scripts to share variables
void SetData(uint32 id, uint32 value) override { SetData(id, value, nullptr); }
void SetData(uint32 id, uint32 value, Unit* invoker);
// Used in scripts to share variables
- void SetGUID(ObjectGuid const& guid, int32 id = 0) override;
+ void SetGUID(ObjectGuid const& guid, int32 id) override;
// Used in scripts to share variables
- ObjectGuid GetGUID(int32 id = 0) const override;
+ ObjectGuid GetGUID(int32 id) const override;
// Makes the creature run/walk
void SetRun(bool run = true);