134 me->setRegeneratingHealth(
true);
145 me->setRegeneratingHealth(
false);
147 me->SetHealth(
me->CountPctFromMaxHealth(20));
153 me->setRegeneratingHealth(
true);
161 me->SetHomePosition(
me->GetPositionX(),
me->GetPositionY(),
me->GetPositionZ(),
me->GetOrientation());
172 me->setRegeneratingHealth(
false);
174 me->GetMotionMaster()->Clear();
175 me->GetMotionMaster()->MoveIdle();
177 uint32 floorHealth =
me->CountPctFromMaxHealth(20);
178 if (
me->GetHealth() > floorHealth)
179 me->SetHealth(floorHealth);
213 me->IsWithinDistInMap(player, 25.0f) &&
me->IsWithinLOSInMap(player))
252 if (
me->IsWithinDistInMap(player, 25.0f) &&
me->IsWithinLOSInMap(player))
262 if (
me->HealthBelowPctDamaged(21, damage))
264 uint32 floorHealth =
me->CountPctFromMaxHealth(20);
265 if (
me->GetHealth() > floorHealth)
266 damage =
me->GetHealth() - floorHealth;
271 if (!
me->HealthAbovePct(20))
334 std::list<Creature*> creatures;
336 for (std::list<Creature*>::iterator itr = creatures.begin(); itr != creatures.end(); ++itr)
338 if ((*itr)->GetDBTableGUIDLow() == spawnGuid)
340 if (!(*itr)->IsAlive())
341 (*itr)->Respawn(
true);
342 return (*itr)->IsAlive() ? *itr : NULL;
348 if (!creature->IsAlive())
349 creature->Respawn(
true);
350 return creature->IsAlive() ? creature : NULL;
435 if (!eventOliver || !jitters || !worgen)
451 masterHarris->SetVisible(
false);
466 me->SetVisible(
true);
468 masterHarris->SetVisible(
true);
471 -10754.7f, 338.823f, 37.3415f, 3.56867f);
473 -10767.1f, 330.665f, 37.6074f, 5.31068f);
475 -10747.4375f, 331.902496f, 37.739048f, 4.55199f,
true);
591 tobias->SetLevel(32);
592 tobias->SetMaxHealth(25000);
593 tobias->SetFullHealth();
@ TEMPSUMMON_TIMED_DESPAWN
@ TEMPSUMMON_CORPSE_TIMED_DESPAWN
uint64 MAKE_NEW_GUID(uint32 l, uint32 e, uint32 h)
@ QUEST_STATUS_INCOMPLETE
@ SPELL_EFFECT_SCRIPT_EFFECT
@ SPELL_EFFECT_APPLY_AURA
@ SPELL_FAILED_BAD_TARGETS
@ SPELL_FAILED_CANT_DO_THAT_RIGHT_NOW
#define SpellCheckCastFn(F)
#define SpellEffectFn(F, I, N)
@ UNIT_FLAG_NON_ATTACKABLE
@ UNIT_FLAG_IMMUNE_TO_NPC
@ UNIT_FIELD_NPC_EMOTESTATE
virtual void MoveInLineOfSight(Unit *)
virtual void JustRespawned()
void Talk(uint8 id, WorldObject const *whisperTarget=NULL)
virtual void EnterEvadeMode()
void Respawn(bool force=false)
uint32 GetDBTableGUIDLow() const
void DespawnOrUnsummon(uint32 msTimeToDespawn=0)
ReactStates GetReactState() const
bool LoadCreatureFromDB(uint32 guid, Map *map, bool addToMap=true)
CreatureScript(const char *name)
Creature * GetCreature(uint64 guid)
void RemoveCreatureRespawnTime(uint32 dbGuid)
void Clear(bool reset=true)
static Player * GetPlayer(WorldObject const &, uint64 guid)
void SetUInt32Value(uint16 index, uint32 value)
void KilledMonsterCredit(uint32 entry, uint64 guid=0)
QuestStatus GetQuestStatus(uint32 quest_id) const
Unit * GetSelectedUnit() const
Creature * GetHitCreature()
HookList< CastHandler > AfterCast
Unit * GetExplTargetUnit()
HookList< CheckCastHandler > OnCheckCast
HookList< EffectHandler > OnEffectHitTarget
HookList< CastHandler > OnCast
SpellScriptLoader(const char *name)
virtual void SetData(uint32, uint32)
void DoMeleeAttackIfReady()
bool HealthAbovePct(int32 pct) const
void CombatStop(bool includingCast=false)
void RemoveAurasDueToSpell(uint32 spellId, uint64 casterGUID=0, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Player * GetCharmerOrOwnerPlayerOrPlayerItself() const
MotionMaster * GetMotionMaster()
Aura * AddAura(uint32 spellId, Unit *target)
void NearTeleportTo(float x, float y, float z, float orientation, bool casting=false)
void StopMoving()
-------—End of Pet responses methods-------—
void GetCreatureListWithEntryInGrid(std::list< Creature * > &lList, uint32 uiEntry, float fMaxSearchRange) const
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
TempSummon * SummonCreature(uint32 id, Position const &pos, TempSummonType spwtype=TempSummonType::TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime=0, uint32 vehId=0) const
CreatureAI * GetAI(Creature *creature) const OVERRIDE
bool OnQuestAccept(Player *, Creature *creature, Quest const *quest) OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
PrepareSpellScript(spell_q26674_call_stalvan_SpellScript)
spell_q26674_call_stalvan()
SpellScript * GetSpellScript() const OVERRIDE
SpellCastResult CheckCast()
void HandleAmpule(SpellEffIndex)
PrepareSpellScript(spell_q26720_harris_ampule_SpellScript)
Creature * GetAmpuleCreatureFromCaster(Player *player)
SpellScript * GetSpellScript() const OVERRIDE
spell_q26720_harris_ampule()
void EnterCombat(Unit *) OVERRIDE
ScriptedAI(Creature *creature)
void AttackStart(Unit *) OVERRIDE
void DamageTaken(Unit *doneBy, uint32 &damage) OVERRIDE
void MoveInLineOfSight(Unit *who) OVERRIDE
void EngageQuestPlayer(Player *player)
void SpellHit(Unit *caster, SpellInfo const *spell) OVERRIDE
void JustRespawned() OVERRIDE
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
bool IsHesitating() const
void EnterEvadeMode() OVERRIDE
void StartPounce(Player *player)
void EnterCombat(Unit *who) OVERRIDE
void MovementInform(uint32 type, uint32 id) OVERRIDE
npc_lurking_potionAI(Creature *creature)
npc_oliver_harrisAI(Creature *creature)
static void StartSceneImpl(Creature *questGiver)
void SetData(uint32 type, uint32 data) OVERRIDE
@ NPC_EVENT_OLIVER_HARRIS
@ QUEST_A_CURSE_WE_CANNOT_LIFT
@ NPC_LURKING_WORGEN_KILL_CREDIT
static Creature * FindSceneActor(Creature *ref, uint32 spawnGuid, uint32 entry)
static void ResetCryForTheMoonActor(Creature *actor, float x, float y, float z, float o, bool restoreStocks=false)
static bool IsWeakenedLurkingWorgen(Creature *creature)
static Creature * ResolveAmpuleTarget(Player *player, Unit *primaryTarget)
static bool TryApplyHarrisAmpule(Player *player, Creature *creature)
static bool PlayerHasActiveQuest(Player *player)