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

Public Member Functions

 UtherBatteredHiltEvent (Creature &owner, uint8 eventId)
 
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_owner
 
uint8 _eventId
 

Detailed Description

Constructor & Destructor Documentation

◆ UtherBatteredHiltEvent()

UtherBatteredHiltEvent::UtherBatteredHiltEvent ( Creature owner,
uint8  eventId 
)
inline
27: _owner(owner), _eventId(eventId) { }
uint8 _eventId
Definition: instance_halls_of_reflection.cpp:125
Creature & _owner
Definition: instance_halls_of_reflection.cpp:124

Member Function Documentation

◆ Execute()

bool UtherBatteredHiltEvent::Execute ( uint64  ,
uint32   
)
inlineoverridevirtual

Reimplemented from BasicEvent.

30 {
31 switch (_eventId)
32 {
33 case 1:
34 _owner.UpdatePosition(5300.53f, 1987.80f, 707.70f, 3.89f, true);
37 _owner.SetVisible(true);
38 _owner.NearTeleportTo(5300.53f, 1987.80f, 707.70f, 3.89f);
40 break;
41 case 2:
43 break;
44 case 3:
47 if (InstanceScript* instance = _owner.GetInstanceScript())
48 instance->SetData(DATA_BATTERED_HILT, 4);
50 {
51 quel->AI()->Talk(EMOTE_QUEL_SPAWN);
52 }
54 break;
55 case 4:
56 _owner.SetWalk(false);
57 _owner.GetMotionMaster()->MovePoint(0, 5337.53f, 1981.21f, 709.32f);
59 break;
60 case 5:
61 _owner.SetFacingTo(2.82f);
63 break;
64 case 6:
65 if (InstanceScript* instance = _owner.GetInstanceScript())
66 instance->SetData(DATA_BATTERED_HILT, 6);
68 break;
69 case 7:
70 if (InstanceScript* instance = _owner.GetInstanceScript())
71 {
72 instance->SetData(DATA_BATTERED_HILT, 7);
73 }
75 {
76 quel->AI()->Talk(EMOTE_QUEL_PREPARE);
77 }
79 break;
80 case 8:
83 if (InstanceScript* instance = _owner.GetInstanceScript())
84 instance->SetData(DATA_BATTERED_HILT, 8);
85 break;
86 case 9:
89 break;
90 case 10:
93 break;
94 case 11:
97 break;
98 case 12:
101 break;
102 case 13:
103 _owner.CastSpell((Unit*)nullptr, 73036, true);
105 break;
106 case 14:
107 {
111 _owner.SetVisible(false);
115 if (InstanceScript* instance = _owner.GetInstanceScript())
116 instance->SetData(DATA_BATTERED_HILT, 9);
117 }
118 break;
119 }
120 return true;
121 }
@ REACT_PASSIVE
Definition: Unit.h:548
@ REACT_AGGRESSIVE
Definition: Unit.h:550
@ UNIT_STAND_STATE_KNEEL
Definition: UnitDefines.h:40
@ NPC_QUEL_DELAR
Definition: halls_of_reflection.h:80
@ SPELL_SUMMON_EVIL_QUEL
Definition: halls_of_reflection.h:299
@ EMOTE_QUEL_PREPARE
Definition: halls_of_reflection.h:229
@ SAY_BATTERED_HILT_OUTRO3
Definition: halls_of_reflection.h:232
@ SAY_BATTERED_HILT_OUTRO4
Definition: halls_of_reflection.h:233
@ SAY_BATTERED_HILT_OUTRO1
Definition: halls_of_reflection.h:230
@ SAY_BATTERED_HILT_REALIZE
Definition: halls_of_reflection.h:228
@ SAY_BATTERED_HILT_OUTRO2
Definition: halls_of_reflection.h:231
@ EMOTE_QUEL_SPAWN
Definition: halls_of_reflection.h:227
@ SAY_BATTERED_HILT_HALT
Definition: halls_of_reflection.h:226
@ DATA_BATTERED_HILT
Definition: halls_of_reflection.h:36
Position const homePos
Definition: boss_chromaggus.cpp:71
void AddEvent(BasicEvent *Event, uint64 e_time, bool set_addtime=true)
Definition: EventProcessor.h:103
uint64 CalculateTime(uint64 t_offset) const
Definition: EventProcessor.cpp:159
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr, Milliseconds delay=0s)
Causes the creature to talk/say the text assigned to their entry in the creature_text database table.
Definition: CreatureAI.cpp:50
Definition: Creature.h:46
void GetHomePosition(float &x, float &y, float &z, float &ori) const
Definition: Creature.h:339
void SetReactState(ReactStates state)
A creature can have 3 ReactStates : Agressive, Passive, Neutral.
Definition: Creature.h:97
bool SetWalk(bool enable) override
Enable or disable the creature's walk mode by removing: MOVEMENTFLAG_WALKING. Infom also the client.
Definition: Creature.cpp:3178
CreatureAI * AI() const
Definition: Creature.h:143
InstanceScript * GetInstanceScript() const
Definition: Object.cpp:1192
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition: Object.cpp:2446
Definition: Position.h:28
float GetPositionZ() const
Definition: Position.h:119
float GetOrientation() const
Definition: Position.h:120
float GetPositionX() const
Definition: Position.h:117
float GetPositionY() const
Definition: Position.h:118
Definition: Unit.h:630
void SetVisible(bool x)
Definition: Unit.cpp:14189
void SetFacingTo(float ori)
Definition: Unit.cpp:20483
MotionMaster * GetMotionMaster()
Definition: Unit.h:1601
virtual bool UpdatePosition(float x, float y, float z, float ang, bool teleport=false)
Definition: Unit.cpp:19983
EventProcessor m_Events
Definition: Unit.h:1792
SpellCastResult CastSpell(SpellCastTargets const &targets, SpellInfo const *spellInfo, CustomSpellValues const *value, TriggerCastFlags triggerFlags=TRIGGERED_NONE, Item *castItem=nullptr, AuraEffect const *triggeredByAura=nullptr, ObjectGuid originalCaster=ObjectGuid::Empty)
Definition: Unit.cpp:1168
void StopMovingOnCurrentPos()
Definition: Unit.cpp:16645
void NearTeleportTo(Position &pos, bool casting=false, bool vehicleTeleport=false, bool withPet=false, bool removeTransport=false)
Definition: Unit.cpp:19937
void SetStandState(uint8 state)
Definition: Unit.cpp:16682
void SetImmuneToAll(bool apply, bool keepCombat=false)
Definition: Unit.h:810
Definition: InstanceScript.h:142
void MovePoint(uint32 id, const Position &pos, bool generatePath=true, bool forceDestination=true)
Definition: MotionMaster.h:211
void Clear(bool reset=true)
Definition: MotionMaster.h:165
Definition: instance_halls_of_reflection.cpp:25

