mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 09:17:36 +01:00
Core/Scripts: Implemented OnlyOnceAreaTriggerScript (#20288)
This commit is contained in:
@@ -448,6 +448,19 @@ class TC_GAME_API AreaTriggerScript : public ScriptObject
|
||||
virtual bool OnTrigger(Player* /*player*/, AreaTriggerEntry const* /*trigger*/) { return false; }
|
||||
};
|
||||
|
||||
class TC_GAME_API OnlyOnceAreaTriggerScript : public AreaTriggerScript
|
||||
{
|
||||
using AreaTriggerScript::AreaTriggerScript;
|
||||
|
||||
public:
|
||||
bool OnTrigger(Player* /*player*/, AreaTriggerEntry const* /*trigger*/) override;
|
||||
|
||||
protected:
|
||||
virtual bool _OnTrigger(Player* /*player*/, AreaTriggerEntry const* /*trigger*/) = 0;
|
||||
void ResetAreaTriggerDone(InstanceScript* /*instance*/, uint32 /*triggerId*/);
|
||||
void ResetAreaTriggerDone(Player const* /*player*/, AreaTriggerEntry const* /*trigger*/);
|
||||
};
|
||||
|
||||
class TC_GAME_API BattlegroundScript : public ScriptObject
|
||||
{
|
||||
protected:
|
||||
|
||||
Reference in New Issue
Block a user