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

Classes

struct  npc_kernobeeAI
 

Public Member Functions

 npc_kernobee ()
 
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_kernobee()

npc_kernobee::npc_kernobee ( )
inline
106: CreatureScript("npc_kernobee") { }
Definition: CreatureScript.h:25

Member Function Documentation

◆ GetAI()

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

Reimplemented from CreatureScript.

109 {
110 return GetGnomereganAI<npc_kernobeeAI>(creature);
111 }

◆ OnQuestAccept()

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

Reimplemented from CreatureScript.

114 {
115 if (quest->GetQuestId() == QUEST_A_FINE_MESS)
116 {
118 creature->AI()->SetGUID(player->GetGUID(), 0);
120 }
121 return true;
122 }
@ QUEST_A_FINE_MESS
Definition: instance_gnomeregan.cpp:100
@ UNIT_STAND_STATE_STAND
Definition: UnitDefines.h:32
#define PET_FOLLOW_DIST
Definition: PetDefines.h:198
@ MOTION_SLOT_CONTROLLED
Definition: MotionMaster.h:65
virtual void SetGUID(ObjectGuid, int32=0)
Definition: UnitAI.h:215
CreatureAI * AI() const
Definition: Creature.h:140
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:112
MotionMaster * GetMotionMaster()
Definition: Unit.h:1620
void SetStandState(uint8 state)
Definition: Unit.cpp:16726
void MoveFollow(Unit *target, float dist, float angle, MovementSlot slot=MOTION_SLOT_ACTIVE, bool inheritWalkState=true)
The unit will follow this target. Doesn't work with UNIT_FLAG_DISABLE_MOVE.
Definition: MotionMaster.cpp:409
uint32 GetQuestId() const
Definition: QuestDef.h:228

References Creature::AI(), Object::GetGUID(), Unit::GetMotionMaster(), Quest::GetQuestId(), MOTION_SLOT_CONTROLLED, MotionMaster::MoveFollow(), PET_FOLLOW_DIST, QUEST_A_FINE_MESS, UnitAI::SetGUID(), Unit::SetStandState(), and UNIT_STAND_STATE_STAND.