TrinityCore
Loading...
Searching...
No Matches
spell_quest.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 for quests.
20 * Ordered alphabetically using questId and scriptname.
21 * Scriptnames of files in this file should be prefixed with "spell_q#questID_".
22 */
23
24#include "ScriptMgr.h"
25#include "CreatureAIImpl.h"
26#include "ObjectMgr.h"
27#include "Player.h"
28#include "ScriptedCreature.h"
29#include "SpellAuraEffects.h"
30#include "SpellScript.h"
31#include "Vehicle.h"
32
34{
35 private:
42
43 public:
44 spell_generic_quest_update_entry_SpellScript(uint16 spellEffect, uint8 effIndex, uint32 originalEntry, uint32 newEntry, bool shouldAttack, Milliseconds despawnTime = 0s) :
45 SpellScript(), _spellEffect(spellEffect), _effIndex(effIndex), _originalEntry(originalEntry),
46 _newEntry(newEntry), _shouldAttack(shouldAttack), _despawnTime(despawnTime) { }
47
48 void HandleDummy(SpellEffIndex /*effIndex*/)
49 {
50 if (Creature* creatureTarget = GetHitCreature())
51 if (!creatureTarget->IsPet() && creatureTarget->GetEntry() == _originalEntry)
52 {
53 creatureTarget->UpdateEntry(_newEntry);
54 if (_shouldAttack)
55 creatureTarget->EngageWithTarget(GetCaster());
56
57 if (_despawnTime != 0s)
58 creatureTarget->DespawnOrUnsummon(_despawnTime);
59 }
60 }
61
66};
67
68// http://www.wowhead.com/quest=55 Morbent Fel
70{
73};
74
75// 8913 - Sacred Cleansing
86
91
92// 9712 - Thaumaturgy Channel
94{
95 bool Validate(SpellInfo const* /*spellInfo*/) override
96 {
98 }
99
100 void HandleEffectPeriodic(AuraEffect const* /*aurEff*/)
101 {
103 if (Unit* caster = GetCaster())
104 caster->CastSpell(caster, SPELL_THAUMATURGY_CHANNEL, false);
105 }
106
111};
112
113// http://www.wowhead.com/quest=6124 Curing the Sick (A)
114// http://www.wowhead.com/quest=6129 Curing the Sick (H)
122
124
125// 19512 - Apply Salve
127{
128 bool Load() override
129 {
130 return GetCaster()->GetTypeId() == TYPEID_PLAYER;
131 }
132
133 void HandleDummy(SpellEffIndex /*effIndex*/)
134 {
135 Player* caster = GetCaster()->ToPlayer();
136 if (GetCastItem())
137 if (Creature* creatureTarget = GetHitCreature())
138 {
139 uint32 newEntry = 0;
140 switch (caster->GetTeam())
141 {
142 case HORDE:
143 if (creatureTarget->GetEntry() == NPC_SICKLY_GAZELLE)
144 newEntry = NPC_CURED_GAZELLE;
145 break;
146 case ALLIANCE:
147 if (creatureTarget->GetEntry() == NPC_SICKLY_DEER)
148 newEntry = NPC_CURED_DEER;
149 break;
150 default:
151 break;
152 }
153 if (newEntry)
154 {
155 creatureTarget->UpdateEntry(newEntry);
156 creatureTarget->DespawnOrUnsummon(Quest6124_6129_DESPAWN_TIME);
157 caster->KilledMonsterCredit(newEntry);
158 }
159 }
160 }
161
166};
167
168// http://www.wowhead.com/quest=10255 Testing the Antidote
170{
171 NPC_HELBOAR = 16880,
173};
174
175// 34665 - Administer Antidote
177{
178 public:
179 spell_q10255_administer_antidote() : SpellScriptLoader("spell_q10255_administer_antidote") { }
180
185};
186
187// http://www.wowhead.com/quest=11396 Bring Down Those Shields (A)
188// http://www.wowhead.com/quest=11399 Bring Down Those Shields (H)
194
195// 43874 - Scourge Mur'gul Camp: Force Shield Arcane Purple x3
216
217// 50133 - Scourging Crystal Controller
219{
220 bool Validate(SpellInfo const* /*spellEntry*/) override
221 {
223 }
224
225 void HandleDummy(SpellEffIndex /*effIndex*/)
226 {
227 if (Unit* target = GetHitUnit())
228 if (target->GetTypeId() == TYPEID_UNIT && target->HasAura(SPELL_FORCE_SHIELD_ARCANE_PURPLE_X3))
229 // Make sure nobody else is channeling the same target
230 if (!target->HasAura(SPELL_SCOURGING_CRYSTAL_CONTROLLER))
232 }
233
238};
239
240// 43882 - Scourging Crystal Controller Dummy
242{
243 bool Validate(SpellInfo const* /*spellEntry*/) override
244 {
246 }
247
248 void HandleDummy(SpellEffIndex /*effIndex*/)
249 {
250 if (Unit* target = GetHitUnit())
251 if (target->GetTypeId() == TYPEID_UNIT)
252 target->RemoveAurasDueToSpell(SPELL_FORCE_SHIELD_ARCANE_PURPLE_X3);
253 }
254
259};
260
261// http://www.wowhead.com/quest=11515 Blood for Blood
267
268// 44936 - Quest - Fel Siphon Dummy
279
280// http://www.wowhead.com/quest=11730 Master and Servant
295
296// 46023 - The Ultrasonic Screwdriver
298{
299 bool Load() override
300 {
301 return GetCaster()->GetTypeId() == TYPEID_PLAYER && GetCastItem();
302 }
303
316
317 void HandleDummy(SpellEffIndex /*effIndex*/)
318 {
319 Item* castItem = GetCastItem();
320 Unit* caster = GetCaster();
321 if (Creature* target = GetHitCreature())
322 {
323 uint32 spellId = 0;
324 switch (target->GetEntry())
325 {
327 case NPC_SENTRYBOT_57K: spellId = SPELL_SUMMON_SENTRYBOT_57K; break;
331 default:
332 return;
333 }
334 caster->CastSpell(caster, spellId, castItem);
335 caster->CastSpell(caster, SPELL_ROBOT_KILL_CREDIT, true);
336 target->DespawnOrUnsummon();
337 }
338 }
339
344};
345
346// http://www.wowhead.com/quest=12459 That Which Creates Can Also Destroy
358
359// 49587 - Seeds of Nature's Wrath
361{
362 void HandleDummy(SpellEffIndex /*effIndex*/)
363 {
364 if (Creature* creatureTarget = GetHitCreature())
365 {
366 uint32 uiNewEntry = 0;
367 switch (creatureTarget->GetEntry())
368 {
370 case NPC_TURGID: uiNewEntry = NPC_WEAK_TURGID; break;
371 case NPC_DEATHGAZE: uiNewEntry = NPC_WEAK_DEATHGAZE; break;
372 }
373 if (uiNewEntry)
374 creatureTarget->UpdateEntry(uiNewEntry);
375 }
376 }
377
382};
383
384// http://www.wowhead.com/quest=12634 Some Make Lemonade, Some Make Liquor
392
393// 51840 - Despawn Fruit Tosser
395{
396 bool Validate(SpellInfo const* /*spellEntry*/) override
397 {
398 return ValidateSpellInfo(
399 {
404 });
405 }
406
407 void HandleDummy(SpellEffIndex /*effIndex*/)
408 {
410 switch (urand(0, 3))
411 {
412 case 1: spellId = SPELL_ORANGE_FALLS_TO_GROUND; break;
413 case 2: spellId = SPELL_PAPAYA_FALLS_TO_GROUND; break;
414 }
415 // sometimes, if you're lucky, you get a dwarf
416 if (roll_chance(5))
418 GetCaster()->CastSpell(GetCaster(), spellId, true);
419 }
420
425};
426
427// http://www.wowhead.com/quest=12851 Going Bearback
437
438// 54798 - FLAMING Arrow Triggered Effect
440{
441 void HandleEffectApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
442 {
443 if (Unit* caster = GetCaster())
444 {
445 Unit* target = GetTarget();
446 // Already in fire
447 if (target->HasAura(SPELL_ABLAZE))
448 return;
449
450 if (Player* player = caster->GetCharmerOrOwnerPlayerOrPlayerItself())
451 {
452 switch (target->GetEntry())
453 {
454 case NPC_FROSTWORG:
455 target->CastSpell(player, SPELL_FROSTWORG_CREDIT, true);
456 target->CastSpell(target, SPELL_IMMOLATION, true);
457 target->CastSpell(target, SPELL_ABLAZE, true);
458 break;
459 case NPC_FROSTGIANT:
460 target->CastSpell(player, SPELL_FROSTGIANT_CREDIT, true);
461 target->CastSpell(target, SPELL_IMMOLATION, true);
462 target->CastSpell(target, SPELL_ABLAZE, true);
463 break;
464 }
465 }
466 }
467 }
468
473};
474
475// http://www.wowhead.com/quest=12659 Scalps!
480
481// 52090 - Ahunae's Knife
483{
484 bool Load() override
485 {
486 return GetCaster()->GetTypeId() == TYPEID_PLAYER;
487 }
488
489 void HandleDummy(SpellEffIndex /*effIndex*/)
490 {
491 Player* caster = GetCaster()->ToPlayer();
492 if (Creature* target = GetHitCreature())
493 {
494 target->DespawnOrUnsummon();
496 }
497 }
498
503};
504
509
510// 54190 - Lifeblood Dummy
512{
513 bool Load() override
514 {
515 return GetCaster()->GetTypeId() == TYPEID_PLAYER;
516 }
517
518 void HandleScript(SpellEffIndex /*effIndex*/)
519 {
520 Player* caster = GetCaster()->ToPlayer();
521 if (Creature* target = GetHitCreature())
522 {
524 target->CastSpell(target, uint32(GetEffectValueAsInt()), true);
525 target->DespawnOrUnsummon(2s);
526 }
527 }
528
533};
534
535/*
536 http://www.wowhead.com/quest=13283 King of the Mountain
537 http://www.wowhead.com/quest=13280 King of the Mountain
538 */
547
548// 4338 - Plant Alliance Battle Standard
549// 59643 - Plant Horde Battle Standard
551{
552 void HandleDummy(SpellEffIndex /*effIndex*/)
553 {
554 Unit* caster = GetCaster();
555 Unit* target = GetHitUnit();
557
559 if (caster->IsVehicle())
560 if (Unit* player = caster->GetVehicleKit()->GetPassenger(0))
561 player->ToPlayer()->KilledMonsterCredit(NPC_KING_OF_THE_MOUNTAINT_KC);
562
564 triggeredSpellID = SPELL_HORDE_BATTLE_STANDARD_STATE;
565
566 target->RemoveAllAuras();
567 target->CastSpell(target, triggeredSpellID, true);
568 }
569
574};
575
576// 4336 - Jump Jets
578{
580 {
581 Unit* caster = GetCaster();
582 if (caster->IsVehicle())
583 if (Unit* rocketBunny = caster->GetVehicleKit()->GetPassenger(1))
584 rocketBunny->CastSpell(rocketBunny, SPELL_JUMP_ROCKET_BLAST, true);
585 }
586
591};
592
597
598// 50546 - The Focus on the Beach: Ley Line Focus Control Ring Effect
600{
601 void HandleDummy(SpellEffIndex /*effIndex*/)
602 {
603 if (Creature* target = GetHitCreature())
604 target->CastSpell(GetCaster(), SPELL_BUNNY_CREDIT_BEAM, false);
605 }
606
611};
612
617
618// 49213 - Defending Wyrmrest Temple: Character Script Cast From Gossip
631
632// http://www.wowhead.com/quest=12372 Defending Wyrmrest Temple
634{
635 // NPCs
638
639// 49370 - Wyrmrest Defender: Destabilize Azure Dragonshrine Effect
641{
642 void HandleDummy(SpellEffIndex /*effIndex*/)
643 {
644 if (GetHitCreature())
645 if (Unit* caster = GetOriginalCaster())
646 if (Vehicle* vehicle = caster->GetVehicleKit())
647 if (Unit* passenger = vehicle->GetPassenger(0))
648 if (Player* player = passenger->ToPlayer())
649 player->KilledMonsterCredit(NPC_WYRMREST_TEMPLE_CREDIT);
650 }
651
656};
657
658// "Bombing Run" and "Bomb Them Again!"
660{
661 // Spell
665 // NPCs
666 NPC_FEL_CANNON2 = 23082
668
669// 40113 - Knockdown Fel Cannon: The Aggro Check Aura
671{
672 void HandleTriggerSpell(AuraEffect const* /*aurEff*/)
673 {
674 if (Unit* target = GetTarget())
675 // On trigger proccing
676 target->CastSpell(target, SPELL_AGGRO_CHECK);
677 }
678
683};
684
685// 40112 - Knockdown Fel Cannon: The Aggro Check
687{
688 void HandleDummy(SpellEffIndex /*effIndex*/)
689 {
690 if (Player* playerTarget = GetHitPlayer())
691 // Check if found player target is on fly mount or using flying form
692 if (playerTarget->HasAuraType(SPELL_AURA_FLY) || playerTarget->HasAuraType(SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED))
693 playerTarget->CastSpell(playerTarget, SPELL_FLAK_CANNON_TRIGGER, TRIGGERED_IGNORE_CASTER_MOUNTED_OR_ON_VEHICLE);
694 }
695
700};
701
702// 40119 - Knockdown Fel Cannon: The Aggro Burst
704{
705 void HandleEffectPeriodic(AuraEffect const* /*aurEff*/)
706 {
707 if (Unit* target = GetTarget())
708 // On each tick cast Choose Loc to trigger summon
709 target->CastSpell(target, SPELL_CHOOSE_LOC);
710 }
711
716};
717
718// 40056 - Knockdown Fel Cannon: Choose Loc
720{
721 void HandleDummy(SpellEffIndex /*effIndex*/)
722 {
723 Unit* caster = GetCaster();
724 // Check for player that is in 65 y range
725 std::vector<Player*> playerList;
726 caster->GetPlayerListInGrid(playerList, 65.0f);
727 for (Player* player : playerList)
728 // Check if found player target is on fly mount or using flying form
729 if (player->HasAuraType(SPELL_AURA_FLY) || player->HasAuraType(SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED))
730 // Summom Fel Cannon (bunny version) at found player
731 caster->SummonCreature(NPC_FEL_CANNON2, player->GetPositionX(), player->GetPositionY(), player->GetPositionZ());
732 }
733
738};
739
740// 39844 - Skyguard Blasting Charge
741// 40160 - Throw Bomb
743{
745 {
746 Unit* caster = GetCaster();
747 // This spell will be cast only if caster has one of these auras
750 return SPELL_CAST_OK;
751 }
752
757};
758
763
764// 50894 - Zul'Drak Rat
766{
767 bool Validate(SpellInfo const* /*spell*/) override
768 {
770 }
771
773 {
774 if (GetHitAura() && GetHitAura()->GetStackAmount() >= GetSpellInfo()->StackAmount)
775 {
777 if (Creature* basilisk = GetHitUnit()->ToCreature())
778 basilisk->DespawnOrUnsummon();
779 }
780 }
781
786};
787
788// 55368 - Summon Stefan
790{
792 {
793 // Adjust effect summon position
794 Position const offset = { 0.0f, 0.0f, 20.0f, 0.0f };
795 dest.RelocateOffset(offset);
796 }
797
802};
803
808
809// 53350 - Quenching Mist
827
828// 13291 - Borrowed Technology/13292 - The Solution Solution /Daily//13239 - Volatility/13261 - Volatiliy /Daily//
830{
831 // NPCs
833 NPC_DECOY = 31578,
834 // Spells
835 SPELL_RIDE = 59319
837
838// 59318 - Grab Fake Soldier
840{
841 bool Validate(SpellInfo const* /*spell*/) override
842 {
843 return ValidateSpellInfo({ SPELL_RIDE });
844 }
845
846 void HandleDummy(SpellEffIndex /*effIndex*/)
847 {
848 if (!GetHitCreature())
849 return;
850 // TO DO: Being triggered is hack, but in checkcast it doesn't pass aurastate requirements.
851 // Beside that the decoy won't keep it's freeze animation state when enter.
853 }
854
859};
860
861// 59303 - Summon Frost Wyrm
863{
865 {
866 // Adjust effect summon position
867 Position const offset = { 0.0f, 0.0f, 20.0f, 0.0f };
868 dest.RelocateOffset(offset);
869 }
870
875};
876
877// 12601 - Second Chances: Summon Landgren's Soul Moveto Target Bunny
879{
881 {
882 // Adjust effect summon position
883 Position const offset = { 0.0f, 0.0f, 2.5f, 0.0f };
884 dest.RelocateOffset(offset);
885 }
886
891};
892
893// 57385 - Argent Cannon
894// 57412 - Reckoning Bomb
896{
897 bool Validate(SpellInfo const* spellInfo) override
898 {
899 return ValidateSpellEffect({ { spellInfo->Id, EFFECT_0 } })
900 && ValidateSpellInfo({ static_cast<uint32>(spellInfo->GetEffect(EFFECT_0).CalcValueAsInt()) });
901 }
902
904 {
905 if (WorldLocation const* pos = GetExplTargetDest())
906 GetCaster()->CastSpell(pos->GetPosition(), GetEffectValueAsInt(), true);
907 }
908
913};
914
950
951// 59576 - Burst at the Seams
953{
966
967 void HandleScript(SpellEffIndex /*effIndex*/)
968 {
969 if (Creature* creature = GetCaster()->ToCreature())
970 {
971 creature->CastSpell(creature, SPELL_BLOATED_ABOMINATION_FEIGN_DEATH, true);
972 creature->CastSpell(creature, SPELL_BURST_AT_THE_SEAMS_59579, true);
973 creature->CastSpell(creature, SPELL_BURST_AT_THE_SEAMS_BONE, true);
974 creature->CastSpell(creature, SPELL_BURST_AT_THE_SEAMS_BONE, true);
975 creature->CastSpell(creature, SPELL_BURST_AT_THE_SEAMS_BONE, true);
976 creature->CastSpell(creature, SPELL_EXPLODE_ABOMINATION_MEAT, true);
977 creature->CastSpell(creature, SPELL_EXPLODE_ABOMINATION_BLOODY_MEAT, true);
978 creature->CastSpell(creature, SPELL_EXPLODE_ABOMINATION_BLOODY_MEAT, true);
979 creature->CastSpell(creature, SPELL_EXPLODE_ABOMINATION_BLOODY_MEAT, true);
980 }
981 }
982
987};
988
989// 59579 - Burst at the Seams
991{
992 void HandleApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
993 {
994 Unit* target = GetTarget();
995 target->CastSpell(target, SPELL_TROLL_EXPLOSION, true);
996 target->CastSpell(target, SPELL_EXPLODE_ABOMINATION_MEAT, true);
997 target->CastSpell(target, SPELL_EXPLODE_TROLL_MEAT, true);
998 target->CastSpell(target, SPELL_EXPLODE_TROLL_MEAT, true);
999 target->CastSpell(target, SPELL_EXPLODE_TROLL_BLOODY_MEAT, true);
1000 target->CastSpell(target, SPELL_BURST_AT_THE_SEAMS_BONE, true);
1001 }
1002
1003 void HandleRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
1004 {
1005 Unit* target = GetTarget();
1006 if (Unit* caster = GetCaster())
1007 {
1008 switch (target->GetEntry())
1009 {
1010 case NPC_ICY_GHOUL:
1012 break;
1013 case NPC_VICIOUS_GEIST:
1015 break;
1018 break;
1019 }
1020 }
1021 target->CastSpell(target, SPELL_BURST_AT_THE_SEAMS_59580, true);
1022 }
1023
1029};
1030
1031// 52593 - Bloated Abomination Feign Death
1033{
1034 void HandleApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
1035 {
1036 Unit* target = GetTarget();
1039
1040 if (Creature* creature = target->ToCreature())
1041 creature->SetReactState(REACT_PASSIVE);
1042 }
1043
1044 void HandleRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
1045 {
1046 Unit* target = GetTarget();
1047 if (Creature* creature = target->ToCreature())
1048 creature->DespawnOrUnsummon();
1049 }
1050
1056};
1057
1058// 76245 - Area Restrict Abom
1060{
1061 void HandleScript(SpellEffIndex /*effIndex*/)
1062 {
1063 if (Creature* creature = GetHitCreature()) {
1064 uint32 area = creature->GetAreaId();
1066 creature->DespawnOrUnsummon();
1067 }
1068 }
1069
1074};
1075
1076// 59590 - Assign Ghoul Kill Credit to Master
1077// 60039 - Assign Skeleton Kill Credit to Master
1078// 60041 - Assign Geist Kill Credit to Master
1080{
1081 void HandleScript(SpellEffIndex /*effIndex*/)
1082 {
1083 if (Unit* target = GetHitUnit())
1084 {
1085 if (Unit* owner = target->GetOwner())
1086 {
1087 owner->CastSpell(owner, GetEffectValueAsInt(), true);
1088 }
1089 }
1090 }
1091
1096};
1097
1098// 52510 - Burst at the Seams
1100{
1113
1114 bool Load() override
1115 {
1116 return GetCaster()->GetTypeId() == TYPEID_UNIT;
1117 }
1118
1120 {
1121 if (Unit* creature = GetHitCreature())
1122 {
1123 if (Unit* charmer = GetCaster()->GetCharmerOrOwner())
1124 {
1125 if (Player* player = charmer->ToPlayer())
1126 {
1127 if (player->GetQuestStatus(QUEST_FUEL_FOR_THE_FIRE) == QUEST_STATUS_INCOMPLETE)
1128 {
1129 creature->CastSpell(creature, SPELL_BURST_AT_THE_SEAMS_BONE, true);
1130 creature->CastSpell(creature, SPELL_EXPLODE_ABOMINATION_MEAT, true);
1131 creature->CastSpell(creature, SPELL_EXPLODE_ABOMINATION_BLOODY_MEAT, true);
1132 creature->CastSpell(creature, SPELL_BURST_AT_THE_SEAMS_52508, true);
1133 creature->CastSpell(creature, SPELL_BURST_AT_THE_SEAMS_59580, true);
1134
1135 player->CastSpell(player, SPELL_DRAKKARI_SKULLCRUSHER_CREDIT, true);
1136 uint16 count = player->GetReqKillOrCastCurrentCount(QUEST_FUEL_FOR_THE_FIRE, NPC_DRAKKARI_CHIEFTAINK);
1137 if ((count % 20) == 0)
1138 player->CastSpell(player, SPELL_SUMMON_DRAKKARI_CHIEFTAIN, true);
1139 }
1140 }
1141 }
1142 }
1143 }
1144
1145 void HandleScript(SpellEffIndex /*effIndex*/)
1146 {
1148 }
1149
1155};
1156
1161
1162// 48682 - Escape from Silverbrook - Periodic Dummy
1164{
1165 bool Validate(SpellInfo const* /*spellInfo*/) override
1166 {
1168 }
1169
1170 void HandleDummy(SpellEffIndex /*effIndex*/)
1171 {
1173 }
1174
1179};
1180
1181// 48681 - Summon Silverbrook Worgen
1183{
1185 {
1187 float angle = frand(0.75f, 1.25f) * float(M_PI);
1188
1189 Position pos = GetCaster()->GetNearPosition(dist, angle);
1190 dest.Relocate(pos);
1191 }
1192
1197};
1198
1211
1212// 51858 - Siphon of Acherus
1214{
1215 bool Validate(SpellInfo const* /*spellInfo*/) override
1216 {
1217 return ValidateSpellInfo(
1218 {
1223 });
1224 }
1225
1226 void HandleDummy(SpellEffIndex /*effIndex*/)
1227 {
1228 uint32 spellId = 0;
1229
1230 switch (GetHitCreature()->GetEntry())
1231 {
1233 spellId = SPELL_FORGE_CREDIT;
1234 break;
1236 spellId = SPELL_TOWN_HALL_CREDIT;
1237 break;
1238 case NPC_SCARLET_HOLD:
1239 spellId = SPELL_SCARLET_HOLD_CREDIT;
1240 break;
1242 spellId = SPELL_CHAPEL_CREDIT;
1243 break;
1244 default:
1245 return;
1246 }
1247
1248 GetCaster()->CastSpell(nullptr, spellId, true);
1249 }
1250
1255};
1256
1261
1262// 52694 - Recall Eye of Acherus
1264{
1265 void HandleDummy(SpellEffIndex /*effIndex*/)
1266 {
1267 if (Player* player = GetCaster()->GetCharmerOrOwner()->ToPlayer())
1268 {
1269 player->StopCastingCharm();
1270 player->StopCastingBindSight();
1271 player->RemoveAura(THE_EYE_OF_ACHERUS);
1272 }
1273 }
1274
1279};
1280
1281// 51769 - Emblazon Runeblade
1283{
1285 {
1287 if (Unit* caster = GetCaster())
1288 caster->CastSpell(caster, aurEff->GetSpellEffectInfo().TriggerSpell, aurEff);
1289 }
1290
1295};
1296
1297// 51770 - Emblazon Runeblade
1310
1316
1317// 55516 - Gymer's Grab
1319{
1320 bool Validate(SpellInfo const* /*spell*/) override
1321 {
1323 }
1324
1325 void HandleScript(SpellEffIndex /*effIndex*/)
1326 {
1327 if (!GetHitCreature())
1328 return;
1330 args.AddSpellBP0(2);
1333 }
1334
1339};
1340
1345
1346// 55421 - Gymer's Throw
1348{
1349 void HandleScript(SpellEffIndex /*effIndex*/)
1350 {
1351 Unit* caster = GetCaster();
1352 if (caster->IsVehicle())
1353 if (Unit* passenger = caster->GetVehicleKit()->GetPassenger(1))
1354 {
1355 passenger->ExitVehicle();
1356 caster->CastSpell(passenger, SPELL_VARGUL_EXPLOSION, true);
1357 }
1358 }
1359
1364};
1365
1370
1371// 61752 - Illidan Kill Credit Master
1373{
1374 bool Validate(SpellInfo const* /*spellInfo*/) override
1375 {
1377 }
1378
1379 void HandleDummy(SpellEffIndex /*effIndex*/)
1380 {
1381 Unit* caster = GetCaster();
1382 if (caster->IsVehicle())
1383 if (Unit* passenger = caster->GetVehicleKit()->GetPassenger(0))
1384 passenger->CastSpell(passenger, SPELL_ILLIDAN_KILL_CREDIT, true);
1385 }
1386
1391};
1392
1397
1398// 66744 - Make Player Destroy Totems
1400{
1401 bool Validate(SpellInfo const* /*spellInfo*/) override
1402 {
1404 }
1405
1407 {
1408 if (Player* player = GetHitPlayer())
1409 player->CastSpell(player, SPELL_TOTEM_OF_THE_EARTHEN_RING, TRIGGERED_FULL_MASK); // ignore reagent cost, consumed by quest
1410 }
1411
1416};
1417
1423
1424// 39238 - Fumping
1426{
1427 bool Validate(SpellInfo const* /*spell*/) override
1428 {
1430 }
1431
1432 void HandleEffectRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
1433 {
1434 if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_EXPIRE)
1435 return;
1436
1437 if (Unit* caster = GetCaster())
1438 caster->CastSpell(caster, urand(SPELL_SUMMON_SAND_GNOME, SPELL_SUMMON_BONE_SLICER), true);
1439 }
1440
1445};
1446
1452
1453// 93072 - Get Our Boys Back Dummy
1455{
1456public:
1457 spell_q28813_get_our_boys_back_dummy() : SpellScriptLoader("spell_q28813_get_our_boys_back_dummy") { }
1458
1460 {
1461 bool Validate(SpellInfo const* /*spellInfo*/) override
1462 {
1464 }
1465
1467 {
1468 Unit* caster = GetCaster();
1469
1470 if (Creature* injuredStormwindInfantry = caster->FindNearestCreature(NPC_INJURED_STORMWIND_INFANTRY, 5.0f, true))
1471 {
1472 injuredStormwindInfantry->SetCreatorGUID(caster->GetGUID());
1473 injuredStormwindInfantry->CastSpell(injuredStormwindInfantry, SPELL_RENEWED_LIFE, true);
1474 }
1475 }
1476
1481 };
1482
1483 SpellScript* GetSpellScript() const override
1484 {
1486 }
1487};
1488
1489// 53034 - Set Health Random
1491{
1492public:
1493 spell_q28813_set_health_random() : SpellScriptLoader("spell_q28813_set_health_random") { }
1494
1496 {
1498 {
1499 Unit* caster = GetCaster();
1500 caster->SetHealth(caster->CountPctFromMaxHealth(urand(3, 5)*10));
1501 }
1502
1507 };
1508
1509 SpellScript* GetSpellScript() const override
1510 {
1512 }
1513};
1514
1515// 49285 - Hand Over Reins
1517{
1518 void HandleScript(SpellEffIndex /*effIndex*/)
1519 {
1520 Creature* caster = GetCaster()->ToCreature();
1522
1523 if (caster)
1524 caster->DespawnOrUnsummon();
1525 }
1526
1531};
1532
1533// 13790 13793 13811 13814 - Among the Champions
1534// 13665 13745 13750 13756 13761 13767 13772 13777 13782 13787 - The Grand Melee
1548
1562
1563// 43972 - Mixing Blood
1565{
1566 void HandleEffect(SpellEffIndex /*effIndex*/)
1567 {
1568 if (Unit* caster = GetCaster())
1569 if (Creature* trigger = caster->FindNearestCreature(CREATURE_GENERIC_TRIGGER_LAB, 100.0f))
1570 trigger->AI()->DoCastSelf(SPELL_SPURTS_AND_SMOKE);
1571 }
1572
1577};
1578
1579// 43375 - Mixing Vrykul Blood
1581{
1582 void HandleDummy(SpellEffIndex /*effIndex*/)
1583 {
1584 if (Unit* caster = GetCaster())
1585 {
1586 uint8 chance = urand(0, 99);
1587 uint32 spellId = 0;
1588
1589 // 90% chance of getting one out of three failure effects
1590 if (chance < 30)
1591 spellId = SPELL_FAILED_MIX_1;
1592 else if (chance < 60)
1593 spellId = SPELL_FAILED_MIX_2;
1594 else if (chance < 90)
1595 spellId = SPELL_FAILED_MIX_3;
1596 else // 10% chance of successful cast
1597 spellId = SPELL_SUCCESSFUL_MIX;
1598
1599 caster->CastSpell(caster, spellId, true);
1600 }
1601 }
1602
1607};
1608
1609// 43376 - Failed Mix
1611{
1612 void HandleEffect(SpellEffIndex /*effIndex*/)
1613 {
1614 if (Unit* caster = GetCaster())
1615 if (Creature* trigger = caster->FindNearestCreature(CREATURE_GENERIC_TRIGGER_LAB, 100.0f))
1616 trigger->AI()->Talk(TALK_0, caster);
1617 }
1618
1623};
1624
1625// 43378 - Failed Mix
1627{
1628 void HandleEffect(SpellEffIndex /*effIndex*/)
1629 {
1630 if (Unit* caster = GetCaster())
1631 if (Creature* trigger = caster->FindNearestCreature(CREATURE_GENERIC_TRIGGER_LAB, 100.0f))
1632 trigger->AI()->Talk(TALK_1, caster);
1633 }
1634
1639};
1640
1641// 46444 - Weakness to Lightning: Cast on Master Script Effect
1643{
1644 void HandleScript(SpellEffIndex /*effIndex*/)
1645 {
1646 if (Unit* target = GetHitUnit())
1647 {
1648 if (Unit* owner = target->GetOwner())
1649 {
1650 target->CastSpell(owner, GetEffectValueAsInt(), true);
1651 }
1652 }
1653 }
1654
1659};
1660
1662{
1698 SPELL_TAME_MISTBAT_1 = 30104
1700
1702{
1727
1728 void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
1729 {
1730 if (!GetCaster() || !GetCaster()->IsAlive() || !GetTarget()->IsAlive())
1731 return;
1732
1733 if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_EXPIRE)
1734 return;
1735
1736 uint32 finalSpellId = 0;
1737 switch (GetId())
1738 {
1739 case SPELL_TAME_ICE_CLAW_BEAR: finalSpellId = SPELL_TAME_ICE_CLAW_BEAR_1; break;
1740 case SPELL_TAME_LARGE_CRAG_BOAR: finalSpellId = SPELL_TAME_LARGE_CRAG_BOAR_1; break;
1741 case SPELL_TAME_SNOW_LEOPARD: finalSpellId = SPELL_TAME_SNOW_LEOPARD_1; break;
1743 case SPELL_TAME_PRAIRIE_STALKER: finalSpellId = SPELL_TAME_PRAIRIE_STALKER_1; break;
1744 case SPELL_TAME_SWOOP: finalSpellId = SPELL_TAME_SWOOP_1; break;
1745 case SPELL_TAME_WEBWOOD_LURKER: finalSpellId = SPELL_TAME_WEBWOOD_LURKER_1; break;
1747 case SPELL_TAME_SURF_CRAWLER: finalSpellId = SPELL_TAME_SURF_CRAWLER_1; break;
1748 case SPELL_TAME_ARMORED_SCORPID: finalSpellId = SPELL_TAME_ARMORED_SCORPID_1; break;
1751 case SPELL_TAME_BARBED_CRAWLER: finalSpellId = SPELL_TAME_BARBED_CRAWLER_1; break;
1753 case SPELL_TAME_NIGHTSTALKER: finalSpellId = SPELL_TAME_NIGHTSTALKER_1; break;
1755 case SPELL_TAME_ELDER_SPRINGPAW: finalSpellId = SPELL_TAME_ELDER_SPRINGPAW_1; break;
1756 case SPELL_TAME_MISTBAT: finalSpellId = SPELL_TAME_MISTBAT_1; break;
1757 }
1758
1759 if (finalSpellId)
1760 GetCaster()->CastSpell(GetTarget(), finalSpellId, true);
1761 }
1762
1767};
1768
1769// 53099, 57896, 58418, 58420, 59064, 59065, 59439, 60900, 60940
1771{
1772 bool Validate(SpellInfo const* spellInfo) override
1773 {
1774 return ValidateSpellEffect({ { spellInfo->Id, EFFECT_1 } })
1776 && sObjectMgr->GetQuestTemplate(uint32(spellInfo->GetEffect(EFFECT_1).CalcValueAsInt()));
1777 }
1778
1780 {
1781 Player* target = GetHitPlayer();
1782 if (!target)
1783 return;
1784
1785 uint32 spellId = GetEffectInfo().CalcValueAsInt();
1787
1788 // This probably should be a way to throw error in SpellCastResult
1789 if (target->IsActiveQuest(questId))
1790 target->CastSpell(target, spellId, true);
1791 }
1792
1797};
1798
1812
1813// 24194 - Uther's Tribute
1814// 24195 - Grom's Tribute
1816{
1828
1829 void HandleScript(SpellEffIndex /*effIndex*/)
1830 {
1831 Player* caster = GetCaster()->ToPlayer();
1832 if (!caster)
1833 return;
1834
1835 uint32 spell = 0;
1836 switch (caster->GetRace())
1837 {
1838 case RACE_TROLL: spell = SPELL_GROMS_TROLL_TRIBUTE; break;
1839 case RACE_TAUREN: spell = SPELL_GROMS_TAUREN_TRIBUTE; break;
1841 case RACE_ORC: spell = SPELL_GROMS_ORC_TRIBUTE; break;
1842 case RACE_BLOODELF: spell = SPELL_GROMS_BLOODELF_TRIBUTE; break;
1843 case RACE_HUMAN: spell = SPELL_UTHERS_HUMAN_TRIBUTE; break;
1844 case RACE_GNOME: spell = SPELL_UTHERS_GNOME_TRIBUTE; break;
1845 case RACE_DWARF: spell = SPELL_UTHERS_DWARF_TRIBUTE; break;
1846 case RACE_NIGHTELF: spell = SPELL_UTHERS_NIGHTELF_TRIBUTE; break;
1847 case RACE_DRAENEI: spell = SPELL_UTHERS_DRAENEI_TRIBUTE; break;
1848 default: break;
1849 }
1850
1851 if (spell)
1852 caster->CastSpell(caster, spell);
1853 }
1854
1859};
1860
1861/*######
1862## Quest 14386 Leader of the Pack
1863######*/
1864
1869
1870// 68682 Call Attack Mastiffs
1872{
1874 {
1875 Unit* caster = GetCaster();
1876 caster->SummonCreature(NPC_ATTACK_MASTIFF, -1944.573f, 2657.402f, 0.994939f, 1.691919f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1s);
1877 caster->SummonCreature(NPC_ATTACK_MASTIFF, -2005.65f, 2663.526f, -2.086935f, 0.5942355f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1s);
1878 caster->SummonCreature(NPC_ATTACK_MASTIFF, -1996.506f, 2651.347f, -1.011707f, 0.8185352f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1s);
1879 caster->SummonCreature(NPC_ATTACK_MASTIFF, -1972.352f, 2640.07f, 1.080288f, 1.217854f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1s);
1880 caster->SummonCreature(NPC_ATTACK_MASTIFF, -1949.322f, 2642.76f, 1.242482f, 1.58074f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1s);
1881 caster->SummonCreature(NPC_ATTACK_MASTIFF, -1993.94f, 2672.535f, -2.322549f, 0.5766209f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1s);
1882 caster->SummonCreature(NPC_ATTACK_MASTIFF, -1982.724f, 2662.8f, -1.773986f, 0.8628055f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1s);
1883 caster->SummonCreature(NPC_ATTACK_MASTIFF, -1973.301f, 2655.475f, -0.7831049f, 1.098415f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1s);
1884 caster->SummonCreature(NPC_ATTACK_MASTIFF, -1956.509f, 2650.655f, 1.350571f, 1.441473f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1s);
1885 }
1886
1891};
1893{
1955}
#define M_PI
Definition Common.h:118
T GetEntry(std::unordered_map< uint32, T > const &map, CriteriaTreeEntry const *tree)
uint8_t uint8
Definition Define.h:156
uint16_t uint16
Definition Define.h:155
uint32_t uint32
Definition Define.h:154
std::chrono::milliseconds Milliseconds
Milliseconds shorthand typedef.
Definition Duration.h:24
@ TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT
@ TYPEID_UNIT
Definition ObjectGuid.h:43
@ TYPEID_PLAYER
Definition ObjectGuid.h:44
#define sObjectMgr
Definition ObjectMgr.h:1885
@ QUEST_STATUS_INCOMPLETE
Definition QuestDef.h:150
@ RACE_TROLL
Definition RaceMask.h:36
@ RACE_UNDEAD_PLAYER
Definition RaceMask.h:33
@ RACE_ORC
Definition RaceMask.h:30
@ RACE_DRAENEI
Definition RaceMask.h:39
@ RACE_NIGHTELF
Definition RaceMask.h:32
@ RACE_BLOODELF
Definition RaceMask.h:38
@ RACE_DWARF
Definition RaceMask.h:31
@ RACE_GNOME
Definition RaceMask.h:35
@ RACE_HUMAN
Definition RaceMask.h:29
@ RACE_TAUREN
Definition RaceMask.h:34
float frand(float min, float max)
Definition Random.cpp:55
uint32 urand(uint32 min, uint32 max)
Definition Random.cpp:42
bool roll_chance(T chance)
Definition Random.h:55
#define RegisterSpellScript(spell_script)
Definition ScriptMgr.h:1383
SpellEffIndex
@ EFFECT_1
@ EFFECT_0
@ EFFECT_2
@ TARGET_DEST_CASTER_BACK
@ TARGET_DEST_CASTER_SUMMON
@ TARGET_DEST_CASTER
@ EMOTE_ONESHOT_ROAR
@ SPELL_EFFECT_DUMMY
@ SPELL_EFFECT_SCRIPT_EFFECT
@ SPELL_EFFECT_SEND_EVENT
@ SPELL_EFFECT_KNOCK_BACK
@ ALLIANCE
@ HORDE
SpellCastResult
@ SPELL_FAILED_CANT_DO_THAT_RIGHT_NOW
@ SPELL_CAST_OK
AuraEffectHandleModes
@ AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK
@ AURA_EFFECT_HANDLE_REAL
@ AURA_REMOVE_BY_EXPIRE
@ SPELL_AURA_PERIODIC_HEAL
@ SPELL_AURA_DUMMY
@ SPELL_AURA_FLY
@ SPELL_AURA_PERIODIC_DUMMY
@ SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED
@ SPELL_AURA_PERIODIC_TRIGGER_SPELL
@ TRIGGERED_FULL_MASK
Used when doing CastSpell with triggered == true.
@ TRIGGERED_IGNORE_CASTER_MOUNTED_OR_ON_VEHICLE
Will ignore mounted/on vehicle restrictions.
#define SpellCheckCastFn(F)
#define SpellEffectFn(F, I, N)
#define AuraEffectPeriodicFn(F, I, N)
#define SpellCastFn(F)
#define SpellDestinationTargetSelectFn(F, I, N)
#define AuraEffectApplyFn(F, I, N, M)
#define AuraEffectRemoveFn(F, I, N, M)
@ UNIT_FLAG2_FEIGN_DEATH
@ REACT_PASSIVE
@ UNIT_FLAG3_FAKE_DEAD
@ UNIT_STATE_ROOT
Definition Unit.h:271
SpellEffectInfo const & GetSpellEffectInfo() const
void PreventDefaultAction()
AuraApplication const * GetTargetApplication() const
HookList< EffectApplyHandler > AfterEffectRemove
HookList< EffectPeriodicHandler > OnEffectPeriodic
HookList< EffectApplyHandler > AfterEffectApply
Unit * GetCaster() const
Unit * GetTarget() const
HookList< EffectApplyHandler > OnEffectRemove
HookList< EffectApplyHandler > OnEffectApply
uint32 GetId() const
ObjectGuid const & GetGUID() const
Definition BaseEntity.h:163
TypeID GetTypeId() const
Definition BaseEntity.h:166
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
Definition Item.h:179
Player * ToPlayer()
Definition Object.h:126
uint32 GetEntry() const
Definition Object.h:89
Creature * ToCreature()
Definition Object.h:121
void KilledMonsterCredit(uint32 entry, ObjectGuid guid=ObjectGuid::Empty)
Definition Player.cpp:16679
bool IsActiveQuest(uint32 quest_id) const
Definition Player.cpp:14477
Team GetTeam() const
Definition Player.h:2423
uint32 TriggerSpell
Definition SpellInfo.h:234
int32 CalcValueAsInt(WorldObject const *caster=nullptr, SpellEffectValue const *basePoints=nullptr, Unit const *target=nullptr, float *variance=nullptr, uint32 castItemId=0, int32 itemLevel=-1) const
SpellRange CalcRadius(WorldObject const *caster=nullptr, SpellTargetIndex targetIndex=SpellTargetIndex::TargetA, Spell *spell=nullptr) const
uint32 const Id
Definition SpellInfo.h:328
SpellEffectInfo const & GetEffect(SpellEffIndex index) const
Definition SpellInfo.h:588
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
static bool ValidateSpellEffect(std::initializer_list< std::pair< uint32, SpellEffIndex > > effects)
HookList< CheckCastHandler > OnCheckCast
Creature * GetHitCreature() const
Player * GetHitPlayer() const
Aura * GetHitAura(bool dynObjAura=false, bool withRemoved=false) const
Unit * GetCaster() const
HookList< DestinationTargetSelectHandler > OnDestinationTargetSelect
int32 GetEffectValueAsInt() const
HookList< EffectHandler > OnEffectHit
Unit * GetHitUnit() const
SpellEffectInfo const & GetEffectInfo() const
HookList< EffectHandler > OnEffectHitTarget
Item * GetCastItem() const
HookList< CastHandler > OnCast
WorldLocation const * GetExplTargetDest() const
SpellInfo const * GetSpellInfo() const
Unit * GetOriginalCaster() const
Definition Unit.h:635
bool IsVehicle() const
Definition Unit.h:754
void SetImmuneToPC(bool apply, bool keepCombat)
Definition Unit.cpp:8518
void SetHealth(uint64 val)
Definition Unit.cpp:9973
uint64 CountPctFromMaxHealth(float pct) const
Definition Unit.h:797
void SetUnitFlag3(UnitFlags3 flags)
Definition Unit.h:856
void SetUnitFlag2(UnitFlags2 flags)
Definition Unit.h:851
void AddUnitState(uint32 f)
Definition Unit.h:742
bool HasAuraType(AuraType auraType) const
Definition Unit.cpp:4814
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
Definition Unit.cpp:4804
void RemoveAllAuras()
Definition Unit.cpp:4382
void HandleEmoteCommand(Emote emoteId, Player *target=nullptr, Trinity::IteratorPair< int32 const * > spellVisualKitIds={}, int32 sequenceVariation=0)
Definition Unit.cpp:1657
Vehicle * GetVehicleKit() const
Definition Unit.h:1782
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:3974
uint8 GetRace() const
Definition Unit.h:761
virtual void ExitVehicle(Position const *exitPosition=nullptr)
Definition Unit.cpp:12835
Unit * GetPassenger(int8 seatId) const
Gets a passenger on specified seat.
Definition Vehicle.cpp:303
void GetPlayerListInGrid(Container &playerContainer, float maxSearchRange, bool alive=true) const
Definition Object.cpp:2678
Unit * GetCharmerOrOwnerOrSelf() const
Definition Object.cpp:1613
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
Definition Object.cpp:2217
TempSummon * SummonCreature(uint32 entry, Position const &pos, TempSummonType despawnType=TEMPSUMMON_MANUAL_DESPAWN, Milliseconds despawnTime=0s, uint32 vehId=0, uint32 spellId=0, ObjectGuid privateObjectOwner=ObjectGuid::Empty)
Definition Object.cpp:1398
Unit * GetOwner() const
Definition Object.cpp:1598
Position GetNearPosition(float dist, float angle)
Definition Object.cpp:2755
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition Object.cpp:1517
Player * GetCharmerOrOwnerPlayerOrPlayerItself() const
Definition Object.cpp:1621
uint8 _effIndex
Milliseconds _despawnTime
void HandleDummy(SpellEffIndex)
spell_generic_quest_update_entry_SpellScript(uint16 spellEffect, uint8 effIndex, uint32 originalEntry, uint32 newEntry, bool shouldAttack, Milliseconds despawnTime=0s)
bool _shouldAttack
uint32 _newEntry
uint32 _originalEntry
uint16 _spellEffect
void Register() override
SpellScript * GetSpellScript() const override
void Register() override
bool Validate(SpellInfo const *) override
void HandleEffectRemove(AuraEffect const *, AuraEffectHandleModes)
void HandleEffectPeriodic(AuraEffect const *)
void HandleEffect(SpellEffIndex)
void HandleEffect(SpellEffIndex)
void HandleEffect(SpellEffIndex)
void HandleEffectApply(AuraEffect const *, AuraEffectHandleModes)
void HandleEffectRemove(AuraEffect const *, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
SpellScript * GetSpellScript() const override
bool Validate(SpellInfo const *) override
void HandleDummy(SpellEffIndex)
bool Validate(SpellInfo const *) override
void HandleScript(SpellEffIndex)
bool Validate(SpellInfo const *) override
void HandleScriptEffect(SpellEffIndex)
void HandleEffectPeriodic(AuraEffect const *aurEff)
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
void HandleDummy(SpellEffIndex)
bool Validate(SpellInfo const *) override
void HandleEffectPeriodic(AuraEffect const *)
bool Validate(SpellInfo const *) override
void HandleScript(SpellEffIndex)
void SetDest(SpellDestination &dest)
void HandleEffectApply(AuraEffect const *, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
void HandleScript(SpellEffIndex)
void HandleScript(SpellEffIndex)
bool Validate(SpellInfo const *spellInfo) override
void HandleEffectDummy(SpellEffIndex)
void HandleRemove(AuraEffect const *, AuraEffectHandleModes)
void HandleApply(AuraEffect const *, AuraEffectHandleModes)
void HandleApply(AuraEffect const *, AuraEffectHandleModes)
void HandleRemove(AuraEffect const *, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
void HandleEffectPeriodic(AuraEffect const *)
bool Validate(SpellInfo const *) override
SpellScript * GetSpellScript() const override
SpellScript * GetSpellScript() const override
SpellScript * GetSpellScript() const override
void HandleDummy(SpellEffIndex)
bool Validate(SpellInfo const *spellInfo) override
void HandleScriptEffect(SpellEffIndex)
void OnRemove(AuraEffect const *, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
void HandleScript(SpellEffIndex)
TamingTheBeast
@ SPELL_TAME_SURF_CRAWLER
@ SPELL_TAME_SNOW_LEOPARD_1
@ SPELL_TAME_GREATER_TIMBERSTRIDER_1
@ SPELL_TAME_ELDER_SPRINGPAW_1
@ SPELL_TAME_PRAIRIE_STALKER
@ SPELL_TAME_WEBWOOD_LURKER_1
@ SPELL_TAME_LARGE_CRAG_BOAR
@ SPELL_TAME_MISTBAT
@ SPELL_TAME_STRIGID_SCREECHER_1
@ SPELL_TAME_NIGHTSTALKER_1
@ SPELL_TAME_NIGHTSABER_STALKER
@ SPELL_TAME_ELDER_SPRINGPAW
@ SPELL_TAME_ARMORED_SCORPID
@ SPELL_TAME_ICE_CLAW_BEAR
@ SPELL_TAME_CRAZED_DRAGONHAWK_1
@ SPELL_TAME_CRAZED_DRAGONHAWK
@ SPELL_TAME_ICE_CLAW_BEAR_1
@ SPELL_TAME_ARMORED_SCORPID_1
@ SPELL_TAME_WEBWOOD_LURKER
@ SPELL_TAME_DIRE_MOTTLED_BOAR_1
@ SPELL_TAME_STRIGID_SCREECHER
@ SPELL_TAME_BARBED_CRAWLER
@ SPELL_TAME_SWOOP
@ SPELL_TAME_SURF_CRAWLER_1
@ SPELL_TAME_LARGE_CRAG_BOAR_1
@ SPELL_TAME_NIGHTSTALKER
@ SPELL_TAME_BARBED_CRAWLER_1
@ SPELL_TAME_ADULT_PLAINSTRIDER
@ SPELL_TAME_GREATER_TIMBERSTRIDER
@ SPELL_TAME_SWOOP_1
@ SPELL_TAME_DIRE_MOTTLED_BOAR
@ SPELL_TAME_PRAIRIE_STALKER_1
@ SPELL_TAME_NIGHTSABER_STALKER_1
@ SPELL_TAME_SNOW_LEOPARD
@ SPELL_TAME_MISTBAT_1
@ SPELL_TAME_ADULT_PLAINSTRIDER_1
FocusOnTheBeach
@ SPELL_BUNNY_CREDIT_BEAM
Quest13291_13292_13239_13261Data
@ NPC_DECOY
@ SPELL_RIDE
@ NPC_SKYTALON
ApplyHeatAndStir
@ SPELL_FAILED_MIX_1
@ CREATURE_GENERIC_TRIGGER_LAB
@ SPELL_SUCCESSFUL_MIX
@ SPELL_FAILED_MIX_3
@ SPELL_SPURTS_AND_SMOKE
@ TALK_1
@ TALK_0
@ SPELL_FAILED_MIX_2
Quest12459Data
@ NPC_REANIMATED_FROSTWYRM
@ NPC_WEAK_REANIMATED_FROSTWYRM
@ NPC_TURGID
@ NPC_DEATHGAZE
@ NPC_WEAK_DEATHGAZE
@ NPC_WEAK_TURGID
Quest_The_Hunter_And_The_Prince
@ SPELL_ILLIDAN_KILL_CREDIT
SalvagingLifesStength
@ NPC_SHARD_KILL_CREDIT
TributeSpells
@ SPELL_UTHERS_DRAENEI_TRIBUTE
@ SPELL_GROMS_TAUREN_TRIBUTE
@ SPELL_UTHERS_HUMAN_TRIBUTE
@ SPELL_UTHERS_GNOME_TRIBUTE
@ SPELL_UTHERS_NIGHTELF_TRIBUTE
@ SPELL_GROMS_ORC_TRIBUTE
@ SPELL_GROMS_TROLL_TRIBUTE
@ SPELL_GROMS_BLOODELF_TRIBUTE
@ SPELL_UTHERS_DWARF_TRIBUTE
@ SPELL_GROMS_UNDEAD_TRIBUTE
DefendingWyrmrestTemple
@ SPELL_SUMMON_WYRMREST_DEFENDER
Quest12372Data
@ NPC_WYRMREST_TEMPLE_CREDIT
Quest11730Data
@ SPELL_SUMMON_SENTRYBOT_57K
@ SPELL_SUMMON_SCAVENGEBOT_004A8
@ NPC_DEFENDOTANK_66D
@ SPELL_SUMMON_55D_COLLECTATRON
@ SPELL_SUMMON_SCAVENGEBOT_005B6
@ NPC_SCAVENGEBOT_004A8
@ NPC_SCAVENGEBOT_005B6
@ NPC_SENTRYBOT_57K
@ SPELL_SUMMON_DEFENDOTANK_66D
@ SPELL_ROBOT_KILL_CREDIT
@ NPC_55D_COLLECTATRON
CallAttackMastiffs
@ NPC_ATTACK_MASTIFF
Quest_The_Storm_King_Throw
@ SPELL_VARGUL_EXPLOSION
BattleStandard
@ SPELL_PLANT_HORDE_BATTLE_STANDARD
@ SPELL_ALLIANCE_BATTLE_STANDARD_STATE
@ SPELL_HORDE_BATTLE_STANDARD_STATE
@ SPELL_JUMP_ROCKET_BLAST
@ NPC_KING_OF_THE_MOUNTAINT_KC
SpellZuldrakRat
@ SPELL_SUMMON_GORGED_LURKING_BASILISK
Quest12851Data
@ SPELL_IMMOLATION
@ SPELL_ABLAZE
@ SPELL_FROSTGIANT_CREDIT
@ SPELL_FROSTWORG_CREDIT
@ NPC_FROSTGIANT
@ NPC_FROSTWORG
QuenchingMist
@ SPELL_FLICKERING_FLAMES
Quest12634Data
@ SPELL_SUMMON_ADVENTUROUS_DWARF
@ SPELL_ORANGE_FALLS_TO_GROUND
@ SPELL_PAPAYA_FALLS_TO_GROUND
@ SPELL_BANANAS_FALL_TO_GROUND
DeathComesFromOnHigh
@ NPC_NEW_AVALON_TOWN_HALL
@ NPC_NEW_AVALON_FORGE
@ SPELL_TOWN_HALL_CREDIT
@ NPC_CHAPEL_OF_THE_CRIMSON_FLAME
@ NPC_SCARLET_HOLD
@ SPELL_SCARLET_HOLD_CREDIT
@ SPELL_CHAPEL_CREDIT
@ SPELL_FORGE_CREDIT
Fumping
@ SPELL_SUMMON_SAND_GNOME
@ SPELL_SUMMON_BONE_SLICER
Quest55Data
@ NPC_MORBENT
@ NPC_WEAKENED_MORBENT
Quest11010_11102_11023Data
@ SPELL_CHOOSE_LOC
@ SPELL_AGGRO_CHECK
@ NPC_FEL_CANNON2
@ SPELL_FLAK_CANNON_TRIGGER
RelicOfTheEarthenRing
@ SPELL_TOTEM_OF_THE_EARTHEN_RING
EscapeFromSilverbrook
@ SPELL_SUMMON_WORGEN
BurstAtTheSeams
@ SPELL_BURST_AT_THE_SEAMS_52510
@ SPELL_BURST_AT_THE_SEAMS_BONE
@ SPELL_DRAKKARI_CHIEFTAINK_KILL_CREDIT
@ QUEST_FUEL_FOR_THE_FIRE
@ SPELL_ASSIGN_SKELETON_KILL_CREDIT_TO_MASTER
@ AREA_MORD_RETHAR_THE_DEATH_GATE
@ SPELL_EXPLODE_ABOMINATION_BLOODY_MEAT
@ NPC_RENIMATED_ABOMINATION
@ SPELL_TROLL_EXPLOSION
@ SPELL_ASSIGN_GEIST_KILL_CREDIT_TO_MASTER
@ NPC_RISEN_ALLIANCE_SOLDIERS
@ AREA_THE_BROKEN_FRONT
@ SPELL_EXPLODE_TROLL_MEAT
@ SPELL_EXPLODE_TROLL_BLOODY_MEAT
@ NPC_VICIOUS_GEIST
@ SPELL_BURST_AT_THE_SEAMS_59580
@ NPC_ICY_GHOUL
@ NPC_DRAKKARI_CHIEFTAINK
@ SPELL_SUMMON_DRAKKARI_CHIEFTAIN
@ SPELL_BURST_AT_THE_SEAMS_52508
@ SPELL_BURST_AT_THE_SEAMS_59579
@ SPELL_BURST_AT_THE_SEAMS_59576
@ SPELL_ASSIGN_GHOUL_KILL_CREDIT_TO_MASTER
@ SPELL_DRAKKARI_SKULLCRUSHER_CREDIT
@ SPELL_EXPLODE_ABOMINATION_MEAT
@ SPELL_BLOATED_ABOMINATION_FEIGN_DEATH
FearNoEvil
@ NPC_INJURED_STORMWIND_INFANTRY
@ SPELL_RENEWED_LIFE
Recall_Eye_of_Acherus
@ THE_EYE_OF_ACHERUS
Quest12659Data
@ NPC_SCALPS_KC_BUNNY
Quest11396_11399Data
@ SPELL_FORCE_SHIELD_ARCANE_PURPLE_X3
@ SPELL_SCOURGING_CRYSTAL_CONTROLLER
constexpr Milliseconds Quest6124_6129_DESPAWN_TIME
Quests6124_6129Data
@ NPC_SICKLY_DEER
@ NPC_SICKLY_GAZELLE
@ NPC_CURED_GAZELLE
@ NPC_CURED_DEER
void AddSC_quest_spell_scripts()
ThaumaturgyChannel
@ SPELL_THAUMATURGY_CHANNEL
Quest_The_Storm_King
@ SPELL_RIDE_GYMER
@ SPELL_GRABBED
Quest10255Data
@ NPC_HELBOAR
@ NPC_DREADTUSK
Quest11515Data
@ NPC_EMACIATED_FELBLOOD
@ NPC_FELBLOOD_INITIATE
CastSpellExtraArgs & AddSpellBP0(SpellEffectValue val)
void RelocateOffset(Position const &offset)
Definition Spell.cpp:90
void Relocate(Position const &pos)
Definition Spell.cpp:82