References _eventId, _owner, EventProcessor::AddEvent(), Creature::AI(), EventProcessor::CalculateTime(), Unit::CastSpell(), MotionMaster::Clear(), DATA_BATTERED_HILT, EMOTE_QUEL_PREPARE, EMOTE_QUEL_SPAWN, WorldObject::FindNearestCreature(), Creature::GetHomePosition(), WorldObject::GetInstanceScript(), Unit::GetMotionMaster(), Position::GetOrientation(), Position::GetPositionX(), Position::GetPositionY(), Position::GetPositionZ(), homePos, Unit::m_Events, MotionMaster::MovePoint(), Unit::NearTeleportTo(), NPC_QUEL_DELAR, REACT_AGGRESSIVE, REACT_PASSIVE, SAY_BATTERED_HILT_HALT, SAY_BATTERED_HILT_OUTRO1, SAY_BATTERED_HILT_OUTRO2, SAY_BATTERED_HILT_OUTRO3, SAY_BATTERED_HILT_OUTRO4, SAY_BATTERED_HILT_REALIZE, Unit::SetFacingTo(), Unit::SetImmuneToAll(), Creature::SetReactState(), Unit::SetStandState(), Unit::SetVisible(), Creature::SetWalk(), SPELL_SUMMON_EVIL_QUEL, Unit::StopMovingOnCurrentPos(), CreatureAI::Talk(), UNIT_STAND_STATE_KNEEL, and Unit::UpdatePosition().

Member Data Documentation

◆ _eventId

uint8 UtherBatteredHiltEvent::_eventId
private

Referenced by Execute().

◆ _owner

Creature& UtherBatteredHiltEvent::_owner
private

Referenced by Execute().