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

Public Member Functions

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

◆ at_commander_dawnforge()

at_commander_dawnforge::at_commander_dawnforge ( )
inline
562: AreaTriggerScript("at_commander_dawnforge") { }
Definition: AreaTriggerScript.h:24

Member Function Documentation

◆ OnTrigger()

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

Reimplemented from AreaTriggerScript.

565 {
566 //if player lost aura or not have at all, we should not try start event.
567 if (!player->HasAura(SPELL_SUNFURY_DISGUISE))
568 return false;
569
571 {
572 Creature* Dawnforge = player->FindNearestCreature(CreatureEntry[1], 30.0f);
573 if (!Dawnforge)
574 return false;
575
576 if (CAST_AI(npc_commander_dawnforge::npc_commander_dawnforgeAI, Dawnforge->AI())->CanStartEvent(player))
577 return true;
578 }
579 return false;
580 }
@ QUEST_STATUS_INCOMPLETE
Definition: QuestDef.h:103
#define CAST_AI(a, b)
Definition: UnitAI.h:26
@ QUEST_INFO_GATHERING
Definition: zone_netherstorm.cpp:314
@ SPELL_SUNFURY_DISGUISE
Definition: zone_netherstorm.cpp:315
Definition: ChatCommandTags.h:257
Definition: Creature.h:46
CreatureAI * AI() const
Definition: Creature.h:143
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition: Object.cpp:2446
QuestStatus GetQuestStatus(uint32 quest_id) const
Definition: PlayerQuest.cpp:1424
bool IsAlive() const
Definition: Unit.h:1204
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
Definition: Unit.cpp:5669
Definition: zone_netherstorm.cpp:337

References Creature::AI(), CAST_AI, WorldObject::FindNearestCreature(), Player::GetQuestStatus(), Unit::HasAura(), Unit::IsAlive(), QUEST_INFO_GATHERING, QUEST_STATUS_INCOMPLETE, and SPELL_SUNFURY_DISGUISE.