TrinityCore
boss_leotheras_the_blind.cpp
Go to the documentation of this file.
1/*
2 * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the
6 * Free Software Foundation; either version 2 of the License, or (at your
7 * option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18/* ScriptData
19SDName: Boss_Leotheras_The_Blind
20SD%Complete: 80
21SDComment: Possesion Support
22SDCategory: Coilfang Resevoir, Serpent Shrine Cavern
23EndScriptData */
24
25#include "ScriptMgr.h"
26#include "InstanceScript.h"
27#include "Map.h"
28#include "MotionMaster.h"
29#include "ObjectAccessor.h"
30#include "Player.h"
31#include "ScriptedCreature.h"
32#include "serpent_shrine.h"
33#include "TemporarySummon.h"
34
36{
37 // Spells used by Leotheras The Blind
43
44 // Spells used in banish phase
45 BANISH_BEAM = 38909,
46 AURA_BANISH = 37833,
47
48 // Spells used by Greyheart Spellbinders
51
52 // Spells used by Inner Demons and Creature ID
58
59 //Misc.
60 MODEL_DEMON = 20125,
62 DEMON_FORM = 21875,
65
73 SAY_DEATH = 7
74};
75
77{
78 npc_inner_demon(Creature* creature) : ScriptedAI(creature)
79 {
80 Initialize();
81 }
82
84 {
85 ShadowBolt_Timer = 10000;
86 Link_Timer = 1000;
87 }
88
90
93
94 void Reset() override
95 {
96 Initialize();
97 }
98
99 void SetGUID(ObjectGuid const& guid, int32 id) override
100 {
101 if (id == INNER_DEMON_VICTIM)
102 victimGUID = guid;
103 }
104
105 ObjectGuid GetGUID(int32 id/* = 0 */) const override
106 {
107 if (id == INNER_DEMON_VICTIM)
108 return victimGUID;
109 return ObjectGuid::Empty;
110 }
111
112 void JustDied(Unit* /*killer*/) override
113 {
115 if (unit && unit->HasAura(SPELL_INSIDIOUS_WHISPER))
117 }
118
119 void DamageTaken(Unit* done_by, uint32& damage, DamageEffectType /*damageType*/, SpellInfo const* /*spellInfo = nullptr*/) override
120 {
121 if (!done_by || (done_by->GetGUID() != victimGUID && done_by->GetGUID() != me->GetGUID()))
122 {
123 damage = 0;
124 ModifyThreatByPercent(done_by, -100);
125 }
126 }
127
128 void JustEngagedWith(Unit* /*who*/) override
129 {
130 if (!victimGUID)
131 return;
132 }
133
134 void UpdateAI(uint32 diff) override
135 {
136 //Return since we have no target
137 if (!UpdateVictim() || !me->GetVictim())
138 return;
139
140 if (me->EnsureVictim()->GetGUID() != victimGUID)
141 {
144 if (owner && owner->IsAlive())
145 {
146 AddThreat(owner, 999999);
147 AttackStart(owner);
148 } else if (owner && owner->isDead())
149 {
150 me->KillSelf();
151 return;
152 }
153 }
154
155 if (Link_Timer <= diff)
156 {
158 Link_Timer = 1000;
159 } else Link_Timer -= diff;
160
163
164 if (ShadowBolt_Timer <= diff)
165 {
167 ShadowBolt_Timer = 10000;
168 } else ShadowBolt_Timer -= diff;
169 }
170};
171
172//Original Leotheras the Blind AI
174{
176 {
177 Initialize();
178 creature->GetPosition(x, y, z);
179 }
180
182 {
183 BanishTimer = 1000;
184 Whirlwind_Timer = 15000;
185 ChaosBlast_Timer = 1000;
186 SwitchToDemon_Timer = 45000;
187 SwitchToHuman_Timer = 60000;
188 Berserk_Timer = 600000;
189 InnerDemons_Timer = 30000;
190
191 DealDamage = true;
192 DemonForm = false;
193 IsFinalForm = false;
194 NeedThreatReset = false;
195 EnrageUsed = false;
196 for (ObjectGuid& guid : InnderDemon)
197 guid.Clear();
199 }
200
208
214 float x, y, z;
215
220
221 void Reset() override
222 {
224 Initialize();
225 me->SetCanDualWield(true);
226 me->SetSpeedRate(MOVE_RUN, 2.0f);
228 me->SetVirtualItem(0, 0);
229 me->SetVirtualItem(1, 0);
230 me->SetCanMelee(true);
231 DoCast(me, SPELL_DUAL_WIELD, true);
232 me->SetCorpseDelay(1000*60*60);
233 _Reset();
234 }
235
236 void CheckChannelers(/*bool DoEvade = true*/)
237 {
238 for (uint8 i = 0; i < 3; ++i)
239 {
241 add->DisappearAndDie();
242
243 float nx = x;
244 float ny = y;
245 float o = 2.4f;
246 if (i == 0) {nx += 10; ny -= 5; o=2.5f;}
247 if (i == 1) {nx -= 8; ny -= 7; o=0.9f;}
248 if (i == 2) {nx -= 3; ny += 9; o=5.0f;}
250 if (binder)
251 SpellBinderGUID[i] = binder->GetGUID();
252 }
253 }
254 void MoveInLineOfSight(Unit* who) override
255
256 {
257 if (me->HasAura(AURA_BANISH))
258 return;
259
260 if (!me->GetVictim() && me->CanCreatureAttack(who))
261 {
263 return;
264
265 float attackRadius = me->GetAttackDistance(who);
266 if (me->IsWithinDistInMap(who, attackRadius))
267 {
268 // Check first that object is in an angle in front of this one before LoS check
269 if (me->HasInArc(float(M_PI) / 2.0f, who) && me->IsWithinLOSInMap(who))
270 {
271 AttackStart(who);
272 }
273 }
274 }
275 }
276
278 {
281 }
282
284 {
285 uint8 AliveChannelers = 0;
286 for (uint8 i = 0; i < 3; ++i)
287 {
289 if (add && add->IsAlive())
290 ++AliveChannelers;
291 }
292
293 // channelers == 0 remove banish aura
294 if (AliveChannelers == 0 && me->HasAura(AURA_BANISH))
295 {
296 // removing banish aura
298
299 // Leotheras is getting immune again
301
302 // changing model to bloodelf
304
305 // and reseting equipment
306 me->LoadEquipment();
307
309 {
311 AddThreat(victim, 1);
312 StartEvent();
313 }
314 }
315 else if (AliveChannelers != 0 && !me->HasAura(AURA_BANISH))
316 {
317 // channelers != 0 apply banish aura
318 // removing Leotheras banish immune to apply AURA_BANISH
321
322 // changing model
324
325 // and removing weapons
326 me->SetVirtualItem(0, 0);
327 me->SetVirtualItem(1, 0);
328 }
329 }
330
331 //Despawn all Inner Demon summoned
333 {
334 for (uint8 i=0; i<5; ++i)
335 {
336 if (!InnderDemon[i].IsEmpty())
337 {
338 //delete creature
340 if (creature && creature->IsAlive())
341 creature->DespawnOrUnsummon();
342
343 InnderDemon[i].Clear();
344 }
345 }
346
348 }
349
350 void CastConsumingMadness() //remove this once SPELL_INSIDIOUS_WHISPER is supported by core
351 {
352 for (uint8 i = 0; i < 5; ++i)
353 {
354 if (!InnderDemon[i].IsEmpty())
355 {
357 if (unit && unit->IsAlive())
358 {
359 Unit* unit_target = ObjectAccessor::GetUnit(*unit, unit->AI()->GetGUID(INNER_DEMON_VICTIM));
360 if (unit_target && unit_target->IsAlive())
361 {
362 unit->CastSpell(unit_target, SPELL_CONSUMING_MADNESS, true);
363 ModifyThreatByPercent(unit_target, -100);
364 }
365 }
366 }
367 }
368 }
369
370 void KilledUnit(Unit* victim) override
371 {
372 if (victim->GetTypeId() != TYPEID_PLAYER)
373 return;
374
376 }
377
378 void JustDied(Unit* /*killer*/) override
379 {
381
382 //despawn copy
383 if (!Demon.IsEmpty())
384 {
386 pDemon->DespawnOrUnsummon();
387 }
388 _JustDied();
389 }
390
391 void JustEngagedWith(Unit* /*who*/) override
392 {
393 if (me->HasAura(AURA_BANISH))
394 return;
395
396 me->LoadEquipment();
397 }
398
399 void UpdateAI(uint32 diff) override
400 {
401 //Return since we have no target
403 {
404 if (BanishTimer <= diff)
405 {
406 CheckBanish();//no need to check every update tick
407 BanishTimer = 1000;
408 } else BanishTimer -= diff;
409 return;
410 }
412 {
413 if (Whirlwind_Timer <= diff)
414 {
416 if (newTarget)
417 {
420 me->GetMotionMaster()->MovePoint(0, newTarget->GetPositionX(), newTarget->GetPositionY(), newTarget->GetPositionZ());
421 }
422 Whirlwind_Timer = 2000;
423 } else Whirlwind_Timer -= diff;
424 }
425
426 // reseting after changing forms and after ending whirlwind
428 {
429 // when changing forms seting timers (or when ending whirlwind - to avoid adding new variable i use Whirlwind_Timer to countdown 2s while whirlwinding)
430 if (DemonForm)
431 InnerDemons_Timer = 30000;
432 else
433 Whirlwind_Timer = 15000;
434
435 NeedThreatReset = false;
439 }
440
441 //Enrage_Timer (10 min)
442 if (Berserk_Timer < diff && !EnrageUsed)
443 {
446 EnrageUsed = true;
447 } else Berserk_Timer -= diff;
448
449 if (!DemonForm)
450 {
451 //Whirldind Timer
453 {
454 if (Whirlwind_Timer <= diff)
455 {
457 // while whirlwinding this variable is used to countdown target's change
458 Whirlwind_Timer = 2000;
459 NeedThreatReset = true;
460 } else Whirlwind_Timer -= diff;
461 }
462 //Switch_Timer
463
464 if (!IsFinalForm)
465 {
466 if (SwitchToDemon_Timer <= diff)
467 {
468 //switch to demon form
472 me->SetVirtualItem(0, 0);
473 me->SetVirtualItem(1, 0);
474 me->SetCanMelee(false);
475 DemonForm = true;
476 NeedThreatReset = true;
477 SwitchToDemon_Timer = 45000;
478 } else SwitchToDemon_Timer -= diff;
479 }
480 }
481 else
482 {
483 //ChaosBlast_Timer
484 if (!me->GetVictim())
485 return;
486 if (me->IsWithinDist(me->GetVictim(), 30))
487 me->StopMoving();
488 if (ChaosBlast_Timer <= diff)
489 {
490 // will cast only when in range of spell
491 if (me->IsWithinDist(me->GetVictim(), 30))
492 {
493 //DoCastVictim(SPELL_CHAOS_BLAST, true);
495 }
496 ChaosBlast_Timer = 3000;
497 } else ChaosBlast_Timer -= diff;
498 //Summon Inner Demon
499 if (InnerDemons_Timer <= diff)
500 {
501 ThreatManager const& mgr = me->GetThreatManager();
502 std::list<Unit*> TargetList;
503 Unit* currentVictim = mgr.GetLastVictim();
504 for (ThreatReference const* ref : mgr.GetSortedThreatList())
505 {
506 if (Player* tempTarget = ref->GetVictim()->ToPlayer())
507 if (tempTarget != currentVictim && TargetList.size()<5)
508 TargetList.push_back(tempTarget);
509 }
510 //SpellInfo* spell = GET_SPELL(SPELL_INSIDIOUS_WHISPER);
511 for (auto itr = TargetList.begin(), end = TargetList.end(); itr != end; ++itr)
512 {
513 if ((*itr) && (*itr)->IsAlive())
514 {
515 Creature* demon = me->SummonCreature(INNER_DEMON_ID, (*itr)->GetPositionX()+10, (*itr)->GetPositionY()+10, (*itr)->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5s);
516 if (demon)
517 {
518 demon->AI()->AttackStart((*itr));
519 demon->AI()->SetGUID((*itr)->GetGUID(), INNER_DEMON_VICTIM);
520
521 (*itr)->AddAura(SPELL_INSIDIOUS_WHISPER, *itr);
522
523 if (InnerDemon_Count > 4)
525
526 //Safe storing of creatures
528
529 //Update demon count
531 }
532 }
533 }
535
536 InnerDemons_Timer = 999999;
537 } else InnerDemons_Timer -= diff;
538
539 //Switch_Timer
540 if (SwitchToHuman_Timer <= diff)
541 {
542 //switch to nightelf form
544 me->LoadEquipment();
545 me->SetCanMelee(true);
546
548 DespawnDemon();
549
550 DemonForm = false;
551 NeedThreatReset = true;
552
553 SwitchToHuman_Timer = 60000;
554 } else SwitchToHuman_Timer -= diff;
555 }
556
557 if (!IsFinalForm && HealthBelowPct(15))
558 {
559 //at this point he divides himself in two parts
561 DespawnDemon();
563 {
564 Demon = Copy->GetGUID();
565 if (me->GetVictim())
566 Copy->AI()->AttackStart(me->GetVictim());
567 }
568 //set nightelf final form
569 IsFinalForm = true;
570 DemonForm = false;
571
574 me->LoadEquipment();
575 }
576 }
577};
578
579//Leotheras the Blind Demon Form AI
581{
583 {
584 Initialize();
585 }
586
588 {
589 ChaosBlast_Timer = 1000;
590 DealDamage = true;
591 }
592
595
596 void Reset() override
597 {
598 Initialize();
599 }
600
602 {
603 Talk(SAY_FREE);
604 }
605
606 void KilledUnit(Unit* victim) override
607 {
608 if (victim->GetTypeId() != TYPEID_PLAYER)
609 return;
610
612 }
613
614 void JustDied(Unit* /*killer*/) override
615 {
616 //invisibility (blizzlike, at the end of the fight he doesn't die, he disappears)
617 DoCast(me, 8149, true);
618 }
619
620 void JustEngagedWith(Unit* /*who*/) override
621 {
622 StartEvent();
623 }
624
625 void UpdateAI(uint32 diff) override
626 {
627 //Return since we have no target
628 if (!UpdateVictim())
629 return;
630 //ChaosBlast_Timer
631 if (me->IsWithinDist(me->GetVictim(), 30))
632 me->StopMoving();
633
634 if (ChaosBlast_Timer <= diff)
635 {
636 // will cast only when in range od spell
637 if (me->IsWithinDist(me->GetVictim(), 30))
638 {
639 //DoCastVictim(SPELL_CHAOS_BLAST, true);
641 ChaosBlast_Timer = 3000;
642 }
643 } else ChaosBlast_Timer -= diff;
644
645 //Do NOT deal any melee damage to the target.
646 }
647};
648
650{
652 {
653 Initialize();
654 instance = creature->GetInstanceScript();
655 AddedBanish = false;
656 }
657
659 {
660 Mindblast_Timer = urand(3000, 8000);
661 Earthshock_Timer = urand(5000, 10000);
662 }
663
665
667
670
672
673 void Reset() override
674 {
675 Initialize();
676
679 if (leotheras && leotheras->IsAlive())
680 ENSURE_AI(boss_leotheras_the_blind, leotheras->AI())->CheckChannelers(/*false*/);
681 }
682
683 void JustEngagedWith(Unit* who) override
684 {
687 }
688
689 void JustAppeared() override
690 {
691 AddedBanish = false;
692 Reset();
693 }
694
696 {
698 {
699 if (!leotherasGUID.IsEmpty())
700 {
702 if (leotheras && leotheras->IsAlive())
703 DoCast(leotheras, BANISH_BEAM);
704 }
705 }
706 }
707
708 void UpdateAI(uint32 diff) override
709 {
710 if (!leotherasGUID)
712
714 {
716 AttackStart(victim);
717 }
718
719 if (!UpdateVictim())
720 {
722 return;
723 }
724
726 {
728 return;
729 }
730
731 if (Mindblast_Timer <= diff)
732 {
734 DoCast(target, SPELL_MINDBLAST);
735
736 Mindblast_Timer = urand(10000, 15000);
737 } else Mindblast_Timer -= diff;
738
739 if (Earthshock_Timer <= diff)
740 {
741 Map::PlayerList const& PlayerList = me->GetMap()->GetPlayers();
742 for (Map::PlayerList::const_iterator itr = PlayerList.begin(); itr != PlayerList.end(); ++itr)
743 {
744 if (Player* i_pl = itr->GetSource())
745 {
746 bool isCasting = false;
747 for (uint8 i = 0; i < CURRENT_MAX_SPELL; ++i)
748 if (i_pl->GetCurrentSpell(i))
749 isCasting = true;
750
751 if (isCasting)
752 {
754 break;
755 }
756 }
757 }
758 Earthshock_Timer = urand(8000, 15000);
759 } else Earthshock_Timer -= diff;
760 }
761};
762
764{
769}
#define M_PI
Definition: Common.h:115
#define CREATURE_Z_ATTACK_RANGE
Definition: Creature.h:52
uint8_t uint8
Definition: Define.h:144
int32_t int32
Definition: Define.h:138
uint32_t uint32
Definition: Define.h:142
@ IN_PROGRESS
@ TEMPSUMMON_DEAD_DESPAWN
Definition: ObjectDefines.h:69
@ TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT
Definition: ObjectDefines.h:66
@ TYPEID_PLAYER
Definition: ObjectGuid.h:41
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:42
@ MECHANIC_BANISH
@ IMMUNITY_MECHANIC
#define ENSURE_AI(a, b)
Definition: UnitAI.h:29
@ MOVE_RUN
Definition: UnitDefines.h:118
DamageEffectType
Definition: UnitDefines.h:131
@ CURRENT_CHANNELED_SPELL
Definition: Unit.h:591
#define CURRENT_MAX_SPELL
Definition: Unit.h:596
@ AURA_DEMONIC_ALIGNMENT
@ SPELL_CONSUMING_MADNESS
@ SPELL_INSIDIOUS_WHISPER
void AddSC_boss_leotheras_the_blind()
InstanceScript *const instance
void _JustDied()
virtual void EnterEvadeMode(EvadeReason why=EvadeReason::Other)
Definition: CreatureAI.cpp:219
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:56
bool UpdateVictim()
Definition: CreatureAI.cpp:245
void AttackStart(Unit *victim) override
== Triggered Actions Requested ==================
Definition: CreatureAI.cpp:328
Creature *const me
Definition: CreatureAI.h:61
void SetCanMelee(bool canMelee, bool fleeFromMelee=false)
Definition: Creature.cpp:2822
float GetAttackDistance(Unit const *player) const
Definition: Creature.cpp:2153
void LoadEquipment(int8 id=1, bool force=false)
Definition: Creature.cpp:1946
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
Definition: Creature.cpp:2415
bool CanCreatureAttack(Unit const *victim, bool force=true) const
Definition: Creature.cpp:2686
void SetDisplayId(uint32 displayId, bool setNative=false) override
Definition: Creature.cpp:3402
void SetCorpseDelay(uint32 delay, bool ignoreCorpseDecayRatio=false)
Definition: Creature.h:104
void SetCanDualWield(bool value) override
Definition: Creature.cpp:1940
CreatureAI * AI() const
Definition: Creature.h:214
virtual bool SetBossState(uint32 id, EncounterState state)
virtual ObjectGuid GetGuidData(uint32 type) const override
iterator end()
Definition: MapRefManager.h:35
iterator begin()
Definition: MapRefManager.h:34
PlayerList const & GetPlayers() const
Definition: Map.h:367
void MoveChase(Unit *target, Optional< ChaseRange > dist={}, Optional< ChaseAngle > angle={})
void MovePoint(uint32 id, Position const &pos, bool generatePath=true, Optional< float > finalOrient={}, Optional< float > speed={}, MovementWalkRunSpeedSelectionMode speedSelectionMode=MovementWalkRunSpeedSelectionMode::Default, Optional< float > closeEnoughDistance={})
static ObjectGuid const Empty
Definition: ObjectGuid.h:274
bool IsEmpty() const
Definition: ObjectGuid.h:319
void Clear()
Definition: ObjectGuid.h:286
TypeID GetTypeId() const
Definition: Object.h:173
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:159
static Player * ToPlayer(Object *o)
Definition: Object.h:213
Unit * GetLastVictim() const
Trinity::IteratorPair< ThreatListIterator, std::nullptr_t > GetSortedThreatList() const
SpellCastResult DoCastVictim(uint32 spellId, CastSpellExtraArgs const &args={})
Definition: UnitAI.cpp:180
virtual ObjectGuid GetGUID(int32=0) const
Definition: UnitAI.h:76
Unit * SelectTarget(SelectTargetMethod targetType, uint32 offset=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
Definition: UnitAI.cpp:79
virtual void SetGUID(ObjectGuid const &, int32=0)
Definition: UnitAI.h:75
SpellCastResult DoCast(uint32 spellId)
Definition: UnitAI.cpp:89
Definition: Unit.h:627
void ApplySpellImmune(uint32 spellId, SpellImmunity op, uint32 type, bool apply)
Definition: Unit.cpp:7845
void SetVirtualItem(uint32 slot, uint32 itemId, uint16 appearanceModId=0, uint16 itemVisual=0)
Definition: Unit.cpp:13604
ThreatManager & GetThreatManager()
Definition: Unit.h:1063
void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid=0, bool withInstant=true)
Definition: Unit.cpp:3089
MotionMaster * GetMotionMaster()
Definition: Unit.h:1652
bool IsAlive() const
Definition: Unit.h:1164
void StopMoving()
Definition: Unit.cpp:10049
Unit * EnsureVictim() const
Definition: Unit.h:717
Unit * GetVictim() const
Definition: Unit.h:715
void SetSpeedRate(UnitMoveType mtype, float rate)
Definition: Unit.cpp:8525
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
Definition: Unit.cpp:4664
void KillSelf(bool durabilityLoss=true, bool skipSettingDeathState=false)
Definition: Unit.h:921
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition: Unit.cpp:3831
bool IsInCombat() const
Definition: Unit.h:1043
bool isDead() const
Definition: Unit.h:1166
Spell * GetCurrentSpell(CurrentSpellTypes spellType) const
Definition: Unit.h:1442
Map * GetMap() const
Definition: Object.h:624
InstanceScript * GetInstanceScript() const
Definition: Object.cpp:1042
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
Definition: Object.cpp:2896
TempSummon * SummonCreature(uint32 entry, Position const &pos, TempSummonType despawnType=TEMPSUMMON_MANUAL_DESPAWN, Milliseconds despawnTime=0s, uint32 vehId=0, uint32 spellId=0, ObjectGuid privateObjectOwner=ObjectGuid::Empty)
Definition: Object.cpp:2025
bool IsWithinLOSInMap(WorldObject const *obj, LineOfSightChecks checks=LINEOFSIGHT_ALL_CHECKS, VMAP::ModelIgnoreFlags ignoreFlags=VMAP::ModelIgnoreFlags::Nothing) const
Definition: Object.cpp:1181
bool IsWithinDistInMap(WorldObject const *obj, float dist2compare, bool is3D=true, bool incOwnRadius=true, bool incTargetRadius=true) const
Definition: Object.cpp:1147
float GetDistanceZ(WorldObject const *obj) const
Definition: Object.cpp:1048
bool IsWithinDist(WorldObject const *obj, float dist2compare, bool is3D=true, bool incOwnRadius=true, bool incTargetRadius=true) const
Definition: Object.cpp:1142
virtual void SetGuidData(uint32, ObjectGuid)
Definition: ZoneScript.h:84
TC_GAME_API Unit * GetUnit(WorldObject const &, ObjectGuid const &guid)
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
@ DATA_LEOTHERAS
@ DATA_LEOTHERAS_EVENT_STARTER
@ BOSS_LEOTHERAS_THE_BLIND
#define RegisterSerpentshrineCavernCreatureAI(ai_name)
CastSpellExtraArgs & AddSpellBP0(int32 val)
Definition: SpellDefines.h:475
constexpr float GetPositionX() const
Definition: Position.h:76
constexpr float GetPositionY() const
Definition: Position.h:77
bool HasInArc(float arcangle, Position const *pos, float border=2.0f) const
Definition: Position.cpp:99
constexpr void GetPosition(float &x, float &y) const
Definition: Position.h:81
constexpr float GetPositionZ() const
Definition: Position.h:78
void AttackStart(Unit *) override
== Triggered Actions Requested ==================
bool HealthBelowPct(uint32 pct) const
void ModifyThreatByPercent(Unit *victim, int32 pct, Unit *who=nullptr)
Creature * DoSpawnCreature(uint32 entry, float offsetX, float offsetY, float offsetZ, float angle, uint32 type, Milliseconds despawntime)
void ResetThreatList(Unit *who=nullptr)
void AddThreat(Unit *victim, float amount, Unit *who=nullptr)
void UpdateAI(uint32 diff) override
boss_leotheras_the_blind(Creature *creature)
void KilledUnit(Unit *victim) override
void MoveInLineOfSight(Unit *who) override
void JustEngagedWith(Unit *) override
npc_greyheart_spellbinder(Creature *creature)
void JustEngagedWith(Unit *who) override
void UpdateAI(uint32 diff) override
void DamageTaken(Unit *done_by, uint32 &damage, DamageEffectType, SpellInfo const *) override
npc_inner_demon(Creature *creature)
void JustDied(Unit *) override
ObjectGuid GetGUID(int32 id) const override
void SetGUID(ObjectGuid const &guid, int32 id) override
void UpdateAI(uint32 diff) override
void JustEngagedWith(Unit *) override