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 "Containers.h"
27#include "Creature.h"
28#include "CreatureAIImpl.h"
29#include "DBCStores.h"
30#include "LootMgr.h"
31#include "Map.h"
32#include "ObjectMgr.h"
33#include "Player.h"
34#include "Random.h"
35#include "SkillDiscovery.h"
36#include "SpellAuraEffects.h"
37#include "SpellHistory.h"
38#include "SpellMgr.h"
39#include "SpellScript.h"
40
48
49// Generic script for handling item dummy effects which trigger another spell.
51{
52 private:
54
55 public:
56 spell_item_trigger_spell(char const* name, uint32 triggeredSpellId) : SpellScriptLoader(name), _triggeredSpellId(triggeredSpellId) { }
57
59 {
61
63
64 public:
65 spell_item_trigger_spell_SpellScript(uint32 triggeredSpellId) : SpellScript(), _triggeredSpellId(triggeredSpellId) { }
66
67 private:
68 bool Validate(SpellInfo const* /*spellInfo*/) override
69 {
71 }
72
73 void HandleDummy(SpellEffIndex /*effIndex*/)
74 {
75 Unit* caster = GetCaster();
76 if (Item* item = GetCastItem())
77 caster->CastSpell(caster, _triggeredSpellId, item);
78 }
79
84 };
85
90};
91
96
97// 23780 - Aegis of Preservation
118
124
125// Item - 13503: Alchemist's Stone
126// Item - 35748: Guardian's Alchemist Stone
127// Item - 35749: Sorcerer's Alchemist Stone
128// Item - 35750: Redeemer's Alchemist Stone
129// Item - 35751: Assassin's Alchemist Stone
130// Item - 44322: Mercurial Alchemist Stone
131// Item - 44323: Indestructible Alchemist's Stone
132// Item - 44324: Mighty Alchemist's Stone
133
134// 17619 - Alchemist's Stone
136{
138
139 bool Validate(SpellInfo const* /*spellInfo*/) override
140 {
141 return ValidateSpellInfo(
142 {
145 });
146 }
147
148 void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
149 {
151 SpellInfo const* spellInfo = eventInfo.GetSpellInfo();
152 if (!spellInfo)
153 return;
154
155 Unit* caster = eventInfo.GetActionTarget();
156 for (SpellEffectInfo const& spellEffectInfo : spellInfo->GetEffects())
157 {
158 uint32 spellId;
159 switch (spellEffectInfo.Effect)
160 {
163 break;
166 break;
167 default:
168 continue;
169 }
170
171 CastSpellExtraArgs args(aurEff);
172 args.AddSpellBP0(CalculatePct(spellEffectInfo.CalcValue(caster), 40));
173 caster->CastSpell(nullptr, spellId, args);
174 }
175 }
176
181};
182
189
190// Item - 50351: Tiny Abomination in a Jar
191// 71406 - Anger Capacitor
192
193// Item - 50706: Tiny Abomination in a Jar (Heroic)
194// 71545 - Anger Capacitor
195template <uint8 StackAmount>
197{
198 public:
199 spell_item_anger_capacitor(char const* ScriptName) : SpellScriptLoader(ScriptName) { }
200
201 template <uint8 Stacks>
203 {
205
206 bool Validate(SpellInfo const* /*spellInfo*/) override
207 {
208 return ValidateSpellInfo(
209 {
213 });
214 }
215
216 void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
217 {
219 Unit* caster = eventInfo.GetActor();
220 Unit* target = eventInfo.GetActionTarget();
221
222 caster->CastSpell(nullptr, SPELL_MOTE_OF_ANGER, true);
223 Aura const* motes = caster->GetAura(SPELL_MOTE_OF_ANGER);
224 if (!motes || motes->GetStackAmount() < Stacks)
225 return;
226
229 if (Player* player = caster->ToPlayer())
230 if (player->GetWeaponForAttack(OFF_ATTACK, true) && roll_chance_i(50))
232
233 caster->CastSpell(target, spellId, aurEff);
234 }
235
236 void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
237 {
239 }
240
246 };
247
248 AuraScript* GetAuraScript() const override
249 {
251 }
252};
253
254// 26400 - Arcane Shroud
256{
258
259 void CalculateAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
260 {
261 int32 diff = GetUnitOwner()->GetLevel() - 60;
262 if (diff > 0)
263 amount += 2 * diff;
264 }
265
270};
271
273{
274 SPELL_SOCIOPATH = 39511, // Sociopath: +35 strength(Paladin, Rogue, Druid, Warrior)
275 SPELL_DELUSIONAL = 40997, // Delusional: +70 attack power(Rogue, Hunter, Paladin, Warrior, Druid)
276 SPELL_KLEPTOMANIA = 40998, // Kleptomania: +35 agility(Warrior, Rogue, Paladin, Hunter, Druid)
277 SPELL_MEGALOMANIA = 40999, // Megalomania: +41 damage / healing(Druid, Shaman, Priest, Warlock, Mage, Paladin)
278 SPELL_PARANOIA = 41002, // Paranoia: +35 spell / melee / ranged crit strike rating(All classes)
279 SPELL_MANIC = 41005, // Manic: +35 haste(spell, melee and ranged) (All classes)
280 SPELL_NARCISSISM = 41009, // Narcissism: +35 intellect(Druid, Shaman, Priest, Warlock, Mage, Paladin, Hunter)
281 SPELL_MARTYR_COMPLEX = 41011, // Martyr Complex: +35 stamina(All classes)
282 SPELL_DEMENTIA = 41404, // Dementia: Every 5 seconds either gives you +5/-5% damage/healing. (Druid, Shaman, Priest, Warlock, Mage, Paladin)
283
286
287 SAY_MADNESS = 21954
289
290// Item - 31859: Darkmoon Card: Madness
291// 39446 - Aura of Madness
293{
295
296 bool Validate(SpellInfo const* /*spellInfo*/) override
297 {
298 return ValidateSpellInfo(
299 {
309 }) && sObjectMgr->GetBroadcastText(SAY_MADNESS);
310 }
311
312 void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
313 {
314 static std::vector<uint32> const triggeredSpells[MAX_CLASSES] =
315 {
316 //CLASS_NONE
317 { },
318 //CLASS_WARRIOR
320 //CLASS_PALADIN
322 //CLASS_HUNTER
324 //CLASS_ROGUE
326 //CLASS_PRIEST
328 //CLASS_DEATH_KNIGHT
330 //CLASS_SHAMAN
332 //CLASS_MAGE
334 //CLASS_WARLOCK
336 //CLASS_UNK
337 { },
338 //CLASS_DRUID
340 };
341
343 Unit* caster = eventInfo.GetActor();
344 uint32 spellId = Trinity::Containers::SelectRandomContainerElement(triggeredSpells[caster->GetClass()]);
345 caster->CastSpell(caster, spellId, aurEff);
346
347 if (roll_chance_i(10))
348 caster->Unit::Say(SAY_MADNESS);
349 }
350
355};
356
357// 41404 - Dementia
382
383// 24590 - Brittle Armor
385{
386 SPELL_BRITTLE_ARMOR = 24575
388
403
404// 64411 - Blessing of Ancient Kings (Val'anyr, Hammer of Ancient Kings)
409
411{
413
414 bool Validate(SpellInfo const* /*spellInfo*/) override
415 {
417 }
418
419 bool CheckProc(ProcEventInfo& eventInfo)
420 {
421 HealInfo* healInfo = eventInfo.GetHealInfo();
422 return healInfo && healInfo->GetHeal();
423 }
424
425 void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
426 {
428
429 int32 absorb = int32(CalculatePct(eventInfo.GetHealInfo()->GetHeal(), 15.0f));
430 if (AuraEffect* protEff = eventInfo.GetActionTarget()->GetAuraEffect(SPELL_PROTECTION_OF_ANCIENT_KINGS, 0, eventInfo.GetActor()->GetGUID()))
431 {
432 // The shield can grow to a maximum size of 20,000 damage absorbtion
433 protEff->SetAmount(std::min<int32>(protEff->GetAmount() + absorb, 20000));
434
435 // Refresh and return to prevent replacing the aura
436 protEff->GetBase()->RefreshDuration();
437 }
438 else
439 {
440 CastSpellExtraArgs args(aurEff);
441 args.AddSpellBP0(absorb);
443 }
444 }
445
451};
452
453// 64415 Val'anyr Hammer of Ancient Kings - Equip Effect
468
473
474// 71564 - Deadly Precision
490
491// 71563 - Deadly Precision Dummy
493{
495
496 bool Validate(SpellInfo const* /*spellInfo*/) override
497 {
499 }
500
501 void HandleDummy(SpellEffIndex /*effIndex*/)
502 {
503 SpellInfo const* spellInfo = sSpellMgr->AssertSpellInfo(SPELL_DEADLY_PRECISION);
506 GetCaster()->CastSpell(GetCaster(), spellInfo->Id, args);
507 }
508
513};
514
516{
517 SPELL_STRENGTH_OF_THE_TAUNKA = 71484, // +600 Strength
518 SPELL_AGILITY_OF_THE_VRYKUL = 71485, // +600 Agility
519 SPELL_POWER_OF_THE_TAUNKA = 71486, // +1200 Attack Power
520 SPELL_AIM_OF_THE_IRON_DWARVES = 71491, // +600 Critical
521 SPELL_SPEED_OF_THE_VRYKUL = 71492, // +600 Haste
522
523 SPELL_AGILITY_OF_THE_VRYKUL_HERO = 71556, // +700 Agility
524 SPELL_POWER_OF_THE_TAUNKA_HERO = 71558, // +1400 Attack Power
525 SPELL_AIM_OF_THE_IRON_DWARVES_HERO = 71559, // +700 Critical
526 SPELL_SPEED_OF_THE_VRYKUL_HERO = 71560, // +700 Haste
527 SPELL_STRENGTH_OF_THE_TAUNKA_HERO = 71561 // +700 Strength
529
530// Item - 50362: Deathbringer's Will
531// 71519 - Item - Icecrown 25 Normal Melee Trinket
532
533// Item - 50363: Deathbringer's Will
534// 71562 - Item - Icecrown 25 Heroic Melee Trinket
535template <uint32 StrengthSpellId, uint32 AgilitySpellId, uint32 APSpellId, uint32 CriticalSpellId, uint32 HasteSpellId>
537{
538 public:
539 spell_item_deathbringers_will(char const* ScriptName) : SpellScriptLoader(ScriptName) { }
540
541 template <uint32 Strength, uint32 Agility, uint32 AttackPower, uint32 Critical, uint32 Haste>
543 {
545
546 bool Validate(SpellInfo const* /*spellInfo*/) override
547 {
548 return ValidateSpellInfo(
549 {
550 Strength,
551 Agility,
552 AttackPower,
553 Critical,
554 Haste
555 });
556 }
557
558 void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
559 {
560 static std::vector<uint32> const triggeredSpells[MAX_CLASSES] =
561 {
562 //CLASS_NONE
563 { },
564 //CLASS_WARRIOR
565 { Strength, Critical, Haste },
566 //CLASS_PALADIN
567 { Strength, Critical, Haste },
568 //CLASS_HUNTER
569 { Agility, Critical, AttackPower },
570 //CLASS_ROGUE
571 { Agility, Haste, AttackPower },
572 //CLASS_PRIEST
573 { },
574 //CLASS_DEATH_KNIGHT
575 { Strength, Critical, Haste },
576 //CLASS_SHAMAN
577 { Agility, Haste, AttackPower },
578 //CLASS_MAGE
579 { },
580 //CLASS_WARLOCK
581 { },
582 //CLASS_UNK
583 { },
584 //CLASS_DRUID
585 { Strength, Agility, Haste }
586 };
587
589 Unit* caster = eventInfo.GetActor();
590 std::vector<uint32> const& randomSpells = triggeredSpells[caster->GetClass()];
591 if (randomSpells.empty())
592 return;
593
595 caster->CastSpell(caster, spellId, aurEff);
596 }
597
602 };
603
608};
609
610// 47770 - Roll Dice
612{
614
615 enum
616 {
618 };
619
620 bool Validate(SpellInfo const* /*spellInfo*/) override
621 {
622 if (!sObjectMgr->GetBroadcastText(TEXT_DECAHEDRAL_DWARVEN_DICE))
623 return false;
624 return true;
625 }
626
627 bool Load() override
628 {
629 return GetCaster()->GetTypeId() == TYPEID_PLAYER;
630 }
631
632 void HandleScript(SpellEffIndex /*effIndex*/)
633 {
635
636 static uint32 const minimum = 1;
637 static uint32 const maximum = 100;
638
639 GetCaster()->ToPlayer()->DoRandomRoll(minimum, maximum);
640 }
641
646};
647
653
654// 23134 - Goblin Bomb
675
683
684// 46203 - Goblin Weather Machine
703
704// 8342 - Defibrillate (Goblin Jumper Cables) have 33% chance on success
705// 22999 - Defibrillate (Goblin Jumper Cables XL) have 50% chance on success
706// 54732 - Defibrillate (Gnomish Army Knife) have 67% chance on success
712
714{
715 public:
716 spell_item_defibrillate(char const* name, uint8 chance, uint32 failSpell = 0) : SpellScriptLoader(name), _chance(chance), _failSpell(failSpell) { }
717
719 {
721
722 public:
723 spell_item_defibrillate_SpellScript(uint8 chance, uint32 failSpell) : SpellScript(), _chance(chance), _failSpell(failSpell) { }
724
725 private:
726 bool Validate(SpellInfo const* /*spellInfo*/) override
727 {
729 }
730
732 {
734 {
735 PreventHitDefaultEffect(effIndex);
736 if (_failSpell)
738 }
739 }
740
745
748 };
749
750 SpellScript* GetSpellScript() const override
751 {
753 }
754
755 private:
758};
759
764
765// 33896 - Desperate Defense
786
787// http://www.wowhead.com/item=6522 Deviate Fish
788// 8063 Deviate Fish
798
800{
802
803 bool Load() override
804 {
805 return GetCaster()->GetTypeId() == TYPEID_PLAYER;
806 }
807
812
813 void HandleDummy(SpellEffIndex /*effIndex*/)
814 {
815 Unit* caster = GetCaster();
817 caster->CastSpell(caster, spellId, true);
818 }
819
824};
825
827{
828public:
829 PartyTimeEmoteEvent(Player* player) : _player(player) { }
830
831 bool Execute(uint64 /*time*/, uint32 /*diff*/) override
832 {
834 return true;
835
836 if (_player->isMoving())
838 else
840
841 _player->m_Events.AddEventAtOffset(this, RAND(5s, 10s, 15s));
842
843 return false; // do not delete re-added event in EventProcessor::Update
844 }
845
846private:
848};
849
851{
853
854 void HandleEffectApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
855 {
856 Player* player = GetOwner()->ToPlayer();
857 if (!player)
858 return;
859
860 player->m_Events.AddEventAtOffset(new PartyTimeEmoteEvent(player), RAND(5s, 10s, 15s));
861 }
862
867};
868
880
881// 51010 - Dire Brew
883{
885
886 void AfterApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
887 {
888 Unit* target = GetTarget();
889
890 uint32 model = 0;
891 uint8 gender = target->GetGender();
892
893 switch (target->GetClass())
894 {
895 case CLASS_PRIEST:
896 case CLASS_MAGE:
897 case CLASS_WARLOCK:
899 break;
900 case CLASS_ROGUE:
901 case CLASS_DRUID:
903 break;
904 case CLASS_HUNTER:
905 case CLASS_SHAMAN:
907 break;
908 case CLASS_WARRIOR:
909 case CLASS_PALADIN:
912 break;
913 default:
914 break;
915 }
916
917 if (model)
918 target->SetDisplayId(model);
919 }
920
925};
926
931
932// 59915 - Discerning Eye of the Beast Dummy
953
954// 71610, 71641 - Echoes of Light (Althor's Abacus)
956{
958
959 void FilterTargets(std::list<WorldObject*>& targets)
960 {
961 if (targets.size() < 2)
962 return;
963
964 targets.sort(Trinity::HealthPctOrderPred());
965
966 WorldObject* target = targets.front();
967 targets.clear();
968 targets.push_back(target);
969 }
970
975};
976
977// 30427 - Extract Gas (23821: Zapthrottle Mote Extractor)
979{
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 // missing lootid has been reported on startup - just return
994 if (!creature->GetCreatureTemplate()->SkinLootId)
995 return;
996
998 creature->DespawnOrUnsummon();
999 }
1000 }
1001
1006};
1007
1008// 7434 - Fate Rune of Unsurpassed Vigor
1013
1034
1043
1044/* 57301 - Great Feast
1045 57426 - Fish Feast
1046 58465 - Gigantic Feast
1047 58474 - Small Feast
1048 66476 - Bountiful Feast */
1050{
1052
1053public:
1055
1056private:
1057 bool Validate(SpellInfo const* /*spellInfo*/) override
1058 {
1059 return sObjectMgr->GetBroadcastText(_text);
1060 }
1061
1062 void HandleScript(SpellEffIndex /*effIndex*/)
1063 {
1064 Unit* caster = GetCaster();
1065 caster->Unit::TextEmote(_text, caster, false);
1066 }
1067
1072
1074};
1075
1076// http://www.wowhead.com/item=47499 Flask of the North
1077// 67019 Flask of the North
1084
1086{
1088
1093
1094 void HandleDummy(SpellEffIndex /*effIndex*/)
1095 {
1096 Unit* caster = GetCaster();
1097 std::vector<uint32> possibleSpells;
1098 switch (caster->GetClass())
1099 {
1100 case CLASS_WARLOCK:
1101 case CLASS_MAGE:
1102 case CLASS_PRIEST:
1103 possibleSpells.push_back(SPELL_FLASK_OF_THE_NORTH_SP);
1104 break;
1105 case CLASS_DEATH_KNIGHT:
1106 case CLASS_WARRIOR:
1107 possibleSpells.push_back(SPELL_FLASK_OF_THE_NORTH_STR);
1108 break;
1109 case CLASS_ROGUE:
1110 case CLASS_HUNTER:
1111 possibleSpells.push_back(SPELL_FLASK_OF_THE_NORTH_AP);
1112 break;
1113 case CLASS_DRUID:
1114 case CLASS_PALADIN:
1115 possibleSpells.push_back(SPELL_FLASK_OF_THE_NORTH_SP);
1116 possibleSpells.push_back(SPELL_FLASK_OF_THE_NORTH_STR);
1117 break;
1118 case CLASS_SHAMAN:
1119 possibleSpells.push_back(SPELL_FLASK_OF_THE_NORTH_SP);
1120 possibleSpells.push_back(SPELL_FLASK_OF_THE_NORTH_AP);
1121 break;
1122 }
1123
1124 caster->CastSpell(caster, possibleSpells[urand(0, (possibleSpells.size() - 1))], true);
1125 }
1126
1131};
1132
1134{
1135 SPELL_SHADOWMEND = 39373
1137
1138// 39372 - Frozen Shadoweave
1139// Frozen Shadoweave set 3p bonus
1141{
1143
1144 bool Validate(SpellInfo const* /*spellInfo*/) override
1145 {
1147 }
1148
1149 void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
1150 {
1152 DamageInfo* damageInfo = eventInfo.GetDamageInfo();
1153 if (!damageInfo || !damageInfo->GetDamage())
1154 return;
1155
1156 Unit* caster = eventInfo.GetActor();
1157 CastSpellExtraArgs args(aurEff);
1158 args.AddSpellBP0(CalculatePct(damageInfo->GetDamage(), aurEff->GetAmount()));
1159 caster->CastSpell(nullptr, SPELL_SHADOWMEND, args);
1160 }
1161
1166};
1167
1168// http://www.wowhead.com/item=10645 Gnomish Death Ray
1169// 13280 Gnomish Death Ray
1175
1177{
1179
1180 bool Validate(SpellInfo const* /*spellInfo*/) override
1181 {
1183 }
1184
1185 void HandleDummy(SpellEffIndex /*effIndex*/)
1186 {
1187 Unit* caster = GetCaster();
1188 if (Unit* target = GetHitUnit())
1189 {
1190 if (urand(0, 99) < 15)
1191 caster->CastSpell(caster, SPELL_GNOMISH_DEATH_RAY_SELF, true); // failure
1192 else
1193 caster->CastSpell(target, SPELL_GNOMISH_DEATH_RAY_TARGET, true);
1194 }
1195 }
1196
1201};
1202
1203// Item 10721: Gnomish Harm Prevention Belt
1204// 13234 - Harm Prevention Belt
1209
1211{
1213
1214 bool Validate(SpellInfo const* /*spellInfo*/) override
1215 {
1217 }
1218
1219 void HandleProc(ProcEventInfo& /*eventInfo*/)
1220 {
1222 }
1223
1228};
1229
1230// Item 23004 - Idol of Longevity
1231// 28847 - Healing Touch Refund
1236
1238{
1240
1241 bool Validate(SpellInfo const* /*spellInfo*/) override
1242 {
1244 }
1245
1246 void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
1247 {
1249 eventInfo.GetActor()->CastSpell(nullptr, SPELL_HEALING_TOUCH_MANA, aurEff);
1250 }
1251
1256};
1257
1270
1271// Item - 49982: Heartpierce
1272// 71880 - Item - Icecrown 25 Normal Dagger Proc
1273
1274// Item - 50641: Heartpierce (Heroic)
1275// 71892 - Item - Icecrown 25 Heroic Dagger Proc
1276template <uint32 EnergySpellId, uint32 ManaSpellId, uint32 RageSpellId, uint32 RPSpellId>
1278{
1279 public:
1280 spell_item_heartpierce(char const* ScriptName) : SpellScriptLoader(ScriptName) { }
1281
1282 template <uint32 Energy, uint32 Mana, uint32 Rage, uint32 RunicPower>
1284 {
1286
1287 bool Validate(SpellInfo const* /*spellInfo*/) override
1288 {
1289 return ValidateSpellInfo(
1290 {
1291 Energy,
1292 Mana,
1293 Rage,
1294 RunicPower
1295 });
1296 }
1297
1298 void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
1299 {
1301 Unit* caster = eventInfo.GetActor();
1302
1303 uint32 spellId;
1304 switch (caster->GetPowerType())
1305 {
1306 case POWER_MANA:
1307 spellId = Mana;
1308 break;
1309 case POWER_ENERGY:
1310 spellId = Energy;
1311 break;
1312 case POWER_RAGE:
1313 spellId = Rage;
1314 break;
1315 // Death Knights can't use daggers, but oh well
1316 case POWER_RUNIC_POWER:
1317 spellId = RunicPower;
1318 break;
1319 default:
1320 return;
1321 }
1322
1323 caster->CastSpell(nullptr, spellId, aurEff);
1324 }
1325
1330 };
1331
1336};
1337
1342
1343// 23645 - Hourglass Sand
1363
1364// 40971 - Bonus Healing (Crystal Spire of Karabor)
1366{
1368
1369 bool CheckProc(ProcEventInfo& eventInfo)
1370 {
1372 if (HealInfo* healInfo = eventInfo.GetHealInfo())
1373 if (Unit* healTarget = healInfo->GetTarget())
1374 if (healTarget->GetHealth() - healInfo->GetEffectiveHeal() <= healTarget->CountPctFromMaxHealth(pct))
1375 return true;
1376
1377 return false;
1378 }
1379
1384};
1385
1386// http://www.wowhead.com/item=27388 Mr. Pinchy
1387// 33060 Make a Wish
1396
1398{
1400
1401 bool Load() override
1402 {
1403 return GetCaster()->GetTypeId() == TYPEID_PLAYER;
1404 }
1405
1406 bool Validate(SpellInfo const* /*spellInfo*/) override
1407 {
1408 return ValidateSpellInfo(
1409 {
1415 });
1416 }
1417
1418 void HandleDummy(SpellEffIndex /*effIndex*/)
1419 {
1420 Unit* caster = GetCaster();
1421 uint32 spellId = SPELL_MR_PINCHYS_GIFT;
1422 switch (urand(1, 5))
1423 {
1424 case 1: spellId = SPELL_MR_PINCHYS_BLESSING; break;
1425 case 2: spellId = SPELL_SUMMON_MIGHTY_MR_PINCHY; break;
1426 case 3: spellId = SPELL_SUMMON_FURIOUS_MR_PINCHY; break;
1427 case 4: spellId = SPELL_TINY_MAGICAL_CRAWDAD; break;
1428 }
1429 caster->CastSpell(caster, spellId, true);
1430 }
1431
1436};
1437
1442
1443// Item - 27920: Mark of Conquest
1444// Item - 27921: Mark of Conquest
1445// 33510 - Health Restore
1447{
1449
1450 bool Validate(SpellInfo const* /*spellInfo*/) override
1451 {
1453 }
1454
1455 void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
1456 {
1458 {
1459 // in that case, do not cast heal spell
1461 // but mana instead
1462 eventInfo.GetActor()->CastSpell(nullptr, SPELL_MARK_OF_CONQUEST_ENERGIZE, aurEff);
1463 }
1464 }
1465
1470};
1471
1472// 26465 - Mercurial Shield
1477
1492
1516
1524
1525// http://www.wowhead.com/item=32686 Mingo's Fortune Giblets
1526// 40802 Mingo's Fortune Generator
1546
1547// 71875, 71877 - Item - Black Bruise: Necrotic Touch Proc
1552
1554{
1556
1557 bool Validate(SpellInfo const* /*spellInfo*/) override
1558 {
1560 }
1561
1562 bool CheckProc(ProcEventInfo& eventInfo)
1563 {
1564 if (!eventInfo.GetActionTarget()->IsAlive())
1565 return false;
1566
1567 DamageInfo* damageInfo = eventInfo.GetDamageInfo();
1568 return damageInfo && damageInfo->GetDamage();
1569 }
1570
1571 void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
1572 {
1574
1575 CastSpellExtraArgs args(aurEff);
1576 args.AddSpellBP0(CalculatePct(eventInfo.GetDamageInfo()->GetDamage(), aurEff->GetAmount()));
1577 eventInfo.GetActor()->CastSpell(eventInfo.GetActionTarget(), SPELL_ITEM_NECROTIC_TOUCH_PROC, args);
1578 }
1579
1585};
1586
1587// http://www.wowhead.com/item=10720 Gnomish Net-o-Matic Projector
1588// 13120 Net-o-Matic
1595
1597{
1599
1600 bool Validate(SpellInfo const* /*spellInfo*/) override
1601 {
1602 return ValidateSpellInfo(
1603 {
1607 });
1608 }
1609
1610 void HandleDummy(SpellEffIndex /*effIndex*/)
1611 {
1612 if (Unit* target = GetHitUnit())
1613 {
1615 uint32 roll = urand(0, 99);
1616 if (roll < 2) // 2% for 30 sec self root (off-like chance unknown)
1618 else if (roll < 4) // 2% for 20 sec root, charge to target (off-like chance unknown)
1620
1621 GetCaster()->CastSpell(target, spellId, true);
1622 }
1623 }
1624
1629};
1630
1631// http://www.wowhead.com/item=8529 Noggenfogger Elixir
1632// 16589 Noggenfogger Elixir
1639
1641{
1643
1644 bool Load() override
1645 {
1646 return GetCaster()->GetTypeId() == TYPEID_PLAYER;
1647 }
1648
1649 bool Validate(SpellInfo const* /*spellInfo*/) override
1650 {
1651 return ValidateSpellInfo(
1652 {
1656 });
1657 }
1658
1659 void HandleDummy(SpellEffIndex /*effIndex*/)
1660 {
1661 Unit* caster = GetCaster();
1663 switch (urand(1, 3))
1664 {
1665 case 1: spellId = SPELL_NOGGENFOGGER_ELIXIR_TRIGGERED1; break;
1666 case 2: spellId = SPELL_NOGGENFOGGER_ELIXIR_TRIGGERED2; break;
1667 }
1668
1669 caster->CastSpell(caster, spellId, true);
1670 }
1671
1676};
1677
1678// 29601 - Enlightenment (Pendant of the Violet Eye)
1680{
1682
1683 bool CheckProc(ProcEventInfo& eventInfo)
1684 {
1685 if (SpellInfo const* spellInfo = eventInfo.GetSpellInfo())
1686 return spellInfo->PowerType == POWER_MANA || (spellInfo->ManaCost != 0 && spellInfo->ManaCostPercentage != 0 && spellInfo->ManaCostPerlevel != 0);
1687
1688 return false;
1689 }
1690
1695};
1696
1701
1702// 26467 - Persistent Shield
1704{
1706
1707 bool Validate(SpellInfo const* /*spellInfo*/) override
1708 {
1710 }
1711
1712 bool CheckProc(ProcEventInfo& eventInfo)
1713 {
1714 return eventInfo.GetHealInfo() && eventInfo.GetHealInfo()->GetHeal();
1715 }
1716
1717 void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
1718 {
1719 Unit* caster = eventInfo.GetActor();
1720 Unit* target = eventInfo.GetActionTarget();
1721 int32 bp0 = CalculatePct(eventInfo.GetHealInfo()->GetHeal(), 15);
1722
1723 // Scarab Brooch does not replace stronger shields
1724 if (AuraEffect const* shield = target->GetAuraEffect(SPELL_PERSISTENT_SHIELD_TRIGGERED, EFFECT_0, caster->GetGUID()))
1725 if (shield->GetAmount() > bp0)
1726 return;
1727
1728 CastSpellExtraArgs args(aurEff);
1729 args.AddSpellBP0(bp0);
1730 caster->CastSpell(target, SPELL_PERSISTENT_SHIELD_TRIGGERED, args);
1731 }
1732
1738};
1739
1741{
1742 SPELL_HEALTH_LINK = 37382
1744
1745// 37381 - Pet Healing
1746// Hunter T5 2P Bonus
1747// Warlock T5 2P Bonus
1749{
1751
1752 bool Validate(SpellInfo const* /*spellInfo*/) override
1753 {
1755 }
1756
1757 void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
1758 {
1760 DamageInfo* damageInfo = eventInfo.GetDamageInfo();
1761 if (!damageInfo || !damageInfo->GetDamage())
1762 return;
1763
1764 CastSpellExtraArgs args(aurEff);
1765 args.AddSpellBP0(CalculatePct(damageInfo->GetDamage(), aurEff->GetAmount()));
1766 eventInfo.GetActor()->CastSpell(nullptr, SPELL_HEALTH_LINK, args);
1767 }
1768
1773};
1774
1775// 17512 - Piccolo of the Flaming Fire
1792
1794{
1795 SPELL_LIMITLESS_POWER = 45044
1797
1798// 45043 - Power Circle (Shifting Naaru Sliver)
1833
1834// http://www.wowhead.com/item=6657 Savory Deviate Delight
1835// 8213 Savory Deviate Delight
1843
1845{
1847
1848 bool Load() override
1849 {
1850 return GetCaster()->GetTypeId() == TYPEID_PLAYER;
1851 }
1852
1853 bool Validate(SpellInfo const* /*spellInfo*/) override
1854 {
1855 return ValidateSpellInfo(
1856 {
1861 });
1862 }
1863
1864 void HandleDummy(SpellEffIndex /*effIndex*/)
1865 {
1866 Unit* caster = GetCaster();
1867 uint32 spellId = 0;
1868 switch (urand(1, 2))
1869 {
1870 // Flip Out - ninja
1871 case 1: spellId = (caster->GetNativeGender() == GENDER_MALE ? SPELL_FLIP_OUT_MALE : SPELL_FLIP_OUT_FEMALE); break;
1872 // Yaaarrrr - pirate
1873 case 2: spellId = (caster->GetNativeGender() == GENDER_MALE ? SPELL_YAAARRRR_MALE : SPELL_YAAARRRR_FEMALE); break;
1874 }
1875 caster->CastSpell(caster, spellId, true);
1876 }
1877
1882};
1883
1884// 48129 - Scroll of Recall
1885// 60320 - Scroll of Recall II
1886// 60321 - Scroll of Recall III
1896
1898{
1900
1901 bool Load() override
1902 {
1903 return GetCaster()->GetTypeId() == TYPEID_PLAYER;
1904 }
1905
1907 {
1908 Unit* caster = GetCaster();
1909 uint8 maxSafeLevel = 0;
1910 switch (GetSpellInfo()->Id)
1911 {
1912 case SPELL_SCROLL_OF_RECALL_I: // Scroll of Recall
1913 maxSafeLevel = 40;
1914 break;
1915 case SPELL_SCROLL_OF_RECALL_II: // Scroll of Recall II
1916 maxSafeLevel = 70;
1917 break;
1918 case SPELL_SCROLL_OF_RECALL_III: // Scroll of Recal III
1919 maxSafeLevel = 80;
1920 break;
1921 default:
1922 break;
1923 }
1924
1925 if (caster->GetLevel() > maxSafeLevel)
1926 {
1927 caster->CastSpell(caster, SPELL_LOST, true);
1928
1929 // ALLIANCE from 60323 to 60330 - HORDE from 60328 to 60335
1931 if (GetCaster()->ToPlayer()->GetTeam() == HORDE)
1933
1934 GetCaster()->CastSpell(GetCaster(), spellId + urand(0, 7), true);
1935
1936 PreventHitDefaultEffect(effIndex);
1937 }
1938 }
1939
1944};
1945
1958
1959// 23442 - Dimensional Ripper - Everlook
1961{
1963
1964 bool Validate(SpellInfo const* /*spellInfo*/) override
1965 {
1967 }
1968
1969 bool Load() override
1970 {
1971 return GetCaster()->GetTypeId() == TYPEID_PLAYER;
1972 }
1973
1974 void HandleScript(SpellEffIndex /* effIndex */)
1975 {
1976 int32 r = irand(0, 119);
1977 if (r <= 70) // 7/12 success
1978 return;
1979
1980 Unit* caster = GetCaster();
1981
1982 if (r < 100) // 4/12 evil twin
1983 caster->CastSpell(caster, SPELL_EVIL_TWIN, true);
1984 else // 1/12 fire
1985 caster->CastSpell(caster, SPELL_TRANSPORTER_MALFUNCTION_FIRE, true);
1986 }
1987
1992};
1993
1994// 36941 - Ultrasafe Transporter: Toshley's Station
1996{
1998
2013
2014 bool Load() override
2015 {
2016 return GetCaster()->GetTypeId() == TYPEID_PLAYER;
2017 }
2018
2019 void HandleScript(SpellEffIndex /* effIndex */)
2020 {
2021 if (!roll_chance_i(50)) // 50% success
2022 return;
2023
2024 Unit* caster = GetCaster();
2025
2026 uint32 spellId = 0;
2027 switch (urand(0, 6))
2028 {
2029 case 0:
2031 break;
2032 case 1:
2034 break;
2035 case 2:
2036 spellId = SPELL_SOUL_SPLIT_EVIL;
2037 break;
2038 case 3:
2039 spellId = SPELL_SOUL_SPLIT_GOOD;
2040 break;
2041 case 4:
2042 if (caster->ToPlayer()->GetTeamId() == TEAM_ALLIANCE)
2043 spellId = SPELL_TRANSFORM_HORDE;
2044 else
2045 spellId = SPELL_TRANSFORM_ALLIANCE;
2046 break;
2047 case 5:
2049 break;
2050 case 6:
2051 spellId = SPELL_EVIL_TWIN;
2052 break;
2053 default:
2054 break;
2055 }
2056
2057 caster->CastSpell(caster, spellId, true);
2058 }
2059
2064};
2065
2066// 36890 - Dimensional Ripper - Area 52
2068{
2070
2071 bool Validate(SpellInfo const* /*spellInfo*/) override
2072 {
2073 return ValidateSpellInfo(
2074 {
2080 });
2081 }
2082
2083 bool Load() override
2084 {
2085 return GetCaster()->GetTypeId() == TYPEID_PLAYER;
2086 }
2087
2088 void HandleScript(SpellEffIndex /* effIndex */)
2089 {
2090 if (!roll_chance_i(50)) // 50% success
2091 return;
2092
2093 Unit* caster = GetCaster();
2094
2095 uint32 spellId = 0;
2096 switch (urand(0, 3))
2097 {
2098 case 0:
2100 break;
2101 case 1:
2102 spellId = SPELL_SOUL_SPLIT_EVIL;
2103 break;
2104 case 2:
2105 spellId = SPELL_SOUL_SPLIT_GOOD;
2106 break;
2107 case 3:
2108 if (caster->ToPlayer()->GetTeamId() == TEAM_ALLIANCE)
2109 spellId = SPELL_TRANSFORM_HORDE;
2110 else
2111 spellId = SPELL_TRANSFORM_ALLIANCE;
2112 break;
2113 default:
2114 break;
2115 }
2116
2117 caster->CastSpell(caster, spellId, true);
2118 }
2119
2124};
2125
2126// 71169 - Shadow's Fate (Shadowmourne questline)
2128{
2130 NPC_SINDRAGOSA = 36853
2132
2134{
2136
2137 bool CheckProc(ProcEventInfo& procInfo)
2138 {
2139 Unit* caster = procInfo.GetActor();
2140 if (!caster || caster->GetTypeId() != TYPEID_PLAYER)
2141 return false;
2142
2143 Unit* target = procInfo.GetActionTarget();
2144 if (!target || target->GetTypeId() != TYPEID_UNIT || target->IsCritter() || (target->GetEntry() != NPC_SINDRAGOSA && target->IsSummon()))
2145 return false;
2146
2147 return true;
2148 }
2149
2154};
2155
2157{
2159
2161 {
2163
2164 Unit* caster = procInfo.GetActor();
2165 Unit* target = GetCaster();
2166 if (!caster || !target)
2167 return;
2168
2169 caster->CastSpell(target, SPELL_SOUL_FEAST, true);
2170 }
2171
2172 void Register() override
2173 {
2175 }
2176};
2177
2186
2187// 71903 - Item - Shadowmourne Legendary
2189{
2191
2192 bool Validate(SpellInfo const* /*spellInfo*/) override
2193 {
2194 return ValidateSpellInfo(
2195 {
2199 });
2200 }
2201
2202 bool CheckProc(ProcEventInfo& eventInfo)
2203 {
2204 // cant collect shards while under effect of Chaos Bane buff
2205 return !eventInfo.GetActor()->HasAura(SPELL_SHADOWMOURNE_CHAOS_BANE_BUFF) && eventInfo.GetActionTarget()->IsAlive();
2206 }
2207
2208 void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
2209 {
2211 eventInfo.GetActor()->CastSpell(eventInfo.GetActor(), SPELL_SHADOWMOURNE_SOUL_FRAGMENT, aurEff);
2212
2213 // this can't be handled in AuraScript of SoulFragments because we need to know victim
2214 if (Aura* soulFragments = GetTarget()->GetAura(SPELL_SHADOWMOURNE_SOUL_FRAGMENT))
2215 {
2216 if (soulFragments->GetStackAmount() >= 10)
2217 {
2219 soulFragments->Remove();
2220 }
2221 }
2222 }
2223
2228
2235};
2236
2237// 71905 - Soul Fragment
2239{
2241
2242 bool Validate(SpellInfo const* /*spellInfo*/) override
2243 {
2244 return ValidateSpellInfo(
2245 {
2249 });
2250 }
2251
2252 void OnStackChange(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
2253 {
2254 Unit* target = GetTarget();
2255 switch (GetStackAmount())
2256 {
2257 case 1:
2258 target->CastSpell(target, SPELL_SHADOWMOURNE_VISUAL_LOW, true);
2259 break;
2260 case 6:
2262 target->CastSpell(target, SPELL_SHADOWMOURNE_VISUAL_HIGH, true);
2263 break;
2264 case 10:
2266 target->CastSpell(target, SPELL_SHADOWMOURNE_CHAOS_BANE_BUFF, true);
2267 break;
2268 default:
2269 break;
2270 }
2271 }
2272
2273 void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
2274 {
2275 Unit* target = GetTarget();
2278 }
2279
2285};
2286
2287// http://www.wowhead.com/item=7734 Six Demon Bag
2288// 14537 Six Demon Bag
2298
2300{
2302
2303 bool Validate(SpellInfo const* /*spellInfo*/) override
2304 {
2305 return ValidateSpellInfo(
2306 {
2313 });
2314 }
2315
2316 void HandleDummy(SpellEffIndex /*effIndex*/)
2317 {
2318 Unit* caster = GetCaster();
2319 if (Unit* target = GetHitUnit())
2320 {
2321 uint32 spellId = 0;
2322 uint32 rand = urand(0, 99);
2323 if (rand < 25) // Fireball (25% chance)
2324 spellId = SPELL_FIREBALL;
2325 else if (rand < 50) // Frostball (25% chance)
2326 spellId = SPELL_FROSTBOLT;
2327 else if (rand < 70) // Chain Lighting (20% chance)
2328 spellId = SPELL_CHAIN_LIGHTNING;
2329 else if (rand < 80) // Polymorph (10% chance)
2330 {
2331 spellId = SPELL_POLYMORPH;
2332 if (urand(0, 100) <= 30) // 30% chance to self-cast
2333 target = caster;
2334 }
2335 else if (rand < 95) // Enveloping Winds (15% chance)
2336 spellId = SPELL_ENVELOPING_WINDS;
2337 else // Summon Felhund minion (5% chance)
2338 {
2340 target = caster;
2341 }
2342
2343 caster->CastSpell(target, spellId, GetCastItem());
2344 }
2345 }
2346
2351};
2352
2357
2358// 59906 - Swift Hand of Justice Dummy
2360{
2362
2363 bool Validate(SpellInfo const* /*spellInfo*/) override
2364 {
2366 }
2367
2368 void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
2369 {
2371
2372 Unit* caster = eventInfo.GetActor();
2373 CastSpellExtraArgs args(aurEff);
2374 args.AddSpellBP0(caster->CountPctFromMaxHealth(aurEff->GetAmount()));
2375 caster->CastSpell(nullptr, SPELL_SWIFT_HAND_OF_JUSTICE_HEAL, args);
2376 }
2377
2382};
2383
2388
2389// Item - 23005: Totem of Flowing Water
2390// 28849 - Lesser Healing Wave
2392{
2394
2395 bool Validate(SpellInfo const* /*spellInfo*/) override
2396 {
2398 }
2399
2400 void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
2401 {
2403 eventInfo.GetActor()->CastSpell(nullptr, SPELL_LESSER_HEALING_WAVE_MANA, aurEff);
2404 }
2405
2410};
2411
2412// 28862 - The Eye of Diminution
2414{
2416
2417 void CalculateAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
2418 {
2419 int32 diff = GetUnitOwner()->GetLevel() - 60;
2420 if (diff > 0)
2421 amount += diff;
2422 }
2423
2428};
2429
2430// http://www.wowhead.com/item=44012 Underbelly Elixir
2431// 59640 Underbelly Elixir
2438
2440{
2442
2443 bool Load() override
2444 {
2445 return GetCaster()->GetTypeId() == TYPEID_PLAYER;
2446 }
2447 bool Validate(SpellInfo const* /*spellInfo*/) override
2448 {
2449 return ValidateSpellInfo(
2450 {
2454 });
2455 }
2456
2457 void HandleDummy(SpellEffIndex /*effIndex*/)
2458 {
2459 Unit* caster = GetCaster();
2461 switch (urand(1, 3))
2462 {
2463 case 1: spellId = SPELL_UNDERBELLY_ELIXIR_TRIGGERED1; break;
2464 case 2: spellId = SPELL_UNDERBELLY_ELIXIR_TRIGGERED2; break;
2465 }
2466 caster->CastSpell(caster, spellId, true);
2467 }
2468
2473};
2474
2475// 47776 - Roll 'dem Bones
2477{
2479
2480 enum
2481 {
2482 TEXT_WORN_TROLL_DICE = 26152
2484
2485 bool Validate(SpellInfo const* /*spellInfo*/) override
2486 {
2487 if (!sObjectMgr->GetBroadcastText(TEXT_WORN_TROLL_DICE))
2488 return false;
2489 return true;
2490 }
2491
2492 bool Load() override
2493 {
2494 return GetCaster()->GetTypeId() == TYPEID_PLAYER;
2495 }
2496
2497 void HandleScript(SpellEffIndex /*effIndex*/)
2498 {
2500
2501 static uint32 const minimum = 1;
2502 static uint32 const maximum = 6;
2503
2504 // roll twice
2505 GetCaster()->ToPlayer()->DoRandomRoll(minimum, maximum);
2506 GetCaster()->ToPlayer()->DoRandomRoll(minimum, maximum);
2507 }
2508
2513};
2514
2521
2523{
2525
2526 bool Validate(SpellInfo const* /*spell*/) override
2527 {
2528 return ValidateSpellInfo(
2529 {
2533 });
2534 }
2535
2537 {
2538 PreventHitDefaultEffect(effIndex);
2539 Unit* caster = GetCaster();
2540 if (Unit* target = GetHitUnit())
2541 {
2542 caster->CastSpell(caster, SPELL_AIR_RIFLE_HOLD_VISUAL, true);
2543 // needed because this spell shares GCD with its triggered spells (which must not be cast with triggered flag)
2544 if (Player* player = caster->ToPlayer())
2545 player->GetSpellHistory()->CancelGlobalCooldown(GetSpellInfo());
2546 if (urand(0, 4))
2547 caster->CastSpell(target, SPELL_AIR_RIFLE_SHOOT, false);
2548 else
2549 caster->CastSpell(caster, SPELL_AIR_RIFLE_SHOOT_SELF, false);
2550 }
2551 }
2552
2557};
2558
2560{
2562
2563 bool Load() override
2564 {
2565 return GetCaster()->GetTypeId() == TYPEID_PLAYER;
2566 }
2567
2578
2579 void HandleScript(SpellEffIndex /*effIndex*/)
2580 {
2581 Player* caster = GetCaster()->ToPlayer();
2582 uint32 spellId = GetSpellInfo()->Id;
2583
2584 // learn random explicit discovery recipe (if any)
2585 if (uint32 discoveredSpellId = GetExplicitDiscoverySpell(spellId, caster))
2586 caster->LearnSpell(discoveredSpellId, false);
2587 }
2588
2594};
2595
2597{
2598 NPC_GHOUL = 28845,
2600};
2601
2624
2631
2653
2660
2662{
2664
2665 bool Validate(SpellInfo const* /*spellInfo*/) override
2666 {
2667 return ValidateSpellInfo(
2668 {
2672 });
2673 }
2674
2675 void HandleDummy(SpellEffIndex /*effIndex*/)
2676 {
2678 Unit* caster = GetCaster();
2679 caster->CastSpell(caster, spellId, true);
2680 }
2681
2686};
2687
2689{
2690 SOUND_ASHBRINGER_1 = 8906, // "I was pure once"
2691 SOUND_ASHBRINGER_2 = 8907, // "Fought for righteousness"
2692 SOUND_ASHBRINGER_3 = 8908, // "I was once called Ashbringer"
2693 SOUND_ASHBRINGER_4 = 8920, // "Betrayed by my order"
2694 SOUND_ASHBRINGER_5 = 8921, // "Destroyed by Kel'Thuzad"
2695 SOUND_ASHBRINGER_6 = 8922, // "Made to serve"
2696 SOUND_ASHBRINGER_7 = 8923, // "My son watched me die"
2697 SOUND_ASHBRINGER_8 = 8924, // "Crusades fed his rage"
2698 SOUND_ASHBRINGER_9 = 8925, // "Truth is unknown to him"
2699 SOUND_ASHBRINGER_10 = 8926, // "Scarlet Crusade is pure no longer"
2700 SOUND_ASHBRINGER_11 = 8927, // "Balnazzar's crusade corrupted my son"
2701 SOUND_ASHBRINGER_12 = 8928, // "Kill them all!"
2702};
2703
2705{
2707
2708 bool Load() override
2709 {
2710 return GetCaster()->GetTypeId() == TYPEID_PLAYER;
2711 }
2712
2714 {
2715 PreventHitDefaultEffect(effIndex);
2716
2717 Player* player = GetCaster()->ToPlayer();
2720
2721 // Ashbringers effect (spellID 28441) retriggers every 5 seconds, with a chance of making it say one of the above 12 sounds
2722 if (urand(0, 60) < 1)
2723 player->PlayDirectSound(sound_id, player);
2724 }
2725
2730};
2731
2741
2742// 58886 - Food
2744{
2746
2747 void HandleTriggerSpell(AuraEffect const* /*aurEff*/)
2748 {
2750 Unit* target = GetTarget();
2751 switch (urand(0, 5))
2752 {
2753 case 0:
2754 target->CastSpell(target, SPELL_WILD_MAGIC, true);
2755 break;
2756 case 1:
2757 target->CastSpell(target, SPELL_WELL_FED_1, true);
2758 break;
2759 case 2:
2760 target->CastSpell(target, SPELL_WELL_FED_2, true);
2761 break;
2762 case 3:
2763 target->CastSpell(target, SPELL_WELL_FED_3, true);
2764 break;
2765 case 4:
2766 target->CastSpell(target, SPELL_WELL_FED_4, true);
2767 break;
2768 case 5:
2769 target->CastSpell(target, SPELL_WELL_FED_5, true);
2770 break;
2771 }
2772 }
2773
2778};
2779
2785
2787{
2789
2790 bool Validate(SpellInfo const* /*spell*/) override
2791 {
2793 }
2794
2795 void HandleDummy(SpellEffIndex /* effIndex */)
2796 {
2797 Unit* caster = GetCaster();
2798 if (Item* castItem = GetCastItem())
2799 {
2800 if (roll_chance_i(86)) // Nigh-Invulnerability - success
2801 caster->CastSpell(caster, SPELL_NIGH_INVULNERABILITY, castItem);
2802 else // Complete Vulnerability - backfire in 14% casts
2803 caster->CastSpell(caster, SPELL_COMPLETE_VULNERABILITY, castItem);
2804 }
2805 }
2806
2811};
2812
2818
2839
2846
2848{
2850
2851 bool Validate(SpellInfo const* /*spell*/) override
2852 {
2854 sObjectMgr->GetCreatureTemplate(NPC_ABYSSAL_FLAMEBRINGER) &&
2855 sObjectMgr->GetQuestTemplate(QUEST_SUPER_HOT_STEW);
2856 }
2857
2858 bool Load() override
2859 {
2860 return GetCaster()->GetTypeId() == TYPEID_PLAYER;
2861 }
2862
2863 void HandleDummy(SpellEffIndex /* effIndex */)
2864 {
2865 Unit* player = GetCaster();
2866 player->CastSpell(player, SPELL_CREATE_DEMON_BROILED_SURPRISE, false);
2867 }
2868
2870 {
2871 Player* player = GetCaster()->ToPlayer();
2874
2875 if (Creature* creature = player->FindNearestCreature(NPC_ABYSSAL_FLAMEBRINGER, 10, false))
2876 if (creature->isDead())
2877 return SPELL_CAST_OK;
2878 return SPELL_FAILED_NOT_HERE;
2879 }
2880
2886};
2887
2892
2894{
2896
2897 bool Validate(SpellInfo const* /*spell*/) override
2898 {
2900 }
2901
2902 void HandleDummy(SpellEffIndex /* effIndex */)
2903 {
2904 Unit* caster = GetCaster();
2905 if (GetHitCreature())
2906 {
2908
2909 //cast spell Raptor Capture Credit
2910 caster->CastSpell(caster, SPELL_RAPTOR_CAPTURE_CREDIT, true);
2911 }
2912 }
2913
2918};
2919
2925
2927{
2929
2930 bool Validate(SpellInfo const* /*spell*/) override
2931 {
2932 if (!sObjectMgr->GetCreatureTemplate(NPC_LEVIROTH))
2933 return false;
2934 return true;
2935 }
2936
2937 void HandleDummy(SpellEffIndex /*effIndex*/)
2938 {
2939 if (Creature* target = GetHitCreature())
2940 if (target->GetEntry() == NPC_LEVIROTH && !target->HealthBelowPct(95))
2941 {
2942 target->CastSpell(target, SPELL_LEVIROTH_SELF_IMPALE, true);
2943 target->ResetPlayerDamageReq();
2944 }
2945 }
2946
2951};
2952
2958
2959// 23725 - Gift of Life
2961{
2963
2964 bool Validate(SpellInfo const* /*spellInfo*/) override
2965 {
2967 }
2968
2969 void HandleDummy(SpellEffIndex /*effIndex*/)
2970 {
2971 Unit* caster = GetCaster();
2972 caster->CastSpell(caster, SPELL_GIFT_OF_LIFE_1, true);
2973 caster->CastSpell(caster, SPELL_GIFT_OF_LIFE_2, true);
2974 }
2975
2980};
2981
2988
2990{
2992
2993 bool Load() override
2994 {
2995 if (!GetCastItem())
2996 return false;
2997 return true;
2998 }
2999
3000 bool Validate(SpellInfo const* /*spell*/) override
3001 {
3003 }
3004
3005 void HandleDummy(SpellEffIndex /* effIndex */)
3006 {
3007 Unit* caster = GetCaster();
3008 AreaTableEntry const* areaEntry = sAreaTableStore.LookupEntry(caster->GetAreaId());
3009 bool success = true;
3010 if (areaEntry && areaEntry->IsFlyable() && !caster->GetMap()->IsDungeon())
3011 success = roll_chance_i(95); // nitro boosts can only fail in flying-enabled locations on 3.3.5
3013 }
3014
3019};
3020
3022{
3024
3025 bool Validate(SpellInfo const* /*spell*/) override
3026 {
3028 }
3029
3030 void HandleApply(AuraEffect const* /*effect*/, AuraEffectHandleModes /*mode*/)
3031 {
3033 }
3034
3036 {
3038 float curZ = GetTarget()->GetPositionZ();
3039 if (curZ < lastZ)
3040 {
3041 if (roll_chance_i(80)) // we don't have enough sniffs to verify this, guesstimate
3043 GetAura()->Remove();
3044 }
3045 else
3046 lastZ = curZ;
3047 }
3048
3054
3056};
3057
3062
3064{
3066
3067 bool Load() override
3068 {
3069 return GetCaster()->GetTypeId() == TYPEID_PLAYER;
3070 }
3071
3072 bool Validate(SpellInfo const* /*spell*/) override
3073 {
3075 }
3076
3077 void HandleDummy(SpellEffIndex /* effIndex */)
3078 {
3079 Player* caster = GetCaster()->ToPlayer();
3080 if (Battleground* bg = caster->GetBattleground())
3081 bg->EventPlayerDroppedFlag(caster);
3082
3084 caster->CastSpell(caster, SPELL_ROCKET_BOOTS_PROC, true);
3085 }
3086
3088 {
3089 if (GetCaster()->IsInWater())
3091 return SPELL_CAST_OK;
3092 }
3093
3099};
3100
3102{
3104
3105 bool Load() override
3106 {
3107 return GetCaster()->GetTypeId() == TYPEID_PLAYER;
3108 }
3109
3110 void HandleHeal(SpellEffIndex /*effIndex*/)
3111 {
3112 if (Player* caster = GetCaster()->ToPlayer())
3113 if (caster->HasSkill(SKILL_ENGINEERING))
3114 SetHitHeal(GetHitHeal() * 1.25f);
3115 }
3116
3121};
3122
3128
3130{
3132
3133 bool Validate(SpellInfo const* /*spell*/) override
3134 {
3136 }
3137
3138 void HandleDummy(SpellEffIndex /* effIndex */)
3139 {
3140 Unit* caster = GetCaster();
3141 if (Aura* aura = caster->GetAura(SPELL_PYGMY_OIL_PYGMY_AURA))
3142 aura->RefreshDuration();
3143 else
3144 {
3145 aura = caster->GetAura(SPELL_PYGMY_OIL_SMALLER_AURA);
3146 if (!aura || aura->GetStackAmount() < 5 || !roll_chance_i(50))
3147 caster->CastSpell(caster, SPELL_PYGMY_OIL_SMALLER_AURA, true);
3148 else
3149 {
3150 aura->Remove();
3151 caster->CastSpell(caster, SPELL_PYGMY_OIL_PYGMY_AURA, true);
3152 }
3153 }
3154 }
3155
3160};
3161
3163{
3165
3166 void HandleDummy(SpellEffIndex /* effIndex */)
3167 {
3168 Unit* caster = GetCaster();
3169 caster->SetFacingTo(frand(0.0f, 2.0f * float(M_PI)));
3170 }
3171
3176};
3177
3185
3187{
3189
3190 bool Load() override
3191 {
3192 return GetCaster()->GetTypeId() == TYPEID_PLAYER;
3193 }
3194
3195 bool Validate(SpellInfo const* /*spell*/) override
3196 {
3198 sObjectMgr->GetQuestTemplate(QUEST_CHICKEN_PARTY) &&
3199 sObjectMgr->GetQuestTemplate(QUEST_FLOWN_THE_COOP);
3200 }
3201
3202 void HandleDummy(SpellEffIndex /* effIndex */)
3203 {
3204 Player* caster = GetCaster()->ToPlayer();
3205 if (Unit* target = GetHitUnit())
3206 {
3208 {
3209 caster->CastSpell(caster, SPELL_CAPTURE_CHICKEN_ESCAPE, true);
3210 target->KillSelf();
3211 }
3212 }
3213 }
3214
3219};
3220
3222{
3226};
3227
3229{
3231
3232 void HandleDummy(SpellEffIndex /*effIndex*/)
3233 {
3234 Player* caster = GetCaster()->ToPlayer();
3235
3236 if (!caster || caster->GetClass() != CLASS_HUNTER)
3237 return;
3238
3241
3244
3246 caster->GetSpellHistory()->ResetCooldown(SPELL_VOLLEY, true);
3247 }
3248
3253};
3254
3256{
3258
3259 void HandleDummy(SpellEffIndex /*effIndex*/)
3260 {
3261 if (Creature* target = GetHitCreature())
3262 if (target->isDead())
3263 target->DespawnOrUnsummon();
3264 }
3265
3270};
3271
3291
3300
3301// Item - 49310: Purified Shard of the Scale
3302// 69755 - Purified Shard of the Scale - Equip Effect
3303
3304// Item - 49488: Shiny Shard of the Scale
3305// 69739 - Shiny Shard of the Scale - Equip Effect
3306template <uint32 HealProcSpellId, uint32 DamageProcSpellId>
3308{
3309 public:
3310 spell_item_shard_of_the_scale(char const* ScriptName) : SpellScriptLoader(ScriptName) { }
3311
3312 template <uint32 HealProc, uint32 DamageProc>
3314 {
3316
3317 bool Validate(SpellInfo const* /*spellInfo*/) override
3318 {
3319 return ValidateSpellInfo(
3320 {
3321 HealProc,
3322 DamageProc
3323 });
3324 }
3325
3326 void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
3327 {
3329 Unit* caster = eventInfo.GetActor();
3330 Unit* target = eventInfo.GetActionTarget();
3331
3333 caster->CastSpell(target, HealProc, aurEff);
3334
3336 caster->CastSpell(target, DamageProc, aurEff);
3337 }
3338
3343 };
3344
3349};
3350
3358
3360{
3362
3363 bool Validate(SpellInfo const* /*spellInfo*/) override
3364 {
3365 return ValidateSpellInfo(
3366 {
3371 });
3372 }
3373
3374 void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
3375 {
3377
3378 Unit* caster = eventInfo.GetActor();
3379
3380 switch (caster->GetClass())
3381 {
3382 case CLASS_DRUID:
3383 caster->CastSpell(caster, SPELL_SOUL_PRESERVER_DRUID, aurEff);
3384 break;
3385 case CLASS_PALADIN:
3386 caster->CastSpell(caster, SPELL_SOUL_PRESERVER_PALADIN, aurEff);
3387 break;
3388 case CLASS_PRIEST:
3389 caster->CastSpell(caster, SPELL_SOUL_PRESERVER_PRIEST, aurEff);
3390 break;
3391 case CLASS_SHAMAN:
3392 caster->CastSpell(caster, SPELL_SOUL_PRESERVER_SHAMAN, aurEff);
3393 break;
3394 default:
3395 break;
3396 }
3397 }
3398
3403};
3404
3406{
3407 SPELL_LIGHTS_WRATH = 45479, // Light's Wrath if Exalted by Aldor
3408 SPELL_ARCANE_BOLT = 45429, // Arcane Bolt if Exalted by Scryers
3409
3410 SPELL_LIGHTS_STRENGTH = 45480, // Light's Strength if Exalted by Aldor
3411 SPELL_ARCANE_STRIKE = 45428, // Arcane Strike if Exalted by Scryers
3412
3413 SPELL_LIGHTS_WARD = 45432, // Light's Ward if Exalted by Aldor
3414 SPELL_ARCANE_INSIGHT = 45431, // Arcane Insight if Exalted by Scryers
3415
3416 SPELL_LIGHTS_SALVATION = 45478, // Light's Salvation if Exalted by Aldor
3417 SPELL_ARCANE_SURGE = 45430, // Arcane Surge if Exalted by Scryers
3418
3420 FACTION_SCRYERS = 934
3422
3423// Item - 34678: Shattered Sun Pendant of Acumen
3424// 45481 - Sunwell Exalted Caster Neck
3425
3426// Item - 34679: Shattered Sun Pendant of Might
3427// 45482 - Sunwell Exalted Melee Neck
3428
3429// Item - 34680: Shattered Sun Pendant of Resolve
3430// 45483 - Sunwell Exalted Tank Neck
3431
3432// Item - 34677: Shattered Sun Pendant of Restoration
3433// 45484 Sunwell Exalted Healer Neck
3434template <uint32 AldorSpellId, uint32 ScryersSpellId>
3436{
3437 public:
3438 spell_item_sunwell_neck(char const* ScriptName) : SpellScriptLoader(ScriptName) { }
3439
3440 template <uint32 Aldors, uint32 Scryers>
3442 {
3444
3445 bool Validate(SpellInfo const* /*spellInfo*/) override
3446 {
3447 return ValidateSpellInfo({ Aldors, Scryers }) &&
3448 sFactionStore.LookupEntry(FACTION_ALDOR) &&
3449 sFactionStore.LookupEntry(FACTION_SCRYERS);
3450 }
3451
3452 bool CheckProc(ProcEventInfo& eventInfo)
3453 {
3454 return eventInfo.GetActor()->GetTypeId() == TYPEID_PLAYER;
3455 }
3456
3457 void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
3458 {
3460 Player* player = eventInfo.GetActor()->ToPlayer();
3461 Unit* target = eventInfo.GetActionTarget();
3462
3463 // Aggression checks are in the spell system... just cast and forget
3465 player->CastSpell(target, Aldors, aurEff);
3466
3468 player->CastSpell(target, Scryers, aurEff);
3469 }
3470
3476 };
3477
3482};
3483
3485{
3487
3489 {
3490 if (Player* target = GetHitUnit()->ToPlayer())
3491 {
3492 target->HandleEmoteCommand(EMOTE_ONESHOT_TRAIN);
3493 if (EmotesTextSoundEntry const* soundEntry = FindTextSoundEmoteFor(TEXT_EMOTE_TRAIN, target->GetRace(), target->GetNativeGender()))
3494 target->PlayDistanceSound(soundEntry->SoundID);
3495 }
3496 }
3497
3498 void HandleTargets(std::list<WorldObject*>& targetList)
3499 {
3500 targetList.remove_if([](WorldObject const* obj) { return obj->GetTypeId() != TYPEID_PLAYER; });
3501 }
3502
3508};
3509
3519
3521{
3523
3534
3535 void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
3536 {
3538
3539 Unit* caster = eventInfo.GetActor();
3540 float str = caster->GetStat(STAT_STRENGTH);
3541 float agi = caster->GetStat(STAT_AGILITY);
3542
3543 switch (aurEff->GetId())
3544 {
3546 {
3547 if (str > agi)
3548 caster->CastSpell(caster, SPELL_DEATH_CHOICE_NORMAL_STRENGTH, aurEff);
3549 else
3550 caster->CastSpell(caster, SPELL_DEATH_CHOICE_NORMAL_AGILITY, aurEff);
3551 break;
3552 }
3554 {
3555 if (str > agi)
3556 caster->CastSpell(caster, SPELL_DEATH_CHOICE_HEROIC_STRENGTH, aurEff);
3557 else
3558 caster->CastSpell(caster, SPELL_DEATH_CHOICE_HEROIC_AGILITY, aurEff);
3559 break;
3560 }
3561 default:
3562 break;
3563 }
3564 }
3565
3570};
3571
3587
3589{
3590public:
3591 spell_item_trinket_stack(char const* scriptName, uint32 stackSpell, uint32 triggerSpell) : SpellScriptLoader(scriptName),
3592 _stackSpell(stackSpell), _triggerSpell(triggerSpell)
3593 {
3594 }
3595
3597 {
3599
3600 public:
3601 spell_item_trinket_stack_AuraScript(uint32 stackSpell, uint32 triggerSpell) : _stackSpell(stackSpell), _triggerSpell(triggerSpell)
3602 {
3603 }
3604
3605 private:
3606 bool Validate(SpellInfo const* /*spellInfo*/) override
3607 {
3609 }
3610
3611 void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
3612 {
3614
3615 Unit* caster = eventInfo.GetActor();
3616
3617 caster->CastSpell(caster, _stackSpell, aurEff); // cast the stack
3618
3619 Aura* dummy = caster->GetAura(_stackSpell); // retrieve aura
3620
3621 //dont do anything if it's not the right amount of stacks;
3622 if (!dummy || dummy->GetStackAmount() < aurEff->GetAmount())
3623 return;
3624
3625 // if right amount, remove the aura and cast real trigger
3627 if (Unit* target = eventInfo.GetActionTarget())
3628 caster->CastSpell(target, _triggerSpell, aurEff);
3629 }
3630
3631 void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
3632 {
3634 }
3635
3641
3644 };
3645
3650
3651private:
3654};
3655
3656// 57345 - Darkmoon Card: Greatness
3664
3666{
3668
3669 bool Validate(SpellInfo const* /*spellInfo*/) override
3670 {
3671 return ValidateSpellInfo(
3672 {
3677 });
3678 }
3679
3680 void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
3681 {
3683
3684 Unit* caster = eventInfo.GetActor();
3685 float str = caster->GetStat(STAT_STRENGTH);
3686 float agi = caster->GetStat(STAT_AGILITY);
3687 float intl = caster->GetStat(STAT_INTELLECT);
3688 float spi = caster->GetStat(STAT_SPIRIT);
3689 float stat = 0.0f;
3690
3691 uint32 spellTrigger = SPELL_DARKMOON_CARD_STRENGTH;
3692
3693 if (str > stat)
3694 {
3695 spellTrigger = SPELL_DARKMOON_CARD_STRENGTH;
3696 stat = str;
3697 }
3698
3699 if (agi > stat)
3700 {
3701 spellTrigger = SPELL_DARKMOON_CARD_AGILITY;
3702 stat = agi;
3703 }
3704
3705 if (intl > stat)
3706 {
3707 spellTrigger = SPELL_DARKMOON_CARD_INTELLECT;
3708 stat = intl;
3709 }
3710
3711 if (spi > stat)
3712 {
3713 spellTrigger = SPELL_DARKMOON_CARD_SPIRIT;
3714 stat = spi;
3715 }
3716
3717 caster->CastSpell(caster, spellTrigger, aurEff);
3718 }
3719
3724};
3725
3726// 43820 - Amani Charm of the Witch Doctor
3731
3733{
3735
3736 bool Validate(SpellInfo const* /*spellInfo*/) override
3737 {
3739 }
3740
3741 void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
3742 {
3744
3745 if (Unit* target = eventInfo.GetActionTarget())
3746 {
3747 int32 bp = CalculatePct(target->GetCreateHealth(), aurEff->GetSpellInfo()->GetEffect(EFFECT_1).CalcValue());
3748 CastSpellExtraArgs args(aurEff);
3749 args.AddSpellBP0(bp);
3750 eventInfo.GetActor()->CastSpell(target, SPELL_CHARM_WITCH_DOCTOR_PROC, args);
3751 }
3752 }
3753
3758};
3759
3760// 27522,40336 - Mana Drain
3766
3768{
3770
3771 bool Validate(SpellInfo const* /*spellInfo*/) override
3772 {
3773 return ValidateSpellInfo(
3774 {
3777 });
3778 }
3779
3780 void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
3781 {
3783
3784 Unit* caster = eventInfo.GetActor();
3785 Unit* target = eventInfo.GetActionTarget();
3786
3787 if (caster->IsAlive())
3788 caster->CastSpell(caster, SPELL_MANA_DRAIN_ENERGIZE, aurEff);
3789
3790 if (target && target->IsAlive())
3791 caster->CastSpell(target, SPELL_MANA_DRAIN_LEECH, aurEff);
3792 }
3793
3798};
3799
3801{
3803
3804 EMOTE_PLANTS_FLAG = 28008
3806
3807// 51640 - Taunt Flag Targeting
3809{
3811
3812 bool Validate(SpellInfo const* /*spellInfo*/) override
3813 {
3814 return ValidateSpellInfo({ SPELL_TAUNT_FLAG }) &&
3815 sObjectMgr->GetBroadcastText(EMOTE_PLANTS_FLAG);
3816 }
3817
3818 void FilterTargets(std::list<WorldObject*>& targets)
3819 {
3820 targets.remove_if([](WorldObject* obj) -> bool
3821 {
3822 return obj->GetTypeId() != TYPEID_PLAYER && obj->GetTypeId() != TYPEID_CORPSE;
3823 });
3824
3825 if (targets.empty())
3826 {
3828 return;
3829 }
3830
3832 }
3833
3834 void HandleDummy(SpellEffIndex /*effIndex*/)
3835 {
3836 // we *really* want the unit implementation here
3837 // it sends a packet like seen on sniff
3838 GetCaster()->Unit::TextEmote(EMOTE_PLANTS_FLAG, GetHitUnit(), false);
3839
3841 }
3842
3848};
3849
3856
3857// 29830 - Mirren's Drinking Hat
3859{
3861
3863 {
3864 uint32 spellId = 0;
3865 switch (urand(1, 6))
3866 {
3867 case 1:
3868 case 2:
3869 case 3:
3870 spellId = SPELL_LOCH_MODAN_LAGER; break;
3871 case 4:
3872 case 5:
3873 spellId = SPELL_STOUTHAMMER_LITE; break;
3874 case 6:
3875 spellId = SPELL_AERIE_PEAK_PALE_ALE; break;
3876 }
3877
3878 Unit* caster = GetCaster();
3879 caster->CastSpell(caster, spellId);
3880 }
3881
3886};
3887
3888// 13180 - Gnomish Mind Control Cap
3896
3898{
3900
3901 bool Load() override
3902 {
3903 if (!GetCastItem())
3904 return false;
3905 return true;
3906 }
3907
3908 bool Validate(SpellInfo const* /*spell*/) override
3909 {
3911 }
3912
3913 void HandleDummy(SpellEffIndex /* effIndex */)
3914 {
3915 Unit* caster = GetCaster();
3916 if (Unit* target = GetHitUnit())
3917 {
3920 else
3921 target->CastSpell(caster, SPELL_GNOMISH_MIND_CONTROL_CAP, true); // backfire - 5% chance
3922 }
3923 }
3924
3929};
3930
3931// 8344 - Universal Remote (Gnomish Universal Remote)
3938
3940{
3942
3943 bool Load() override
3944 {
3945 if (!GetCastItem())
3946 return false;
3947 return true;
3948 }
3949
3950 bool Validate(SpellInfo const* /*spellInfo*/) override
3951 {
3953 }
3954
3955 void HandleDummy(SpellEffIndex /*effIndex*/)
3956 {
3957 if (Unit* target = GetHitUnit())
3958 {
3959 uint8 chance = urand(0, 99);
3960 if (chance < 15)
3962 else if (chance < 25)
3964 else
3966 }
3967 }
3968
3973};
3974
3980
3981// Item - 19950: Zandalarian Hero Charm
3982// 24658 - Unstable Power
3983
3984// Item - 19949: Zandalarian Hero Medallion
3985// 24661 - Restless Strength
3987{
3988 public:
3989 spell_item_zandalarian_charm(char const* ScriptName, uint32 SpellId) : SpellScriptLoader(ScriptName), _spellId(SpellId) { }
3990
3992 {
3995
3997
3998 bool Validate(SpellInfo const* /*spellInfo*/) override
3999 {
4000 return ValidateSpellInfo({ _spellId });
4001 }
4002
4003 bool CheckProc(ProcEventInfo& eventInfo)
4004 {
4005 if (SpellInfo const* spellInfo = eventInfo.GetSpellInfo())
4006 if (spellInfo->Id != m_scriptSpellId)
4007 return true;
4008
4009 return false;
4010 }
4011
4012 void HandleStackDrop(AuraEffect const* /*aurEff*/, ProcEventInfo& /*eventInfo*/)
4013 {
4016 }
4017
4023
4025 };
4026
4027 AuraScript* GetAuraScript() const override
4028 {
4030 }
4031
4032 private:
4034};
4035
4036// 45051 - Mad Alchemist's Potion (34440)
4038{
4040
4042 {
4043 std::vector<uint32> availableElixirs =
4044 {
4045 // Battle Elixirs
4046 33720, // Onslaught Elixir (28102)
4047 54452, // Adept's Elixir (28103)
4048 33726, // Elixir of Mastery (28104)
4049 28490, // Elixir of Major Strength (22824)
4050 28491, // Elixir of Healing Power (22825)
4051 28493, // Elixir of Major Frost Power (22827)
4052 54494, // Elixir of Major Agility (22831)
4053 28501, // Elixir of Major Firepower (22833)
4054 28503,// Elixir of Major Shadow Power (22835)
4055 38954, // Fel Strength Elixir (31679)
4056 // Guardian Elixirs
4057 39625, // Elixir of Major Fortitude (32062)
4058 39626, // Earthen Elixir (32063)
4059 39627, // Elixir of Draenic Wisdom (32067)
4060 39628, // Elixir of Ironskin (32068)
4061 28502, // Elixir of Major Defense (22834)
4062 28514, // Elixir of Empowerment (22848)
4063 // Other
4064 28489, // Elixir of Camouflage (22823)
4065 28496 // Elixir of the Searching Eye (22830)
4066 };
4067
4068 Unit* target = GetCaster();
4069
4070 if (target->GetPowerType() == POWER_MANA)
4071 availableElixirs.push_back(28509); // Elixir of Major Mageblood (22840)
4072
4073 uint32 chosenElixir = Trinity::Containers::SelectRandomContainerElement(availableElixirs);
4074
4075 bool useElixir = true;
4076
4077 SpellGroup chosenSpellGroup = SPELL_GROUP_NONE;
4078 if (sSpellMgr->IsSpellMemberOfSpellGroup(chosenElixir, SPELL_GROUP_ELIXIR_BATTLE))
4079 chosenSpellGroup = SPELL_GROUP_ELIXIR_BATTLE;
4080 if (sSpellMgr->IsSpellMemberOfSpellGroup(chosenElixir, SPELL_GROUP_ELIXIR_GUARDIAN))
4081 chosenSpellGroup = SPELL_GROUP_ELIXIR_GUARDIAN;
4082 // If another spell of the same group is already active the elixir should not be cast
4083 if (chosenSpellGroup != SPELL_GROUP_NONE)
4084 {
4085 Unit::AuraApplicationMap const& auraMap = target->GetAppliedAuras();
4086 for (auto itr = auraMap.begin(); itr != auraMap.end(); ++itr)
4087 {
4088 uint32 spellId = itr->second->GetBase()->GetId();
4089 if (sSpellMgr->IsSpellMemberOfSpellGroup(spellId, chosenSpellGroup) && spellId != chosenElixir)
4090 {
4091 useElixir = false;
4092 break;
4093 }
4094 }
4095 }
4096
4097 if (useElixir)
4098 target->CastSpell(target, chosenElixir, GetCastItem());
4099 }
4100
4105};
4106
4107// 53750 - Crazy Alchemist's Potion (40077)
4109{
4111
4113 {
4114 std::vector<uint32> availableElixirs =
4115 {
4116 43185, // Runic Healing Potion (33447)
4117 53750, // Crazy Alchemist's Potion (40077)
4118 53761, // Powerful Rejuvenation Potion (40087)
4119 53762, // Indestructible Potion (40093)
4120 53908, // Potion of Speed (40211)
4121 53909, // Potion of Wild Magic (40212)
4122 53910, // Mighty Arcane Protection Potion (40213)
4123 53911, // Mighty Fire Protection Potion (40214)
4124 53913, // Mighty Frost Protection Potion (40215)
4125 53914, // Mighty Nature Protection Potion (40216)
4126 53915 // Mighty Shadow Protection Potion (40217)
4127 };
4128
4129 Unit* target = GetCaster();
4130
4131 if (!target->IsInCombat())
4132 availableElixirs.push_back(53753); // Potion of Nightmares (40081)
4133 if (target->GetPowerType() == POWER_MANA)
4134 availableElixirs.push_back(43186); // Runic Mana Potion(33448)
4135
4136 uint32 chosenElixir = Trinity::Containers::SelectRandomContainerElement(availableElixirs);
4137
4138 target->CastSpell(target, chosenElixir, GetCastItem());
4139 }
4140
4145};
4146
4152
4153// 21149 - Egg Nog
4174
4175// Titanium Seal of Dalaran
4182
4183// 60458 - Toss Your Luck!
4210
4211// 60476 - Toss Your Luck!
4232
4237
4238// 69377 - Fortitude
4258
4263
4264// 69378 - Blessing of Forgotten Kings
4284
4289
4290// 69381 - Gift of the Wild
4310
4315
4316// 32096 - Thrallmar's Favor
4317// 32098 - Honor Hold's Favor
4343
4348
4349// 57350 - Illusionary Barrier
4369
4375
4376// 50493 - Listening to Music
4396
4397// 50492 - Listening to Music CHECK
4418
4419// 50499 - Listening to Music (Parent)
4439
4441{
4442 // 23074 Arcanite Dragonling
4443 new spell_item_trigger_spell("spell_item_arcanite_dragonling", SPELL_ARCANITE_DRAGONLING);
4444 // 23133 Gnomish Battle Chicken
4445 new spell_item_trigger_spell("spell_item_gnomish_battle_chicken", SPELL_BATTLE_CHICKEN);
4446 // 23076 Mechanical Dragonling
4447 new spell_item_trigger_spell("spell_item_mechanical_dragonling", SPELL_MECHANICAL_DRAGONLING);
4448 // 23075 Mithril Mechanical Dragonling
4449 new spell_item_trigger_spell("spell_item_mithril_mechanical_dragonling", SPELL_MITHRIL_MECHANICAL_DRAGONLING);
4450
4453 new spell_item_anger_capacitor<8>("spell_item_tiny_abomination_in_a_jar");
4454 new spell_item_anger_capacitor<7>("spell_item_tiny_abomination_in_a_jar_hero");
4468 new spell_item_defibrillate("spell_item_goblin_jumper_cables", 67, SPELL_GOBLIN_JUMPER_CABLES_FAIL);
4469 new spell_item_defibrillate("spell_item_goblin_jumper_cables_xl", 50, SPELL_GOBLIN_JUMPER_CABLES_XL_FAIL);
4470 new spell_item_defibrillate("spell_item_gnomish_army_knife", 33);
4521
4526
4548 new spell_item_sunwell_neck<SPELL_LIGHTS_WRATH, SPELL_ARCANE_BOLT>("spell_item_sunwell_exalted_caster_neck");
4549 new spell_item_sunwell_neck<SPELL_LIGHTS_STRENGTH, SPELL_ARCANE_STRIKE>("spell_item_sunwell_exalted_melee_neck");
4550 new spell_item_sunwell_neck<SPELL_LIGHTS_WARD, SPELL_ARCANE_INSIGHT>("spell_item_sunwell_exalted_tank_neck");
4551 new spell_item_sunwell_neck<SPELL_LIGHTS_SALVATION, SPELL_ARCANE_SURGE>("spell_item_sunwell_exalted_healer_neck");
4565
4566 new spell_item_zandalarian_charm("spell_item_unstable_power", SPELL_UNSTABLE_POWER_AURA_STACK);
4567 new spell_item_zandalarian_charm("spell_item_restless_strength", SPELL_RESTLESS_STRENGTH_AURA_STACK);
4568
4582}
#define M_PI
Definition Common.h:72
First const & RAND(First const &first, Second const &second, Rest const &... rest)
DBCStorage< FactionEntry > sFactionStore(FactionEntryfmt)
EmotesTextSoundEntry const * FindTextSoundEmoteFor(uint32 emote, uint32 race, uint32 gender)
DBCStorage< AreaTableEntry > sAreaTableStore(AreaTableEntryfmt)
uint8_t uint8
Definition Define.h:135
int32_t int32
Definition Define.h:129
uint64_t uint64
Definition Define.h:132
uint32_t uint32
Definition Define.h:133
LootStore LootTemplates_Skinning("skinning_loot_template", "creature skinning id", true)
#define INVALID_HEIGHT
Definition Map.h:241
@ TYPEID_UNIT
Definition ObjectGuid.h:38
@ TYPEID_CORPSE
Definition ObjectGuid.h:42
@ TYPEID_PLAYER
Definition ObjectGuid.h:39
#define sObjectMgr
Definition ObjectMgr.h:1721
@ QUEST_STATUS_INCOMPLETE
Definition QuestDef.h:107
float frand(float min, float max)
Definition Random.cpp:55
int32 irand(int32 min, int32 max)
Definition Random.cpp:35
uint32 urand(uint32 min, uint32 max)
Definition Random.cpp:42
bool roll_chance_i(int chance)
Definition Random.h:59
#define RegisterSpellScript(spell_script)
Definition ScriptMgr.h:1128
#define RegisterSpellScriptWithArgs(spell_script, script_name,...)
Definition ScriptMgr.h:1127
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
@ 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
@ TEXT_EMOTE_TRAIN
@ TEAM_ALLIANCE
@ OFF_ATTACK
@ CLASS_HUNTER
@ CLASS_DRUID
@ CLASS_SHAMAN
@ CLASS_PRIEST
@ CLASS_WARRIOR
@ CLASS_WARLOCK
@ CLASS_MAGE
@ CLASS_DEATH_KNIGHT
@ CLASS_PALADIN
@ CLASS_ROGUE
@ 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
#define EFFECT_ALL
@ STAT_SPIRIT
@ STAT_INTELLECT
@ STAT_AGILITY
@ STAT_STRENGTH
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
@ SKILL_ENGINEERING
uint32 GetExplicitDiscoverySpell(uint32 spellId, Player *player)
bool HasDiscoveredAllSpells(uint32 spellId, Player *player)
AuraEffectHandleModes
@ AURA_EFFECT_HANDLE_REAPPLY
@ AURA_EFFECT_HANDLE_REAL
@ SPELL_AURA_MOD_THREAT
@ SPELL_AURA_PROC_TRIGGER_SPELL
@ SPELL_AURA_MOD_RATING
@ SPELL_AURA_DUMMY
@ SPELL_AURA_MOD_STAT
@ SPELL_AURA_TRANSFORM
@ SPELL_AURA_SCHOOL_ABSORB
@ SPELL_AURA_PERIODIC_DUMMY
@ SPELL_AURA_PERIODIC_TRIGGER_SPELL
@ TRIGGERED_FULL_MASK
Will return SPELL_FAILED_DONT_REPORT in CheckCast functions.
@ SPELLVALUE_AURA_STACK
SpellGroup
Definition SpellMgr.h:293
@ SPELL_GROUP_NONE
Definition SpellMgr.h:294
@ SPELL_GROUP_ELIXIR_BATTLE
Definition SpellMgr.h:295
@ SPELL_GROUP_ELIXIR_GUARDIAN
Definition SpellMgr.h:296
#define sSpellMgr
Definition SpellMgr.h:738
@ PROC_FLAG_DONE_SPELL_RANGED_DMG_CLASS
Definition SpellMgr.h:127
@ PROC_FLAG_DONE_SPELL_MAGIC_DMG_CLASS_POS
Definition SpellMgr.h:136
@ PROC_FLAG_DONE_RANGED_AUTO_ATTACK
Definition SpellMgr.h:124
@ PROC_FLAG_DONE_SPELL_MAGIC_DMG_CLASS_NEG
Definition SpellMgr.h:139
#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 SpellCastFn(F)
#define SpellDestinationTargetSelectFn(F, I, N)
#define AuraEffectApplyFn(F, I, N, M)
#define AuraCheckProcFn(F)
#define AuraCheckAreaTargetFn(F)
#define AuraEffectRemoveFn(F, I, N, M)
T CalculatePct(T base, U pct)
Definition Util.h:71
GiftOfTheHarvester
SpellInfo const * GetSpellInfo() const
uint32 GetId() const
int32 GetAmount() const
void PreventDefaultAction()
int32 GetDuration() const
HookList< EffectApplyHandler > AfterEffectRemove
HookList< EffectPeriodicHandler > OnEffectPeriodic
WorldObject * GetOwner() const
HookList< EffectApplyHandler > AfterEffectApply
HookList< EffectCalcAmountHandler > DoEffectCalcAmount
Unit * GetCaster() const
SpellEffectInfo const & GetEffectInfo(SpellEffIndex effIndex) const
Aura * GetAura() const
HookList< CheckAreaTargetHandler > DoCheckAreaTarget
Unit * GetTarget() const
ObjectGuid GetCasterGUID() const
HookList< CheckProcHandler > DoCheckProc
HookList< EffectProcHandler > OnEffectProc
Unit * GetUnitOwner() const
HookList< AuraProcHandler > OnProc
uint8 GetStackAmount() const
HookList< EffectApplyHandler > OnEffectApply
uint32 GetId() const
uint8 GetStackAmount() const
Definition SpellAuras.h:164
virtual void Remove(AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)=0
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
CreatureTemplate const * GetCreatureTemplate() const
Definition Creature.h:186
uint32 GetDamage() const
Definition Unit.h:464
void AddEventAtOffset(BasicEvent *event, Milliseconds offset)
uint32 GetEffectiveHeal() const
Definition Unit.h:493
uint32 GetHeal() const
Definition Unit.h:492
Definition Item.h:62
bool IsDungeon() const
Definition Map.cpp:4236
static Creature * ToCreature(Object *o)
Definition Object.h:186
TypeID GetTypeId() const
Definition Object.h:93
uint32 GetEntry() const
Definition Object.h:81
static ObjectGuid GetGUID(Object const *o)
Definition Object.h:78
static Player * ToPlayer(Object *o)
Definition Object.h:180
PartyTimeEmoteEvent(Player *player)
bool Execute(uint64, uint32) override
void LearnSpell(uint32 spell_id, bool dependent, uint32 fromSkill=0)
Definition Player.cpp:3353
uint32 DoRandomRoll(uint32 minimum, uint32 maximum)
Definition Player.cpp:26479
TeamId GetTeamId() const
Definition Player.h:1833
Battleground * GetBattleground() const
Definition Player.cpp:23049
void AutoStoreLoot(uint8 bag, uint8 slot, uint32 loot_id, LootStore const &store, bool broadcast=false, bool createdByPlayer=false)
Definition Player.cpp:24529
QuestStatus GetQuestStatus(uint32 quest_id) const
Definition Player.cpp:15642
ReputationRank GetReputationRank(uint32 faction_id) const
Definition Player.cpp:6303
HealInfo * GetHealInfo() const
Definition Unit.h:520
Unit * GetActionTarget() const
Definition Unit.h:509
uint32 GetTypeMask() const
Definition Unit.h:511
SpellInfo const * GetSpellInfo() const
Definition Unit.cpp:268
Unit * GetActor()
Definition Unit.h:508
DamageInfo * GetDamageInfo() const
Definition Unit.h:519
int32 CalcValue(WorldObject const *caster=nullptr, int32 const *basePoints=nullptr) const
void ResetCooldown(uint32 spellId, bool update=false)
bool HasCooldown(SpellInfo const *spellInfo, uint32 itemId=0, bool ignoreCategoryCooldown=false) const
uint32 StackAmount
Definition SpellInfo.h:340
uint32 Id
Definition SpellInfo.h:289
SpellEffectInfo const & GetEffect(SpellEffIndex index) const
Definition SpellInfo.h:483
std::array< SpellEffectInfo, MAX_SPELL_EFFECTS > const & GetEffects() const
Definition SpellInfo.h:482
HookList< CastHandler > AfterCast
HookList< CheckCastHandler > OnCheckCast
Creature * GetHitCreature() const
Player * GetHitPlayer() const
Unit * GetCaster() const
HookList< DestinationTargetSelectHandler > OnDestinationTargetSelect
HookList< EffectHandler > OnEffectHit
void PreventHitDefaultEffect(SpellEffIndex effIndex)
int64 GetUnitTargetCountForEffect(SpellEffIndex effect) const
Unit * GetHitUnit() const
HookList< EffectHandler > OnEffectHitTarget
Item * GetCastItem() const
void SetCustomCastResultMessage(SpellCustomErrors result)
int32 GetHitHeal() const
HookList< EffectHandler > OnEffectLaunch
void SetHitHeal(int32 heal)
SpellInfo const * GetSpellInfo() const
void FinishCast(SpellCastResult result, uint32 *param1=nullptr, uint32 *param2=nullptr)
HookList< ObjectAreaTargetSelectHandler > OnObjectAreaTargetSelect
Definition Unit.h:769
Aura * GetAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
Definition Unit.cpp:4439
uint8 GetClass() const
Definition Unit.h:895
std::multimap< uint32, AuraApplication * > AuraApplicationMap
Definition Unit.h:780
Powers GetPowerType() const
Definition Unit.h:931
AuraEffect * GetAuraEffect(uint32 spellId, uint8 effIndex, ObjectGuid casterGUID=ObjectGuid::Empty) const
Definition Unit.cpp:4359
bool IsAlive() const
Definition Unit.h:1234
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
Definition Unit.cpp:4535
Gender GetGender() const
Definition Unit.h:898
virtual Gender GetNativeGender() const
Definition Unit.h:900
bool IsSummon() const
Definition Unit.h:882
virtual void TextEmote(std::string_view text, WorldObject const *target=nullptr, bool isBossEmote=false)
Definition Unit.cpp:13844
void RemoveAuraFromStack(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:3800
bool isMoving() const
Definition Unit.h:1759
virtual void SetDisplayId(uint32 modelId)
Definition Unit.cpp:10407
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint8 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:3784
bool IsCritter() const
Definition Unit.h:1117
void HandleEmoteCommand(Emote emoteId)
Definition Unit.cpp:1568
void SetFacingTo(float ori, bool force=true, uint32 movementId=EVENT_FACE)
Definition Unit.cpp:13250
uint32 CountPctFromMaxHealth(int32 pct) const
Definition Unit.h:922
float GetStat(Stats stat) const
Definition Unit.h:903
SpellHistory * GetSpellHistory()
Definition Unit.h:1484
AuraApplicationMap & GetAppliedAuras()
Definition Unit.h:1338
void GetAllMinionsByEntry(std::list< Creature * > &Minions, uint32 entry)
Definition Unit.cpp:6062
ObjectGuid GetTarget() const
Definition Unit.h:1797
uint8 GetLevel() const
Definition Unit.h:889
bool IsInCombat() const
Definition Unit.h:1144
Map * GetMap() const
Definition Object.h:449
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
Definition Object.cpp:2832
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition Object.cpp:2099
EventProcessor m_Events
Definition Object.h:591
void PlayDirectSound(uint32 soundId, Player *target=nullptr)
Definition Object.cpp:3433
uint32 GetAreaId() const
Definition Object.h:374
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
uint32 m_scriptSpellId
PrepareAuraScript(spell_item_aegis_of_preservation)
bool Validate(SpellInfo const *) override
void HandleProc(AuraEffect const *aurEff, ProcEventInfo &)
bool Validate(SpellInfo const *) override
PrepareAuraScript(spell_item_alchemists_stone)
void HandleProc(AuraEffect const *aurEff, ProcEventInfo &eventInfo)
void HandleProc(AuraEffect const *aurEff, ProcEventInfo &eventInfo)
PrepareAuraScript(spell_item_anger_capacitor_AuraScript)
void OnRemove(AuraEffect const *, AuraEffectHandleModes)
spell_item_anger_capacitor(char const *ScriptName)
AuraScript * GetAuraScript() const override
void Register() override
PrepareAuraScript(spell_item_arcane_shroud)
void CalculateAmount(AuraEffect const *, int32 &amount, bool &)
PrepareSpellScript(spell_item_ashbringer)
void Register() override
bool Load() override
void OnDummyEffect(SpellEffIndex effIndex)
void HandleProc(AuraEffect const *aurEff, ProcEventInfo &eventInfo)
PrepareAuraScript(spell_item_aura_of_madness)
bool Validate(SpellInfo const *) override
bool CheckProc(ProcEventInfo &eventInfo)
bool Validate(SpellInfo const *) override
PrepareAuraScript(spell_item_blessing_of_ancient_kings)
void HandleProc(AuraEffect const *aurEff, ProcEventInfo &eventInfo)
PrepareSpellScript(spell_item_book_of_glyph_mastery)
PrepareSpellScript(spell_item_brittle_armor)
void Register() override
void HandleScript(SpellEffIndex)
bool Validate(SpellInfo const *) override
void HandleProc(AuraEffect const *aurEff, ProcEventInfo &eventInfo)
PrepareAuraScript(spell_item_charm_witch_doctor)
PrepareSpellScript(spell_item_chicken_cover)
void HandleDummy(SpellEffIndex)
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
PrepareSpellScript(spell_item_complete_raptor_capture)
PrepareSpellScript(spell_item_crazy_alchemists_potion)
PrepareAuraScript(spell_item_crystal_spire_of_karabor)
bool CheckProc(ProcEventInfo &eventInfo)
bool Validate(SpellInfo const *) override
PrepareAuraScript(spell_item_darkmoon_card_greatness)
void HandleProc(AuraEffect const *aurEff, ProcEventInfo &eventInfo)
PrepareAuraScript(spell_item_darkmoon_card_illusion)
bool Validate(SpellInfo const *) override
void AfterRemove(AuraEffect const *, AuraEffectHandleModes)
PrepareSpellScript(spell_item_deadly_precision_dummy)
bool Validate(SpellInfo const *) override
void HandleStackDrop(AuraEffect const *, ProcEventInfo &)
PrepareAuraScript(spell_item_deadly_precision)
PrepareAuraScript(spell_item_death_choice)
void Register() override
void HandleProc(AuraEffect const *aurEff, ProcEventInfo &eventInfo)
bool Validate(SpellInfo const *) override
void HandleProc(AuraEffect const *aurEff, ProcEventInfo &eventInfo)
AuraScript * GetAuraScript() const override
spell_item_deathbringers_will(char const *ScriptName)
bool Validate(SpellInfo const *) override
PrepareSpellScript(spell_item_decahedral_dwarven_dice)
spell_item_defibrillate_SpellScript(uint8 chance, uint32 failSpell)
PrepareSpellScript(spell_item_defibrillate_SpellScript)
SpellScript * GetSpellScript() const override
spell_item_defibrillate(char const *name, uint8 chance, uint32 failSpell=0)
void Register() override
PrepareAuraScript(spell_item_dementia)
bool Validate(SpellInfo const *) override
void HandlePeriodicDummy(AuraEffect const *aurEff)
bool Validate(SpellInfo const *) override
PrepareSpellScript(spell_item_demon_broiled_surprise)
bool Validate(SpellInfo const *) override
PrepareAuraScript(spell_item_desperate_defense)
void HandleProc(AuraEffect const *aurEff, ProcEventInfo &)
void HandleDummy(SpellEffIndex)
bool Validate(SpellInfo const *) override
PrepareSpellScript(spell_item_deviate_fish)
void Register() override
bool Validate(SpellInfo const *) override
PrepareSpellScript(spell_item_dimensional_ripper_area52)
bool Validate(SpellInfo const *) override
PrepareSpellScript(spell_item_dimensional_ripper_everlook)
void Register() override
PrepareAuraScript(spell_item_dire_brew)
void AfterApply(AuraEffect const *, AuraEffectHandleModes)
void HandleProc(AuraEffect const *aurEff, ProcEventInfo &eventInfo)
PrepareAuraScript(spell_item_discerning_eye_beast_dummy)
bool Validate(SpellInfo const *) override
PrepareSpellScript(spell_item_disco_ball_listening_to_music_check)
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
PrepareSpellScript(spell_item_disco_ball_listening_to_music_parent)
bool Validate(SpellInfo const *) override
PrepareAuraScript(spell_item_disco_ball_listening_to_music_periodic)
PrepareSpellScript(spell_item_drums_of_forgotten_kings)
bool Validate(SpellInfo const *) override
void HandleScript(SpellEffIndex)
PrepareSpellScript(spell_item_drums_of_the_wild)
bool Validate(SpellInfo const *) override
PrepareSpellScript(spell_item_echoes_of_light)
void FilterTargets(std::list< WorldObject * > &targets)
void Register() override
PrepareSpellScript(spell_item_eggnog)
bool Validate(SpellInfo const *) override
void HandleScript(SpellEffIndex)
void Register() override
PrepareAuraScript(spell_item_extract_gas)
void PeriodicTick(AuraEffect const *)
PrepareAuraScript(spell_item_fate_rune_of_unsurpassed_vigor)
bool Validate(SpellInfo const *) override
void HandleProc(AuraEffect const *, ProcEventInfo &)
void HandleScript(SpellEffIndex)
PrepareSpellScript(spell_item_feast)
spell_item_feast(uint32 text)
void Register() override
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
PrepareSpellScript(spell_item_flask_of_the_north)
void HandleDummy(SpellEffIndex)
PrepareAuraScript(spell_item_frozen_shadoweave)
void HandleProc(AuraEffect const *aurEff, ProcEventInfo &eventInfo)
bool Validate(SpellInfo const *) override
PrepareSpellScript(spell_item_gift_of_the_harvester)
void HandleDummy(SpellEffIndex)
bool Validate(SpellInfo const *) override
PrepareSpellScript(spell_item_gnomish_death_ray)
PrepareSpellScript(spell_item_goblin_bomb_dispenser)
bool Validate(SpellInfo const *) override
void HandleDummy(SpellEffIndex)
PrepareSpellScript(spell_item_goblin_weather_machine)
PrepareSpellScript(spell_item_greatmothers_soulcatcher)
bool Validate(SpellInfo const *) override
PrepareAuraScript(spell_item_harm_prevention_belt)
void HandleProc(ProcEventInfo &)
void HandleProc(AuraEffect const *aurEff, ProcEventInfo &eventInfo)
PrepareAuraScript(spell_item_healing_touch_refund)
bool Validate(SpellInfo const *) override
void HandleProc(AuraEffect const *aurEff, ProcEventInfo &eventInfo)
PrepareAuraScript(spell_item_heartpierce_AuraScript)
AuraScript * GetAuraScript() const override
spell_item_heartpierce(char const *ScriptName)
void HandleDummy(SpellEffIndex)
PrepareSpellScript(spell_item_hourglass_sand)
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
PrepareSpellScript(spell_item_impale_leviroth)
void HandleDummy(SpellEffIndex)
void HandleDummy(SpellEffIndex)
bool Validate(SpellInfo const *) override
PrepareSpellScript(spell_item_lifegiving_gem)
PrepareSpellScript(spell_item_mad_alchemists_potion)
bool Validate(SpellInfo const *) override
void Register() override
PrepareSpellScript(spell_item_make_a_wish)
void HandleDummy(SpellEffIndex)
bool Validate(SpellInfo const *) override
void HandleProc(AuraEffect const *aurEff, ProcEventInfo &eventInfo)
void Register() override
PrepareAuraScript(spell_item_mana_drain)
PrepareSpellScript(spell_item_map_of_the_geyser_fields)
PrepareAuraScript(spell_item_mark_of_conquest)
bool Validate(SpellInfo const *) override
void HandleProc(AuraEffect const *aurEff, ProcEventInfo &eventInfo)
PrepareSpellScript(spell_item_mercurial_shield)
void HandleScript(SpellEffIndex)
void HandleDummy(SpellEffIndex)
PrepareSpellScript(spell_item_mind_control_cap)
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
PrepareSpellScript(spell_item_mingos_fortune_generator)
void HandleScriptEffect(SpellEffIndex)
PrepareSpellScript(spell_item_mirrens_drinking_hat)
PrepareSpellScript(spell_item_muisek_vessel)
void HandleDummy(SpellEffIndex)
void HandleProc(AuraEffect const *aurEff, ProcEventInfo &eventInfo)
bool CheckProc(ProcEventInfo &eventInfo)
bool Validate(SpellInfo const *) override
PrepareAuraScript(spell_item_necrotic_touch)
void Register() override
PrepareSpellScript(spell_item_net_o_matic)
void HandleDummy(SpellEffIndex)
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
PrepareSpellScript(spell_item_nigh_invulnerability)
void HandleDummy(SpellEffIndex)
bool Validate(SpellInfo const *) override
void HandleApply(AuraEffect const *, AuraEffectHandleModes)
void HandlePeriodicDummy(AuraEffect const *effect)
PrepareAuraScript(spell_item_nitro_boosts_backfire)
void HandleDummy(SpellEffIndex)
void Register() override
bool Validate(SpellInfo const *) override
PrepareSpellScript(spell_item_nitro_boosts)
PrepareSpellScript(spell_item_noggenfogger_elixir)
bool Validate(SpellInfo const *) override
void HandleDummy(SpellEffIndex)
void Register() override
PrepareAuraScript(spell_item_party_time)
void HandleEffectApply(AuraEffect const *, AuraEffectHandleModes)
PrepareAuraScript(spell_item_pendant_of_the_violet_eye)
bool CheckProc(ProcEventInfo &eventInfo)
bool Validate(SpellInfo const *) override
void HandleProc(AuraEffect const *aurEff, ProcEventInfo &eventInfo)
PrepareAuraScript(spell_item_persistent_shield)
bool CheckProc(ProcEventInfo &eventInfo)
void Register() override
PrepareAuraScript(spell_item_pet_healing)
bool Validate(SpellInfo const *) override
void HandleProc(AuraEffect const *aurEff, ProcEventInfo &eventInfo)
void HandleScript(SpellEffIndex effIndex)
PrepareSpellScript(spell_item_piccolo_of_the_flaming_fire)
void HandleDummy(SpellEffIndex)
PrepareSpellScript(spell_item_poultryizer)
bool Validate(SpellInfo const *) override
void Register() override
bool Validate(SpellInfo const *) override
void OnApply(AuraEffect const *, AuraEffectHandleModes)
void OnRemove(AuraEffect const *, AuraEffectHandleModes)
PrepareAuraScript(spell_item_power_circle)
void Register() override
bool CheckCaster(Unit *target)
PrepareSpellScript(spell_item_pygmy_oil)
bool Validate(SpellInfo const *) override
void Register() override
void HandleDummy(SpellEffIndex)
PrepareSpellScript(spell_item_red_rider_air_rifle)
void HandleScript(SpellEffIndex effIndex)
bool Validate(SpellInfo const *) override
PrepareSpellScript(spell_item_refocus)
void Register() override
void HandleDummy(SpellEffIndex)
void Register() override
PrepareSpellScript(spell_item_rocket_boots)
void HandleDummy(SpellEffIndex)
bool Validate(SpellInfo const *) override
SpellCastResult CheckCast()
bool Validate(SpellInfo const *) override
PrepareSpellScript(spell_item_runescroll_of_fortitude)
PrepareSpellScript(spell_item_runic_healing_injector)
bool Validate(SpellInfo const *) override
PrepareSpellScript(spell_item_savory_deviate_delight)
void HandleScript(SpellEffIndex effIndex)
PrepareSpellScript(spell_item_scroll_of_recall)
PrepareAuraScript(spell_item_shadowmourne_soul_fragment)
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 OnRemove(AuraEffect const *, AuraEffectHandleModes)
PrepareAuraScript(spell_item_shadowmourne)
void HandleProc(AuraEffect const *aurEff, ProcEventInfo &eventInfo)
void Register() override
void HandleProc(ProcEventInfo &procInfo)
PrepareAuraScript(spell_item_shadows_fate)
void Register() override
void HandleProc(AuraEffect const *aurEff, ProcEventInfo &eventInfo)
AuraScript * GetAuraScript() const override
spell_item_shard_of_the_scale(char const *ScriptName)
void HandleDummy(SpellEffIndex)
bool Validate(SpellInfo const *) override
PrepareSpellScript(spell_item_six_demon_bag)
void HandleProc(AuraEffect const *aurEff, ProcEventInfo &eventInfo)
bool Validate(SpellInfo const *) override
PrepareAuraScript(spell_item_soul_preserver)
void HandleProc(AuraEffect const *aurEff, ProcEventInfo &eventInfo)
PrepareAuraScript(spell_item_sunwell_neck_AuraScript)
spell_item_sunwell_neck(char const *ScriptName)
AuraScript * GetAuraScript() const override
bool Validate(SpellInfo const *) override
void HandleProc(AuraEffect const *aurEff, ProcEventInfo &eventInfo)
PrepareAuraScript(spell_item_swift_hand_justice_dummy)
bool Validate(SpellInfo const *) override
PrepareSpellScript(spell_item_taunt_flag_targeting)
void HandleDummy(SpellEffIndex)
void FilterTargets(std::list< WorldObject * > &targets)
PrepareAuraScript(spell_item_the_eye_of_diminution)
void CalculateAmount(AuraEffect const *, int32 &amount, bool &)
PrepareAuraScript(spell_item_thrallmar_and_honor_hold_favor)
void AfterRemove(AuraEffect const *, AuraEffectHandleModes)
void AfterApply(AuraEffect const *, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
PrepareSpellScript(spell_item_titanium_seal_of_dalaran_catch)
void RelocateHeight(SpellDestination &dest)
PrepareSpellScript(spell_item_titanium_seal_of_dalaran_toss)
bool Validate(SpellInfo const *) override
void HandleProc(AuraEffect const *aurEff, ProcEventInfo &eventInfo)
bool Validate(SpellInfo const *) override
PrepareAuraScript(spell_item_totem_of_flowing_water)
void HandleTargets(std::list< WorldObject * > &targetList)
PrepareSpellScript(spell_item_toy_train_set_pulse)
void HandleDummy(SpellEffIndex)
PrepareSpellScript(spell_item_trigger_spell_SpellScript)
SpellScript * GetSpellScript() const override
spell_item_trigger_spell(char const *name, uint32 triggeredSpellId)
PrepareAuraScript(spell_item_trinket_stack_AuraScript)
void OnRemove(AuraEffect const *, AuraEffectHandleModes)
void HandleProc(AuraEffect const *aurEff, ProcEventInfo &eventInfo)
spell_item_trinket_stack_AuraScript(uint32 stackSpell, uint32 triggerSpell)
spell_item_trinket_stack(char const *scriptName, uint32 stackSpell, uint32 triggerSpell)
AuraScript * GetAuraScript() const override
PrepareSpellScript(spell_item_ultrasafe_transporter)
bool Validate(SpellInfo const *) override
void HandleDummy(SpellEffIndex)
bool Validate(SpellInfo const *) override
PrepareSpellScript(spell_item_underbelly_elixir)
bool Validate(SpellInfo const *) override
PrepareSpellScript(spell_item_universal_remote)
void HandleDummy(SpellEffIndex)
PrepareAuraScript(spell_item_unsated_craving)
bool CheckProc(ProcEventInfo &procInfo)
void HandleDummy(SpellEffIndex)
PrepareSpellScript(spell_item_unusual_compass)
bool CheckProc(ProcEventInfo &eventInfo)
PrepareAuraScript(spell_item_valanyr_hammer_of_ancient_kings)
PrepareSpellScript(spell_item_vanquished_clutches)
void HandleDummy(SpellEffIndex)
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
PrepareSpellScript(spell_item_worn_troll_dice)
void HandleScript(SpellEffIndex)
AuraScript * GetAuraScript() const override
spell_item_zandalarian_charm(char const *ScriptName, uint32 SpellId)
void HandleTriggerSpell(AuraEffect const *)
PrepareAuraScript(spell_magic_eater_food)
void Register() override
auto SelectRandomContainerElement(C const &container) -> typename std::add_const< decltype(*std::begin(container))>::type &
Definition Containers.h:108
void RandomResize(C &container, std::size_t requestedSize)
Definition Containers.h:66
DarkmoonCardSpells
@ SPELL_DARKMOON_CARD_STRENGTH
@ SPELL_DARKMOON_CARD_SPIRIT
@ SPELL_DARKMOON_CARD_AGILITY
@ 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
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
ThrallmarAndHonorHoldFavor
@ SPELL_BUFFBOT_BUFF_EFFECT
FlaskOfTheNorthSpells
@ SPELL_FLASK_OF_THE_NORTH_SP
@ SPELL_FLASK_OF_THE_NORTH_STR
@ SPELL_FLASK_OF_THE_NORTH_AP
DrumsOfTheWild
@ SPELL_GIFT_OF_THE_WILD
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
IdolOfLongevity
@ SPELL_HEALING_TOUCH_MANA
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
TotemOfFlowingWater
@ SPELL_LESSER_HEALING_WAVE_MANA
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
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
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_ALCHEMISTS_STONE_EXTRA_MANA
@ SPELL_ALCHEMISTS_STONE_EXTRA_HEAL
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
CharmWitchDoctor
@ SPELL_CHARM_WITCH_DOCTOR_PROC
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
Refocus
@ SPELL_MULTISHOT
@ SPELL_AIMED_SHOT
@ SPELL_VOLLEY
PygmyOil
@ SPELL_PYGMY_OIL_SMALLER_AURA
@ SPELL_PYGMY_OIL_PYGMY_AURA
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
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
bool IsFlyable() const
CastSpellExtraArgs & AddSpellBP0(int32 val)
CastSpellExtraArgs & AddSpellMod(SpellValueMod mod, int32 val)
float GetPositionZ() const
Definition Position.h:81
void RelocateOffset(Position const &offset)
Definition Spell.cpp:110