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
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
141// 37955 - Blood-Queen Lana'thel
143{
148
150 {
152 }
153
169
189
190 void JustDied(Unit* /*killer*/) override
191 {
192 _JustDied();
194
197
198 CleanAuras();
199 }
200
214
215 void EnterEvadeMode(EvadeReason why) override
216 {
217 if (!_EnterEvadeMode(why))
218 return;
219
220 CleanAuras();
223 Reset();
224 }
225
234
235 void KilledUnit(Unit* victim) override
236 {
237 if (victim->GetTypeId() == TYPEID_PLAYER)
238 Talk(SAY_KILL);
239 }
240
241 void SetGUID(ObjectGuid const& guid, int32 id) override
242 {
243 switch (id)
244 {
245 case GUID_VAMPIRE:
246 _vampires.insert(guid);
247 break;
248 case GUID_BLOODBOLT:
249 _bloodboltedPlayers.insert(guid);
250 break;
251 default:
252 break;
253 }
254 }
255
256 void MovementInform(uint32 type, uint32 id) override
257 {
258 if (type != POINT_MOTION_TYPE)
259 return;
260
261 switch (id)
262 {
263 case POINT_CENTER:
265 events.ScheduleEvent(EVENT_AIR_PHASE, 100s + (Is25ManRaid() ? 0s : 20s));
269 break;
270 case POINT_AIR:
271 _bloodboltedPlayers.clear();
275 break;
276 case POINT_GROUND:
277 me->SetDisableGravity(false);
279 if (Unit* victim = me->SelectVictim())
280 AttackStart(victim);
282 break;
283 default:
284 break;
285 }
286 }
287
288 void UpdateAI(uint32 diff) override
289 {
290 if (!UpdateVictim())
291 return;
292
293 events.Update(diff);
294
296 return;
297
298 while (uint32 eventId = events.ExecuteEvent())
299 {
300 switch (eventId)
301 {
302 case EVENT_BERSERK:
306 break;
308 {
309 std::list<Player*> targets;
310 SelectRandomTarget(false, &targets);
311 if (!targets.empty())
312 {
313 Unit* target = targets.front();
317 _vampires.insert(target->GetGUID());
320 }
321 break;
322 }
324 {
325 // victim can be nullptr when this is processed in the same update tick as EVENT_AIR_PHASE
326 if (me->GetVictim())
327 {
328 Player* newOfftank = SelectRandomTarget(true);
329 if (newOfftank)
330 {
331 if (_offtankGUID != newOfftank->GetGUID())
332 {
333 _offtankGUID = newOfftank->GetGUID();
334
335 // both spells have SPELL_ATTR5_SINGLE_TARGET_SPELL, no manual removal needed
336 newOfftank->CastSpell(me->GetVictim(), SPELL_BLOOD_MIRROR_DAMAGE, true);
337 me->EnsureVictim()->CastSpell(newOfftank, SPELL_BLOOD_MIRROR_DUMMY, true);
340 newOfftank->HasAura(SPELL_UNSATED_CRAVING) && !newOfftank->HasAura(SPELL_THIRST_QUENCHED) &&
341 !newOfftank->HasAura(SPELL_GUSHING_WOUND))
342 newOfftank->CastSpell(newOfftank, SPELL_GUSHING_WOUND, TRIGGERED_FULL_MASK);
343
344 }
345 }
346 else
348 }
350 break;
351 }
355 DoCast(_offtank, SPELL_DELIRIOUS_SLASH);
357 break;
359 {
360 std::list<Player*> targets;
361 SelectRandomTarget(false, &targets);
363 if (targets.size() > 1)
364 {
366 for (std::list<Player*>::iterator itr = targets.begin(); itr != targets.end(); ++itr)
368 }
370 break;
371 }
373 if (Player* target = SelectRandomTarget(false))
374 {
378 }
380 break;
382 {
383 std::list<Player*> targets;
384 SelectRandomTarget(false, &targets);
386 for (std::list<Player*>::iterator itr = targets.begin(); itr != targets.end(); ++itr)
390 break;
391 }
392 case EVENT_AIR_PHASE:
393 DoStopAttack();
398 break;
400 me->SetDisableGravity(true);
402 break;
405 break;
406 default:
407 break;
408 }
409
411 return;
412 }
413 }
414
415 bool WasVampire(ObjectGuid guid) const
416 {
417 return _vampires.count(guid) != 0;
418 }
419
420 bool WasBloodbolted(ObjectGuid guid) const
421 {
422 return _bloodboltedPlayers.count(guid) != 0;
423 }
424
425private:
426 // offtank for this encounter is the player standing closest to main tank
427 Player* SelectRandomTarget(bool includeOfftank, std::list<Player*>* targetList = nullptr)
428 {
430 return nullptr;
431
432 std::list<Player*> tempTargets;
433 Unit* maintank = me->GetThreatManager().GetCurrentVictim();
435 if (Player* refTarget = ref->GetVictim()->ToPlayer())
436 if (refTarget != maintank && (includeOfftank || (refTarget->GetGUID() != _offtankGUID)))
437 tempTargets.push_back(refTarget->ToPlayer());
438
439 if (tempTargets.empty())
440 return nullptr;
441
442 if (targetList)
443 {
444 *targetList = std::move(tempTargets);
445 return nullptr;
446 }
447
448 if (includeOfftank)
449 {
450 tempTargets.sort(Trinity::ObjectDistanceOrderPred(me->GetVictim()));
451 return tempTargets.front();
452 }
453
455 }
456
460};
461
462// helper for shortened code
464
465// 70946, 71475, 71476, 71477 - Vampiric Bite
467{
472
483
484 void OnCast(SpellMissInfo missInfo)
485 {
486 if (GetCaster()->GetTypeId() != TYPEID_PLAYER || missInfo != SPELL_MISS_NONE)
487 return;
488
491
492 // Shadowmourne questline
493 if (Aura* aura = GetCaster()->GetAura(SPELL_GUSHING_WOUND))
494 {
495 if (aura->GetStackAmount() == 3)
496 {
498 GetCaster()->RemoveAura(aura);
499 }
500 else
502 }
503
504 if (InstanceScript* instance = GetCaster()->GetInstanceScript())
505 if (Creature* bloodQueen = ObjectAccessor::GetCreature(*GetCaster(), instance->GetGuidData(DATA_BLOOD_QUEEN_LANA_THEL)))
506 bloodQueen->AI()->SetGUID(GetHitUnit()->GetGUID(), GUID_VAMPIRE);
507 }
508
514
521};
522
523// 70877, 71474 - Frenzied Bloodthirst
525{
526 void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
527 {
528 if (InstanceScript* instance = GetTarget()->GetInstanceScript())
529 if (Creature* bloodQueen = ObjectAccessor::GetCreature(*GetTarget(), instance->GetGuidData(DATA_BLOOD_QUEEN_LANA_THEL)))
530 bloodQueen->AI()->Talk(EMOTE_BLOODTHIRST, GetTarget());
531 }
532
533 void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
534 {
535 Unit* target = GetTarget();
536 if (GetTargetApplication()->GetRemoveMode() == AURA_REMOVE_BY_EXPIRE)
537 if (InstanceScript* instance = target->GetInstanceScript())
538 if (Creature* bloodQueen = ObjectAccessor::GetCreature(*target, instance->GetGuidData(DATA_BLOOD_QUEEN_LANA_THEL)))
539 {
540 // this needs to be done BEFORE charm aura or we hit an assert in Unit::SetCharmedBy
541 if (target->GetVehicleKit())
542 target->RemoveVehicleKit();
543
544 bloodQueen->AI()->Talk(SAY_MIND_CONTROL);
545 bloodQueen->CastSpell(target, SPELL_UNCONTROLLABLE_FRENZY, true);
546 }
547 }
548
554};
555
557{
558 public:
559 explicit BloodboltHitCheck(LanaThelAI* ai) : _ai(ai) { }
560
561 bool operator()(WorldObject* object) const
562 {
563 return _ai->WasBloodbolted(object->GetGUID());
564 }
565
566 private:
568};
569
570// 71899, 71900, 71901, 71902 - Bloodbolt Whirl
572{
573 bool Validate(SpellInfo const* /*spell*/) override
574 {
576 }
577
578 bool Load() override
579 {
581 }
582
583 void FilterTargets(std::list<WorldObject*>& targets)
584 {
585 uint32 targetCount = (targets.size() + 2) / 3;
586 targets.remove_if(BloodboltHitCheck(static_cast<LanaThelAI*>(GetCaster()->GetAI())));
587 Trinity::Containers::RandomResize(targets, targetCount);
588 // mark targets now, effect hook has missile travel time delay (might cast next in that time)
589 for (std::list<WorldObject*>::const_iterator itr = targets.begin(); itr != targets.end(); ++itr)
590 GetCaster()->GetAI()->SetGUID((*itr)->GetGUID(), GUID_BLOODBOLT);
591 }
592
598
604};
605
606// 70871 - Essence of the Blood Queen
608{
609 bool Validate(SpellInfo const* /*spellInfo*/) override
610 {
612 }
613
614 void OnProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
615 {
617 DamageInfo* damageInfo = eventInfo.GetDamageInfo();
618 if (!damageInfo || !damageInfo->GetDamage())
619 return;
620
621 CastSpellExtraArgs args(aurEff);
622 args.AddSpellBP0(CalculatePct(damageInfo->GetDamage(), aurEff->GetAmount()));
624 }
625
630};
631
632// 71390 - Pact of the Darkfallen
634{
635 void FilterTargets(std::list<WorldObject*>& targets)
636 {
637 targets.remove_if(Trinity::UnitAuraCheck(false, SPELL_PACT_OF_THE_DARKFALLEN));
638
639 bool remove = true;
640 std::list<WorldObject*>::const_iterator itrEnd = targets.end(), itr, itr2;
641 // we can do this, unitList is MAX 4 in size
642 for (itr = targets.begin(); itr != itrEnd && remove; ++itr)
643 {
644 if (!GetCaster()->IsWithinDist(*itr, 5.0f, false))
645 remove = false;
646
647 for (itr2 = targets.begin(); itr2 != itrEnd && remove; ++itr2)
648 if (itr != itr2 && !(*itr2)->IsWithinDist(*itr, 5.0f, false))
649 remove = false;
650 }
651
652 if (remove)
653 {
654 if (InstanceScript* instance = GetCaster()->GetInstanceScript())
655 {
656 instance->DoRemoveAurasDueToSpellOnPlayers(SPELL_PACT_OF_THE_DARKFALLEN);
657 targets.clear();
658 }
659 }
660 }
661
666};
667
668// 71340 - Pact of the Darkfallen
670{
671 bool Validate(SpellInfo const* /*spell*/) override
672 {
674 }
675
676 // this is an additional effect to be executed
677 void PeriodicTick(AuraEffect const* aurEff)
678 {
679 SpellInfo const* damageSpell = sSpellMgr->AssertSpellInfo(SPELL_PACT_OF_THE_DARKFALLEN_DAMAGE, GetCastDifficulty());
680 SpellEffectValue damage = damageSpell->GetEffect(EFFECT_0).CalcValue();
681 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)
682 damage = damage * multiplier;
683
685 args.AddSpellBP0(damage);
687 }
688
693};
694
695// 71341 - Pact of the Darkfallen
709
710// 71446, 71478, 71479, 71480 - Twilight Bloodbolt
712{
713 void HandleResistance(DamageInfo const& damageInfo, uint32& resistAmount, int32& /*absorbAmount*/)
714 {
715 Unit* caster = damageInfo.GetAttacker();;
716 Unit* target = damageInfo.GetVictim();
717 uint32 damage = damageInfo.GetDamage();
718 uint32 resistedDamage = Unit::CalcSpellResistedDamage(caster, target, damage, SPELL_SCHOOL_MASK_SHADOW, nullptr);
719 resistedDamage += Unit::CalcSpellResistedDamage(caster, target, damage, SPELL_SCHOOL_MASK_ARCANE, nullptr);
720 resistAmount = resistedDamage;
721 }
722
727};
728
730{
731 public:
732 achievement_once_bitten_twice_shy_n() : AchievementCriteriaScript("achievement_once_bitten_twice_shy_n") { }
733
734 bool OnCheck(Player* source, Unit* target) override
735 {
736 if (!target)
737 return false;
738
739 if (LanaThelAI* lanaThelAI = CAST_AI(LanaThelAI, target->GetAI()))
740 return !lanaThelAI->WasVampire(source->GetGUID());
741 return false;
742 }
743};
744
746{
747 public:
748 achievement_once_bitten_twice_shy_v() : AchievementCriteriaScript("achievement_once_bitten_twice_shy_v") { }
749
750 bool OnCheck(Player* source, Unit* target) override
751 {
752 if (!target)
753 return false;
754
755 if (LanaThelAI* lanaThelAI = CAST_AI(LanaThelAI, target->GetAI()))
756 return lanaThelAI->WasVampire(source->GetGUID());
757 return false;
758 }
759};
760
@ DIFFICULTY_10_N
Definition DBCEnums.h:939
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
@ SPELL_BERSERK
Definition PlayerAI.cpp:371
@ QUEST_STATUS_INCOMPLETE
Definition QuestDef.h:146
#define RegisterSpellScript(spell_script)
Definition ScriptMgr.h:1383
SpellEffIndex
@ EFFECT_1
@ EFFECT_0
@ SPELL_EFFECT_SCRIPT_EFFECT
@ SPELL_EFFECT_TRIGGER_SPELL
SpellMissInfo
@ SPELL_MISS_NONE
@ TARGET_UNIT_SRC_AREA_ALLY
@ TARGET_UNIT_SRC_AREA_ENEMY
@ SPELL_SCHOOL_MASK_SHADOW
@ SPELL_SCHOOL_MASK_ARCANE
@ 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:297
@ UNIT_STATE_CASTING
Definition Unit.h:290
T CalculatePct(T base, U pct)
Definition Util.h:72
#define ESSENCE_OF_BLOOD_QUEEN
Position const centerPos
@ 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
boss_blood_queen_lana_thel LanaThelAI
#define ESSENCE_OF_BLOOD_QUEEN_PLR
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:180
Unit * SelectVictim()
Unit * GetVictim() const
Definition Unit.h:461
Unit * GetAttacker() const
Definition Unit.h:460
uint32 GetDamage() const
Definition Unit.h:466
void Update(uint32 time)
Definition EventMap.h:77
void DelayEvents(Milliseconds delay)
Definition EventMap.cpp:100
EventId ExecuteEvent()
Definition EventMap.cpp:77
void RescheduleEvent(EventId eventId, Milliseconds time, GroupIndex group=0u, PhaseIndex phase=0u)
Definition EventMap.cpp:56
void CancelEventGroup(GroupIndex group)
Definition EventMap.cpp:178
void ScheduleEvent(EventId eventId, Milliseconds time, GroupIndex group=0u, PhaseIndex phase=0u)
Definition EventMap.cpp:40
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:363
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:15929
DamageInfo * GetDamageInfo() const
Definition Unit.h:524
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:590
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:172
SpellCastResult DoCastAOE(uint32 spellId, CastSpellExtraArgs const &args={})
Definition UnitAI.h:162
SpellCastResult DoCast(uint32 spellId)
Definition UnitAI.cpp:81
Definition Unit.h:647
void RemoveAura(AuraApplicationMap::iterator &i, AuraRemoveMode mode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:3846
ThreatManager & GetThreatManager()
Definition Unit.h:1093
MotionMaster * GetMotionMaster()
Definition Unit.h:1750
static uint32 CalcSpellResistedDamage(Unit const *attacker, Unit *victim, uint32 damage, SpellSchoolMask schoolMask, SpellInfo const *spellInfo)
Definition Unit.cpp:1780
UnitAI * GetAI() const
Definition Unit.h:680
AnimTier GetAnimTier() const
Definition Unit.h:924
void AddUnitState(uint32 f)
Definition Unit.h:754
Unit * EnsureVictim() const
Definition Unit.h:740
Unit * GetVictim() const
Definition Unit.h:738
bool HasUnitState(const uint32 f) const
Definition Unit.h:755
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
Definition Unit.cpp:4822
void RemoveVehicleKit(bool onRemoveFromWorld=false)
Definition Unit.cpp:12185
Vehicle * GetVehicleKit() const
Definition Unit.h:1798
bool SetDisableGravity(bool disable, bool updateAnimTier=true, bool updatePlayHoverAnim=true)
Definition Unit.cpp:13440
Map * GetMap() const
Definition Object.h:411
InstanceScript * GetInstanceScript() const
Definition Object.cpp:394
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
Definition Object.cpp:2222
void setActive(bool isActiveObject)
Definition Object.cpp:274
bool IsWithinDist(WorldObject const *obj, float dist2compare, bool is3D=true, bool incOwnRadius=true, bool incTargetRadius=true) const
Definition Object.cpp:494
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