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

Public Member Functions

 npc_mikhail ()
 
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_mikhail()

npc_mikhail::npc_mikhail ( )
inline
138: CreatureScript("npc_mikhail") { }
Definition: CreatureScript.h:25

Member Function Documentation

◆ OnQuestAccept()

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

Reimplemented from CreatureScript.

141 {
142 if (quest->GetQuestId() == QUEST_MISSING_DIPLO_PT11)
143 {
144 Creature* pSlim = creature->FindNearestCreature(NPC_TAPOKE_SLIM_JAHN, 25.0f);
145
146 if (!pSlim)
147 return false;
148
149 if (!pSlim->HasStealthAura())
150 pSlim->CastSpell(pSlim, SPELL_STEALTH, true);
151
153 pEscortAI->Start(false, false, player->GetGUID(), quest);
154 }
155 return false;
156 }
@ NPC_TAPOKE_SLIM_JAHN
Definition: zone_wetlands.cpp:45
@ SPELL_STEALTH
Definition: zone_wetlands.cpp:42
@ QUEST_MISSING_DIPLO_PT11
Definition: zone_wetlands.cpp:41
#define CAST_AI(a, b)
Definition: UnitAI.h:26
Definition: Creature.h:43
CreatureAI * AI() const
Definition: Creature.h:140
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:112
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition: Object.cpp:2457
bool HasStealthAura() const
Definition: Unit.h:1702
SpellCastResult CastSpell(SpellCastTargets const &targets, SpellInfo const *spellInfo, CustomSpellValues const *value, TriggerCastFlags triggerFlags=TRIGGERED_NONE, Item *castItem=nullptr, AuraEffect const *triggeredByAura=nullptr, ObjectGuid originalCaster=ObjectGuid::Empty)
Definition: Unit.cpp:1167
uint32 GetQuestId() const
Definition: QuestDef.h:228
Definition: zone_wetlands.cpp:59

References Creature::AI(), CAST_AI, Unit::CastSpell(), WorldObject::FindNearestCreature(), Object::GetGUID(), Quest::GetQuestId(), Unit::HasStealthAura(), NPC_TAPOKE_SLIM_JAHN, QUEST_MISSING_DIPLO_PT11, and SPELL_STEALTH.