AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
go_orb_of_domination Class Reference
Inheritance diagram for go_orb_of_domination:
GameObjectScript ScriptObject UpdatableScript< GameObject >

Public Member Functions

 go_orb_of_domination ()
 
bool OnGossipHello (Player *player, GameObject *go) override
 
- Public Member Functions inherited from GameObjectScript
bool IsDatabaseBound () const override
 
virtual bool OnGossipHello (Player *, GameObject *)
 
virtual bool OnGossipSelect (Player *, GameObject *, uint32, uint32)
 
virtual bool OnGossipSelectCode (Player *, GameObject *, uint32, uint32, const char *)
 
virtual bool OnQuestAccept (Player *, GameObject *, Quest const *)
 
virtual bool OnQuestReward (Player *, GameObject *, Quest const *, uint32)
 
virtual uint32 GetDialogStatus (Player *, GameObject *)
 
virtual void OnDestroyed (GameObject *, Player *)
 
virtual void OnDamaged (GameObject *, Player *)
 
virtual void OnModifyHealth (GameObject *, Unit *, int32 &, SpellInfo const *)
 
virtual void OnLootStateChanged (GameObject *, uint32, Unit *)
 
virtual void OnGameObjectStateChanged (GameObject *, uint32)
 
virtual GameObjectAIGetAI (GameObject *) 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 ()
 
- Public Member Functions inherited from UpdatableScript< GameObject >
virtual void OnUpdate (GameObject *, uint32)
 

Additional Inherited Members

- Protected Member Functions inherited from GameObjectScript
 GameObjectScript (const char *name)
 
- Protected Member Functions inherited from ScriptObject
 ScriptObject (const char *name, uint16 totalAvailableHooks=0)
 
virtual ~ScriptObject ()=default
 
- Protected Member Functions inherited from UpdatableScript< GameObject >
 UpdatableScript ()=default
 

Detailed Description

Constructor & Destructor Documentation

◆ go_orb_of_domination()

go_orb_of_domination::go_orb_of_domination ( )
inline
290: GameObjectScript("go_orb_of_domination") { }
Definition: GameObjectScript.h:25

Member Function Documentation

◆ OnGossipHello()

bool go_orb_of_domination::OnGossipHello ( Player player,
GameObject go 
)
inlineoverridevirtual

Reimplemented from GameObjectScript.

293 {
294 if (InstanceScript* instance = go->GetInstanceScript())
295 if (instance->GetData(DATA_EGG_EVENT) != DONE && !player->HasAura(SPELL_MIND_EXHAUSTION) && !player->GetPet())
296 if (Creature* razor = ObjectAccessor::GetCreature(*go, instance->GetGuidData(DATA_RAZORGORE_THE_UNTAMED)))
297 {
298 razor->AI()->SetGUID(player->GetGUID());
299 razor->Attack(player, true);
300 player->CastSpell(razor, SPELL_MINDCONTROL);
301 }
302 return true;
303 }
@ DATA_EGG_EVENT
Definition: blackwing_lair.h:112
@ DATA_RAZORGORE_THE_UNTAMED
Definition: blackwing_lair.h:31
@ SPELL_MINDCONTROL
Definition: boss_razorgore.cpp:38
@ SPELL_MIND_EXHAUSTION
Definition: boss_razorgore.cpp:41
@ DONE
Definition: InstanceScript.h:60
Creature * GetCreature(WorldObject const &u, ObjectGuid const guid)
Definition: ObjectAccessor.cpp:210
Definition: Creature.h:43
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:112
InstanceScript * GetInstanceScript() const
Definition: Object.cpp:1203
Pet * GetPet() const
Definition: Player.cpp:8939
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
Definition: Unit.cpp:5698
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:1167
Definition: InstanceScript.h:142

References Unit::CastSpell(), DATA_EGG_EVENT, DATA_RAZORGORE_THE_UNTAMED, DONE, ObjectAccessor::GetCreature(), Object::GetGUID(), WorldObject::GetInstanceScript(), Player::GetPet(), Unit::HasAura(), SPELL_MIND_EXHAUSTION, and SPELL_MINDCONTROL.