TrinityCore
Loading...
Searching...
No Matches
spell_dk.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/*
19 * Scripts for spells with SPELLFAMILY_DEATHKNIGHT and SPELLFAMILY_GENERIC spells used by deathknight players.
20 * Ordered alphabetically using scriptname.
21 * Scriptnames of files in this file should be prefixed with "spell_dk_".
22 */
23
24#include "ScriptMgr.h"
25#include "Containers.h"
26#include "CreatureAI.h"
27#include "DBCStores.h"
28#include "Map.h"
29#include "ObjectAccessor.h"
30#include "ObjectMgr.h"
31#include "Player.h"
32#include "PlayerAI.h"
33#include "Spell.h"
34#include "SpellAuraEffects.h"
35#include "SpellAuras.h"
36#include "SpellHistory.h"
37#include "SpellMgr.h"
38#include "SpellScript.h"
39#include "TemporarySummon.h"
40#include "Unit.h"
41
43{
115
121
128
129// -49200 - Acclimation
131{
133
146
147 bool CheckProc(ProcEventInfo& eventInfo)
148 {
149 if (DamageInfo* damageInfo = eventInfo.GetDamageInfo())
150 {
151 switch (GetFirstSchoolInMask(damageInfo->GetSchoolMask()))
152 {
159 return true;
160 default:
161 break;
162 }
163 }
164
165 return false;
166 }
167
168 void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
169 {
171 uint32 triggerspell = 0;
172
173 switch (GetFirstSchoolInMask(eventInfo.GetDamageInfo()->GetSchoolMask()))
174 {
176 triggerspell = SPELL_DK_ACCLIMATION_HOLY;
177 break;
179 triggerspell = SPELL_DK_ACCLIMATION_FIRE;
180 break;
182 triggerspell = SPELL_DK_ACCLIMATION_NATURE;
183 break;
185 triggerspell = SPELL_DK_ACCLIMATION_FROST;
186 break;
188 triggerspell = SPELL_DK_ACCLIMATION_SHADOW;
189 break;
191 triggerspell = SPELL_DK_ACCLIMATION_ARCANE;
192 break;
193 default:
194 return;
195 }
196
197 if (Unit* target = eventInfo.GetActionTarget())
198 target->CastSpell(target, triggerspell, aurEff);
199 }
200
206};
207
208// 70656 - Advantage (T10 4P Melee Bonus)
210{
212
213 bool Validate(SpellInfo const* /*spellInfo*/) override
214 {
216 }
217
218 bool CheckProc(ProcEventInfo& eventInfo)
219 {
220 if (Unit* caster = eventInfo.GetActor())
221 {
222 if (caster->GetTypeId() != TYPEID_PLAYER || caster->GetClass() != CLASS_DEATH_KNIGHT)
223 return false;
224
225 for (uint8 i = 0; i < MAX_RUNES; ++i)
226 if (caster->ToPlayer()->GetRuneCooldown(i) == 0)
227 return false;
228
229 return true;
230 }
231
232 return false;
233 }
234
239};
240
241// 50462 - Anti-Magic Shell (on raid member)
243{
245
246public:
251
252private:
254
255 bool Load() override
256 {
258 return true;
259 }
260
261 void CalculateAmount(AuraEffect const* /*aurEff*/, int32 & amount, bool & /*canBeRecalculated*/)
262 {
264 amount = -1;
265 }
266
267 void Absorb(AuraEffect* /*aurEff*/, DamageInfo & dmgInfo, uint32 & absorbAmount)
268 {
269 absorbAmount = CalculatePct(dmgInfo.GetDamage(), absorbPct);
270 }
271
277};
278
279// 48707 - Anti-Magic Shell (on self)
281{
283
284public:
286 {
287 absorbPct = 0;
288 hpPct = 0;
289 }
290
291private:
293 bool Load() override
294 {
297 return true;
298 }
299
300 bool Validate(SpellInfo const* /*spellInfo*/) override
301 {
303 }
304
305 void CalculateAmount(AuraEffect const* /*aurEff*/, int32 & amount, bool & /*canBeRecalculated*/)
306 {
308 }
309
310 void Absorb(AuraEffect* /*aurEff*/, DamageInfo & dmgInfo, uint32 & absorbAmount)
311 {
312 absorbAmount = std::min(CalculatePct(dmgInfo.GetDamage(), absorbPct), GetTarget()->CountPctFromMaxHealth(hpPct));
313 }
314
315 void Trigger(AuraEffect* aurEff, DamageInfo& /*dmgInfo*/, uint32& absorbAmount)
316 {
317 // damage absorbed by Anti-Magic Shell energizes the DK with additional runic power.
318 // This, if I'm not mistaken, shows that we get back ~20% of the absorbed damage as runic power.
319 CastSpellExtraArgs args(aurEff);
320 args.AddSpellBP0(CalculatePct(absorbAmount, 20));
322 }
323
330};
331
332// 50461 - Anti-Magic Zone
334{
336
337public:
339 {
340 absorbPct = 0;
341 }
342
343private:
345
346 bool Load() override
347 {
349 return true;
350 }
351
352 bool Validate(SpellInfo const* /*spellInfo*/) override
353 {
355 }
356
357 void CalculateAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
358 {
359 SpellInfo const* talentSpell = sSpellMgr->AssertSpellInfo(SPELL_DK_ANTI_MAGIC_SHELL_TALENT);
360 Unit* owner = GetCaster()->GetOwner();
361 if (!owner)
362 return;
363
364 amount = talentSpell->GetEffect(EFFECT_0).CalcValue(owner);
365 if (Player* player = owner->ToPlayer())
366 amount += int32(2 * player->GetTotalAttackPowerValue(BASE_ATTACK));
367 }
368
369 void Absorb(AuraEffect* /*aurEff*/, DamageInfo& dmgInfo, uint32 &absorbAmount)
370 {
371 absorbAmount = CalculatePct(dmgInfo.GetDamage(), absorbPct);
372 }
373
379};
380
381// -49182 - Blade Barrier
383{
385
386 bool CheckProc(ProcEventInfo& eventInfo)
387 {
388 if (eventInfo.GetSpellInfo() != nullptr)
389 if (Player* player = eventInfo.GetActor()->ToPlayer())
390 if (player->GetClass() == CLASS_DEATH_KNIGHT && player->IsBaseRuneSlotsOnCooldown(RUNE_BLOOD))
391 return true;
392
393 return false;
394 }
395
400};
401
402// -48721 - Blood Boil
404{
406
407public:
409 {
410 _executed = false;
411 }
412
413private:
414 bool Validate(SpellInfo const* /*spellInfo*/) override
415 {
417 }
418
419 bool Load() override
420 {
422 }
423
425 {
426 if (_executed || !GetHitUnit())
427 return;
428
429 _executed = true;
431 }
432
437
439};
440
441// 50453 - Bloodworms Health Leech
443{
445
446 bool Validate(SpellInfo const* /*spellInfo*/) override
447 {
449 }
450
451 bool CheckProc(ProcEventInfo& /*eventInfo*/)
452 {
454 return _procTarget != nullptr;
455 }
456
457 void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
458 {
460 DamageInfo* damageInfo = eventInfo.GetDamageInfo();
461 if (!damageInfo || !damageInfo->GetDamage())
462 return;
463
464 CastSpellExtraArgs args(aurEff);
465 args.AddSpellBP0(damageInfo->GetDamage() * 1.5f);
467 }
468
474
475private:
476 Unit* _procTarget = nullptr;
477};
478
479// -49027 - Bloodworms
494
495// -48979 - Butchery
497{
499
500 bool Validate(SpellInfo const* /*spellInfo*/) override
501 {
503 }
504
505 void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
506 {
508 CastSpellExtraArgs args(aurEff);
509 args.AddSpellBP0(aurEff->GetAmount());
510 eventInfo.GetActor()->CastSpell(nullptr, SPELL_DK_BUTCHERY_RUNIC_POWER, args);
511 }
512
517};
518
520{
521public:
522 explicit CorpseExplosionCheck(ObjectGuid casterGUID, bool allowGhoul) : _casterGUID(casterGUID),
523 _allowGhoul(allowGhoul) { }
524
525 bool operator()(WorldObject* obj) const
526 {
527 if (Unit* target = obj->ToUnit())
528 {
529 if ((target->isDead() || (_allowGhoul && target->GetEntry() == NPC_DK_GHOUL && target->GetOwnerGUID() == _casterGUID))
530 && !(target->GetCreatureTypeMask() & CREATURE_TYPEMASK_MECHANICAL_OR_ELEMENTAL)
531 && target->GetDisplayId() == target->GetNativeDisplayId())
532 return false;
533 }
534
535 return true;
536 }
537
538private:
541};
542
543// -49158 - Corpse Explosion (51325, 51326, 51327, 51328)
545{
547
548 bool Validate(SpellInfo const* spellInfo) override
549 {
550 return ValidateSpellInfo(
551 {
555 static_cast<uint32>(spellInfo->GetEffect(EFFECT_1).CalcValue())
556 });
557 }
558
560 {
561 if (CorpseExplosionCheck(GetCaster()->GetGUID(), true)(target))
562 target = nullptr;
563
564 _target = target;
565 }
566
567 void CheckTargets(std::list<WorldObject*>& targets)
568 {
569 WorldObject* target = _target;
570 if (!target)
571 {
572 targets.remove_if(CorpseExplosionCheck(GetCaster()->GetGUID(), false));
573 if (targets.empty())
574 {
576 return;
577 }
579 targets.clear();
580 targets.push_back(target);
581 }
582 else
583 targets.clear();
584 }
585
586 void HandleDamage(SpellEffIndex effIndex, Unit* target)
587 {
589 if (effIndex == EFFECT_0)
590 {
592 GetCaster()->CastSpell(target, GetEffectInfo(EFFECT_1).CalcValue(), args);
593 }
594 else if (effIndex == EFFECT_1)
595 {
596 args.AddSpellBP0(GetSpell()->CalculateDamage(GetEffectInfo(EFFECT_0)));
597 GetCaster()->CastSpell(target, GetEffectValue(), args);
598 }
599 }
600
602 {
603 if (Unit* unitTarget = GetHitUnit())
604 {
605 if (unitTarget->IsAlive()) // Living ghoul as a target
606 {
607 unitTarget->CastSpell(unitTarget, SPELL_DK_GHOUL_EXPLODE, false);
608 // Corpse Explosion (Suicide) and Set corpse look handled in SpellScript of SPELL_DK_GHOUL_EXPLODE
609 }
610 else // Some corpse
611 {
612 HandleDamage(effIndex, unitTarget);
613 // Corpse Explosion (Suicide)
614 unitTarget->CastSpell(unitTarget, SPELL_DK_CORPSE_EXPLOSION_TRIGGERED, true);
615 // Set corpse look
617 }
618 }
619 }
620
628
630};
631
632// -43265 - Death and Decay
634{
636
637 void HandleDummyTick(AuraEffect const* aurEff)
638 {
639 Unit* caster = GetCaster();
640 if (!caster)
641 return;
642 CastSpellExtraArgs args(aurEff);
643 args.AddSpellBP0(aurEff->GetAmount());
645 }
646
651};
652
653// -47541, 52375, 59134, -62900 - Death Coil
655{
657
658 bool Validate(SpellInfo const* /*spell*/) override
659 {
661 }
662
663 void HandleDummy(SpellEffIndex /*effIndex*/)
664 {
665 Unit* caster = GetCaster();
666 if (Unit* target = GetHitUnit())
667 {
668 if (caster->IsFriendlyTo(target))
669 {
671 args.AddSpellBP0(GetEffectValue() * 1.5f);
672 caster->CastSpell(target, SPELL_DK_DEATH_COIL_HEAL, args);
673 }
674 else
675 {
676 int32 damage = GetEffectValue();
678 damage += auraEffect->GetBaseAmount();
680 args.AddSpellBP0(damage);
681 caster->CastSpell(target, SPELL_DK_DEATH_COIL_DAMAGE, args);
682 }
683 }
684 }
685
687 {
688 Unit* caster = GetCaster();
689 if (Unit* target = GetExplTargetUnit())
690 {
691 if (!caster->IsFriendlyTo(target) && !caster->isInFront(target))
693
694 if (target->IsFriendlyTo(caster) && target->GetCreatureType() != CREATURE_TYPE_UNDEAD)
696 }
697 else
699
700 return SPELL_CAST_OK;
701 }
702
708};
709
710// 52751 - Death Gate
739
740// 49560 - Death Grip
742{
744
745 void HandleDummy(SpellEffIndex /*effIndex*/)
746 {
747 if (Unit* target = GetHitUnit())
748 if (!target->HasAuraType(SPELL_AURA_DEFLECT_SPELLS)) // Deterrence
749 target->CastSpell(GetExplTargetDest()->GetPosition(), GetEffectValue(), true);
750 }
751
756};
757
758// 48743 - Death Pact
760{
762
763 void FilterTargets(std::list<WorldObject*>& targetList)
764 {
765 targetList.remove_if([&](WorldObject* target)
766 {
767 Unit* unit = target->ToUnit();
768 if (!unit)
769 return true;
770 if (unit->GetOwnerGUID() != GetCaster()->GetGUID())
771 return true;
773 return true;
774 return false;
775 });
776
777 if (targetList.empty())
778 {
780 return;
781 }
782
783 targetList.remove_if([&](WorldObject* target)
784 {
785 return target->ToUnit()->IsImmunedToSpell(GetSpellInfo(), GetCaster());
786 });
787
788 if (targetList.empty())
789 {
791 return;
792 }
793
795 }
796
801};
802
803// -54639 - Blood of the North
804// -49208 - Reaping
805// -49467 - Death Rune Mastery
807{
809
810 bool Load() override
811 {
813 }
814
815 bool CheckProc(ProcEventInfo& eventInfo)
816 {
817 Unit* caster = eventInfo.GetActor();
818
819 if (caster->GetTypeId() != TYPEID_PLAYER)
820 return false;
821
822 Player* player = caster->ToPlayer();
823 if (player->GetClass() != CLASS_DEATH_KNIGHT)
824 return false;
825
826 return true;
827 }
828
829 void HandleProc(ProcEventInfo& eventInfo)
830 {
831 Player* player = eventInfo.GetActor()->ToPlayer();
832
833 AuraEffect* aurEff = GetEffect(EFFECT_0);
834 if (!aurEff)
835 return;
836
837 // Reset amplitude - set death rune remove timer to 30s
838 aurEff->ResetPeriodic(true);
839
840 uint32 runesLeft = 1;
841
842 // Death Rune Mastery
843 if (GetSpellInfo()->SpellIconID == 2622)
844 runesLeft = 2;
845
846 for (uint8 i = 0; i < MAX_RUNES && runesLeft; ++i)
847 {
848 if (GetSpellInfo()->SpellIconID == 2622)
849 {
850 if (player->GetBaseRune(i) == RUNE_BLOOD)
851 continue;
852 }
853 else
854 {
855 if (player->GetBaseRune(i) != RUNE_BLOOD)
856 continue;
857 }
858
859 if (player->GetRuneCooldown(i) != (player->GetRuneBaseCooldown(i) - player->GetLastRuneGraceTimer(i)))
860 continue;
861
862 --runesLeft;
863 // Mark aura as used
864 player->AddRuneByAuraEffect(i, RUNE_DEATH, aurEff);
865 }
866 }
867
868 void PeriodicTick(AuraEffect const* aurEff)
869 {
870 // timer expired - remove death runes
872 }
873
880};
881
882// -49998 - Death Strike
884{
886
887 bool Validate(SpellInfo const* /*spellInfo*/) override
888 {
890 }
891
892 void HandleDummy(SpellEffIndex /*effIndex*/)
893 {
894 Unit* caster = GetCaster();
895 if (Unit* target = GetHitUnit())
896 {
897 uint32 count = target->GetDiseasesByCaster(caster->GetGUID());
898 int32 bp = int32(count * caster->CountPctFromMaxHealth(int32(GetEffectInfo(EFFECT_0).ChainAmplitude)));
899 // Improved Death Strike
901 AddPct(bp, caster->CalculateSpellDamage(aurEff->GetSpellInfo()->GetEffect(EFFECT_2)));
902
903 // @todo castspell refactor note: this is not triggered - is this intended??
905 args.AddSpellBP0(bp);
906 caster->CastSpell(caster, SPELL_DK_DEATH_STRIKE_HEAL, args);
907 }
908 }
909
914};
915
916// 47496 - Explode, Ghoul spell for Corpse Explosion
918{
920
921 bool Validate(SpellInfo const* spellInfo) override
922 {
924 spellInfo->GetEffect(EFFECT_2).CalcValue() > 0;
925 }
926
927 void HandleDamage(SpellEffIndex /*effIndex*/)
928 {
929 int32 value = int32(GetCaster()->CountPctFromMaxHealth(GetSpellInfo()->GetEffect(EFFECT_2).CalcValue(GetCaster())));
930 SetEffectValue(value);
931 }
932
933 void Suicide(SpellEffIndex /*effIndex*/)
934 {
935 if (Unit* unitTarget = GetHitUnit())
936 {
937 // Corpse Explosion (Suicide)
938 unitTarget->CastSpell(unitTarget, SPELL_DK_CORPSE_EXPLOSION_TRIGGERED, true);
939 // Set corpse look
941 }
942 }
943
949};
950
951// 62259 - Glyph of Death Grip
972
973// 58642 - Glyph of Scourge Strike
994
995// 69961 - Glyph of Scourge Strike
997{
999
1001 {
1002 Unit* caster = GetCaster();
1003 Unit* target = GetHitUnit();
1004
1006 for (Unit::AuraEffectList::const_iterator i = mPeriodic.begin(); i != mPeriodic.end(); ++i)
1007 {
1008 AuraEffect const* aurEff = *i;
1009 SpellInfo const* spellInfo = aurEff->GetSpellInfo();
1010 // search our Blood Plague and Frost Fever on target
1011 if (spellInfo->SpellFamilyName == SPELLFAMILY_DEATHKNIGHT && spellInfo->SpellFamilyFlags[2] & 0x2 &&
1012 aurEff->GetCasterGUID() == caster->GetGUID())
1013 {
1014 uint32 countMin = aurEff->GetBase()->GetMaxDuration();
1015 uint32 countMax = spellInfo->GetMaxDuration();
1016
1017 // this Glyph
1018 countMax += 9000;
1019 // talent Epidemic
1021 countMax += epidemic->GetAmount();
1022
1023 if (countMin < countMax)
1024 {
1025 aurEff->GetBase()->SetDuration(aurEff->GetBase()->GetDuration() + 3000);
1026 aurEff->GetBase()->SetMaxDuration(countMin + 3000);
1027 }
1028 }
1029 }
1030 }
1031
1036};
1037
1038// 49016 - Hysteria
1040{
1042
1043 void PeriodicTick(AuraEffect const* aurEff)
1044 {
1045 uint32 const damage = GetTarget()->CountPctFromMaxHealth(GetTarget()->CalculateSpellDamage(aurEff->GetSpellEffectInfo()));
1046 Unit::DealDamage(GetTarget(), GetTarget(), damage, nullptr, SELF_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, nullptr, false);
1047 }
1048
1053};
1054
1055// 55095 - Frost Fever
1057{
1059
1060 void HandleDispel(DispelInfo* /*dispelInfo*/)
1061 {
1062 if (Unit* caster = GetCaster())
1063 if (AuraEffect* icyClutch = GetUnitOwner()->GetAuraEffect(SPELL_AURA_MOD_DECREASE_SPEED, SPELLFAMILY_DEATHKNIGHT, 0, 0x00040000, 0, caster->GetGUID()))
1064 GetUnitOwner()->RemoveAurasDueToSpell(icyClutch->GetId());
1065 }
1066
1071};
1072
1073// 51209 - Hungering Cold
1075{
1077
1078 bool CheckProc(ProcEventInfo& eventInfo)
1079 {
1080 SpellInfo const* spellInfo = eventInfo.GetSpellInfo();
1081 if (!spellInfo) // probably melee damage so let's proc
1082 return true;
1083
1084 return (spellInfo->Dispel != DISPEL_DISEASE);
1085 }
1086
1091};
1092
1093// 49203 - Hungering Cold
1113
1114// 48792 - Icebound Fortitude
1116{
1118
1119 bool Load() override
1120 {
1121 Unit* caster = GetCaster();
1122 return caster && caster->GetTypeId() == TYPEID_PLAYER;
1123 }
1124
1125 void CalculateAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
1126 {
1127 if (Unit* caster = GetCaster())
1128 {
1129 int32 value = amount;
1130 uint32 defValue = uint32(caster->ToPlayer()->GetSkillValue(SKILL_DEFENSE) + caster->ToPlayer()->GetRatingBonusValue(CR_DEFENSE_SKILL));
1131
1132 if (defValue > 400)
1133 value -= int32((defValue - 400) * 0.15);
1134
1135 // Glyph of Icebound Fortitude
1136 if (AuraEffect const* aurEff = caster->GetAuraEffect(SPELL_DK_GLYPH_OF_ICEBOUND_FORTITUDE, EFFECT_0))
1137 {
1138 int32 valMax = -aurEff->GetAmount();
1139 if (value > valMax)
1140 value = valMax;
1141 }
1142 amount = value;
1143 }
1144 }
1145
1150};
1151
1152// -50365 - Improved Blood Presence
1154{
1156
1157 bool Validate(SpellInfo const* /*spellInfo*/) override
1158 {
1159 return ValidateSpellInfo(
1160 {
1165 });
1166 }
1167
1169 {
1170 Unit* target = GetTarget();
1172 {
1173 CastSpellExtraArgs args(aurEff);
1176 }
1177 }
1178
1179 void HandleEffectRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
1180 {
1181 Unit* target = GetTarget();
1182 if (!target->HasAura(SPELL_DK_BLOOD_PRESENCE))
1184 }
1185
1191};
1192
1193// 63611 - Improved Blood Presence Triggered
1195{
1197
1198 bool Validate(SpellInfo const* /*spellInfo*/) override
1199 {
1201 }
1202
1203 bool CheckProc(ProcEventInfo& eventInfo)
1204 {
1205 if (eventInfo.GetActor()->GetTypeId() == TYPEID_PLAYER)
1206 return true;
1207
1208 return false;
1209 }
1210
1211 void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
1212 {
1214 if (DamageInfo* dmgInfo = eventInfo.GetDamageInfo())
1215 {
1216 CastSpellExtraArgs args(aurEff);
1217 args.AddSpellBP0(CalculatePct(dmgInfo->GetDamage(), aurEff->GetAmount()));
1218 eventInfo.GetActor()->CastSpell(eventInfo.GetActor(), SPELL_DK_IMPROVED_BLOOD_PRESENCE_HEAL, args);
1219 }
1220 }
1221
1227};
1228
1229// -50384 - Improved Frost Presence
1269
1270// -50391 - Improved Unholy Presence
1272{
1274
1286
1288 {
1289 Unit* target = GetTarget();
1291 {
1292 // Not listed as any effect, only base points set in dbc
1293 int32 basePoints = GetEffectInfo(EFFECT_1).CalcValue();
1294 CastSpellExtraArgs args(aurEff);
1295 for (uint32 i = 0; i < MAX_SPELL_EFFECTS; ++i)
1296 args.AddSpellMod(SpellValueMod(SPELLVALUE_BASE_POINT0 + i), basePoints);
1298 }
1299
1301 {
1302 CastSpellExtraArgs args(aurEff);
1303 args.AddSpellBP0(aurEff->GetAmount());
1304 target->CastSpell(target, SPELL_DK_UNHOLY_PRESENCE_TRIGGERED, args);
1305 }
1306 }
1307
1308 void HandleEffectRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
1309 {
1310 Unit* target = GetTarget();
1311
1313
1314 if (!target->HasAura(SPELL_DK_UNHOLY_PRESENCE))
1316 }
1317
1323};
1324
1325// 49039 - Lichborne
1351
1352// 61257 - Runic Power Back on Snare/Root
1354{
1356
1357 bool Validate(SpellInfo const* /*spellInfo*/) override
1358 {
1360 }
1361
1362 bool CheckProc(ProcEventInfo& eventInfo)
1363 {
1364 SpellInfo const* spellInfo = eventInfo.GetSpellInfo();
1365 if (!spellInfo)
1366 return false;
1367
1368 return (spellInfo->GetAllEffectsMechanicMask() & ((1 << MECHANIC_ROOT) | (1 << MECHANIC_SNARE))) != 0;
1369 }
1370
1371 void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
1372 {
1374 eventInfo.GetActionTarget()->CastSpell(nullptr, SPELL_DK_RUNIC_RETURN, aurEff);
1375 }
1376
1382};
1383
1384// 49005 - Mark of Blood
1386{
1388
1389 bool Validate(SpellInfo const* /*spellInfo*/) override
1390 {
1392 }
1393
1394 void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
1395 {
1397 eventInfo.GetActor()->CastSpell(eventInfo.GetActionTarget(), SPELL_DK_MARK_OF_BLOOD_HEAL, aurEff);
1398 }
1399
1404};
1405
1406// -51459 - Necrosis
1408{
1410
1411 bool Validate(SpellInfo const* /*spellInfo*/) override
1412 {
1414 }
1415
1416 bool CheckProc(ProcEventInfo& eventInfo)
1417 {
1418 DamageInfo* damageInfo = eventInfo.GetDamageInfo();
1419 return damageInfo && damageInfo->GetDamage();
1420 }
1421
1422 void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
1423 {
1425
1426 CastSpellExtraArgs args(aurEff);
1427 args.AddSpellBP0(CalculatePct(eventInfo.GetDamageInfo()->GetDamage(), aurEff->GetAmount()));
1428 eventInfo.GetActor()->CastSpell(eventInfo.GetActionTarget(), SPELL_DK_NECROSIS_DAMAGE, args);
1429 }
1430
1436};
1437
1438// 50842 - Pestilence
1440{
1442
1443 bool Validate(SpellInfo const* /*spellInfo*/) override
1444 {
1445 return ValidateSpellInfo(
1446 {
1450 });
1451 }
1452
1453 void OnHit(SpellEffIndex /*effIndex*/)
1454 {
1455 Unit* caster = GetCaster();
1456 Unit* hitUnit = GetHitUnit();
1457 Unit* victim = GetExplTargetUnit();
1458
1459 if (!victim)
1460 return;
1461
1462 if (victim != hitUnit || caster->HasAura(SPELL_DK_GLYPH_OF_DISEASE))
1463 {
1464 if (Aura* aurOld = victim->GetAura(SPELL_DK_BLOOD_PLAGUE, caster->GetGUID())) // Check Blood Plague application on victim.
1465 {
1466 float donePct = aurOld->GetDonePct();
1467 float critChance = aurOld->GetCritChance();
1468
1469 if (aurOld->GetEffect(EFFECT_0))
1470 {
1471 caster->CastSpell(hitUnit, SPELL_DK_BLOOD_PLAGUE, true); // Spread the disease to hitUnit.
1472
1473 if (Aura* aurNew = hitUnit->GetAura(SPELL_DK_BLOOD_PLAGUE, caster->GetGUID())) // Check Blood Plague application on hitUnit.
1474 {
1475 aurNew->SetCritChance(critChance); // Blood Plague can crit if caster has T9.
1476 aurNew->SetDonePct(donePct);
1477 if (AuraEffect* aurEffNew = aurNew->GetEffect(EFFECT_0))
1478 aurEffNew->ChangeAmount(aurEffNew->CalculateAmount(aurEffNew->GetCaster()), false);
1479 }
1480 }
1481 }
1482
1483 if (Aura* aurOld = victim->GetAura(SPELL_DK_FROST_FEVER, caster->GetGUID())) // Check Frost Fever application on victim.
1484 {
1485 float donePct = aurOld->GetDonePct();
1486
1487 if (aurOld->GetEffect(EFFECT_0))
1488 {
1489 caster->CastSpell(hitUnit, SPELL_DK_FROST_FEVER, true); // Spread the disease to hitUnit.
1490
1491 if (Aura* aurNew = hitUnit->GetAura(SPELL_DK_FROST_FEVER, caster->GetGUID())) // Check Frost Fever application on hitUnit.
1492 {
1493 aurNew->SetDonePct(donePct);
1494 if (AuraEffect* aurEffNew = aurNew->GetEffect(EFFECT_0))
1495 aurEffNew->ChangeAmount(aurEffNew->CalculateAmount(aurEffNew->GetCaster()), false);
1496 }
1497 }
1498 }
1499 }
1500 }
1501
1506};
1507
1508// 48266 - Blood Presence
1509// 48263 - Frost Presence
1510// 48265 - Unholy Presence
1512{
1514
1531
1533 {
1534 Unit* target = GetTarget();
1535
1540 {
1541 CastSpellExtraArgs args(aurEff);
1542 args.AddSpellMod(SPELLVALUE_BASE_POINT1, impAurEff->GetAmount());
1544 }
1545 }
1546
1548 {
1549 Unit* target = GetTarget();
1550
1552 target->CastSpell(target, SPELL_DK_FROST_PRESENCE_TRIGGERED, true);
1555 {
1556 CastSpellExtraArgs args(aurEff);
1557 args.AddSpellBP0(impAurEff->GetAmount());
1558 target->CastSpell(target, SPELL_DK_FROST_PRESENCE_TRIGGERED, args);
1559 }
1560 }
1561
1563 {
1564 Unit* target = GetTarget();
1565
1567 target->CastSpell(target, SPELL_DK_UNHOLY_PRESENCE_TRIGGERED, true);
1568
1570 {
1572 {
1573 // Not listed as any effect, only base points set
1574 int32 bp = impAurEff->GetSpellInfo()->GetEffect(EFFECT_1).CalcValue();
1575 CastSpellExtraArgs args(aurEff);
1576 for (uint32 i = 0; i < MAX_SPELL_EFFECTS; ++i)
1579 }
1581 {
1582 CastSpellExtraArgs args(aurEff);
1583 args.AddSpellBP0(impAurEff->GetAmount());
1584 target->CastSpell(target, SPELL_DK_UNHOLY_PRESENCE_TRIGGERED, args);
1585 }
1586 }
1587 }
1588
1597
1605};
1606
1608{
1609 public:
1610 explicit RaiseDeadCheck(Player const* caster) : _caster(caster) { }
1611
1612 bool operator()(WorldObject* obj) const
1613 {
1614 if (Unit* target = obj->ToUnit())
1615 {
1616 if (!target->IsAlive()
1617 && _caster->isHonorOrXPTarget(target)
1618 && target->GetCreatureType() == CREATURE_TYPE_HUMANOID
1619 && target->GetDisplayId() == target->GetNativeDisplayId())
1620 return false;
1621 }
1622
1623 return true;
1624 }
1625
1626 private:
1628};
1629
1630// 46584 - Raise Dead
1632{
1634
1635 bool Validate(SpellInfo const* spellInfo) override
1636 {
1637 return ValidateSpellInfo(
1638 {
1639 static_cast<uint32>(spellInfo->GetEffect(EFFECT_1).CalcValue()),
1640 static_cast<uint32>(spellInfo->GetEffect(EFFECT_2).CalcValue()),
1643 });
1644 }
1645
1646 bool Load() override
1647 {
1648 return GetCaster()->GetTypeId() == TYPEID_PLAYER;
1649 }
1650
1652 {
1659 return _result;
1660 }
1661
1663 {
1665 SpellInfo const* reagentSpell = sSpellMgr->AssertSpellInfo(SPELL_DK_RAISE_DEAD_USE_REAGENT);
1666 Player* player = GetCaster()->ToPlayer();
1667 if (!player->CanNoReagentCast(reagentSpell))
1668 {
1669 for (uint32 i = 0; i < MAX_SPELL_REAGENTS; i++)
1670 {
1671 if (reagentSpell->Reagent[i] <= 0)
1672 continue;
1673
1674 if (!player->HasItemCount(reagentSpell->Reagent[i], reagentSpell->ReagentCount[i]))
1675 {
1676 Spell::SendCastResult(player, reagentSpell, 0, SPELL_FAILED_REAGENTS);
1678 }
1679 }
1680 }
1681 return SPELL_CAST_OK;
1682 }
1683
1684 void CheckTargets(std::list<WorldObject*>& targets)
1685 {
1686 targets.remove_if(RaiseDeadCheck(GetCaster()->ToPlayer()));
1687
1688 if (targets.empty())
1689 {
1690 if (GetSpell()->getState() == SPELL_STATE_PREPARING)
1692
1693 return;
1694 }
1695
1697 targets.clear();
1698 targets.push_back(target);
1699 _corpse = true;
1700 }
1701
1703 {
1704 // Don't add caster to target map, if we found a corpse to raise dead
1705 if (_corpse)
1706 target = nullptr;
1707 }
1708
1710 {
1711 // No corpse found, take reagents
1712 if (!_corpse)
1714 }
1715
1717 {
1718 // Do we have talent Master of Ghouls?
1719 if (GetCaster()->HasAura(SPELL_DK_MASTER_OF_GHOULS))
1720 // summon as pet
1722
1723 // or guardian
1725 }
1726
1728 {
1730 }
1731
1733 {
1734 // Because the ghoul is summoned by one of triggered spells SendCooldownEvent is not sent for this spell
1735 // but the client has locked it by itself so we need some link between this spell and the real spell summoning.
1736 // Luckily such link already exists - spell category
1737 // This starts infinite category cooldown which can later be used by SendCooldownEvent to send packet for this spell
1738 GetCaster()->GetSpellHistory()->StartCooldown(GetSpellInfo(), 0, nullptr, true);
1739 }
1740
1751
1753 bool _corpse = false;
1754};
1755
1756// -49188 - Rime
1758{
1760
1761 bool CheckProc(ProcEventInfo& /*eventInfo*/)
1762 {
1763 return GetTarget()->GetTypeId() == TYPEID_PLAYER;
1764 }
1765
1766 void HandleProc(AuraEffect const* /*aurEff*/, ProcEventInfo& /*eventInfo*/)
1767 {
1768 GetTarget()->GetSpellHistory()->ResetCooldowns([](SpellHistory::CooldownStorageType::iterator itr) -> bool
1769 {
1770 SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(itr->first);
1771 return spellInfo && spellInfo->GetCategory() == SPELL_CATEGORY_HOWLING_BLAST;
1772 }, true);
1773 }
1774
1780};
1781
1782// 59754 Rune Tap - Party
1784{
1786
1787 void CheckTargets(std::list<WorldObject*>& targets)
1788 {
1789 targets.remove(GetCaster());
1790 }
1791
1796};
1797
1798// 50421 - Scent of Blood
1800{
1802
1803 bool Validate(SpellInfo const* /*spellInfo*/) override
1804 {
1806 }
1807
1808 void HandleProc(AuraEffect const* aurEff, ProcEventInfo& /*eventInfo*/)
1809 {
1812 ModStackAmount(-1);
1813 }
1814
1819};
1820
1821// -55090 - Scourge Strike (55265, 55270, 55271)
1823{
1825
1826public:
1828 {
1829 multiplier = 1.0f;
1830 }
1831
1832private:
1834
1835 bool Validate(SpellInfo const* /*spellInfo*/) override
1836 {
1838 }
1839
1840 void HandleDummy(SpellEffIndex /*effIndex*/)
1841 {
1842 Unit* caster = GetCaster();
1843 if (Unit* unitTarget = GetHitUnit())
1844 {
1845 multiplier = (GetEffectValue() * unitTarget->GetDiseasesByCaster(caster->GetGUID()) / 100.f);
1846 // Death Knight T8 Melee 4P Bonus
1848 AddPct(multiplier, aurEff->GetAmount());
1849 }
1850 }
1851
1853 {
1854 Unit* caster = GetCaster();
1855 if (Unit* unitTarget = GetHitUnit())
1856 {
1857 int32 bp = GetHitDamage() * multiplier;
1858
1860 AddPct(bp, aurEff->GetAmount());
1861
1863 args.AddSpellBP0(bp);
1864 caster->CastSpell(unitTarget, SPELL_DK_SCOURGE_STRIKE_TRIGGERED, args);
1865 }
1866 }
1867
1873};
1874
1875// -49145 - Spell Deflection
1877{
1879
1880public:
1882 {
1883 absorbPct = 0;
1884 }
1885
1886private:
1888
1889 bool Load() override
1890 {
1892 return true;
1893 }
1894
1895 void CalculateAmount(AuraEffect const* /*aurEff*/, int32 & amount, bool & /*canBeRecalculated*/)
1896 {
1897 // Set absorbtion amount to unlimited
1898 amount = -1;
1899 }
1900
1901 void Absorb(AuraEffect* /*aurEff*/, DamageInfo & dmgInfo, uint32 & absorbAmount)
1902 {
1903 // You have a chance equal to your Parry chance
1904 if ((dmgInfo.GetDamageType() == SPELL_DIRECT_DAMAGE) && roll_chance_f(GetTarget()->GetFloatValue(PLAYER_PARRY_PERCENTAGE)))
1905 absorbAmount = CalculatePct(dmgInfo.GetDamage(), absorbPct);
1906 }
1907
1913};
1914
1915// -49018 - Sudden Doom
1917{
1919
1920 bool Validate(SpellInfo const* /*spellInfo*/) override
1921 {
1923 }
1924
1925 void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
1926 {
1928
1929 Unit* caster = eventInfo.GetActor();
1930 SpellInfo const* spellInfo = sSpellMgr->AssertSpellInfo(SPELL_DK_DEATH_COIL_R1);
1931 uint32 spellId = 0;
1932
1933 while (spellInfo)
1934 {
1935 if (!caster->HasSpell(spellInfo->Id))
1936 break;
1937
1938 spellId = spellInfo->Id;
1939 spellInfo = spellInfo->GetNextRankSpell();
1940 }
1941
1942 if (!spellId)
1943 return;
1944
1945 caster->CastSpell(eventInfo.GetActionTarget(), spellId, aurEff);
1946 }
1947
1952};
1953
1954// -65661 Threat of Thassarian
1956{
1958
1971
1972 void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
1973 {
1975
1976 if (!roll_chance_i(aurEff->GetAmount()))
1977 return;
1978
1979 SpellInfo const* spellInfo = eventInfo.GetSpellInfo();
1980 if (!spellInfo)
1981 return;
1982
1983 // Must dual wield
1984 Unit* caster = eventInfo.GetActor();
1985 if (!caster->haveOffhandWeapon())
1986 return;
1987
1988 uint32 spellId = 0;
1989 // Plague Strike
1990 if (spellInfo->SpellFamilyFlags[0] & 0x00000001)
1992 // Death Strike
1993 else if (spellInfo->SpellFamilyFlags[0] & 0x00000010)
1995 // Blood Strike
1996 else if (spellInfo->SpellFamilyFlags[0] & 0x00400000)
1998 // Frost Strike
1999 else if (spellInfo->SpellFamilyFlags[1] & 0x00000004)
2001 // Obliterate
2002 else if (spellInfo->SpellFamilyFlags[1] & 0x00020000)
2004 // Rune Strike
2005 else if (spellInfo->SpellFamilyFlags[1] & 0x20000000)
2007
2008 if (!spellId)
2009 return;
2010
2011 spellId = sSpellMgr->GetSpellWithRank(spellId, spellInfo->GetRank());
2012 caster->CastSpell(eventInfo.GetActionTarget(), spellId, aurEff);
2013 }
2014
2019};
2020
2021// 49194 - Unholy Blight
2023{
2025
2026 bool Validate(SpellInfo const* /*spellInfo*/) override
2027 {
2028 return ValidateSpellInfo(
2029 {
2032 });
2033 }
2034
2035 bool CheckProc(ProcEventInfo& eventInfo)
2036 {
2037 DamageInfo* damageInfo = eventInfo.GetDamageInfo();
2038 return damageInfo && damageInfo->GetDamage();
2039 }
2040
2041 void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
2042 {
2044
2045 Unit* caster = eventInfo.GetActor();
2046 Unit* target = eventInfo.GetActionTarget();
2047
2048 SpellInfo const* spellInfo = sSpellMgr->AssertSpellInfo(SPELL_DK_UNHOLY_BLIGHT_DAMAGE);
2049 int32 amount = CalculatePct(static_cast<int32>(eventInfo.GetDamageInfo()->GetDamage()), aurEff->GetAmount());
2050 if (AuraEffect const* glyph = caster->GetAuraEffect(SPELL_DK_GLYPH_OF_UNHOLY_BLIGHT, EFFECT_0, caster->GetGUID()))
2051 AddPct(amount, glyph->GetAmount());
2052
2053 ASSERT(spellInfo->GetMaxTicks() > 0);
2054 amount /= spellInfo->GetMaxTicks();
2055
2056 CastSpellExtraArgs args(aurEff);
2057 args.AddSpellBP0(amount);
2058 caster->CastSpell(target, SPELL_DK_UNHOLY_BLIGHT_DAMAGE, args);
2059 }
2060
2066};
2067
2068// 55233 - Vampiric Blood
2070{
2072
2073 void CalculateAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
2074 {
2075 amount = GetUnitOwner()->CountPctFromMaxHealth(amount);
2076 }
2077
2082};
2083
2084// -49015 - Vendetta
2086{
2088
2089 bool Validate(SpellInfo const* /*spellInfo*/) override
2090 {
2092 }
2093
2094 void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
2095 {
2097 Unit* const caster = eventInfo.GetActor();
2098 CastSpellExtraArgs args(aurEff);
2099 args.AddSpellBP0(caster->CountPctFromMaxHealth(aurEff->GetAmount()));
2100 caster->CastSpell(nullptr, SPELL_DK_VENDETTA_HEAL, args);
2101 }
2102
2107};
2108
2109// -49217 - Wandering Plague
2111{
2113
2114 bool Validate(SpellInfo const* /*spellInfo*/) override
2115 {
2117 }
2118
2119 bool CheckProc(ProcEventInfo& eventInfo)
2120 {
2122 return false;
2123
2124 DamageInfo* damageInfo = eventInfo.GetDamageInfo();
2125 return damageInfo && damageInfo->GetDamage();
2126 }
2127
2128 void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
2129 {
2131 Unit* caster = eventInfo.GetActor();
2132 Unit* target = eventInfo.GetActionTarget();
2133
2134 int32 amount = CalculatePct(static_cast<int32>(eventInfo.GetDamageInfo()->GetDamage()), aurEff->GetAmount());
2135 CastSpellExtraArgs args(aurEff);
2136 args.AddSpellBP0(amount);
2137 caster->CastSpell(target, SPELL_DK_WANDERING_PLAGUE_DAMAGE, args);
2138 }
2139
2145};
2146
2147// 50526 - Wandering Plague (Damage)
2149{
2151
2152 void FilterTargets(std::list<WorldObject*>& targets)
2153 {
2154 targets.remove_if([](WorldObject* object) -> bool
2155 {
2156 Unit* target = object->ToUnit();
2157 return target && target->HasBreakableByDamageCrowdControlAura();
2158 });
2159 }
2160
2165};
2166
2167// -52284 - Will of the Necropolis
2169{
2171
2172 bool Validate(SpellInfo const* spellInfo) override
2173 {
2174 SpellInfo const* firstRankSpellInfo = sSpellMgr->GetSpellInfo(SPELL_DK_WILL_OF_THE_NECROPOLIS_AURA_R1);
2175 if (!firstRankSpellInfo)
2176 return false;
2177
2178 // can't use other spell than will of the necropolis due to spell_ranks dependency
2179 if (!spellInfo->IsRankOf(firstRankSpellInfo))
2180 return false;
2181
2182 uint8 rank = spellInfo->GetRank();
2183 if (!sSpellMgr->GetSpellWithRank(SPELL_DK_WILL_OF_THE_NECROPOLIS_TALENT_R1, rank, true))
2184 return false;
2185
2186 return true;
2187 }
2188
2190
2191 bool Load() override
2192 {
2194 return true;
2195 }
2196
2197 void CalculateAmount(AuraEffect const* /*aurEff*/, int32 & amount, bool & /*canBeRecalculated*/)
2198 {
2199 // Set absorbtion amount to unlimited
2200 amount = -1;
2201 }
2202
2203 void Absorb(AuraEffect* /*aurEff*/, DamageInfo & dmgInfo, uint32 & absorbAmount)
2204 {
2205 // min pct of hp is stored in effect 0 of talent spell
2206 uint8 rank = GetSpellInfo()->GetRank();
2207 SpellInfo const* talentProto = sSpellMgr->AssertSpellInfo(sSpellMgr->GetSpellWithRank(SPELL_DK_WILL_OF_THE_NECROPOLIS_TALENT_R1, rank));
2208
2209 int32 remainingHp = int32(GetTarget()->GetHealth() - dmgInfo.GetDamage());
2210 int32 minHp = int32(GetTarget()->CountPctFromMaxHealth(talentProto->GetEffect(EFFECT_0).CalcValue(GetCaster())));
2211
2212 // Damage that would take you below [effect0] health or taken while you are at [effect0]
2213 if (remainingHp < minHp)
2214 absorbAmount = CalculatePct(dmgInfo.GetDamage(), absorbPct);
2215 }
2216
2222};
2223
2224// 49576 - Death Grip Initial
2226{
2228
2230 {
2231 Unit* caster = GetCaster();
2232 // Death Grip should not be castable while jumping/falling
2234 return SPELL_FAILED_MOVING;
2235
2236 // Patch 3.3.3 (2010-03-23): Minimum range has been changed to 8 yards in PvP.
2237 Unit* target = GetExplTargetUnit();
2238 if (target && target->GetTypeId() == TYPEID_PLAYER)
2239 if (caster->GetDistance(target) < 8.f)
2241
2242 return SPELL_CAST_OK;
2243 }
2244
2245 void HandleDummy(SpellEffIndex /*effIndex*/)
2246 {
2248 }
2249
2255};
2256
2276
2277// 61999 - Raise Ally Initial
2279{
2281
2282 bool Validate(SpellInfo const* spellInfo) override
2283 {
2284 return ValidateSpellInfo({ static_cast<uint32>(spellInfo->GetEffect(EFFECT_0).CalcValue()) });
2285 }
2286
2287 bool Load() override
2288 {
2289 return GetCaster()->GetTypeId() == TYPEID_PLAYER;
2290 }
2291
2293 {
2294 Unit* target = GetExplTargetUnit();
2295 if (!target)
2297 if (target->IsAlive())
2299 if (target->IsGhouled())
2301 return SPELL_CAST_OK;
2302 }
2303
2304 void HandleDummy(SpellEffIndex /*effIndex*/)
2305 {
2306 if (Player* target = GetHitPlayer())
2307 {
2308 if (target->IsResurrectRequested()) // already have one active request
2309 return;
2310 target->SetResurrectRequestData(GetCaster(), 0, 0, uint32(GetEffectValue()));
2311 GetSpell()->SendResurrectRequest(target);
2312 }
2313 }
2314
2320};
2321
2323{
2324 public:
2325 player_ghoulAI(Player* player, ObjectGuid ghoulGUID) : PlayerAI(player), _ghoulGUID(ghoulGUID), _ghoulCheckTimer(1000){ }
2326
2327 void UpdateAI(uint32 diff) override
2328 {
2329 if (_ghoulCheckTimer <= diff)
2330 {
2331 _ghoulCheckTimer = 1000;
2332
2334 if (!ghoul || !ghoul->IsAlive())
2336 }
2337 else
2338 _ghoulCheckTimer -= diff;
2339 }
2340
2341 private:
2344};
2345
2346// 46619 - Raise Ally
2348{
2349public:
2350 static char constexpr const ScriptName[] = "spell_dk_raise_ally";
2351
2353
2355 {
2357
2358 bool Load() override
2359 {
2360 return GetCaster()->GetTypeId() == TYPEID_PLAYER;
2361 }
2362
2364 {
2365 if (Unit* original = GetOriginalCaster())
2366 original->Unit::Whisper(TEXT_RISE_ALLY, GetCaster()->ToPlayer(), true);
2367 }
2368
2370 {
2371 PreventHitDefaultEffect(effIndex);
2372
2373 Unit* caster = GetCaster();
2374 Unit* originalCaster = GetOriginalCaster();
2375 if (!originalCaster)
2376 return;
2377
2378 uint32 entry = uint32(GetEffectInfo().MiscValue);
2379
2381 // Using same summon properties as Raise Dead 46585 (Guardian) - EffectMiscValueB = 829
2382 SummonPropertiesEntry const* properties = sSummonPropertiesStore.LookupEntry(829);
2383
2384 uint32 duration = uint32(GetSpellInfo()->GetDuration());
2385
2386 TempSummon* summon = originalCaster->GetMap()->SummonCreature(entry, *GetHitDest(), properties, duration, originalCaster, GetSpellInfo()->Id);
2387 if (!summon)
2388 return;
2389
2391 /*
2392 Default SUMMON_CATEGORY_PUPPET behaviour sets possesor as originalCaster,
2393 in this case we need caster as possesor and originalCaster as owner
2394 */
2395 //summon->RemoveCharmedBy(nullptr);
2396
2397 summon->SetCharmedBy(caster, CHARM_TYPE_POSSESS);
2398
2399 summon->CastSpell(summon, SPELL_DK_RISEN_GHOUL_SELF_STUN, true);
2400 summon->CastSpell(summon, SPELL_DK_RISEN_GHOUL_SPAWN__IN, true);
2401 summon->CastSpell(summon, SPELL_DK_SUMMON_HEAL, true);
2402 summon->CastSpell(caster, SPELL_DK_MIRROR_NAME, true);
2403 caster->CastSpell(summon, SPELL_DK_MIRROR_NAME_TRIGGERED, true);
2405 summon->CastSpell(summon, SPELL_DK_DEATH_KNIGHT_PET_SCALING_01, true);
2406 summon->CastSpell(summon, SPELL_DK_DEATH_KNIGHT_PET_SCALING_03, true);
2409
2410 // SMSG_POWER_UPDATE is sent
2411 summon->SetMaxPower(POWER_ENERGY, 100);
2412
2413 _ghoulGuid = summon->GetGUID();
2414 }
2415
2416 void SetGhoul(SpellEffIndex /*effIndex*/)
2417 {
2418 if (Aura* aura = GetHitAura())
2420 script->SetGhoulGuid(_ghoulGuid);
2421 }
2422
2429
2430 private:
2432 };
2433
2434 SpellScript* GetSpellScript() const override
2435 {
2437 }
2438
2440 {
2442
2443 public:
2445 {
2446 ghoulGuid = guid;
2447 }
2448
2449 private:
2450 bool Load() override
2451 {
2452 return GetUnitOwner()->GetTypeId() == TYPEID_PLAYER;
2453 }
2454
2455 void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
2456 {
2457 Player* player = GetTarget()->ToPlayer();
2458 if (ghoulGuid.IsEmpty())
2459 return;
2460
2461 player->PushAI(new player_ghoulAI(player, ghoulGuid));
2462 }
2463
2464 void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
2465 {
2466 Player* player = GetTarget()->ToPlayer();
2467
2468 player->PopAI();
2469
2470 // Dismiss ghoul if necessary
2471 if (Creature* ghoul = ObjectAccessor::GetCreature(*player, ghoulGuid))
2472 {
2473 ghoul->RemoveCharmedBy(player);
2474 ghoul->DespawnOrUnsummon(1s);
2475 }
2476
2477 player->ClearResurrectRequestData();
2479 }
2480
2486
2488 };
2489
2490 AuraScript* GetAuraScript() const override
2491 {
2492 return new spell_dk_raise_ally_AuraScript();
2493 }
2494};
2495char constexpr const spell_dk_raise_ally::ScriptName[];
2496
2497// 47480 - Thrash
2499{
2501
2502 bool Validate(SpellInfo const* /*spellInfo*/) override
2503 {
2505 }
2506
2507 void CalcDamage(SpellEffIndex /*effIndex*/)
2508 {
2509 /*
2510 Causes more damage per frenzy point:
2511 1 point : ${$AP*$m1*0.01+$AP*0.05}-${$AP*$m1*0.01+$AP*0.10} damage
2512 2 points : ${$AP*$m1*0.01+$AP*0.10}-${$AP*$m1*0.01+$AP*0.20} damage
2513 3 points : ${$AP*$m1*0.01+$AP*0.15}-${$AP*$m1*0.01+$AP*0.30} damage
2514 4 points : ${$AP*$m1*0.01+$AP*0.20}-${$AP*$m1*0.01+$AP*0.40} damage
2515 5 points : ${$AP*$m1*0.01+$AP*0.25}-${$AP*$m1*0.01+$AP*0.50} damage
2516 */
2517
2518 if (Aura* frenzy = GetCaster()->GetAura(SPELL_GHOUL_FRENZY))
2519 {
2521 float fixedDamageBonus = APBonus * GetEffectValue() * 0.01f;
2522 APBonus *= 0.05f * frenzy->GetStackAmount();
2523
2524 frenzy->Remove(AURA_REMOVE_BY_ENEMY_SPELL);
2525 SetEffectValue(fixedDamageBonus + irand(int32(APBonus), int32(APBonus * 2.f)));
2526 }
2527
2528 /*
2529 Also remove aura from charmer
2530 SPELL_GHOUL_FRENZY (62218) - Targets (1, 27) (TARGET_UNIT_CASTER, TARGET_UNIT_MASTER)
2531 */
2532 if (Unit* charmer = GetCaster()->GetCharmer())
2533 charmer->RemoveAura(SPELL_GHOUL_FRENZY);
2534 }
2535
2540};
2541
2542#define DKBloodTapScriptName "spell_dk_blood_tap"
2543
2544// 45529 - Blood Tap
2546{
2547public:
2549
2551 {
2553
2554 public:
2559
2561 {
2562 _runeIndex = index;
2563 }
2564
2565 void HandleApply(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
2566 {
2568
2569 Player* player = GetTarget()->ToPlayer();
2570 if (!player)
2571 return;
2572
2573 if (player->GetClass() != CLASS_DEATH_KNIGHT || _runeIndex == MAX_RUNES)
2574 return;
2575
2576 player->AddRuneByAuraEffect(_runeIndex, RUNE_DEATH, aurEff);
2577 }
2578
2583
2584 private:
2586 };
2587
2588 AuraScript* GetAuraScript() const override
2589 {
2590 return new spell_dk_blood_tap_AuraScript();
2591 }
2592
2594 {
2596
2597 public:
2602
2604 {
2605 PreventHitDefaultEffect(effIndex);
2606
2607 Unit* caster = GetCaster();
2608 if (caster->GetTypeId() != TYPEID_PLAYER)
2609 return;
2610
2611 Player* player = caster->ToPlayer();
2612 if (player->GetClass() != CLASS_DEATH_KNIGHT)
2613 return;
2614
2615 // needed later
2616 if (Spell* spell = GetSpell())
2617 spell->SetRuneState(caster->ToPlayer()->GetRunesState());
2618
2619 uint8 resetIndex;
2620 // Rune reset:
2621 // If both runes are on cooldown, reset the shorter one
2622 // If only one rune is on cooldown, reset that rune
2623 if (!player->GetRuneCooldown(1))
2624 resetIndex = 0; // 1 is ready, so reset 0 (no matter if it's on cd)
2625 else if (!player->GetRuneCooldown(0) || player->GetRuneCooldown(1) < player->GetRuneCooldown(0))
2626 resetIndex = 1; // 0 is ready, or both are on cd and 1 is shorter, so reset 1
2627 else
2628 resetIndex = 0; // both are on cd and 0 is shorter, reset 0
2629
2630 // if both runes are the same type, transform the same one as above
2631 if (player->GetCurrentRune(0) == player->GetCurrentRune(1))
2632 _runeIndex = resetIndex;
2633 else // otherwise transform the blood rune
2634 _runeIndex = player->GetCurrentRune(0) == RUNE_BLOOD ? 0 : 1;
2635
2636 player->SetRuneCooldown(resetIndex, 0);
2637 }
2638
2639 void SetRuneIndex(SpellEffIndex /*effIndex*/)
2640 {
2641 if (Aura* aura = GetHitAura())
2643 script->SetRuneIndex(_runeIndex);
2644 }
2645
2651
2652 private:
2654 };
2655
2656 SpellScript* GetSpellScript() const override
2657 {
2658 return new spell_dk_blood_tap_SpellScript();
2659 }
2660};
2661
2662// 51963 - Gargoyle Strike
2664{
2666
2668 {
2669 int32 damage = 60;
2670 if (Unit* caster = GetCaster())
2671 {
2672 if (caster->GetLevel() >= 60)
2673 damage += (caster->GetLevel() - 60) * 4;
2674 }
2675
2676 SetEffectValue(damage);
2677 }
2678
2683};
2684
2689
2690// 49028 - Dancing Rune Weapon
2692{
2694
2708
2709 void HandleTarget(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
2710 {
2711 Unit* caster = GetCaster();
2712 if (!caster)
2713 return;
2714
2715 std::list<Creature*> runeWeapons;
2717 for (Creature* temp : runeWeapons)
2718 {
2719 if (temp->IsAIEnabled())
2720 temp->AI()->SetGUID(GetTarget()->GetGUID(), DATA_INITIAL_TARGET_GUID);
2721 temp->GetThreatManager().RegisterRedirectThreat(GetId(), caster->GetGUID(), 100);
2722 }
2723 }
2724
2725 bool CheckProc(ProcEventInfo& eventInfo)
2726 {
2727 if (SpellInfo const* procSpell = eventInfo.GetSpellInfo())
2728 {
2729 if (procSpell->IsRankOf(sSpellMgr->GetSpellInfo(SPELL_DK_BLOOD_STRIKE)) ||
2730 procSpell->IsRankOf(sSpellMgr->GetSpellInfo(SPELL_DK_ICY_TOUCH)) ||
2731 procSpell->IsRankOf(sSpellMgr->GetSpellInfo(SPELL_DK_PLAGUE_STRIKE)) ||
2732 procSpell->IsRankOf(sSpellMgr->GetSpellInfo(SPELL_DK_DEATH_COIL_DAMAGE)) ||
2733 procSpell->IsRankOf(sSpellMgr->GetSpellInfo(SPELL_DK_DEATH_STRIKE)) ||
2734 procSpell->IsRankOf(sSpellMgr->GetSpellInfo(SPELL_DK_HEART_STRIKE)) ||
2735 procSpell->IsRankOf(sSpellMgr->GetSpellInfo(SPELL_DK_OBLITERATE)) ||
2736 procSpell->IsRankOf(sSpellMgr->GetSpellInfo(SPELL_DK_RUNE_STRIKE)))
2737 return true;
2738 }
2739
2740 return false;
2741 }
2742
2743 void HandleProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
2744 {
2746
2747 Unit* owner = GetUnitOwner();
2748 if (!owner)
2749 return;
2750
2751 SpellInfo const* procSpell = eventInfo.GetSpellInfo();
2752 Unit* runeWeapon = nullptr;
2753 for (auto itr = owner->m_Controlled.begin(); itr != owner->m_Controlled.end() && !runeWeapon; itr++)
2754 if ((*itr)->GetEntry() == NPC_DK_DANCING_RUNE_WEAPON)
2755 runeWeapon = *itr;
2756
2757 if (!runeWeapon)
2758 return;
2759
2760 if (runeWeapon->IsInCombat() && runeWeapon->GetVictim())
2761 runeWeapon->CastSpell(runeWeapon->GetVictim(), procSpell->Id, TRIGGERED_IGNORE_POWER_AND_REAGENT_COST);
2762 }
2763
2770};
2771
2773{
2827 new spell_dk_raise_ally();
2829 new spell_dk_blood_tap();
2832}
#define MAX_SPELL_REAGENTS
Definition DBCEnums.h:390
#define MAX_SPELL_EFFECTS
Definition DBCEnums.h:388
DBCStorage< SummonPropertiesEntry > sSummonPropertiesStore(SummonPropertiesfmt)
uint8_t uint8
Definition Define.h:135
int32_t int32
Definition Define.h:129
uint32_t uint32
Definition Define.h:133
#define ASSERT
Definition Errors.h:68
@ TYPEID_PLAYER
Definition ObjectGuid.h:39
#define SPELL_DK_RAISE_ALLY
Definition Player.h:893
@ RUNE_DEATH
Definition Player.h:291
@ RUNE_BLOOD
Definition Player.h:288
int32 irand(int32 min, int32 max)
Definition Random.cpp:35
bool roll_chance_f(float chance)
Definition Random.h:53
bool roll_chance_i(int chance)
Definition Random.h:59
#define RegisterSpellScript(spell_script)
Definition ScriptMgr.h:1128
SpellEffIndex
@ EFFECT_1
@ EFFECT_0
@ EFFECT_2
@ SPELL_SCHOOL_SHADOW
@ SPELL_SCHOOL_NATURE
@ SPELL_SCHOOL_FROST
@ SPELL_SCHOOL_ARCANE
@ SPELL_SCHOOL_FIRE
@ SPELL_SCHOOL_HOLY
@ SPELL_EFFECT_DUMMY
@ SPELL_EFFECT_SCRIPT_EFFECT
@ SPELL_EFFECT_ACTIVATE_RUNE
@ SPELL_EFFECT_SUMMON
@ SPELL_EFFECT_SCHOOL_DAMAGE
@ SPELL_EFFECT_APPLY_AURA
#define MAX_RUNES
@ TARGET_UNIT_DEST_AREA_ALLY
@ TARGET_UNIT_CASTER_AREA_PARTY
@ TARGET_UNIT_DEST_AREA_ENEMY
@ TARGET_UNIT_TARGET_ANY
@ TARGET_UNIT_DEST_AREA_ENTRY
@ TARGET_UNIT_CASTER
@ SPELL_SCHOOL_MASK_NORMAL
@ CREATURE_TYPE_HUMANOID
@ CREATURE_TYPE_UNDEAD
SpellSchools GetFirstSchoolInMask(SpellSchoolMask mask)
uint32 const CREATURE_TYPEMASK_MECHANICAL_OR_ELEMENTAL
@ BASE_ATTACK
@ CLASS_DEATH_KNIGHT
@ MECHANIC_ROOT
@ MECHANIC_SNARE
@ SPELLFAMILY_DEATHKNIGHT
@ SPELL_CUSTOM_ERROR_MUST_BE_DEATH_KNIGHT
@ POWER_ENERGY
@ DISPEL_DISEASE
SpellCastResult
@ SPELL_FAILED_UNIT_NOT_INFRONT
@ SPELL_FAILED_MOVING
@ SPELL_FAILED_TOO_CLOSE
@ SPELL_FAILED_TARGET_NOT_DEAD
@ SPELL_FAILED_CUSTOM_ERROR
@ SPELL_FAILED_IMMUNE
@ SPELL_FAILED_DONT_REPORT
@ SPELL_FAILED_CANT_DO_THAT_RIGHT_NOW
@ SPELL_FAILED_REAGENTS
@ SPELL_FAILED_BAD_TARGETS
@ SPELL_CAST_OK
@ SPELL_FAILED_NO_VALID_TARGETS
@ SPELL_FAILED_NO_PET
@ SKILL_DEFENSE
@ AURA_REMOVE_BY_ENEMY_SPELL
AuraEffectHandleModes
@ AURA_EFFECT_HANDLE_REAL
@ SPELL_AURA_PERIODIC_DAMAGE
@ SPELL_AURA_ADD_PCT_MODIFIER
@ SPELL_AURA_PROC_TRIGGER_SPELL
@ SPELL_AURA_CONVERT_RUNE
@ SPELL_AURA_MOD_INCREASE_HEALTH
@ SPELL_AURA_ADD_FLAT_MODIFIER
@ SPELL_AURA_PROC_TRIGGER_SPELL_WITH_VALUE
@ SPELL_AURA_DUMMY
@ SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN
@ SPELL_AURA_DEFLECT_SPELLS
@ SPELL_AURA_MECHANIC_IMMUNITY
@ SPELL_AURA_MOD_DECREASE_SPEED
@ SPELL_AURA_SCHOOL_ABSORB
@ SPELL_AURA_PERIODIC_DUMMY
@ TRIGGERED_FULL_MASK
Will return SPELL_FAILED_DONT_REPORT in CheckCast functions.
@ TRIGGERED_IGNORE_POWER_AND_REAGENT_COST
Will ignore Spell and Category cooldowns.
SpellValueMod
@ SPELLVALUE_BASE_POINT1
@ SPELLVALUE_BASE_POINT0
#define sSpellMgr
Definition SpellMgr.h:738
#define AuraProcFn(F)
#define SpellObjectTargetSelectFn(F, I, N)
#define SpellCheckCastFn(F)
#define AuraEffectProcFn(F, I, N)
#define SpellEffectFn(F, I, N)
#define AuraEffectCalcAmountFn(F, I, N)
#define SpellObjectAreaTargetSelectFn(F, I, N)
#define AuraEffectPeriodicFn(F, I, N)
#define SpellCastFn(F)
#define AuraEffectAbsorbFn(F, I)
#define AuraEffectApplyFn(F, I, N, M)
#define AuraCheckProcFn(F)
#define SpellHitFn(F)
#define SPELL_AURA_ANY
Definition SpellScript.h:53
#define AuraDispelFn(F)
#define AuraEffectRemoveFn(F, I, N, M)
@ SPELL_STATE_PREPARING
Definition Spell.h:132
@ MOVEMENTFLAG_FALLING
@ UNIT_STATE_JUMPING
Definition Unit.h:238
@ CR_DEFENSE_SKILL
Definition Unit.h:323
@ SELF_DAMAGE
Definition Unit.h:358
@ SPELL_DIRECT_DAMAGE
Definition Unit.h:354
@ CHARM_TYPE_POSSESS
Definition Unit.h:655
@ PLAYER_PARRY_PERCENTAGE
T AddPct(T &base, U pct)
Definition Util.h:77
T CalculatePct(T base, U pct)
Definition Util.h:71
SpellInfo const * GetSpellInfo() const
SpellEffectInfo const & GetSpellEffectInfo() const
Aura * GetBase() const
void ResetPeriodic(bool resetPeriodicTimer=false)
ObjectGuid GetCasterGUID() const
int32 GetAmount() const
void PreventDefaultAction()
HookList< EffectApplyHandler > AfterEffectRemove
HookList< EffectPeriodicHandler > OnEffectPeriodic
SpellInfo const * GetSpellInfo() const
HookList< EffectApplyHandler > AfterEffectApply
HookList< EffectAbsorbHandler > AfterEffectAbsorb
HookList< EffectCalcAmountHandler > DoEffectCalcAmount
Unit * GetCaster() const
SpellEffectInfo const & GetEffectInfo(SpellEffIndex effIndex) const
AuraEffect * GetEffect(uint8 effIndex) const
HookList< EffectAbsorbHandler > OnEffectAbsorb
Unit * GetTarget() const
HookList< CheckProcHandler > DoCheckProc
HookList< AuraDispelHandler > AfterDispel
HookList< EffectProcHandler > OnEffectProc
Unit * GetUnitOwner() const
HookList< AuraProcHandler > OnProc
HookList< EffectApplyHandler > OnEffectApply
uint32 GetId() const
bool ModStackAmount(int32 num, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
int32 GetMaxDuration() const
Definition SpellAuras.h:143
int32 GetDuration() const
Definition SpellAuras.h:148
void SetDuration(int32 duration, bool withMods=false)
void SetMaxDuration(int32 duration)
Definition SpellAuras.h:144
void RecalculateAmountOfEffects()
ObjectGuid _casterGUID
Definition spell_dk.cpp:539
CorpseExplosionCheck(ObjectGuid casterGUID, bool allowGhoul)
Definition spell_dk.cpp:522
bool operator()(WorldObject *obj) const
Definition spell_dk.cpp:525
DamageEffectType GetDamageType() const
Definition Unit.h:462
SpellSchoolMask GetSchoolMask() const
Definition Unit.h:461
uint32 GetDamage() const
Definition Unit.h:464
TempSummon * SummonCreature(uint32 entry, Position const &pos, SummonPropertiesEntry const *properties=nullptr, uint32 duration=0, WorldObject *summoner=nullptr, uint32 spellId=0, uint32 vehId=0, ObjectGuid privateObjectOwner=ObjectGuid::Empty)
Definition Object.cpp:1852
bool IsEmpty() const
Definition ObjectGuid.h:172
static Unit * ToUnit(Object *o)
Definition Object.h:192
TypeID GetTypeId() const
Definition Object.h:93
static ObjectGuid GetGUID(Object const *o)
Definition Object.h:78
static Player * ToPlayer(Object *o)
Definition Object.h:180
Player *const me
Definition PlayerAI.h:52
void SetRuneCooldown(uint8 index, uint32 cooldown, bool casted=false)
Definition Player.cpp:24354
void RemoveRunesByAuraEffect(AuraEffect const *aura)
Definition Player.cpp:24392
bool HasItemCount(uint32 item, uint32 count=1, bool inBankAlso=false) const
Definition Player.cpp:9763
uint8 GetRunesState() const
Definition Player.h:2203
bool CanNoReagentCast(SpellInfo const *spellInfo) const
Definition Player.cpp:23480
void ClearResurrectRequestData()
Definition Player.h:1552
uint32 GetRuneCooldown(uint8 index) const
Definition Player.h:2206
void AddRuneByAuraEffect(uint8 index, RuneType newType, AuraEffect const *aura)
Definition Player.cpp:24386
RuneType GetCurrentRune(uint8 index) const
Definition Player.h:2205
uint32 GetRuneBaseCooldown(uint8 index) const
Definition Player.h:2207
bool isHonorOrXPTarget(Unit const *victim) const
Definition Player.cpp:23573
uint32 GetLastRuneGraceTimer(uint8 index) const
Definition Player.h:1711
RuneType GetBaseRune(uint8 index) const
Definition Player.h:2204
Unit * GetActionTarget() const
Definition Unit.h:509
SpellInfo const * GetSpellInfo() const
Definition Unit.cpp:268
Unit * GetActor()
Definition Unit.h:508
DamageInfo * GetDamageInfo() const
Definition Unit.h:519
Player const * _caster
bool operator()(WorldObject *obj) const
RaiseDeadCheck(Player const *caster)
int32 CalcValue(WorldObject const *caster=nullptr, int32 const *basePoints=nullptr) const
void ResetCooldown(uint32 spellId, bool update=false)
void StartCooldown(SpellInfo const *spellInfo, uint32 itemId, Spell *spell=nullptr, bool onHold=false)
void ResetCooldowns(Predicate predicate, bool update=false)
bool IsRankOf(SpellInfo const *spellInfo) const
uint32 GetMaxTicks() const
std::array< int32, MAX_SPELL_REAGENTS > Reagent
Definition SpellInfo.h:342
uint32 GetCategory() const
flag96 SpellFamilyFlags
Definition SpellInfo.h:357
uint32 Id
Definition SpellInfo.h:289
uint8 GetRank() const
uint32 Dispel
Definition SpellInfo.h:291
int32 GetMaxDuration() const
std::array< uint32, MAX_SPELL_REAGENTS > ReagentCount
Definition SpellInfo.h:343
SpellEffectInfo const & GetEffect(SpellEffIndex index) const
Definition SpellInfo.h:483
uint32 GetAllEffectsMechanicMask() const
SpellInfo const * GetNextRankSpell() const
uint32 SpellFamilyName
Definition SpellInfo.h:356
HookList< CastHandler > AfterCast
WorldLocation * GetHitDest() const
HookList< CheckCastHandler > OnCheckCast
Player * GetHitPlayer() const
void SetEffectValue(int32 value)
int32 GetHitDamage() const
Unit * GetCaster() const
HookList< HitHandler > AfterHit
HookList< HitHandler > OnHit
HookList< EffectHandler > OnEffectHit
void PreventHitDefaultEffect(SpellEffIndex effIndex)
Unit * GetHitUnit() const
int32 GetEffectValue() const
SpellEffectInfo const & GetEffectInfo() const
HookList< EffectHandler > OnEffectHitTarget
HookList< ObjectTargetSelectHandler > OnObjectTargetSelect
HookList< CastHandler > OnCast
Aura * GetHitAura(bool dynObjAura=false) const
void SetCustomCastResultMessage(SpellCustomErrors result)
Spell * GetSpell() const
HookList< EffectHandler > OnEffectLaunchTarget
WorldLocation const * GetExplTargetDest() const
HookList< EffectHandler > OnEffectLaunch
Unit * GetExplTargetUnit() const
SpellInfo const * GetSpellInfo() const
void FinishCast(SpellCastResult result, uint32 *param1=nullptr, uint32 *param2=nullptr)
HookList< ObjectAreaTargetSelectHandler > OnObjectAreaTargetSelect
Unit * GetOriginalCaster() const
Definition Spell.h:152
void CleanupTargetList()
Definition Spell.cpp:2085
void SelectSpellTargets()
Definition Spell.cpp:737
void SendResurrectRequest(Player *target)
Definition Spell.cpp:4728
static void SendCastResult(Player *caster, SpellInfo const *spellInfo, uint8 castCount, SpellCastResult result, SpellCustomErrors customError=SPELL_CUSTOM_ERROR_NONE, uint32 *param1=nullptr, uint32 *param2=nullptr)
Definition Spell.cpp:4177
Definition Unit.h:769
static uint32 DealDamage(Unit *attacker, Unit *victim, uint32 damage, CleanDamage const *cleanDamage=nullptr, DamageEffectType damagetype=DIRECT_DAMAGE, SpellSchoolMask damageSchoolMask=SPELL_SCHOOL_MASK_NORMAL, SpellInfo const *spellProto=nullptr, bool durabilityLoss=true)
Definition Unit.cpp:716
AuraEffectList const & GetAuraEffectsByType(AuraType type) const
Definition Unit.h:1384
Aura * GetAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
Definition Unit.cpp:4439
void RemoveAura(AuraApplicationMap::iterator &i, AuraRemoveMode mode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:3638
bool HasBreakableByDamageCrowdControlAura(Unit *excludeCasterChannel=nullptr) const
Definition Unit.cpp:693
uint8 GetClass() const
Definition Unit.h:895
ObjectGuid GetOwnerGUID() const override
Definition Unit.h:1241
bool IsGhouled() const
Definition Unit.cpp:8723
bool haveOffhandWeapon() const
Definition Unit.cpp:510
AuraEffect * GetAuraEffect(uint32 spellId, uint8 effIndex, ObjectGuid casterGUID=ObjectGuid::Empty) const
Definition Unit.cpp:4359
bool IsAlive() const
Definition Unit.h:1234
void SetMaxPower(Powers power, uint32 val)
Definition Unit.cpp:9462
ControlList m_Controlled
Definition Unit.h:1276
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
Definition Unit.cpp:4535
virtual bool HasSpell(uint32) const
Definition Unit.h:1161
uint32 GetCreatureType() const
Definition Unit.cpp:8940
bool PopAI()
Definition Unit.cpp:9535
bool HasUnitMovementFlag(uint32 f) const
Definition Unit.h:1678
AuraEffect * GetAuraEffectOfRankedSpell(uint32 spellId, uint8 effIndex, ObjectGuid casterGUID=ObjectGuid::Empty) const
Definition Unit.cpp:4373
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint8 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:3784
Unit * GetVictim() const
Definition Unit.h:859
bool HasUnitState(const uint32 f) const
Definition Unit.h:876
uint32 CountPctFromMaxHealth(int32 pct) const
Definition Unit.h:922
SpellHistory * GetSpellHistory()
Definition Unit.h:1484
bool SetCharmedBy(Unit *charmer, CharmType type, AuraApplication const *aurApp=nullptr)
Definition Unit.cpp:11489
std::list< AuraEffect * > AuraEffectList
Definition Unit.h:787
void PushAI(UnitAI *newAI)
Definition Unit.cpp:9524
void GetAllMinionsByEntry(std::list< Creature * > &Minions, uint32 entry)
Definition Unit.cpp:6062
float GetUnitCriticalChanceAgainst(WeaponAttackType attackType, Unit const *victim) const
Definition Unit.cpp:2780
bool IsInCombat() const
Definition Unit.h:1144
float GetTotalAttackPowerValue(WeaponAttackType attType) const
Definition Unit.cpp:9312
Map * GetMap() const
Definition Object.h:449
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
Definition Object.cpp:2832
Unit * GetOwner() const
Definition Object.cpp:2180
bool isInFront(WorldObject const *target, float arc=float(M_PI)) const
Definition Object.cpp:1366
float GetDistance(WorldObject const *obj) const
Definition Object.cpp:1123
bool IsFriendlyTo(WorldObject const *target) const
Definition Object.cpp:2801
int32 CalculateSpellDamage(SpellEffectInfo const &spellEffectInfo, int32 const *basePoints=nullptr) const
Definition Object.cpp:2248
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
player_ghoulAI(Player *player, ObjectGuid ghoulGUID)
uint32 _ghoulCheckTimer
ObjectGuid _ghoulGUID
void UpdateAI(uint32 diff) override
bool Validate(SpellInfo const *) override
Definition spell_dk.cpp:134
void Register() override
Definition spell_dk.cpp:201
void HandleProc(AuraEffect const *aurEff, ProcEventInfo &eventInfo)
Definition spell_dk.cpp:168
bool CheckProc(ProcEventInfo &eventInfo)
Definition spell_dk.cpp:147
PrepareAuraScript(spell_dk_acclimation)
PrepareAuraScript(spell_dk_advantage_t10_4p)
bool Validate(SpellInfo const *) override
Definition spell_dk.cpp:213
bool CheckProc(ProcEventInfo &eventInfo)
Definition spell_dk.cpp:218
void Register() override
Definition spell_dk.cpp:235
void CalculateAmount(AuraEffect const *, int32 &amount, bool &)
Definition spell_dk.cpp:261
PrepareAuraScript(spell_dk_anti_magic_shell_raid)
void Absorb(AuraEffect *, DamageInfo &dmgInfo, uint32 &absorbAmount)
Definition spell_dk.cpp:267
void Absorb(AuraEffect *, DamageInfo &dmgInfo, uint32 &absorbAmount)
Definition spell_dk.cpp:310
bool Validate(SpellInfo const *) override
Definition spell_dk.cpp:300
void CalculateAmount(AuraEffect const *, int32 &amount, bool &)
Definition spell_dk.cpp:305
void Trigger(AuraEffect *aurEff, DamageInfo &, uint32 &absorbAmount)
Definition spell_dk.cpp:315
PrepareAuraScript(spell_dk_anti_magic_shell_self)
void Register() override
Definition spell_dk.cpp:374
void CalculateAmount(AuraEffect const *, int32 &amount, bool &)
Definition spell_dk.cpp:357
bool Load() override
Definition spell_dk.cpp:346
bool Validate(SpellInfo const *) override
Definition spell_dk.cpp:352
PrepareAuraScript(spell_dk_anti_magic_zone)
void Absorb(AuraEffect *, DamageInfo &dmgInfo, uint32 &absorbAmount)
Definition spell_dk.cpp:369
PrepareAuraScript(spell_dk_blade_barrier)
bool CheckProc(ProcEventInfo &eventInfo)
Definition spell_dk.cpp:386
void Register() override
Definition spell_dk.cpp:396
PrepareSpellScript(spell_dk_blood_boil)
bool Load() override
Definition spell_dk.cpp:419
void Register() override
Definition spell_dk.cpp:433
bool Validate(SpellInfo const *) override
Definition spell_dk.cpp:414
PrepareAuraScript(spell_dk_blood_gorged)
bool CheckProc(ProcEventInfo &)
Definition spell_dk.cpp:451
void Register() override
Definition spell_dk.cpp:469
bool Validate(SpellInfo const *) override
Definition spell_dk.cpp:446
void HandleProc(AuraEffect const *aurEff, ProcEventInfo &eventInfo)
Definition spell_dk.cpp:457
PrepareAuraScript(spell_dk_blood_tap_AuraScript)
void HandleApply(AuraEffect const *aurEff, AuraEffectHandleModes)
PrepareSpellScript(spell_dk_blood_tap_SpellScript)
AuraScript * GetAuraScript() const override
SpellScript * GetSpellScript() const override
void HandleProc(AuraEffect const *aurEff, ProcEventInfo &)
Definition spell_dk.cpp:484
PrepareAuraScript(spell_dk_bloodworms)
void Register() override
Definition spell_dk.cpp:489
void Register() override
Definition spell_dk.cpp:513
bool Validate(SpellInfo const *) override
Definition spell_dk.cpp:500
void HandleProc(AuraEffect const *aurEff, ProcEventInfo &eventInfo)
Definition spell_dk.cpp:505
PrepareAuraScript(spell_dk_butchery)
void HandleCorpseExplosion(SpellEffIndex effIndex)
Definition spell_dk.cpp:601
bool Validate(SpellInfo const *spellInfo) override
Definition spell_dk.cpp:548
void CheckTargets(std::list< WorldObject * > &targets)
Definition spell_dk.cpp:567
PrepareSpellScript(spell_dk_corpse_explosion)
void CheckTarget(WorldObject *&target)
Definition spell_dk.cpp:559
void HandleDamage(SpellEffIndex effIndex, Unit *target)
Definition spell_dk.cpp:586
void Register() override
Definition spell_dk.cpp:621
void HandleTarget(AuraEffect const *, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
bool CheckProc(ProcEventInfo &eventInfo)
PrepareAuraScript(spell_dk_dancing_rune_weapon)
void HandleProc(AuraEffect const *, ProcEventInfo &eventInfo)
void Register() override
Definition spell_dk.cpp:647
PrepareAuraScript(spell_dk_death_and_decay)
void HandleDummyTick(AuraEffect const *aurEff)
Definition spell_dk.cpp:637
PrepareSpellScript(spell_dk_death_coil)
bool Validate(SpellInfo const *) override
Definition spell_dk.cpp:658
void Register() override
Definition spell_dk.cpp:703
SpellCastResult CheckCast()
Definition spell_dk.cpp:686
void HandleDummy(SpellEffIndex)
Definition spell_dk.cpp:663
void HandleScript(SpellEffIndex effIndex)
Definition spell_dk.cpp:726
PrepareSpellScript(spell_dk_death_gate)
SpellCastResult CheckClass()
Definition spell_dk.cpp:715
void Register() override
Definition spell_dk.cpp:733
PrepareSpellScript(spell_dk_death_grip_initial)
SpellCastResult CheckCast()
void HandleDummy(SpellEffIndex)
void HandleDummy(SpellEffIndex)
Definition spell_dk.cpp:745
void Register() override
Definition spell_dk.cpp:752
PrepareSpellScript(spell_dk_death_grip)
void Register() override
Definition spell_dk.cpp:797
void FilterTargets(std::list< WorldObject * > &targetList)
Definition spell_dk.cpp:763
PrepareSpellScript(spell_dk_death_pact)
bool CheckProc(ProcEventInfo &eventInfo)
Definition spell_dk.cpp:815
void PeriodicTick(AuraEffect const *aurEff)
Definition spell_dk.cpp:868
PrepareAuraScript(spell_dk_death_rune)
void Register() override
Definition spell_dk.cpp:874
bool Load() override
Definition spell_dk.cpp:810
void HandleProc(ProcEventInfo &eventInfo)
Definition spell_dk.cpp:829
PrepareSpellScript(spell_dk_death_strike)
bool Validate(SpellInfo const *) override
Definition spell_dk.cpp:887
void HandleDummy(SpellEffIndex)
Definition spell_dk.cpp:892
void Register() override
Definition spell_dk.cpp:910
PrepareAuraScript(spell_dk_frost_fever)
void HandleDispel(DispelInfo *)
void Register() override
void HandleDamage(SpellEffIndex)
Definition spell_dk.cpp:927
bool Validate(SpellInfo const *spellInfo) override
Definition spell_dk.cpp:921
PrepareSpellScript(spell_dk_ghoul_explode)
void Suicide(SpellEffIndex)
Definition spell_dk.cpp:933
void Register() override
Definition spell_dk.cpp:944
void CalcDamage(SpellEffIndex)
PrepareSpellScript(spell_dk_ghoul_thrash)
void Register() override
bool Validate(SpellInfo const *) override
PrepareAuraScript(spell_dk_glyph_of_death_grip)
bool Validate(SpellInfo const *) override
Definition spell_dk.cpp:956
void HandleProc(AuraEffect const *, ProcEventInfo &eventInfo)
Definition spell_dk.cpp:961
PrepareSpellScript(spell_dk_glyph_of_scourge_strike_script)
bool Validate(SpellInfo const *) override
Definition spell_dk.cpp:978
PrepareAuraScript(spell_dk_glyph_of_scourge_strike)
void HandleProc(AuraEffect const *aurEff, ProcEventInfo &eventInfo)
Definition spell_dk.cpp:983
void HandleDummy(SpellEffIndex)
bool Validate(SpellInfo const *) override
PrepareSpellScript(spell_dk_hungering_cold_init)
void Register() override
PrepareAuraScript(spell_dk_hungering_cold)
bool CheckProc(ProcEventInfo &eventInfo)
void Register() override
void PeriodicTick(AuraEffect const *aurEff)
PrepareAuraScript(spell_dk_hysteria)
PrepareAuraScript(spell_dk_icebound_fortitude)
void CalculateAmount(AuraEffect const *, int32 &amount, bool &)
PrepareAuraScript(spell_dk_improved_blood_presence_triggered)
bool CheckProc(ProcEventInfo &eventInfo)
void HandleProc(AuraEffect const *aurEff, ProcEventInfo &eventInfo)
bool Validate(SpellInfo const *) override
PrepareAuraScript(spell_dk_improved_blood_presence)
void HandleEffectApply(AuraEffect const *aurEff, AuraEffectHandleModes)
void HandleEffectRemove(AuraEffect const *, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
PrepareAuraScript(spell_dk_improved_frost_presence)
void HandleEffectApply(AuraEffect const *aurEff, AuraEffectHandleModes)
void HandleEffectRemove(AuraEffect const *, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
void HandleEffectRemove(AuraEffect const *, AuraEffectHandleModes)
void HandleEffectApply(AuraEffect const *aurEff, AuraEffectHandleModes)
PrepareAuraScript(spell_dk_improved_unholy_presence)
bool Validate(SpellInfo const *) override
PrepareAuraScript(spell_dk_lichborne)
bool Validate(SpellInfo const *) override
void AfterRemove(AuraEffect const *, AuraEffectHandleModes)
void Register() override
void AfterApply(AuraEffect const *, AuraEffectHandleModes)
void Register() override
void HandleProc(AuraEffect const *aurEff, ProcEventInfo &eventInfo)
bool Validate(SpellInfo const *) override
PrepareAuraScript(spell_dk_mark_of_blood)
bool CheckProc(ProcEventInfo &eventInfo)
PrepareAuraScript(spell_dk_necrosis)
void Register() override
bool Validate(SpellInfo const *) override
void HandleProc(AuraEffect const *aurEff, ProcEventInfo &eventInfo)
bool Validate(SpellInfo const *) override
PrepareSpellScript(spell_dk_pestilence)
void Register() override
void OnHit(SpellEffIndex)
void HandleImprovedBloodPresence(AuraEffect const *aurEff, AuraEffectHandleModes)
void HandleImprovedFrostPresence(AuraEffect const *aurEff, AuraEffectHandleModes)
void HandleEffectRemove(AuraEffect const *, AuraEffectHandleModes)
void HandleImprovedUnholyPresence(AuraEffect const *aurEff, AuraEffectHandleModes)
void Register() override
PrepareAuraScript(spell_dk_presence)
bool Validate(SpellInfo const *) override
bool CheckProc(ProcEventInfo &eventInfo)
void HandleProc(AuraEffect const *aurEff, ProcEventInfo &eventInfo)
void Register() override
PrepareAuraScript(spell_dk_pvp_4p_bonus)
bool Validate(SpellInfo const *) override
PrepareAuraScript(spell_dk_raise_ally_AuraScript)
void OnApply(AuraEffect const *, AuraEffectHandleModes)
void OnRemove(AuraEffect const *, AuraEffectHandleModes)
PrepareSpellScript(spell_dk_raise_ally_SpellScript)
PrepareSpellScript(spell_dk_raise_ally_initial)
bool Validate(SpellInfo const *spellInfo) override
SpellCastResult CheckCast()
void HandleDummy(SpellEffIndex)
static char constexpr const ScriptName[]
AuraScript * GetAuraScript() const override
SpellScript * GetSpellScript() const override
bool Load() override
void Register() override
SpellCastResult CheckCast()
void HandleRaiseDead(SpellEffIndex)
PrepareSpellScript(spell_dk_raise_dead)
SpellCastResult CheckReagents()
bool Validate(SpellInfo const *spellInfo) override
void CheckTarget(WorldObject *&target)
SpellCastResult _result
void CheckTargets(std::list< WorldObject * > &targets)
void Register() override
void HandleProc(AuraEffect const *, ProcEventInfo &)
bool CheckProc(ProcEventInfo &)
PrepareAuraScript(spell_dk_rime)
PrepareSpellScript(spell_dk_rune_tap_party)
void CheckTargets(std::list< WorldObject * > &targets)
void Register() override
bool Validate(SpellInfo const *) override
void HandleProc(AuraEffect const *aurEff, ProcEventInfo &)
void Register() override
PrepareAuraScript(spell_dk_scent_of_blood)
bool Validate(SpellInfo const *) override
void Register() override
void HandleDummy(SpellEffIndex)
PrepareSpellScript(spell_dk_scourge_strike)
void Register() override
void CalculateAmount(AuraEffect const *, int32 &amount, bool &)
PrepareAuraScript(spell_dk_spell_deflection)
void Absorb(AuraEffect *, DamageInfo &dmgInfo, uint32 &absorbAmount)
void Register() override
void HandleProc(AuraEffect const *aurEff, ProcEventInfo &eventInfo)
PrepareAuraScript(spell_dk_sudden_doom)
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
void HandleProc(AuraEffect const *aurEff, ProcEventInfo &eventInfo)
PrepareAuraScript(spell_dk_threat_of_thassarian)
void HandleProc(AuraEffect const *aurEff, ProcEventInfo &eventInfo)
PrepareAuraScript(spell_dk_unholy_blight)
void Register() override
bool Validate(SpellInfo const *) override
bool CheckProc(ProcEventInfo &eventInfo)
PrepareAuraScript(spell_dk_vampiric_blood)
void Register() override
void CalculateAmount(AuraEffect const *, int32 &amount, bool &)
void Register() override
PrepareAuraScript(spell_dk_vendetta)
void HandleProc(AuraEffect const *aurEff, ProcEventInfo &eventInfo)
bool Validate(SpellInfo const *) override
PrepareSpellScript(spell_dk_wandering_plague_damage)
void FilterTargets(std::list< WorldObject * > &targets)
void Register() override
void HandleProc(AuraEffect const *aurEff, ProcEventInfo &eventInfo)
bool CheckProc(ProcEventInfo &eventInfo)
bool Validate(SpellInfo const *) override
PrepareAuraScript(spell_dk_wandering_plague)
void Absorb(AuraEffect *, DamageInfo &dmgInfo, uint32 &absorbAmount)
PrepareAuraScript(spell_dk_will_of_the_necropolis)
void CalculateAmount(AuraEffect const *, int32 &amount, bool &)
bool Validate(SpellInfo const *spellInfo) override
PrepareSpellScript(spell_pet_dk_gargoyle_strike)
void HandleDamageCalc(SpellEffIndex)
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
auto SelectRandomContainerElement(C const &container) -> typename std::add_const< decltype(*std::begin(container))>::type &
Definition Containers.h:108
void RandomResize(C &container, std::size_t requestedSize)
Definition Containers.h:66
DeathKnightSpells
Definition pet_dk.cpp:33
DancingRuneWeaponMisc
Definition pet_dk.cpp:133
#define DKBloodTapScriptName
@ SPELL_DK_GHOUL_EXPLODE
Definition spell_dk.cpp:66
@ SPELL_DK_ACCLIMATION_ARCANE
Definition spell_dk.cpp:47
@ SPELL_DK_GLYPH_OF_ICEBOUND_FORTITUDE
Definition spell_dk.cpp:68
@ SPELL_DK_RUNIC_RETURN
Definition spell_dk.cpp:103
@ SPELL_DK_LICHBORNE
Definition spell_dk.cpp:78
@ SPELL_DK_ACCLIMATION_FROST
Definition spell_dk.cpp:46
@ SPELL_DK_RAISE_DEAD_USE_REAGENT
Definition spell_dk.cpp:81
@ SPELL_DK_PLAGUE_STRIKE
Definition spell_dk.cpp:109
@ SPELL_DK_IMPROVED_FROST_PRESENCE_R1
Definition spell_dk.cpp:71
@ SPELL_DK_FROST_PRESENCE
Definition spell_dk.cpp:64
@ SPELL_DK_IMPROVED_UNHOLY_PRESENCE_R1
Definition spell_dk.cpp:72
@ SPELL_DK_DEATH_STRIKE_OFF_HAND_R1
Definition spell_dk.cpp:100
@ SPELL_DK_ITEM_SIGIL_VENGEFUL_HEART
Definition spell_dk.cpp:76
@ SPELL_DK_ADVANTAGE_T10_4P_MELEE
Definition spell_dk.cpp:50
@ SPELL_DK_IMPROVED_BLOOD_PRESENCE_HEAL
Definition spell_dk.cpp:73
@ SPELL_DK_HUNGERING_COLD_PROC
Definition spell_dk.cpp:69
@ SPELL_DK_BLOOD_BOIL_TRIGGERED
Definition spell_dk.cpp:53
@ SPELL_DK_VENDETTA_HEAL
Definition spell_dk.cpp:95
@ SPELL_DK_GLYPH_OF_SCOURGE_STRIKE_SCRIPT
Definition spell_dk.cpp:90
@ SPELL_DK_ANTI_MAGIC_SHELL_TALENT
Definition spell_dk.cpp:51
@ SPELL_DK_RUNE_STRIKE_OFF_HAND_R1
Definition spell_dk.cpp:101
@ SPELL_DK_BLOOD_PLAGUE
Definition spell_dk.cpp:80
@ SPELL_DK_MARK_OF_BLOOD_HEAL
Definition spell_dk.cpp:92
@ SPELL_DK_HEART_STRIKE
Definition spell_dk.cpp:111
@ SPELL_DK_ACCLIMATION_HOLY
Definition spell_dk.cpp:44
@ SPELL_DK_CORPSE_EXPLOSION_VISUAL
Definition spell_dk.cpp:57
@ SPELL_DK_SCOURGE_STRIKE_TRIGGERED
Definition spell_dk.cpp:84
@ SPELL_DK_PLAGUE_STRIKE_OFF_HAND_R1
Definition spell_dk.cpp:99
@ SPELL_DK_ACCLIMATION_SHADOW
Definition spell_dk.cpp:48
@ SPELL_DK_BLOOD_GORGED_HEAL
Definition spell_dk.cpp:54
@ SPELL_DK_DEATH_AND_DECAY_DAMAGE
Definition spell_dk.cpp:58
@ SPELL_DK_UNHOLY_BLIGHT_DAMAGE
Definition spell_dk.cpp:93
@ SPELL_DK_MASTER_OF_GHOULS
Definition spell_dk.cpp:79
@ SPELL_DK_RUNE_STRIKE
Definition spell_dk.cpp:113
@ SPELL_DK_ACCLIMATION_FIRE
Definition spell_dk.cpp:45
@ SPELL_DK_IMPROVED_UNHOLY_PRESENCE_TRIGGERED
Definition spell_dk.cpp:75
@ SPELL_DK_BLOOD_STRIKE_OFF_HAND_R1
Definition spell_dk.cpp:102
@ SPELL_DK_WILL_OF_THE_NECROPOLIS_AURA_R1
Definition spell_dk.cpp:88
@ SPELL_DK_FROST_FEVER
Definition spell_dk.cpp:63
@ SPELL_DK_DEATH_COIL_HEAL
Definition spell_dk.cpp:60
@ SPELL_DK_WILL_OF_THE_NECROPOLIS_TALENT_R1
Definition spell_dk.cpp:87
@ SPELL_DK_ICY_TOUCH
Definition spell_dk.cpp:108
@ SPELL_DK_IMPROVED_BLOOD_PRESENCE_TRIGGERED
Definition spell_dk.cpp:74
@ SPELL_DK_OBLITERATE_OFF_HAND_R1
Definition spell_dk.cpp:97
@ SPELL_DK_GLYPH_OF_DISEASE
Definition spell_dk.cpp:67
@ SPELL_DK_GHOUL_THRASH
Definition spell_dk.cpp:89
@ SPELL_DK_DEATH_GRIP
Definition spell_dk.cpp:61
@ SPELL_DK_ACCLIMATION_NATURE
Definition spell_dk.cpp:49
@ SPELL_DK_DEATH_STRIKE_HEAL
Definition spell_dk.cpp:62
@ SPELL_DK_FROST_STRIKE_OFF_HAND_R1
Definition spell_dk.cpp:98
@ SPELL_DK_FROST_PRESENCE_TRIGGERED
Definition spell_dk.cpp:65
@ SPELL_DK_BLOOD_STRIKE
Definition spell_dk.cpp:107
@ SPELL_DK_RUNIC_POWER_ENERGIZE
Definition spell_dk.cpp:82
@ SPELL_DK_NECROSIS_DAMAGE
Definition spell_dk.cpp:96
@ SPELL_DK_BUTCHERY_RUNIC_POWER
Definition spell_dk.cpp:91
@ SPELL_DK_ITEM_T8_MELEE_4P_BONUS
Definition spell_dk.cpp:77
@ SPELL_DK_IMPROVED_BLOOD_PRESENCE_R1
Definition spell_dk.cpp:70
@ SPELL_DK_DEATH_COIL_R1
Definition spell_dk.cpp:105
@ SPELL_DK_SCENT_OF_BLOOD
Definition spell_dk.cpp:83
@ SPELL_DK_WANDERING_PLAGUE_DAMAGE
Definition spell_dk.cpp:104
@ SPELL_DK_DEATH_GRIP_INITIAL
Definition spell_dk.cpp:106
@ SPELL_DK_UNHOLY_PRESENCE
Definition spell_dk.cpp:85
@ SPELL_DK_GLYPH_OF_UNHOLY_BLIGHT
Definition spell_dk.cpp:94
@ SPELL_DK_DEATH_STRIKE
Definition spell_dk.cpp:110
@ SPELL_DK_BLOOD_PRESENCE
Definition spell_dk.cpp:55
@ SPELL_DK_UNHOLY_PRESENCE_TRIGGERED
Definition spell_dk.cpp:86
@ SPELL_DK_OBLITERATE
Definition spell_dk.cpp:112
@ SPELL_DK_BLACK_ICE_R1
Definition spell_dk.cpp:52
@ SPELL_DK_DEATH_COIL_DAMAGE
Definition spell_dk.cpp:59
@ SPELL_DK_CORPSE_EXPLOSION_TRIGGERED
Definition spell_dk.cpp:56
DeathKnightMisc
Definition spell_dk.cpp:123
@ SPELL_CATEGORY_HOWLING_BLAST
Definition spell_dk.cpp:126
@ NPC_DK_DANCING_RUNE_WEAPON
Definition spell_dk.cpp:125
@ NPC_DK_GHOUL
Definition spell_dk.cpp:124
DeathKnightSpellIcons
Definition spell_dk.cpp:117
@ DK_ICON_ID_IMPROVED_DEATH_STRIKE
Definition spell_dk.cpp:119
@ DK_ICON_ID_EPIDEMIC
Definition spell_dk.cpp:118
RaiseAllyMisc
@ SPELL_GHOUL_FRENZY
@ SPELL_DK_PET_SCALING___MASTER_SPELL_03___INTELLECT_SPIRIT_RESILIENCE
@ SPELL_DK_PET_SCALING___MASTER_SPELL_06___SPELL_HIT_EXPERTISE_SPELL_PENETRATION
@ SPELL_DK_DEATH_KNIGHT_PET_SCALING_03
@ SPELL_DK_DEATH_KNIGHT_RUNE_WEAPON_SCALING_02
@ TEXT_RISE_ALLY
@ NPC_RISEN_ALLY
@ SPELL_DK_MIRROR_NAME_TRIGGERED
@ SPELL_DK_RISEN_GHOUL_SELF_STUN
@ SPELL_DK_DEATH_KNIGHT_PET_SCALING_01
@ SPELL_DK_SUMMON_HEAL
@ SPELL_DK_MIRROR_NAME
@ SPELL_DK_RISEN_GHOUL_SPAWN__IN
@ DATA_INITIAL_TARGET_GUID
void AddSC_deathknight_spell_scripts()
CastSpellExtraArgs & AddSpellBP0(int32 val)
CastSpellExtraArgs & AddSpellMod(SpellValueMod mod, int32 val)