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

Public Member Functions

 SendEncounterUnit (Player *owner)
 
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

Player_owner
 

Detailed Description

Constructor & Destructor Documentation

◆ SendEncounterUnit()

SendEncounterUnit::SendEncounterUnit ( Player owner)
inline
184: _owner(owner) { }
Player * _owner
Definition: boss_halion.cpp:205

Member Function Documentation

◆ Execute()

bool SendEncounterUnit::Execute ( uint64  ,
uint32   
)
inlineoverridevirtual

Reimplemented from BasicEvent.

187 {
189 if (!instance || _owner->GetMapId() != 724)
190 return true;
191
192 if (instance->GetBossState(DATA_HALION) != IN_PROGRESS)
193 {
195 return true;
196 }
197
200 _owner->GetSession()->SendPacket(&data);
201 return true;
202 }
std::uint32_t uint32
Definition: Define.h:107
@ SPELL_TWILIGHT_REALM
Definition: boss_halion.cpp:117
@ DATA_HALION
Definition: ruby_sanctum.h:36
@ ENCOUNTER_FRAME_REFRESH_FRAMES
Definition: InstanceScript.h:52
@ IN_PROGRESS
Definition: InstanceScript.h:58
@ SMSG_UPDATE_INSTANCE_ENCOUNTER_UNIT
Definition: Opcodes.h:562
InstanceScript * GetInstanceScript() const
Definition: Object.cpp:1203
uint32 GetMapId() const
Definition: Position.h:275
WorldSession * GetSession() const
Definition: Player.h:1998
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint8 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition: Unit.cpp:4909
Definition: InstanceScript.h:142
EncounterState GetBossState(uint32 id) const
Definition: InstanceScript.h:235
Definition: WorldPacket.h:26
void SendPacket(WorldPacket const *packet)
Send a packet to the client.
Definition: WorldSession.cpp:214

References _owner, DATA_HALION, ENCOUNTER_FRAME_REFRESH_FRAMES, InstanceScript::GetBossState(), WorldObject::GetInstanceScript(), WorldLocation::GetMapId(), Player::GetSession(), IN_PROGRESS, Unit::RemoveAurasDueToSpell(), WorldSession::SendPacket(), SMSG_UPDATE_INSTANCE_ENCOUNTER_UNIT, and SPELL_TWILIGHT_REALM.

Member Data Documentation

◆ _owner

Player* SendEncounterUnit::_owner
private

Referenced by Execute().