AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
RestoreAttack Class Reference
Inheritance diagram for RestoreAttack:
BasicEvent

Public Member Functions

 RestoreAttack (Creature *boss)
 
bool Execute (uint64, uint32) override
 
- Public Member Functions inherited from BasicEvent
 BasicEvent ()=default
 
virtual ~BasicEvent ()=default
 
virtual bool Execute (uint64, uint32)
 
virtual bool IsDeletable () const
 
virtual void Abort (uint64)
 
void ScheduleAbort ()
 

Private Attributes

Creature_boss
 

Detailed Description

Constructor & Destructor Documentation

◆ RestoreAttack()

RestoreAttack::RestoreAttack ( Creature boss)
inline
78: _boss(boss) {}
Creature * _boss
Definition: instance_blackrock_depths.cpp:95

Member Function Documentation

◆ Execute()

bool RestoreAttack::Execute ( uint64  ,
uint32   
)
inlineoverridevirtual

Reimplemented from BasicEvent.

81 {
84
85 if (Unit* victim = _boss->GetVictim())
86 {
87 _boss->SetTarget(victim->GetGUID());
89 }
90
91 return true;
92 }
@ DONE
Definition: InstanceScript.h:60
@ REACT_AGGRESSIVE
Definition: Unit.h:550
@ DATA_GOLEM_LORD_ARGELMACH_INIT
Definition: blackrock_depths.h:71
virtual void SetData(uint32, uint32)
Definition: UnitAI.h:214
void SetTarget(ObjectGuid guid=ObjectGuid::Empty) override
Definition: Creature.cpp:3532
void SetReactState(ReactStates state)
A creature can have 3 ReactStates : Agressive, Passive, Neutral.
Definition: Creature.h:97
CreatureAI * AI() const
Definition: Creature.h:143
Definition: Unit.h:630
MotionMaster * GetMotionMaster()
Definition: Unit.h:1601
Unit * GetVictim() const
Definition: Unit.h:789
void MoveChase(Unit *target, std::optional< ChaseRange > dist={}, std::optional< ChaseAngle > angle={})
Force the unit to chase this target. Doesn't work with UNIT_FLAG_DISABLE_MOVE.
Definition: MotionMaster.cpp:313

References _boss, Creature::AI(), DATA_GOLEM_LORD_ARGELMACH_INIT, DONE, Unit::GetMotionMaster(), Unit::GetVictim(), MotionMaster::MoveChase(), REACT_AGGRESSIVE, UnitAI::SetData(), Creature::SetReactState(), and Creature::SetTarget().

Member Data Documentation

◆ _boss

Creature* RestoreAttack::_boss
private

Referenced by Execute().