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

Public Member Functions

 at_commander_dawnforge ()
 
bool OnTrigger (Player *player, const AreaTriggerEntry *, 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

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

Member Function Documentation

bool at_commander_dawnforge::OnTrigger ( Player player,
const AreaTriggerEntry ,
bool   
)
inlineoverridevirtual

Reimplemented from AreaTriggerScript.

319  {
320  //if player lost aura or not have at all, we should not try start event.
321  if (!player->HasAura(SPELL_SUNFURY_DISGUISE))
322  return false;
323 
324  if (player->IsAlive() && player->GetQuestStatus(QUEST_INFO_GATHERING) == QUEST_STATUS_INCOMPLETE)
325  {
326  Creature* Dawnforge = player->FindNearestCreature(CreatureEntry[1], 30.0f);
327  if (!Dawnforge)
328  return false;
329 
330  if (ENSURE_AI(npc_commander_dawnforge::npc_commander_dawnforgeAI, Dawnforge->AI())->CanStartEvent(player))
331  return true;
332  }
333  return false;
334  }
Definition: Creature.h:467
CreatureEntry
Definition: boss_illidan.cpp:141
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition: Object.cpp:2443
Definition: zone_netherstorm.cpp:60
#define ENSURE_AI(a, b)
Definition: ScriptedCreature.h:29
CreatureAI * AI() const
Definition: Creature.h:525
Definition: zone_netherstorm.cpp:82
Definition: QuestDef.h:113
Definition: zone_netherstorm.cpp:61

+ Here is the call graph for this function:


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