#include "AreaTriggerScript.h"
◆ _OnTrigger()
virtual bool OnlyOnceAreaTriggerScript::_OnTrigger |
( |
Player * |
, |
|
|
AreaTrigger const * |
|
|
) |
| |
|
protectedpure virtual |
Implemented in at_karazhan_side_entrance, at_sunwell_madrigosa, at_sunwell_eredar_twins, at_rp_nethekurse, at_icc_spire_frostwyrm, at_zulgurub_entrance_speech, at_zulgurub_bridge_speech, at_zulgurub_temple_speech, at_zulgurub_bloodfire_pit_speech, at_zulgurub_edge_of_madness_speech, at_twin_emperors, and at_underbog_ghazan.
Referenced by OnTrigger().
◆ AreaTriggerScript()
AreaTriggerScript::AreaTriggerScript |
( |
const char * |
name | ) |
|
|
private |
45{
47}
static void AddScript(TScript *const script, std::vector< uint16 > enabledHooks={})
Definition: ScriptMgr.h:738
Definition: ScriptObject.h:43
◆ 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:1203
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 |