mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core/Scripts: Implemented OnlyOnceAreaTriggerScript (#20288)
(cherry picked from commit 971ed856a4)
This commit is contained in:
@@ -451,6 +451,19 @@ class TC_GAME_API AreaTriggerScript : public ScriptObject
|
||||
virtual bool OnTrigger(Player* /*player*/, AreaTriggerEntry const* /*trigger*/, bool /*entered*/) { return false; }
|
||||
};
|
||||
|
||||
class TC_GAME_API OnlyOnceAreaTriggerScript : public AreaTriggerScript
|
||||
{
|
||||
using AreaTriggerScript::AreaTriggerScript;
|
||||
|
||||
public:
|
||||
bool OnTrigger(Player* player, AreaTriggerEntry const* trigger, bool entered) override;
|
||||
|
||||
protected:
|
||||
virtual bool _OnTrigger(Player* player, AreaTriggerEntry const* trigger, bool entered) = 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