AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
SmartTrigger Class Reference
Inheritance diagram for SmartTrigger:
AreaTriggerScript ScriptObject

Public Member Functions

 SmartTrigger ()
 
bool OnTrigger (Player *player, AreaTrigger const *trigger) override
 
- Public Member Functions inherited from AreaTriggerScript
bool IsDatabaseBound () const override
 
virtual bool OnTrigger (Player *, AreaTrigger const *)
 
- Public Member Functions inherited from ScriptObject
virtual bool IsDatabaseBound () const
 
virtual bool isAfterLoadScript () const
 
virtual void checkValidity ()
 
const std::string & GetName () const
 
uint16 GetTotalAvailableHooks ()
 

Additional Inherited Members

- Protected Member Functions inherited from AreaTriggerScript
 AreaTriggerScript (const char *name)
 
- Protected Member Functions inherited from ScriptObject
 ScriptObject (const char *name, uint16 totalAvailableHooks=0)
 
virtual ~ScriptObject ()=default
 

Detailed Description

Constructor & Destructor Documentation

◆ SmartTrigger()

SmartTrigger::SmartTrigger ( )
inline
1303: AreaTriggerScript("SmartTrigger") {}
Definition: AreaTriggerScript.h:24

Member Function Documentation

◆ OnTrigger()

bool SmartTrigger::OnTrigger ( Player player,
AreaTrigger const *  trigger 
)
inlineoverridevirtual

Reimplemented from AreaTriggerScript.

1306 {
1307 if (!player->IsAlive())
1308 return false;
1309
1310 LOG_DEBUG("sql.sql", "AreaTrigger {} is using SmartTrigger script", trigger->entry);
1311 SmartScript script;
1312 script.OnInitialize(nullptr, trigger);
1313 script.ProcessEventsFor(SMART_EVENT_AREATRIGGER_ONTRIGGER, player, trigger->entry);
1314 return true;
1315 }
#define LOG_DEBUG(filterType__,...)
Definition: Log.h:169
@ SMART_EVENT_AREATRIGGER_ONTRIGGER
Definition: SmartScriptMgr.h:164
Definition: SmartScript.h:29
void ProcessEventsFor(SMART_EVENT e, Unit *unit=nullptr, uint32 var0=0, uint32 var1=0, bool bvar=false, SpellInfo const *spell=nullptr, GameObject *gob=nullptr)
Definition: SmartScript.cpp:135
void OnInitialize(WorldObject *obj, AreaTrigger const *at=nullptr)
Definition: SmartScript.cpp:5131
bool IsAlive() const
Definition: Unit.h:1654

References AreaTrigger::entry, Unit::IsAlive(), LOG_DEBUG, SmartScript::OnInitialize(), SmartScript::ProcessEventsFor(), and SMART_EVENT_AREATRIGGER_ONTRIGGER.