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

Public Member Functions

 npc_jaina_proudmoore ()
 
bool OnGossipSelect (Player *player, Creature *creature, uint32, uint32 action) override
 
bool OnGossipHello (Player *player, Creature *creature) override
 
CreatureAIGetAI (Creature *creature) const override
 
- Public Member Functions inherited from CreatureScript
virtual bool OnDummyEffect (Unit *, uint32, SpellEffIndex, Creature *)
 
virtual bool OnGossipSelectCode (Player *, Creature *, uint32, uint32, const char *)
 
virtual bool OnQuestAccept (Player *, Creature *, Quest const *)
 
virtual bool OnQuestSelect (Player *, Creature *, Quest const *)
 
virtual bool OnQuestReward (Player *, Creature *, Quest const *, uint32)
 
virtual uint32 GetDialogStatus (Player *, Creature *)
 
- Public Member Functions inherited from UnitScript
virtual void OnHeal (Unit *, Unit *, uint32 &)
 
virtual void OnDamage (Unit *, Unit *, uint32 &)
 
virtual void ModifyPeriodicDamageAurasTick (Unit *, Unit *, uint32 &)
 
virtual void ModifyMeleeDamage (Unit *, Unit *, uint32 &)
 
virtual void ModifySpellDamageTaken (Unit *, Unit *, int32 &)
 
- Public Member Functions inherited from ScriptObject
const std::string & GetName () const
 
- Public Member Functions inherited from UpdatableScript< Creature >
virtual void OnUpdate (Creature *, uint32)
 

Additional Inherited Members

- Protected Member Functions inherited from CreatureScript
 CreatureScript (const char *name)
 
- Protected Member Functions inherited from UnitScript
 UnitScript (const char *name, bool addToScripts=true)
 
- Protected Member Functions inherited from ScriptObject
 ScriptObject (const char *name)
 
virtual ~ScriptObject ()
 
- Protected Member Functions inherited from UpdatableScript< Creature >
 UpdatableScript ()
 
virtual ~UpdatableScript ()
 

Constructor & Destructor Documentation

npc_jaina_proudmoore::npc_jaina_proudmoore ( )
inline
54 : CreatureScript("npc_jaina_proudmoore") { }
CreatureScript(const char *name)
Definition: ScriptMgr.cpp:1586

Member Function Documentation

CreatureAI* npc_jaina_proudmoore::GetAI ( Creature creature) const
inlineoverridevirtual

Reimplemented from CreatureScript.

104  {
105  if (!creature->GetInstanceScript())
106  return NULL;
107 
108  hyjalAI* ai = new hyjalAI(creature);
109 
110  ai->Reset();
111  ai->EnterEvadeMode();
112 
113  ai->Spells[0].SpellId = SPELL_BLIZZARD;
114  ai->Spells[0].Cooldown = urand(15000, 35000);
116 
117  ai->Spells[1].SpellId = SPELL_PYROBLAST;
118  ai->Spells[1].Cooldown = urand(5500, 9500);
120 
122  ai->Spells[2].Cooldown = urand(15000, 45000);
124 
125  return ai;
126  }
InstanceScript * GetInstanceScript()
Definition: Object.cpp:1540
arena_t NULL
Definition: jemalloc_internal.h:624
Definition: boss_priestess_delrissa.cpp:766
Definition: hyjalAI.h:118
Definition: hyjalAI.h:103
uint32 TargetType
Definition: hyjalAI.h:202
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:45
Definition: boss_pyroguard_emberseer.cpp:44
struct hyjalAI::Spell Spells[HYJAL_AI_MAX_SPELLS]
uint32 Cooldown
Definition: hyjalAI.h:201
Definition: hyjalAI.h:102
void EnterEvadeMode(EvadeReason=EVADE_REASON_OTHER) override
Definition: hyjalAI.cpp:420
void Reset() override
Definition: hyjalAI.cpp:383
uint32 SpellId
Definition: hyjalAI.h:200
Definition: hyjalAI.h:36

+ Here is the call graph for this function:

bool npc_jaina_proudmoore::OnGossipHello ( Player player,
Creature creature 
)
inlineoverridevirtual

Reimplemented from CreatureScript.

82  {
83  hyjalAI* ai = ENSURE_AI(hyjalAI, creature->AI());
84  if (ai->EventBegun)
85  return false;
86 
88  uint32 AnetheronEncounter = ai->GetInstanceData(DATA_ANETHERONEVENT);
89  if (RageEncounter == NOT_STARTED)
91  else if (RageEncounter == DONE && AnetheronEncounter == NOT_STARTED)
93  else if (RageEncounter == DONE && AnetheronEncounter == DONE)
95 
96  if (player->IsGameMaster())
98 
99  player->SEND_GOSSIP_MENU(907, creature->GetGUID());
100  return true;
101  }
bool EventBegun
Definition: hyjalAI.h:174
#define GOSSIP_ITEM_BEGIN_ALLY
Definition: hyjal.cpp:38
Definition: ScriptedGossip.h:71
Definition: GossipDef.h:62
#define GOSSIP_ITEM_RETREAT
Definition: hyjal.cpp:44
Definition: hyjal.h:38
Definition: inflate.h:49
#define GOSSIP_ITEM_GM1
Definition: hyjal.cpp:49
#define ENSURE_AI(a, b)
Definition: ScriptedCreature.h:29
Definition: hyjalAI.h:118
Definition: hyjal.h:29
Definition: InstanceScript.h:58
CreatureAI * AI() const
Definition: Creature.h:525
uint32_t uint32
Definition: Define.h:150
Definition: ScriptedGossip.h:73
ObjectGuid const & GetGUID() const
Definition: Object.h:105
#define GOSSIP_ITEM_ANETHERON
Definition: hyjal.cpp:39
Definition: GossipDef.h:59
uint32 GetInstanceData(uint32 Event)
Definition: hyjalAI.cpp:609

+ Here is the call graph for this function:

bool npc_jaina_proudmoore::OnGossipSelect ( Player player,
Creature creature,
uint32  ,
uint32  action 
)
inlineoverridevirtual

Reimplemented from CreatureScript.

57  {
58  player->PlayerTalkClass->ClearMenus();
59  hyjalAI* ai = ENSURE_AI(hyjalAI, creature->AI());
60  switch (action)
61  {
62  case GOSSIP_ACTION_INFO_DEF + 1:
63  ai->StartEvent(player);
64  break;
65  case GOSSIP_ACTION_INFO_DEF + 2:
66  ai->FirstBossDead = true;
67  ai->WaveCount = 9;
68  ai->StartEvent(player);
69  break;
70  case GOSSIP_ACTION_INFO_DEF + 3:
71  ai->Retreat();
72  break;
74  ai->Debug = !ai->Debug;
75  TC_LOG_DEBUG("scripts", "HyjalAI - Debug mode has been toggled");
76  break;
77  }
78  return true;
79  }
Definition: ScriptedGossip.h:71
bool FirstBossDead
Definition: hyjalAI.h:175
#define TC_LOG_DEBUG(filterType__,...)
Definition: Log.h:198
#define ENSURE_AI(a, b)
Definition: ScriptedCreature.h:29
Definition: hyjalAI.h:118
bool Debug
Definition: hyjalAI.h:179
void StartEvent(Player *player)
Definition: hyjalAI.cpp:586
CreatureAI * AI() const
Definition: Creature.h:525
uint32 WaveCount
Definition: hyjalAI.h:168
void Retreat()
Definition: hyjalAI.cpp:614

+ Here is the call graph for this function:


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