AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
npc_hyjal_jaina Class Reference
Inheritance diagram for npc_hyjal_jaina:
CreatureScript ScriptObject UpdatableScript< Creature >

Classes

struct  hyjalJainaAI
 

Public Member Functions

 npc_hyjal_jaina ()
 
CreatureAIGetAI (Creature *creature) const override
 
bool OnGossipSelect (Player *, Creature *creature, uint32, uint32) override
 
- Public Member Functions inherited from CreatureScript
bool IsDatabaseBound () const override
 
virtual bool OnGossipHello (Player *, Creature *)
 
virtual bool OnGossipSelect (Player *, Creature *, uint32, uint32)
 
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 OnQuestComplete (Player *, Creature *, Quest const *)
 
virtual bool OnQuestReward (Player *, Creature *, Quest const *, uint32)
 
virtual uint32 GetDialogStatus (Player *, Creature *)
 
virtual CreatureAIGetAI (Creature *) const
 
virtual void OnFfaPvpStateUpdate (Creature *, bool)
 
- 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< Creature >
virtual void OnUpdate (Creature *, uint32)
 

Additional Inherited Members

- Protected Member Functions inherited from CreatureScript
 CreatureScript (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< Creature >
 UpdatableScript ()=default
 

Detailed Description

Constructor & Destructor Documentation

◆ npc_hyjal_jaina()

npc_hyjal_jaina::npc_hyjal_jaina ( )
inline
98: CreatureScript("npc_hyjal_jaina") { }
Definition: CreatureScript.h:25

Member Function Documentation

◆ GetAI()

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

Reimplemented from CreatureScript.

101 {
102 return new hyjalJainaAI(creature);
103 }

◆ OnGossipSelect()

bool npc_hyjal_jaina::OnGossipSelect ( Player ,
Creature creature,
uint32  ,
uint32   
)
inlineoverridevirtual

Reimplemented from CreatureScript.

178 {
180
181 if (InstanceScript* hyjal = creature->GetInstanceScript())
182 {
183 if (hyjal->GetBossState(DATA_WINTERCHILL) != DONE || hyjal->GetBossState(DATA_ANETHERON) != DONE)
184 {
185 hyjal->SetData(DATA_RESET_WAVES, 0);
186 hyjal->SetData(DATA_SPAWN_WAVES, 0);
187 }
188 else
189 {
190 creature->AI()->Talk(SAY_SUCCESS);
191 creature->GetMotionMaster()->MovePath(JAINA_RETREAT_PATH, false);
192 }
193 }
194 return true;
195 }
@ JAINA_RETREAT_PATH
Definition: hyjal.h:164
@ DATA_RESET_WAVES
Definition: hyjal.h:49
@ DATA_SPAWN_WAVES
Definition: hyjal.h:44
@ DATA_WINTERCHILL
Definition: hyjal.h:31
@ DATA_ANETHERON
Definition: hyjal.h:32
@ SAY_SUCCESS
Definition: hyjal.cpp:88
@ DONE
Definition: InstanceScript.h:60
@ UNIT_NPC_FLAG_GOSSIP
Definition: UnitDefines.h:294
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
CreatureAI * AI() const
Definition: Creature.h:140
InstanceScript * GetInstanceScript() const
Definition: Object.cpp:1203
MotionMaster * GetMotionMaster()
Definition: Unit.h:1620
void RemoveNpcFlag(NPCFlags flags)
Definition: Unit.h:727
Definition: InstanceScript.h:142
void MovePath(uint32 path_id, bool repeatable)
Move the unit following a specific path. Doesn't work with UNIT_FLAG_DISABLE_MOVE.
Definition: MotionMaster.cpp:852

References Creature::AI(), DATA_ANETHERON, DATA_RESET_WAVES, DATA_SPAWN_WAVES, DATA_WINTERCHILL, DONE, WorldObject::GetInstanceScript(), Unit::GetMotionMaster(), JAINA_RETREAT_PATH, MotionMaster::MovePath(), Unit::RemoveNpcFlag(), SAY_SUCCESS, CreatureAI::Talk(), and UNIT_NPC_FLAG_GOSSIP.