TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
go_manticron_cube Class Reference

Public Member Functions

 go_manticron_cube ()
 
bool OnGossipHello (Player *player, GameObject *go) override
 
- Public Member Functions inherited from GameObjectScript
virtual bool OnDummyEffect (Unit *, uint32, SpellEffIndex, 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 OnLootStateChanged (GameObject *, uint32, Unit *)
 
virtual void OnGameObjectStateChanged (GameObject *, uint32)
 
virtual GameObjectAIGetAI (GameObject *) const
 
- Public Member Functions inherited from ScriptObject
const std::string & GetName () const
 
- 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)
 
virtual ~ScriptObject ()
 
- Protected Member Functions inherited from UpdatableScript< GameObject >
 UpdatableScript ()
 
virtual ~UpdatableScript ()
 

Constructor & Destructor Documentation

go_manticron_cube::go_manticron_cube ( )
inline
596  : GameObjectScript("go_manticron_cube")
597  {
598  }
GameObjectScript(const char *name)
Definition: ScriptMgr.cpp:1592

Member Function Documentation

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

Reimplemented from GameObjectScript.

601  {
602  InstanceScript* instance = go->GetInstanceScript();
603 
604  if (!instance)
605  return true;
606 
607  if (instance->GetData(DATA_MAGTHERIDON_EVENT) != IN_PROGRESS)
608  return true;
609  Creature* Magtheridon =ObjectAccessor::GetCreature(*go, instance->GetGuidData(DATA_MAGTHERIDON));
610  if (!Magtheridon || !Magtheridon->IsAlive())
611  return true;
612 
613  // if exhausted or already channeling return
614  if (player->HasAura(SPELL_MIND_EXHAUSTION) || player->HasAura(SPELL_SHADOW_GRASP))
615  return true;
616 
617  player->InterruptNonMeleeSpells(false);
618  player->CastSpell(player, SPELL_SHADOW_GRASP, true);
619  player->CastSpell(player, SPELL_SHADOW_GRASP_VISUAL, false);
620  ENSURE_AI(boss_magtheridon::boss_magtheridonAI, Magtheridon->AI())->SetClicker(go->GetGUID(), player->GetGUID());
621  return true;
622  }
Definition: boss_magtheridon.cpp:74
InstanceScript * GetInstanceScript()
Definition: Object.cpp:1540
Definition: boss_magtheridon.cpp:72
virtual uint32 GetData(uint32) const
Definition: ZoneScript.h:51
Definition: Creature.h:467
Definition: boss_magtheridon.cpp:212
Definition: boss_magtheridon.cpp:73
#define ENSURE_AI(a, b)
Definition: ScriptedCreature.h:29
virtual ObjectGuid GetGuidData(uint32 type) const override
Definition: InstanceScript.cpp:93
Definition: InstanceScript.h:59
bool IsAlive() const
Definition: Unit.h:1692
CreatureAI * AI() const
Definition: Creature.h:525
Definition: magtheridons_lair.h:26
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:174
ObjectGuid const & GetGUID() const
Definition: Object.h:105
void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid=0, bool withInstant=true)
Definition: Unit.cpp:2916
Definition: InstanceScript.h:141
Definition: magtheridons_lair.h:27

+ Here is the call graph for this function:


The documentation for this class was generated from the following file: