Core/Scripts: Add multiple "Pass parameters between AI" methods on AreaTriggerAI

Ref #29215
This commit is contained in:
Traesh
2023-08-27 20:06:48 +02:00
committed by Shauren
parent 3b7a31fc81
commit 2cdf0a44b2

View File

@@ -19,6 +19,7 @@
#define TRINITY_AREATRIGGERAI_H
#include "Define.h"
#include "ObjectGuid.h"
class AreaTrigger;
class Spell;
@@ -58,8 +59,15 @@ class TC_GAME_API AreaTriggerAI
// Called when the AreaTrigger is removed
virtual void OnRemove() { }
// Pass parameters between AI
virtual void DoAction([[maybe_unused]] int32 param) { }
virtual uint32 GetData([[maybe_unused]] uint32 id = 0) 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; }
// Gets the id of the AI (script id)
uint32 GetId() { return _scriptId; }
uint32 GetId() const { return _scriptId; }
};
class NullAreaTriggerAI : public AreaTriggerAI