TrinityCore
Loading...
Searching...
No Matches
spell_item.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_GENERIC spells used by items.
20 * Ordered alphabetically using scriptname.
21 * Scriptnames of files in this file should be prefixed with "spell_item_".
22 */
23
24#include "ScriptMgr.h"
25#include "Battleground.h"
26#include "CommonPredicates.h"
27#include "Containers.h"
28#include "Creature.h"
29#include "CreatureAIImpl.h"
30#include "DB2Stores.h"
31#include "Item.h"
32#include "Log.h"
33#include "LootMgr.h"
34#include "Map.h"
35#include "ObjectMgr.h"
36#include "Player.h"
37#include "Random.h"
38#include "SkillDiscovery.h"
39#include "Spell.h"
40#include "SpellAuraEffects.h"
41#include "SpellHistory.h"
42#include "SpellMgr.h"
43#include "SpellScript.h"
44
52
53// Generic script for handling item dummy effects which trigger another spell.
55{
56 private:
58
59 public:
60 spell_item_trigger_spell(char const* name, uint32 triggeredSpellId) : SpellScriptLoader(name), _triggeredSpellId(triggeredSpellId) { }
61
63 {
65
66 public:
67 spell_item_trigger_spell_SpellScript(uint32 triggeredSpellId) : SpellScript(), _triggeredSpellId(triggeredSpellId) { }
68
69 private:
70 bool Validate(SpellInfo const* /*spellInfo*/) override
71 {
73 }
74
75 void HandleDummy(SpellEffIndex /*effIndex*/)
76 {
77 Unit* caster = GetCaster();
78 if (Item* item = GetCastItem())
79 caster->CastSpell(caster, _triggeredSpellId, item);
80 }
81
86 };
87
92};
93
98
99// 23780 - Aegis of Preservation
101{
102 bool Validate(SpellInfo const* /*spellInfo*/) override
103 {
105 }
106
107 void HandleProc(AuraEffect* aurEff, ProcEventInfo& /*eventInfo*/)
108 {
111 }
112
117};
118
123
124// 38554 - Absorb Eye of Grillok (31463: Zezzak's Shard)
126{
127 bool Validate(SpellInfo const* /*spellInfo*/) override
128 {
130 }
131
132 void PeriodicTick(AuraEffect const* aurEff)
133 {
135
136 if (!GetCaster() || GetTarget()->GetTypeId() != TYPEID_UNIT)
137 return;
138
141 }
142
147};
148
156
157// 37877 - Blessing of Faith
159{
170
171 void HandleDummy(SpellEffIndex /*effIndex*/)
172 {
173 if (Unit* unitTarget = GetHitUnit())
174 {
175 uint32 spellId = 0;
176 switch (unitTarget->GetClass())
177 {
178 case CLASS_DRUID:
180 break;
181 case CLASS_PALADIN:
183 break;
184 case CLASS_PRIEST:
186 break;
187 case CLASS_SHAMAN:
189 break;
190 default:
191 return; // ignore for non-healing classes
192 }
193
194 Unit* caster = GetCaster();
195 caster->CastSpell(caster, spellId, true);
196 }
197 }
198
203};
204
210
211// Item - 13503: Alchemist's Stone
212// Item - 35748: Guardian's Alchemist Stone
213// Item - 35749: Sorcerer's Alchemist Stone
214// Item - 35750: Redeemer's Alchemist Stone
215// Item - 35751: Assassin's Alchemist Stone
216// Item - 44322: Mercurial Alchemist Stone
217// Item - 44323: Indestructible Alchemist's Stone
218// Item - 44324: Mighty Alchemist's Stone
219
220// 17619 - Alchemist Stone
222{
223 bool Validate(SpellInfo const* /*spellInfo*/) override
224 {
225 return ValidateSpellInfo(
226 {
229 });
230 }
231
232 bool CheckProc(ProcEventInfo& eventInfo)
233 {
235 }
236
237 void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
238 {
240
241 uint32 spellId = 0;
242 int32 amount = int32(eventInfo.GetDamageInfo()->GetDamage() * 0.4f);
243
248
249 if (!spellId)
250 return;
251
252 Unit* caster = eventInfo.GetActionTarget();
253 CastSpellExtraArgs args(aurEff);
254 args.AddSpellBP0(amount);
255 caster->CastSpell(nullptr, spellId, args);
256 }
257
263};
264
271
272// Item - 50351: Tiny Abomination in a Jar
273// 71406 - Anger Capacitor
274
275// Item - 50706: Tiny Abomination in a Jar (Heroic)
276// 71545 - Anger Capacitor
277template <uint8 StackAmount>
279{
280 public:
281 spell_item_anger_capacitor(char const* ScriptName) : SpellScriptLoader(ScriptName) { }
282
283 template <uint8 Stacks>
285 {
286 bool Validate(SpellInfo const* /*spellInfo*/) override
287 {
288 return ValidateSpellInfo(
289 {
293 });
294 }
295
296 void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
297 {
299 Unit* caster = eventInfo.GetActor();
300 Unit* target = eventInfo.GetProcTarget();
301
302 caster->CastSpell(nullptr, SPELL_MOTE_OF_ANGER, true);
303 Aura const* motes = caster->GetAura(SPELL_MOTE_OF_ANGER);
304 if (!motes || motes->GetStackAmount() < Stacks)
305 return;
306
309 if (Player* player = caster->ToPlayer())
310 if (player->GetWeaponForAttack(OFF_ATTACK, true) && roll_chance(50))
312
313 caster->CastSpell(target, spellId, aurEff);
314 }
315
316 void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
317 {
319 }
320
326 };
327
328 AuraScript* GetAuraScript() const override
329 {
331 }
332};
333
334// 26400 - Arcane Shroud
336{
337 void CalculateAmount(AuraEffect const* /*aurEff*/, SpellEffectValue& amount, bool& /*canBeRecalculated*/)
338 {
339 int32 diff = GetUnitOwner()->GetLevel() - 60;
340 if (diff > 0)
341 amount += 2 * diff;
342 }
343
348};
349
351{
352 SPELL_SOCIOPATH = 39511, // Sociopath: +35 strength(Paladin, Rogue, Druid, Warrior)
353 SPELL_DELUSIONAL = 40997, // Delusional: +70 attack power(Rogue, Hunter, Paladin, Warrior, Druid)
354 SPELL_KLEPTOMANIA = 40998, // Kleptomania: +35 agility(Warrior, Rogue, Paladin, Hunter, Druid)
355 SPELL_MEGALOMANIA = 40999, // Megalomania: +41 damage / healing(Druid, Shaman, Priest, Warlock, Mage, Paladin)
356 SPELL_PARANOIA = 41002, // Paranoia: +35 spell / melee / ranged crit strike rating(All classes)
357 SPELL_MANIC = 41005, // Manic: +35 haste(spell, melee and ranged) (All classes)
358 SPELL_NARCISSISM = 41009, // Narcissism: +35 intellect(Druid, Shaman, Priest, Warlock, Mage, Paladin, Hunter)
359 SPELL_MARTYR_COMPLEX = 41011, // Martyr Complex: +35 stamina(All classes)
360 SPELL_DEMENTIA = 41404, // Dementia: Every 5 seconds either gives you +5/-5% damage/healing. (Druid, Shaman, Priest, Warlock, Mage, Paladin)
361
364
365 SAY_MADNESS = 21954
367
368// Item - 31859: Darkmoon Card: Madness
369// 39446 - Aura of Madness
371{
372 bool Validate(SpellInfo const* /*spellInfo*/) override
373 {
374 return ValidateSpellInfo(
375 {
385 }) && sBroadcastTextStore.LookupEntry(SAY_MADNESS);
386 }
387
388 void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
389 {
390 static std::vector<uint32> const triggeredSpells[MAX_CLASSES] =
391 {
392 //CLASS_NONE
393 { },
394 //CLASS_WARRIOR
396 //CLASS_PALADIN
398 //CLASS_HUNTER
400 //CLASS_ROGUE
402 //CLASS_PRIEST
404 //CLASS_DEATH_KNIGHT
406 //CLASS_SHAMAN
408 //CLASS_MAGE
410 //CLASS_WARLOCK
412 //CLASS_UNK
413 { },
414 //CLASS_DRUID
416 };
417
419 Unit* caster = eventInfo.GetActor();
420 uint32 spellId = Trinity::Containers::SelectRandomContainerElement(triggeredSpells[caster->GetClass()]);
421 caster->CastSpell(caster, spellId, aurEff);
422
423 if (roll_chance(10))
424 caster->Unit::Say(SAY_MADNESS);
425 }
426
431};
432
433// 41404 - Dementia
435{
436 bool Validate(SpellInfo const* /*spellInfo*/) override
437 {
438 return ValidateSpellInfo(
439 {
442 });
443 }
444
450
455};
456
457// 24590 - Brittle Armor
459{
460 SPELL_BRITTLE_ARMOR = 24575
462
464{
465 bool Validate(SpellInfo const* /*spellInfo*/) override
466 {
468 }
469
474
479};
480
481// 64411 - Blessing of Ancient Kings (Val'anyr, Hammer of Ancient Kings)
486
488{
489 bool Validate(SpellInfo const* /*spellInfo*/) override
490 {
492 }
493
494 bool CheckProc(ProcEventInfo& eventInfo)
495 {
496 return eventInfo.GetProcTarget() != nullptr;
497 }
498
499 void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
500 {
502
503 HealInfo* healInfo = eventInfo.GetHealInfo();
504 if (!healInfo || !healInfo->GetHeal())
505 return;
506
507 SpellEffectValue absorb = CalculatePct(healInfo->GetHeal(), 15.0f);
509 {
510 // The shield can grow to a maximum size of 20,000 damage absorbtion
511 protEff->SetAmount(std::min(protEff->GetAmount() + absorb, 20000.0));
512
513 // Refresh and return to prevent replacing the aura
514 protEff->GetBase()->RefreshDuration();
515 }
516 else
517 {
518 CastSpellExtraArgs args(aurEff);
519 args.AddSpellBP0(absorb);
521 }
522 }
523
529};
530
531// 64415 Val'anyr Hammer of Ancient Kings - Equip Effect
533{
534 bool CheckProc(ProcEventInfo& eventInfo)
535 {
536 return eventInfo.GetHealInfo() && eventInfo.GetHealInfo()->GetEffectiveHeal() > 0;
537 }
538
543};
544
549
550// 71564 - Deadly Precision
564
565// 71563 - Deadly Precision Dummy
567{
568 bool Validate(SpellInfo const* /*spellInfo*/) override
569 {
571 }
572
573 void HandleDummy(SpellEffIndex /*effIndex*/)
574 {
575 SpellInfo const* spellInfo = sSpellMgr->AssertSpellInfo(SPELL_DEADLY_PRECISION, GetCastDifficulty());
578 GetCaster()->CastSpell(GetCaster(), spellInfo->Id, args);
579 }
580
585};
586
588{
589 SPELL_STRENGTH_OF_THE_TAUNKA = 71484, // +600 Strength
590 SPELL_AGILITY_OF_THE_VRYKUL = 71485, // +600 Agility
591 SPELL_POWER_OF_THE_TAUNKA = 71486, // +1200 Attack Power
592 SPELL_AIM_OF_THE_IRON_DWARVES = 71491, // +600 Critical
593 SPELL_SPEED_OF_THE_VRYKUL = 71492, // +600 Haste
594
595 SPELL_AGILITY_OF_THE_VRYKUL_HERO = 71556, // +700 Agility
596 SPELL_POWER_OF_THE_TAUNKA_HERO = 71558, // +1400 Attack Power
597 SPELL_AIM_OF_THE_IRON_DWARVES_HERO = 71559, // +700 Critical
598 SPELL_SPEED_OF_THE_VRYKUL_HERO = 71560, // +700 Haste
599 SPELL_STRENGTH_OF_THE_TAUNKA_HERO = 71561 // +700 Strength
601
602// Item - 50362: Deathbringer's Will
603// 71519 - Item - Icecrown 25 Normal Melee Trinket
604
605// Item - 50363: Deathbringer's Will
606// 71562 - Item - Icecrown 25 Heroic Melee Trinket
607template <uint32 StrengthSpellId, uint32 AgilitySpellId, uint32 APSpellId, uint32 CriticalSpellId, uint32 HasteSpellId>
609{
610 public:
611 spell_item_deathbringers_will(char const* ScriptName) : SpellScriptLoader(ScriptName) { }
612
613 template <uint32 Strength, uint32 Agility, uint32 AttackPower, uint32 Critical, uint32 Haste>
615 {
616 bool Validate(SpellInfo const* /*spellInfo*/) override
617 {
618 return ValidateSpellInfo(
619 {
620 Strength,
621 Agility,
622 AttackPower,
623 Critical,
624 Haste
625 });
626 }
627
628 void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
629 {
630 static std::vector<uint32> const triggeredSpells[MAX_CLASSES] =
631 {
632 //CLASS_NONE
633 { },
634 //CLASS_WARRIOR
635 { Strength, Critical, Haste },
636 //CLASS_PALADIN
637 { Strength, Critical, Haste },
638 //CLASS_HUNTER
639 { Agility, Critical, AttackPower },
640 //CLASS_ROGUE
641 { Agility, Haste, AttackPower },
642 //CLASS_PRIEST
643 { },
644 //CLASS_DEATH_KNIGHT
645 { Strength, Critical, Haste },
646 //CLASS_SHAMAN
647 { Agility, Haste, AttackPower },
648 //CLASS_MAGE
649 { },
650 //CLASS_WARLOCK
651 { },
652 //CLASS_UNK
653 { },
654 //CLASS_DRUID
655 { Strength, Agility, Haste }
656 };
657
659 Unit* caster = eventInfo.GetActor();
660 std::vector<uint32> const& randomSpells = triggeredSpells[caster->GetClass()];
661 if (randomSpells.empty())
662 return;
663
665 caster->CastSpell(caster, spellId, aurEff);
666 }
667
672 };
673
678};
679
680// 47770 - Roll Dice
682{
683 enum
684 {
686 };
687
688 bool Validate(SpellInfo const* /*spellInfo*/) override
689 {
691 return false;
692 return true;
693 }
694
695 bool Load() override
696 {
697 return GetCaster()->GetTypeId() == TYPEID_PLAYER;
698 }
699
700 void HandleScript(SpellEffIndex /*effIndex*/)
701 {
703
704 static uint32 const minimum = 1;
705 static uint32 const maximum = 100;
706
707 GetCaster()->ToPlayer()->DoRandomRoll(minimum, maximum);
708 }
709
714};
715
721
722// 23134 - Goblin Bomb
741
749
750// 46203 - Goblin Weather Machine
767
768// 8342 - Defibrillate (Goblin Jumper Cables) have 33% chance on success
769// 22999 - Defibrillate (Goblin Jumper Cables XL) have 50% chance on success
770// 54732 - Defibrillate (Gnomish Army Knife) have 67% chance on success
776
778{
779 public:
780 spell_item_defibrillate(char const* name, uint8 chance, uint32 failSpell = 0) : SpellScriptLoader(name), _chance(chance), _failSpell(failSpell) { }
781
783 {
784 public:
785 spell_item_defibrillate_SpellScript(uint8 chance, uint32 failSpell) : SpellScript(), _chance(chance), _failSpell(failSpell) { }
786
787 private:
788 bool Validate(SpellInfo const* /*spellInfo*/) override
789 {
791 }
792
794 {
795 if (roll_chance(_chance))
796 {
797 PreventHitDefaultEffect(effIndex);
798 if (_failSpell)
800 }
801 }
802
807
810 };
811
812 SpellScript* GetSpellScript() const override
813 {
815 }
816
817 private:
820};
821
826
827// 33896 - Desperate Defense
829{
830 bool Validate(SpellInfo const* /*spellInfo*/) override
831 {
833 }
834
835 void HandleProc(AuraEffect* aurEff, ProcEventInfo& /*eventInfo*/)
836 {
839 }
840
845};
846
847// http://www.wowhead.com/item=6522 Deviate Fish
848// 8063 Deviate Fish
858
860{
861 bool Load() override
862 {
863 return GetCaster()->GetTypeId() == TYPEID_PLAYER;
864 }
865
870
871 void HandleDummy(SpellEffIndex /*effIndex*/)
872 {
873 Unit* caster = GetCaster();
875 caster->CastSpell(caster, spellId, true);
876 }
877
882};
883
885{
886public:
887 PartyTimeEmoteEvent(Player* player) : _player(player) { }
888
889 bool Execute(uint64 /*time*/, uint32 /*diff*/) override
890 {
892 return true;
893
894 if (_player->isMoving())
896 else
898
899 _player->m_Events.AddEventAtOffset(this, RAND(5s, 10s, 15s));
900
901 return false; // do not delete re-added event in EventProcessor::Update
902 }
903
904private:
906};
907
909{
910 void HandleEffectApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
911 {
912 Player* player = GetOwner()->ToPlayer();
913 if (!player)
914 return;
915
916 player->m_Events.AddEventAtOffset(new PartyTimeEmoteEvent(player), RAND(5s, 10s, 15s));
917 }
918
923};
924
936
937// 51010 - Dire Brew
939{
940 void AfterApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
941 {
942 Unit* target = GetTarget();
943
944 uint32 model = 0;
945 uint8 gender = target->GetGender();
946 ChrClassesEntry const* chrClass = sChrClassesStore.AssertEntry(target->GetClass());
947 if (chrClass->ArmorTypeMask & (1 << ITEM_SUBCLASS_ARMOR_PLATE))
949 else if (chrClass->ArmorTypeMask & (1 << ITEM_SUBCLASS_ARMOR_MAIL))
951 else if (chrClass->ArmorTypeMask & (1 << ITEM_SUBCLASS_ARMOR_LEATHER))
953 else if (chrClass->ArmorTypeMask & (1 << ITEM_SUBCLASS_ARMOR_CLOTH))
955
956 if (model)
957 target->SetDisplayId(model);
958 }
959
964};
965
970
971// 59915 - Discerning Eye of the Beast Dummy
973{
974 bool Validate(SpellInfo const* /*spellInfo*/) override
975 {
977 }
978
979 void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
980 {
982 eventInfo.GetActor()->CastSpell(nullptr, SPELL_DISCERNING_EYE_BEAST, aurEff);
983 }
984
989};
990
991// 71610, 71641 - Echoes of Light (Althor's Abacus)
993{
994 void FilterTargets(std::list<WorldObject*>& targets)
995 {
996 if (targets.size() < 2)
997 return;
998
1000
1001 WorldObject* target = targets.front();
1002 targets.clear();
1003 targets.push_back(target);
1004 }
1005
1010};
1011
1012// 30427 - Extract Gas (23821: Zapthrottle Mote Extractor)
1014{
1015 void PeriodicTick(AuraEffect const* /*aurEff*/)
1016 {
1018
1019 // move loot to player inventory and despawn target
1020 if (GetCaster() && GetCaster()->GetTypeId() == TYPEID_PLAYER &&
1021 GetTarget()->GetTypeId() == TYPEID_UNIT &&
1022 GetTarget()->ToCreature()->GetCreatureTemplate()->type == CREATURE_TYPE_GAS_CLOUD)
1023 {
1024 Player* player = GetCaster()->ToPlayer();
1025 Creature* creature = GetTarget()->ToCreature();
1026 CreatureDifficulty const* creatureDifficulty = creature->GetCreatureDifficulty();
1027 // missing lootid has been reported on startup - just return
1028 if (!creatureDifficulty->SkinLootID)
1029 return;
1030
1031 player->AutoStoreLoot(creatureDifficulty->SkinLootID, LootTemplates_Skinning, ItemContext::NONE, true);
1032 creature->DespawnOrUnsummon();
1033 }
1034 }
1035
1040};
1041
1042// 7434 - Fate Rune of Unsurpassed Vigor
1047
1049{
1050 bool Validate(SpellInfo const* /*spellInfo*/) override
1051 {
1053 }
1054
1055 void HandleProc(AuraEffect* /*aurEff*/, ProcEventInfo& /*eventInfo*/)
1056 {
1059 }
1060
1065};
1066
1075
1076/* 57301 - Great Feast
1077 57426 - Fish Feast
1078 58465 - Gigantic Feast
1079 58474 - Small Feast
1080 66476 - Bountiful Feast */
1082{
1083public:
1085
1086private:
1087 bool Validate(SpellInfo const* /*spellInfo*/) override
1088 {
1089 return sBroadcastTextStore.LookupEntry(_text);
1090 }
1091
1092 void HandleScript(SpellEffIndex /*effIndex*/)
1093 {
1094 Unit* caster = GetCaster();
1095 caster->Unit::TextEmote(_text, caster, false);
1096 }
1097
1102
1104};
1105
1106// http://www.wowhead.com/item=47499 Flask of the North
1107// 67019 Flask of the North
1114
1116{
1121
1122 void HandleDummy(SpellEffIndex /*effIndex*/)
1123 {
1124 Unit* caster = GetCaster();
1125 std::vector<uint32> possibleSpells;
1126 switch (caster->GetClass())
1127 {
1128 case CLASS_WARLOCK:
1129 case CLASS_MAGE:
1130 case CLASS_PRIEST:
1131 possibleSpells.push_back(SPELL_FLASK_OF_THE_NORTH_SP);
1132 break;
1133 case CLASS_DEATH_KNIGHT:
1134 case CLASS_WARRIOR:
1135 possibleSpells.push_back(SPELL_FLASK_OF_THE_NORTH_STR);
1136 break;
1137 case CLASS_ROGUE:
1138 case CLASS_HUNTER:
1139 possibleSpells.push_back(SPELL_FLASK_OF_THE_NORTH_AP);
1140 break;
1141 case CLASS_DRUID:
1142 case CLASS_PALADIN:
1143 possibleSpells.push_back(SPELL_FLASK_OF_THE_NORTH_SP);
1144 possibleSpells.push_back(SPELL_FLASK_OF_THE_NORTH_STR);
1145 break;
1146 case CLASS_SHAMAN:
1147 possibleSpells.push_back(SPELL_FLASK_OF_THE_NORTH_SP);
1148 possibleSpells.push_back(SPELL_FLASK_OF_THE_NORTH_AP);
1149 break;
1150 }
1151
1152 if (possibleSpells.empty())
1153 {
1154 TC_LOG_WARN("spells", "Missing spells for class {} in script spell_item_flask_of_the_north", caster->GetClass());
1155 return;
1156 }
1157
1158 caster->CastSpell(caster, Trinity::Containers::SelectRandomContainerElement(possibleSpells), true);
1159 }
1160
1165};
1166
1168{
1169 SPELL_SHADOWMEND = 39373
1171
1172// 39372 - Frozen Shadoweave
1173// Frozen Shadoweave set 3p bonus
1175{
1176 bool Validate(SpellInfo const* /*spellInfo*/) override
1177 {
1179 }
1180
1181 void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
1182 {
1184 DamageInfo* damageInfo = eventInfo.GetDamageInfo();
1185 if (!damageInfo || !damageInfo->GetDamage())
1186 return;
1187
1188 Unit* caster = eventInfo.GetActor();
1189 CastSpellExtraArgs args(aurEff);
1190 args.AddSpellBP0(CalculatePct(damageInfo->GetDamage(), aurEff->GetAmount()));
1191 caster->CastSpell(nullptr, SPELL_SHADOWMEND, args);
1192 }
1193
1198};
1199
1200// http://www.wowhead.com/item=10645 Gnomish Death Ray
1201// 13280 Gnomish Death Ray
1207
1209{
1210 bool Validate(SpellInfo const* /*spellInfo*/) override
1211 {
1213 }
1214
1215 void HandleDummy(SpellEffIndex /*effIndex*/)
1216 {
1217 Unit* caster = GetCaster();
1218 if (Unit* target = GetHitUnit())
1219 {
1220 if (urand(0, 99) < 15)
1221 caster->CastSpell(caster, SPELL_GNOMISH_DEATH_RAY_SELF, true); // failure
1222 else
1223 caster->CastSpell(target, SPELL_GNOMISH_DEATH_RAY_TARGET, true);
1224 }
1225 }
1226
1231};
1232
1233// Item 10721: Gnomish Harm Prevention Belt
1234// 13234 - Harm Prevention Belt
1239
1241{
1242 bool Validate(SpellInfo const* /*spellInfo*/) override
1243 {
1245 }
1246
1247 void HandleProc(ProcEventInfo& /*eventInfo*/)
1248 {
1250 }
1251
1256};
1257
1270
1271// Item - 49982: Heartpierce
1272// 71880 - Item - Icecrown 25 Normal Dagger Proc
1273
1274// Item - 50641: Heartpierce (Heroic)
1275// 71892 - Item - Icecrown 25 Heroic Dagger Proc
1276template <uint32 Energy, uint32 Mana, uint32 Rage, uint32 RunicPower>
1278{
1279 bool Validate(SpellInfo const* /*spellInfo*/) override
1280 {
1281 return ValidateSpellInfo(
1282 {
1283 Energy,
1284 Mana,
1285 Rage,
1286 RunicPower
1287 });
1288 }
1289
1290 void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
1291 {
1293 Unit* caster = eventInfo.GetActor();
1294
1295 uint32 spellId;
1296 switch (caster->GetPowerType())
1297 {
1298 case POWER_MANA:
1299 spellId = Mana;
1300 break;
1301 case POWER_ENERGY:
1302 spellId = Energy;
1303 break;
1304 case POWER_RAGE:
1305 spellId = Rage;
1306 break;
1307 // Death Knights can't use daggers, but oh well
1308 case POWER_RUNIC_POWER:
1309 spellId = RunicPower;
1310 break;
1311 default:
1312 return;
1313 }
1314
1315 caster->CastSpell(nullptr, spellId, aurEff);
1316 }
1317
1322};
1323
1328
1329// 23645 - Hourglass Sand
1331{
1332 bool Validate(SpellInfo const* /*spellInfo*/) override
1333 {
1335 }
1336
1341
1346};
1347
1348// 40971 - Bonus Healing (Crystal Spire of Karabor)
1350{
1351 bool Validate(SpellInfo const* spellInfo) override
1352 {
1353 return ValidateSpellEffect({ { spellInfo->Id, EFFECT_0 } });
1354 }
1355
1356 bool CheckProc(ProcEventInfo& eventInfo)
1357 {
1359 if (HealInfo* healInfo = eventInfo.GetHealInfo())
1360 if (Unit* healTarget = healInfo->GetTarget())
1361 if (healTarget->GetHealth() - healInfo->GetEffectiveHeal() <= healTarget->CountPctFromMaxHealth(pct))
1362 return true;
1363
1364 return false;
1365 }
1366
1371};
1372
1373// http://www.wowhead.com/item=27388 Mr. Pinchy
1374// 33060 Make a Wish
1383
1385{
1386 bool Load() override
1387 {
1388 return GetCaster()->GetTypeId() == TYPEID_PLAYER;
1389 }
1390
1391 bool Validate(SpellInfo const* /*spellInfo*/) override
1392 {
1393 return ValidateSpellInfo(
1394 {
1400 });
1401 }
1402
1403 void HandleDummy(SpellEffIndex /*effIndex*/)
1404 {
1405 Unit* caster = GetCaster();
1406 uint32 spellId = SPELL_MR_PINCHYS_GIFT;
1407 switch (urand(1, 5))
1408 {
1409 case 1: spellId = SPELL_MR_PINCHYS_BLESSING; break;
1410 case 2: spellId = SPELL_SUMMON_MIGHTY_MR_PINCHY; break;
1411 case 3: spellId = SPELL_SUMMON_FURIOUS_MR_PINCHY; break;
1412 case 4: spellId = SPELL_TINY_MAGICAL_CRAWDAD; break;
1413 }
1414 caster->CastSpell(caster, spellId, true);
1415 }
1416
1421};
1422
1427
1428// Item - 27920: Mark of Conquest
1429// Item - 27921: Mark of Conquest
1430// 33510 - Health Restore
1432{
1433 bool Validate(SpellInfo const* /*spellInfo*/) override
1434 {
1436 }
1437
1438 void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
1439 {
1441 {
1442 // in that case, do not cast heal spell
1444 // but mana instead
1445 eventInfo.GetActor()->CastSpell(nullptr, SPELL_MARK_OF_CONQUEST_ENERGIZE, aurEff);
1446 }
1447 }
1448
1453};
1454
1455// 26465 - Mercurial Shield
1460
1462{
1463 bool Validate(SpellInfo const* /*spellInfo*/) override
1464 {
1466 }
1467
1472
1477};
1478
1502
1510
1511// http://www.wowhead.com/item=32686 Mingo's Fortune Giblets
1512// 40802 Mingo's Fortune Generator
1530
1531// 71875, 71877 - Item - Black Bruise: Necrotic Touch Proc
1536
1538{
1539 bool Validate(SpellInfo const* /*spellInfo*/) override
1540 {
1542 }
1543
1544 bool CheckProc(ProcEventInfo& eventInfo)
1545 {
1546 return eventInfo.GetProcTarget() && eventInfo.GetProcTarget()->IsAlive();
1547 }
1548
1549 void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
1550 {
1552 DamageInfo* damageInfo = eventInfo.GetDamageInfo();
1553 if (!damageInfo || !damageInfo->GetDamage())
1554 return;
1555
1556 CastSpellExtraArgs args(aurEff);
1557 args.AddSpellBP0(CalculatePct(damageInfo->GetDamage(), aurEff->GetAmount()));
1559 }
1560
1566};
1567
1568// http://www.wowhead.com/item=10720 Gnomish Net-o-Matic Projector
1569// 13120 Net-o-Matic
1576
1578{
1579 bool Validate(SpellInfo const* /*spellInfo*/) override
1580 {
1581 return ValidateSpellInfo(
1582 {
1586 });
1587 }
1588
1589 void HandleDummy(SpellEffIndex /*effIndex*/)
1590 {
1591 if (Unit* target = GetHitUnit())
1592 {
1594 uint32 roll = urand(0, 99);
1595 if (roll < 2) // 2% for 30 sec self root (off-like chance unknown)
1597 else if (roll < 4) // 2% for 20 sec root, charge to target (off-like chance unknown)
1599
1600 GetCaster()->CastSpell(target, spellId, true);
1601 }
1602 }
1603
1608};
1609
1610// http://www.wowhead.com/item=8529 Noggenfogger Elixir
1611// 16589 Noggenfogger Elixir
1618
1620{
1621 bool Load() override
1622 {
1623 return GetCaster()->GetTypeId() == TYPEID_PLAYER;
1624 }
1625
1626 bool Validate(SpellInfo const* /*spellInfo*/) override
1627 {
1628 return ValidateSpellInfo(
1629 {
1633 });
1634 }
1635
1636 void HandleDummy(SpellEffIndex /*effIndex*/)
1637 {
1638 Unit* caster = GetCaster();
1640 switch (urand(1, 3))
1641 {
1642 case 1: spellId = SPELL_NOGGENFOGGER_ELIXIR_TRIGGERED1; break;
1643 case 2: spellId = SPELL_NOGGENFOGGER_ELIXIR_TRIGGERED2; break;
1644 }
1645
1646 caster->CastSpell(caster, spellId, true);
1647 }
1648
1653};
1654
1655// 29601 - Enlightenment (Pendant of the Violet Eye)
1657{
1658 bool CheckProc(ProcEventInfo& eventInfo)
1659 {
1660 if (Spell const* spell = eventInfo.GetProcSpell())
1661 if (spell->GetPowerTypeCostAmount(POWER_MANA) > 0)
1662 return true;
1663
1664 return false;
1665 }
1666
1671};
1672
1677
1678// 26467 - Persistent Shield
1680{
1681 bool Validate(SpellInfo const* /*spellInfo*/) override
1682 {
1684 }
1685
1686 bool CheckProc(ProcEventInfo& eventInfo)
1687 {
1688 return eventInfo.GetHealInfo() && eventInfo.GetHealInfo()->GetHeal();
1689 }
1690
1691 void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
1692 {
1693 Unit* caster = eventInfo.GetActor();
1694 Unit* target = eventInfo.GetProcTarget();
1695 SpellEffectValue bp0 = CalculatePct(eventInfo.GetHealInfo()->GetHeal(), 15);
1696
1697 // Scarab Brooch does not replace stronger shields
1698 if (AuraEffect const* shield = target->GetAuraEffect(SPELL_PERSISTENT_SHIELD_TRIGGERED, EFFECT_0, caster->GetGUID()))
1699 if (shield->GetAmount() > bp0)
1700 return;
1701
1702 CastSpellExtraArgs args(aurEff);
1703 args.AddSpellBP0(bp0);
1704 caster->CastSpell(target, SPELL_PERSISTENT_SHIELD_TRIGGERED, args);
1705 }
1706
1712};
1713
1715{
1716 SPELL_HEALTH_LINK = 37382
1718
1719// 37381 - Pet Healing
1720// Hunter T5 2P Bonus
1721// Warlock T5 2P Bonus
1723{
1724 bool Validate(SpellInfo const* /*spellInfo*/) override
1725 {
1727 }
1728
1729 void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
1730 {
1732 DamageInfo* damageInfo = eventInfo.GetDamageInfo();
1733 if (!damageInfo || !damageInfo->GetDamage())
1734 return;
1735
1736 CastSpellExtraArgs args(aurEff);
1737 args.AddSpellBP0(CalculatePct(damageInfo->GetDamage(), aurEff->GetAmount()));
1738 eventInfo.GetActor()->CastSpell(nullptr, SPELL_HEALTH_LINK, args);
1739 }
1740
1745};
1746
1747// 17512 - Piccolo of the Flaming Fire
1749{
1751 {
1752 PreventHitDefaultEffect(effIndex);
1753 if (Player* target = GetHitPlayer())
1754 target->HandleEmoteCommand(EMOTE_STATE_DANCE);
1755 }
1756
1761};
1762
1764{
1765 SPELL_LIMITLESS_POWER = 45044
1767
1768// 45043 - Power Circle (Shifting Naaru Sliver)
1770{
1771 bool Validate(SpellInfo const* /*spellInfo*/) override
1772 {
1774 }
1775
1776 bool CheckCaster(Unit* target)
1777 {
1778 return target->GetGUID() == GetCasterGUID();
1779 }
1780
1781 void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
1782 {
1783 GetTarget()->CastSpell(nullptr, SPELL_LIMITLESS_POWER, true);
1785 buff->SetDuration(GetDuration());
1786 }
1787
1788 void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
1789 {
1791 }
1792
1800};
1801
1802// http://www.wowhead.com/item=6657 Savory Deviate Delight
1803// 8213 Savory Deviate Delight
1811
1813{
1814 bool Load() override
1815 {
1816 return GetCaster()->GetTypeId() == TYPEID_PLAYER;
1817 }
1818
1819 bool Validate(SpellInfo const* /*spellInfo*/) override
1820 {
1821 return ValidateSpellInfo(
1822 {
1827 });
1828 }
1829
1830 void HandleDummy(SpellEffIndex /*effIndex*/)
1831 {
1832 Unit* caster = GetCaster();
1833 uint32 spellId = 0;
1834 switch (urand(1, 2))
1835 {
1836 // Flip Out - ninja
1837 case 1: spellId = (caster->GetNativeGender() == GENDER_MALE ? SPELL_FLIP_OUT_MALE : SPELL_FLIP_OUT_FEMALE); break;
1838 // Yaaarrrr - pirate
1839 case 2: spellId = (caster->GetNativeGender() == GENDER_MALE ? SPELL_YAAARRRR_MALE : SPELL_YAAARRRR_FEMALE); break;
1840 }
1841 caster->CastSpell(caster, spellId, true);
1842 }
1843
1848};
1849
1850// 48129 - Scroll of Recall
1851// 60320 - Scroll of Recall II
1852// 60321 - Scroll of Recall III
1862
1864{
1865 bool Load() override
1866 {
1867 return GetCaster()->GetTypeId() == TYPEID_PLAYER;
1868 }
1869
1871 {
1872 Unit* caster = GetCaster();
1873 uint8 maxSafeLevel = 0;
1874 switch (GetSpellInfo()->Id)
1875 {
1876 case SPELL_SCROLL_OF_RECALL_I: // Scroll of Recall
1877 maxSafeLevel = 40;
1878 break;
1879 case SPELL_SCROLL_OF_RECALL_II: // Scroll of Recall II
1880 maxSafeLevel = 70;
1881 break;
1882 case SPELL_SCROLL_OF_RECALL_III: // Scroll of Recal III
1883 maxSafeLevel = 80;
1884 break;
1885 default:
1886 break;
1887 }
1888
1889 if (caster->GetLevel() > maxSafeLevel)
1890 {
1891 caster->CastSpell(caster, SPELL_LOST, true);
1892
1893 // ALLIANCE from 60323 to 60330 - HORDE from 60328 to 60335
1895 if (GetCaster()->ToPlayer()->GetTeam() == HORDE)
1897
1898 GetCaster()->CastSpell(GetCaster(), spellId + urand(0, 7), true);
1899
1900 PreventHitDefaultEffect(effIndex);
1901 }
1902 }
1903
1908};
1909
1922
1923// 23442 - Dimensional Ripper - Everlook
1925{
1926 bool Validate(SpellInfo const* /*spellInfo*/) override
1927 {
1929 }
1930
1931 bool Load() override
1932 {
1933 return GetCaster()->GetTypeId() == TYPEID_PLAYER;
1934 }
1935
1936 void HandleScript(SpellEffIndex /* effIndex */)
1937 {
1938 int32 r = irand(0, 119);
1939 if (r <= 70) // 7/12 success
1940 return;
1941
1942 Unit* caster = GetCaster();
1943
1944 if (r < 100) // 4/12 evil twin
1945 caster->CastSpell(caster, SPELL_EVIL_TWIN, true);
1946 else // 1/12 fire
1947 caster->CastSpell(caster, SPELL_TRANSPORTER_MALFUNCTION_FIRE, true);
1948 }
1949
1954};
1955
1956// 36941 - Ultrasafe Transporter: Toshley's Station
1958{
1973
1974 bool Load() override
1975 {
1976 return GetCaster()->GetTypeId() == TYPEID_PLAYER;
1977 }
1978
1979 void HandleScript(SpellEffIndex /* effIndex */)
1980 {
1981 if (!roll_chance(50)) // 50% success
1982 return;
1983
1984 Unit* caster = GetCaster();
1985
1986 uint32 spellId = 0;
1987 switch (urand(0, 6))
1988 {
1989 case 0:
1991 break;
1992 case 1:
1994 break;
1995 case 2:
1996 spellId = SPELL_SOUL_SPLIT_EVIL;
1997 break;
1998 case 3:
1999 spellId = SPELL_SOUL_SPLIT_GOOD;
2000 break;
2001 case 4:
2002 if (caster->ToPlayer()->GetTeamId() == TEAM_ALLIANCE)
2003 spellId = SPELL_TRANSFORM_HORDE;
2004 else
2005 spellId = SPELL_TRANSFORM_ALLIANCE;
2006 break;
2007 case 5:
2009 break;
2010 case 6:
2011 spellId = SPELL_EVIL_TWIN;
2012 break;
2013 default:
2014 break;
2015 }
2016
2017 caster->CastSpell(caster, spellId, true);
2018 }
2019
2024};
2025
2026// 36890 - Dimensional Ripper - Area 52
2028{
2029 bool Validate(SpellInfo const* /*spellInfo*/) override
2030 {
2031 return ValidateSpellInfo(
2032 {
2038 });
2039 }
2040
2041 bool Load() override
2042 {
2043 return GetCaster()->GetTypeId() == TYPEID_PLAYER;
2044 }
2045
2046 void HandleScript(SpellEffIndex /* effIndex */)
2047 {
2048 if (!roll_chance(50)) // 50% success
2049 return;
2050
2051 Unit* caster = GetCaster();
2052
2053 uint32 spellId = 0;
2054 switch (urand(0, 3))
2055 {
2056 case 0:
2058 break;
2059 case 1:
2060 spellId = SPELL_SOUL_SPLIT_EVIL;
2061 break;
2062 case 2:
2063 spellId = SPELL_SOUL_SPLIT_GOOD;
2064 break;
2065 case 3:
2066 if (caster->ToPlayer()->GetTeamId() == TEAM_ALLIANCE)
2067 spellId = SPELL_TRANSFORM_HORDE;
2068 else
2069 spellId = SPELL_TRANSFORM_ALLIANCE;
2070 break;
2071 default:
2072 break;
2073 }
2074
2075 caster->CastSpell(caster, spellId, true);
2076 }
2077
2082};
2083
2084// 71169 - Shadow's Fate (Shadowmourne questline)
2086{
2088 NPC_SINDRAGOSA = 36853
2090
2092{
2093 bool CheckProc(ProcEventInfo& procInfo)
2094 {
2095 Unit* caster = procInfo.GetActor();
2096 if (!caster || caster->GetTypeId() != TYPEID_PLAYER)
2097 return false;
2098
2099 Unit* target = procInfo.GetActionTarget();
2100 if (!target || target->GetTypeId() != TYPEID_UNIT || target->IsCritter() || (target->GetEntry() != NPC_SINDRAGOSA && target->IsSummon()))
2101 return false;
2102
2103 return true;
2104 }
2105
2110};
2111
2113{
2115 {
2117
2118 Unit* caster = procInfo.GetActor();
2119 Unit* target = GetCaster();
2120 if (!caster || !target)
2121 return;
2122
2124 }
2125
2126 void Register() override
2127 {
2129 }
2130};
2131
2140
2141// 71903 - Item - Shadowmourne Legendary
2143{
2144 bool Validate(SpellInfo const* /*spellInfo*/) override
2145 {
2146 return ValidateSpellInfo(
2147 {
2151 });
2152 }
2153
2154 bool CheckProc(ProcEventInfo& eventInfo)
2155 {
2156 if (GetTarget()->HasAura(SPELL_SHADOWMOURNE_CHAOS_BANE_BUFF)) // cant collect shards while under effect of Chaos Bane buff
2157 return false;
2158 return eventInfo.GetProcTarget() && eventInfo.GetProcTarget()->IsAlive();
2159 }
2160
2161 void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
2162 {
2165
2166 // this can't be handled in AuraScript of SoulFragments because we need to know victim
2167 if (Aura* soulFragments = GetTarget()->GetAura(SPELL_SHADOWMOURNE_SOUL_FRAGMENT))
2168 {
2169 if (soulFragments->GetStackAmount() >= 10)
2170 {
2172 soulFragments->Remove();
2173 }
2174 }
2175 }
2176
2181
2188};
2189
2190// 71905 - Soul Fragment
2192{
2193 bool Validate(SpellInfo const* /*spellInfo*/) override
2194 {
2195 return ValidateSpellInfo(
2196 {
2200 });
2201 }
2202
2203 void OnStackChange(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
2204 {
2205 Unit* target = GetTarget();
2206 switch (GetStackAmount())
2207 {
2208 case 1:
2209 target->CastSpell(target, SPELL_SHADOWMOURNE_VISUAL_LOW, true);
2210 break;
2211 case 6:
2213 target->CastSpell(target, SPELL_SHADOWMOURNE_VISUAL_HIGH, true);
2214 break;
2215 case 10:
2217 target->CastSpell(target, SPELL_SHADOWMOURNE_CHAOS_BANE_BUFF, true);
2218 break;
2219 default:
2220 break;
2221 }
2222 }
2223
2224 void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
2225 {
2226 Unit* target = GetTarget();
2229 }
2230
2236};
2237
2238// http://www.wowhead.com/item=7734 Six Demon Bag
2239// 14537 Six Demon Bag
2249
2251{
2252 bool Validate(SpellInfo const* /*spellInfo*/) override
2253 {
2254 return ValidateSpellInfo(
2255 {
2262 });
2263 }
2264
2265 void HandleDummy(SpellEffIndex /*effIndex*/)
2266 {
2267 Unit* caster = GetCaster();
2268 if (Unit* target = GetHitUnit())
2269 {
2270 uint32 spellId = 0;
2271 uint32 rand = urand(0, 99);
2272 if (rand < 25) // Fireball (25% chance)
2273 spellId = SPELL_FIREBALL;
2274 else if (rand < 50) // Frostball (25% chance)
2275 spellId = SPELL_FROSTBOLT;
2276 else if (rand < 70) // Chain Lighting (20% chance)
2277 spellId = SPELL_CHAIN_LIGHTNING;
2278 else if (rand < 80) // Polymorph (10% chance)
2279 {
2280 spellId = SPELL_POLYMORPH;
2281 if (urand(0, 100) <= 30) // 30% chance to self-cast
2282 target = caster;
2283 }
2284 else if (rand < 95) // Enveloping Winds (15% chance)
2285 spellId = SPELL_ENVELOPING_WINDS;
2286 else // Summon Felhund minion (5% chance)
2287 {
2289 target = caster;
2290 }
2291
2292 caster->CastSpell(target, spellId, GetCastItem());
2293 }
2294 }
2295
2300};
2301
2306
2307// 59906 - Swift Hand of Justice Dummy
2309{
2310 bool Validate(SpellInfo const* /*spellInfo*/) override
2311 {
2313 }
2314
2315 void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
2316 {
2318
2319 Unit* caster = eventInfo.GetActor();
2320 CastSpellExtraArgs args(aurEff);
2321 args.AddSpellBP0(caster->CountPctFromMaxHealth(aurEff->GetAmount()));
2322 caster->CastSpell(nullptr, SPELL_SWIFT_HAND_OF_JUSTICE_HEAL, args);
2323 }
2324
2329};
2330
2331// 28862 - The Eye of Diminution
2333{
2334 void CalculateAmount(AuraEffect const* /*aurEff*/, SpellEffectValue& amount, bool& /*canBeRecalculated*/)
2335 {
2336 int32 diff = GetUnitOwner()->GetLevel() - 60;
2337 if (diff > 0)
2338 amount += diff;
2339 }
2340
2345};
2346
2347// http://www.wowhead.com/item=44012 Underbelly Elixir
2348// 59640 Underbelly Elixir
2355
2357{
2358 bool Load() override
2359 {
2360 return GetCaster()->GetTypeId() == TYPEID_PLAYER;
2361 }
2362 bool Validate(SpellInfo const* /*spellInfo*/) override
2363 {
2364 return ValidateSpellInfo(
2365 {
2369 });
2370 }
2371
2372 void HandleDummy(SpellEffIndex /*effIndex*/)
2373 {
2374 Unit* caster = GetCaster();
2376 switch (urand(1, 3))
2377 {
2378 case 1: spellId = SPELL_UNDERBELLY_ELIXIR_TRIGGERED1; break;
2379 case 2: spellId = SPELL_UNDERBELLY_ELIXIR_TRIGGERED2; break;
2380 }
2381 caster->CastSpell(caster, spellId, true);
2382 }
2383
2388};
2389
2402
2415
2416// 126755 - Wormhole: Pandaria
2418{
2419 bool Validate(SpellInfo const* /*spellInfo*/) override
2420 {
2422 }
2423
2430
2435};
2436
2437// 47776 - Roll 'dem Bones
2439{
2440 enum
2441 {
2442 TEXT_WORN_TROLL_DICE = 26152
2444
2445 bool Validate(SpellInfo const* /*spellInfo*/) override
2446 {
2447 if (!sBroadcastTextStore.LookupEntry(TEXT_WORN_TROLL_DICE))
2448 return false;
2449 return true;
2450 }
2451
2452 bool Load() override
2453 {
2454 return GetCaster()->GetTypeId() == TYPEID_PLAYER;
2455 }
2456
2457 void HandleScript(SpellEffIndex /*effIndex*/)
2458 {
2460
2461 static uint32 const minimum = 1;
2462 static uint32 const maximum = 6;
2463
2464 // roll twice
2465 GetCaster()->ToPlayer()->DoRandomRoll(minimum, maximum);
2466 GetCaster()->ToPlayer()->DoRandomRoll(minimum, maximum);
2467 }
2468
2473};
2474
2481
2483{
2484 bool Validate(SpellInfo const* /*spell*/) override
2485 {
2486 return ValidateSpellInfo(
2487 {
2491 });
2492 }
2493
2495 {
2496 PreventHitDefaultEffect(effIndex);
2497 Unit* caster = GetCaster();
2498 if (Unit* target = GetHitUnit())
2499 {
2500 caster->CastSpell(caster, SPELL_AIR_RIFLE_HOLD_VISUAL, true);
2501 // needed because this spell shares GCD with its triggered spells (which must not be cast with triggered flag)
2502 if (Player* player = caster->ToPlayer())
2503 player->GetSpellHistory()->CancelGlobalCooldown(GetSpellInfo());
2504 if (urand(0, 4))
2505 caster->CastSpell(target, SPELL_AIR_RIFLE_SHOOT, false);
2506 else
2507 caster->CastSpell(caster, SPELL_AIR_RIFLE_SHOOT_SELF, false);
2508 }
2509 }
2510
2515};
2516
2518{
2519 bool Load() override
2520 {
2521 return GetCaster()->GetTypeId() == TYPEID_PLAYER;
2522 }
2523
2534
2535 void HandleScript(SpellEffIndex /*effIndex*/)
2536 {
2537 Player* caster = GetCaster()->ToPlayer();
2538 uint32 spellId = GetSpellInfo()->Id;
2539
2540 // learn random explicit discovery recipe (if any)
2541 if (uint32 discoveredSpellId = GetExplicitDiscoverySpell(spellId, caster))
2542 caster->LearnSpell(discoveredSpellId, false);
2543 }
2544
2550};
2551
2553{
2554 NPC_GHOUL = 28845,
2556};
2557
2559{
2561 {
2562 std::list<TempSummon*> ghouls;
2564 if (ghouls.size() >= MAX_GHOULS)
2565 {
2568 }
2569
2570 return SPELL_CAST_OK;
2571 }
2572
2577};
2578
2585
2605
2612
2614{
2615 bool Validate(SpellInfo const* /*spellInfo*/) override
2616 {
2617 return ValidateSpellInfo(
2618 {
2622 });
2623 }
2624
2625 void HandleDummy(SpellEffIndex /*effIndex*/)
2626 {
2628 Unit* caster = GetCaster();
2629 caster->CastSpell(caster, spellId, true);
2630 }
2631
2636};
2637
2639{
2640 SOUND_ASHBRINGER_1 = 8906, // "I was pure once"
2641 SOUND_ASHBRINGER_2 = 8907, // "Fought for righteousness"
2642 SOUND_ASHBRINGER_3 = 8908, // "I was once called Ashbringer"
2643 SOUND_ASHBRINGER_4 = 8920, // "Betrayed by my order"
2644 SOUND_ASHBRINGER_5 = 8921, // "Destroyed by Kel'Thuzad"
2645 SOUND_ASHBRINGER_6 = 8922, // "Made to serve"
2646 SOUND_ASHBRINGER_7 = 8923, // "My son watched me die"
2647 SOUND_ASHBRINGER_8 = 8924, // "Crusades fed his rage"
2648 SOUND_ASHBRINGER_9 = 8925, // "Truth is unknown to him"
2649 SOUND_ASHBRINGER_10 = 8926, // "Scarlet Crusade is pure no longer"
2650 SOUND_ASHBRINGER_11 = 8927, // "Balnazzar's crusade corrupted my son"
2651 SOUND_ASHBRINGER_12 = 8928, // "Kill them all!"
2652};
2653
2655{
2656 bool Load() override
2657 {
2658 return GetCaster()->GetTypeId() == TYPEID_PLAYER;
2659 }
2660
2662 {
2663 PreventHitDefaultEffect(effIndex);
2664
2665 Player* player = GetCaster()->ToPlayer();
2668
2669 // Ashbringers effect (spellID 28441) retriggers every 5 seconds, with a chance of making it say one of the above 12 sounds
2670 if (urand(0, 60) < 1)
2671 player->PlayDirectSound(sound_id, player);
2672 }
2673
2678};
2679
2689
2690// 58886 - Food
2692{
2693 void HandleTriggerSpell(AuraEffect const* /*aurEff*/)
2694 {
2696 Unit* target = GetTarget();
2697 switch (urand(0, 5))
2698 {
2699 case 0:
2700 target->CastSpell(target, SPELL_WILD_MAGIC, true);
2701 break;
2702 case 1:
2703 target->CastSpell(target, SPELL_WELL_FED_1, true);
2704 break;
2705 case 2:
2706 target->CastSpell(target, SPELL_WELL_FED_2, true);
2707 break;
2708 case 3:
2709 target->CastSpell(target, SPELL_WELL_FED_3, true);
2710 break;
2711 case 4:
2712 target->CastSpell(target, SPELL_WELL_FED_4, true);
2713 break;
2714 case 5:
2715 target->CastSpell(target, SPELL_WELL_FED_5, true);
2716 break;
2717 }
2718 }
2719
2724};
2725
2731
2733{
2734 bool Load() override
2735 {
2736 return GetCaster()->GetTypeId() == TYPEID_PLAYER;
2737 }
2738
2739 bool Validate(SpellInfo const* /*spell*/) override
2740 {
2741 return ValidateSpellInfo(
2742 {
2745 });
2746 }
2747
2748 void HandleDummy(SpellEffIndex /* effIndex */)
2749 {
2750 Unit* caster = GetCaster();
2752 }
2753
2758};
2759
2765
2767{
2768 bool Validate(SpellInfo const* /*spell*/) override
2769 {
2771 }
2772
2773 void HandleDummy(SpellEffIndex /* effIndex */)
2774 {
2775 Unit* caster = GetCaster();
2776 if (Item* castItem = GetCastItem())
2777 {
2778 if (roll_chance(86)) // Nigh-Invulnerability - success
2779 caster->CastSpell(caster, SPELL_NIGH_INVULNERABILITY, castItem);
2780 else // Complete Vulnerability - backfire in 14% casts
2781 caster->CastSpell(caster, SPELL_COMPLETE_VULNERABILITY, castItem);
2782 }
2783 }
2784
2789};
2790
2796
2815
2821
2823{
2824 bool Load() override
2825 {
2826 return (GetCaster()->GetAreaId() == 3900 || GetCaster()->GetAreaId() == 3742);
2827 }
2828 bool Validate(SpellInfo const* /*spell*/) override
2829 {
2831 }
2832
2833 void HandleDummy(SpellEffIndex /* effIndex */)
2834 {
2835 Unit* caster = GetCaster();
2836 switch (caster->GetAreaId())
2837 {
2838 case 3900:
2839 caster->CastSpell(caster, SPELL_SOCRETHAR_TO_SEAT, true);
2840 break;
2841 case 3742:
2842 caster->CastSpell(caster, SPELL_SOCRETHAR_FROM_SEAT, true);
2843 break;
2844 default:
2845 return;
2846 }
2847 }
2848
2853};
2854
2861
2863{
2864 bool Validate(SpellInfo const* /*spell*/) override
2865 {
2867 sObjectMgr->GetCreatureTemplate(NPC_ABYSSAL_FLAMEBRINGER) &&
2868 sObjectMgr->GetQuestTemplate(QUEST_SUPER_HOT_STEW);
2869 }
2870
2871 bool Load() override
2872 {
2873 return GetCaster()->GetTypeId() == TYPEID_PLAYER;
2874 }
2875
2876 void HandleDummy(SpellEffIndex /* effIndex */)
2877 {
2878 Unit* player = GetCaster();
2879 player->CastSpell(player, SPELL_CREATE_DEMON_BROILED_SURPRISE, false);
2880 }
2881
2883 {
2884 Player* player = GetCaster()->ToPlayer();
2887
2888 if (Creature* creature = player->FindNearestCreature(NPC_ABYSSAL_FLAMEBRINGER, 10, false))
2889 if (creature->isDead())
2890 return SPELL_CAST_OK;
2891 return SPELL_FAILED_NOT_HERE;
2892 }
2893
2899};
2900
2905
2907{
2908 bool Validate(SpellInfo const* /*spell*/) override
2909 {
2911 }
2912
2913 void HandleDummy(SpellEffIndex /* effIndex */)
2914 {
2915 Unit* caster = GetCaster();
2916 if (GetHitCreature())
2917 {
2919
2920 //cast spell Raptor Capture Credit
2921 caster->CastSpell(caster, SPELL_RAPTOR_CAPTURE_CREDIT, true);
2922 }
2923 }
2924
2929};
2930
2936
2938{
2939 bool Validate(SpellInfo const* /*spell*/) override
2940 {
2941 if (!sObjectMgr->GetCreatureTemplate(NPC_LEVIROTH))
2942 return false;
2943 return true;
2944 }
2945
2946 void HandleDummy(SpellEffIndex /*effIndex*/)
2947 {
2948 if (Creature* target = GetHitCreature())
2949 if (target->GetEntry() == NPC_LEVIROTH && !target->HealthBelowPct(95))
2950 {
2951 target->CastSpell(target, SPELL_LEVIROTH_SELF_IMPALE, true);
2952 target->ResetPlayerDamageReq();
2953 }
2954 }
2955
2960};
2961
2967
2968// 23725 - Gift of Life
2970{
2971 bool Validate(SpellInfo const* /*spellInfo*/) override
2972 {
2974 }
2975
2976 void HandleDummy(SpellEffIndex /*effIndex*/)
2977 {
2978 Unit* caster = GetCaster();
2979 caster->CastSpell(caster, SPELL_GIFT_OF_LIFE_1, true);
2980 caster->CastSpell(caster, SPELL_GIFT_OF_LIFE_2, true);
2981 }
2982
2987};
2988
2995
2997{
2998 bool Load() override
2999 {
3000 if (!GetCastItem())
3001 return false;
3002 return true;
3003 }
3004
3005 bool Validate(SpellInfo const* /*spell*/) override
3006 {
3008 }
3009
3010 void HandleDummy(SpellEffIndex /* effIndex */)
3011 {
3012 Unit* caster = GetCaster();
3013 bool success = true;
3014 if (!caster->GetMap()->IsDungeon())
3015 success = roll_chance(95); // nitro boosts can only fail in flying-enabled locations on 3.3.5
3017 }
3018
3023};
3024
3026{
3027 bool Validate(SpellInfo const* /*spell*/) override
3028 {
3030 }
3031
3032 void HandleApply(AuraEffect const* /*effect*/, AuraEffectHandleModes /*mode*/)
3033 {
3035 }
3036
3038 {
3040 float curZ = GetTarget()->GetPositionZ();
3041 if (curZ < lastZ)
3042 {
3043 if (roll_chance(80)) // we don't have enough sniffs to verify this, guesstimate
3045 GetAura()->Remove();
3046 }
3047 else
3048 lastZ = curZ;
3049 }
3050
3056
3058};
3059
3064
3066{
3067 bool Load() override
3068 {
3069 return GetCaster()->GetTypeId() == TYPEID_PLAYER;
3070 }
3071
3072 bool Validate(SpellInfo const* /*spell*/) override
3073 {
3075 }
3076
3077 void HandleDummy(SpellEffIndex /* effIndex */)
3078 {
3079 Player* caster = GetCaster()->ToPlayer();
3081 caster->CastSpell(caster, SPELL_ROCKET_BOOTS_PROC, true);
3082 }
3083
3085 {
3086 if (GetCaster()->IsInWater())
3088 return SPELL_CAST_OK;
3089 }
3090
3096};
3097
3098// 67489 - Runic Healing Injector
3100{
3101 bool Load() override
3102 {
3103 return GetCaster()->GetTypeId() == TYPEID_PLAYER;
3104 }
3105
3106 void HandleHeal(SpellEffIndex /*effIndex*/)
3107 {
3108 if (Player* caster = GetCaster()->ToPlayer())
3109 if (caster->HasSkill(SKILL_ENGINEERING))
3110 SetHitHeal(GetHitHeal() * 1.25f);
3111 }
3112
3117};
3118
3124
3126{
3127 bool Validate(SpellInfo const* /*spell*/) override
3128 {
3130 }
3131
3132 void HandleDummy(SpellEffIndex /* effIndex */)
3133 {
3134 Unit* caster = GetCaster();
3135 if (Aura* aura = caster->GetAura(SPELL_PYGMY_OIL_PYGMY_AURA))
3136 aura->RefreshDuration();
3137 else
3138 {
3139 aura = caster->GetAura(SPELL_PYGMY_OIL_SMALLER_AURA);
3140 if (!aura || aura->GetStackAmount() < 5 || !roll_chance(50))
3141 caster->CastSpell(caster, SPELL_PYGMY_OIL_SMALLER_AURA, true);
3142 else
3143 {
3144 aura->Remove();
3145 caster->CastSpell(caster, SPELL_PYGMY_OIL_PYGMY_AURA, true);
3146 }
3147 }
3148 }
3149
3154};
3155
3157{
3158 void HandleDummy(SpellEffIndex /* effIndex */)
3159 {
3160 Unit* caster = GetCaster();
3161 caster->SetFacingTo(frand(0.0f, 2.0f * float(M_PI)));
3162 }
3163
3168};
3169
3177
3179{
3180 bool Load() override
3181 {
3182 return GetCaster()->GetTypeId() == TYPEID_PLAYER;
3183 }
3184
3185 bool Validate(SpellInfo const* /*spell*/) override
3186 {
3188 sObjectMgr->GetQuestTemplate(QUEST_CHICKEN_PARTY) &&
3189 sObjectMgr->GetQuestTemplate(QUEST_FLOWN_THE_COOP);
3190 }
3191
3192 void HandleDummy(SpellEffIndex /* effIndex */)
3193 {
3194 Player* caster = GetCaster()->ToPlayer();
3195 if (Unit* target = GetHitUnit())
3196 {
3198 {
3199 caster->CastSpell(caster, SPELL_CAPTURE_CHICKEN_ESCAPE, true);
3200 target->KillSelf();
3201 }
3202 }
3203 }
3204
3209};
3210
3212{
3213 void HandleDummy(SpellEffIndex /*effIndex*/)
3214 {
3215 if (Creature* target = GetHitCreature())
3216 if (target->isDead())
3217 target->DespawnOrUnsummon();
3218 }
3219
3224};
3225
3243
3252
3253// Item - 49310: Purified Shard of the Scale
3254// 69755 - Purified Shard of the Scale - Equip Effect
3255
3256// Item - 49488: Shiny Shard of the Scale
3257// 69739 - Shiny Shard of the Scale - Equip Effect
3258template <uint32 HealProcSpellId, uint32 DamageProcSpellId>
3260{
3261 public:
3262 spell_item_shard_of_the_scale(char const* ScriptName) : SpellScriptLoader(ScriptName) { }
3263
3264 template <uint32 HealProc, uint32 DamageProc>
3266 {
3267 bool Validate(SpellInfo const* /*spellInfo*/) override
3268 {
3269 return ValidateSpellInfo(
3270 {
3271 HealProc,
3272 DamageProc
3273 });
3274 }
3275
3276 void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
3277 {
3279 Unit* caster = eventInfo.GetActor();
3280 Unit* target = eventInfo.GetProcTarget();
3281
3282 if (eventInfo.GetTypeMask() & PROC_FLAG_DEAL_HELPFUL_SPELL)
3283 caster->CastSpell(target, HealProc, aurEff);
3284
3285 if (eventInfo.GetTypeMask() & PROC_FLAG_DEAL_HARMFUL_SPELL)
3286 caster->CastSpell(target, DamageProc, aurEff);
3287 }
3288
3293 };
3294
3299};
3300
3308
3310{
3311 bool Validate(SpellInfo const* /*spellInfo*/) override
3312 {
3313 return ValidateSpellInfo(
3314 {
3319 });
3320 }
3321
3322 void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
3323 {
3325
3326 Unit* caster = eventInfo.GetActor();
3327
3328 switch (caster->GetClass())
3329 {
3330 case CLASS_DRUID:
3331 caster->CastSpell(caster, SPELL_SOUL_PRESERVER_DRUID, aurEff);
3332 break;
3333 case CLASS_PALADIN:
3334 caster->CastSpell(caster, SPELL_SOUL_PRESERVER_PALADIN, aurEff);
3335 break;
3336 case CLASS_PRIEST:
3337 caster->CastSpell(caster, SPELL_SOUL_PRESERVER_PRIEST, aurEff);
3338 break;
3339 case CLASS_SHAMAN:
3340 caster->CastSpell(caster, SPELL_SOUL_PRESERVER_SHAMAN, aurEff);
3341 break;
3342 default:
3343 break;
3344 }
3345 }
3346
3351};
3352
3354{
3355 SPELL_LIGHTS_WRATH = 45479, // Light's Wrath if Exalted by Aldor
3356 SPELL_ARCANE_BOLT = 45429, // Arcane Bolt if Exalted by Scryers
3357
3358 SPELL_LIGHTS_STRENGTH = 45480, // Light's Strength if Exalted by Aldor
3359 SPELL_ARCANE_STRIKE = 45428, // Arcane Strike if Exalted by Scryers
3360
3361 SPELL_LIGHTS_WARD = 45432, // Light's Ward if Exalted by Aldor
3362 SPELL_ARCANE_INSIGHT = 45431, // Arcane Insight if Exalted by Scryers
3363
3364 SPELL_LIGHTS_SALVATION = 45478, // Light's Salvation if Exalted by Aldor
3365 SPELL_ARCANE_SURGE = 45430, // Arcane Surge if Exalted by Scryers
3366
3368 FACTION_SCRYERS = 934
3370
3371// Item - 34678: Shattered Sun Pendant of Acumen
3372// 45481 - Sunwell Exalted Caster Neck
3373
3374// Item - 34679: Shattered Sun Pendant of Might
3375// 45482 - Sunwell Exalted Melee Neck
3376
3377// Item - 34680: Shattered Sun Pendant of Resolve
3378// 45483 - Sunwell Exalted Tank Neck
3379
3380// Item - 34677: Shattered Sun Pendant of Restoration
3381// 45484 Sunwell Exalted Healer Neck
3382template <uint32 AldorSpellId, uint32 ScryersSpellId>
3384{
3385 public:
3386 spell_item_sunwell_neck(char const* ScriptName) : SpellScriptLoader(ScriptName) { }
3387
3388 template <uint32 Aldors, uint32 Scryers>
3390 {
3391 bool Validate(SpellInfo const* /*spellInfo*/) override
3392 {
3393 return ValidateSpellInfo({ Aldors, Scryers }) &&
3394 sFactionStore.LookupEntry(FACTION_ALDOR) &&
3395 sFactionStore.LookupEntry(FACTION_SCRYERS);
3396 }
3397
3398 bool CheckProc(ProcEventInfo& eventInfo)
3399 {
3400 if (eventInfo.GetActor()->GetTypeId() != TYPEID_PLAYER)
3401 return false;
3402 return true;
3403 }
3404
3405 void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
3406 {
3408 Player* player = eventInfo.GetActor()->ToPlayer();
3409 Unit* target = eventInfo.GetProcTarget();
3410
3411 // Aggression checks are in the spell system... just cast and forget
3413 player->CastSpell(target, Aldors, aurEff);
3414
3416 player->CastSpell(target, Scryers, aurEff);
3417 }
3418
3424 };
3425
3430};
3431
3433{
3435 {
3436 if (Player* target = GetHitUnit()->ToPlayer())
3437 {
3438 target->HandleEmoteCommand(EMOTE_ONESHOT_TRAIN);
3439 if (EmotesTextSoundEntry const* soundEntry = sDB2Manager.GetTextSoundEmoteFor(TEXT_EMOTE_TRAIN, target->GetRace(), target->GetNativeGender(), target->GetClass()))
3440 target->PlayDistanceSound(soundEntry->SoundID);
3441 }
3442 }
3443
3444 void HandleTargets(std::list<WorldObject*>& targetList)
3445 {
3446 targetList.remove_if([](WorldObject const* obj) { return obj->GetTypeId() != TYPEID_PLAYER; });
3447 }
3448
3454};
3455
3465
3467{
3478
3479 void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
3480 {
3482
3483 Unit* caster = eventInfo.GetActor();
3484 float str = caster->GetStat(STAT_STRENGTH);
3485 float agi = caster->GetStat(STAT_AGILITY);
3486
3487 switch (aurEff->GetId())
3488 {
3490 {
3491 if (str > agi)
3492 caster->CastSpell(caster, SPELL_DEATH_CHOICE_NORMAL_STRENGTH, aurEff);
3493 else
3494 caster->CastSpell(caster, SPELL_DEATH_CHOICE_NORMAL_AGILITY, aurEff);
3495 break;
3496 }
3498 {
3499 if (str > agi)
3500 caster->CastSpell(caster, SPELL_DEATH_CHOICE_HEROIC_STRENGTH, aurEff);
3501 else
3502 caster->CastSpell(caster, SPELL_DEATH_CHOICE_HEROIC_AGILITY, aurEff);
3503 break;
3504 }
3505 default:
3506 break;
3507 }
3508 }
3509
3514};
3515
3531
3533{
3534public:
3535 spell_item_trinket_stack(char const* scriptName, uint32 stackSpell, uint32 triggerSpell) : SpellScriptLoader(scriptName),
3536 _stackSpell(stackSpell), _triggerSpell(triggerSpell)
3537 {
3538 }
3539
3541 {
3542 public:
3543 spell_item_trinket_stack_AuraScript(uint32 stackSpell, uint32 triggerSpell) : _stackSpell(stackSpell), _triggerSpell(triggerSpell)
3544 {
3545 }
3546
3547 private:
3548 bool Validate(SpellInfo const* /*spellInfo*/) override
3549 {
3551 }
3552
3553 void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
3554 {
3556
3557 Unit* caster = eventInfo.GetActor();
3558
3559 caster->CastSpell(caster, _stackSpell, aurEff); // cast the stack
3560
3561 Aura* dummy = caster->GetAura(_stackSpell); // retrieve aura
3562
3563 //dont do anything if it's not the right amount of stacks;
3564 if (!dummy || dummy->GetStackAmount() < aurEff->GetAmountAsInt())
3565 return;
3566
3567 // if right amount, remove the aura and cast real trigger
3569 if (Unit* target = eventInfo.GetActionTarget())
3570 caster->CastSpell(target, _triggerSpell, aurEff);
3571 }
3572
3573 void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
3574 {
3576 }
3577
3583
3586 };
3587
3592
3593private:
3596};
3597
3598// 57345 - Darkmoon Card: Greatness
3606
3608{
3609 bool Validate(SpellInfo const* /*spellInfo*/) override
3610 {
3611 return ValidateSpellInfo(
3612 {
3617 });
3618 }
3619
3620 void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
3621 {
3623
3624 Unit* caster = eventInfo.GetActor();
3625 float str = caster->GetStat(STAT_STRENGTH);
3626 float agi = caster->GetStat(STAT_AGILITY);
3627 float intl = caster->GetStat(STAT_INTELLECT);
3628 float vers = 0.0f; // caster->GetStat(STAT_VERSATILITY);
3629 float stat = 0.0f;
3630
3631 uint32 spellTrigger = SPELL_DARKMOON_CARD_STRENGTH;
3632
3633 if (str > stat)
3634 {
3635 spellTrigger = SPELL_DARKMOON_CARD_STRENGTH;
3636 stat = str;
3637 }
3638
3639 if (agi > stat)
3640 {
3641 spellTrigger = SPELL_DARKMOON_CARD_AGILITY;
3642 stat = agi;
3643 }
3644
3645 if (intl > stat)
3646 {
3647 spellTrigger = SPELL_DARKMOON_CARD_INTELLECT;
3648 stat = intl;
3649 }
3650
3651 if (vers > stat)
3652 {
3653 spellTrigger = SPELL_DARKMOON_CARD_VERSATILITY;
3654 stat = vers;
3655 }
3656
3657 caster->CastSpell(caster, spellTrigger, aurEff);
3658 }
3659
3664};
3665
3666// 27522,40336 - Mana Drain
3672
3674{
3675 bool Validate(SpellInfo const* /*spellInfo*/) override
3676 {
3677 return ValidateSpellInfo(
3678 {
3681 });
3682 }
3683
3684 void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
3685 {
3687
3688 Unit* caster = eventInfo.GetActor();
3689 Unit* target = eventInfo.GetActionTarget();
3690
3691 if (caster->IsAlive())
3692 caster->CastSpell(caster, SPELL_MANA_DRAIN_ENERGIZE, aurEff);
3693
3694 if (target && target->IsAlive())
3695 caster->CastSpell(target, SPELL_MANA_DRAIN_LEECH, aurEff);
3696 }
3697
3702};
3703
3705{
3707
3708 EMOTE_PLANTS_FLAG = 28008
3710
3711// 51640 - Taunt Flag Targeting
3713{
3714 bool Validate(SpellInfo const* /*spellInfo*/) override
3715 {
3716 return ValidateSpellInfo({ SPELL_TAUNT_FLAG }) &&
3718 }
3719
3720 void FilterTargets(std::list<WorldObject*>& targets)
3721 {
3722 targets.remove_if([](WorldObject* obj) -> bool
3723 {
3724 return obj->GetTypeId() != TYPEID_PLAYER && obj->GetTypeId() != TYPEID_CORPSE;
3725 });
3726
3727 if (targets.empty())
3728 {
3730 return;
3731 }
3732
3734 }
3735
3736 void HandleDummy(SpellEffIndex /*effIndex*/)
3737 {
3738 // we *really* want the unit implementation here
3739 // it sends a packet like seen on sniff
3740 GetCaster()->Unit::TextEmote(EMOTE_PLANTS_FLAG, GetHitUnit(), false);
3741
3743 }
3744
3750};
3751
3758
3759// 29830 - Mirren's Drinking Hat
3761{
3763 {
3764 uint32 spellId = 0;
3765 switch (urand(1, 6))
3766 {
3767 case 1:
3768 case 2:
3769 case 3:
3770 spellId = SPELL_LOCH_MODAN_LAGER; break;
3771 case 4:
3772 case 5:
3773 spellId = SPELL_STOUTHAMMER_LITE; break;
3774 case 6:
3775 spellId = SPELL_AERIE_PEAK_PALE_ALE; break;
3776 default:
3777 return;
3778 }
3779
3780 Unit* caster = GetCaster();
3781 caster->CastSpell(caster, spellId, GetSpell());
3782 }
3783
3788};
3789
3790// 13180 - Gnomish Mind Control Cap
3798
3800{
3801 bool Load() override
3802 {
3803 if (!GetCastItem())
3804 return false;
3805 return true;
3806 }
3807
3808 bool Validate(SpellInfo const* /*spell*/) override
3809 {
3811 }
3812
3813 void HandleDummy(SpellEffIndex /* effIndex */)
3814 {
3815 Unit* caster = GetCaster();
3816 if (Unit* target = GetHitUnit())
3817 {
3818 if (roll_chance<int32>(ROLL_CHANCE_NO_BACKFIRE))
3819 caster->CastSpell(target, roll_chance<int32>(ROLL_CHANCE_DULLARD) ? SPELL_DULLARD : SPELL_GNOMISH_MIND_CONTROL_CAP, GetCastItem());
3820 else
3821 target->CastSpell(caster, SPELL_GNOMISH_MIND_CONTROL_CAP, true); // backfire - 5% chance
3822 }
3823 }
3824
3829};
3830
3831// 8344 - Universal Remote (Gnomish Universal Remote)
3838
3840{
3841 bool Load() override
3842 {
3843 if (!GetCastItem())
3844 return false;
3845 return true;
3846 }
3847
3848 bool Validate(SpellInfo const* /*spellInfo*/) override
3849 {
3851 }
3852
3853 void HandleDummy(SpellEffIndex /*effIndex*/)
3854 {
3855 if (Unit* target = GetHitUnit())
3856 {
3857 uint8 chance = urand(0, 99);
3858 if (chance < 15)
3860 else if (chance < 25)
3862 else
3864 }
3865 }
3866
3871};
3872
3878
3879// Item - 19950: Zandalarian Hero Charm
3880// 24658 - Unstable Power
3881
3882// Item - 19949: Zandalarian Hero Medallion
3883// 24661 - Restless Strength
3885{
3886 public:
3887 spell_item_zandalarian_charm(char const* ScriptName, uint32 SpellId) : SpellScriptLoader(ScriptName), _spellId(SpellId) { }
3888
3890 {
3893
3894 bool Validate(SpellInfo const* /*spellInfo*/) override
3895 {
3896 return ValidateSpellInfo({ _spellId });
3897 }
3898
3899 bool CheckProc(ProcEventInfo& eventInfo)
3900 {
3901 if (SpellInfo const* spellInfo = eventInfo.GetSpellInfo())
3902 if (spellInfo->Id != m_scriptSpellId)
3903 return true;
3904
3905 return false;
3906 }
3907
3908 void HandleStackDrop(AuraEffect* /*aurEff*/, ProcEventInfo& /*eventInfo*/)
3909 {
3912 }
3913
3919
3921 };
3922
3923 AuraScript* GetAuraScript() const override
3924 {
3926 }
3927
3928 private:
3930};
3931
3933{
3934 bool Validate(SpellInfo const* spellInfo) override
3935 {
3936 return ValidateSpellEffect({ { spellInfo->Id, EFFECT_1 } });
3937 }
3938
3939 bool Load() override
3940 {
3941 return GetOwner()->GetTypeId() == TYPEID_PLAYER;
3942 }
3943
3944 void CalculateAmount(AuraEffect const* /*aurEff*/, SpellEffectValue& amount, bool& /*canBeRecalculated*/)
3945 {
3946 if (Item* artifact = GetOwner()->ToPlayer()->GetItemByGuid(GetAura()->GetCastItemGUID()))
3947 amount = GetEffectInfo(EFFECT_1).BasePoints * artifact->GetTotalPurchasedArtifactPowers() / 100;
3948 }
3949
3954};
3955
3957{
3958 bool Validate(SpellInfo const* spellInfo) override
3959 {
3960 return ValidateSpellEffect({ { spellInfo->Id, EFFECT_1 } });
3961 }
3962
3963 bool Load() override
3964 {
3965 return GetOwner()->GetTypeId() == TYPEID_PLAYER;
3966 }
3967
3968 void CalculateAmount(AuraEffect const* /*aurEff*/, SpellEffectValue& amount, bool& /*canBeRecalculated*/)
3969 {
3970 if (Item* artifact = GetOwner()->ToPlayer()->GetItemByGuid(GetAura()->GetCastItemGUID()))
3971 amount = GetSpellInfo()->GetEffect(EFFECT_1).BasePoints * artifact->GetTotalPurchasedArtifactPowers() / 100;
3972 }
3973
3978};
3979
3989
3990// 28200 - Ascendance
4008
4009// 29602 - Jom Gabbar
4011{
4012 bool Validate(SpellInfo const* /*spell*/) override
4013 {
4015 }
4016
4017 void OnRemove(AuraEffect const* effect, AuraEffectHandleModes /*mode*/)
4018 {
4020 }
4021
4026};
4027
4028// 45040 - Battle Trance
4030{
4031 bool Validate(SpellInfo const* /*spell*/) override
4032 {
4034 }
4035
4036 void OnRemove(AuraEffect const* effect, AuraEffectHandleModes /*mode*/)
4037 {
4039 }
4040
4045};
4046
4047// 90900 - World-Queller Focus
4065
4066// 118089 - Azure Water Strider
4067// 127271 - Crimson Water Strider
4068// 127272 - Orange Water Strider
4069// 127274 - Jade Water Strider
4070// 127278 - Golden Water Strider
4072{
4073 bool Validate(SpellInfo const* spellInfo) override
4074 {
4075 return ValidateSpellEffect({ { spellInfo->Id, EFFECT_1 } });
4076 }
4077
4078 void OnRemove(AuraEffect const* /*effect*/, AuraEffectHandleModes /*mode*/)
4079 {
4081 }
4082
4087};
4088
4089// 144671 - Brutal Kinship
4090// 145738 - Brutal Kinship
4108
4109// 45051 - Mad Alchemist's Potion (34440)
4111{
4113 {
4114 std::vector<uint32> availableElixirs =
4115 {
4116 // Battle Elixirs
4117 33720, // Onslaught Elixir (28102)
4118 54452, // Adept's Elixir (28103)
4119 33726, // Elixir of Mastery (28104)
4120 28490, // Elixir of Major Strength (22824)
4121 28491, // Elixir of Healing Power (22825)
4122 28493, // Elixir of Major Frost Power (22827)
4123 54494, // Elixir of Major Agility (22831)
4124 28501, // Elixir of Major Firepower (22833)
4125 28503,// Elixir of Major Shadow Power (22835)
4126 38954, // Fel Strength Elixir (31679)
4127 // Guardian Elixirs
4128 39625, // Elixir of Major Fortitude (32062)
4129 39626, // Earthen Elixir (32063)
4130 39627, // Elixir of Draenic Wisdom (32067)
4131 39628, // Elixir of Ironskin (32068)
4132 28502, // Elixir of Major Defense (22834)
4133 28514, // Elixir of Empowerment (22848)
4134 // Other
4135 28489, // Elixir of Camouflage (22823)
4136 28496 // Elixir of the Searching Eye (22830)
4137 };
4138
4139 Unit* target = GetCaster();
4140
4141 if (target->GetPowerType() == POWER_MANA)
4142 availableElixirs.push_back(28509); // Elixir of Major Mageblood (22840)
4143
4144 uint32 chosenElixir = Trinity::Containers::SelectRandomContainerElement(availableElixirs);
4145
4146 bool useElixir = true;
4147
4148 SpellGroup chosenSpellGroup = SPELL_GROUP_NONE;
4149 if (sSpellMgr->IsSpellMemberOfSpellGroup(chosenElixir, SPELL_GROUP_ELIXIR_BATTLE))
4150 chosenSpellGroup = SPELL_GROUP_ELIXIR_BATTLE;
4151 if (sSpellMgr->IsSpellMemberOfSpellGroup(chosenElixir, SPELL_GROUP_ELIXIR_GUARDIAN))
4152 chosenSpellGroup = SPELL_GROUP_ELIXIR_GUARDIAN;
4153 // If another spell of the same group is already active the elixir should not be cast
4154 if (chosenSpellGroup != SPELL_GROUP_NONE)
4155 {
4156 Unit::AuraApplicationMap const& auraMap = target->GetAppliedAuras();
4157 for (auto itr = auraMap.begin(); itr != auraMap.end(); ++itr)
4158 {
4159 uint32 spellId = itr->second->GetBase()->GetId();
4160 if (sSpellMgr->IsSpellMemberOfSpellGroup(spellId, chosenSpellGroup) && spellId != chosenElixir)
4161 {
4162 useElixir = false;
4163 break;
4164 }
4165 }
4166 }
4167
4168 if (useElixir)
4169 target->CastSpell(target, chosenElixir, GetCastItem());
4170 }
4171
4176};
4177
4178// 53750 - Crazy Alchemist's Potion (40077)
4180{
4182 {
4183 std::vector<uint32> availableElixirs =
4184 {
4185 43185, // Runic Healing Potion (33447)
4186 53750, // Crazy Alchemist's Potion (40077)
4187 53761, // Powerful Rejuvenation Potion (40087)
4188 53762, // Indestructible Potion (40093)
4189 53908, // Potion of Speed (40211)
4190 53909, // Potion of Wild Magic (40212)
4191 53910, // Mighty Arcane Protection Potion (40213)
4192 53911, // Mighty Fire Protection Potion (40214)
4193 53913, // Mighty Frost Protection Potion (40215)
4194 53914, // Mighty Nature Protection Potion (40216)
4195 53915 // Mighty Shadow Protection Potion (40217)
4196 };
4197
4198 Unit* target = GetCaster();
4199
4200 if (!target->IsInCombat())
4201 availableElixirs.push_back(53753); // Potion of Nightmares (40081)
4202 if (target->GetPowerType() == POWER_MANA)
4203 availableElixirs.push_back(43186); // Runic Mana Potion(33448)
4204
4205 uint32 chosenElixir = Trinity::Containers::SelectRandomContainerElement(availableElixirs);
4206
4207 target->CastSpell(target, chosenElixir, GetCastItem());
4208 }
4209
4214};
4215
4221
4222// 21149 - Egg Nog
4224{
4225 bool Validate(SpellInfo const* /*spellInfo*/) override
4226 {
4228 }
4229
4235
4240};
4241
4246
4247// 208051 - Sephuz's Secret
4248// 234867 - Sephuz's Secret
4249// 236763 - Sephuz's Secret
4251{
4252 bool Validate(SpellInfo const* /*spellInfo*/) override
4253 {
4255 }
4256
4257 bool CheckProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
4258 {
4260 return false;
4261
4262 if (eventInfo.GetHitMask() & (PROC_HIT_INTERRUPT | PROC_HIT_DISPEL))
4263 return true;
4264
4265 Spell const* procSpell = eventInfo.GetProcSpell();
4266 if (!procSpell)
4267 return false;
4268
4269 bool isCrowdControl = procSpell->GetSpellInfo()->HasAura(SPELL_AURA_MOD_CONFUSE)
4270 || procSpell->GetSpellInfo()->HasAura(SPELL_AURA_MOD_FEAR)
4271 || procSpell->GetSpellInfo()->HasAura(SPELL_AURA_MOD_STUN)
4273 || procSpell->GetSpellInfo()->HasAura(SPELL_AURA_MOD_ROOT)
4276 || procSpell->GetSpellInfo()->HasAura(SPELL_AURA_MOD_ROOT_2);
4277
4278 if (!isCrowdControl)
4279 return false;
4280
4281 return true;
4282 }
4283
4291
4297};
4298
4310
4311// 215266 - Fragile Echoes
4313{
4327
4328 void UpdateSpecAura(bool apply) const
4329 {
4330 Player* target = GetUnitOwner()->ToPlayer();
4331 if (!target)
4332 return;
4333
4334 auto updateAuraIfInCorrectSpec = [&](ChrSpecialization spec, AmalgamsSeventhSpine aura)
4335 {
4336 if (!apply || target->GetPrimarySpecialization() != spec)
4337 target->RemoveAurasDueToSpell(aura);
4338 else if (!target->HasAura(aura))
4339 target->CastSpell(target, aura, GetEffect(EFFECT_0));
4340 };
4341
4342 switch (target->GetClass())
4343 {
4344 case CLASS_MONK:
4346 break;
4347 case CLASS_SHAMAN:
4349 break;
4350 case CLASS_PRIEST:
4353 break;
4354 case CLASS_PALADIN:
4356 break;
4357 case CLASS_DRUID:
4359 break;
4360 case CLASS_EVOKER:
4362 break;
4363 default:
4364 break;
4365 }
4366 }
4367
4368 void HandleHeartbeat() const
4369 {
4370 UpdateSpecAura(true);
4371 }
4372
4373 void HandleRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) const
4374 {
4375 UpdateSpecAura(false);
4376 }
4377
4383};
4384
4385// 215267 - Fragile Echo
4387{
4388 bool Validate(SpellInfo const* /*spellInfo*/) override
4389 {
4391 }
4392
4393 void TriggerManaRestoration(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/) const
4394 {
4395 if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_EXPIRE)
4396 return;
4397
4398 Unit* caster = GetCaster();
4399 if (!caster)
4400 return;
4401
4402 if (AuraEffect const* trinketEffect = caster->GetAuraEffect(aurEff->GetSpellEffectInfo().TriggerSpell, EFFECT_0))
4403 caster->CastSpell(caster, SPELL_FRAGILE_ECHO_ENERGIZE, CastSpellExtraArgs(aurEff).AddSpellMod(SPELLVALUE_BASE_POINT0, trinketEffect->GetAmount()));
4404 }
4405
4410};
4411
4412// 228445 - March of the Legion
4414{
4415 bool IsDemon(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
4416 {
4417 return eventInfo.GetProcTarget() && eventInfo.GetProcTarget()->GetCreatureType() == CREATURE_TYPE_DEMON;
4418 }
4419
4424};
4425
4426// 234113 - Arrogance (used by item 142171 - Seal of Darkshire Nobility)
4428{
4429 bool Validate(SpellInfo const* spellInfo) override
4430 {
4431 return ValidateSpellEffect({ { spellInfo->Id, EFFECT_1 } })
4432 && ValidateSpellInfo({ spellInfo->GetEffect(EFFECT_1).TriggerSpell });
4433 }
4434
4436 {
4437 return eventInfo.GetProcTarget() && !eventInfo.GetProcTarget()->HasAura(GetEffectInfo(EFFECT_1).TriggerSpell, GetTarget()->GetGUID());
4438 }
4439
4444};
4445
4446// 247625 - March of the Legion
4448{
4449 bool IsDemon(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
4450 {
4451 return eventInfo.GetProcTarget() && eventInfo.GetProcTarget()->GetCreatureType() == CREATURE_TYPE_DEMON;
4452 }
4453
4458};
4459
4464
4465// 253287 - Highfather's Timekeeping
4467{
4468 bool Validate(SpellInfo const* /*spellInfo*/) override
4469 {
4471 }
4472
4473 bool CheckHealth(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
4474 {
4475 return eventInfo.GetDamageInfo() && GetTarget()->HealthBelowPctDamaged(aurEff->GetAmount(), eventInfo.GetDamageInfo()->GetDamage());
4476 }
4477
4478 void Heal(AuraEffect* aurEff, ProcEventInfo& /*procInfo*/)
4479 {
4481 if (Unit* caster = GetCaster())
4482 caster->CastSpell(GetTarget(), SPELL_HIGHFATHERS_TIMEKEEPING_HEAL, aurEff);
4483 }
4484
4490};
4491
4497
4498// 253323 - Shadow Strike
4500{
4501 bool Validate(SpellInfo const* /*spellInfo*/) override
4502 {
4504 }
4505
4507 {
4509 CastSpellExtraArgs(aurEff).SetTriggeringSpell(eventInfo.GetProcSpell()));
4510 }
4511
4516};
4517
4518// 255861 - Shadow Strike
4540
4541// 295175 - Spiteful Binding
4543{
4544 bool Validate(SpellInfo const* spellInfo) override
4545 {
4546 return ValidateSpellEffect({ { spellInfo->Id, EFFECT_1 } });
4547 }
4548
4549 bool CheckHealth(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
4550 {
4551 return eventInfo.GetActor()->GetHealthPct() >= GetEffectInfo(EFFECT_1).CalcValue();
4552 }
4553
4558};
4559
4560// 302385 - Resurrect Health
4573
4580
4581// 303358 Venomous Bolt
4582// 303361 Shivering Lance
4584{
4585public:
4586 spell_item_shiver_venom_weapon_proc(ShiverVenomSpell additionalProcSpellId) : _additionalProcSpellId(additionalProcSpellId) { }
4587
4588 bool Validate(SpellInfo const* /*spellInfo*/) override
4589 {
4591 }
4592
4594 {
4595 if (procInfo.GetProcTarget()->HasAura(SPELL_SHIVER_VENOM))
4597 .AddSpellMod(SPELLVALUE_BASE_POINT0, aurEff->GetAmount())
4598 .SetTriggeringSpell(procInfo.GetProcSpell()));
4599 }
4600
4605
4606private:
4608};
4609
4610// 302774 - Arcane Tempest
4612{
4614 {
4616 return;
4617
4618 if (AuraEffect* aurEff = GetCaster()->GetAuraEffect(GetTriggeringSpell()->Id, EFFECT_0))
4619 {
4620 aurEff->GetBase()->ModStackAmount(1, AURA_REMOVE_NONE, false);
4621 aurEff->CalculatePeriodic(GetCaster(), false);
4622 }
4623 }
4624
4629};
4630
4631// 302769 - Arcane Tempest
4633{
4634 void CalculatePeriod(AuraEffect const* /*aurEff*/, bool& /*isPeriodic*/, int32& period)
4635 {
4636 period -= (GetStackAmount() - 1) * 300;
4637 }
4638
4643};
4644
4645// 410530 - Mettle
4646// 410964 - Mettle
4648{
4649 static constexpr uint32 SPELL_METTLE_COOLDOWN = 410532;
4650
4651 bool Validate(SpellInfo const* /*spellInfo*/) override
4652 {
4654 }
4655
4656 bool CheckProc(ProcEventInfo& eventInfo)
4657 {
4659 return false;
4660
4661 if (eventInfo.GetHitMask() & (PROC_HIT_INTERRUPT | PROC_HIT_DISPEL))
4662 return true;
4663
4664 Spell const* procSpell = eventInfo.GetProcSpell();
4665 if (!procSpell)
4666 return false;
4667
4668 bool isCrowdControl = procSpell->GetSpellInfo()->HasAura(SPELL_AURA_MOD_CONFUSE)
4669 || procSpell->GetSpellInfo()->HasAura(SPELL_AURA_MOD_FEAR)
4670 || procSpell->GetSpellInfo()->HasAura(SPELL_AURA_MOD_STUN)
4672 || procSpell->GetSpellInfo()->HasAura(SPELL_AURA_MOD_ROOT)
4675 || procSpell->GetSpellInfo()->HasAura(SPELL_AURA_MOD_ROOT_2);
4676
4677 if (!isCrowdControl)
4678 return false;
4679
4680 return eventInfo.GetActionTarget()->HasAura([&](Aura const* aura) { return aura->GetCastId() == procSpell->m_castId; });
4681 }
4682
4683 void TriggerCooldown(ProcEventInfo& /*eventInfo*/)
4684 {
4686 }
4687
4693};
4694
4696{
4697 // 23074 Arcanite Dragonling
4698 new spell_item_trigger_spell("spell_item_arcanite_dragonling", SPELL_ARCANITE_DRAGONLING);
4699 // 23133 Gnomish Battle Chicken
4700 new spell_item_trigger_spell("spell_item_gnomish_battle_chicken", SPELL_BATTLE_CHICKEN);
4701 // 23076 Mechanical Dragonling
4702 new spell_item_trigger_spell("spell_item_mechanical_dragonling", SPELL_MECHANICAL_DRAGONLING);
4703 // 23075 Mithril Mechanical Dragonling
4704 new spell_item_trigger_spell("spell_item_mithril_mechanical_dragonling", SPELL_MITHRIL_MECHANICAL_DRAGONLING);
4705
4710 new spell_item_anger_capacitor<8>("spell_item_tiny_abomination_in_a_jar");
4711 new spell_item_anger_capacitor<7>("spell_item_tiny_abomination_in_a_jar_hero");
4725 new spell_item_defibrillate("spell_item_goblin_jumper_cables", 67, SPELL_GOBLIN_JUMPER_CABLES_FAIL);
4726 new spell_item_defibrillate("spell_item_goblin_jumper_cables_xl", 50, SPELL_GOBLIN_JUMPER_CABLES_XL_FAIL);
4727 new spell_item_defibrillate("spell_item_gnomish_army_knife", 33);
4777
4782
4805 new spell_item_sunwell_neck<SPELL_LIGHTS_WRATH, SPELL_ARCANE_BOLT>("spell_item_sunwell_exalted_caster_neck");
4806 new spell_item_sunwell_neck<SPELL_LIGHTS_STRENGTH, SPELL_ARCANE_STRIKE>("spell_item_sunwell_exalted_melee_neck");
4807 new spell_item_sunwell_neck<SPELL_LIGHTS_WARD, SPELL_ARCANE_INSIGHT>("spell_item_sunwell_exalted_tank_neck");
4808 new spell_item_sunwell_neck<SPELL_LIGHTS_SALVATION, SPELL_ARCANE_SURGE>("spell_item_sunwell_exalted_healer_neck");
4821 new spell_item_zandalarian_charm("spell_item_unstable_power", SPELL_UNSTABLE_POWER_AURA_STACK);
4822 new spell_item_zandalarian_charm("spell_item_restless_strength", SPELL_RESTLESS_STRENGTH_AURA_STACK);
4830
4834
4850
4852}
#define M_PI
Definition Common.h:118
First const & RAND(First const &first, Second const &second, Rest const &... rest)
DB2Storage< ChrClassesEntry > sChrClassesStore("ChrClasses.db2", &ChrClassesLoadInfo::Instance)
DB2Storage< BroadcastTextEntry > sBroadcastTextStore("BroadcastText.db2", &BroadcastTextLoadInfo::Instance)
DB2Storage< FactionEntry > sFactionStore("Faction.db2", &FactionLoadInfo::Instance)
#define sDB2Manager
Definition DB2Stores.h:569
ChrSpecialization
Definition DBCEnums.h:398
uint8_t uint8
Definition Define.h:156
int32_t int32
Definition Define.h:150
uint64_t uint64
Definition Define.h:153
uint32_t uint32
Definition Define.h:154
#define INVALID_HEIGHT
Definition GridDefines.h:61
@ ITEM_SUBCLASS_ARMOR_MAIL
@ ITEM_SUBCLASS_ARMOR_CLOTH
@ ITEM_SUBCLASS_ARMOR_LEATHER
@ ITEM_SUBCLASS_ARMOR_PLATE
#define TC_LOG_WARN(filterType__, message__,...)
Definition Log.h:187
LootStore LootTemplates_Skinning("skinning_loot_template", "creature skinning id", true)
@ TYPEID_UNIT
Definition ObjectGuid.h:43
@ TYPEID_CORPSE
Definition ObjectGuid.h:48
@ TYPEID_PLAYER
Definition ObjectGuid.h:44
#define sObjectMgr
Definition ObjectMgr.h:1885
@ QUEST_STATUS_INCOMPLETE
Definition QuestDef.h:150
float frand(float min, float max)
Definition Random.cpp:55
int32 irand(int32 min, int32 max)
Definition Random.cpp:35
uint32 urand(uint32 min, uint32 max)
Definition Random.cpp:42
bool roll_chance(T chance)
Definition Random.h:55
#define RegisterSpellScript(spell_script)
Definition ScriptMgr.h:1383
#define RegisterSpellScriptWithArgs(spell_script, script_name,...)
Definition ScriptMgr.h:1382
SpellEffIndex
@ EFFECT_1
@ EFFECT_0
@ EFFECT_2
@ CLASS_HUNTER
@ CLASS_DRUID
@ CLASS_SHAMAN
@ CLASS_MONK
@ CLASS_PRIEST
@ CLASS_WARRIOR
@ CLASS_WARLOCK
@ CLASS_MAGE
@ CLASS_DEATH_KNIGHT
@ CLASS_PALADIN
@ CLASS_ROGUE
@ CLASS_EVOKER
@ GENDER_MALE
@ TARGET_UNIT_DEST_AREA_ALLY
@ TARGET_CORPSE_SRC_AREA_ENEMY
@ TARGET_UNIT_SRC_AREA_ALLY
@ EMOTE_ONESHOT_APPLAUD
@ EMOTE_ONESHOT_LAUGH
@ EMOTE_ONESHOT_CHEER
@ EMOTE_ONESHOT_CHICKEN
@ EMOTE_STATE_DANCE
@ EMOTE_ONESHOT_TRAIN
@ EMOTE_ONESHOT_DANCESPECIAL
@ CREATURE_TYPE_GAS_CLOUD
@ CREATURE_TYPE_DEMON
@ TEXT_EMOTE_TRAIN
@ TEAM_ALLIANCE
@ SPELL_EFFECT_DUMMY
@ SPELL_EFFECT_SCRIPT_EFFECT
@ SPELL_EFFECT_INEBRIATE
@ SPELL_EFFECT_HEAL
@ SPELL_EFFECT_ENERGIZE
@ SPELL_EFFECT_RESURRECT
@ SPELL_EFFECT_TELEPORT_UNITS
@ SPELL_EFFECT_APPLY_AURA
@ OFF_ATTACK
@ SPELL_CUSTOM_ERROR_TOO_MANY_GHOULS
@ SPELL_CUSTOM_ERROR_MUST_BE_CLOSE_TO_SINKHOLE
@ SPELL_CUSTOM_ERROR_LEARNED_EVERYTHING
@ HORDE
@ POWER_RAGE
@ POWER_RUNIC_POWER
@ POWER_ENERGY
@ POWER_MANA
#define MAX_CLASSES
@ REP_EXALTED
SpellCastResult
@ SPELL_FAILED_NOT_HERE
@ SPELL_FAILED_CUSTOM_ERROR
@ SPELL_FAILED_CANT_DO_THAT_RIGHT_NOW
@ SPELL_FAILED_ONLY_ABOVEWATER
@ SPELL_CAST_OK
@ SPELL_FAILED_NO_VALID_TARGETS
@ STAT_INTELLECT
@ STAT_AGILITY
@ STAT_STRENGTH
#define EFFECT_ALL
@ SPELLFAMILY_POTION
@ SKILL_ENGINEERING
uint32 GetExplicitDiscoverySpell(uint32 spellId, Player *player)
bool HasDiscoveredAllSpells(uint32 spellId, Player *player)
AuraEffectHandleModes
@ AURA_EFFECT_HANDLE_REAPPLY
@ AURA_EFFECT_HANDLE_REAL
@ AURA_REMOVE_NONE
@ AURA_REMOVE_BY_EXPIRE
@ SPELL_AURA_MOD_TOTAL_STAT_PERCENTAGE
@ SPELL_AURA_MOD_THREAT
@ SPELL_AURA_PROC_TRIGGER_SPELL
@ SPELL_AURA_MOD_FEAR
@ SPELL_AURA_MOD_ROOT_2
@ SPELL_AURA_MOD_RATING
@ SPELL_AURA_DUMMY
@ SPELL_AURA_MOD_PACIFY
@ SPELL_AURA_MOD_SILENCE
@ SPELL_AURA_MOD_STAT
@ SPELL_AURA_MOD_DAMAGE_PERCENT_DONE
@ SPELL_AURA_MOD_ROOT
@ SPELL_AURA_MOUNTED
@ SPELL_AURA_MOD_PACIFY_SILENCE
@ SPELL_AURA_TRANSFORM
@ SPELL_AURA_MOD_CONFUSE
@ SPELL_AURA_PERIODIC_DUMMY
@ SPELL_AURA_PERIODIC_TRIGGER_SPELL
@ SPELL_AURA_MOD_STUN
@ SPELLVALUE_AURA_STACK
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.
@ SPELLVALUE_BASE_POINT0
SpellGroup
Definition SpellMgr.h:312
@ SPELL_GROUP_NONE
Definition SpellMgr.h:313
@ SPELL_GROUP_ELIXIR_BATTLE
Definition SpellMgr.h:314
@ SPELL_GROUP_ELIXIR_GUARDIAN
Definition SpellMgr.h:315
#define sSpellMgr
Definition SpellMgr.h:812
@ PROC_FLAG_DEAL_RANGED_ABILITY
Definition SpellMgr.h:106
@ PROC_FLAG_DEAL_RANGED_ATTACK
Definition SpellMgr.h:103
@ PROC_FLAG_DEAL_HELPFUL_SPELL
Definition SpellMgr.h:115
@ PROC_FLAG_DEAL_HARMFUL_SPELL
Definition SpellMgr.h:118
@ PROC_HIT_DISPEL
Definition SpellMgr.h:249
@ PROC_HIT_INTERRUPT
Definition SpellMgr.h:247
#define AuraProcFn(F)
#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 AuraCheckEffectProcFn(F, I, N)
#define SpellCastFn(F)
#define AuraEffectCalcPeriodicFn(F, I, N)
#define AuraEffectApplyFn(F, I, N, M)
#define AuraCheckProcFn(F)
#define SpellHitFn(F)
#define AuraHeartbeatFn(F)
#define AuraCheckAreaTargetFn(F)
#define AuraEffectRemoveFn(F, I, N, M)
T CalculatePct(T base, U pct)
Definition Util.h:72
GiftOfTheHarvester
SpellEffectInfo const & GetSpellEffectInfo() const
int32 GetAmountAsInt() const
uint32 GetId() const
SpellEffectValue GetAmount() const
void PreventDefaultAction()
HookList< EffectCalcPeriodicHandler > DoEffectCalcPeriodic
AuraApplication const * GetTargetApplication() const
HookList< AuraHeartbeatHandler > OnHeartbeat
int32 GetDuration() const
HookList< EffectApplyHandler > AfterEffectRemove
HookList< CheckEffectProcHandler > DoCheckEffectProc
HookList< EffectPeriodicHandler > OnEffectPeriodic
SpellInfo const * GetSpellInfo() const
WorldObject * GetOwner() const
HookList< EffectApplyHandler > AfterEffectApply
HookList< EffectProcHandler > AfterEffectProc
HookList< EffectCalcAmountHandler > DoEffectCalcAmount
Unit * GetCaster() const
SpellEffectInfo const & GetEffectInfo(SpellEffIndex effIndex) const
AuraEffect * GetEffect(uint8 effIndex) const
Aura * GetAura() const
HookList< CheckAreaTargetHandler > DoCheckAreaTarget
Unit * GetTarget() const
ObjectGuid GetCasterGUID() const
HookList< AuraProcHandler > AfterProc
HookList< CheckProcHandler > DoCheckProc
HookList< EffectApplyHandler > OnEffectRemove
HookList< EffectProcHandler > OnEffectProc
Unit * GetUnitOwner() const
HookList< AuraProcHandler > OnProc
uint8 GetStackAmount() const
HookList< EffectApplyHandler > OnEffectApply
uint32 GetId() const
ObjectGuid GetCastId() const
Definition SpellAuras.h:186
uint8 GetStackAmount() const
Definition SpellAuras.h:238
virtual void Remove(AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)=0
ObjectGuid const & GetGUID() const
Definition BaseEntity.h:163
TypeID GetTypeId() const
Definition BaseEntity.h:166
CreatureDifficulty const * GetCreatureDifficulty() const
Definition Creature.h:268
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
SpellInfo const * GetSpellInfo() const
Definition Unit.h:448
uint32 GetDamage() const
Definition Unit.h:452
void AddEventAtOffset(BasicEvent *event, Milliseconds offset)
uint32 GetEffectiveHeal() const
Definition Unit.h:484
uint32 GetHeal() const
Definition Unit.h:482
Definition Item.h:179
bool IsDungeon() const
Definition Map.cpp:3267
Player * ToPlayer()
Definition Object.h:126
uint32 GetEntry() const
Definition Object.h:89
Creature * ToCreature()
Definition Object.h:121
PartyTimeEmoteEvent(Player *player)
bool Execute(uint64, uint32) override
void AutoStoreLoot(uint8 bag, uint8 slot, uint32 loot_id, LootStore const &store, ItemContext context=ItemContext::NONE, bool broadcast=false, bool createdByPlayer=false)
Definition Player.cpp:27179
ChrSpecialization GetPrimarySpecialization() const
Definition Player.h:2008
uint32 DoRandomRoll(uint32 minimum, uint32 maximum)
Definition Player.cpp:30833
void LearnSpell(uint32 spell_id, bool dependent, int32 fromSkill=0, bool suppressMessaging=false, Optional< PlayerSpellTrait > trait={})
Definition Player.cpp:3178
TeamId GetTeamId() const
Definition Player.h:2424
QuestStatus GetQuestStatus(uint32 quest_id) const
Definition Player.cpp:15962
ReputationRank GetReputationRank(uint32 faction_id) const
Definition Player.cpp:6505
HealInfo * GetHealInfo() const
Definition Unit.h:512
Unit * GetActionTarget() const
Definition Unit.h:500
Spell const * GetProcSpell() const
Definition Unit.h:514
ProcFlagsHit GetHitMask() const
Definition Unit.h:506
SpellInfo const * GetSpellInfo() const
Definition Unit.cpp:281
ProcFlagsInit GetTypeMask() const
Definition Unit.h:503
DamageInfo * GetDamageInfo() const
Definition Unit.h:511
Unit * GetProcTarget() const
Definition Unit.h:501
Unit * GetActor() const
Definition Unit.h:499
SpellEffectValue CalcValue(WorldObject const *caster=nullptr, SpellEffectValue const *basePoints=nullptr, Unit const *target=nullptr, float *variance=nullptr, uint32 castItemId=0, int32 itemLevel=-1) const
uint32 TriggerSpell
Definition SpellInfo.h:234
void ResetCooldown(uint32 spellId, bool update=false)
bool HasEffect(SpellEffectName effect) const
uint32 const Id
Definition SpellInfo.h:328
uint32 StackAmount
Definition SpellInfo.h:396
SpellEffectInfo const & GetEffect(SpellEffIndex index) const
Definition SpellInfo.h:588
bool HasAura(AuraType aura) const
uint32 SpellFamilyName
Definition SpellInfo.h:414
uint32 m_scriptSpellId
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
static bool ValidateSpellEffect(std::initializer_list< std::pair< uint32, SpellEffIndex > > effects)
HookList< CastHandler > AfterCast
HookList< CheckCastHandler > OnCheckCast
Creature * GetHitCreature() const
Player * GetHitPlayer() const
Unit * GetCaster() const
HookList< HitHandler > AfterHit
HookList< EffectHandler > OnEffectHit
void PreventHitDefaultEffect(SpellEffIndex effIndex)
int64 GetUnitTargetCountForEffect(SpellEffIndex effect) const
SpellInfo const * GetTriggeringSpell() const
Unit * GetHitUnit() const
HookList< EffectHandler > OnEffectHitTarget
Item * GetCastItem() const
void SetCustomCastResultMessage(SpellCustomErrors result)
Spell * GetSpell() const
void FinishCast(SpellCastResult result, int32 *param1=nullptr, int32 *param2=nullptr)
Difficulty GetCastDifficulty() const
int32 GetHitHeal() const
void SetHitHeal(int32 heal)
SpellInfo const * GetSpellInfo() const
HookList< ObjectAreaTargetSelectHandler > OnObjectAreaTargetSelect
Definition Spell.h:277
SpellInfo const * GetSpellInfo() const
Definition Spell.h:702
ObjectGuid m_originalCastId
Definition Spell.h:605
int32 m_castItemLevel
Definition Spell.h:603
ObjectGuid m_castId
Definition Spell.h:604
Binary predicate for sorting Units based on percent value of health.
Definition Unit.h:635
float GetHealthPct() const
Definition Unit.h:796
uint64 CountPctFromMaxHealth(float pct) const
Definition Unit.h:797
uint8 GetClass() const
Definition Unit.h:764
std::multimap< uint32, AuraApplication * > AuraApplicationMap
Definition Unit.h:645
Powers GetPowerType() const
Definition Unit.h:811
AuraEffect * GetAuraEffect(uint32 spellId, uint8 effIndex, ObjectGuid casterGUID=ObjectGuid::Empty) const
Definition Unit.cpp:4604
bool IsAlive() const
Definition Unit.h:1185
Gender GetGender() const
Definition Unit.h:767
virtual Gender GetNativeGender() const
Definition Unit.h:769
uint32 GetCreatureType() const
Definition Unit.cpp:9451
Aura * GetAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
Definition Unit.cpp:4700
bool IsSummon() const
Definition Unit.h:749
virtual void TextEmote(std::string_view text, WorldObject const *target=nullptr, bool isBossEmote=false)
Definition Unit.cpp:14342
bool isMoving() const
Definition Unit.h:1804
bool HealthBelowPctDamaged(float pct, uint32 damage) const
Definition Unit.h:793
void GetAllMinionsByEntry(std::list< TempSummon * > &Minions, uint32 entry)
Definition Unit.cpp:6420
void RemoveAuraFromStack(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT, uint16 num=1)
Definition Unit.cpp:3990
void SetFacingTo(float const ori, bool force=true)
Definition Unit.cpp:13289
bool IsCritter() const
Definition Unit.h:1025
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
Definition Unit.cpp:4804
float GetStat(Stats stat) const
Definition Unit.h:772
SpellHistory * GetSpellHistory()
Definition Unit.h:1498
void HandleEmoteCommand(Emote emoteId, Player *target=nullptr, Trinity::IteratorPair< int32 const * > spellVisualKitIds={}, int32 sequenceVariation=0)
Definition Unit.cpp:1657
AuraApplicationMap & GetAppliedAuras()
Definition Unit.h:1295
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:3974
ObjectGuid GetTarget() const
Definition Unit.h:1831
uint8 GetLevel() const
Definition Unit.h:757
virtual void SetDisplayId(uint32 displayId, bool setNative=false)
Definition Unit.cpp:10779
bool IsInCombat() const
Definition Unit.h:1058
void PlayDirectSound(uint32 soundId, Player const *target=nullptr, uint32 broadcastTextId=0) const
Definition Object.cpp:2938
Map * GetMap() const
Definition Object.h:411
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
Definition Object.cpp:2217
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition Object.cpp:1517
EventProcessor m_Events
Definition Object.h:561
uint32 GetAreaId() const
Definition Object.h:333
void PeriodicTick(AuraEffect const *aurEff)
bool Validate(SpellInfo const *) override
void HandleProc(AuraEffect *aurEff, ProcEventInfo &)
bool Validate(SpellInfo const *) override
bool CheckProc(ProcEventInfo &eventInfo)
bool Validate(SpellInfo const *) override
void HandleProc(AuraEffect *aurEff, ProcEventInfo &eventInfo)
bool Validate(SpellInfo const *) override
void TriggerManaRestoration(AuraEffect const *aurEff, AuraEffectHandleModes) const
void HandleRemove(AuraEffect const *, AuraEffectHandleModes) const
void UpdateSpecAura(bool apply) const
bool Validate(SpellInfo const *) override
void OnRemove(AuraEffect const *, AuraEffectHandleModes)
void HandleProc(AuraEffect *aurEff, ProcEventInfo &eventInfo)
spell_item_anger_capacitor(char const *ScriptName)
AuraScript * GetAuraScript() const override
void Register() override
void CalculateAmount(AuraEffect const *, SpellEffectValue &amount, bool &)
void CalculateAmount(AuraEffect const *, SpellEffectValue &amount, bool &)
bool Validate(SpellInfo const *spellInfo) override
void CalculateAmount(AuraEffect const *, SpellEffectValue &amount, bool &)
bool Validate(SpellInfo const *spellInfo) override
void Register() override
bool Load() override
void OnDummyEffect(SpellEffIndex effIndex)
bool Validate(SpellInfo const *) override
void HandleProc(AuraEffect *aurEff, ProcEventInfo &eventInfo)
void OnRemove(AuraEffect const *effect, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
bool CheckProc(ProcEventInfo &eventInfo)
bool Validate(SpellInfo const *) override
void HandleProc(AuraEffect *aurEff, ProcEventInfo &eventInfo)
bool Validate(SpellInfo const *) override
void HandleDummy(SpellEffIndex)
bool Validate(SpellInfo const *) override
void Register() override
void HandleScript(SpellEffIndex)
bool Validate(SpellInfo const *) override
void OnRemove(AuraEffect const *effect, AuraEffectHandleModes)
void HandleDummy(SpellEffIndex)
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *spellInfo) override
bool CheckProc(ProcEventInfo &eventInfo)
bool Validate(SpellInfo const *) override
void HandleProc(AuraEffect *aurEff, ProcEventInfo &eventInfo)
bool Validate(SpellInfo const *) override
void HandleStackDrop(AuraEffect *, ProcEventInfo &)
void HandleProc(AuraEffect *aurEff, ProcEventInfo &eventInfo)
void Register() override
bool Validate(SpellInfo const *) override
void HandleProc(AuraEffect *aurEff, ProcEventInfo &eventInfo)
AuraScript * GetAuraScript() const override
spell_item_deathbringers_will(char const *ScriptName)
bool Validate(SpellInfo const *) override
spell_item_defibrillate_SpellScript(uint8 chance, uint32 failSpell)
SpellScript * GetSpellScript() const override
spell_item_defibrillate(char const *name, uint8 chance, uint32 failSpell=0)
void Register() override
bool Validate(SpellInfo const *) override
void HandlePeriodicDummy(AuraEffect const *aurEff)
bool Validate(SpellInfo const *) override
void HandleProc(AuraEffect *aurEff, ProcEventInfo &)
bool Validate(SpellInfo const *) override
void HandleDummy(SpellEffIndex)
bool Validate(SpellInfo const *) override
void Register() override
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
void Register() override
void AfterApply(AuraEffect const *, AuraEffectHandleModes)
void HandleProc(AuraEffect *aurEff, ProcEventInfo &eventInfo)
bool Validate(SpellInfo const *) override
void FilterTargets(std::list< WorldObject * > &targets)
void Register() override
bool Validate(SpellInfo const *) override
void HandleScript(SpellEffIndex)
void Register() override
void PeriodicTick(AuraEffect const *)
bool Validate(SpellInfo const *) override
void HandleProc(AuraEffect *, ProcEventInfo &)
void HandleScript(SpellEffIndex)
spell_item_feast(uint32 text)
void Register() override
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
void HandleDummy(SpellEffIndex)
void HandleProc(AuraEffect *aurEff, ProcEventInfo &eventInfo)
bool Validate(SpellInfo const *) override
void HandleDummy(SpellEffIndex)
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
void HandleDummy(SpellEffIndex)
bool Validate(SpellInfo const *spellInfo) override
bool CheckHealth(AuraEffect const *, ProcEventInfo &eventInfo)
bool Validate(SpellInfo const *) override
void HandleProc(ProcEventInfo &)
bool Validate(SpellInfo const *) override
void HandleProc(AuraEffect *aurEff, ProcEventInfo &eventInfo)
void Register() override
bool CheckHealth(AuraEffect const *aurEff, ProcEventInfo &eventInfo)
void Heal(AuraEffect *aurEff, ProcEventInfo &)
bool Validate(SpellInfo const *) override
void HandleDummy(SpellEffIndex)
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
void HandleDummy(SpellEffIndex)
static constexpr uint32 SPELL_METTLE_COOLDOWN
bool Validate(SpellInfo const *) override
bool CheckProc(ProcEventInfo &eventInfo)
void OnRemove(AuraEffect const *effect, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
void Register() override
void HandleDummy(SpellEffIndex)
bool Validate(SpellInfo const *) override
bool IsDemon(AuraEffect const *, ProcEventInfo &eventInfo)
bool Validate(SpellInfo const *) override
void Register() override
void HandleDummy(SpellEffIndex)
void HandleProc(AuraEffect *aurEff, ProcEventInfo &eventInfo)
bool Validate(SpellInfo const *) override
void Register() override
bool Validate(SpellInfo const *) override
void HandleProc(AuraEffect *aurEff, ProcEventInfo &eventInfo)
void HandleScript(SpellEffIndex)
bool Validate(SpellInfo const *) override
void HandleDummy(SpellEffIndex)
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
void HandleScriptEffect(SpellEffIndex)
void HandleDummy(SpellEffIndex)
bool CheckProc(ProcEventInfo &eventInfo)
bool Validate(SpellInfo const *) override
void HandleProc(AuraEffect *aurEff, ProcEventInfo &eventInfo)
void Register() override
void HandleDummy(SpellEffIndex)
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
void HandleDummy(SpellEffIndex)
bool Validate(SpellInfo const *) override
void HandleApply(AuraEffect const *, AuraEffectHandleModes)
void HandlePeriodicDummy(AuraEffect const *effect)
void HandleDummy(SpellEffIndex)
void Register() override
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
void HandleDummy(SpellEffIndex)
void Register() override
void HandleEffectApply(AuraEffect const *, AuraEffectHandleModes)
bool CheckProc(ProcEventInfo &eventInfo)
void HandleProc(AuraEffect *aurEff, ProcEventInfo &eventInfo)
bool Validate(SpellInfo const *) override
bool CheckProc(ProcEventInfo &eventInfo)
void HandleProc(AuraEffect *aurEff, ProcEventInfo &eventInfo)
void Register() override
bool Validate(SpellInfo const *) override
void CalculatePeriod(AuraEffect const *, bool &, int32 &period)
void HandleScript(SpellEffIndex effIndex)
void HandleDummy(SpellEffIndex)
bool Validate(SpellInfo const *) override
void Register() override
bool Validate(SpellInfo const *) override
void OnApply(AuraEffect const *, AuraEffectHandleModes)
void OnRemove(AuraEffect const *, AuraEffectHandleModes)
void Register() override
bool CheckCaster(Unit *target)
void HandleDummy(SpellEffIndex)
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
void Register() override
void HandleDummy(SpellEffIndex)
void HandleScript(SpellEffIndex effIndex)
bool Validate(SpellInfo const *) override
void Register() override
void HandleDummy(SpellEffIndex)
bool Validate(SpellInfo const *) override
SpellCastResult CheckCast()
bool Validate(SpellInfo const *) override
void HandleScript(SpellEffIndex effIndex)
bool Validate(SpellInfo const *spellInfo) override
bool CheckCooldownAura(ProcEventInfo &eventInfo)
bool Validate(SpellInfo const *) override
void TriggerIsolatedStrikeCheck(AuraEffect *aurEff, ProcEventInfo &eventInfo)
bool CheckProc(AuraEffect const *, ProcEventInfo &eventInfo)
void HandleProc(AuraEffect *aurEff, ProcEventInfo &procInfo)
bool Validate(SpellInfo const *) override
bool IsDemon(AuraEffect const *, ProcEventInfo &eventInfo)
void OnRemove(AuraEffect const *, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
void OnStackChange(AuraEffect const *, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
bool CheckProc(ProcEventInfo &eventInfo)
void HandleProc(AuraEffect *aurEff, ProcEventInfo &eventInfo)
void OnRemove(AuraEffect const *, AuraEffectHandleModes)
void Register() override
void HandleProc(ProcEventInfo &procInfo)
void Register() override
void HandleProc(AuraEffect *aurEff, ProcEventInfo &eventInfo)
AuraScript * GetAuraScript() const override
spell_item_shard_of_the_scale(char const *ScriptName)
spell_item_shiver_venom_weapon_proc(ShiverVenomSpell additionalProcSpellId)
void HandleAdditionalProc(AuraEffect *aurEff, ProcEventInfo &procInfo)
bool Validate(SpellInfo const *) override
void HandleDummy(SpellEffIndex)
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
void HandleDummy(SpellEffIndex)
bool Validate(SpellInfo const *) override
void HandleProc(AuraEffect *aurEff, ProcEventInfo &eventInfo)
void HandleProc(AuraEffect *aurEff, ProcEventInfo &eventInfo)
spell_item_sunwell_neck(char const *ScriptName)
AuraScript * GetAuraScript() const override
void HandleProc(AuraEffect *aurEff, ProcEventInfo &eventInfo)
bool Validate(SpellInfo const *) override
void OnRemove(AuraEffect const *effect, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
void HandleDummy(SpellEffIndex)
void FilterTargets(std::list< WorldObject * > &targets)
void CalculateAmount(AuraEffect const *, SpellEffectValue &amount, bool &)
void HandleTargets(std::list< WorldObject * > &targetList)
void HandleDummy(SpellEffIndex)
SpellScript * GetSpellScript() const override
spell_item_trigger_spell(char const *name, uint32 triggeredSpellId)
void OnRemove(AuraEffect const *, AuraEffectHandleModes)
spell_item_trinket_stack_AuraScript(uint32 stackSpell, uint32 triggerSpell)
void HandleProc(AuraEffect *aurEff, ProcEventInfo &eventInfo)
spell_item_trinket_stack(char const *scriptName, uint32 stackSpell, uint32 triggerSpell)
AuraScript * GetAuraScript() const override
bool Validate(SpellInfo const *) override
void HandleDummy(SpellEffIndex)
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
void HandleDummy(SpellEffIndex)
bool CheckProc(ProcEventInfo &procInfo)
void HandleDummy(SpellEffIndex)
bool CheckProc(ProcEventInfo &eventInfo)
void HandleDummy(SpellEffIndex)
bool Validate(SpellInfo const *) override
void OnRemove(AuraEffect const *, AuraEffectHandleModes)
bool Validate(SpellInfo const *spellInfo) override
void OnRemove(AuraEffect const *effect, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
void HandleTeleport(SpellEffIndex effIndex)
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
void HandleScript(SpellEffIndex)
AuraScript * GetAuraScript() const override
spell_item_zandalarian_charm(char const *ScriptName, uint32 SpellId)
bool CheckProc(AuraEffect const *, ProcEventInfo &eventInfo)
void HandleTriggerSpell(AuraEffect const *)
void Register() override
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
AuraProcRemoveSpells
DarkmoonCardSpells
@ SPELL_DARKMOON_CARD_STRENGTH
@ SPELL_DARKMOON_CARD_AGILITY
@ SPELL_DARKMOON_CARD_VERSATILITY
@ SPELL_DARKMOON_CARD_INTELLECT
GnomishDeathRay
@ SPELL_GNOMISH_DEATH_RAY_SELF
@ SPELL_GNOMISH_DEATH_RAY_TARGET
ScrollOfRecall
@ SPELL_SCROLL_OF_RECALL_III
@ SPELL_LOST
@ SPELL_SCROLL_OF_RECALL_FAIL_ALLIANCE_1
@ SPELL_SCROLL_OF_RECALL_I
@ SPELL_SCROLL_OF_RECALL_II
@ SPELL_SCROLL_OF_RECALL_FAIL_HORDE_1
HighfathersMachination
@ SPELL_HIGHFATHERS_TIMEKEEPING_HEAL
Heartpierce
@ SPELL_INVIGORATION_RP_HERO
@ SPELL_INVIGORATION_MANA
@ SPELL_INVIGORATION_ENERGY_HERO
@ SPELL_INVIGORATION_MANA_HERO
@ SPELL_INVIGORATION_RAGE_HERO
@ SPELL_INVIGORATION_RP
@ SPELL_INVIGORATION_RAGE
@ SPELL_INVIGORATION_ENERGY
VanquishedClutchesSpells
@ SPELL_CONSTRICTOR
@ SPELL_CRUSHER
@ SPELL_CORRUPTOR
BlessingOfAncientKings
@ SPELL_PROTECTION_OF_ANCIENT_KINGS
NitroBoosts
@ SPELL_NITRO_BOOSTS_SUCCESS
@ SPELL_NITRO_BOOSTS_PARACHUTE
@ SPELL_NITRO_BOOSTS_BACKFIRE
ShiverVenomSpell
@ SPELL_SHIVER_VENOM
@ SPELL_VENOMOUS_LANCE
@ SPELL_SHIVERING_BOLT
FlaskOfTheNorthSpells
@ SPELL_FLASK_OF_THE_NORTH_SP
@ SPELL_FLASK_OF_THE_NORTH_STR
@ SPELL_FLASK_OF_THE_NORTH_AP
PowerCircle
@ SPELL_LIMITLESS_POWER
HarmPreventionBelt
@ SPELL_FORCEFIELD_COLLAPSE
GenericData
@ SPELL_MECHANICAL_DRAGONLING
@ SPELL_MITHRIL_MECHANICAL_DRAGONLING
@ SPELL_BATTLE_CHICKEN
@ SPELL_ARCANITE_DRAGONLING
UnderbellyElixirSpells
@ SPELL_UNDERBELLY_ELIXIR_TRIGGERED2
@ SPELL_UNDERBELLY_ELIXIR_TRIGGERED1
@ SPELL_UNDERBELLY_ELIXIR_TRIGGERED3
@ NPC_GHOUL
@ MAX_GHOULS
Poultryzer
@ SPELL_POULTRYIZER_SUCCESS
@ SPELL_POULTRYIZER_BACKFIRE
ManaDrainSpells
@ SPELL_MANA_DRAIN_LEECH
@ SPELL_MANA_DRAIN_ENERGIZE
NoggenfoggerElixirSpells
@ SPELL_NOGGENFOGGER_ELIXIR_TRIGGERED1
@ SPELL_NOGGENFOGGER_ELIXIR_TRIGGERED2
@ SPELL_NOGGENFOGGER_ELIXIR_TRIGGERED3
DesperateDefense
@ SPELL_DESPERATE_RAGE
Defibrillate
@ SPELL_GOBLIN_JUMPER_CABLES_XL_FAIL
@ SPELL_GOBLIN_JUMPER_CABLES_FAIL
@ TEXT_SMALL_FEAST
@ TEXT_GREAT_FEAST
@ TEXT_BOUNTIFUL_FEAST
@ TEXT_GIGANTIC_FEAST
@ TEXT_FISH_FEAST
SwiftHandJusticeMisc
@ SPELL_SWIFT_HAND_OF_JUSTICE_HEAL
RocketBoots
@ SPELL_ROCKET_BOOTS_PROC
DemonBroiledSurprise
@ NPC_ABYSSAL_FLAMEBRINGER
@ SPELL_CREATE_DEMON_BROILED_SURPRISE
@ QUEST_SUPER_HOT_STEW
MindControlCap
@ SPELL_GNOMISH_MIND_CONTROL_CAP
@ ROLL_CHANCE_NO_BACKFIRE
@ SPELL_DULLARD
@ ROLL_CHANCE_DULLARD
NecroticTouch
@ SPELL_ITEM_NECROTIC_TOUCH_PROC
ZandalarianCharms
@ SPELL_RESTLESS_STRENGTH_AURA_STACK
@ SPELL_UNSTABLE_POWER_AURA_STACK
MagicEater
@ SPELL_WELL_FED_3
@ SPELL_WELL_FED_5
@ SPELL_WILD_MAGIC
@ SPELL_WELL_FED_2
@ SPELL_WELL_FED_1
@ SPELL_WELL_FED_4
MingoFortune
@ SPELL_CREATE_FORTUNE_4
@ SPELL_CREATE_FORTUNE_10
@ SPELL_CREATE_FORTUNE_6
@ SPELL_CREATE_FORTUNE_19
@ SPELL_CREATE_FORTUNE_20
@ SPELL_CREATE_FORTUNE_9
@ SPELL_CREATE_FORTUNE_17
@ SPELL_CREATE_FORTUNE_12
@ SPELL_CREATE_FORTUNE_18
@ SPELL_CREATE_FORTUNE_7
@ SPELL_CREATE_FORTUNE_5
@ SPELL_CREATE_FORTUNE_1
@ SPELL_CREATE_FORTUNE_16
@ SPELL_CREATE_FORTUNE_13
@ SPELL_CREATE_FORTUNE_15
@ SPELL_CREATE_FORTUNE_14
@ SPELL_CREATE_FORTUNE_11
@ SPELL_CREATE_FORTUNE_8
@ SPELL_CREATE_FORTUNE_2
@ SPELL_CREATE_FORTUNE_3
LifegivingGem
@ SPELL_GIFT_OF_LIFE_1
@ SPELL_GIFT_OF_LIFE_2
AirRifleSpells
@ SPELL_AIR_RIFLE_SHOOT_SELF
@ SPELL_AIR_RIFLE_HOLD_VISUAL
@ SPELL_AIR_RIFLE_SHOOT
UniversalRemote
@ SPELL_CONTROL_MACHINE
@ SPELL_TARGET_LOCK
@ SPELL_MOBILITY_MALFUNCTION
DireBrew
@ MODEL_CLASS_MAIL_FEMALE
@ MODEL_CLASS_LEATHER_FEMALE
@ MODEL_CLASS_MAIL_MALE
@ MODEL_CLASS_CLOTH_FEMALE
@ MODEL_CLASS_PLATE_MALE
@ MODEL_CLASS_CLOTH_MALE
@ MODEL_CLASS_LEATHER_MALE
@ MODEL_CLASS_PLATE_FEMALE
MakeAWish
@ SPELL_SUMMON_FURIOUS_MR_PINCHY
@ SPELL_MR_PINCHYS_GIFT
@ SPELL_TINY_MAGICAL_CRAWDAD
@ SPELL_SUMMON_MIGHTY_MR_PINCHY
@ SPELL_MR_PINCHYS_BLESSING
NighInvulnerability
@ SPELL_COMPLETE_VULNERABILITY
@ SPELL_NIGH_INVULNERABILITY
ShadowsFate
@ SPELL_SOUL_FEAST
@ NPC_SINDRAGOSA
@ SPELL_WORLD_QUELLER_FOCUS
@ SPELL_BRUTAL_KINSHIP_2
@ SPELL_BATTLE_TRANCE
@ SPELL_TALISMAN_OF_ASCENDANCE
@ SPELL_JOM_GABBAR
@ SPELL_BRUTAL_KINSHIP_1
GreatmothersSoulcather
@ SPELL_FORCE_CAST_SUMMON_GNOME_SOUL
void AddSC_item_spell_scripts()
TransporterSpells
@ SPELL_TRANSFORM_ALLIANCE
@ SPELL_SOUL_SPLIT_EVIL
@ SPELL_TRANSFORM_HORDE
@ SPELL_TRANSPORTER_MALFUNCTION_CHICKEN
@ SPELL_TRANSPORTER_MALFUNCTION_SMALLER
@ SPELL_TRANSPORTER_MALFUNCTION_FIRE
@ SPELL_EVIL_TWIN
@ SPELL_SOUL_SPLIT_GOOD
@ SPELL_TRANSPORTER_MALFUNCTION_BIGGER
DeathChoiceSpells
@ SPELL_DEATH_CHOICE_HEROIC_AURA
@ SPELL_DEATH_CHOICE_HEROIC_STRENGTH
@ SPELL_DEATH_CHOICE_NORMAL_AURA
@ SPELL_DEATH_CHOICE_NORMAL_STRENGTH
@ SPELL_DEATH_CHOICE_NORMAL_AGILITY
@ SPELL_DEATH_CHOICE_HEROIC_AGILITY
FateRuneOfUnsurpassedVigor
@ SPELL_UNSURPASSED_VIGOR
ZezzaksShard
@ SPELL_EYE_OF_GRILLOK
MercurialShield
@ SPELL_MERCURIAL_SHIELD
CompleteRaptorCapture
@ SPELL_RAPTOR_CAPTURE_CREDIT
DeviateFishSpells
@ SPELL_SHRINK
@ SPELL_PARTY_TIME
@ SPELL_INVIGORATE
@ SPELL_REJUVENATION
@ SPELL_HEALTHY_SPIRIT
@ SPELL_SLEEPY
LowerCityPrayerbook
@ SPELL_BLESSING_OF_LOWER_CITY_SHAMAN
@ SPELL_BLESSING_OF_LOWER_CITY_PALADIN
@ SPELL_BLESSING_OF_LOWER_CITY_DRUID
@ SPELL_BLESSING_OF_LOWER_CITY_PRIEST
SoulPreserver
@ SPELL_SOUL_PRESERVER_PALADIN
@ SPELL_SOUL_PRESERVER_SHAMAN
@ SPELL_SOUL_PRESERVER_DRUID
@ SPELL_SOUL_PRESERVER_PRIEST
DeadlyPrecision
@ SPELL_DEADLY_PRECISION
GoblinWeatherMachine
@ SPELL_PERSONALIZED_WEATHER2
@ SPELL_PERSONALIZED_WEATHER1
@ SPELL_PERSONALIZED_WEATHER4
@ SPELL_PERSONALIZED_WEATHER3
AlchemistStone
@ SPELL_ALCHEMIST_STONE_EXTRA_HEAL
@ SPELL_ALCHEMIST_STONE_EXTRA_MANA
SephuzsSecret
@ SPELL_SEPHUZS_SECRET_COOLDOWN
uint32 const WormholeTargetLocations[]
AshbringerSounds
@ SOUND_ASHBRINGER_6
@ SOUND_ASHBRINGER_11
@ SOUND_ASHBRINGER_12
@ SOUND_ASHBRINGER_5
@ SOUND_ASHBRINGER_1
@ SOUND_ASHBRINGER_4
@ SOUND_ASHBRINGER_3
@ SOUND_ASHBRINGER_2
@ SOUND_ASHBRINGER_7
@ SOUND_ASHBRINGER_10
@ SOUND_ASHBRINGER_8
@ SOUND_ASHBRINGER_9
ChickenCover
@ QUEST_CHICKEN_PARTY
@ SPELL_CAPTURE_CHICKEN_ESCAPE
@ QUEST_FLOWN_THE_COOP
@ SPELL_CHICKEN_NET
Eggnog
@ SPELL_EGG_NOG_REINDEER
@ SPELL_EGG_NOG_SNOWMAN
DeathbringersWill
@ SPELL_AGILITY_OF_THE_VRYKUL_HERO
@ SPELL_STRENGTH_OF_THE_TAUNKA_HERO
@ SPELL_POWER_OF_THE_TAUNKA
@ SPELL_POWER_OF_THE_TAUNKA_HERO
@ SPELL_SPEED_OF_THE_VRYKUL
@ SPELL_STRENGTH_OF_THE_TAUNKA
@ SPELL_AIM_OF_THE_IRON_DWARVES
@ SPELL_SPEED_OF_THE_VRYKUL_HERO
@ SPELL_AIM_OF_THE_IRON_DWARVES_HERO
@ SPELL_AGILITY_OF_THE_VRYKUL
@ SPELL_SHADOWMOURNE_VISUAL_HIGH
@ SPELL_SHADOWMOURNE_CHAOS_BANE_BUFF
@ SPELL_SHADOWMOURNE_SOUL_FRAGMENT
@ SPELL_SHADOWMOURNE_CHAOS_BANE_DAMAGE
@ SPELL_SHADOWMOURNE_VISUAL_LOW
AngerCapacitor
@ SPELL_MANIFEST_ANGER_OFF_HAND
@ SPELL_MANIFEST_ANGER_MAIN_HAND
@ SPELL_MOTE_OF_ANGER
ShardOfTheScale
@ SPELL_PURIFIED_CAUTERIZING_HEAL
@ SPELL_PURIFIED_SEARING_FLAMES
@ SPELL_SHINY_SEARING_FLAMES
@ SPELL_SHINY_CAUTERIZING_HEAL
PersistentShieldMisc
@ SPELL_PERSISTENT_SHIELD_TRIGGERED
Sinkholes
@ NPC_NORTHEAST_SINKHOLE
@ NPC_SOUTH_SINKHOLE
@ NPC_NORTHWEST_SINKHOLE
PurifyHelboarMeat
@ SPELL_SUMMON_TOXIC_HELBOAR_MEAT
@ SPELL_SUMMON_PURIFIED_HELBOAR_MEAT
SavoryDeviateDelight
@ SPELL_FLIP_OUT_FEMALE
@ SPELL_FLIP_OUT_MALE
@ SPELL_YAAARRRR_FEMALE
@ SPELL_YAAARRRR_MALE
WormholeGeneratorPandariaSpell
@ SPELL_WORMHOLE_PANDARIA_CRANE_STATUE
@ SPELL_WORMHOLE_PANDARIA_ISLE_OF_RECKONING
@ SPELL_WORMHOLE_PANDARIA_SRA_VESS
@ SPELL_WORMHOLE_PANDARIA_WHITEPETAL_LAKE
@ SPELL_WORMHOLE_PANDARIA_EMPERORS_OMEN
@ SPELL_WORMHOLE_PANDARIA_KUNLAI_UNDERWATER
@ SPELL_WORMHOLE_PANDARIA_ZANVESS_TREE
@ SPELL_WORMHOLE_PANDARIA_RIKKITUN_VILLAGE
@ SPELL_WORMHOLE_PANDARIA_ANGLERS_WHARF
HourglassSand
@ SPELL_BROOD_AFFLICTION_BRONZE
BrittleArmor
@ SPELL_BRITTLE_ARMOR
GoblinBombDispenser
@ SPELL_MALFUNCTION_EXPLOSION
@ SPELL_SUMMON_GOBLIN_BOMB
FrozenShadoweave
@ SPELL_SHADOWMEND
TauntFlag
@ SPELL_TAUNT_FLAG
@ EMOTE_PLANTS_FLAG
MarkOfConquest
@ SPELL_MARK_OF_CONQUEST_ENERGIZE
SixDemonBagSpells
@ SPELL_FROSTBOLT
@ SPELL_SUMMON_FELHOUND_MINION
@ SPELL_FIREBALL
@ SPELL_CHAIN_LIGHTNING
@ SPELL_ENVELOPING_WINDS
@ SPELL_POLYMORPH
PygmyOil
@ SPELL_PYGMY_OIL_SMALLER_AURA
@ SPELL_PYGMY_OIL_PYGMY_AURA
AmalgamsSeventhSpine
@ SPELL_FRAGILE_ECHOES_DRUID
@ SPELL_FRAGILE_ECHO_ENERGIZE
@ SPELL_FRAGILE_ECHOES_PRIEST_DISCIPLINE
@ SPELL_FRAGILE_ECHOES_MONK
@ SPELL_FRAGILE_ECHOES_EVOKER
@ SPELL_FRAGILE_ECHOES_PALADIN
@ SPELL_FRAGILE_ECHOES_SHAMAN
@ SPELL_FRAGILE_ECHOES_PRIEST_HOLY
AegisOfPreservation
@ SPELL_AEGIS_HEAL
NetOMaticSpells
@ SPELL_NET_O_MATIC_TRIGGERED2
@ SPELL_NET_O_MATIC_TRIGGERED1
@ SPELL_NET_O_MATIC_TRIGGERED3
PetHealing
@ SPELL_HEALTH_LINK
ImpaleLeviroth
@ NPC_LEVIROTH
@ SPELL_LEVIROTH_SELF_IMPALE
SocretharsStone
@ SPELL_SOCRETHAR_FROM_SEAT
@ SPELL_SOCRETHAR_TO_SEAT
SeepingScourgewing
@ SPELL_ISOLATED_STRIKE
@ SPELL_SHADOW_STRIKE_AOE_CHECK
std::array< uint32, 20 > const CreateFortuneSpells
TrinketStackSpells
@ SPELL_LIGHTNING_CAPACITOR_AURA
@ SPELL_THUNDER_CAPACITOR_AURA
@ SPELL_TOC25_CASTER_TRINKET_HEROIC_TRIGGER
@ SPELL_LIGHTNING_CAPACITOR_TRIGGER
@ SPELL_TOC25_CASTER_TRINKET_HEROIC_STACK
@ SPELL_TOC25_CASTER_TRINKET_NORMAL_TRIGGER
@ SPELL_TOC25_CASTER_TRINKET_NORMAL_AURA
@ SPELL_THUNDER_CAPACITOR_TRIGGER
@ SPELL_TOC25_CASTER_TRINKET_NORMAL_STACK
@ SPELL_THUNDER_CAPACITOR_STACK
@ SPELL_LIGHTNING_CAPACITOR_STACK
@ SPELL_TOC25_CASTER_TRINKET_HEROIC_AURA
ExaltedSunwellNeck
@ SPELL_LIGHTS_STRENGTH
@ FACTION_ALDOR
@ SPELL_ARCANE_SURGE
@ SPELL_ARCANE_STRIKE
@ SPELL_LIGHTS_SALVATION
@ SPELL_ARCANE_INSIGHT
@ SPELL_LIGHTS_WARD
@ FACTION_SCRYERS
@ SPELL_LIGHTS_WRATH
@ SPELL_ARCANE_BOLT
MirrensDrinkingHat
@ SPELL_AERIE_PEAK_PALE_ALE
@ SPELL_STOUTHAMMER_LITE
@ SPELL_LOCH_MODAN_LAGER
DiscerningEyeBeastMisc
@ SPELL_DISCERNING_EYE_BEAST
AuraOfMadness
@ SPELL_MARTYR_COMPLEX
@ SPELL_NARCISSISM
@ SPELL_DEMENTIA_NEG
@ SPELL_SOCIOPATH
@ SPELL_PARANOIA
@ SPELL_DELUSIONAL
@ SPELL_DEMENTIA_POS
@ SPELL_KLEPTOMANIA
@ SPELL_MANIC
@ SPELL_MEGALOMANIA
@ SPELL_DEMENTIA
@ SAY_MADNESS
TriggerCastFlags TriggerFlags
Optional< int32 > OriginalCastItemLevel
CastSpellExtraArgs & SetTriggeringSpell(Spell const *triggeringSpell)
Definition Spell.cpp:9707
CastSpellExtraArgs & AddSpellBP0(SpellEffectValue val)
CastSpellExtraArgs & AddSpellMod(SpellValueMod mod, int32 val)
constexpr float GetPositionZ() const
Definition Position.h:89