TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
SmartTrigger Class Reference

Public Member Functions

 SmartTrigger ()
 
bool OnTrigger (Player *player, AreaTriggerEntry const *trigger, bool) override
 
- Public Member Functions inherited from ScriptObject
const std::string & GetName () const
 

Additional Inherited Members

- Protected Member Functions inherited from AreaTriggerScript
 AreaTriggerScript (const char *name)
 
- Protected Member Functions inherited from ScriptObject
 ScriptObject (const char *name)
 
virtual ~ScriptObject ()
 

Constructor & Destructor Documentation

SmartTrigger::SmartTrigger ( )
inline
911 : AreaTriggerScript("SmartTrigger") { }
AreaTriggerScript(const char *name)
Definition: ScriptMgr.cpp:1598

Member Function Documentation

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

Reimplemented from AreaTriggerScript.

914  {
915  if (!player->IsAlive())
916  return false;
917 
918  TC_LOG_DEBUG("scripts.ai", "AreaTrigger %u is using SmartTrigger script", trigger->ID);
919  SmartScript script;
920  script.OnInitialize(NULL, trigger);
921  script.ProcessEventsFor(SMART_EVENT_AREATRIGGER_ONTRIGGER, player, trigger->ID);
922  return true;
923  }
arena_t NULL
Definition: jemalloc_internal.h:624
Definition: SmartScriptMgr.h:150
#define TC_LOG_DEBUG(filterType__,...)
Definition: Log.h:198
void OnInitialize(WorldObject *obj, AreaTriggerEntry const *at=NULL)
Definition: SmartScript.cpp:3555
void ProcessEventsFor(SMART_EVENT e, Unit *unit=NULL, uint32 var0=0, uint32 var1=0, bool bvar=false, const SpellInfo *spell=NULL, GameObject *gob=NULL)
Definition: SmartScript.cpp:83
Definition: SmartScript.h:31

+ Here is the call graph for this function:


The documentation for this class was generated from the following file: