92 {1754.00f, 1346.00f, 17.50f},
93 {1765.00f, 1347.00f, 19.00f},
94 {1784.00f, 1346.80f, 25.40f},
95 {1803.30f, 1347.60f, 33.00f},
96 {1824.00f, 1350.00f, 42.60f},
97 {1838.80f, 1353.20f, 49.80f},
98 {1852.00f, 1357.60f, 55.70f},
99 {1861.30f, 1364.00f, 59.40f},
100 {1866.30f, 1374.80f, 61.70f},
101 {1864.00f, 1387.30f, 63.20f},
102 {1854.80f, 1399.40f, 64.10f},
103 {1844.00f, 1406.90f, 64.10f},
104 {1824.30f, 1411.40f, 63.30f},
105 {1801.00f, 1412.30f, 60.40f},
106 {1782.00f, 1410.10f, 55.50f},
107 {1770.50f, 1405.20f, 50.30f},
108 {1765.20f, 1400.70f, 46.60f},
109 {1761.40f, 1393.40f, 41.70f},
110 {1759.10f, 1386.70f, 36.60f},
111 {1757.80f, 1378.20f, 29.00f},
112 {1758.00f, 1367.00f, 19.51f}
117 {1776.27f, 1348.74f, 19.20f},
118 {1765.28f, 1347.46f, 17.55f}
124 "Your time is nigh...",
125 "You felt death once...",
129#define EMOTE_LAUGHS "Headless Horseman laughs"
182 me->SetDisplayId(2027);
188 if (!who ||
Creaturetype != 1 || !who->isTargetableForAttack())
205 }
else delay -= diff;
241 laugh = urand(15000, 30000);
249 Talk(textEntry, target);
267 if (
me->HealthBelowPctDamaged(67, damage))
271 if (
me->HealthBelowPctDamaged(34, damage))
275 if (damage >=
me->GetHealth())
280 damage =
me->GetHealth() -
me->CountPctFromMaxHealth(1);
305 me->RemoveAllAuras();
310 me->GetMotionMaster()->Clear(
false);
311 me->GetMotionMaster()->MoveFleeing(caster->GetVictim());
323 if (!
me->GetVictim())
325 me->GetMotionMaster()->Clear(
false);
326 me->GetMotionMaster()->MoveFleeing(
me->GetVictim());
332 laugh = urand(15000, 30000);
406 laugh = urand(16000, 20000);
421 Head->DisappearAndDie();
433 me->SetVisible(
false);
435 me->SetDisableGravity(
true);
454 me->SetVisible(
true);
468 me->SetDisableGravity(
false);
519 Talk(textEntry, target);
527 Map* map =
me->GetMap();
535 std::list<Player*> temp;
537 if ((
me->IsWithinLOSInMap(i->GetSource()) || !checkLoS) &&
me->GetVictim() != i->GetSource() &&
538 me->IsWithinDistInMap(i->GetSource(), range) && i->GetSource()->IsAlive())
539 temp.push_back(i->GetSource());
543 std::list<Player*>::const_iterator j = temp.begin();
544 advance(j, rand()%temp.size());
572 if (group->isLFGGroup())
573 sLFGMgr->FinishDungeon(group->GetGUID(), 285);
589 me->RemoveAllAuras();
590 me->SetName(
"Headless Horseman");
594 caster->GetMotionMaster()->Clear(
false);
595 caster->GetMotionMaster()->MoveFollow(
me, 6,
float(urand(0, 5)));
598 for (ThreatContainer::StorageType::const_iterator itr = threatlist.begin(); itr != threatlist.end(); ++itr)
601 if (unit && unit->
IsAlive() && unit != caster)
613 damage =
me->GetHealth() -
me->CountPctFromMaxHealth(1);
614 me->RemoveAllAuras();
615 me->SetName(
"Headless Horseman, Unhorsed");
625 me->InterruptNonMeleeSpells(
false);
677 me->GetMotionMaster()->Clear(
false);
706 me->InterruptNonMeleeSpells(
false);
717 laugh = urand(11000, 22000);
729 cleave = urand(2000, 6000);
794 me->GetPosition(x, y, z);
795 me->SetPosition(x, y, z + 0.35f, 0.0f);
818 me->RemoveAllAuras();
848 if (!who || !
me->IsValidAttackTarget(who) ||
me->GetVictim())
851 me->AddThreat(who, 0.0f);
885 player->AreaExploredOrEventHappens(11405);
907 me->RemoveAllAuras();
913 me->GetMotionMaster()->MoveIdle();
static constexpr TempSummonType TEMPSUMMON_DEAD_DESPAWN
static constexpr TempSummonType TEMPSUMMON_MANUAL_DESPAWN
static constexpr TempSummonType TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN
static constexpr TempSummonType TEMPSUMMON_TIMED_DESPAWN
static constexpr TypeID TYPEID_PLAYER
@ UNIT_FLAG_NON_ATTACKABLE
@ UNIT_FLAG_NOT_SELECTABLE
void AddSC_boss_headless_horseman()
static Locations FlightPoint[]
@ SPELL_PUMPKIN_AURA_GREEN
static char const * Text[]
virtual void MoveInLineOfSight(Unit *)
void DoZoneInCombat(Creature *creature=NULL, float maxRangeToNearestTarget=50.0f)
void Talk(uint8 id, WorldObject const *whisperTarget=NULL)
void SetDisplayId(uint32 modelId) OVERRIDE
CreatureScript(const char *name)
GameObjectScript(const char *name)
PlayerList const & GetPlayers() const
LinkedListHead::Iterator< MapReference const > const_iterator
void RemoveFlag(uint16 index, uint32 oldFlag)
void Say(std::string const &text, const Language language)
Handles said message in regular chat based on declared language and in config pre-defined Range.
std::list< HostileReference * > StorageType
float getThreat(Unit *victim, bool alsoSearchOfflineList=false)
void DoMeleeAttackIfReady()
void DoCast(uint32 spellId)
void DoCastVictim(uint32 spellId, bool triggered=false)
void CastSpell(SpellCastTargets const &targets, SpellInfo const *spellInfo, CustomSpellValues const *value, TriggerCastFlags triggerFlags=TRIGGERED_NONE, Item *castItem=NULL, AuraEffect const *triggeredByAura=NULL, uint64 originalCaster=0)
void RemoveAurasDueToSpell(uint32 spellId, uint64 casterGUID=0, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
static Creature * GetCreature(WorldObject &object, uint64 guid)
static Unit * GetUnit(WorldObject &object, uint64 guid)
ThreatManager & getThreatManager()
void HandleEmoteCommand(uint32 anim_id)
InstanceScript * GetInstanceScript()
TempSummon * SummonCreature(uint32 id, Position const &pos, TempSummonType spwtype=TempSummonType::TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime=0, uint32 vehId=0) const
virtual uint32 GetData(uint32) const
virtual void SetData(uint32, uint32)
CreatureAI * GetAI(Creature *creature) const OVERRIDE
bool OnGossipHello(Player *player, GameObject *soil) OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
@ GAMEOBJECT_PUMPKIN_SHRINE
Creature * DoSpawnCreature(uint32 entry, float offsetX, float offsetY, float offsetZ, float angle, TempSummonType type, uint32 despawntime)
ScriptedAI(Creature *creature)
void DoPlaySoundToSet(WorldObject *source, uint32 soundId)
void AttackStart(Unit *) OVERRIDE
void DoStartMovement(Unit *target, float distance=0.0f, float angle=0.0f)
void SpellHitTarget(Unit *unit, const SpellInfo *spell) OVERRIDE
InstanceScript * instance
void EnterCombat(Unit *) OVERRIDE
void JustDied(Unit *) OVERRIDE
void MovementInform(uint32 type, uint32 i) OVERRIDE
void MoveInLineOfSight(Unit *who) OVERRIDE
void SaySound(uint8 textEntry, Unit *target=0)
void DamageTaken(Unit *, uint32 &damage) OVERRIDE
boss_headless_horsemanAI(Creature *creature)
void KilledUnit(Unit *player) OVERRIDE
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
void SpellHit(Unit *caster, const SpellInfo *spell) OVERRIDE
void AttackStart(Unit *who) OVERRIDE
Player * SelectRandomPlayer(float range=0.0f, bool checkLoS=true)
void SpellHit(Unit *caster, const SpellInfo *spell) OVERRIDE
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
void SaySound(uint8 textEntry, Unit *target=0)
void EnterCombat(Unit *) OVERRIDE
void DamageTaken(Unit *, uint32 &damage) OVERRIDE
npc_headAI(Creature *creature)
void JustDied(Unit *) OVERRIDE
void SpellHit(Unit *, const SpellInfo *spell) OVERRIDE
void UpdateAI(uint32) OVERRIDE
== Triggered Actions Requested ==================
void MoveInLineOfSight(Unit *who) OVERRIDE
void EnterCombat(Unit *) OVERRIDE
npc_pulsing_pumpkinAI(Creature *creature)
void SetType(uint32 _type)
void EnterCombat(Unit *) OVERRIDE
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
void SpellHit(Unit *, const SpellInfo *spell) OVERRIDE
npc_wisp_invisAI(Creature *creature)
void MoveInLineOfSight(Unit *who) OVERRIDE