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

Public Member Functions

 go_gauntlet_gate ()
 
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_gauntlet_gate::go_gauntlet_gate ( )
inline
47 : GameObjectScript("go_gauntlet_gate") { }
GameObjectScript(const char *name)
Definition: ScriptMgr.cpp:1592

Member Function Documentation

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

Reimplemented from GameObjectScript.

50  {
51  InstanceScript* instance = go->GetInstanceScript();
52 
53  if (!instance)
54  return false;
55 
56  if (instance->GetData(TYPE_BARON_RUN) != NOT_STARTED)
57  return false;
58 
59  if (Group* group = player->GetGroup())
60  {
61  for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next())
62  {
63  Player* pGroupie = itr->GetSource();
64  if (!pGroupie)
65  continue;
66 
67  if (pGroupie->GetQuestStatus(QUEST_DEAD_MAN_PLEA) == QUEST_STATUS_INCOMPLETE &&
68  !pGroupie->HasAura(SPELL_BARON_ULTIMATUM) &&
69  pGroupie->GetMap() == go->GetMap())
70  pGroupie->CastSpell(pGroupie, SPELL_BARON_ULTIMATUM, true);
71  }
72  } else if (player->GetQuestStatus(QUEST_DEAD_MAN_PLEA) == QUEST_STATUS_INCOMPLETE &&
73  !player->HasAura(SPELL_BARON_ULTIMATUM) &&
74  player->GetMap() == go->GetMap())
75  player->CastSpell(player, SPELL_BARON_ULTIMATUM, true);
76 
78  return false;
79  }
Map * GetMap() const
Definition: Object.h:543
InstanceScript * GetInstanceScript()
Definition: Object.cpp:1540
virtual uint32 GetData(uint32) const
Definition: ZoneScript.h:51
arena_t NULL
Definition: jemalloc_internal.h:624
Definition: stratholme.h:76
Definition: stratholme.h:26
Definition: InstanceScript.h:59
virtual void SetData(uint32, uint32)
Definition: ZoneScript.h:52
Definition: InstanceScript.h:58
Definition: stratholme.h:81
Definition: QuestDef.h:113
Definition: InstanceScript.h:141
Definition: Group.h:191
Definition: GroupReference.h:27

+ Here is the call graph for this function:


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