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

Classes

struct  npc_engineer_heliceAI
 

Public Member Functions

 npc_engineer_helice ()
 
CreatureAIGetAI (Creature *creature) const override
 
bool OnQuestAccept (Player *player, Creature *creature, const Quest *quest) 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_engineer_helice()

npc_engineer_helice::npc_engineer_helice ( )
inline
714: CreatureScript("npc_engineer_helice") { }
Definition: CreatureScript.h:25

Member Function Documentation

◆ GetAI()

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

Reimplemented from CreatureScript.

792 {
793 return new npc_engineer_heliceAI(creature);
794 }

◆ OnQuestAccept()

bool npc_engineer_helice::OnQuestAccept ( Player player,
Creature creature,
const Quest quest 
)
inlineoverridevirtual

Reimplemented from CreatureScript.

797 {
798 if (quest->GetQuestId() == QUEST_DISASTER)
799 {
800 if (npc_engineer_heliceAI* pEscortAI = CAST_AI(npc_engineer_helice::npc_engineer_heliceAI, creature->AI()))
801 {
802 creature->GetMotionMaster()->MoveJumpTo(0, 0.4f, 0.4f);
804
805 pEscortAI->Start(false, false, player->GetGUID());
806 creature->AI()->Talk(SAY_WP_1);
807 }
808 }
809 return true;
810 }
#define CAST_AI(a, b)
Definition: UnitAI.h:26
@ QUEST_DISASTER
Definition: zone_sholazar_basin.cpp:708
@ SAY_WP_1
Definition: zone_sholazar_basin.cpp:699
@ FACTION_ESCORTEE_N_NEUTRAL_PASSIVE
Definition: SharedDefines.h:211
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:143
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:109
void SetFaction(uint32 faction)
Definition: Unit.cpp:10018
MotionMaster * GetMotionMaster()
Definition: Unit.h:1601
void MoveJumpTo(float angle, float speedXY, float speedZ)
The unit will jump in a specific direction.
Definition: MotionMaster.cpp:584
uint32 GetQuestId() const
Definition: QuestDef.h:228
Definition: zone_sholazar_basin.cpp:717

References Creature::AI(), CAST_AI, FACTION_ESCORTEE_N_NEUTRAL_PASSIVE, Object::GetGUID(), Unit::GetMotionMaster(), Quest::GetQuestId(), MotionMaster::MoveJumpTo(), QUEST_DISASTER, SAY_WP_1, Unit::SetFaction(), and CreatureAI::Talk().