TrinityCore
Loading...
Searching...
No Matches
boss_blood_queen_lana_thel.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#include "icecrown_citadel.h"
19#include "Containers.h"
20#include "GridNotifiers.h"
21#include "InstanceScript.h"
22#include "Map.h"
23#include "MotionMaster.h"
24#include "ObjectAccessor.h"
25#include "Player.h"
26#include "ScriptedCreature.h"
27#include "ScriptMgr.h"
28#include "SpellAuraEffects.h"
29#include "SpellMgr.h"
30#include "SpellScript.h"
31
48
78
86
87uint32 const vampireAuras[3][4] =
88{
89 {70867, 71473, 71532, 71533},
90 {70879, 71525, 71530, 71531},
91 {70877, 71474, 70877, 71474},
92};
93
94#define ESSENCE_OF_BLOOD_QUEEN RAID_MODE<uint32>(70867, 71473, 71532, 71533)
95#define ESSENCE_OF_BLOOD_QUEEN_PLR RAID_MODE<uint32>(70879, 71525, 71530, 71531)
96#define FRENZIED_BLOODTHIRST RAID_MODE<uint32>(70877, 71474, 70877, 71474)
97#define DELIRIOUS_SLASH RAID_MODE<uint32>(71623, 71624, 71625, 71626)
98#define PRESENCE_OF_THE_DARKFALLEN RAID_MODE<uint32>(70994, 71962, 71963, 71964)
99
116
118{
121};
122
129
130Position const centerPos = {4595.7090f, 2769.4190f, 400.6368f, 0.000000f};
131Position const airPos = {4595.7090f, 2769.4190f, 422.3893f, 0.000000f};
132
133bool IsVampire(Unit const* unit)
134{
135 for (uint8 i = 0; i < 3; ++i)
136 if (unit->HasAura(vampireAuras[i][unit->GetMap()->GetDifficultyID() - DIFFICULTY_10_N]))
137 return true;
138 return false;
139}
140
142{
147
149 {
151 }
152
168
188
189 void JustDied(Unit* /*killer*/) override
190 {
191 _JustDied();
193
196
197 CleanAuras();
198 }
199
213
214 void EnterEvadeMode(EvadeReason why) override
215 {
216 if (!_EnterEvadeMode(why))
217 return;
218
219 CleanAuras();
222 Reset();
223 }
224
233
234 void KilledUnit(Unit* victim) override
235 {
236 if (victim->GetTypeId() == TYPEID_PLAYER)
237 Talk(SAY_KILL);
238 }
239
240 void SetGUID(ObjectGuid const& guid, int32 id) override
241 {
242 switch (id)
243 {
244 case GUID_VAMPIRE:
245 _vampires.insert(guid);
246 break;
247 case GUID_BLOODBOLT:
248 _bloodboltedPlayers.insert(guid);
249 break;
250 default:
251 break;
252 }
253 }
254
255 void MovementInform(uint32 type, uint32 id) override
256 {
257 if (type != POINT_MOTION_TYPE)
258 return;
259
260 switch (id)
261 {
262 case POINT_CENTER:
264 events.ScheduleEvent(EVENT_AIR_PHASE, 100s + (Is25ManRaid() ? 0s : 20s));
268 break;
269 case POINT_AIR:
270 _bloodboltedPlayers.clear();
274 break;
275 case POINT_GROUND:
276 me->SetDisableGravity(false);
278 if (Unit* victim = me->SelectVictim())
279 AttackStart(victim);
281 break;
282 default:
283 break;
284 }
285 }
286
287 void UpdateAI(uint32 diff) override
288 {
289 if (!UpdateVictim())
290 return;
291
292 events.Update(diff);
293
295 return;
296
297 while (uint32 eventId = events.ExecuteEvent())
298 {
299 switch (eventId)
300 {
301 case EVENT_BERSERK:
305 break;
307 {
308 std::list<Player*> targets;
309 SelectRandomTarget(false, &targets);
310 if (!targets.empty())
311 {
312 Unit* target = targets.front();
316 _vampires.insert(target->GetGUID());
319 }
320 break;
321 }
323 {
324 // victim can be nullptr when this is processed in the same update tick as EVENT_AIR_PHASE
325 if (me->GetVictim())
326 {
327 Player* newOfftank = SelectRandomTarget(true);
328 if (newOfftank)
329 {
330 if (_offtankGUID != newOfftank->GetGUID())
331 {
332 _offtankGUID = newOfftank->GetGUID();
333
334 // both spells have SPELL_ATTR5_SINGLE_TARGET_SPELL, no manual removal needed
335 newOfftank->CastSpell(me->GetVictim(), SPELL_BLOOD_MIRROR_DAMAGE, true);
336 me->EnsureVictim()->CastSpell(newOfftank, SPELL_BLOOD_MIRROR_DUMMY, true);
339 newOfftank->HasAura(SPELL_UNSATED_CRAVING) && !newOfftank->HasAura(SPELL_THIRST_QUENCHED) &&
340 !newOfftank->HasAura(SPELL_GUSHING_WOUND))
341 newOfftank->CastSpell(newOfftank, SPELL_GUSHING_WOUND, TRIGGERED_FULL_MASK);
342
343 }
344 }
345 else
347 }
349 break;
350 }
354 DoCast(_offtank, SPELL_DELIRIOUS_SLASH);
356 break;
358 {
359 std::list<Player*> targets;
360 SelectRandomTarget(false, &targets);
362 if (targets.size() > 1)
363 {
365 for (std::list<Player*>::iterator itr = targets.begin(); itr != targets.end(); ++itr)
367 }
369 break;
370 }
372 if (Player* target = SelectRandomTarget(false))
373 {
377 }
379 break;
381 {
382 std::list<Player*> targets;
383 SelectRandomTarget(false, &targets);
385 for (std::list<Player*>::iterator itr = targets.begin(); itr != targets.end(); ++itr)
389 break;
390 }
391 case EVENT_AIR_PHASE:
392 DoStopAttack();
397 break;
399 me->SetDisableGravity(true);
401 break;
404 break;
405 default:
406 break;
407 }
408
410 return;
411 }
412 }
413
414 bool WasVampire(ObjectGuid guid) const
415 {
416 return _vampires.count(guid) != 0;
417 }
418
419 bool WasBloodbolted(ObjectGuid guid) const
420 {
421 return _bloodboltedPlayers.count(guid) != 0;
422 }
423
424private:
425 // offtank for this encounter is the player standing closest to main tank
426 Player* SelectRandomTarget(bool includeOfftank, std::list<Player*>* targetList = nullptr)
427 {
429 return nullptr;
430
431 std::list<Player*> tempTargets;
432 Unit* maintank = me->GetThreatManager().GetCurrentVictim();
434 if (Player* refTarget = ref->GetVictim()->ToPlayer())
435 if (refTarget != maintank && (includeOfftank || (refTarget->GetGUID() != _offtankGUID)))
436 tempTargets.push_back(refTarget->ToPlayer());
437
438 if (tempTargets.empty())
439 return nullptr;
440
441 if (targetList)
442 {
443 *targetList = std::move(tempTargets);
444 return nullptr;
445 }
446
447 if (includeOfftank)
448 {
449 tempTargets.sort(Trinity::ObjectDistanceOrderPred(me->GetVictim()));
450 return tempTargets.front();
451 }
452
454 }
455
459};
460
461// helper for shortened code
463
464// 70946, 71475, 71476, 71477 - Vampiric Bite
466{
471
482
483 void OnCast(SpellMissInfo missInfo)
484 {
485 if (GetCaster()->GetTypeId() != TYPEID_PLAYER || missInfo != SPELL_MISS_NONE)
486 return;
487
490
491 // Shadowmourne questline
492 if (Aura* aura = GetCaster()->GetAura(SPELL_GUSHING_WOUND))
493 {
494 if (aura->GetStackAmount() == 3)
495 {
497 GetCaster()->RemoveAura(aura);
498 }
499 else
501 }
502
503 if (InstanceScript* instance = GetCaster()->GetInstanceScript())
504 if (Creature* bloodQueen = ObjectAccessor::GetCreature(*GetCaster(), instance->GetGuidData(DATA_BLOOD_QUEEN_LANA_THEL)))
505 bloodQueen->AI()->SetGUID(GetHitUnit()->GetGUID(), GUID_VAMPIRE);
506 }
507
513
520};
521
522// 70877, 71474 - Frenzied Bloodthirst
524{
525 void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
526 {
527 if (InstanceScript* instance = GetTarget()->GetInstanceScript())
528 if (Creature* bloodQueen = ObjectAccessor::GetCreature(*GetTarget(), instance->GetGuidData(DATA_BLOOD_QUEEN_LANA_THEL)))
529 bloodQueen->AI()->Talk(EMOTE_BLOODTHIRST, GetTarget());
530 }
531
532 void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
533 {
534 Unit* target = GetTarget();
535 if (GetTargetApplication()->GetRemoveMode() == AURA_REMOVE_BY_EXPIRE)
536 if (InstanceScript* instance = target->GetInstanceScript())
537 if (Creature* bloodQueen = ObjectAccessor::GetCreature(*target, instance->GetGuidData(DATA_BLOOD_QUEEN_LANA_THEL)))
538 {
539 // this needs to be done BEFORE charm aura or we hit an assert in Unit::SetCharmedBy
540 if (target->GetVehicleKit())
541 target->RemoveVehicleKit();
542
543 bloodQueen->AI()->Talk(SAY_MIND_CONTROL);
544 bloodQueen->CastSpell(target, SPELL_UNCONTROLLABLE_FRENZY, true);
545 }
546 }
547
553};
554
556{
557 public:
558 explicit BloodboltHitCheck(LanaThelAI* ai) : _ai(ai) { }
559
560 bool operator()(WorldObject* object) const
561 {
562 return _ai->WasBloodbolted(object->GetGUID());
563 }
564
565 private:
567};
568
569// 71899, 71900, 71901, 71902 - Bloodbolt Whirl
571{
572 bool Validate(SpellInfo const* /*spell*/) override
573 {
575 }
576
577 bool Load() override
578 {
580 }
581
582 void FilterTargets(std::list<WorldObject*>& targets)
583 {
584 uint32 targetCount = (targets.size() + 2) / 3;
585 targets.remove_if(BloodboltHitCheck(static_cast<LanaThelAI*>(GetCaster()->GetAI())));
586 Trinity::Containers::RandomResize(targets, targetCount);
587 // mark targets now, effect hook has missile travel time delay (might cast next in that time)
588 for (std::list<WorldObject*>::const_iterator itr = targets.begin(); itr != targets.end(); ++itr)
589 GetCaster()->GetAI()->SetGUID((*itr)->GetGUID(), GUID_BLOODBOLT);
590 }
591
597
603};
604
605// 70871 - Essence of the Blood Queen
607{
608 bool Validate(SpellInfo const* /*spellInfo*/) override
609 {
611 }
612
613 void OnProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
614 {
616 DamageInfo* damageInfo = eventInfo.GetDamageInfo();
617 if (!damageInfo || !damageInfo->GetDamage())
618 return;
619
620 CastSpellExtraArgs args(aurEff);
621 args.AddSpellBP0(CalculatePct(damageInfo->GetDamage(), aurEff->GetAmount()));
623 }
624
629};
630
631// 71390 - Pact of the Darkfallen
633{
634 void FilterTargets(std::list<WorldObject*>& targets)
635 {
636 targets.remove_if(Trinity::UnitAuraCheck(false, SPELL_PACT_OF_THE_DARKFALLEN));
637
638 bool remove = true;
639 std::list<WorldObject*>::const_iterator itrEnd = targets.end(), itr, itr2;
640 // we can do this, unitList is MAX 4 in size
641 for (itr = targets.begin(); itr != itrEnd && remove; ++itr)
642 {
643 if (!GetCaster()->IsWithinDist(*itr, 5.0f, false))
644 remove = false;
645
646 for (itr2 = targets.begin(); itr2 != itrEnd && remove; ++itr2)
647 if (itr != itr2 && !(*itr2)->IsWithinDist(*itr, 5.0f, false))
648 remove = false;
649 }
650
651 if (remove)
652 {
653 if (InstanceScript* instance = GetCaster()->GetInstanceScript())
654 {
655 instance->DoRemoveAurasDueToSpellOnPlayers(SPELL_PACT_OF_THE_DARKFALLEN);
656 targets.clear();
657 }
658 }
659 }
660
665};
666
667// 71340 - Pact of the Darkfallen
669{
670 bool Validate(SpellInfo const* /*spell*/) override
671 {
673 }
674
675 // this is an additional effect to be executed
676 void PeriodicTick(AuraEffect const* aurEff)
677 {
678 SpellInfo const* damageSpell = sSpellMgr->AssertSpellInfo(SPELL_PACT_OF_THE_DARKFALLEN_DAMAGE, GetCastDifficulty());
679 SpellEffectValue damage = damageSpell->GetEffect(EFFECT_0).CalcValue();
680 float multiplier = 0.3375f + 0.1f * uint32(aurEff->GetTickNumber()/10); // do not convert to 0.01f - we need tick number/10 as INT (damage increases every 10 ticks)
681 damage = damage * multiplier;
682
684 args.AddSpellBP0(damage);
686 }
687
692};
693
694// 71341 - Pact of the Darkfallen
708
709// 71446, 71478, 71479, 71480 - Twilight Bloodbolt
711{
712 void HandleResistance(DamageInfo const& damageInfo, uint32& resistAmount, int32& /*absorbAmount*/)
713 {
714 Unit* caster = damageInfo.GetAttacker();;
715 Unit* target = damageInfo.GetVictim();
716 uint32 damage = damageInfo.GetDamage();
717 uint32 resistedDamage = Unit::CalcSpellResistedDamage(caster, target, damage, SPELL_SCHOOL_MASK_SHADOW, nullptr);
718 resistedDamage += Unit::CalcSpellResistedDamage(caster, target, damage, SPELL_SCHOOL_MASK_ARCANE, nullptr);
719 resistAmount = resistedDamage;
720 }
721
726};
727
729{
730 public:
731 achievement_once_bitten_twice_shy_n() : AchievementCriteriaScript("achievement_once_bitten_twice_shy_n") { }
732
733 bool OnCheck(Player* source, Unit* target) override
734 {
735 if (!target)
736 return false;
737
738 if (LanaThelAI* lanaThelAI = CAST_AI(LanaThelAI, target->GetAI()))
739 return !lanaThelAI->WasVampire(source->GetGUID());
740 return false;
741 }
742};
743
745{
746 public:
747 achievement_once_bitten_twice_shy_v() : AchievementCriteriaScript("achievement_once_bitten_twice_shy_v") { }
748
749 bool OnCheck(Player* source, Unit* target) override
750 {
751 if (!target)
752 return false;
753
754 if (LanaThelAI* lanaThelAI = CAST_AI(LanaThelAI, target->GetAI()))
755 return lanaThelAI->WasVampire(source->GetGUID());
756 return false;
757 }
758};
759
@ DIFFICULTY_10_N
Definition DBCEnums.h:936
uint8_t uint8
Definition Define.h:156
int32_t int32
Definition Define.h:150
uint32_t uint32
Definition Define.h:154
@ IN_PROGRESS
@ FAIL
@ POINT_MOTION_TYPE
@ TYPEID_PLAYER
Definition ObjectGuid.h:44
std::set< ObjectGuid > GuidSet
Definition ObjectGuid.h:432
Spells
Definition PlayerAI.cpp:32
@ SPELL_BERSERK
Definition PlayerAI.cpp:371
@ QUEST_STATUS_INCOMPLETE
Definition QuestDef.h:150
#define RegisterSpellScript(spell_script)
Definition ScriptMgr.h:1383
SpellEffIndex
@ EFFECT_1
@ EFFECT_0
SpellMissInfo
@ SPELL_MISS_NONE
@ TARGET_UNIT_SRC_AREA_ALLY
@ TARGET_UNIT_SRC_AREA_ENEMY
@ SPELL_SCHOOL_MASK_SHADOW
@ SPELL_SCHOOL_MASK_ARCANE
@ SPELL_EFFECT_SCRIPT_EFFECT
@ SPELL_EFFECT_TRIGGER_SPELL
@ SPELL_CUSTOM_ERROR_CANT_TARGET_VAMPIRES
SpellCastResult
@ SPELL_FAILED_CUSTOM_ERROR
@ SPELL_CAST_OK
AuraEffectHandleModes
@ AURA_EFFECT_HANDLE_REAL
@ AURA_REMOVE_BY_EXPIRE
@ AURA_REMOVE_BY_ENEMY_SPELL
@ SPELL_AURA_DUMMY
@ SPELL_AURA_OVERRIDE_SPELLS
@ SPELL_AURA_PERIODIC_TRIGGER_SPELL
double SpellEffectValue
This is a double instead of float to be able to store full range of int32.
@ TRIGGERED_FULL_MASK
Used when doing CastSpell with triggered == true.
#define sSpellMgr
Definition SpellMgr.h:812
#define BeforeSpellHitFn(F)
#define SpellCheckCastFn(F)
#define AuraEffectProcFn(F, I, N)
#define SpellOnResistAbsorbCalculateFn(F)
#define SpellEffectFn(F, I, N)
#define SpellObjectAreaTargetSelectFn(F, I, N)
#define AuraEffectPeriodicFn(F, I, N)
#define AuraEffectApplyFn(F, I, N, M)
#define AuraEffectRemoveFn(F, I, N, M)
EvadeReason
#define CAST_AI(a, b)
Definition UnitAI.h:29
@ REACT_PASSIVE
@ REACT_AGGRESSIVE
@ UNIT_STATE_EVADE
Definition Unit.h:283
@ UNIT_STATE_CASTING
Definition Unit.h:276
T CalculatePct(T base, U pct)
Definition Util.h:72
Guids
#define ESSENCE_OF_BLOOD_QUEEN
Position const centerPos
boss_blood_queen_lana_thel LanaThelAI
#define ESSENCE_OF_BLOOD_QUEEN_PLR
@ SPELL_FRENZIED_BLOODTHIRST_VISUAL
@ SPELL_UNCONTROLLABLE_FRENZY
@ SPELL_CLEAR_ALL_STATUS_AILMENTS
@ SPELL_PACT_OF_THE_DARKFALLEN_TARGET
@ SPELL_PRESENCE_OF_THE_DARKFALLEN
@ SPELL_PACT_OF_THE_DARKFALLEN_DAMAGE
@ SPELL_ESSENCE_OF_THE_BLOOD_QUEEN_PLR
@ SPELL_ESSENCE_OF_THE_BLOOD_QUEEN_HEAL
@ SPELL_BLOOD_INFUSION_CREDIT
@ SPELL_PACT_OF_THE_DARKFALLEN
@ SPELL_PRESENCE_OF_THE_DARKFALLEN_2
@ SPELL_TWILIGHT_BLOODBOLT_TARGET
bool IsVampire(Unit const *unit)
void AddSC_boss_blood_queen_lana_thel()
#define PRESENCE_OF_THE_DARKFALLEN
#define FRENZIED_BLOODTHIRST
#define DELIRIOUS_SLASH
uint32 const vampireAuras[3][4]
Position const airPos
uint32 GetTickNumber() const
SpellEffectValue GetAmount() const
void PreventDefaultAction()
AuraApplication const * GetTargetApplication() const
HookList< EffectApplyHandler > AfterEffectRemove
HookList< EffectPeriodicHandler > OnEffectPeriodic
Unit * GetTarget() const
Difficulty GetCastDifficulty() const
HookList< EffectProcHandler > OnEffectProc
HookList< AuraProcHandler > OnProc
HookList< EffectApplyHandler > OnEffectApply
ObjectGuid const & GetGUID() const
Definition BaseEntity.h:163
TypeID GetTypeId() const
Definition BaseEntity.h:166
bool operator()(WorldObject *object) const
InstanceScript *const instance
void _JustReachedHome()
EventMap events
void DoZoneInCombat()
Definition CreatureAI.h:169
bool _EnterEvadeMode(EvadeReason why=EvadeReason::Other)
bool UpdateVictim()
Creature *const me
Definition CreatureAI.h:63
void SetReactState(ReactStates st)
Definition Creature.h:174
Unit * SelectVictim()
Unit * GetVictim() const
Definition Unit.h:447
Unit * GetAttacker() const
Definition Unit.h:446
uint32 GetDamage() const
Definition Unit.h:452
uint32 ExecuteEvent()
Definition EventMap.cpp:77
void Update(uint32 time)
Definition EventMap.h:61
void DelayEvents(Milliseconds delay)
Definition EventMap.cpp:100
void CancelEventGroup(uint32 group)
Definition EventMap.cpp:157
void ScheduleEvent(uint32 eventId, Milliseconds time, uint32 group=0, uint8 phase=0)
Definition EventMap.cpp:40
void RescheduleEvent(uint32 eventId, Milliseconds time, uint32 group=0, uint8 phase=0)
Definition EventMap.cpp:56
virtual bool SetBossState(uint32 id, EncounterState state)
void DoRemoveAurasDueToSpellOnPlayers(uint32 spell, bool includePets=false, bool includeControlled=false)
void DoCastSpellOnPlayers(uint32 spell, bool includePets=false, bool includeControlled=false)
virtual bool CheckRequiredBosses(uint32, Player const *=nullptr) const
Difficulty GetDifficultyID() const
Definition Map.h:360
void MovePoint(uint32 id, Position const &pos, bool generatePath=true, Optional< float > finalOrient={}, Optional< float > speed={}, MovementWalkRunSpeedSelectionMode speedSelectionMode=MovementWalkRunSpeedSelectionMode::Default, Optional< float > closeEnoughDistance={}, Optional< MovementFadeObject > fadeObject={}, Scripting::v2::ActionResultSetter< MovementStopReason > &&scriptResult={})
void MoveTargetedHome()
static ObjectGuid const Empty
Definition ObjectGuid.h:314
bool IsEmpty() const
Definition ObjectGuid.h:362
void Clear()
Definition ObjectGuid.h:329
Player * ToPlayer()
Definition Object.h:126
uint32 GetEntry() const
Definition Object.h:89
QuestStatus GetQuestStatus(uint32 quest_id) const
Definition Player.cpp:15962
DamageInfo * GetDamageInfo() const
Definition Unit.h:511
SpellEffectValue CalcValue(WorldObject const *caster=nullptr, SpellEffectValue const *basePoints=nullptr, Unit const *target=nullptr, float *variance=nullptr, uint32 castItemId=0, int32 itemLevel=-1) const
SpellEffectInfo const & GetEffect(SpellEffIndex index) const
Definition SpellInfo.h:588
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
HookList< CheckCastHandler > OnCheckCast
Unit * GetCaster() const
void PreventHitDefaultEffect(SpellEffIndex effIndex)
Unit * GetHitUnit() const
HookList< EffectHandler > OnEffectHitTarget
HookList< CastHandler > OnCast
HookList< OnCalculateResistAbsorbHandler > OnCalculateResistAbsorb
void SetCustomCastResultMessage(SpellCustomErrors result)
HookList< BeforeHitHandler > BeforeHit
Unit * GetExplTargetUnit() const
HookList< ObjectAreaTargetSelectHandler > OnObjectAreaTargetSelect
Unit * GetCurrentVictim()
bool IsThreatListEmpty(bool includeOffline=false) const
Trinity::IteratorPair< ThreatListIterator, std::nullptr_t > GetSortedThreatList() const
SpellCastResult DoCastSelf(uint32 spellId, CastSpellExtraArgs const &args={})
Definition UnitAI.h:160
virtual void SetGUID(ObjectGuid const &guid, int32 id)
Definition UnitAI.h:76
SpellCastResult DoCastVictim(uint32 spellId, CastSpellExtraArgs const &args={})
Definition UnitAI.cpp:180
SpellCastResult DoCastAOE(uint32 spellId, CastSpellExtraArgs const &args={})
Definition UnitAI.h:162
SpellCastResult DoCast(uint32 spellId)
Definition UnitAI.cpp:89
Definition Unit.h:635
void RemoveAura(AuraApplicationMap::iterator &i, AuraRemoveMode mode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:3828
ThreatManager & GetThreatManager()
Definition Unit.h:1078
MotionMaster * GetMotionMaster()
Definition Unit.h:1723
static uint32 CalcSpellResistedDamage(Unit const *attacker, Unit *victim, uint32 damage, SpellSchoolMask schoolMask, SpellInfo const *spellInfo)
Definition Unit.cpp:1775
UnitAI * GetAI() const
Definition Unit.h:668
bool SetDisableGravity(bool disable, bool updateAnimTier=true)
Definition Unit.cpp:13361
AnimTier GetAnimTier() const
Definition Unit.h:909
void AddUnitState(uint32 f)
Definition Unit.h:742
Unit * EnsureVictim() const
Definition Unit.h:728
Unit * GetVictim() const
Definition Unit.h:726
bool HasUnitState(const uint32 f) const
Definition Unit.h:743
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
Definition Unit.cpp:4804
void RemoveVehicleKit(bool onRemoveFromWorld=false)
Definition Unit.cpp:12090
Vehicle * GetVehicleKit() const
Definition Unit.h:1782
Map * GetMap() const
Definition Object.h:411
InstanceScript * GetInstanceScript() const
Definition Object.cpp:396
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
Definition Object.cpp:2217
void setActive(bool isActiveObject)
Definition Object.cpp:276
bool IsWithinDist(WorldObject const *obj, float dist2compare, bool is3D=true, bool incOwnRadius=true, bool incTargetRadius=true) const
Definition Object.cpp:496
bool OnCheck(Player *source, Unit *target) override
bool OnCheck(Player *source, Unit *target) override
bool Validate(SpellInfo const *) override
void FilterTargets(std::list< WorldObject * > &targets)
void HandleScript(SpellEffIndex effIndex)
void OnProc(AuraEffect *aurEff, ProcEventInfo &eventInfo)
void OnRemove(AuraEffect const *, AuraEffectHandleModes)
void OnApply(AuraEffect const *, AuraEffectHandleModes)
void FilterTargets(std::list< WorldObject * > &unitList)
void FilterTargets(std::list< WorldObject * > &targets)
void HandleResistance(DamageInfo const &damageInfo, uint32 &resistAmount, int32 &)
bool Validate(SpellInfo const *) override
@ SPELL_UNSATED_CRAVING
@ SPELL_SHADOWS_FATE
@ LIGHT_S_HAMMER_TELEPORT
#define RegisterIcecrownCitadelCreatureAI(ai_name)
@ DATA_BLOOD_QUEEN_LANA_THEL
@ NPC_BLOOD_QUEEN_LANA_THEL
TC_GAME_API Player * GetPlayer(Map const *, ObjectGuid const &guid)
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
auto SelectRandomContainerElement(C const &container) -> std::add_const_t< decltype(*std::ranges::begin(container))> &
Definition Containers.h:110
void RandomResize(C &container, std::size_t requestedSize)
Definition Containers.h:67
CastSpellExtraArgs & AddSpellBP0(SpellEffectValue val)
void AttackStart(Unit *) override
== Triggered Actions Requested ==================
bool Is25ManRaid() const
void KilledUnit(Unit *victim) override
bool WasBloodbolted(ObjectGuid guid) const
bool WasVampire(ObjectGuid guid) const
void SetGUID(ObjectGuid const &guid, int32 id) override
Player * SelectRandomTarget(bool includeOfftank, std::list< Player * > *targetList=nullptr)
void MovementInform(uint32 type, uint32 id) override
void EnterEvadeMode(EvadeReason why) override