#include "AreaTriggerScript.h"
◆ _OnTrigger()
virtual bool OnlyOnceAreaTriggerScript::_OnTrigger |
( |
Player * |
, |
|
|
AreaTrigger const * |
|
|
) |
| |
|
protectedpure virtual |
◆ AreaTriggerScript()
AreaTriggerScript::AreaTriggerScript |
( |
const char * |
name | ) |
|
|
private |
45{
47}
static void AddScript(TScript *const script, std::vector< uint16 > enabledHooks={})
Definition: ScriptMgr.h:737
Definition: ScriptObject.h:44
◆ OnTrigger()
bool OnlyOnceAreaTriggerScript::OnTrigger |
( |
Player * |
player, |
|
|
AreaTrigger const * |
trigger |
|
) |
| |
|
overridevirtual |
Reimplemented from AreaTriggerScript.
50{
51 uint32 const triggerId = trigger->entry;
52
54 {
55 if (instance->IsAreaTriggerDone(triggerId))
56 {
57 return true;
58 }
59 else
60 {
61 instance->MarkAreaTriggerDone(triggerId);
62 }
63 }
64
66}
std::uint32_t uint32
Definition: Define.h:107
InstanceScript * GetInstanceScript() const
Definition: Object.cpp:1192
Definition: InstanceScript.h:142
virtual bool _OnTrigger(Player *, AreaTrigger const *)=0
References _OnTrigger(), AreaTrigger::entry, and WorldObject::GetInstanceScript().
◆ ResetAreaTriggerDone() [1/2]
◆ ResetAreaTriggerDone() [2/2]
void OnlyOnceAreaTriggerScript::ResetAreaTriggerDone |
( |
Player const * |
player, |
|
|
AreaTrigger const * |
trigger |
|
) |
| |
|
protected |