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
126
127// 37877 - Blessing of Faith
129{
140
141 void HandleDummy(SpellEffIndex /*effIndex*/)
142 {
143 if (Unit* unitTarget = GetHitUnit())
144 {
145 uint32 spellId = 0;
146 switch (unitTarget->GetClass())
147 {
148 case CLASS_DRUID:
150 break;
151 case CLASS_PALADIN:
153 break;
154 case CLASS_PRIEST:
156 break;
157 case CLASS_SHAMAN:
159 break;
160 default:
161 return; // ignore for non-healing classes
162 }
163
164 Unit* caster = GetCaster();
165 caster->CastSpell(caster, spellId, true);
166 }
167 }
168
173};
174
180
181// Item - 13503: Alchemist's Stone
182// Item - 35748: Guardian's Alchemist Stone
183// Item - 35749: Sorcerer's Alchemist Stone
184// Item - 35750: Redeemer's Alchemist Stone
185// Item - 35751: Assassin's Alchemist Stone
186// Item - 44322: Mercurial Alchemist Stone
187// Item - 44323: Indestructible Alchemist's Stone
188// Item - 44324: Mighty Alchemist's Stone
189
190// 17619 - Alchemist Stone
192{
193 bool Validate(SpellInfo const* /*spellInfo*/) override
194 {
195 return ValidateSpellInfo(
196 {
199 });
200 }
201
202 bool CheckProc(ProcEventInfo& eventInfo)
203 {
205 }
206
207 void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
208 {
210
211 uint32 spellId = 0;
212 int32 amount = int32(eventInfo.GetDamageInfo()->GetDamage() * 0.4f);
213
218
219 if (!spellId)
220 return;
221
222 Unit* caster = eventInfo.GetActionTarget();
223 CastSpellExtraArgs args(aurEff);
224 args.AddSpellBP0(amount);
225 caster->CastSpell(nullptr, spellId, args);
226 }
227
233};
234
241
242// Item - 50351: Tiny Abomination in a Jar
243// 71406 - Anger Capacitor
244
245// Item - 50706: Tiny Abomination in a Jar (Heroic)
246// 71545 - Anger Capacitor
247template <uint8 StackAmount>
249{
250 public:
251 spell_item_anger_capacitor(char const* ScriptName) : SpellScriptLoader(ScriptName) { }
252
253 template <uint8 Stacks>
255 {
256 bool Validate(SpellInfo const* /*spellInfo*/) override
257 {
258 return ValidateSpellInfo(
259 {
263 });
264 }
265
266 void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
267 {
269 Unit* caster = eventInfo.GetActor();
270 Unit* target = eventInfo.GetActionTarget();
271
272 caster->CastSpell(nullptr, SPELL_MOTE_OF_ANGER, true);
273 Aura const* motes = caster->GetAura(SPELL_MOTE_OF_ANGER);
274 if (!motes || motes->GetStackAmount() < Stacks)
275 return;
276
279 if (Player* player = caster->ToPlayer())
280 if (player->GetWeaponForAttack(OFF_ATTACK, true) && roll_chance(50))
282
283 caster->CastSpell(target, spellId, aurEff);
284 }
285
286 void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
287 {
289 }
290
296 };
297
298 AuraScript* GetAuraScript() const override
299 {
301 }
302};
303
304// 26400 - Arcane Shroud
306{
307 void CalculateAmount(AuraEffect const* /*aurEff*/, SpellEffectValue& amount, bool& /*canBeRecalculated*/)
308 {
309 int32 diff = GetUnitOwner()->GetLevel() - 60;
310 if (diff > 0)
311 amount += 2 * diff;
312 }
313
318};
319
321{
322 SPELL_SOCIOPATH = 39511, // Sociopath: +35 strength(Paladin, Rogue, Druid, Warrior)
323 SPELL_DELUSIONAL = 40997, // Delusional: +70 attack power(Rogue, Hunter, Paladin, Warrior, Druid)
324 SPELL_KLEPTOMANIA = 40998, // Kleptomania: +35 agility(Warrior, Rogue, Paladin, Hunter, Druid)
325 SPELL_MEGALOMANIA = 40999, // Megalomania: +41 damage / healing(Druid, Shaman, Priest, Warlock, Mage, Paladin)
326 SPELL_PARANOIA = 41002, // Paranoia: +35 spell / melee / ranged crit strike rating(All classes)
327 SPELL_MANIC = 41005, // Manic: +35 haste(spell, melee and ranged) (All classes)
328 SPELL_NARCISSISM = 41009, // Narcissism: +35 intellect(Druid, Shaman, Priest, Warlock, Mage, Paladin, Hunter)
329 SPELL_MARTYR_COMPLEX = 41011, // Martyr Complex: +35 stamina(All classes)
330 SPELL_DEMENTIA = 41404, // Dementia: Every 5 seconds either gives you +5/-5% damage/healing. (Druid, Shaman, Priest, Warlock, Mage, Paladin)
331
334
335 SAY_MADNESS = 21954
337
338// Item - 31859: Darkmoon Card: Madness
339// 39446 - Aura of Madness
341{
342 bool Validate(SpellInfo const* /*spellInfo*/) override
343 {
344 return ValidateSpellInfo(
345 {
355 }) && sBroadcastTextStore.LookupEntry(SAY_MADNESS);
356 }
357
358 void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
359 {
360 static std::vector<uint32> const triggeredSpells[MAX_CLASSES] =
361 {
362 //CLASS_NONE
363 { },
364 //CLASS_WARRIOR
366 //CLASS_PALADIN
368 //CLASS_HUNTER
370 //CLASS_ROGUE
372 //CLASS_PRIEST
374 //CLASS_DEATH_KNIGHT
376 //CLASS_SHAMAN
378 //CLASS_MAGE
380 //CLASS_WARLOCK
382 //CLASS_UNK
383 { },
384 //CLASS_DRUID
386 };
387
389 Unit* caster = eventInfo.GetActor();
390 uint32 spellId = Trinity::Containers::SelectRandomContainerElement(triggeredSpells[caster->GetClass()]);
391 caster->CastSpell(caster, spellId, aurEff);
392
393 if (roll_chance(10))
394 caster->Unit::Say(SAY_MADNESS);
395 }
396
401};
402
403// 41404 - Dementia
405{
406 bool Validate(SpellInfo const* /*spellInfo*/) override
407 {
408 return ValidateSpellInfo(
409 {
412 });
413 }
414
420
425};
426
427// 24590 - Brittle Armor
429{
430 SPELL_BRITTLE_ARMOR = 24575
432
434{
435 bool Validate(SpellInfo const* /*spellInfo*/) override
436 {
438 }
439
444
449};
450
451// 64411 - Blessing of Ancient Kings (Val'anyr, Hammer of Ancient Kings)
456
458{
459 bool Validate(SpellInfo const* /*spellInfo*/) override
460 {
462 }
463
464 bool CheckProc(ProcEventInfo& eventInfo)
465 {
466 HealInfo* healInfo = eventInfo.GetHealInfo();
467 return healInfo && healInfo->GetHeal();
468 }
469
470 void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
471 {
473
474 SpellEffectValue absorb = CalculatePct(eventInfo.GetHealInfo()->GetHeal(), 15.0f);
476 {
477 // The shield can grow to a maximum size of 20,000 damage absorbtion
478 protEff->SetAmount(std::min(protEff->GetAmount() + absorb, 20000.0));
479
480 // Refresh and return to prevent replacing the aura
481 protEff->GetBase()->RefreshDuration();
482 }
483 else
484 {
485 CastSpellExtraArgs args(aurEff);
486 args.AddSpellBP0(absorb);
488 }
489 }
490
496};
497
498// 64415 Val'anyr Hammer of Ancient Kings - Equip Effect
500{
501 bool CheckProc(ProcEventInfo& eventInfo)
502 {
503 return eventInfo.GetHealInfo() && eventInfo.GetHealInfo()->GetEffectiveHeal() > 0;
504 }
505
510};
511
516
517// 71564 - Deadly Precision
531
532// 71563 - Deadly Precision Dummy
534{
535 bool Validate(SpellInfo const* /*spellInfo*/) override
536 {
538 }
539
540 void HandleDummy(SpellEffIndex /*effIndex*/)
541 {
542 SpellInfo const* spellInfo = sSpellMgr->AssertSpellInfo(SPELL_DEADLY_PRECISION, GetCastDifficulty());
545 GetCaster()->CastSpell(GetCaster(), spellInfo->Id, args);
546 }
547
552};
553
555{
556 SPELL_STRENGTH_OF_THE_TAUNKA = 71484, // +600 Strength
557 SPELL_AGILITY_OF_THE_VRYKUL = 71485, // +600 Agility
558 SPELL_POWER_OF_THE_TAUNKA = 71486, // +1200 Attack Power
559 SPELL_AIM_OF_THE_IRON_DWARVES = 71491, // +600 Critical
560 SPELL_SPEED_OF_THE_VRYKUL = 71492, // +600 Haste
561
562 SPELL_AGILITY_OF_THE_VRYKUL_HERO = 71556, // +700 Agility
563 SPELL_POWER_OF_THE_TAUNKA_HERO = 71558, // +1400 Attack Power
564 SPELL_AIM_OF_THE_IRON_DWARVES_HERO = 71559, // +700 Critical
565 SPELL_SPEED_OF_THE_VRYKUL_HERO = 71560, // +700 Haste
566 SPELL_STRENGTH_OF_THE_TAUNKA_HERO = 71561 // +700 Strength
568
569// Item - 50362: Deathbringer's Will
570// 71519 - Item - Icecrown 25 Normal Melee Trinket
571
572// Item - 50363: Deathbringer's Will
573// 71562 - Item - Icecrown 25 Heroic Melee Trinket
574template <uint32 StrengthSpellId, uint32 AgilitySpellId, uint32 APSpellId, uint32 CriticalSpellId, uint32 HasteSpellId>
576{
577 public:
578 spell_item_deathbringers_will(char const* ScriptName) : SpellScriptLoader(ScriptName) { }
579
580 template <uint32 Strength, uint32 Agility, uint32 AttackPower, uint32 Critical, uint32 Haste>
582 {
583 bool Validate(SpellInfo const* /*spellInfo*/) override
584 {
585 return ValidateSpellInfo(
586 {
587 Strength,
588 Agility,
589 AttackPower,
590 Critical,
591 Haste
592 });
593 }
594
595 void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
596 {
597 static std::vector<uint32> const triggeredSpells[MAX_CLASSES] =
598 {
599 //CLASS_NONE
600 { },
601 //CLASS_WARRIOR
602 { Strength, Critical, Haste },
603 //CLASS_PALADIN
604 { Strength, Critical, Haste },
605 //CLASS_HUNTER
606 { Agility, Critical, AttackPower },
607 //CLASS_ROGUE
608 { Agility, Haste, AttackPower },
609 //CLASS_PRIEST
610 { },
611 //CLASS_DEATH_KNIGHT
612 { Strength, Critical, Haste },
613 //CLASS_SHAMAN
614 { Agility, Haste, AttackPower },
615 //CLASS_MAGE
616 { },
617 //CLASS_WARLOCK
618 { },
619 //CLASS_UNK
620 { },
621 //CLASS_DRUID
622 { Strength, Agility, Haste }
623 };
624
626 Unit* caster = eventInfo.GetActor();
627 std::vector<uint32> const& randomSpells = triggeredSpells[caster->GetClass()];
628 if (randomSpells.empty())
629 return;
630
632 caster->CastSpell(caster, spellId, aurEff);
633 }
634
639 };
640
645};
646
647// 47770 - Roll Dice
649{
650 enum
651 {
653 };
654
655 bool Validate(SpellInfo const* /*spellInfo*/) override
656 {
658 return false;
659 return true;
660 }
661
662 bool Load() override
663 {
664 return GetCaster()->GetTypeId() == TYPEID_PLAYER;
665 }
666
667 void HandleScript(SpellEffIndex /*effIndex*/)
668 {
670
671 static uint32 const minimum = 1;
672 static uint32 const maximum = 100;
673
674 GetCaster()->ToPlayer()->DoRandomRoll(minimum, maximum);
675 }
676
681};
682
688
689// 23134 - Goblin Bomb
708
716
717// 46203 - Goblin Weather Machine
734
735// 8342 - Defibrillate (Goblin Jumper Cables) have 33% chance on success
736// 22999 - Defibrillate (Goblin Jumper Cables XL) have 50% chance on success
737// 54732 - Defibrillate (Gnomish Army Knife) have 67% chance on success
743
745{
746 public:
747 spell_item_defibrillate(char const* name, uint8 chance, uint32 failSpell = 0) : SpellScriptLoader(name), _chance(chance), _failSpell(failSpell) { }
748
750 {
751 public:
752 spell_item_defibrillate_SpellScript(uint8 chance, uint32 failSpell) : SpellScript(), _chance(chance), _failSpell(failSpell) { }
753
754 private:
755 bool Validate(SpellInfo const* /*spellInfo*/) override
756 {
758 }
759
761 {
762 if (roll_chance(_chance))
763 {
764 PreventHitDefaultEffect(effIndex);
765 if (_failSpell)
767 }
768 }
769
774
777 };
778
779 SpellScript* GetSpellScript() const override
780 {
782 }
783
784 private:
787};
788
793
794// 33896 - Desperate Defense
796{
797 bool Validate(SpellInfo const* /*spellInfo*/) override
798 {
800 }
801
802 void HandleProc(AuraEffect* aurEff, ProcEventInfo& /*eventInfo*/)
803 {
806 }
807
812};
813
814// http://www.wowhead.com/item=6522 Deviate Fish
815// 8063 Deviate Fish
825
827{
828 bool Load() override
829 {
830 return GetCaster()->GetTypeId() == TYPEID_PLAYER;
831 }
832
837
838 void HandleDummy(SpellEffIndex /*effIndex*/)
839 {
840 Unit* caster = GetCaster();
842 caster->CastSpell(caster, spellId, true);
843 }
844
849};
850
852{
853public:
854 PartyTimeEmoteEvent(Player* player) : _player(player) { }
855
856 bool Execute(uint64 /*time*/, uint32 /*diff*/) override
857 {
859 return true;
860
861 if (_player->isMoving())
863 else
865
866 _player->m_Events.AddEventAtOffset(this, RAND(5s, 10s, 15s));
867
868 return false; // do not delete re-added event in EventProcessor::Update
869 }
870
871private:
873};
874
876{
877 void HandleEffectApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
878 {
879 Player* player = GetOwner()->ToPlayer();
880 if (!player)
881 return;
882
883 player->m_Events.AddEventAtOffset(new PartyTimeEmoteEvent(player), RAND(5s, 10s, 15s));
884 }
885
890};
891
903
904// 51010 - Dire Brew
906{
907 void AfterApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
908 {
909 Unit* target = GetTarget();
910
911 uint32 model = 0;
912 uint8 gender = target->GetGender();
913 ChrClassesEntry const* chrClass = sChrClassesStore.AssertEntry(target->GetClass());
914 if (chrClass->ArmorTypeMask & (1 << ITEM_SUBCLASS_ARMOR_PLATE))
916 else if (chrClass->ArmorTypeMask & (1 << ITEM_SUBCLASS_ARMOR_MAIL))
918 else if (chrClass->ArmorTypeMask & (1 << ITEM_SUBCLASS_ARMOR_LEATHER))
920 else if (chrClass->ArmorTypeMask & (1 << ITEM_SUBCLASS_ARMOR_CLOTH))
922
923 if (model)
924 target->SetDisplayId(model);
925 }
926
931};
932
937
938// 59915 - Discerning Eye of the Beast Dummy
940{
941 bool Validate(SpellInfo const* /*spellInfo*/) override
942 {
944 }
945
946 void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
947 {
949 eventInfo.GetActor()->CastSpell(nullptr, SPELL_DISCERNING_EYE_BEAST, aurEff);
950 }
951
956};
957
958// 71610, 71641 - Echoes of Light (Althor's Abacus)
960{
961 void FilterTargets(std::list<WorldObject*>& targets)
962 {
963 if (targets.size() < 2)
964 return;
965
967
968 WorldObject* target = targets.front();
969 targets.clear();
970 targets.push_back(target);
971 }
972
977};
978
979// 30427 - Extract Gas (23821: Zapthrottle Mote Extractor)
981{
982 void PeriodicTick(AuraEffect const* /*aurEff*/)
983 {
985
986 // move loot to player inventory and despawn target
987 if (GetCaster() && GetCaster()->GetTypeId() == TYPEID_PLAYER &&
988 GetTarget()->GetTypeId() == TYPEID_UNIT &&
989 GetTarget()->ToCreature()->GetCreatureTemplate()->type == CREATURE_TYPE_GAS_CLOUD)
990 {
991 Player* player = GetCaster()->ToPlayer();
992 Creature* creature = GetTarget()->ToCreature();
993 CreatureDifficulty const* creatureDifficulty = creature->GetCreatureDifficulty();
994 // missing lootid has been reported on startup - just return
995 if (!creatureDifficulty->SkinLootID)
996 return;
997
998 player->AutoStoreLoot(creatureDifficulty->SkinLootID, LootTemplates_Skinning, ItemContext::NONE, true);
999 creature->DespawnOrUnsummon();
1000 }
1001 }
1002
1007};
1008
1009// 7434 - Fate Rune of Unsurpassed Vigor
1014
1016{
1017 bool Validate(SpellInfo const* /*spellInfo*/) override
1018 {
1020 }
1021
1022 void HandleProc(AuraEffect* /*aurEff*/, ProcEventInfo& /*eventInfo*/)
1023 {
1026 }
1027
1032};
1033
1042
1043/* 57301 - Great Feast
1044 57426 - Fish Feast
1045 58465 - Gigantic Feast
1046 58474 - Small Feast
1047 66476 - Bountiful Feast */
1049{
1050public:
1052
1053private:
1054 bool Validate(SpellInfo const* /*spellInfo*/) override
1055 {
1056 return sBroadcastTextStore.LookupEntry(_text);
1057 }
1058
1059 void HandleScript(SpellEffIndex /*effIndex*/)
1060 {
1061 Unit* caster = GetCaster();
1062 caster->Unit::TextEmote(_text, caster, false);
1063 }
1064
1069
1071};
1072
1073// http://www.wowhead.com/item=47499 Flask of the North
1074// 67019 Flask of the North
1081
1083{
1088
1089 void HandleDummy(SpellEffIndex /*effIndex*/)
1090 {
1091 Unit* caster = GetCaster();
1092 std::vector<uint32> possibleSpells;
1093 switch (caster->GetClass())
1094 {
1095 case CLASS_WARLOCK:
1096 case CLASS_MAGE:
1097 case CLASS_PRIEST:
1098 possibleSpells.push_back(SPELL_FLASK_OF_THE_NORTH_SP);
1099 break;
1100 case CLASS_DEATH_KNIGHT:
1101 case CLASS_WARRIOR:
1102 possibleSpells.push_back(SPELL_FLASK_OF_THE_NORTH_STR);
1103 break;
1104 case CLASS_ROGUE:
1105 case CLASS_HUNTER:
1106 possibleSpells.push_back(SPELL_FLASK_OF_THE_NORTH_AP);
1107 break;
1108 case CLASS_DRUID:
1109 case CLASS_PALADIN:
1110 possibleSpells.push_back(SPELL_FLASK_OF_THE_NORTH_SP);
1111 possibleSpells.push_back(SPELL_FLASK_OF_THE_NORTH_STR);
1112 break;
1113 case CLASS_SHAMAN:
1114 possibleSpells.push_back(SPELL_FLASK_OF_THE_NORTH_SP);
1115 possibleSpells.push_back(SPELL_FLASK_OF_THE_NORTH_AP);
1116 break;
1117 }
1118
1119 if (possibleSpells.empty())
1120 {
1121 TC_LOG_WARN("spells", "Missing spells for class {} in script spell_item_flask_of_the_north", caster->GetClass());
1122 return;
1123 }
1124
1125 caster->CastSpell(caster, Trinity::Containers::SelectRandomContainerElement(possibleSpells), true);
1126 }
1127
1132};
1133
1135{
1136 SPELL_SHADOWMEND = 39373
1138
1139// 39372 - Frozen Shadoweave
1140// Frozen Shadoweave set 3p bonus
1142{
1143 bool Validate(SpellInfo const* /*spellInfo*/) override
1144 {
1146 }
1147
1148 void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
1149 {
1151 DamageInfo* damageInfo = eventInfo.GetDamageInfo();
1152 if (!damageInfo || !damageInfo->GetDamage())
1153 return;
1154
1155 Unit* caster = eventInfo.GetActor();
1156 CastSpellExtraArgs args(aurEff);
1157 args.AddSpellBP0(CalculatePct(damageInfo->GetDamage(), aurEff->GetAmount()));
1158 caster->CastSpell(nullptr, SPELL_SHADOWMEND, args);
1159 }
1160
1165};
1166
1167// http://www.wowhead.com/item=10645 Gnomish Death Ray
1168// 13280 Gnomish Death Ray
1174
1176{
1177 bool Validate(SpellInfo const* /*spellInfo*/) override
1178 {
1180 }
1181
1182 void HandleDummy(SpellEffIndex /*effIndex*/)
1183 {
1184 Unit* caster = GetCaster();
1185 if (Unit* target = GetHitUnit())
1186 {
1187 if (urand(0, 99) < 15)
1188 caster->CastSpell(caster, SPELL_GNOMISH_DEATH_RAY_SELF, true); // failure
1189 else
1190 caster->CastSpell(target, SPELL_GNOMISH_DEATH_RAY_TARGET, true);
1191 }
1192 }
1193
1198};
1199
1200// Item 10721: Gnomish Harm Prevention Belt
1201// 13234 - Harm Prevention Belt
1206
1208{
1209 bool Validate(SpellInfo const* /*spellInfo*/) override
1210 {
1212 }
1213
1214 void HandleProc(ProcEventInfo& /*eventInfo*/)
1215 {
1217 }
1218
1223};
1224
1237
1238// Item - 49982: Heartpierce
1239// 71880 - Item - Icecrown 25 Normal Dagger Proc
1240
1241// Item - 50641: Heartpierce (Heroic)
1242// 71892 - Item - Icecrown 25 Heroic Dagger Proc
1243template <uint32 Energy, uint32 Mana, uint32 Rage, uint32 RunicPower>
1245{
1246 bool Validate(SpellInfo const* /*spellInfo*/) override
1247 {
1248 return ValidateSpellInfo(
1249 {
1250 Energy,
1251 Mana,
1252 Rage,
1253 RunicPower
1254 });
1255 }
1256
1257 void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
1258 {
1260 Unit* caster = eventInfo.GetActor();
1261
1262 uint32 spellId;
1263 switch (caster->GetPowerType())
1264 {
1265 case POWER_MANA:
1266 spellId = Mana;
1267 break;
1268 case POWER_ENERGY:
1269 spellId = Energy;
1270 break;
1271 case POWER_RAGE:
1272 spellId = Rage;
1273 break;
1274 // Death Knights can't use daggers, but oh well
1275 case POWER_RUNIC_POWER:
1276 spellId = RunicPower;
1277 break;
1278 default:
1279 return;
1280 }
1281
1282 caster->CastSpell(nullptr, spellId, aurEff);
1283 }
1284
1289};
1290
1295
1296// 23645 - Hourglass Sand
1298{
1299 bool Validate(SpellInfo const* /*spellInfo*/) override
1300 {
1302 }
1303
1308
1313};
1314
1315// 40971 - Bonus Healing (Crystal Spire of Karabor)
1317{
1318 bool Validate(SpellInfo const* spellInfo) override
1319 {
1320 return ValidateSpellEffect({ { spellInfo->Id, EFFECT_0 } });
1321 }
1322
1323 bool CheckProc(ProcEventInfo& eventInfo)
1324 {
1326 if (HealInfo* healInfo = eventInfo.GetHealInfo())
1327 if (Unit* healTarget = healInfo->GetTarget())
1328 if (healTarget->GetHealth() - healInfo->GetEffectiveHeal() <= healTarget->CountPctFromMaxHealth(pct))
1329 return true;
1330
1331 return false;
1332 }
1333
1338};
1339
1340// http://www.wowhead.com/item=27388 Mr. Pinchy
1341// 33060 Make a Wish
1350
1352{
1353 bool Load() override
1354 {
1355 return GetCaster()->GetTypeId() == TYPEID_PLAYER;
1356 }
1357
1358 bool Validate(SpellInfo const* /*spellInfo*/) override
1359 {
1360 return ValidateSpellInfo(
1361 {
1367 });
1368 }
1369
1370 void HandleDummy(SpellEffIndex /*effIndex*/)
1371 {
1372 Unit* caster = GetCaster();
1373 uint32 spellId = SPELL_MR_PINCHYS_GIFT;
1374 switch (urand(1, 5))
1375 {
1376 case 1: spellId = SPELL_MR_PINCHYS_BLESSING; break;
1377 case 2: spellId = SPELL_SUMMON_MIGHTY_MR_PINCHY; break;
1378 case 3: spellId = SPELL_SUMMON_FURIOUS_MR_PINCHY; break;
1379 case 4: spellId = SPELL_TINY_MAGICAL_CRAWDAD; break;
1380 }
1381 caster->CastSpell(caster, spellId, true);
1382 }
1383
1388};
1389
1394
1395// Item - 27920: Mark of Conquest
1396// Item - 27921: Mark of Conquest
1397// 33510 - Health Restore
1399{
1400 bool Validate(SpellInfo const* /*spellInfo*/) override
1401 {
1403 }
1404
1405 void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
1406 {
1408 {
1409 // in that case, do not cast heal spell
1411 // but mana instead
1412 eventInfo.GetActor()->CastSpell(nullptr, SPELL_MARK_OF_CONQUEST_ENERGIZE, aurEff);
1413 }
1414 }
1415
1420};
1421
1422// 26465 - Mercurial Shield
1427
1429{
1430 bool Validate(SpellInfo const* /*spellInfo*/) override
1431 {
1433 }
1434
1439
1444};
1445
1469
1477
1478// http://www.wowhead.com/item=32686 Mingo's Fortune Giblets
1479// 40802 Mingo's Fortune Generator
1497
1498// 71875, 71877 - Item - Black Bruise: Necrotic Touch Proc
1503
1505{
1506 bool Validate(SpellInfo const* /*spellInfo*/) override
1507 {
1509 }
1510
1511 bool CheckProc(ProcEventInfo& eventInfo)
1512 {
1513 if (!eventInfo.GetActionTarget()->IsAlive())
1514 return false;
1515
1516 DamageInfo* damageInfo = eventInfo.GetDamageInfo();
1517 return damageInfo && damageInfo->GetDamage();
1518 }
1519
1520 void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
1521 {
1523
1524 CastSpellExtraArgs args(aurEff);
1525 args.AddSpellBP0(CalculatePct(eventInfo.GetDamageInfo()->GetDamage(), aurEff->GetAmount()));
1526 eventInfo.GetActor()->CastSpell(eventInfo.GetActionTarget(), SPELL_ITEM_NECROTIC_TOUCH_PROC, args);
1527 }
1528
1534};
1535
1536// http://www.wowhead.com/item=10720 Gnomish Net-o-Matic Projector
1537// 13120 Net-o-Matic
1544
1546{
1547 bool Validate(SpellInfo const* /*spellInfo*/) override
1548 {
1549 return ValidateSpellInfo(
1550 {
1554 });
1555 }
1556
1557 void HandleDummy(SpellEffIndex /*effIndex*/)
1558 {
1559 if (Unit* target = GetHitUnit())
1560 {
1562 uint32 roll = urand(0, 99);
1563 if (roll < 2) // 2% for 30 sec self root (off-like chance unknown)
1565 else if (roll < 4) // 2% for 20 sec root, charge to target (off-like chance unknown)
1567
1568 GetCaster()->CastSpell(target, spellId, true);
1569 }
1570 }
1571
1576};
1577
1578// http://www.wowhead.com/item=8529 Noggenfogger Elixir
1579// 16589 Noggenfogger Elixir
1586
1588{
1589 bool Load() override
1590 {
1591 return GetCaster()->GetTypeId() == TYPEID_PLAYER;
1592 }
1593
1594 bool Validate(SpellInfo const* /*spellInfo*/) override
1595 {
1596 return ValidateSpellInfo(
1597 {
1601 });
1602 }
1603
1604 void HandleDummy(SpellEffIndex /*effIndex*/)
1605 {
1606 Unit* caster = GetCaster();
1608 switch (urand(1, 3))
1609 {
1610 case 1: spellId = SPELL_NOGGENFOGGER_ELIXIR_TRIGGERED1; break;
1611 case 2: spellId = SPELL_NOGGENFOGGER_ELIXIR_TRIGGERED2; break;
1612 }
1613
1614 caster->CastSpell(caster, spellId, true);
1615 }
1616
1621};
1622
1623// 29601 - Enlightenment (Pendant of the Violet Eye)
1625{
1626 bool CheckProc(ProcEventInfo& eventInfo)
1627 {
1628 if (Spell const* spell = eventInfo.GetProcSpell())
1629 if (spell->GetPowerTypeCostAmount(POWER_MANA) > 0)
1630 return true;
1631
1632 return false;
1633 }
1634
1639};
1640
1645
1646// 26467 - Persistent Shield
1648{
1649 bool Validate(SpellInfo const* /*spellInfo*/) override
1650 {
1652 }
1653
1654 bool CheckProc(ProcEventInfo& eventInfo)
1655 {
1656 return eventInfo.GetHealInfo() && eventInfo.GetHealInfo()->GetHeal();
1657 }
1658
1659 void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
1660 {
1661 Unit* caster = eventInfo.GetActor();
1662 Unit* target = eventInfo.GetActionTarget();
1663 SpellEffectValue bp0 = CalculatePct(eventInfo.GetHealInfo()->GetHeal(), 15);
1664
1665 // Scarab Brooch does not replace stronger shields
1666 if (AuraEffect const* shield = target->GetAuraEffect(SPELL_PERSISTENT_SHIELD_TRIGGERED, EFFECT_0, caster->GetGUID()))
1667 if (shield->GetAmount() > bp0)
1668 return;
1669
1670 CastSpellExtraArgs args(aurEff);
1671 args.AddSpellBP0(bp0);
1672 caster->CastSpell(target, SPELL_PERSISTENT_SHIELD_TRIGGERED, args);
1673 }
1674
1680};
1681
1683{
1684 SPELL_HEALTH_LINK = 37382
1686
1687// 37381 - Pet Healing
1688// Hunter T5 2P Bonus
1689// Warlock T5 2P Bonus
1691{
1692 bool Validate(SpellInfo const* /*spellInfo*/) override
1693 {
1695 }
1696
1697 void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
1698 {
1700 DamageInfo* damageInfo = eventInfo.GetDamageInfo();
1701 if (!damageInfo || !damageInfo->GetDamage())
1702 return;
1703
1704 CastSpellExtraArgs args(aurEff);
1705 args.AddSpellBP0(CalculatePct(damageInfo->GetDamage(), aurEff->GetAmount()));
1706 eventInfo.GetActor()->CastSpell(nullptr, SPELL_HEALTH_LINK, args);
1707 }
1708
1713};
1714
1715// 17512 - Piccolo of the Flaming Fire
1717{
1719 {
1720 PreventHitDefaultEffect(effIndex);
1721 if (Player* target = GetHitPlayer())
1722 target->HandleEmoteCommand(EMOTE_STATE_DANCE);
1723 }
1724
1729};
1730
1732{
1733 SPELL_LIMITLESS_POWER = 45044
1735
1736// 45043 - Power Circle (Shifting Naaru Sliver)
1738{
1739 bool Validate(SpellInfo const* /*spellInfo*/) override
1740 {
1742 }
1743
1744 bool CheckCaster(Unit* target)
1745 {
1746 return target->GetGUID() == GetCasterGUID();
1747 }
1748
1749 void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
1750 {
1751 GetTarget()->CastSpell(nullptr, SPELL_LIMITLESS_POWER, true);
1753 buff->SetDuration(GetDuration());
1754 }
1755
1756 void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
1757 {
1759 }
1760
1768};
1769
1770// http://www.wowhead.com/item=6657 Savory Deviate Delight
1771// 8213 Savory Deviate Delight
1779
1781{
1782 bool Load() override
1783 {
1784 return GetCaster()->GetTypeId() == TYPEID_PLAYER;
1785 }
1786
1787 bool Validate(SpellInfo const* /*spellInfo*/) override
1788 {
1789 return ValidateSpellInfo(
1790 {
1795 });
1796 }
1797
1798 void HandleDummy(SpellEffIndex /*effIndex*/)
1799 {
1800 Unit* caster = GetCaster();
1801 uint32 spellId = 0;
1802 switch (urand(1, 2))
1803 {
1804 // Flip Out - ninja
1805 case 1: spellId = (caster->GetNativeGender() == GENDER_MALE ? SPELL_FLIP_OUT_MALE : SPELL_FLIP_OUT_FEMALE); break;
1806 // Yaaarrrr - pirate
1807 case 2: spellId = (caster->GetNativeGender() == GENDER_MALE ? SPELL_YAAARRRR_MALE : SPELL_YAAARRRR_FEMALE); break;
1808 }
1809 caster->CastSpell(caster, spellId, true);
1810 }
1811
1816};
1817
1818// 48129 - Scroll of Recall
1819// 60320 - Scroll of Recall II
1820// 60321 - Scroll of Recall III
1830
1832{
1833 bool Load() override
1834 {
1835 return GetCaster()->GetTypeId() == TYPEID_PLAYER;
1836 }
1837
1839 {
1840 Unit* caster = GetCaster();
1841 uint8 maxSafeLevel = 0;
1842 switch (GetSpellInfo()->Id)
1843 {
1844 case SPELL_SCROLL_OF_RECALL_I: // Scroll of Recall
1845 maxSafeLevel = 40;
1846 break;
1847 case SPELL_SCROLL_OF_RECALL_II: // Scroll of Recall II
1848 maxSafeLevel = 70;
1849 break;
1850 case SPELL_SCROLL_OF_RECALL_III: // Scroll of Recal III
1851 maxSafeLevel = 80;
1852 break;
1853 default:
1854 break;
1855 }
1856
1857 if (caster->GetLevel() > maxSafeLevel)
1858 {
1859 caster->CastSpell(caster, SPELL_LOST, true);
1860
1861 // ALLIANCE from 60323 to 60330 - HORDE from 60328 to 60335
1863 if (GetCaster()->ToPlayer()->GetTeam() == HORDE)
1865
1866 GetCaster()->CastSpell(GetCaster(), spellId + urand(0, 7), true);
1867
1868 PreventHitDefaultEffect(effIndex);
1869 }
1870 }
1871
1876};
1877
1890
1891// 23442 - Dimensional Ripper - Everlook
1893{
1894 bool Validate(SpellInfo const* /*spellInfo*/) override
1895 {
1897 }
1898
1899 bool Load() override
1900 {
1901 return GetCaster()->GetTypeId() == TYPEID_PLAYER;
1902 }
1903
1904 void HandleScript(SpellEffIndex /* effIndex */)
1905 {
1906 int32 r = irand(0, 119);
1907 if (r <= 70) // 7/12 success
1908 return;
1909
1910 Unit* caster = GetCaster();
1911
1912 if (r < 100) // 4/12 evil twin
1913 caster->CastSpell(caster, SPELL_EVIL_TWIN, true);
1914 else // 1/12 fire
1915 caster->CastSpell(caster, SPELL_TRANSPORTER_MALFUNCTION_FIRE, true);
1916 }
1917
1922};
1923
1924// 36941 - Ultrasafe Transporter: Toshley's Station
1926{
1941
1942 bool Load() override
1943 {
1944 return GetCaster()->GetTypeId() == TYPEID_PLAYER;
1945 }
1946
1947 void HandleScript(SpellEffIndex /* effIndex */)
1948 {
1949 if (!roll_chance(50)) // 50% success
1950 return;
1951
1952 Unit* caster = GetCaster();
1953
1954 uint32 spellId = 0;
1955 switch (urand(0, 6))
1956 {
1957 case 0:
1959 break;
1960 case 1:
1962 break;
1963 case 2:
1964 spellId = SPELL_SOUL_SPLIT_EVIL;
1965 break;
1966 case 3:
1967 spellId = SPELL_SOUL_SPLIT_GOOD;
1968 break;
1969 case 4:
1970 if (caster->ToPlayer()->GetTeamId() == TEAM_ALLIANCE)
1971 spellId = SPELL_TRANSFORM_HORDE;
1972 else
1973 spellId = SPELL_TRANSFORM_ALLIANCE;
1974 break;
1975 case 5:
1977 break;
1978 case 6:
1979 spellId = SPELL_EVIL_TWIN;
1980 break;
1981 default:
1982 break;
1983 }
1984
1985 caster->CastSpell(caster, spellId, true);
1986 }
1987
1992};
1993
1994// 36890 - Dimensional Ripper - Area 52
1996{
1997 bool Validate(SpellInfo const* /*spellInfo*/) override
1998 {
1999 return ValidateSpellInfo(
2000 {
2006 });
2007 }
2008
2009 bool Load() override
2010 {
2011 return GetCaster()->GetTypeId() == TYPEID_PLAYER;
2012 }
2013
2014 void HandleScript(SpellEffIndex /* effIndex */)
2015 {
2016 if (!roll_chance(50)) // 50% success
2017 return;
2018
2019 Unit* caster = GetCaster();
2020
2021 uint32 spellId = 0;
2022 switch (urand(0, 3))
2023 {
2024 case 0:
2026 break;
2027 case 1:
2028 spellId = SPELL_SOUL_SPLIT_EVIL;
2029 break;
2030 case 2:
2031 spellId = SPELL_SOUL_SPLIT_GOOD;
2032 break;
2033 case 3:
2034 if (caster->ToPlayer()->GetTeamId() == TEAM_ALLIANCE)
2035 spellId = SPELL_TRANSFORM_HORDE;
2036 else
2037 spellId = SPELL_TRANSFORM_ALLIANCE;
2038 break;
2039 default:
2040 break;
2041 }
2042
2043 caster->CastSpell(caster, spellId, true);
2044 }
2045
2050};
2051
2052// 71169 - Shadow's Fate (Shadowmourne questline)
2054{
2056 NPC_SINDRAGOSA = 36853
2058
2060{
2061 bool CheckProc(ProcEventInfo& procInfo)
2062 {
2063 Unit* caster = procInfo.GetActor();
2064 if (!caster || caster->GetTypeId() != TYPEID_PLAYER)
2065 return false;
2066
2067 Unit* target = procInfo.GetActionTarget();
2068 if (!target || target->GetTypeId() != TYPEID_UNIT || target->IsCritter() || (target->GetEntry() != NPC_SINDRAGOSA && target->IsSummon()))
2069 return false;
2070
2071 return true;
2072 }
2073
2078};
2079
2081{
2083 {
2085
2086 Unit* caster = procInfo.GetActor();
2087 Unit* target = GetCaster();
2088 if (!caster || !target)
2089 return;
2090
2092 }
2093
2094 void Register() override
2095 {
2097 }
2098};
2099
2108
2109// 71903 - Item - Shadowmourne Legendary
2111{
2112 bool Validate(SpellInfo const* /*spellInfo*/) override
2113 {
2114 return ValidateSpellInfo(
2115 {
2119 });
2120 }
2121
2122 bool CheckProc(ProcEventInfo& eventInfo)
2123 {
2124 // cant collect shards while under effect of Chaos Bane buff
2125 return !eventInfo.GetActor()->HasAura(SPELL_SHADOWMOURNE_CHAOS_BANE_BUFF) && eventInfo.GetActionTarget()->IsAlive();
2126 }
2127
2128 void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
2129 {
2131 eventInfo.GetActor()->CastSpell(eventInfo.GetActor(), SPELL_SHADOWMOURNE_SOUL_FRAGMENT, aurEff);
2132
2133 // this can't be handled in AuraScript of SoulFragments because we need to know victim
2134 if (Aura* soulFragments = GetTarget()->GetAura(SPELL_SHADOWMOURNE_SOUL_FRAGMENT))
2135 {
2136 if (soulFragments->GetStackAmount() >= 10)
2137 {
2139 soulFragments->Remove();
2140 }
2141 }
2142 }
2143
2148
2155};
2156
2157// 71905 - Soul Fragment
2159{
2160 bool Validate(SpellInfo const* /*spellInfo*/) override
2161 {
2162 return ValidateSpellInfo(
2163 {
2167 });
2168 }
2169
2170 void OnStackChange(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
2171 {
2172 Unit* target = GetTarget();
2173 switch (GetStackAmount())
2174 {
2175 case 1:
2176 target->CastSpell(target, SPELL_SHADOWMOURNE_VISUAL_LOW, true);
2177 break;
2178 case 6:
2180 target->CastSpell(target, SPELL_SHADOWMOURNE_VISUAL_HIGH, true);
2181 break;
2182 case 10:
2184 target->CastSpell(target, SPELL_SHADOWMOURNE_CHAOS_BANE_BUFF, true);
2185 break;
2186 default:
2187 break;
2188 }
2189 }
2190
2191 void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
2192 {
2193 Unit* target = GetTarget();
2196 }
2197
2203};
2204
2205// http://www.wowhead.com/item=7734 Six Demon Bag
2206// 14537 Six Demon Bag
2216
2218{
2219 bool Validate(SpellInfo const* /*spellInfo*/) override
2220 {
2221 return ValidateSpellInfo(
2222 {
2229 });
2230 }
2231
2232 void HandleDummy(SpellEffIndex /*effIndex*/)
2233 {
2234 Unit* caster = GetCaster();
2235 if (Unit* target = GetHitUnit())
2236 {
2237 uint32 spellId = 0;
2238 uint32 rand = urand(0, 99);
2239 if (rand < 25) // Fireball (25% chance)
2240 spellId = SPELL_FIREBALL;
2241 else if (rand < 50) // Frostball (25% chance)
2242 spellId = SPELL_FROSTBOLT;
2243 else if (rand < 70) // Chain Lighting (20% chance)
2244 spellId = SPELL_CHAIN_LIGHTNING;
2245 else if (rand < 80) // Polymorph (10% chance)
2246 {
2247 spellId = SPELL_POLYMORPH;
2248 if (urand(0, 100) <= 30) // 30% chance to self-cast
2249 target = caster;
2250 }
2251 else if (rand < 95) // Enveloping Winds (15% chance)
2252 spellId = SPELL_ENVELOPING_WINDS;
2253 else // Summon Felhund minion (5% chance)
2254 {
2256 target = caster;
2257 }
2258
2259 caster->CastSpell(target, spellId, GetCastItem());
2260 }
2261 }
2262
2267};
2268
2273
2274// 59906 - Swift Hand of Justice Dummy
2276{
2277 bool Validate(SpellInfo const* /*spellInfo*/) override
2278 {
2280 }
2281
2282 void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
2283 {
2285
2286 Unit* caster = eventInfo.GetActor();
2287 CastSpellExtraArgs args(aurEff);
2288 args.AddSpellBP0(caster->CountPctFromMaxHealth(aurEff->GetAmount()));
2289 caster->CastSpell(nullptr, SPELL_SWIFT_HAND_OF_JUSTICE_HEAL, args);
2290 }
2291
2296};
2297
2298// 28862 - The Eye of Diminution
2300{
2301 void CalculateAmount(AuraEffect const* /*aurEff*/, SpellEffectValue& amount, bool& /*canBeRecalculated*/)
2302 {
2303 int32 diff = GetUnitOwner()->GetLevel() - 60;
2304 if (diff > 0)
2305 amount += diff;
2306 }
2307
2312};
2313
2314// http://www.wowhead.com/item=44012 Underbelly Elixir
2315// 59640 Underbelly Elixir
2322
2324{
2325 bool Load() override
2326 {
2327 return GetCaster()->GetTypeId() == TYPEID_PLAYER;
2328 }
2329 bool Validate(SpellInfo const* /*spellInfo*/) override
2330 {
2331 return ValidateSpellInfo(
2332 {
2336 });
2337 }
2338
2339 void HandleDummy(SpellEffIndex /*effIndex*/)
2340 {
2341 Unit* caster = GetCaster();
2343 switch (urand(1, 3))
2344 {
2345 case 1: spellId = SPELL_UNDERBELLY_ELIXIR_TRIGGERED1; break;
2346 case 2: spellId = SPELL_UNDERBELLY_ELIXIR_TRIGGERED2; break;
2347 }
2348 caster->CastSpell(caster, spellId, true);
2349 }
2350
2355};
2356
2369
2382
2383// 126755 - Wormhole: Pandaria
2385{
2386 bool Validate(SpellInfo const* /*spellInfo*/) override
2387 {
2389 }
2390
2397
2402};
2403
2404// 47776 - Roll 'dem Bones
2406{
2407 enum
2408 {
2409 TEXT_WORN_TROLL_DICE = 26152
2411
2412 bool Validate(SpellInfo const* /*spellInfo*/) override
2413 {
2414 if (!sBroadcastTextStore.LookupEntry(TEXT_WORN_TROLL_DICE))
2415 return false;
2416 return true;
2417 }
2418
2419 bool Load() override
2420 {
2421 return GetCaster()->GetTypeId() == TYPEID_PLAYER;
2422 }
2423
2424 void HandleScript(SpellEffIndex /*effIndex*/)
2425 {
2427
2428 static uint32 const minimum = 1;
2429 static uint32 const maximum = 6;
2430
2431 // roll twice
2432 GetCaster()->ToPlayer()->DoRandomRoll(minimum, maximum);
2433 GetCaster()->ToPlayer()->DoRandomRoll(minimum, maximum);
2434 }
2435
2440};
2441
2448
2450{
2451 bool Validate(SpellInfo const* /*spell*/) override
2452 {
2453 return ValidateSpellInfo(
2454 {
2458 });
2459 }
2460
2462 {
2463 PreventHitDefaultEffect(effIndex);
2464 Unit* caster = GetCaster();
2465 if (Unit* target = GetHitUnit())
2466 {
2467 caster->CastSpell(caster, SPELL_AIR_RIFLE_HOLD_VISUAL, true);
2468 // needed because this spell shares GCD with its triggered spells (which must not be cast with triggered flag)
2469 if (Player* player = caster->ToPlayer())
2470 player->GetSpellHistory()->CancelGlobalCooldown(GetSpellInfo());
2471 if (urand(0, 4))
2472 caster->CastSpell(target, SPELL_AIR_RIFLE_SHOOT, false);
2473 else
2474 caster->CastSpell(caster, SPELL_AIR_RIFLE_SHOOT_SELF, false);
2475 }
2476 }
2477
2482};
2483
2485{
2486 bool Load() override
2487 {
2488 return GetCaster()->GetTypeId() == TYPEID_PLAYER;
2489 }
2490
2501
2502 void HandleScript(SpellEffIndex /*effIndex*/)
2503 {
2504 Player* caster = GetCaster()->ToPlayer();
2505 uint32 spellId = GetSpellInfo()->Id;
2506
2507 // learn random explicit discovery recipe (if any)
2508 if (uint32 discoveredSpellId = GetExplicitDiscoverySpell(spellId, caster))
2509 caster->LearnSpell(discoveredSpellId, false);
2510 }
2511
2517};
2518
2520{
2521 NPC_GHOUL = 28845,
2523};
2524
2526{
2528 {
2529 std::list<TempSummon*> ghouls;
2531 if (ghouls.size() >= MAX_GHOULS)
2532 {
2535 }
2536
2537 return SPELL_CAST_OK;
2538 }
2539
2544};
2545
2552
2572
2579
2581{
2582 bool Validate(SpellInfo const* /*spellInfo*/) override
2583 {
2584 return ValidateSpellInfo(
2585 {
2589 });
2590 }
2591
2592 void HandleDummy(SpellEffIndex /*effIndex*/)
2593 {
2595 Unit* caster = GetCaster();
2596 caster->CastSpell(caster, spellId, true);
2597 }
2598
2603};
2604
2606{
2607 SOUND_ASHBRINGER_1 = 8906, // "I was pure once"
2608 SOUND_ASHBRINGER_2 = 8907, // "Fought for righteousness"
2609 SOUND_ASHBRINGER_3 = 8908, // "I was once called Ashbringer"
2610 SOUND_ASHBRINGER_4 = 8920, // "Betrayed by my order"
2611 SOUND_ASHBRINGER_5 = 8921, // "Destroyed by Kel'Thuzad"
2612 SOUND_ASHBRINGER_6 = 8922, // "Made to serve"
2613 SOUND_ASHBRINGER_7 = 8923, // "My son watched me die"
2614 SOUND_ASHBRINGER_8 = 8924, // "Crusades fed his rage"
2615 SOUND_ASHBRINGER_9 = 8925, // "Truth is unknown to him"
2616 SOUND_ASHBRINGER_10 = 8926, // "Scarlet Crusade is pure no longer"
2617 SOUND_ASHBRINGER_11 = 8927, // "Balnazzar's crusade corrupted my son"
2618 SOUND_ASHBRINGER_12 = 8928, // "Kill them all!"
2619};
2620
2622{
2623 bool Load() override
2624 {
2625 return GetCaster()->GetTypeId() == TYPEID_PLAYER;
2626 }
2627
2629 {
2630 PreventHitDefaultEffect(effIndex);
2631
2632 Player* player = GetCaster()->ToPlayer();
2635
2636 // Ashbringers effect (spellID 28441) retriggers every 5 seconds, with a chance of making it say one of the above 12 sounds
2637 if (urand(0, 60) < 1)
2638 player->PlayDirectSound(sound_id, player);
2639 }
2640
2645};
2646
2656
2657// 58886 - Food
2659{
2660 void HandleTriggerSpell(AuraEffect const* /*aurEff*/)
2661 {
2663 Unit* target = GetTarget();
2664 switch (urand(0, 5))
2665 {
2666 case 0:
2667 target->CastSpell(target, SPELL_WILD_MAGIC, true);
2668 break;
2669 case 1:
2670 target->CastSpell(target, SPELL_WELL_FED_1, true);
2671 break;
2672 case 2:
2673 target->CastSpell(target, SPELL_WELL_FED_2, true);
2674 break;
2675 case 3:
2676 target->CastSpell(target, SPELL_WELL_FED_3, true);
2677 break;
2678 case 4:
2679 target->CastSpell(target, SPELL_WELL_FED_4, true);
2680 break;
2681 case 5:
2682 target->CastSpell(target, SPELL_WELL_FED_5, true);
2683 break;
2684 }
2685 }
2686
2691};
2692
2698
2700{
2701 bool Validate(SpellInfo const* /*spell*/) override
2702 {
2704 }
2705
2706 void HandleDummy(SpellEffIndex /* effIndex */)
2707 {
2708 Unit* caster = GetCaster();
2709 if (Item* castItem = GetCastItem())
2710 {
2711 if (roll_chance(86)) // Nigh-Invulnerability - success
2712 caster->CastSpell(caster, SPELL_NIGH_INVULNERABILITY, castItem);
2713 else // Complete Vulnerability - backfire in 14% casts
2714 caster->CastSpell(caster, SPELL_COMPLETE_VULNERABILITY, castItem);
2715 }
2716 }
2717
2722};
2723
2729
2748
2755
2757{
2758 bool Validate(SpellInfo const* /*spell*/) override
2759 {
2761 sObjectMgr->GetCreatureTemplate(NPC_ABYSSAL_FLAMEBRINGER) &&
2762 sObjectMgr->GetQuestTemplate(QUEST_SUPER_HOT_STEW);
2763 }
2764
2765 bool Load() override
2766 {
2767 return GetCaster()->GetTypeId() == TYPEID_PLAYER;
2768 }
2769
2770 void HandleDummy(SpellEffIndex /* effIndex */)
2771 {
2772 Unit* player = GetCaster();
2773 player->CastSpell(player, SPELL_CREATE_DEMON_BROILED_SURPRISE, false);
2774 }
2775
2777 {
2778 Player* player = GetCaster()->ToPlayer();
2781
2782 if (Creature* creature = player->FindNearestCreature(NPC_ABYSSAL_FLAMEBRINGER, 10, false))
2783 if (creature->isDead())
2784 return SPELL_CAST_OK;
2785 return SPELL_FAILED_NOT_HERE;
2786 }
2787
2793};
2794
2799
2801{
2802 bool Validate(SpellInfo const* /*spell*/) override
2803 {
2805 }
2806
2807 void HandleDummy(SpellEffIndex /* effIndex */)
2808 {
2809 Unit* caster = GetCaster();
2810 if (GetHitCreature())
2811 {
2813
2814 //cast spell Raptor Capture Credit
2815 caster->CastSpell(caster, SPELL_RAPTOR_CAPTURE_CREDIT, true);
2816 }
2817 }
2818
2823};
2824
2830
2832{
2833 bool Validate(SpellInfo const* /*spell*/) override
2834 {
2835 if (!sObjectMgr->GetCreatureTemplate(NPC_LEVIROTH))
2836 return false;
2837 return true;
2838 }
2839
2840 void HandleDummy(SpellEffIndex /*effIndex*/)
2841 {
2842 if (Creature* target = GetHitCreature())
2843 if (target->GetEntry() == NPC_LEVIROTH && !target->HealthBelowPct(95))
2844 {
2845 target->CastSpell(target, SPELL_LEVIROTH_SELF_IMPALE, true);
2846 target->ResetPlayerDamageReq();
2847 }
2848 }
2849
2854};
2855
2861
2862// 23725 - Gift of Life
2864{
2865 bool Validate(SpellInfo const* /*spellInfo*/) override
2866 {
2868 }
2869
2870 void HandleDummy(SpellEffIndex /*effIndex*/)
2871 {
2872 Unit* caster = GetCaster();
2873 caster->CastSpell(caster, SPELL_GIFT_OF_LIFE_1, true);
2874 caster->CastSpell(caster, SPELL_GIFT_OF_LIFE_2, true);
2875 }
2876
2881};
2882
2889
2891{
2892 bool Load() override
2893 {
2894 if (!GetCastItem())
2895 return false;
2896 return true;
2897 }
2898
2899 bool Validate(SpellInfo const* /*spell*/) override
2900 {
2902 }
2903
2904 void HandleDummy(SpellEffIndex /* effIndex */)
2905 {
2906 Unit* caster = GetCaster();
2907 bool success = true;
2908 if (!caster->GetMap()->IsDungeon())
2909 success = roll_chance(95); // nitro boosts can only fail in flying-enabled locations on 3.3.5
2911 }
2912
2917};
2918
2920{
2921 bool Validate(SpellInfo const* /*spell*/) override
2922 {
2924 }
2925
2926 void HandleApply(AuraEffect const* /*effect*/, AuraEffectHandleModes /*mode*/)
2927 {
2929 }
2930
2932 {
2934 float curZ = GetTarget()->GetPositionZ();
2935 if (curZ < lastZ)
2936 {
2937 if (roll_chance(80)) // we don't have enough sniffs to verify this, guesstimate
2939 GetAura()->Remove();
2940 }
2941 else
2942 lastZ = curZ;
2943 }
2944
2950
2952};
2953
2958
2960{
2961 bool Load() override
2962 {
2963 return GetCaster()->GetTypeId() == TYPEID_PLAYER;
2964 }
2965
2966 bool Validate(SpellInfo const* /*spell*/) override
2967 {
2969 }
2970
2971 void HandleDummy(SpellEffIndex /* effIndex */)
2972 {
2973 Player* caster = GetCaster()->ToPlayer();
2975 caster->CastSpell(caster, SPELL_ROCKET_BOOTS_PROC, true);
2976 }
2977
2979 {
2980 if (GetCaster()->IsInWater())
2982 return SPELL_CAST_OK;
2983 }
2984
2990};
2991
2992// 67489 - Runic Healing Injector
2994{
2995 bool Load() override
2996 {
2997 return GetCaster()->GetTypeId() == TYPEID_PLAYER;
2998 }
2999
3000 void HandleHeal(SpellEffIndex /*effIndex*/)
3001 {
3002 if (Player* caster = GetCaster()->ToPlayer())
3003 if (caster->HasSkill(SKILL_ENGINEERING))
3004 SetHitHeal(GetHitHeal() * 1.25f);
3005 }
3006
3011};
3012
3018
3020{
3021 bool Validate(SpellInfo const* /*spell*/) override
3022 {
3024 }
3025
3026 void HandleDummy(SpellEffIndex /* effIndex */)
3027 {
3028 Unit* caster = GetCaster();
3029 if (Aura* aura = caster->GetAura(SPELL_PYGMY_OIL_PYGMY_AURA))
3030 aura->RefreshDuration();
3031 else
3032 {
3033 aura = caster->GetAura(SPELL_PYGMY_OIL_SMALLER_AURA);
3034 if (!aura || aura->GetStackAmount() < 5 || !roll_chance(50))
3035 caster->CastSpell(caster, SPELL_PYGMY_OIL_SMALLER_AURA, true);
3036 else
3037 {
3038 aura->Remove();
3039 caster->CastSpell(caster, SPELL_PYGMY_OIL_PYGMY_AURA, true);
3040 }
3041 }
3042 }
3043
3048};
3049
3051{
3052 void HandleDummy(SpellEffIndex /* effIndex */)
3053 {
3054 Unit* caster = GetCaster();
3055 caster->SetFacingTo(frand(0.0f, 2.0f * float(M_PI)));
3056 }
3057
3062};
3063
3071
3073{
3074 bool Load() override
3075 {
3076 return GetCaster()->GetTypeId() == TYPEID_PLAYER;
3077 }
3078
3079 bool Validate(SpellInfo const* /*spell*/) override
3080 {
3082 sObjectMgr->GetQuestTemplate(QUEST_CHICKEN_PARTY) &&
3083 sObjectMgr->GetQuestTemplate(QUEST_FLOWN_THE_COOP);
3084 }
3085
3086 void HandleDummy(SpellEffIndex /* effIndex */)
3087 {
3088 Player* caster = GetCaster()->ToPlayer();
3089 if (Unit* target = GetHitUnit())
3090 {
3092 {
3093 caster->CastSpell(caster, SPELL_CAPTURE_CHICKEN_ESCAPE, true);
3094 target->KillSelf();
3095 }
3096 }
3097 }
3098
3103};
3104
3106{
3107 void HandleDummy(SpellEffIndex /*effIndex*/)
3108 {
3109 if (Creature* target = GetHitCreature())
3110 if (target->isDead())
3111 target->DespawnOrUnsummon();
3112 }
3113
3118};
3119
3137
3146
3147// Item - 49310: Purified Shard of the Scale
3148// 69755 - Purified Shard of the Scale - Equip Effect
3149
3150// Item - 49488: Shiny Shard of the Scale
3151// 69739 - Shiny Shard of the Scale - Equip Effect
3152template <uint32 HealProcSpellId, uint32 DamageProcSpellId>
3154{
3155 public:
3156 spell_item_shard_of_the_scale(char const* ScriptName) : SpellScriptLoader(ScriptName) { }
3157
3158 template <uint32 HealProc, uint32 DamageProc>
3160 {
3161 bool Validate(SpellInfo const* /*spellInfo*/) override
3162 {
3163 return ValidateSpellInfo(
3164 {
3165 HealProc,
3166 DamageProc
3167 });
3168 }
3169
3170 void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
3171 {
3173 Unit* caster = eventInfo.GetActor();
3174 Unit* target = eventInfo.GetActionTarget();
3175
3176 if (eventInfo.GetTypeMask() & PROC_FLAG_DEAL_HELPFUL_SPELL)
3177 caster->CastSpell(target, HealProc, aurEff);
3178
3179 if (eventInfo.GetTypeMask() & PROC_FLAG_DEAL_HARMFUL_SPELL)
3180 caster->CastSpell(target, DamageProc, aurEff);
3181 }
3182
3187 };
3188
3193};
3194
3202
3204{
3205 bool Validate(SpellInfo const* /*spellInfo*/) override
3206 {
3207 return ValidateSpellInfo(
3208 {
3213 });
3214 }
3215
3216 void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
3217 {
3219
3220 Unit* caster = eventInfo.GetActor();
3221
3222 switch (caster->GetClass())
3223 {
3224 case CLASS_DRUID:
3225 caster->CastSpell(caster, SPELL_SOUL_PRESERVER_DRUID, aurEff);
3226 break;
3227 case CLASS_PALADIN:
3228 caster->CastSpell(caster, SPELL_SOUL_PRESERVER_PALADIN, aurEff);
3229 break;
3230 case CLASS_PRIEST:
3231 caster->CastSpell(caster, SPELL_SOUL_PRESERVER_PRIEST, aurEff);
3232 break;
3233 case CLASS_SHAMAN:
3234 caster->CastSpell(caster, SPELL_SOUL_PRESERVER_SHAMAN, aurEff);
3235 break;
3236 default:
3237 break;
3238 }
3239 }
3240
3245};
3246
3248{
3249 SPELL_LIGHTS_WRATH = 45479, // Light's Wrath if Exalted by Aldor
3250 SPELL_ARCANE_BOLT = 45429, // Arcane Bolt if Exalted by Scryers
3251
3252 SPELL_LIGHTS_STRENGTH = 45480, // Light's Strength if Exalted by Aldor
3253 SPELL_ARCANE_STRIKE = 45428, // Arcane Strike if Exalted by Scryers
3254
3255 SPELL_LIGHTS_WARD = 45432, // Light's Ward if Exalted by Aldor
3256 SPELL_ARCANE_INSIGHT = 45431, // Arcane Insight if Exalted by Scryers
3257
3258 SPELL_LIGHTS_SALVATION = 45478, // Light's Salvation if Exalted by Aldor
3259 SPELL_ARCANE_SURGE = 45430, // Arcane Surge if Exalted by Scryers
3260
3262 FACTION_SCRYERS = 934
3264
3265// Item - 34678: Shattered Sun Pendant of Acumen
3266// 45481 - Sunwell Exalted Caster Neck
3267
3268// Item - 34679: Shattered Sun Pendant of Might
3269// 45482 - Sunwell Exalted Melee Neck
3270
3271// Item - 34680: Shattered Sun Pendant of Resolve
3272// 45483 - Sunwell Exalted Tank Neck
3273
3274// Item - 34677: Shattered Sun Pendant of Restoration
3275// 45484 Sunwell Exalted Healer Neck
3276template <uint32 AldorSpellId, uint32 ScryersSpellId>
3278{
3279 public:
3280 spell_item_sunwell_neck(char const* ScriptName) : SpellScriptLoader(ScriptName) { }
3281
3282 template <uint32 Aldors, uint32 Scryers>
3284 {
3285 bool Validate(SpellInfo const* /*spellInfo*/) override
3286 {
3287 return ValidateSpellInfo({ Aldors, Scryers }) &&
3288 sFactionStore.LookupEntry(FACTION_ALDOR) &&
3289 sFactionStore.LookupEntry(FACTION_SCRYERS);
3290 }
3291
3292 bool CheckProc(ProcEventInfo& eventInfo)
3293 {
3294 return eventInfo.GetActor()->GetTypeId() == TYPEID_PLAYER;
3295 }
3296
3297 void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
3298 {
3300 Player* player = eventInfo.GetActor()->ToPlayer();
3301 Unit* target = eventInfo.GetActionTarget();
3302
3303 // Aggression checks are in the spell system... just cast and forget
3305 player->CastSpell(target, Aldors, aurEff);
3306
3308 player->CastSpell(target, Scryers, aurEff);
3309 }
3310
3316 };
3317
3322};
3323
3325{
3327 {
3328 if (Player* target = GetHitUnit()->ToPlayer())
3329 {
3330 target->HandleEmoteCommand(EMOTE_ONESHOT_TRAIN);
3331 if (EmotesTextSoundEntry const* soundEntry = sDB2Manager.GetTextSoundEmoteFor(TEXT_EMOTE_TRAIN, target->GetRace(), target->GetNativeGender(), target->GetClass()))
3332 target->PlayDistanceSound(soundEntry->SoundID);
3333 }
3334 }
3335
3336 void HandleTargets(std::list<WorldObject*>& targetList)
3337 {
3338 targetList.remove_if([](WorldObject const* obj) { return obj->GetTypeId() != TYPEID_PLAYER; });
3339 }
3340
3346};
3347
3357
3359{
3370
3371 void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
3372 {
3374
3375 Unit* caster = eventInfo.GetActor();
3376 float str = caster->GetStat(STAT_STRENGTH);
3377 float agi = caster->GetStat(STAT_AGILITY);
3378
3379 switch (aurEff->GetId())
3380 {
3382 {
3383 if (str > agi)
3384 caster->CastSpell(caster, SPELL_DEATH_CHOICE_NORMAL_STRENGTH, aurEff);
3385 else
3386 caster->CastSpell(caster, SPELL_DEATH_CHOICE_NORMAL_AGILITY, aurEff);
3387 break;
3388 }
3390 {
3391 if (str > agi)
3392 caster->CastSpell(caster, SPELL_DEATH_CHOICE_HEROIC_STRENGTH, aurEff);
3393 else
3394 caster->CastSpell(caster, SPELL_DEATH_CHOICE_HEROIC_AGILITY, aurEff);
3395 break;
3396 }
3397 default:
3398 break;
3399 }
3400 }
3401
3406};
3407
3423
3425{
3426public:
3427 spell_item_trinket_stack(char const* scriptName, uint32 stackSpell, uint32 triggerSpell) : SpellScriptLoader(scriptName),
3428 _stackSpell(stackSpell), _triggerSpell(triggerSpell)
3429 {
3430 }
3431
3433 {
3434 public:
3435 spell_item_trinket_stack_AuraScript(uint32 stackSpell, uint32 triggerSpell) : _stackSpell(stackSpell), _triggerSpell(triggerSpell)
3436 {
3437 }
3438
3439 private:
3440 bool Validate(SpellInfo const* /*spellInfo*/) override
3441 {
3443 }
3444
3445 void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
3446 {
3448
3449 Unit* caster = eventInfo.GetActor();
3450
3451 caster->CastSpell(caster, _stackSpell, aurEff); // cast the stack
3452
3453 Aura* dummy = caster->GetAura(_stackSpell); // retrieve aura
3454
3455 //dont do anything if it's not the right amount of stacks;
3456 if (!dummy || dummy->GetStackAmount() < aurEff->GetAmountAsInt())
3457 return;
3458
3459 // if right amount, remove the aura and cast real trigger
3461 if (Unit* target = eventInfo.GetActionTarget())
3462 caster->CastSpell(target, _triggerSpell, aurEff);
3463 }
3464
3465 void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
3466 {
3468 }
3469
3475
3478 };
3479
3484
3485private:
3488};
3489
3490// 57345 - Darkmoon Card: Greatness
3498
3500{
3501 bool Validate(SpellInfo const* /*spellInfo*/) override
3502 {
3503 return ValidateSpellInfo(
3504 {
3509 });
3510 }
3511
3512 void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
3513 {
3515
3516 Unit* caster = eventInfo.GetActor();
3517 float str = caster->GetStat(STAT_STRENGTH);
3518 float agi = caster->GetStat(STAT_AGILITY);
3519 float intl = caster->GetStat(STAT_INTELLECT);
3520 float vers = 0.0f; // caster->GetStat(STAT_VERSATILITY);
3521 float stat = 0.0f;
3522
3523 uint32 spellTrigger = SPELL_DARKMOON_CARD_STRENGTH;
3524
3525 if (str > stat)
3526 {
3527 spellTrigger = SPELL_DARKMOON_CARD_STRENGTH;
3528 stat = str;
3529 }
3530
3531 if (agi > stat)
3532 {
3533 spellTrigger = SPELL_DARKMOON_CARD_AGILITY;
3534 stat = agi;
3535 }
3536
3537 if (intl > stat)
3538 {
3539 spellTrigger = SPELL_DARKMOON_CARD_INTELLECT;
3540 stat = intl;
3541 }
3542
3543 if (vers > stat)
3544 {
3545 spellTrigger = SPELL_DARKMOON_CARD_VERSATILITY;
3546 stat = vers;
3547 }
3548
3549 caster->CastSpell(caster, spellTrigger, aurEff);
3550 }
3551
3556};
3557
3558// 27522,40336 - Mana Drain
3564
3566{
3567 bool Validate(SpellInfo const* /*spellInfo*/) override
3568 {
3569 return ValidateSpellInfo(
3570 {
3573 });
3574 }
3575
3576 void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
3577 {
3579
3580 Unit* caster = eventInfo.GetActor();
3581 Unit* target = eventInfo.GetActionTarget();
3582
3583 if (caster->IsAlive())
3584 caster->CastSpell(caster, SPELL_MANA_DRAIN_ENERGIZE, aurEff);
3585
3586 if (target && target->IsAlive())
3587 caster->CastSpell(target, SPELL_MANA_DRAIN_LEECH, aurEff);
3588 }
3589
3594};
3595
3597{
3599
3600 EMOTE_PLANTS_FLAG = 28008
3602
3603// 51640 - Taunt Flag Targeting
3605{
3606 bool Validate(SpellInfo const* /*spellInfo*/) override
3607 {
3608 return ValidateSpellInfo({ SPELL_TAUNT_FLAG }) &&
3610 }
3611
3612 void FilterTargets(std::list<WorldObject*>& targets)
3613 {
3614 targets.remove_if([](WorldObject* obj) -> bool
3615 {
3616 return obj->GetTypeId() != TYPEID_PLAYER && obj->GetTypeId() != TYPEID_CORPSE;
3617 });
3618
3619 if (targets.empty())
3620 {
3622 return;
3623 }
3624
3626 }
3627
3628 void HandleDummy(SpellEffIndex /*effIndex*/)
3629 {
3630 // we *really* want the unit implementation here
3631 // it sends a packet like seen on sniff
3632 GetCaster()->Unit::TextEmote(EMOTE_PLANTS_FLAG, GetHitUnit(), false);
3633
3635 }
3636
3642};
3643
3650
3651// 29830 - Mirren's Drinking Hat
3653{
3655 {
3656 uint32 spellId = 0;
3657 switch (urand(1, 6))
3658 {
3659 case 1:
3660 case 2:
3661 case 3:
3662 spellId = SPELL_LOCH_MODAN_LAGER; break;
3663 case 4:
3664 case 5:
3665 spellId = SPELL_STOUTHAMMER_LITE; break;
3666 case 6:
3667 spellId = SPELL_AERIE_PEAK_PALE_ALE; break;
3668 default:
3669 return;
3670 }
3671
3672 Unit* caster = GetCaster();
3673 caster->CastSpell(caster, spellId, GetSpell());
3674 }
3675
3680};
3681
3682// 13180 - Gnomish Mind Control Cap
3690
3692{
3693 bool Load() override
3694 {
3695 if (!GetCastItem())
3696 return false;
3697 return true;
3698 }
3699
3700 bool Validate(SpellInfo const* /*spell*/) override
3701 {
3703 }
3704
3705 void HandleDummy(SpellEffIndex /* effIndex */)
3706 {
3707 Unit* caster = GetCaster();
3708 if (Unit* target = GetHitUnit())
3709 {
3710 if (roll_chance<int32>(ROLL_CHANCE_NO_BACKFIRE))
3711 caster->CastSpell(target, roll_chance<int32>(ROLL_CHANCE_DULLARD) ? SPELL_DULLARD : SPELL_GNOMISH_MIND_CONTROL_CAP, GetCastItem());
3712 else
3713 target->CastSpell(caster, SPELL_GNOMISH_MIND_CONTROL_CAP, true); // backfire - 5% chance
3714 }
3715 }
3716
3721};
3722
3723// 8344 - Universal Remote (Gnomish Universal Remote)
3730
3732{
3733 bool Load() override
3734 {
3735 if (!GetCastItem())
3736 return false;
3737 return true;
3738 }
3739
3740 bool Validate(SpellInfo const* /*spellInfo*/) override
3741 {
3743 }
3744
3745 void HandleDummy(SpellEffIndex /*effIndex*/)
3746 {
3747 if (Unit* target = GetHitUnit())
3748 {
3749 uint8 chance = urand(0, 99);
3750 if (chance < 15)
3752 else if (chance < 25)
3754 else
3756 }
3757 }
3758
3763};
3764
3770
3771// Item - 19950: Zandalarian Hero Charm
3772// 24658 - Unstable Power
3773
3774// Item - 19949: Zandalarian Hero Medallion
3775// 24661 - Restless Strength
3777{
3778 public:
3779 spell_item_zandalarian_charm(char const* ScriptName, uint32 SpellId) : SpellScriptLoader(ScriptName), _spellId(SpellId) { }
3780
3782 {
3785
3786 bool Validate(SpellInfo const* /*spellInfo*/) override
3787 {
3788 return ValidateSpellInfo({ _spellId });
3789 }
3790
3791 bool CheckProc(ProcEventInfo& eventInfo)
3792 {
3793 if (SpellInfo const* spellInfo = eventInfo.GetSpellInfo())
3794 if (spellInfo->Id != m_scriptSpellId)
3795 return true;
3796
3797 return false;
3798 }
3799
3800 void HandleStackDrop(AuraEffect* /*aurEff*/, ProcEventInfo& /*eventInfo*/)
3801 {
3804 }
3805
3811
3813 };
3814
3815 AuraScript* GetAuraScript() const override
3816 {
3818 }
3819
3820 private:
3822};
3823
3825{
3826 bool Validate(SpellInfo const* spellInfo) override
3827 {
3828 return ValidateSpellEffect({ { spellInfo->Id, EFFECT_1 } });
3829 }
3830
3831 bool Load() override
3832 {
3833 return GetOwner()->GetTypeId() == TYPEID_PLAYER;
3834 }
3835
3836 void CalculateAmount(AuraEffect const* /*aurEff*/, SpellEffectValue& amount, bool& /*canBeRecalculated*/)
3837 {
3838 if (Item* artifact = GetOwner()->ToPlayer()->GetItemByGuid(GetAura()->GetCastItemGUID()))
3839 amount = GetEffectInfo(EFFECT_1).BasePoints * artifact->GetTotalPurchasedArtifactPowers() / 100;
3840 }
3841
3846};
3847
3849{
3850 bool Validate(SpellInfo const* spellInfo) override
3851 {
3852 return ValidateSpellEffect({ { spellInfo->Id, EFFECT_1 } });
3853 }
3854
3855 bool Load() override
3856 {
3857 return GetOwner()->GetTypeId() == TYPEID_PLAYER;
3858 }
3859
3860 void CalculateAmount(AuraEffect const* /*aurEff*/, SpellEffectValue& amount, bool& /*canBeRecalculated*/)
3861 {
3862 if (Item* artifact = GetOwner()->ToPlayer()->GetItemByGuid(GetAura()->GetCastItemGUID()))
3863 amount = GetSpellInfo()->GetEffect(EFFECT_1).BasePoints * artifact->GetTotalPurchasedArtifactPowers() / 100;
3864 }
3865
3870};
3871
3881
3882// 28200 - Ascendance
3900
3901// 29602 - Jom Gabbar
3903{
3904 bool Validate(SpellInfo const* /*spell*/) override
3905 {
3907 }
3908
3909 void OnRemove(AuraEffect const* effect, AuraEffectHandleModes /*mode*/)
3910 {
3912 }
3913
3918};
3919
3920// 45040 - Battle Trance
3922{
3923 bool Validate(SpellInfo const* /*spell*/) override
3924 {
3926 }
3927
3928 void OnRemove(AuraEffect const* effect, AuraEffectHandleModes /*mode*/)
3929 {
3931 }
3932
3937};
3938
3939// 90900 - World-Queller Focus
3957
3958// 118089 - Azure Water Strider
3959// 127271 - Crimson Water Strider
3960// 127272 - Orange Water Strider
3961// 127274 - Jade Water Strider
3962// 127278 - Golden Water Strider
3964{
3965 bool Validate(SpellInfo const* spellInfo) override
3966 {
3967 return ValidateSpellEffect({ { spellInfo->Id, EFFECT_1 } });
3968 }
3969
3970 void OnRemove(AuraEffect const* /*effect*/, AuraEffectHandleModes /*mode*/)
3971 {
3973 }
3974
3979};
3980
3981// 144671 - Brutal Kinship
3982// 145738 - Brutal Kinship
4000
4001// 45051 - Mad Alchemist's Potion (34440)
4003{
4005 {
4006 std::vector<uint32> availableElixirs =
4007 {
4008 // Battle Elixirs
4009 33720, // Onslaught Elixir (28102)
4010 54452, // Adept's Elixir (28103)
4011 33726, // Elixir of Mastery (28104)
4012 28490, // Elixir of Major Strength (22824)
4013 28491, // Elixir of Healing Power (22825)
4014 28493, // Elixir of Major Frost Power (22827)
4015 54494, // Elixir of Major Agility (22831)
4016 28501, // Elixir of Major Firepower (22833)
4017 28503,// Elixir of Major Shadow Power (22835)
4018 38954, // Fel Strength Elixir (31679)
4019 // Guardian Elixirs
4020 39625, // Elixir of Major Fortitude (32062)
4021 39626, // Earthen Elixir (32063)
4022 39627, // Elixir of Draenic Wisdom (32067)
4023 39628, // Elixir of Ironskin (32068)
4024 28502, // Elixir of Major Defense (22834)
4025 28514, // Elixir of Empowerment (22848)
4026 // Other
4027 28489, // Elixir of Camouflage (22823)
4028 28496 // Elixir of the Searching Eye (22830)
4029 };
4030
4031 Unit* target = GetCaster();
4032
4033 if (target->GetPowerType() == POWER_MANA)
4034 availableElixirs.push_back(28509); // Elixir of Major Mageblood (22840)
4035
4036 uint32 chosenElixir = Trinity::Containers::SelectRandomContainerElement(availableElixirs);
4037
4038 bool useElixir = true;
4039
4040 SpellGroup chosenSpellGroup = SPELL_GROUP_NONE;
4041 if (sSpellMgr->IsSpellMemberOfSpellGroup(chosenElixir, SPELL_GROUP_ELIXIR_BATTLE))
4042 chosenSpellGroup = SPELL_GROUP_ELIXIR_BATTLE;
4043 if (sSpellMgr->IsSpellMemberOfSpellGroup(chosenElixir, SPELL_GROUP_ELIXIR_GUARDIAN))
4044 chosenSpellGroup = SPELL_GROUP_ELIXIR_GUARDIAN;
4045 // If another spell of the same group is already active the elixir should not be cast
4046 if (chosenSpellGroup != SPELL_GROUP_NONE)
4047 {
4048 Unit::AuraApplicationMap const& auraMap = target->GetAppliedAuras();
4049 for (auto itr = auraMap.begin(); itr != auraMap.end(); ++itr)
4050 {
4051 uint32 spellId = itr->second->GetBase()->GetId();
4052 if (sSpellMgr->IsSpellMemberOfSpellGroup(spellId, chosenSpellGroup) && spellId != chosenElixir)
4053 {
4054 useElixir = false;
4055 break;
4056 }
4057 }
4058 }
4059
4060 if (useElixir)
4061 target->CastSpell(target, chosenElixir, GetCastItem());
4062 }
4063
4068};
4069
4070// 53750 - Crazy Alchemist's Potion (40077)
4072{
4074 {
4075 std::vector<uint32> availableElixirs =
4076 {
4077 43185, // Runic Healing Potion (33447)
4078 53750, // Crazy Alchemist's Potion (40077)
4079 53761, // Powerful Rejuvenation Potion (40087)
4080 53762, // Indestructible Potion (40093)
4081 53908, // Potion of Speed (40211)
4082 53909, // Potion of Wild Magic (40212)
4083 53910, // Mighty Arcane Protection Potion (40213)
4084 53911, // Mighty Fire Protection Potion (40214)
4085 53913, // Mighty Frost Protection Potion (40215)
4086 53914, // Mighty Nature Protection Potion (40216)
4087 53915 // Mighty Shadow Protection Potion (40217)
4088 };
4089
4090 Unit* target = GetCaster();
4091
4092 if (!target->IsInCombat())
4093 availableElixirs.push_back(53753); // Potion of Nightmares (40081)
4094 if (target->GetPowerType() == POWER_MANA)
4095 availableElixirs.push_back(43186); // Runic Mana Potion(33448)
4096
4097 uint32 chosenElixir = Trinity::Containers::SelectRandomContainerElement(availableElixirs);
4098
4099 target->CastSpell(target, chosenElixir, GetCastItem());
4100 }
4101
4106};
4107
4113
4114// 21149 - Egg Nog
4116{
4117 bool Validate(SpellInfo const* /*spellInfo*/) override
4118 {
4120 }
4121
4127
4132};
4133
4134// Titanium Seal of Dalaran
4141
4142// 60458 - Toss Your Luck!
4167
4168// 60476 - Toss Your Luck!
4170{
4171 bool Validate(SpellInfo const* /*spellInfo*/) override
4172 {
4174 }
4175
4176 void TriggerEmote(SpellEffIndex /*effIndex*/)
4177 {
4178 Unit* caster = GetCaster();
4180 }
4181
4186};
4187
4192
4193// 69377 - Fortitude
4195{
4196 bool Validate(SpellInfo const* /*spellInfo*/) override
4197 {
4199 }
4200
4201 void HandleScript(SpellEffIndex /*effIndex*/)
4202 {
4204 }
4205
4210};
4211
4216
4217// 69378 - Blessing of Forgotten Kings
4235
4240
4241// 32096 - Thrallmar's Favor
4242// 32098 - Honor Hold's Favor
4266
4271
4272// 57350 - Illusionary Barrier
4290
4296
4297// 50493 - Listening to Music
4315
4316// 50492 - Listening to Music CHECK
4335
4336// 50499 - Listening to Music (Parent)
4354
4359
4360// 208051 - Sephuz's Secret
4361// 234867 - Sephuz's Secret
4362// 236763 - Sephuz's Secret
4364{
4365 bool Validate(SpellInfo const* /*spellInfo*/) override
4366 {
4368 }
4369
4370 bool CheckProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
4371 {
4373 return false;
4374
4375 if (eventInfo.GetHitMask() & (PROC_HIT_INTERRUPT | PROC_HIT_DISPEL))
4376 return true;
4377
4378 Spell const* procSpell = eventInfo.GetProcSpell();
4379 if (!procSpell)
4380 return false;
4381
4382 bool isCrowdControl = procSpell->GetSpellInfo()->HasAura(SPELL_AURA_MOD_CONFUSE)
4383 || procSpell->GetSpellInfo()->HasAura(SPELL_AURA_MOD_FEAR)
4384 || procSpell->GetSpellInfo()->HasAura(SPELL_AURA_MOD_STUN)
4386 || procSpell->GetSpellInfo()->HasAura(SPELL_AURA_MOD_ROOT)
4389 || procSpell->GetSpellInfo()->HasAura(SPELL_AURA_MOD_ROOT_2);
4390
4391 if (!isCrowdControl)
4392 return false;
4393
4394 return true;
4395 }
4396
4404
4410};
4411
4423
4424// 215266 - Fragile Echoes
4426{
4440
4441 void UpdateSpecAura(bool apply) const
4442 {
4443 Player* target = GetUnitOwner()->ToPlayer();
4444 if (!target)
4445 return;
4446
4447 auto updateAuraIfInCorrectSpec = [&](ChrSpecialization spec, AmalgamsSeventhSpine aura)
4448 {
4449 if (!apply || target->GetPrimarySpecialization() != spec)
4450 target->RemoveAurasDueToSpell(aura);
4451 else if (!target->HasAura(aura))
4452 target->CastSpell(target, aura, GetEffect(EFFECT_0));
4453 };
4454
4455 switch (target->GetClass())
4456 {
4457 case CLASS_MONK:
4459 break;
4460 case CLASS_SHAMAN:
4462 break;
4463 case CLASS_PRIEST:
4466 break;
4467 case CLASS_PALADIN:
4469 break;
4470 case CLASS_DRUID:
4472 break;
4473 case CLASS_EVOKER:
4475 break;
4476 default:
4477 break;
4478 }
4479 }
4480
4481 void HandleHeartbeat() const
4482 {
4483 UpdateSpecAura(true);
4484 }
4485
4486 void HandleRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) const
4487 {
4488 UpdateSpecAura(false);
4489 }
4490
4496};
4497
4498// 215267 - Fragile Echo
4500{
4501 bool Validate(SpellInfo const* /*spellInfo*/) override
4502 {
4504 }
4505
4506 void TriggerManaRestoration(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/) const
4507 {
4508 if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_EXPIRE)
4509 return;
4510
4511 Unit* caster = GetCaster();
4512 if (!caster)
4513 return;
4514
4515 if (AuraEffect const* trinketEffect = caster->GetAuraEffect(aurEff->GetSpellEffectInfo().TriggerSpell, EFFECT_0))
4516 caster->CastSpell(caster, SPELL_FRAGILE_ECHO_ENERGIZE, CastSpellExtraArgs(aurEff).AddSpellMod(SPELLVALUE_BASE_POINT0, trinketEffect->GetAmount()));
4517 }
4518
4523};
4524
4525// 228445 - March of the Legion
4538
4539// 234113 - Arrogance (used by item 142171 - Seal of Darkshire Nobility)
4541{
4542 bool Validate(SpellInfo const* spellInfo) override
4543 {
4544 return ValidateSpellEffect({ { spellInfo->Id, EFFECT_1 } })
4545 && ValidateSpellInfo({ spellInfo->GetEffect(EFFECT_1).TriggerSpell });
4546 }
4547
4549 {
4550 return !eventInfo.GetActionTarget()->HasAura(GetEffectInfo(EFFECT_1).TriggerSpell, GetTarget()->GetGUID());
4551 }
4552
4557};
4558
4559// 247625 - March of the Legion
4561{
4562 bool IsDemon(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
4563 {
4564 return eventInfo.GetActionTarget()->GetCreatureType() == CREATURE_TYPE_DEMON;
4565 }
4566
4571};
4572
4577
4578// 253287 - Highfather's Timekeeping
4580{
4581 bool Validate(SpellInfo const* /*spellInfo*/) override
4582 {
4584 }
4585
4586 bool CheckHealth(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
4587 {
4588 return eventInfo.GetDamageInfo() && GetTarget()->HealthBelowPctDamaged(aurEff->GetAmount(), eventInfo.GetDamageInfo()->GetDamage());
4589 }
4590
4591 void Heal(AuraEffect* aurEff, ProcEventInfo& /*procInfo*/)
4592 {
4594 if (Unit* caster = GetCaster())
4595 caster->CastSpell(GetTarget(), SPELL_HIGHFATHERS_TIMEKEEPING_HEAL, aurEff);
4596 }
4597
4603};
4604
4610
4611// 253323 - Shadow Strike
4613{
4614 bool Validate(SpellInfo const* /*spellInfo*/) override
4615 {
4617 }
4618
4620 {
4622 CastSpellExtraArgs(aurEff).SetTriggeringSpell(eventInfo.GetProcSpell()));
4623 }
4624
4629};
4630
4631// 255861 - Shadow Strike
4653
4654// 295175 - Spiteful Binding
4656{
4657 bool Validate(SpellInfo const* spellInfo) override
4658 {
4659 return ValidateSpellEffect({ { spellInfo->Id, EFFECT_1 } });
4660 }
4661
4662 bool CheckHealth(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
4663 {
4664 return eventInfo.GetActor()->GetHealthPct() >= GetEffectInfo(EFFECT_1).CalcValue();
4665 }
4666
4671};
4672
4673// 302385 - Resurrect Health
4686
4693
4694// 303358 Venomous Bolt
4695// 303361 Shivering Lance
4697{
4698public:
4699 spell_item_shiver_venom_weapon_proc(ShiverVenomSpell additionalProcSpellId) : _additionalProcSpellId(additionalProcSpellId) { }
4700
4701 bool Validate(SpellInfo const* /*spellInfo*/) override
4702 {
4704 }
4705
4707 {
4710 .AddSpellMod(SPELLVALUE_BASE_POINT0, aurEff->GetAmount())
4711 .SetTriggeringSpell(procInfo.GetProcSpell()));
4712 }
4713
4718
4719private:
4721};
4722
4723// 302774 - Arcane Tempest
4725{
4727 {
4729 return;
4730
4731 if (AuraEffect* aurEff = GetCaster()->GetAuraEffect(GetTriggeringSpell()->Id, EFFECT_0))
4732 {
4733 aurEff->GetBase()->ModStackAmount(1, AURA_REMOVE_NONE, false);
4734 aurEff->CalculatePeriodic(GetCaster(), false);
4735 }
4736 }
4737
4742};
4743
4744// 302769 - Arcane Tempest
4746{
4747 void CalculatePeriod(AuraEffect const* /*aurEff*/, bool& /*isPeriodic*/, int32& period)
4748 {
4749 period -= (GetStackAmount() - 1) * 300;
4750 }
4751
4756};
4757
4758// 410530 - Mettle
4759// 410964 - Mettle
4761{
4762 static constexpr uint32 SPELL_METTLE_COOLDOWN = 410532;
4763
4764 bool Validate(SpellInfo const* /*spellInfo*/) override
4765 {
4767 }
4768
4769 bool CheckProc(ProcEventInfo& eventInfo)
4770 {
4772 return false;
4773
4774 if (eventInfo.GetHitMask() & (PROC_HIT_INTERRUPT | PROC_HIT_DISPEL))
4775 return true;
4776
4777 Spell const* procSpell = eventInfo.GetProcSpell();
4778 if (!procSpell)
4779 return false;
4780
4781 bool isCrowdControl = procSpell->GetSpellInfo()->HasAura(SPELL_AURA_MOD_CONFUSE)
4782 || procSpell->GetSpellInfo()->HasAura(SPELL_AURA_MOD_FEAR)
4783 || procSpell->GetSpellInfo()->HasAura(SPELL_AURA_MOD_STUN)
4785 || procSpell->GetSpellInfo()->HasAura(SPELL_AURA_MOD_ROOT)
4788 || procSpell->GetSpellInfo()->HasAura(SPELL_AURA_MOD_ROOT_2);
4789
4790 if (!isCrowdControl)
4791 return false;
4792
4793 return eventInfo.GetActionTarget()->HasAura([&](Aura const* aura) { return aura->GetCastId() == procSpell->m_castId; });
4794 }
4795
4796 void TriggerCooldown(ProcEventInfo& /*eventInfo*/)
4797 {
4799 }
4800
4806};
4807
4809{
4810 // 23074 Arcanite Dragonling
4811 new spell_item_trigger_spell("spell_item_arcanite_dragonling", SPELL_ARCANITE_DRAGONLING);
4812 // 23133 Gnomish Battle Chicken
4813 new spell_item_trigger_spell("spell_item_gnomish_battle_chicken", SPELL_BATTLE_CHICKEN);
4814 // 23076 Mechanical Dragonling
4815 new spell_item_trigger_spell("spell_item_mechanical_dragonling", SPELL_MECHANICAL_DRAGONLING);
4816 // 23075 Mithril Mechanical Dragonling
4817 new spell_item_trigger_spell("spell_item_mithril_mechanical_dragonling", SPELL_MITHRIL_MECHANICAL_DRAGONLING);
4818
4822 new spell_item_anger_capacitor<8>("spell_item_tiny_abomination_in_a_jar");
4823 new spell_item_anger_capacitor<7>("spell_item_tiny_abomination_in_a_jar_hero");
4837 new spell_item_defibrillate("spell_item_goblin_jumper_cables", 67, SPELL_GOBLIN_JUMPER_CABLES_FAIL);
4838 new spell_item_defibrillate("spell_item_goblin_jumper_cables_xl", 50, SPELL_GOBLIN_JUMPER_CABLES_XL_FAIL);
4839 new spell_item_defibrillate("spell_item_gnomish_army_knife", 33);
4889
4894
4915 new spell_item_sunwell_neck<SPELL_LIGHTS_WRATH, SPELL_ARCANE_BOLT>("spell_item_sunwell_exalted_caster_neck");
4916 new spell_item_sunwell_neck<SPELL_LIGHTS_STRENGTH, SPELL_ARCANE_STRIKE>("spell_item_sunwell_exalted_melee_neck");
4917 new spell_item_sunwell_neck<SPELL_LIGHTS_WARD, SPELL_ARCANE_INSIGHT>("spell_item_sunwell_exalted_tank_neck");
4918 new spell_item_sunwell_neck<SPELL_LIGHTS_SALVATION, SPELL_ARCANE_SURGE>("spell_item_sunwell_exalted_healer_neck");
4931 new spell_item_zandalarian_charm("spell_item_unstable_power", SPELL_UNSTABLE_POWER_AURA_STACK);
4932 new spell_item_zandalarian_charm("spell_item_restless_strength", SPELL_RESTLESS_STRENGTH_AURA_STACK);
4940
4953
4969
4971}
#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:579
ChrSpecialization
Definition DBCEnums.h:400
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:179
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:1873
@ QUEST_STATUS_INCOMPLETE
Definition QuestDef.h:146
float frand(float min, float max)
Definition Random.cpp:56
int32 irand(int32 min, int32 max)
Definition Random.cpp:36
bool roll_chance(float chance, PseudoRandomDistributionState &state)
Definition Random.cpp:131
uint32 urand(uint32 min, uint32 max)
Definition Random.cpp:43
#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
@ SPELL_EFFECT_DUMMY
@ SPELL_EFFECT_SCRIPT_EFFECT
@ SPELL_EFFECT_INEBRIATE
@ SPELL_EFFECT_TRIGGER_MISSILE
@ SPELL_EFFECT_HEAL
@ SPELL_EFFECT_ENERGIZE
@ SPELL_EFFECT_RESURRECT
@ SPELL_EFFECT_TELEPORT_UNITS
@ SPELL_EFFECT_APPLY_AURA
@ 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
@ TARGET_DEST_CASTER
@ 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
@ 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_SCHOOL_ABSORB
@ 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 SpellDestinationTargetSelectFn(F, I, N)
#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:276
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
SpellInfo const * GetSpellInfo() const
Definition Unit.h:462
uint32 GetDamage() const
Definition Unit.h:466
void AddEventAtOffset(BasicEvent *event, Milliseconds offset)
uint32 GetEffectiveHeal() const
Definition Unit.h:498
uint32 GetHeal() const
Definition Unit.h:496
Definition Item.h:185
bool IsDungeon() const
Definition Map.cpp:3303
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
ChrSpecialization GetPrimarySpecialization() const
Definition Player.h:1993
uint32 DoRandomRoll(uint32 minimum, uint32 maximum)
Definition Player.cpp:30750
void AutoStoreLoot(uint8 bag, uint8 slot, uint32 loot_id, LootStore const &store, ItemContext context=ItemContext::NONE, bool broadcast=false, bool pushed=false, bool createdByPlayer=false)
Definition Player.cpp:27123
void LearnSpell(uint32 spell_id, bool dependent, int32 fromSkill=0, bool suppressMessaging=false, Optional< PlayerSpellTrait > trait={})
Definition Player.cpp:3083
TeamId GetTeamId() const
Definition Player.h:2407
QuestStatus GetQuestStatus(uint32 quest_id) const
Definition Player.cpp:15929
ReputationRank GetReputationRank(uint32 faction_id) const
Definition Player.cpp:6415
HealInfo * GetHealInfo() const
Definition Unit.h:525
Unit * GetActionTarget() const
Definition Unit.h:514
Spell const * GetProcSpell() const
Definition Unit.h:527
ProcFlagsHit GetHitMask() const
Definition Unit.h:519
SpellInfo const * GetSpellInfo() const
Definition Unit.cpp:281
ProcFlagsInit GetTypeMask() const
Definition Unit.h:516
DamageInfo * GetDamageInfo() const
Definition Unit.h:524
Unit * GetActor() const
Definition Unit.h:513
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)
uint32 const Id
Definition SpellInfo.h:328
uint32 StackAmount
Definition SpellInfo.h:396
SpellEffectInfo const & GetEffect(SpellEffIndex index) const
Definition SpellInfo.h:590
bool HasEffect(SpellEffects effect) const
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< DestinationTargetSelectHandler > OnDestinationTargetSelect
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
HookList< EffectHandler > OnEffectLaunch
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:647
float GetHealthPct() const
Definition Unit.h:808
uint64 CountPctFromMaxHealth(float pct) const
Definition Unit.h:809
uint8 GetClass() const
Definition Unit.h:776
std::multimap< uint32, AuraApplication * > AuraApplicationMap
Definition Unit.h:657
Powers GetPowerType() const
Definition Unit.h:823
AuraEffect * GetAuraEffect(uint32 spellId, uint8 effIndex, ObjectGuid casterGUID=ObjectGuid::Empty) const
Definition Unit.cpp:4622
bool IsAlive() const
Definition Unit.h:1205
Gender GetGender() const
Definition Unit.h:779
virtual Gender GetNativeGender() const
Definition Unit.h:781
uint32 GetCreatureType() const
Definition Unit.cpp:9478
Aura * GetAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
Definition Unit.cpp:4718
bool IsSummon() const
Definition Unit.h:761
virtual void TextEmote(std::string_view text, WorldObject const *target=nullptr, bool isBossEmote=false)
Definition Unit.cpp:14489
bool isMoving() const
Definition Unit.h:1820
bool HealthBelowPctDamaged(float pct, uint32 damage) const
Definition Unit.h:805
void GetAllMinionsByEntry(std::list< TempSummon * > &Minions, uint32 entry)
Definition Unit.cpp:6439
void RemoveAuraFromStack(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT, uint16 num=1)
Definition Unit.cpp:4008
bool IsCritter() const
Definition Unit.h:1040
void SetFacingTo(float ori, bool force=true, uint32 movementId=EVENT_FACE)
Definition Unit.cpp:13385
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
Definition Unit.cpp:4822
float GetStat(Stats stat) const
Definition Unit.h:784
SpellHistory * GetSpellHistory()
Definition Unit.h:1521
void HandleEmoteCommand(Emote emoteId, Player *target=nullptr, Trinity::IteratorPair< int32 const * > spellVisualKitIds={}, int32 sequenceVariation=0)
Definition Unit.cpp:1662
AuraApplicationMap & GetAppliedAuras()
Definition Unit.h:1315
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:3992
ObjectGuid GetTarget() const
Definition Unit.h:1847
uint8 GetLevel() const
Definition Unit.h:769
virtual void SetDisplayId(uint32 displayId, bool setNative=false)
Definition Unit.cpp:10852
bool IsInCombat() const
Definition Unit.h:1073
void PlayDirectSound(uint32 soundId, Player const *target=nullptr, uint32 broadcastTextId=0) const
Definition Object.cpp:2941
Map * GetMap() const
Definition Object.h:411
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
Definition Object.cpp:2222
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition Object.cpp:1522
EventProcessor m_Events
Definition Object.h:561
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 AfterRemove(AuraEffect const *, AuraEffectHandleModes)
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
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
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)
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
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 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 AfterRemove(AuraEffect const *, AuraEffectHandleModes)
void AfterApply(AuraEffect const *, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
void RelocateHeight(SpellDestination &dest)
bool Validate(SpellInfo const *) override
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
TitaniumSealOfDalaranTexts
@ TEXT_TSOD_FLIPPED_HEADS
@ TEXT_TSOD_COIN_TOSS
@ TEXT_TSOD_FLIPPED_TAILS
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
ThrallmarAndHonorHoldFavor
@ SPELL_BUFFBOT_BUFF_EFFECT
FlaskOfTheNorthSpells
@ SPELL_FLASK_OF_THE_NORTH_SP
@ SPELL_FLASK_OF_THE_NORTH_STR
@ SPELL_FLASK_OF_THE_NORTH_AP
PowerCircle
@ SPELL_LIMITLESS_POWER
DarkmoonCardIllusion
@ SPELL_DARKMOON_CARD_ILLUSION
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
RunescrollOfFortitude
@ SPELL_FORTITUDE
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
DiscoBall
@ SPELL_LISTENING_TO_MUSIC_CHECK
@ SPELL_LISTENING_TO_MUSIC
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
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
Shadowmourne
@ 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
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
DrumsOfForgottenKings
@ SPELL_BLESSING_OF_FORGOTTEN_KINGS
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
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:9646
CastSpellExtraArgs & AddSpellBP0(SpellEffectValue val)
CastSpellExtraArgs & AddSpellMod(SpellValueMod mod, int32 val)
constexpr float GetPositionZ() const
Definition Position.h:89
void RelocateOffset(Position const &offset)
Definition Spell.cpp:90