Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
spell_generic.cpp
Go to the documentation of this file.
1/*
2* This file is part of Project SkyFire https://www.projectskyfire.org.
3* See LICENSE.md file for Copyright information
4*/
5
6/*
7 * Scripts for spells with SPELLFAMILY_GENERIC which cannot be included in AI script file
8 * of creature using it or can't be bound to any player class.
9 * Ordered alphabetically using scriptname.
10 * Scriptnames of files in this file should be prefixed with "spell_gen_"
11 */
12
13#include "ScriptMgr.h"
14#include "Battleground.h"
15#include "Cell.h"
16#include "CellImpl.h"
17#include "GridNotifiers.h"
18#include "GridNotifiersImpl.h"
19#include "Group.h"
20#include "InstanceScript.h"
21#include "Item.h"
22#include "LFGMgr.h"
23#include "Pet.h"
24#include "ReputationMgr.h"
25#include "SkillDiscovery.h"
26#include "SpellScript.h"
27#include "SpellAuraEffects.h"
28
29// 125122 - Rice Pudding
31{
32public:
33 spell_gen_rice_pudding() : SpellScriptLoader("spell_gen_rice_pudding") { }
34
36 {
43
45 {
46 OnEffectLaunch += SpellEffectFn(spell_gen_rice_pudding_SpellScript::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_CREATE_ITEM);
47 }
48 private:
49 const uint32 npcRicePudding = 64234;
50 };
51
56};
57
58const Position jumpPosC = { 1063.56f, 2843.46f, 95.2332, 0.0f };
60{
61public:
62 spell_gen_rock_jump_c() : SpellScriptLoader("spell_gen_rock_jump_c") { }
63
65 {
67
68 void HandleScriptEffect(SpellEffIndex /*effIndex*/)
69 {
70 GetCaster()->GetMotionMaster()->MoveJump(jumpPosC, 10.0f, 15.0f);
71 }
72
74 {
75 OnEffectLaunch += SpellEffectFn(spell_gen_rock_jump_c_SpellScript::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_JUMP_DEST);
76 }
77 };
78
83};
84//
85const Position jumpPosB = { 1054.531f, 2842.7f, 92.59693f, 0.0f };
87{
88public:
89 spell_gen_rock_jump_b() : SpellScriptLoader("spell_gen_rock_jump_b") { }
90
92 {
94
95 void HandleScriptEffect(SpellEffIndex /*effIndex*/)
96 {
97 GetCaster()->GetMotionMaster()->MoveJump(jumpPosB, 10.0f, 15.0f);
98 }
99
101 {
102 OnEffectLaunch += SpellEffectFn(spell_gen_rock_jump_b_SpellScript::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_JUMP_DEST);
103 }
104 };
105
110};
111//
112const Position jumpPosD = { 1077.019f, 2844.103f, 95.27103f, 0.0f };
113const Position jumpPosA = { 1045.1666f, 2848.442f, 91.405014f, 0.0f };
115{
116public:
117 spell_gen_rock_jump_a() : SpellScriptLoader("spell_gen_rock_jump_a") { }
118
120 {
122
123 void HandleScriptEffect(SpellEffIndex /*effIndex*/)
124 {
125 if (GetCaster()->FindNearestGameObject(209577, 10.0f)) // check if C is near
126 {
127 GetCaster()->GetMotionMaster()->MoveJump(jumpPosD, 10.0f, 15.0f);
128 }
129 else
130 {
131 GetCaster()->GetMotionMaster()->MoveJump(jumpPosA, 10.0f, 10.0f);
132 }
133 }
134
136 {
137 OnEffectLaunch += SpellEffectFn(spell_gen_rock_jump_a_SpellScript::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_JUMP_DEST);
138 }
139 };
140
145};
146// 106299 - Summon Living Air
147const Position elementalPos = { 1224.9202f, 3727.2014f, 92.447205f, 0.0f };
149{
150public:
151 spell_gen_summon_living_air() : SpellScriptLoader("spell_gen_summon_living_air") { }
152
154 {
156
157 void HandleDummy(SpellEffIndex /*effIndex*/ )
158 {
159 if (Creature* chickenTrigger = GetCaster()->FindNearestCreature(41200, 15.0f, true))
160 chickenTrigger->SummonCreature(54631, elementalPos, TempSummonType::TEMPSUMMON_TIMED_DESPAWN, 30000);
161 }
162
164 {
165 OnEffectHitTarget += SpellEffectFn(spell_gen_summon_living_air_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
166 }
167 };
168
173};
174
176{
177 public:
178 spell_gen_absorb0_hitlimit1() : SpellScriptLoader("spell_gen_absorb0_hitlimit1") { }
179
181 {
183
185
187 {
188 // Max absorb stored in 1 dummy effect
190 return true;
191 }
192
193 void Absorb(AuraEffect* /*aurEff*/, DamageInfo& /*dmgInfo*/, uint32& absorbAmount)
194 {
195 absorbAmount = std::min(limit, absorbAmount);
196 }
197
202 };
203
208};
209
210// 28764 - Adaptive Warding (Frostfire Regalia Set)
219
221{
222 public:
223 spell_gen_adaptive_warding() : SpellScriptLoader("spell_gen_adaptive_warding") { }
224
226 {
228
229 bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
230 {
231 if (!sSpellMgr->GetSpellInfo(SPELL_GEN_ADAPTIVE_WARDING_FIRE) ||
236 return false;
237 return true;
238 }
239
240 bool CheckProc(ProcEventInfo& eventInfo)
241 {
242 if (eventInfo.GetDamageInfo()->GetSpellInfo()) // eventInfo.GetSpellInfo()
243 return false;
244
245 // find Mage Armor
246 if (!GetTarget()->GetAuraEffect(SPELL_AURA_MOD_MANA_REGEN_INTERRUPT, SPELLFAMILY_MAGE, 0x10000000, 0x0, 0x0))
247 return false;
248
249 switch (GetFirstSchoolInMask(eventInfo.GetSchoolMask()))
250 {
253 return false;
254 default:
255 break;
256 }
257 return true;
258 }
259
260 void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
261 {
263
264 uint32 spellId = 0;
265 switch (GetFirstSchoolInMask(eventInfo.GetSchoolMask()))
266 {
269 break;
272 break;
275 break;
278 break;
281 break;
282 default:
283 return;
284 }
285 GetTarget()->CastSpell(GetTarget(), spellId, true, NULL, aurEff);
286 }
287
293 };
294
299};
300
306
307// 17619 - Alchemist Stone
309{
310 public:
311 spell_gen_alchemist_stone() : SpellScriptLoader("spell_gen_alchemist_stone") { }
312
314 {
316
317 bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
318 {
319 if (!sSpellMgr->GetSpellInfo(ALECHEMIST_STONE_HEAL) ||
320 !sSpellMgr->GetSpellInfo(ALECHEMIST_STONE_MANA))
321 return false;
322 return true;
323 }
324
325 bool CheckProc(ProcEventInfo& eventInfo)
326 {
328 }
329
330 void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
331 {
333
334 uint32 spellId = 0;
335 int32 bp = int32(eventInfo.GetDamageInfo()->GetDamage() * 0.4f);
336
338 spellId = ALECHEMIST_STONE_HEAL;
340 spellId = ALECHEMIST_STONE_MANA;
341
342 if (!spellId)
343 return;
344
345 GetTarget()->CastCustomSpell(spellId, SPELLVALUE_BASE_POINT0, bp, GetTarget(), true, NULL, aurEff);
346 }
347
348
354 };
355
360};
361
389
395
397{
398 public:
399 spell_gen_animal_blood() : SpellScriptLoader("spell_gen_animal_blood") { }
400
402 {
404
405 bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
406 {
407 if (!sSpellMgr->GetSpellInfo(SPELL_SPAWN_BLOOD_POOL))
408 return false;
409 return true;
410 }
411
412 void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
413 {
414 // Remove all auras with spell id 46221, except the one currently being applied
415 while (Aura* aur = GetUnitOwner()->GetOwnedAura(SPELL_ANIMAL_BLOOD, 0, 0, 0, GetAura()))
417 }
418
419 void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
420 {
421 if (Unit* owner = GetUnitOwner())
422 if (owner->IsInWater())
423 owner->CastSpell(owner, SPELL_SPAWN_BLOOD_POOL, true);
424 }
425
431 };
432
437};
438
439// 41337 Aura of Anger
441{
442 public:
443 spell_gen_aura_of_anger() : SpellScriptLoader("spell_gen_aura_of_anger") { }
444
461
466};
467
469{
470 // Spells
472
473 // Models
476};
477
479{
480 public:
481 spell_gen_aura_service_uniform() : SpellScriptLoader("spell_gen_aura_service_uniform") { }
482
484 {
486
487 bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
488 {
489 if (!sSpellMgr->GetSpellInfo(SPELL_SERVICE_UNIFORM))
490 return false;
491 return true;
492 }
493
494 void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
495 {
496 // Apply model goblin
497 Unit* target = GetTarget();
498 if (target->GetTypeId() == TypeID::TYPEID_PLAYER)
499 {
500 if (target->getGender() == GENDER_MALE)
502 else
504 }
505 }
506
507 void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
508 {
509 Unit* target = GetTarget();
510 if (target->GetTypeId() == TypeID::TYPEID_PLAYER)
511 target->RestoreDisplayId();
512 }
513
519 };
520
525};
526
528{
529 public:
530 spell_gen_av_drekthar_presence() : SpellScriptLoader("spell_gen_av_drekthar_presence") { }
531
533 {
535
536 bool CheckAreaTarget(Unit* target)
537 {
538 switch (target->GetEntry())
539 {
540 // alliance
541 case 14762: // Dun Baldar North Marshal
542 case 14763: // Dun Baldar South Marshal
543 case 14764: // Icewing Marshal
544 case 14765: // Stonehearth Marshal
545 case 11948: // Vandar Stormspike
546 // horde
547 case 14772: // East Frostwolf Warmaster
548 case 14776: // Tower Point Warmaster
549 case 14773: // Iceblood Warmaster
550 case 14777: // West Frostwolf Warmaster
551 case 11946: // Drek'thar
552 return true;
553 default:
554 return false;
555 }
556 }
557
562 };
563
568};
569
574
576{
577 public:
578 spell_gen_bandage() : SpellScriptLoader("spell_gen_bandage") { }
579
581 {
583
584 bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
585 {
586 if (!sSpellMgr->GetSpellInfo(SPELL_RECENTLY_BANDAGED))
587 return false;
588 return true;
589 }
590
592 {
593 if (Unit* target = GetExplTargetUnit())
594 {
595 if (target->HasAura(SPELL_RECENTLY_BANDAGED))
597 }
599 }
600
602 {
603 if (Unit* target = GetHitUnit())
605 }
606
612 };
613
615 {
617 }
618};
619
626
628{
629 public:
630 spell_gen_bonked() : SpellScriptLoader("spell_gen_bonked") { }
631
633 {
635
636 void HandleScript(SpellEffIndex /*effIndex*/)
637 {
638 if (Player* target = GetHitPlayer())
639 {
640 Aura const* aura = GetHitAura();
641 if (!(aura && aura->GetStackAmount() == 3))
642 return;
643
644 target->CastSpell(target, SPELL_FOAM_SWORD_DEFEAT, true);
645 target->RemoveAurasDueToSpell(SPELL_BONKED);
646
647 if (Aura const* aura = target->GetAura(SPELL_ON_GUARD))
648 {
649 if (Item* item = target->GetItemByGuid(aura->GetCastItemGUID()))
650 target->DestroyItemCount(item->GetEntry(), 1, true);
651 }
652 }
653 }
654
659 };
660
662 {
663 return new spell_gen_bonked_SpellScript();
664 }
665};
666
667/* DOCUMENTATION: Break-Shield spells
668 Break-Shield spells can be classified in three groups:
669
670 - Spells on vehicle bar used by players:
671 + EFFECT_0: SCRIPT_EFFECT
672 + EFFECT_1: NONE
673 + EFFECT_2: NONE
674 - Spells casted by players triggered by script:
675 + EFFECT_0: SCHOOL_DAMAGE
676 + EFFECT_1: SCRIPT_EFFECT
677 + EFFECT_2: FORCE_CAST
678 - Spells casted by NPCs on players:
679 + EFFECT_0: SCHOOL_DAMAGE
680 + EFFECT_1: SCRIPT_EFFECT
681 + EFFECT_2: NONE
682
683 In the following script we handle the SCRIPT_EFFECT for effIndex EFFECT_0 and EFFECT_1.
684 - When handling EFFECT_0 we're in the "Spells on vehicle bar used by players" case
685 and we'll trigger "Spells casted by players triggered by script"
686 - When handling EFFECT_1 we're in the "Spells casted by players triggered by script"
687 or "Spells casted by NPCs on players" so we'll search for the first defend layer and drop it.
688*/
689
699
701{
702 public:
703 spell_gen_break_shield(const char* name) : SpellScriptLoader(name) { }
704
706 {
708
709 void HandleScriptEffect(SpellEffIndex effIndex)
710 {
711 Unit* target = GetHitUnit();
712
713 switch (effIndex)
714 {
715 case EFFECT_0: // On spells wich trigger the damaging spell (and also the visual)
716 {
717 uint32 spellId;
718
719 switch (GetSpellInfo()->Id)
720 {
724 break;
727 break;
728 default:
729 return;
730 }
731
732 if (Unit* rider = GetCaster()->GetCharmer())
733 rider->CastSpell(target, spellId, false);
734 else
735 GetCaster()->CastSpell(target, spellId, false);
736 break;
737 }
738 case EFFECT_1: // On damaging spells, for removing a defend layer
739 {
740 Unit::AuraApplicationMap const& auras = target->GetAppliedAuras();
741 for (Unit::AuraApplicationMap::const_iterator itr = auras.begin(); itr != auras.end(); ++itr)
742 {
743 if (Aura* aura = itr->second->GetBase())
744 {
745 SpellInfo const* auraInfo = aura->GetSpellInfo();
746 if (auraInfo && auraInfo->SpellIconID == 2007 && aura->HasEffectType(SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN))
747 {
748 aura->ModStackAmount(-1, AURA_REMOVE_BY_ENEMY_SPELL);
749 // Remove dummys from rider (Necessary for updating visual shields)
750 if (Unit* rider = target->GetCharmer())
751 if (Aura* defend = rider->GetAura(aura->GetId()))
752 defend->ModStackAmount(-1, AURA_REMOVE_BY_ENEMY_SPELL);
753 break;
754 }
755 }
756 }
757 break;
758 }
759 default:
760 break;
761 }
762 }
763
765 {
766 OnEffectHitTarget += SpellEffectFn(spell_gen_break_shield_SpellScript::HandleScriptEffect, EFFECT_FIRST_FOUND, SPELL_EFFECT_SCRIPT_EFFECT);
767 }
768 };
769
774};
775
776// 46394 Brutallus Burn
803
808
810{
811 public:
812 spell_gen_cannibalize() : SpellScriptLoader("spell_gen_cannibalize") { }
813
815 {
817
818 bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
819 {
820 if (!sSpellMgr->GetSpellInfo(SPELL_CANNIBALIZE_TRIGGERED))
821 return false;
822 return true;
823 }
824
826 {
827 Unit* caster = GetCaster();
828 float max_range = GetSpellInfo()->GetMaxRange(false);
829 WorldObject* result = NULL;
830 // search for nearby enemy corpse in range
833 caster->GetMap()->VisitFirstFound(caster->m_positionX, caster->m_positionY, max_range, searcher);
834 if (!result)
837 }
838
839 void HandleDummy(SpellEffIndex /*effIndex*/)
840 {
842 }
843
849 };
850
855};
856
858{
860};
861
863{
864 public:
865 spell_gen_chaos_blast() : SpellScriptLoader("spell_gen_chaos_blast") { }
866
868 {
870
871 bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
872 {
873 if (!sSpellMgr->GetSpellInfo(SPELL_CHAOS_BLAST))
874 return false;
875 return true;
876 }
877 void HandleDummy(SpellEffIndex /* effIndex */)
878 {
879 int32 basepoints0 = 100;
880 Unit* caster = GetCaster();
881 if (Unit* target = GetHitUnit())
882 caster->CastCustomSpell(target, SPELL_CHAOS_BLAST, &basepoints0, NULL, NULL, true);
883 }
884
889 };
890
895};
896
901
937
949
979
981{
982 public:
983 spell_gen_clone_weapon_aura() : SpellScriptLoader("spell_gen_clone_weapon_aura") { }
984
986 {
988
990
991 bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
992 {
993 if (!sSpellMgr->GetSpellInfo(SPELL_COPY_WEAPON_AURA) ||
994 !sSpellMgr->GetSpellInfo(SPELL_COPY_WEAPON_2_AURA) ||
995 !sSpellMgr->GetSpellInfo(SPELL_COPY_WEAPON_3_AURA) ||
996 !sSpellMgr->GetSpellInfo(SPELL_COPY_OFFHAND_AURA) ||
997 !sSpellMgr->GetSpellInfo(SPELL_COPY_OFFHAND_2_AURA) ||
998 !sSpellMgr->GetSpellInfo(SPELL_COPY_RANGED_AURA))
999 return false;
1000 return true;
1001 }
1002
1003 void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
1004 {
1005 Unit* caster = GetCaster();
1006 Unit* target = GetTarget();
1007 if (!caster)
1008 return;
1009
1010 switch (GetSpellInfo()->Id)
1011 {
1015 {
1017
1018 if (Player* player = caster->ToPlayer())
1019 {
1020 if (Item* mainItem = player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_MAINHAND))
1021 target->SetUInt32Value(UNIT_FIELD_VIRTUAL_ITEM_ID, mainItem->GetEntry());
1022 }
1023 else
1025 break;
1026 }
1029 {
1031
1032 if (Player* player = caster->ToPlayer())
1033 {
1034 if (Item* offItem = player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND))
1035 target->SetUInt32Value(UNIT_FIELD_VIRTUAL_ITEM_ID + 1, offItem->GetEntry());
1036 }
1037 else
1039 break;
1040 }
1042 {
1044
1045 if (Player* player = caster->ToPlayer())
1046 {
1047 if (Item* rangedItem = player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_MAINHAND))
1048 target->SetUInt32Value(UNIT_FIELD_VIRTUAL_ITEM_ID + 2, rangedItem->GetEntry());
1049 }
1050 else
1052 break;
1053 }
1054 default:
1055 break;
1056 }
1057 }
1058
1059 void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
1060 {
1061 Unit* target = GetTarget();
1062
1063 switch (GetSpellInfo()->Id)
1064 {
1069 break;
1073 break;
1076 break;
1077 default:
1078 break;
1079 }
1080 }
1081
1087 };
1088
1090 {
1092 }
1093};
1094
1096{
1097 public:
1098 spell_gen_count_pct_from_max_hp(char const* name, int32 damagePct = 0) : SpellScriptLoader(name), _damagePct(damagePct) { }
1099
1123
1128
1129 private:
1131};
1132
1133// 63845 - Create Lance
1139
1141{
1142 public:
1143 spell_gen_create_lance() : SpellScriptLoader("spell_gen_create_lance") { }
1144
1146 {
1148
1149 bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
1150 {
1151 if (!sSpellMgr->GetSpellInfo(SPELL_CREATE_LANCE_ALLIANCE) ||
1152 !sSpellMgr->GetSpellInfo(SPELL_CREATE_LANCE_HORDE))
1153 return false;
1154 return true;
1155 }
1156
1158 {
1159 PreventHitDefaultEffect(effIndex);
1160
1161 if (Player* target = GetHitPlayer())
1162 {
1163 if (target->GetTeam() == ALLIANCE)
1165 else
1167 }
1168 }
1169
1174 };
1175
1180};
1181
1212
1223
1225{
1226 public:
1227 spell_gen_dalaran_disguise(const char* name) : SpellScriptLoader(name) { }
1228
1230 {
1232
1233 bool Validate(SpellInfo const* spellInfo) OVERRIDE
1234 {
1235 switch (spellInfo->Id)
1236 {
1238 if (!sSpellMgr->GetSpellInfo(SPELL_SUNREAVER_DISGUISE_FEMALE) ||
1240 return false;
1241 break;
1245 return false;
1246 break;
1247 }
1248 return true;
1249 }
1250
1251 void HandleScript(SpellEffIndex /*effIndex*/)
1252 {
1253 if (Player* player = GetHitPlayer())
1254 {
1255 uint8 gender = player->getGender();
1256
1257 uint32 spellId = GetSpellInfo()->Id;
1258
1259 switch (spellId)
1260 {
1263 break;
1266 break;
1267 default:
1268 break;
1269 }
1270
1271 GetCaster()->CastSpell(player, spellId, true);
1272 }
1273 }
1274
1279 };
1280
1285};
1286
1293
1295{
1296 public:
1297 spell_gen_defend() : SpellScriptLoader("spell_gen_defend") { }
1298
1300 {
1302
1303 bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
1304 {
1305 if (!sSpellMgr->GetSpellInfo(SPELL_VISUAL_SHIELD_1))
1306 return false;
1307 if (!sSpellMgr->GetSpellInfo(SPELL_VISUAL_SHIELD_2))
1308 return false;
1309 if (!sSpellMgr->GetSpellInfo(SPELL_VISUAL_SHIELD_3))
1310 return false;
1311 return true;
1312 }
1313
1315 {
1316 if (GetCaster())
1317 {
1318 Unit* target = GetTarget();
1319
1320 for (uint8 i = 0; i < GetSpellInfo()->StackAmount; ++i)
1322
1323 target->CastSpell(target, SPELL_VISUAL_SHIELD_1 + GetAura()->GetStackAmount() - 1, true, NULL, aurEff);
1324 }
1325 else
1327 }
1328
1329 void RemoveVisualShields(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
1330 {
1331 for (uint8 i = 0; i < GetSpellInfo()->StackAmount; ++i)
1333 }
1334
1336 {
1337 if (Unit* caster = GetCaster())
1338 if (TempSummon* vehicle = caster->ToTempSummon())
1339 if (Unit* rider = vehicle->GetSummoner())
1340 rider->RemoveAurasDueToSpell(GetId());
1341 }
1342
1365 };
1366
1368 {
1369 return new spell_gen_defend_AuraScript();
1370 }
1371};
1372
1374{
1375 public:
1376 spell_gen_despawn_self() : SpellScriptLoader("spell_gen_despawn_self") { }
1377
1398
1403};
1404
1409
1410// 70769 Divine Storm!
1412{
1413 public:
1414 spell_gen_divine_storm_cd_reset() : SpellScriptLoader("spell_gen_divine_storm_cd_reset") { }
1415
1417 {
1419
1421 {
1423 }
1424
1425 bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
1426 {
1427 if (!sSpellMgr->GetSpellInfo(SPELL_DIVINE_STORM))
1428 return false;
1429 return true;
1430 }
1431
1432 void HandleScript(SpellEffIndex /*effIndex*/)
1433 {
1434 Player* caster = GetCaster()->ToPlayer();
1437 }
1438
1443 };
1444
1449};
1450
1452{
1453 public:
1454 spell_gen_ds_flush_knockback() : SpellScriptLoader("spell_gen_ds_flush_knockback") { }
1455
1457 {
1459
1460 void HandleScript(SpellEffIndex /*effIndex*/)
1461 {
1462 // Here the target is the water spout and determines the position where the player is knocked from
1463 if (Unit* target = GetHitUnit())
1464 {
1465 if (Player* player = GetCaster()->ToPlayer())
1466 {
1467 float horizontalSpeed = 20.0f + (40.0f - GetCaster()->GetDistance(target));
1468 float verticalSpeed = 8.0f;
1469 // This method relies on the Dalaran Sewer map disposition and Water Spout position
1470 // What we do is knock the player from a position exactly behind him and at the end of the pipe
1471 player->KnockbackFrom(target->GetPositionX(), player->GetPositionY(), horizontalSpeed, verticalSpeed);
1472 }
1473 }
1474 }
1475
1480 };
1481
1486};
1487
1493
1495{
1496 public:
1497 spell_gen_dummy_trigger() : SpellScriptLoader("spell_gen_dummy_trigger") { }
1498
1500 {
1502
1503 bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
1504 {
1505 if (!sSpellMgr->GetSpellInfo(SPELL_PERSISTANT_SHIELD_TRIGGERED) ||
1506 !sSpellMgr->GetSpellInfo(SPELL_PERSISTANT_SHIELD))
1507 return false;
1508 return true;
1509 }
1510
1511 void HandleDummy(SpellEffIndex /* effIndex */)
1512 {
1513 int32 damage = GetEffectValue();
1514 Unit* caster = GetCaster();
1515 if (Unit* target = GetHitUnit())
1516 if (SpellInfo const* triggeredByAuraSpell = GetTriggeringSpell())
1517 if (triggeredByAuraSpell->Id == SPELL_PERSISTANT_SHIELD_TRIGGERED)
1518 caster->CastCustomSpell(target, SPELL_PERSISTANT_SHIELD_TRIGGERED, &damage, NULL, NULL, true);
1519 }
1520
1525 };
1526
1531};
1532
1534{
1535 public:
1536 spell_gen_dungeon_credit() : SpellScriptLoader("spell_gen_dungeon_credit") { }
1537
1539 {
1541
1543 {
1544 _handled = false;
1546 }
1547
1549 {
1550 // This hook is executed for every target, make sure we only credit instance once
1551 if (_handled)
1552 return;
1553
1554 _handled = true;
1555 Unit* caster = GetCaster();
1556 if (InstanceScript* instance = caster->GetInstanceScript())
1557 instance->UpdateEncounterState(EncounterCreditType::ENCOUNTER_CREDIT_CAST_SPELL, GetSpellInfo()->Id, caster);
1558 }
1559
1564
1565 private:
1567 };
1568
1573};
1574
1587
1589{
1590 public:
1591 spell_gen_elune_candle() : SpellScriptLoader("spell_gen_elune_candle") { }
1592
1594 {
1596 bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
1597 {
1598 if (!sSpellMgr->GetSpellInfo(SPELL_ELUNE_CANDLE_OMEN_HEAD) ||
1599 !sSpellMgr->GetSpellInfo(SPELL_ELUNE_CANDLE_OMEN_CHEST) ||
1600 !sSpellMgr->GetSpellInfo(SPELL_ELUNE_CANDLE_OMEN_HAND_R) ||
1601 !sSpellMgr->GetSpellInfo(SPELL_ELUNE_CANDLE_OMEN_HAND_L) ||
1602 !sSpellMgr->GetSpellInfo(SPELL_ELUNE_CANDLE_NORMAL))
1603 return false;
1604 return true;
1605 }
1606
1607 void HandleScript(SpellEffIndex /*effIndex*/)
1608 {
1609 uint32 spellId = 0;
1610
1611 if (GetHitUnit()->GetEntry() == NPC_OMEN)
1612 {
1613 switch (std::rand() % 3)
1614 {
1615 case 0:
1617 break;
1618 case 1:
1620 break;
1621 case 2:
1623 break;
1624 case 3:
1626 break;
1627 }
1628 }
1629 else
1630 spellId = SPELL_ELUNE_CANDLE_NORMAL;
1631
1632 GetCaster()->CastSpell(GetHitUnit(), spellId, true, NULL);
1633 }
1634
1639 };
1640
1645};
1646
1652
1653// 131474 - Fishing
1655{
1656 public:
1657 spell_gen_fishing() : SpellScriptLoader("spell_gen_fishing") { }
1658
1660 {
1662
1663 bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
1664 {
1665 return sSpellMgr->GetSpellInfo(SPELL_FISHING_NO_FISHING_POLE)
1666 && sSpellMgr->GetSpellInfo(SPELL_FISHING_WITH_POLE);
1667 }
1668
1670 {
1672 }
1673
1675 {
1676 PreventHitDefaultEffect(effIndex);
1677
1679 if (Item* mainHand = GetCaster()->ToPlayer()->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_MAINHAND))
1680 {
1681 ItemTemplate const* itemTemplate = mainHand->GetTemplate();
1682 if (itemTemplate->Class == ITEM_CLASS_WEAPON && itemTemplate->SubClass == ITEM_SUBCLASS_WEAPON_FISHING_POLE)
1683 spellId = SPELL_FISHING_WITH_POLE;
1684 }
1685
1686 GetCaster()->CastSpell(GetCaster(), spellId, false);
1687 }
1688
1693 };
1694
1696 {
1697 return new spell_gen_fishing_SpellScript();
1698 }
1699};
1700
1707
1709{
1710 public:
1711 spell_gen_gadgetzan_transporter_backfire() : SpellScriptLoader("spell_gen_gadgetzan_transporter_backfire") { }
1712
1714 {
1716
1717 bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
1718 {
1720 !sSpellMgr->GetSpellInfo(SPELL_TRANSPORTER_EVIL_TWIN) ||
1722 return false;
1723 return true;
1724 }
1725
1726 void HandleDummy(SpellEffIndex /* effIndex */)
1727 {
1728 Unit* caster = GetCaster();
1729 int32 r = std::rand() % 119;
1730 if (r < 20) // Transporter Malfunction - 1/6 polymorph
1732 else if (r < 100) // Evil Twin - 4/6 evil twin
1733 caster->CastSpell(caster, SPELL_TRANSPORTER_EVIL_TWIN, true);
1734 else // Transporter Malfunction - 1/6 miss the target
1735 caster->CastSpell(caster, SPELL_TRANSPORTER_MALFUNCTION_MISS, true);
1736 }
1737
1742 };
1743
1748};
1749
1750
1752{
1753 public:
1754 spell_gen_gift_of_naaru() : SpellScriptLoader("spell_gen_gift_of_naaru") { }
1755
1757 {
1759
1760 void CalculateAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/)
1761 {
1762 if (!GetCaster())
1763 return;
1764
1765 float heal = 0.0f;
1766 switch (GetSpellInfo()->SpellFamilyName)
1767 {
1768 case SPELLFAMILY_MAGE:
1770 case SPELLFAMILY_PRIEST:
1771 heal = 1.885f * float(GetCaster()->SpellBaseDamageBonusDone(GetSpellInfo()->GetSchoolMask()));
1772 break;
1774 case SPELLFAMILY_SHAMAN:
1775 heal = std::max(1.885f * float(GetCaster()->SpellBaseDamageBonusDone(GetSpellInfo()->GetSchoolMask())), 1.1f * float(GetCaster()->GetTotalAttackPowerValue(WeaponAttackType::BASE_ATTACK)));
1776 break;
1778 case SPELLFAMILY_HUNTER:
1780 heal = 1.1f * float(std::max(GetCaster()->GetTotalAttackPowerValue(WeaponAttackType::BASE_ATTACK), GetCaster()->GetTotalAttackPowerValue(WeaponAttackType::RANGED_ATTACK)));
1781 break;
1783 default:
1784 break;
1785 }
1786
1787 int32 healTick = floor(heal / aurEff->GetTotalTicks());
1788 amount += int32(std::max(healTick, 0));
1789 }
1790
1795 };
1796
1798 {
1800 }
1801};
1802
1808
1810{
1811 public:
1812 spell_gen_gnomish_transporter() : SpellScriptLoader("spell_gen_gnomish_transporter") { }
1813
1836
1841};
1842
1844{
1845 public:
1846 spell_gen_gunship_portal() : SpellScriptLoader("spell_gen_gunship_portal") { }
1847
1849 {
1851
1853 {
1855 }
1856
1857 void HandleScript(SpellEffIndex /*effIndex*/)
1858 {
1859 Player* caster = GetCaster()->ToPlayer();
1860 if (Battleground* bg = caster->GetBattleground())
1861 if (bg->GetTypeID(true) == BattlegroundTypeId::BATTLEGROUND_IC)
1862 bg->DoAction(1, caster->GetGUID());
1863 }
1864
1869 };
1870
1875};
1876
1877
1882
1883// 32748 - Deadly Throw Interrupt
1884// 44835 - Maim Interrupt
1886{
1887 public:
1888 spell_gen_interrupt() : SpellScriptLoader("spell_gen_interrupt") { }
1889
1891 {
1893
1894 bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
1895 {
1896 if (!sSpellMgr->GetSpellInfo(SPELL_GEN_THROW_INTERRUPT))
1897 return false;
1898 return true;
1899 }
1900
1901 void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
1902 {
1904 GetTarget()->CastSpell(eventInfo.GetProcTarget(), SPELL_GEN_THROW_INTERRUPT, true, NULL, aurEff);
1905 }
1906
1911 };
1912
1914 {
1915 return new spell_gen_interrupt_AuraScript();
1916 }
1917};
1918
1923
1925{
1926 public:
1927 spell_gen_launch() : SpellScriptLoader("spell_gen_launch") { }
1928
1930 {
1932
1933 void HandleScript(SpellEffIndex /*effIndex*/)
1934 {
1935 if (Player* player = GetHitPlayer())
1936 player->AddAura(SPELL_LAUNCH_NO_FALLING_DAMAGE, player); // prevents falling damage
1937 }
1938
1939 void Launch()
1940 {
1941 WorldLocation const* const position = GetExplTargetDest();
1942
1943 if (Player* player = GetHitPlayer())
1944 {
1945 player->ExitVehicle();
1946
1947 // A better research is needed
1948 // There is no spell for this, the following calculation was based on void Spell::CalculateJumpSpeeds
1949
1950 float speedZ = 10.0f;
1951 float dist = position->GetExactDist2d(player->GetPositionX(), player->GetPositionY());
1952 float speedXY = dist;
1953
1954 player->GetMotionMaster()->MoveJump(position->GetPositionX(), position->GetPositionY(), position->GetPositionZ(), speedXY, speedZ);
1955 }
1956 }
1957
1963 };
1964
1966 {
1967 return new spell_gen_launch_SpellScript();
1968 }
1969};
1970
1979
1981{
1982 public:
1983 spell_gen_lifebloom(const char* name, uint32 spellId) : SpellScriptLoader(name), _spellId(spellId) { }
1984
1986 {
1988
1989 public:
1991
1992 bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
1993 {
1994 if (!sSpellMgr->GetSpellInfo(_spellId))
1995 return false;
1996 return true;
1997 }
1998
1999 void AfterRemove(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
2000 {
2001 // Final heal only on duration end
2002 if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_EXPIRE && GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_ENEMY_SPELL)
2003 return;
2004
2005 // final heal
2006 GetTarget()->CastSpell(GetTarget(), _spellId, true, NULL, aurEff, GetCasterGUID());
2007 }
2008
2013
2014 private:
2016 };
2017
2022
2023 private:
2025};
2026
2027/* DOCUMENTATION: Charge spells
2028 Charge spells can be classified in four groups:
2029
2030 - Spells on vehicle bar used by players:
2031 + EFFECT_0: SCRIPT_EFFECT
2032 + EFFECT_1: TRIGGER_SPELL
2033 + EFFECT_2: NONE
2034 - Spells casted by player's mounts triggered by script:
2035 + EFFECT_0: CHARGE
2036 + EFFECT_1: TRIGGER_SPELL
2037 + EFFECT_2: APPLY_AURA
2038 - Spells casted by players on the target triggered by script:
2039 + EFFECT_0: SCHOOL_DAMAGE
2040 + EFFECT_1: SCRIPT_EFFECT
2041 + EFFECT_2: NONE
2042 - Spells casted by NPCs on players:
2043 + EFFECT_0: SCHOOL_DAMAGE
2044 + EFFECT_1: CHARGE
2045 + EFFECT_2: SCRIPT_EFFECT
2046
2047 In the following script we handle the SCRIPT_EFFECT and CHARGE
2048 - When handling SCRIPT_EFFECT:
2049 + EFFECT_0: Corresponds to "Spells on vehicle bar used by players" and we make player's mount cast
2050 the charge effect on the current target ("Spells casted by player's mounts triggered by script").
2051 + EFFECT_1 and EFFECT_2: Triggered when "Spells casted by player's mounts triggered by script" hits target,
2052 corresponding to "Spells casted by players on the target triggered by script" and "Spells casted by
2053 NPCs on players" and we check Defend layers and drop a charge of the first found.
2054 - When handling CHARGE:
2055 + Only launched for "Spells casted by player's mounts triggered by script", makes the player cast the
2056 damaging spell on target with a small chance of failing it.
2057*/
2058
2076
2078{
2079 public:
2080 spell_gen_mounted_charge() : SpellScriptLoader("spell_gen_mounted_charge") { }
2081
2083 {
2085
2087 {
2088 Unit* target = GetHitUnit();
2089
2090 switch (effIndex)
2091 {
2092 case EFFECT_0: // On spells wich trigger the damaging spell (and also the visual)
2093 {
2094 uint32 spellId;
2095
2096 switch (GetSpellInfo()->Id)
2097 {
2100 break;
2103 break;
2104 default:
2105 return;
2106 }
2107
2108 // If target isn't a training dummy there's a chance of failing the charge
2110 spellId = SPELL_CHARGE_MISS_EFFECT;
2111
2112 if (Unit* vehicle = GetCaster()->GetVehicleBase())
2113 vehicle->CastSpell(target, spellId, false);
2114 else
2115 GetCaster()->CastSpell(target, spellId, false);
2116 break;
2117 }
2118 case EFFECT_1: // On damaging spells, for removing a defend layer
2119 case EFFECT_2:
2120 {
2121 Unit::AuraApplicationMap const& auras = target->GetAppliedAuras();
2122 for (Unit::AuraApplicationMap::const_iterator itr = auras.begin(); itr != auras.end(); ++itr)
2123 {
2124 if (Aura* aura = itr->second->GetBase())
2125 {
2126 SpellInfo const* auraInfo = aura->GetSpellInfo();
2127 if (auraInfo && auraInfo->SpellIconID == 2007 && aura->HasEffectType(SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN))
2128 {
2129 aura->ModStackAmount(-1, AURA_REMOVE_BY_ENEMY_SPELL);
2130 // Remove dummys from rider (Necessary for updating visual shields)
2131 if (Unit* rider = target->GetCharmer())
2132 if (Aura* defend = rider->GetAura(aura->GetId()))
2133 defend->ModStackAmount(-1, AURA_REMOVE_BY_ENEMY_SPELL);
2134 break;
2135 }
2136 }
2137 }
2138 break;
2139 }
2140 default:
2141 break;
2142 }
2143 }
2144
2146 {
2147 uint32 spellId;
2148
2149 switch (GetSpellInfo()->Id)
2150 {
2152 spellId = SPELL_CHARGE_DAMAGE_8K5;
2153 break;
2156 spellId = SPELL_CHARGE_DAMAGE_20K;
2157 break;
2160 spellId = SPELL_CHARGE_DAMAGE_45K;
2161 break;
2162 default:
2163 return;
2164 }
2165
2166 if (Unit* rider = GetCaster()->GetCharmer())
2167 rider->CastSpell(GetHitUnit(), spellId, false);
2168 else
2169 GetCaster()->CastSpell(GetHitUnit(), spellId, false);
2170 }
2171
2182 };
2183
2188};
2189
2194
2195// 28702 - Netherbloom
2197{
2198 public:
2199 spell_gen_netherbloom() : SpellScriptLoader("spell_gen_netherbloom") { }
2200
2202 {
2204
2205 bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
2206 {
2207 for (uint8 i = 0; i < 5; ++i)
2208 if (!sSpellMgr->GetSpellInfo(SPELL_NETHERBLOOM_POLLEN_1 + i))
2209 return false;
2210 return true;
2211 }
2212
2214 {
2215 PreventHitDefaultEffect(effIndex);
2216
2217 if (Unit* target = GetHitUnit())
2218 {
2219 // 25% chance of casting a random buff
2220 if (roll_chance_i(75))
2221 return;
2222
2223 // triggered spells are 28703 to 28707
2224 // Note: some sources say, that there was the possibility of
2225 // receiving a debuff. However, this seems to be removed by a patch.
2226
2227 // don't overwrite an existing aura
2228 for (uint8 i = 0; i < 5; ++i)
2229 if (target->HasAura(SPELL_NETHERBLOOM_POLLEN_1 + i))
2230 return;
2231
2232 target->CastSpell(target, SPELL_NETHERBLOOM_POLLEN_1 + (std::rand() % 4), true);
2233 }
2234 }
2235
2240 };
2241
2246};
2247
2252
2253// 28720 - Nightmare Vine
2255{
2256 public:
2257 spell_gen_nightmare_vine() : SpellScriptLoader("spell_gen_nightmare_vine") { }
2258
2260 {
2262
2263 bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
2264 {
2265 if (!sSpellMgr->GetSpellInfo(SPELL_NIGHTMARE_POLLEN))
2266 return false;
2267 return true;
2268 }
2269
2271 {
2272 PreventHitDefaultEffect(effIndex);
2273
2274 if (Unit* target = GetHitUnit())
2275 {
2276 // 25% chance of casting Nightmare Pollen
2277 if (roll_chance_i(25))
2278 target->CastSpell(target, SPELL_NIGHTMARE_POLLEN, true);
2279 }
2280 }
2281
2286 };
2287
2292};
2293
2303
2304// 27539 - Obsidian Armor
2306{
2307 public:
2308 spell_gen_obsidian_armor() : SpellScriptLoader("spell_gen_obsidian_armor") { }
2309
2311 {
2313
2314 bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
2315 {
2316 if (!sSpellMgr->GetSpellInfo(SPELL_GEN_OBSIDIAN_ARMOR_HOLY) ||
2317 !sSpellMgr->GetSpellInfo(SPELL_GEN_OBSIDIAN_ARMOR_FIRE) ||
2319 !sSpellMgr->GetSpellInfo(SPELL_GEN_OBSIDIAN_ARMOR_FROST) ||
2322 return false;
2323 return true;
2324 }
2325
2326 bool CheckProc(ProcEventInfo& eventInfo)
2327 {
2328 if (eventInfo.GetDamageInfo()->GetSpellInfo()) // eventInfo.GetSpellInfo()
2329 return false;
2330
2332 return false;
2333
2334 return true;
2335 }
2336
2337 void OnProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
2338 {
2340
2341 uint32 spellId = 0;
2342 switch (GetFirstSchoolInMask(eventInfo.GetSchoolMask()))
2343 {
2344 case SPELL_SCHOOL_HOLY:
2346 break;
2347 case SPELL_SCHOOL_FIRE:
2349 break;
2352 break;
2353 case SPELL_SCHOOL_FROST:
2355 break;
2358 break;
2361 break;
2362 default:
2363 return;
2364 }
2365 GetTarget()->CastSpell(GetTarget(), spellId, true, NULL, aurEff);
2366 }
2367
2373 };
2374
2379};
2380
2382{
2419};
2420
2437
2475
2477{
2478 public:
2479 spell_gen_on_tournament_mount() : SpellScriptLoader("spell_gen_on_tournament_mount") { }
2480
2482 {
2484
2486
2488 {
2489 _pennantSpellId = 0;
2491 }
2492
2493 void HandleApplyEffect(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
2494 {
2495 if (Unit* caster = GetCaster())
2496 {
2497 if (Unit* vehicle = caster->GetVehicleBase())
2498 {
2499 _pennantSpellId = GetPennatSpellId(caster->ToPlayer(), vehicle);
2500 caster->CastSpell(caster, _pennantSpellId, true);
2501 }
2502 }
2503 }
2504
2505 void HandleRemoveEffect(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
2506 {
2507 if (Unit* caster = GetCaster())
2508 caster->RemoveAurasDueToSpell(_pennantSpellId);
2509 }
2510
2512 {
2513 switch (mount->GetEntry())
2514 {
2517 {
2522 else
2524 }
2526 {
2531 else
2533 }
2535 {
2540 else
2542 }
2545 {
2550 else
2552 }
2554 {
2559 else
2561 }
2562 case NPC_EXODAR_ELEKK:
2563 {
2568 else
2570 }
2571 case NPC_IRONFORGE_RAM:
2572 {
2577 else
2579 }
2581 {
2586 else
2588 }
2589 case NPC_ORGRIMMAR_WOLF:
2590 {
2595 else
2597 }
2599 {
2604 else
2606 }
2608 {
2611 else if (player->HasAchieved(ACHIEVEMENT_ARGENT_VALOR))
2613 else
2615 }
2616 default:
2617 return 0;
2618 }
2619 }
2620
2626 };
2627
2632};
2633
2635{
2636 public:
2637 spell_gen_oracle_wolvar_reputation() : SpellScriptLoader("spell_gen_oracle_wolvar_reputation") { }
2638
2640 {
2642
2644 {
2646 }
2647
2649 {
2650 Player* player = GetCaster()->ToPlayer();
2651 uint32 factionId = GetSpellInfo()->Effects[effIndex].CalcValue();
2652 int32 repChange = GetSpellInfo()->Effects[EFFECT_1].CalcValue();
2653
2654 FactionEntry const* factionEntry = sFactionStore.LookupEntry(factionId);
2655
2656 if (!factionEntry)
2657 return;
2658
2659 // Set rep to baserep + basepoints (expecting spillover for oposite faction -> become hated)
2660 // Not when player already has equal or higher rep with this faction
2661 if (player->GetReputationMgr().GetBaseReputation(factionEntry) < repChange)
2662 player->GetReputationMgr().SetReputation(factionEntry, repChange);
2663
2664 // EFFECT_INDEX_2 most likely update at war state, we already handle this in SetReputation
2665 }
2666
2671 };
2672
2677};
2678
2685
2687{
2688 public:
2689 spell_gen_orc_disguise() : SpellScriptLoader("spell_gen_orc_disguise") { }
2690
2692 {
2694
2695 bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
2696 {
2697 if (!sSpellMgr->GetSpellInfo(SPELL_ORC_DISGUISE_TRIGGER) ||
2698 !sSpellMgr->GetSpellInfo(SPELL_ORC_DISGUISE_MALE) ||
2699 !sSpellMgr->GetSpellInfo(SPELL_ORC_DISGUISE_FEMALE))
2700 return false;
2701 return true;
2702 }
2703
2704 void HandleScript(SpellEffIndex /*effIndex*/)
2705 {
2706 Unit* caster = GetCaster();
2707 if (Player* target = GetHitPlayer())
2708 {
2709 uint8 gender = target->getGender();
2710 if (!gender)
2711 caster->CastSpell(target, SPELL_ORC_DISGUISE_MALE, true);
2712 else
2713 caster->CastSpell(target, SPELL_ORC_DISGUISE_FEMALE, true);
2714 }
2715 }
2716
2721 };
2722
2727};
2728
2734
2735// 45472 Parachute
2737{
2738 public:
2739 spell_gen_parachute() : SpellScriptLoader("spell_gen_parachute") { }
2740
2742 {
2744
2745 bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
2746 {
2747 if (!sSpellMgr->GetSpellInfo(SPELL_PARACHUTE) ||
2748 !sSpellMgr->GetSpellInfo(SPELL_PARACHUTE_BUFF))
2749 return false;
2750 return true;
2751 }
2752
2753 void HandleEffectPeriodic(AuraEffect const* /*aurEff*/)
2754 {
2755 if (Player* target = GetTarget()->ToPlayer())
2756 if (target->IsFalling())
2757 {
2758 target->RemoveAurasDueToSpell(SPELL_PARACHUTE);
2759 target->CastSpell(target, SPELL_PARACHUTE_BUFF, true);
2760 }
2761 }
2762
2767 };
2768
2770 {
2771 return new spell_gen_parachute_AuraScript();
2772 }
2773};
2774
2776{
2778};
2779
2781{
2782 public:
2783 spell_gen_parachute_ic() : SpellScriptLoader("spell_gen_parachute_ic") { }
2784
2786 {
2788
2789 void HandleTriggerSpell(AuraEffect const* /*aurEff*/)
2790 {
2791 if (Player* target = GetTarget()->ToPlayer())
2792 if (target->m_movementInfo.jump.fallTime > 2000)
2793 target->CastSpell(target, SPELL_PARACHUTE_IC, true);
2794 }
2795
2797 {
2798 OnEffectPeriodic += AuraEffectPeriodicFn(spell_gen_parachute_ic_AuraScript::HandleTriggerSpell, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
2799 }
2800 };
2801
2803 {
2805 }
2806};
2807
2809{
2813};
2814
2816{
2817 public:
2818 spell_gen_pet_summoned() : SpellScriptLoader("spell_gen_pet_summoned") { }
2819
2821 {
2823
2825 {
2827 }
2828
2829 void HandleScript(SpellEffIndex /*effIndex*/)
2830 {
2831 Player* player = GetCaster()->ToPlayer();
2832 if (player->GetLastPetNumber())
2833 {
2835 if (Pet* newPet = new Pet(player, newPetType))
2836 {
2837 if (newPet->LoadPetFromDB(player, 0, player->GetLastPetNumber(), true))
2838 {
2839 // revive the pet if it is dead
2840 if (newPet->getDeathState() == DeathState::DEAD)
2841 newPet->setDeathState(DeathState::ALIVE);
2842
2843 newPet->SetFullHealth();
2844 newPet->SetPower(newPet->getPowerType(), newPet->GetMaxPower(newPet->getPowerType()));
2845
2846 switch (newPet->GetEntry())
2847 {
2848 case NPC_DOOMGUARD:
2849 case NPC_INFERNAL:
2850 newPet->SetEntry(NPC_IMP);
2851 break;
2852 default:
2853 break;
2854 }
2855 }
2856 else
2857 delete newPet;
2858 }
2859 }
2860 }
2861
2866 };
2867
2872};
2873
2875{
2876 public:
2877 spell_gen_profession_research() : SpellScriptLoader("spell_gen_profession_research") { }
2878
2880 {
2882
2884 {
2886 }
2887
2898
2899 void HandleScript(SpellEffIndex /*effIndex*/)
2900 {
2901 Player* caster = GetCaster()->ToPlayer();
2902 uint32 spellId = GetSpellInfo()->Id;
2903
2904 // learn random explicit discovery recipe (if any)
2905 if (uint32 discoveredSpellId = GetExplicitDiscoverySpell(spellId, caster))
2906 caster->learnSpell(discoveredSpellId, false);
2907
2908 caster->UpdateCraftSkill(spellId);
2909 }
2910
2916 };
2917
2922};
2923
2925{
2926 public:
2927 spell_gen_remove_flight_auras() : SpellScriptLoader("spell_gen_remove_flight_auras") { }
2928
2947
2952};
2953
2960
2962{
2963 public:
2964 spell_gen_running_wild() : SpellScriptLoader("spell_gen_running_wild") { }
2965
2967 {
2969
2970 bool Validate(SpellInfo const* /*spell*/) OVERRIDE
2971 {
2973 return false;
2975 return false;
2976 return true;
2977 }
2978
2979 void HandleMount(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
2980 {
2981 Unit* target = GetTarget();
2983
2985
2986 // cast speed aura
2987 if (MountCapabilityEntry const* mountCapability = sMountCapabilityStore.LookupEntry(aurEff->GetAmount()))
2988 target->CastSpell(target, mountCapability->SpeedModSpell, TRIGGERED_FULL_MASK);
2989 }
2990
2995 };
2996
2998 {
3000
3001 bool Validate(SpellInfo const* /*spell*/) OVERRIDE
3002 {
3003 if (!sSpellMgr->GetSpellInfo(SPELL_ALTERED_FORM))
3004 return false;
3005 return true;
3006 }
3007
3009 {
3010 // Definitely not a good thing, but currently the only way to do something at cast start
3011 // Should be replaced as soon as possible with a new hook: BeforeCastStart
3013 return false;
3014 }
3015
3017 {
3018 }
3019 };
3020
3022 {
3024 }
3025
3030};
3031
3033{
3034 public:
3035 spell_gen_two_forms() : SpellScriptLoader("spell_gen_two_forms") { }
3036
3038 {
3040
3042 {
3043 if (GetCaster()->IsInCombat())
3044 {
3047 }
3048
3049 // Player cannot transform to human form if he is forced to be worgen for some reason (Darkflight)
3050 if (GetCaster()->GetAuraEffectsByType(SPELL_AURA_WORGEN_ALTERED_FORM).size() > 1)
3051 {
3054 }
3055
3057 }
3058
3060 {
3061 Unit* target = GetHitUnit();
3062 PreventHitDefaultEffect(effIndex);
3065 else // Basepoints 1 for this aura control whether to trigger transform transition animation or not.
3067 }
3068
3074 };
3075
3077 {
3079 }
3080};
3081
3107
3114
3116
3118{
3119 public:
3120 spell_gen_spectator_cheer_trigger() : SpellScriptLoader("spell_gen_spectator_cheer_trigger") { }
3121
3123 {
3125
3126 void HandleDummy(SpellEffIndex /*effIndex*/)
3127 {
3128 GetCaster()->HandleEmoteCommand(EmoteArray[std::rand() % 2]);
3129 }
3130
3132 {
3133 OnEffectHitTarget += SpellEffectFn(spell_gen_spectator_cheer_trigger_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
3134 }
3135 };
3136
3141};
3142
3144{
3145 public:
3146 spell_gen_spirit_healer_res(): SpellScriptLoader("spell_gen_spirit_healer_res") { }
3147
3149 {
3151
3153 {
3155 }
3156
3157 void HandleDummy(SpellEffIndex /* effIndex */)
3158 {
3159 Player* originalCaster = GetOriginalCaster()->ToPlayer();
3160 if (Unit* target = GetHitUnit())
3161 {
3162 ObjectGuid guid = target->GetGUID();
3164
3165 data.WriteBit(guid[6]);
3166 data.WriteBit(guid[5]);
3167 data.WriteBit(guid[7]);
3168 data.WriteBit(guid[1]);
3169 data.WriteBit(guid[4]);
3170 data.WriteBit(guid[2]);
3171 data.WriteBit(guid[3]);
3172 data.WriteBit(guid[0]);
3173
3174 data.WriteByteSeq(guid[0]);
3175 data.WriteByteSeq(guid[4]);
3176 data.WriteByteSeq(guid[2]);
3177 data.WriteByteSeq(guid[3]);
3178 data.WriteByteSeq(guid[7]);
3179 data.WriteByteSeq(guid[6]);
3180 data.WriteByteSeq(guid[5]);
3181 data.WriteByteSeq(guid[1]);
3182
3183 originalCaster->GetSession()->SendPacket(&data);
3184 }
3185 }
3186
3191 };
3192
3197};
3198
3204
3206{
3207 public:
3208 spell_gen_summon_elemental(const char* name, uint32 spellId) : SpellScriptLoader(name), _spellId(spellId) { }
3209
3211 {
3213
3214 public:
3216
3217 bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
3218 {
3219 if (!sSpellMgr->GetSpellInfo(_spellId))
3220 return false;
3221 return true;
3222 }
3223
3224 void AfterApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
3225 {
3226 if (GetCaster())
3227 if (Unit* owner = GetCaster()->GetOwner())
3228 owner->CastSpell(owner, _spellId, true);
3229 }
3230
3231 void AfterRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
3232 {
3233 if (GetCaster())
3234 if (Unit* owner = GetCaster()->GetOwner())
3235 if (owner->GetTypeId() == TypeID::TYPEID_PLAYER)
3236 owner->ToPlayer()->RemovePet(NULL, PET_SAVE_NOT_IN_SLOT, true);
3237 }
3238
3244
3245 private:
3247 };
3248
3253
3254 private:
3256};
3257
3262
3304
3305
3311
3313{
3314 public:
3315 spell_gen_tournament_duel() : SpellScriptLoader("spell_gen_tournament_duel") { }
3316
3318 {
3320
3321 bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
3322 {
3323 if (!sSpellMgr->GetSpellInfo(SPELL_ON_TOURNAMENT_MOUNT) ||
3324 !sSpellMgr->GetSpellInfo(SPELL_MOUNTED_DUEL))
3325 return false;
3326 return true;
3327 }
3328
3330 {
3331 if (Unit* rider = GetCaster()->GetCharmer())
3332 {
3333 if (Player* playerTarget = GetHitPlayer())
3334 {
3335 if (playerTarget->HasAura(SPELL_ON_TOURNAMENT_MOUNT) && playerTarget->GetVehicleBase())
3336 rider->CastSpell(playerTarget, SPELL_MOUNTED_DUEL, true);
3337 }
3338 else if (Unit* unitTarget = GetHitUnit())
3339 {
3340 if (unitTarget->GetCharmer() && unitTarget->GetCharmer()->GetTypeId() == TypeID::TYPEID_PLAYER && unitTarget->GetCharmer()->HasAura(SPELL_ON_TOURNAMENT_MOUNT))
3341 rider->CastSpell(unitTarget->GetCharmer(), SPELL_MOUNTED_DUEL, true);
3342 }
3343 }
3344 }
3345
3350 };
3351
3356};
3357
3359{
3360 public:
3361 spell_gen_tournament_pennant() : SpellScriptLoader("spell_gen_tournament_pennant") { }
3362
3364 {
3366
3368 {
3370 }
3371
3372 void HandleApplyEffect(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
3373 {
3374 if (Unit* caster = GetCaster())
3375 if (!caster->GetVehicleBase())
3376 caster->RemoveAurasDueToSpell(GetId());
3377 }
3378
3383 };
3384
3389};
3390
3391
3392
3398
3400{
3401 public:
3402 spell_pvp_trinket_wotf_shared_cd() : SpellScriptLoader("spell_pvp_trinket_wotf_shared_cd") { }
3403
3405 {
3407
3409 {
3411 }
3412
3413 bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
3414 {
3417 return false;
3418 return true;
3419 }
3420
3422 {
3423 // This is only needed because spells cast from spell_linked_spell are triggered by default
3424 // Spell::SendSpellCooldown() skips all spells with TRIGGERED_IGNORE_SPELL_AND_CATEGORY_CD
3426 }
3427
3432 };
3433
3438};
3439
3444
3446{
3447 public:
3448 spell_gen_turkey_marker() : SpellScriptLoader("spell_gen_turkey_marker") { }
3449
3451 {
3453
3454 void OnApply(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
3455 {
3456 // store stack apply times, so we can pop them while they expire
3457 _applyTimes.push_back(getMSTime());
3458 Unit* target = GetTarget();
3459
3460 // on stack 15 cast the achievement crediting spell
3461 if (GetStackAmount() >= 15)
3462 target->CastSpell(target, SPELL_TURKEY_VENGEANCE, true, NULL, aurEff, GetCasterGUID());
3463 }
3464
3465 void OnPeriodic(AuraEffect const* /*aurEff*/)
3466 {
3467 if (_applyTimes.empty())
3468 return;
3469
3470 // pop stack if it expired for us
3471 if (_applyTimes.front() + GetMaxDuration() < getMSTime())
3473 }
3474
3480
3481 std::list<uint32> _applyTimes;
3482 };
3483
3485 {
3487 }
3488};
3489
3498
3500{
3501 public:
3502 spell_gen_upper_deck_create_foam_sword() : SpellScriptLoader("spell_gen_upper_deck_create_foam_sword") { }
3503
3505 {
3507
3509 {
3510 if (Player* player = GetHitPlayer())
3511 {
3513 // player can only have one of these items
3514 for (uint8 i = 0; i < 5; ++i)
3515 {
3516 if (player->HasItemCount(itemId[i], 1, true))
3517 return;
3518 }
3519
3520 CreateItem(effIndex, itemId[std::rand() % 4]);
3521 }
3522 }
3523
3528 };
3529
3534};
3535
3537{
3539};
3540
3542{
3543 public:
3544 spell_gen_vehicle_scaling() : SpellScriptLoader("spell_gen_vehicle_scaling") { }
3545
3547 {
3549
3551 {
3553 }
3554
3555 void CalculateAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
3556 {
3557 Unit* caster = GetCaster();
3558 float factor;
3559 uint16 baseItemLevel;
3560
3562 switch (GetId())
3563 {
3564 case SPELL_GEAR_SCALING:
3565 factor = 1.0f;
3566 baseItemLevel = 205;
3567 break;
3568 default:
3569 factor = 1.0f;
3570 baseItemLevel = 170;
3571 break;
3572 }
3573
3574 float avgILvl = caster->ToPlayer()->GetAverageItemLevel();
3575 if (avgILvl < baseItemLevel)
3576 return;
3577
3578 amount = uint16((avgILvl - baseItemLevel) * factor);
3579 }
3580
3587 };
3588
3593};
3594
3600
3602{
3603 public:
3604 spell_gen_vendor_bark_trigger() : SpellScriptLoader("spell_gen_vendor_bark_trigger") { }
3605
3607 {
3609
3610 void HandleDummy(SpellEffIndex /* effIndex */)
3611 {
3612 if (Creature* vendor = GetCaster()->ToCreature())
3613 if (vendor->GetEntry() == NPC_AMPHITHEATER_VENDOR)
3614 vendor->AI()->Talk(SAY_AMPHITHEATER_VENDOR);
3615 }
3616
3618 {
3619 OnEffectHitTarget += SpellEffectFn(spell_gen_vendor_bark_trigger_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
3620 }
3621 };
3622
3627};
3628
3656
3661
3695
3697{
3698 public:
3699 spell_gen_override_display_power() : SpellScriptLoader("spell_gen_override_display_power") { }
3700
3702 {
3704
3705 void OnApply(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
3706 {
3707 if (Unit* target = GetTarget())
3708 target->SetUInt32Value(UNIT_FIELD_OVERRIDE_DISPLAY_POWER_ID, aurEff->GetMiscValue());
3709 }
3710
3711 void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
3712 {
3713 if (Unit* target = GetTarget())
3714 target->SetUInt32Value(UNIT_FIELD_OVERRIDE_DISPLAY_POWER_ID, 0);
3715 }
3716
3732 };
3733
3734 AuraScript* GetAuraScript() const override
3735 {
3737 }
3738};
3739
3741{
3755 new spell_gen_bandage();
3756 new spell_gen_bonked();
3757 new spell_gen_break_shield("spell_gen_break_shield");
3758 new spell_gen_break_shield("spell_gen_tournament_counterattack");
3762 new spell_gen_clone();
3765 new spell_gen_count_pct_from_max_hp("spell_gen_default_count_pct_from_max_hp");
3766 new spell_gen_count_pct_from_max_hp("spell_gen_50pct_count_pct_from_max_hp", 50);
3769 new spell_gen_dalaran_disguise("spell_gen_sunreaver_disguise");
3770 new spell_gen_dalaran_disguise("spell_gen_silver_covenant_disguise");
3771 new spell_gen_defend();
3778 new spell_gen_fishing();
3783 new spell_gen_interrupt();
3784 new spell_gen_launch();
3786 new spell_gen_lifebloom("spell_tur_ragepaw_lifebloom", SPELL_TUR_RAGEPAW_LIFEBLOOM_FINAL_HEAL);
3787 new spell_gen_lifebloom("spell_cenarion_scout_lifebloom", SPELL_CENARION_SCOUT_LIFEBLOOM_FINAL_HEAL);
3788 new spell_gen_lifebloom("spell_twisted_visage_lifebloom", SPELL_TWISTED_VISAGE_LIFEBLOOM_FINAL_HEAL);
3789 new spell_gen_lifebloom("spell_faction_champion_dru_lifebloom", SPELL_FACTION_CHAMPIONS_DRU_LIFEBLOOM_FINAL_HEAL);
3796 new spell_gen_parachute();
3801 // Running Wild
3803 new spell_gen_two_forms();
3805 /* */
3808 new spell_gen_summon_elemental("spell_gen_summon_fire_elemental", SPELL_SUMMON_FIRE_ELEMENTAL);
3809 new spell_gen_summon_elemental("spell_gen_summon_earth_elemental", SPELL_SUMMON_EARTH_ELEMENTAL);
3818 new spell_gen_wg_water();
3821}
@ SPELL_PARACHUTE
DBCStorage< FactionEntry > sFactionStore(FactionEntryfmt)
DBCStorage< CreatureDisplayInfoEntry > sCreatureDisplayInfoStore(CreatureDisplayInfofmt)
DBCStorage< MountCapabilityEntry > sMountCapabilityStore(MountCapabilityfmt)
std::int32_t int32
Definition Define.h:73
std::uint8_t uint8
Definition Define.h:79
std::uint32_t uint32
Definition Define.h:77
#define OVERRIDE
Definition Define.h:60
std::uint16_t uint16
Definition Define.h:78
#define SPELL_MOUNTED_DUEL
@ ITEM_SUBCLASS_WEAPON_FISHING_POLE
@ ITEM_CLASS_WEAPON
@ TYPEID_PLAYER
Definition Object.h:55
@ TYPEID_UNIT
Definition Object.h:54
@ TEMPSUMMON_TIMED_DESPAWN
Definition Object.h:70
@ PET_SAVE_NOT_IN_SLOT
Definition PetDefines.h:25
PetType
Definition PetDefines.h:10
@ SUMMON_PET
Definition PetDefines.h:11
@ HUNTER_PET
Definition PetDefines.h:12
@ EQUIPMENT_SLOT_MAINHAND
Definition Player.h:704
@ EQUIPMENT_SLOT_OFFHAND
Definition Player.h:705
#define INVENTORY_SLOT_BAG_0
Definition Player.h:684
#define EFFECT_FIRST_FOUND
SpellEffIndex
@ EFFECT_1
@ EFFECT_0
@ EFFECT_4
@ EFFECT_2
@ SPELL_SCHOOL_SHADOW
@ SPELL_SCHOOL_NORMAL
@ SPELL_SCHOOL_NATURE
@ SPELL_SCHOOL_FROST
@ SPELL_SCHOOL_ARCANE
@ SPELL_SCHOOL_FIRE
@ SPELL_SCHOOL_HOLY
@ SPELL_EFFECT_DUMMY
@ SPELL_EFFECT_SCRIPT_EFFECT
@ SPELL_EFFECT_HEAL
@ SPELL_EFFECT_JUMP_DEST
@ SPELL_EFFECT_ENERGIZE
@ SPELL_EFFECT_CHARGE
@ SPELL_EFFECT_FORCE_CAST
@ SPELL_EFFECT_CREATE_ITEM
@ GENDER_MALE
@ GENDER_FEMALE
SpellSchools GetFirstSchoolInMask(SpellSchoolMask mask)
@ UNIT_DYNFLAG_DEAD
@ CLASS_HUNTER
@ CLASS_DEATH_KNIGHT
@ SPELLFAMILY_PRIEST
@ SPELLFAMILY_WARLOCK
@ SPELLFAMILY_MAGE
@ SPELLFAMILY_GENERIC
@ SPELLFAMILY_WARRIOR
@ SPELLFAMILY_PALADIN
@ SPELLFAMILY_HUNTER
@ SPELLFAMILY_POTION
@ SPELLFAMILY_SHAMAN
@ SPELLFAMILY_DEATHKNIGHT
@ SPELL_CUSTOM_ERROR_NOTHING_TO_DISCOVER
@ SPELL_CUSTOM_ERROR_MUST_HAVE_LANCE_EQUIPPED
@ SPELL_CUSTOM_ERROR_CANT_TRANSFORM
@ ALLIANCE
#define EFFECT_ALL
SpellCastResult
@ SPELL_FAILED_CANT_DO_THAT_RIGHT_NOW
uint32 GetExplicitDiscoverySpell(uint32 spellId, Player *player)
bool HasDiscoveredAllSpells(uint32 spellId, Player *player)
@ SPELL_AURA_PERIODIC_DAMAGE
@ SPELL_AURA_MOD_SHAPESHIFT
@ SPELL_AURA_WORGEN_ALTERED_FORM
@ SPELL_AURA_402
@ SPELL_AURA_PERIODIC_HEAL
@ SPELL_AURA_DUMMY
@ SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN
@ SPELL_AURA_FLY
@ SPELL_AURA_MOD_HEALING_PCT
@ SPELL_AURA_MOD_MANA_REGEN_INTERRUPT
@ SPELL_AURA_MOD_DAMAGE_PERCENT_DONE
@ SPELL_AURA_MOUNTED
@ SPELL_AURA_TRANSFORM
@ SPELL_AURA_PERIODIC_DUMMY
@ SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED
@ SPELL_AURA_PERIODIC_TRIGGER_SPELL
@ SPELL_AURA_MOD_INCREASE_HEALTH_PERCENT
AuraEffectHandleModes
@ AURA_EFFECT_HANDLE_CHANGE_AMOUNT_MASK
@ AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK
@ AURA_EFFECT_HANDLE_REAL
#define sSpellMgr
Definition SpellMgr.h:744
#define SpellCheckCastFn(F)
#define AuraEffectProcFn(F, I, N)
#define SpellEffectFn(F, I, N)
#define AuraEffectCalcAmountFn(F, I, N)
#define AuraEffectPeriodicFn(F, I, N)
#define AuraEffectUpdatePeriodicFn(F, I, N)
#define SpellCastFn(F)
#define AuraEffectAbsorbFn(F, I)
#define SPELL_EFFECT_ANY
Definition SpellScript.h:30
#define AuraEffectApplyFn(F, I, N, M)
#define AuraCheckProcFn(F)
#define SpellHitFn(F)
#define AuraCheckAreaTargetFn(F)
#define AuraEffectRemoveFn(F, I, N, M)
@ TARGET_CHECK_ENEMY
uint32 getMSTime()
Definition Timer.h:12
@ SPELLVALUE_BASE_POINT0
Definition Unit.h:114
@ ALIVE
Definition Unit.h:503
@ AURA_REMOVE_BY_EXPIRE
Definition Unit.h:410
@ AURA_REMOVE_BY_ENEMY_SPELL
Definition Unit.h:409
@ TRIGGERED_FULL_MASK
Will ignore most target checks (mostly DBC target checks).
Definition Unit.h:435
@ REACT_PASSIVE
Definition Unit.h:1156
@ UNIT_FLAG_DISABLE_MOVE
Definition Unit.h:627
@ UNIT_FLAG2_FEIGN_DEATH
Definition Unit.h:663
@ UNIT_FIELD_FLAGS2
@ UNIT_FIELD_VIRTUAL_ITEM_ID
@ UNIT_FIELD_OVERRIDE_DISPLAY_POWER_ID
@ UNIT_FIELD_FLAGS
@ OBJECT_FIELD_DYNAMIC_FLAGS
bool roll_chance_f(float chance)
Definition Util.h:83
bool roll_chance_i(int chance)
Definition Util.h:89
virtual bool Validate(SpellInfo const *)
uint32 m_scriptSpellId
Definition SpellScript.h:95
uint32 GetTickNumber() const
int32 GetTotalTicks() const
void SetAmount(int32 amount)
int32 GetMiscValue() const
Aura * GetBase() const
int32 GetAmount() const
uint64 GetCastItemGUID() const
Definition SpellAuras.h:90
AuraEffect * GetEffect(uint8 effIndex) const
Definition SpellAuras.h:168
uint8 GetStackAmount() const
Definition SpellAuras.h:133
void PreventDefaultAction()
AuraApplication const * GetTargetApplication() const
HookList< EffectApplyHandler > AfterEffectRemove
HookList< EffectPeriodicHandler > OnEffectPeriodic
SpellInfo const * GetSpellInfo() const
WorldObject * GetOwner() const
HookList< EffectApplyHandler > AfterEffectApply
int32 GetMaxDuration() const
HookList< EffectCalcAmountHandler > DoEffectCalcAmount
uint64 GetCasterGUID() const
Unit * GetCaster() const
HookList< EffectUpdatePeriodicHandler > OnEffectUpdatePeriodic
HookList< EffectAbsorbHandler > OnEffectAbsorb
Aura * GetAura() const
HookList< CheckAreaTargetHandler > DoCheckAreaTarget
Unit * GetTarget() const
HookList< CheckProcHandler > DoCheckProc
HookList< EffectApplyHandler > OnEffectRemove
HookList< EffectProcHandler > OnEffectProc
Unit * GetUnitOwner() const
uint8 GetStackAmount() const
HookList< EffectApplyHandler > OnEffectApply
uint32 GetId() const
bool ModStackAmount(int32 num, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
bool WriteBit(uint32 bit)
Definition ByteBuffer.h:164
void WriteByteSeq(uint8 b)
Definition ByteBuffer.h:227
void DespawnOrUnsummon(uint32 msTimeToDespawn=0)
void SetReactState(ReactStates st)
Definition Creature.h:460
SpellInfo const * GetSpellInfo() const
Definition Unit.h:907
uint32 GetDamage() const
Definition Unit.h:923
Definition Item.h:202
void VisitFirstFound(const float &x, const float &y, float radius, NOTIFIER &notifier)
Definition Map.h:715
void MoveJump(Position const &pos, float speedXY, float speedZ, uint32 id=EVENT_JUMP)
uint64 GetGUID() const
Definition Object.h:119
uint32 GetUInt32Value(uint16 index) const
Definition Object.cpp:325
Player * ToPlayer()
Definition Object.h:204
TypeID GetTypeId() const
Definition Object.h:131
void SetFlag(uint16 index, uint32 newFlag)
Definition Object.cpp:1261
uint32 GetEntry() const
Definition Object.h:125
Creature * ToCreature()
Definition Object.h:207
bool HasFlag(uint16 index, uint32 flag) const
Definition Object.cpp:1309
void SetUInt32Value(uint16 index, uint32 value)
Definition Object.cpp:1038
Definition Pet.h:28
bool GetQuestRewardStatus(uint32 quest_id) const
void KilledMonsterCredit(uint32 entry, uint64 guid=0)
bool UpdateCraftSkill(uint32 spellid)
Definition Player.cpp:6162
bool HasSpellCooldown(uint32 spell_id) const
Definition Player.cpp:17498
bool HasAchieved(uint32 achievementId) const
Definition Player.cpp:21013
WorldSession * GetSession() const
Definition Player.h:2417
void AddSpellAndCategoryCooldowns(SpellInfo const *spellInfo, uint32 itemId, Spell *spell=NULL, bool infinityCooldown=false)
Definition Player.cpp:17511
Battleground * GetBattleground() const
Definition Player.cpp:19212
float GetAverageItemLevel()
Definition Player.cpp:22428
uint32 GetLastPetNumber() const
Definition Player.h:2951
void learnSpell(uint32 spell_id, bool dependent)
Definition Player.cpp:4021
void RemoveSpellCooldown(uint32 spell_id, bool update=false)
Definition Player.cpp:4284
ReputationMgr & GetReputationMgr()
Definition Player.h:2555
SpellSchoolMask GetSchoolMask() const
Definition Unit.h:983
DamageInfo * GetDamageInfo() const
Definition Unit.h:985
Unit * GetProcTarget() const
Definition Unit.h:974
int32 GetBaseReputation(FactionEntry const *factionEntry) const
bool SetReputation(FactionEntry const *factionEntry, int32 standing)
uint32 ApplyAuraName
Definition SpellInfo.h:90
int32 CalcValue(Unit const *caster=NULL, int32 const *basePoints=NULL, Unit const *target=NULL) const
SpellEffectInfo Effects[MAX_SPELL_EFFECTS]
Definition SpellInfo.h:255
uint32 StackAmount
Definition SpellInfo.h:211
uint32 Id
Definition SpellInfo.h:160
float GetMaxRange(bool positive=false, Unit *caster=NULL, Spell *spell=NULL) const
uint32 SpellIconID
Definition SpellInfo.h:220
bool HasEffect(SpellEffects effect) const
uint32 SpellFamilyName
Definition SpellInfo.h:226
HookList< CastHandler > AfterCast
Aura * GetHitAura()
Unit * GetExplTargetUnit()
HookList< CheckCastHandler > OnCheckCast
WorldLocation const * GetExplTargetDest()
Player * GetHitPlayer()
HookList< HitHandler > AfterHit
SpellInfo const * GetSpellInfo()
HookList< HitHandler > OnHit
HookList< EffectHandler > OnEffectHit
void PreventHitDefaultEffect(SpellEffIndex effIndex)
Item * GetCastItem()
HookList< EffectHandler > OnEffectHitTarget
Unit * GetHitUnit()
int32 GetEffectValue()
SpellInfo const * GetTriggeringSpell()
Spell * GetSpell()
void SetCustomCastResultMessage(SpellCustomErrors result)
void CreateItem(uint32 effIndex, uint32 itemId)
void SetHitDamage(int32 damage)
HookList< EffectHandler > OnEffectLaunch
Unit * GetOriginalCaster()
Unit * GetCaster()
int32 GetHitDamage()
SpellScriptLoader(const char *name)
Definition Unit.h:1367
void RemoveOwnedAura(AuraMap::iterator &i, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
uint8 getGender() const
Definition Unit.h:1551
void CastSpell(SpellCastTargets const &targets, SpellInfo const *spellInfo, CustomSpellValues const *value, TriggerCastFlags triggerFlags=TRIGGERED_NONE, Item *castItem=NULL, AuraEffect const *triggeredByAura=NULL, uint64 originalCaster=0)
void RemoveAurasDueToSpell(uint32 spellId, uint64 casterGUID=0, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
std::multimap< uint32, AuraApplication * > AuraApplicationMap
Definition Unit.h:1376
Unit * GetCharmer() const
Definition Unit.cpp:2348
Unit * GetVehicleBase() const
Definition Unit.cpp:7203
MotionMaster * GetMotionMaster()
Definition Unit.h:2605
uint8 getClass() const
Definition Unit.h:1543
TempSummon * ToTempSummon()
Definition Unit.h:2821
void Mount(uint32 mount, uint32 vehicleId=0, uint32 creatureEntry=0)
Definition Unit.cpp:3635
bool HasAuraType(AuraType auraType) const
void RemoveAurasByType(AuraType auraType, uint64 casterGUID=0, Aura *except=NULL, bool negative=true, bool positive=true)
virtual void SetDisplayId(uint32 modelId)
Definition Unit.cpp:5941
void CastCustomSpell(Unit *victim, uint32 spellId, int32 const *bp0, int32 const *bp1, int32 const *bp2, bool triggered, Item *castItem=NULL, AuraEffect const *triggeredByAura=NULL, uint64 originalCaster=0)
void RestoreDisplayId()
Definition Unit.cpp:5946
void HandleEmoteCommand(uint32 anim_id)
AuraApplicationMap & GetAppliedAuras()
Definition Unit.h:2204
Map * GetMap() const
Definition Object.h:740
InstanceScript * GetInstanceScript()
Definition Object.cpp:1612
float GetDistance(WorldObject const *obj) const
Definition Object.cpp:1666
void SendPacket(WorldPacket const *packet, bool forced=false)
Send a packet to the client.
void Absorb(AuraEffect *, DamageInfo &, uint32 &absorbAmount)
AuraScript * GetAuraScript() const OVERRIDE
void HandleProc(AuraEffect const *aurEff, ProcEventInfo &eventInfo)
PrepareAuraScript(spell_gen_adaptive_warding_AuraScript)
AuraScript * GetAuraScript() const OVERRIDE
void HandleProc(AuraEffect const *aurEff, ProcEventInfo &eventInfo)
PrepareAuraScript(spell_gen_alchemist_stone_AuraScript)
AuraScript * GetAuraScript() const OVERRIDE
SpellScript * GetSpellScript() const OVERRIDE
void OnApply(AuraEffect const *, AuraEffectHandleModes)
void OnRemove(AuraEffect const *, AuraEffectHandleModes)
PrepareAuraScript(spell_gen_animal_blood_AuraScript)
AuraScript * GetAuraScript() const OVERRIDE
PrepareAuraScript(spell_gen_aura_of_anger_AuraScript)
AuraScript * GetAuraScript() const OVERRIDE
AuraScript * GetAuraScript() const OVERRIDE
AuraScript * GetAuraScript() const OVERRIDE
PrepareSpellScript(spell_gen_bandage_SpellScript)
SpellScript * GetSpellScript() const OVERRIDE
PrepareSpellScript(spell_gen_bonked_SpellScript)
SpellScript * GetSpellScript() const OVERRIDE
PrepareSpellScript(spell_gen_break_shield_SpellScript) void HandleScriptEffect(SpellEffIndex effIndex)
spell_gen_break_shield(const char *name)
SpellScript * GetSpellScript() const OVERRIDE
PrepareAuraScript(spell_gen_burn_brutallus_AuraScript)
AuraScript * GetAuraScript() const OVERRIDE
PrepareSpellScript(spell_gen_cannibalize_SpellScript)
SpellScript * GetSpellScript() const OVERRIDE
PrepareSpellScript(spell_gen_chaos_blast_SpellScript) bool Validate(SpellInfo const *) OVERRIDE
SpellScript * GetSpellScript() const OVERRIDE
PrepareSpellScript(spell_gen_clone_SpellScript)
void HandleScriptEffect(SpellEffIndex effIndex)
PrepareSpellScript(spell_gen_clone_weapon_SpellScript)
void OnRemove(AuraEffect const *, AuraEffectHandleModes)
void OnApply(AuraEffect const *, AuraEffectHandleModes)
AuraScript * GetAuraScript() const OVERRIDE
SpellScript * GetSpellScript() const OVERRIDE
SpellScript * GetSpellScript() const OVERRIDE
PrepareSpellScript(spell_gen_count_pct_from_max_hp_SpellScript) public
SpellScript * GetSpellScript() const OVERRIDE
spell_gen_count_pct_from_max_hp(char const *name, int32 damagePct=0)
PrepareSpellScript(spell_gen_create_lance_SpellScript)
SpellScript * GetSpellScript() const OVERRIDE
AuraScript * GetAuraScript() const OVERRIDE
PrepareSpellScript(spell_gen_dalaran_disguise_SpellScript)
SpellScript * GetSpellScript() const OVERRIDE
spell_gen_dalaran_disguise(const char *name)
PrepareSpellScript(spell_gen_darkflight_SpellScript)
SpellScript * GetSpellScript() const OVERRIDE
bool Validate(SpellInfo const *) OVERRIDE
void RefreshVisualShields(AuraEffect const *aurEff, AuraEffectHandleModes)
PrepareAuraScript(spell_gen_defend_AuraScript)
void RemoveDummyFromDriver(AuraEffect const *, AuraEffectHandleModes)
void RemoveVisualShields(AuraEffect const *, AuraEffectHandleModes)
AuraScript * GetAuraScript() const OVERRIDE
PrepareSpellScript(spell_gen_despawn_self_SpellScript)
SpellScript * GetSpellScript() const OVERRIDE
SpellScript * GetSpellScript() const OVERRIDE
PrepareSpellScript(spell_gen_ds_flush_knockback_SpellScript)
SpellScript * GetSpellScript() const OVERRIDE
PrepareSpellScript(spell_gen_dummy_trigger_SpellScript)
SpellScript * GetSpellScript() const OVERRIDE
PrepareSpellScript(spell_gen_dungeon_credit_SpellScript)
SpellScript * GetSpellScript() const OVERRIDE
PrepareSpellScript(spell_gen_elune_candle_SpellScript)
SpellScript * GetSpellScript() const OVERRIDE
PrepareSpellScript(spell_gen_fishing_SpellScript)
SpellScript * GetSpellScript() const OVERRIDE
PrepareSpellScript(spell_gen_gadgetzan_transporter_backfire_SpellScript) bool Validate(SpellInfo const *) OVERRIDE
SpellScript * GetSpellScript() const OVERRIDE
void CalculateAmount(AuraEffect const *aurEff, int32 &amount, bool &)
PrepareAuraScript(spell_gen_gift_of_naaru_AuraScript)
AuraScript * GetAuraScript() const OVERRIDE
PrepareSpellScript(spell_gen_gnomish_transporter_SpellScript) bool Validate(SpellInfo const *) OVERRIDE
SpellScript * GetSpellScript() const OVERRIDE
PrepareSpellScript(spell_gen_gunship_portal_SpellScript)
SpellScript * GetSpellScript() const OVERRIDE
PrepareAuraScript(spell_gen_interrupt_AuraScript)
void HandleProc(AuraEffect const *aurEff, ProcEventInfo &eventInfo)
AuraScript * GetAuraScript() const OVERRIDE
PrepareSpellScript(spell_gen_launch_SpellScript)
SpellScript * GetSpellScript() const OVERRIDE
PrepareAuraScript(spell_gen_lifebloom_AuraScript)
void AfterRemove(AuraEffect const *aurEff, AuraEffectHandleModes)
spell_gen_lifebloom(const char *name, uint32 spellId)
AuraScript * GetAuraScript() const OVERRIDE
PrepareSpellScript(spell_gen_mounted_charge_SpellScript)
SpellScript * GetSpellScript() const OVERRIDE
PrepareSpellScript(spell_gen_netherbloom_SpellScript)
SpellScript * GetSpellScript() const OVERRIDE
PrepareSpellScript(spell_gen_nightmare_vine_SpellScript)
SpellScript * GetSpellScript() const OVERRIDE
PrepareAuraScript(spell_gen_obsidian_armor_AuraScript)
void OnProc(AuraEffect const *aurEff, ProcEventInfo &eventInfo)
AuraScript * GetAuraScript() const OVERRIDE
void HandleRemoveEffect(AuraEffect const *, AuraEffectHandleModes)
void HandleApplyEffect(AuraEffect const *, AuraEffectHandleModes)
AuraScript * GetAuraScript() const OVERRIDE
SpellScript * GetSpellScript() const OVERRIDE
PrepareSpellScript(spell_gen_orc_disguise_SpellScript)
SpellScript * GetSpellScript() const OVERRIDE
void OnApply(AuraEffect const *aurEff, AuraEffectHandleModes)
AuraScript * GetAuraScript() const override
PrepareAuraScript(spell_gen_parachute_AuraScript)
PrepareAuraScript(spell_gen_parachute_ic_AuraScript) void HandleTriggerSpell(AuraEffect const *)
AuraScript * GetAuraScript() const OVERRIDE
AuraScript * GetAuraScript() const OVERRIDE
PrepareSpellScript(spell_gen_pet_summoned_SpellScript)
SpellScript * GetSpellScript() const OVERRIDE
SpellScript * GetSpellScript() const OVERRIDE
SpellScript * GetSpellScript() const OVERRIDE
PrepareSpellScript(spell_gen_rice_pudding_SpellScript) void HandleScriptEffect(SpellEffIndex)
SpellScript * GetSpellScript() const OVERRIDE
PrepareSpellScript(spell_gen_rock_jump_a_SpellScript) void HandleScriptEffect(SpellEffIndex)
SpellScript * GetSpellScript() const OVERRIDE
PrepareSpellScript(spell_gen_rock_jump_b_SpellScript) void HandleScriptEffect(SpellEffIndex)
SpellScript * GetSpellScript() const OVERRIDE
PrepareSpellScript(spell_gen_rock_jump_c_SpellScript) void HandleScriptEffect(SpellEffIndex)
SpellScript * GetSpellScript() const OVERRIDE
void HandleMount(AuraEffect const *aurEff, AuraEffectHandleModes)
PrepareAuraScript(spell_gen_running_wild_AuraScript)
PrepareSpellScript(spell_gen_running_wild_SpellScript)
SpellScript * GetSpellScript() const OVERRIDE
AuraScript * GetAuraScript() const OVERRIDE
PrepareSpellScript(spell_gen_spectator_cheer_trigger_SpellScript) void HandleDummy(SpellEffIndex)
SpellScript * GetSpellScript() const OVERRIDE
PrepareSpellScript(spell_gen_spirit_healer_res_SpellScript)
SpellScript * GetSpellScript() const OVERRIDE
void AfterApply(AuraEffect const *, AuraEffectHandleModes)
void AfterRemove(AuraEffect const *, AuraEffectHandleModes)
PrepareAuraScript(spell_gen_summon_elemental_AuraScript)
spell_gen_summon_elemental(const char *name, uint32 spellId)
AuraScript * GetAuraScript() const OVERRIDE
PrepareSpellScript(spell_gen_summon_living_air_SpellScript) void HandleDummy(SpellEffIndex)
SpellScript * GetSpellScript() const OVERRIDE
SpellScript * GetSpellScript() const OVERRIDE
PrepareSpellScript(spell_gen_tournament_duel_SpellScript)
SpellScript * GetSpellScript() const OVERRIDE
void HandleApplyEffect(AuraEffect const *, AuraEffectHandleModes)
AuraScript * GetAuraScript() const OVERRIDE
PrepareAuraScript(spell_gen_turkey_marker_AuraScript)
void OnApply(AuraEffect const *aurEff, AuraEffectHandleModes)
AuraScript * GetAuraScript() const OVERRIDE
PrepareSpellScript(spell_gen_two_forms_SpellScript)
SpellScript * GetSpellScript() const OVERRIDE
SpellScript * GetSpellScript() const OVERRIDE
PrepareAuraScript(spell_gen_vehicle_scaling_AuraScript)
void CalculateAmount(AuraEffect const *, int32 &amount, bool &)
AuraScript * GetAuraScript() const OVERRIDE
PrepareSpellScript(spell_gen_vendor_bark_trigger_SpellScript) void HandleDummy(SpellEffIndex)
SpellScript * GetSpellScript() const OVERRIDE
PrepareSpellScript(spell_gen_wg_water_SpellScript)
SpellScript * GetSpellScript() const OVERRIDE
AuraScript * GetAuraScript() const OVERRIDE
SpellScript * GetSpellScript() const OVERRIDE
@ SMSG_SPIRIT_HEALER_CONFIRM
Definition Opcodes.h:990
TournamentQuestsAchievements
@ ACHIEVEMENT_CHAMPION_UNDERCITY
@ QUEST_VALIANT_OF_UNDERCITY
@ ACHIEVEMENT_CHAMPION_THUNDER_BLUFF
@ QUEST_A_VALIANT_OF_STORMWIND
@ QUEST_A_VALIANT_OF_GNOMEREGAN
@ ACHIEVEMENT_CHAMPION_IRONFORGE
@ ACHIEVEMENT_CHAMPION_DARNASSUS
@ QUEST_VALIANT_OF_STORMWIND
@ QUEST_VALIANT_OF_GNOMEREGAN
@ ACHIEVEMENT_CHAMPION_SILVERMOON
@ QUEST_VALIANT_OF_DARNASSUS
@ ACHIEVEMENT_CHAMPION_GNOMEREGAN
@ QUEST_VALIANT_OF_ORGRIMMAR
@ QUEST_VALIANT_OF_THUNDER_BLUFF
@ QUEST_VALIANT_OF_IRONFORGE
@ QUEST_VALIANT_OF_SILVERMOON
@ QUEST_A_VALIANT_OF_SILVERMOON
@ QUEST_VALIANT_OF_SEN_JIN
@ ACHIEVEMENT_CHAMPION_HORDE
@ QUEST_VALIANT_OF_THE_EXODAR
@ ACHIEVEMENT_CHAMPION_STORMWIND
@ QUEST_A_VALIANT_OF_DARNASSUS
@ ACHIEVEMENT_CHAMPION_ALLIANCE
@ ACHIEVEMENT_ARGENT_VALOR
@ QUEST_A_VALIANT_OF_ORGRIMMAR
@ ACHIEVEMENT_CHAMPION_SEN_JIN
@ QUEST_A_VALIANT_OF_UNDERCITY
@ QUEST_A_VALIANT_OF_THUNDER_BLUFF
@ QUEST_A_VALIANT_OF_SEN_JIN
@ QUEST_A_VALIANT_OF_IRONFORGE
@ ACHIEVEMENT_CHAMPION_ORGRIMMAR
@ QUEST_A_VALIANT_OF_THE_EXODAR
@ ACHIEVEMENT_CHAMPION_THE_EXODAR
@ SPELL_GEN_THROW_INTERRUPT
PvPTrinketTriggeredSpells
@ SPELL_WILL_OF_THE_FORSAKEN_COOLDOWN_TRIGGER
@ SPELL_WILL_OF_THE_FORSAKEN_COOLDOWN_TRIGGER_WOTF
@ ITEM_FOAM_SWORD_RED
@ ITEM_FOAM_SWORD_PINK
@ ITEM_FOAM_SWORD_YELLOW
@ ITEM_FOAM_SWORD_GREEN
@ ITEM_FOAM_SWORD_BLUE
TransporterBackfires
@ SPELL_TRANSPORTER_EVIL_TWIN
@ SPELL_TRANSPORTER_MALFUNCTION_MISS
@ SPELL_TRANSPORTER_MALFUNCTION_POLYMORPH
VehicleScaling
@ SPELL_GEAR_SCALING
DalaranDisguiseSpells
@ SPELL_SUNREAVER_DISGUISE_MALE
@ SPELL_SUNREAVER_DISGUISE_TRIGGER
@ SPELL_SILVER_COVENANT_DISGUISE_FEMALE
@ SPELL_SILVER_COVENANT_DISGUISE_MALE
@ SPELL_SUNREAVER_DISGUISE_FEMALE
@ SPELL_SILVER_COVENANT_DISGUISE_TRIGGER
TournamentMounts
@ NPC_ARGENT_WARHORSE
@ NPC_DARNASSIAN_NIGHTSABER
@ NPC_STORMWIND_STEED
@ NPC_IRONFORGE_RAM
@ NPC_SILVERMOON_HAWKSTRIDER
@ NPC_FORSAKEN_WARHORSE
@ NPC_ARGENT_STEED_ASPIRANT
@ NPC_THUNDER_BLUFF_KODO
@ NPC_EXODAR_ELEKK
@ NPC_DARK_SPEAR_RAPTOR
@ NPC_GNOMEREGAN_MECHANOSTRIDER
@ NPC_ARGENT_HAWKSTRIDER_ASPIRANT
@ NPC_ORGRIMMAR_WOLF
FishingSpells
@ SPELL_FISHING_WITH_POLE
@ SPELL_FISHING_NO_FISHING_POLE
ChargeSpells
@ SPELL_CHARGE_CHARGING_EFFECT_8K5
@ SPELL_CHARGE_CHARGING_EFFECT_20K_2
@ SPELL_CHARGE_TRIGGER_FACTION_MOUNTS
@ SPELL_CHARGE_TRIGGER_TRIAL_CHAMPION
@ SPELL_CHARGE_DAMAGE_45K
@ SPELL_CHARGE_MISS_EFFECT
@ SPELL_CHARGE_CHARGING_EFFECT_20K_1
@ SPELL_CHARGE_DAMAGE_8K5
@ SPELL_CHARGE_CHARGING_EFFECT_45K_1
@ SPELL_CHARGE_DAMAGE_20K
@ SPELL_CHARGE_CHARGING_EFFECT_45K_2
ChaosBlast
@ SPELL_CHAOS_BLAST
GenericBandage
@ SPELL_RECENTLY_BANDAGED
WhisperGulchYoggSaronWhisper
@ SPELL_YOGG_SARON_WHISPER_DUMMY
AdaptiveWarding
@ SPELL_GEN_ADAPTIVE_WARDING_ARCANE
@ SPELL_GEN_ADAPTIVE_WARDING_FIRE
@ SPELL_GEN_ADAPTIVE_WARDING_NATURE
@ SPELL_GEN_ADAPTIVE_WARDING_FROST
@ SPELL_GEN_ADAPTIVE_WARDING_SHADOW
SummonElemental
@ SPELL_SUMMON_EARTH_ELEMENTAL
@ SPELL_SUMMON_FIRE_ELEMENTAL
RunningWildMountIds
@ RUNNING_WILD_MODEL_MALE
@ SPELL_ALTERED_FORM
@ RUNNING_WILD_MODEL_FEMALE
OrcDisguiseSpells
@ SPELL_ORC_DISGUISE_FEMALE
@ SPELL_ORC_DISGUISE_MALE
@ SPELL_ORC_DISGUISE_TRIGGER
GnomishTransporter
@ SPELL_TRANSPORTER_FAILURE
@ SPELL_TRANSPORTER_SUCCESS
@ SPELL_NIGHTMARE_FIGMENT_MIRROR_IMAGE
@ SPELL_LAUNCH_NO_FALLING_DAMAGE
ObsidianArmor
@ SPELL_GEN_OBSIDIAN_ARMOR_HOLY
@ SPELL_GEN_OBSIDIAN_ARMOR_FIRE
@ SPELL_GEN_OBSIDIAN_ARMOR_ARCANE
@ SPELL_GEN_OBSIDIAN_ARMOR_FROST
@ SPELL_GEN_OBSIDIAN_ARMOR_SHADOW
@ SPELL_GEN_OBSIDIAN_ARMOR_NATURE
VendorBarkTrigger
@ NPC_AMPHITHEATER_VENDOR
@ SAY_AMPHITHEATER_VENDOR
CloneWeaponSpells
@ SPELL_COPY_OFFHAND_2_AURA
@ SPELL_COPY_WEAPON_3_AURA
@ SPELL_COPY_OFFHAND_AURA
@ SPELL_COPY_WEAPON_AURA
@ SPELL_COPY_WEAPON_2_AURA
@ SPELL_COPY_RANGED_AURA
AlchemistStone
@ ALECHEMIST_STONE_MANA
@ ALECHEMIST_STONE_HEAL
const Position jumpPosD
const Position jumpPosB
TournamentPennantSpells
@ SPELL_PENNANT_EXODAR_ASPIRANT
@ SPELL_PENNANT_IRONFORGE_ASPIRANT
@ SPELL_PENNANT_GNOMEREGAN_ASPIRANT
@ SPELL_PENNANT_EBON_BLADE_CHAMPION
@ SPELL_PENNANT_IRONFORGE_CHAMPION
@ SPELL_PENNANT_ORGRIMMAR_CHAMPION
@ SPELL_PENNANT_THUNDER_BLUFF_CHAMPION
@ SPELL_PENNANT_ORGRIMMAR_VALIANT
@ SPELL_PENNANT_STORMWIND_CHAMPION
@ SPELL_PENNANT_THUNDER_BLUFF_VALIANT
@ SPELL_PENNANT_SEN_JIN_ASPIRANT
@ SPELL_PENNANT_ORGRIMMAR_ASPIRANT
@ SPELL_PENNANT_UNDERCITY_CHAMPION
@ SPELL_PENNANT_GNOMEREGAN_VALIANT
@ SPELL_PENNANT_GNOMEREGAN_CHAMPION
@ SPELL_PENNANT_EBON_BLADE_VALIANT
@ SPELL_PENNANT_IRONFORGE_VALIANT
@ SPELL_PENNANT_STORMWIND_VALIANT
@ SPELL_PENNANT_UNDERCITY_ASPIRANT
@ SPELL_PENNANT_UNDERCITY_VALIANT
@ SPELL_PENNANT_ARGENT_CRUSADE_VALIANT
@ SPELL_PENNANT_STORMWIND_ASPIRANT
@ SPELL_PENNANT_EXODAR_VALIANT
@ SPELL_PENNANT_ARGENT_CRUSADE_CHAMPION
@ SPELL_PENNANT_EBON_BLADE_ASPIRANT
@ SPELL_PENNANT_SILVERMOON_VALIANT
@ SPELL_PENNANT_SILVERMOON_CHAMPION
@ SPELL_PENNANT_SEN_JIN_VALIANT
@ SPELL_PENNANT_ARGENT_CRUSADE_ASPIRANT
@ SPELL_PENNANT_SEN_JIN_CHAMPION
@ SPELL_PENNANT_DARNASSUS_CHAMPION
@ SPELL_PENNANT_THUNDER_BLUFF_ASPIRANT
@ SPELL_PENNANT_DARNASSUS_VALIANT
@ SPELL_PENNANT_DARNASSUS_ASPIRANT
@ SPELL_PENNANT_EXODAR_CHAMPION
@ SPELL_PENNANT_SILVERMOON_ASPIRANT
ServiceUniform
@ SPELL_SERVICE_UNIFORM
@ MODEL_GOBLIN_FEMALE
@ MODEL_GOBLIN_MALE
CreateLanceSpells
@ SPELL_CREATE_LANCE_ALLIANCE
@ SPELL_CREATE_LANCE_HORDE
const Position jumpPosA
uint8 const EmoteArray[3]
Netherbloom
@ SPELL_NETHERBLOOM_POLLEN_1
DummyTrigger
@ SPELL_PERSISTANT_SHIELD_TRIGGERED
@ SPELL_PERSISTANT_SHIELD
DivineStormSpell
@ SPELL_DIVINE_STORM
void AddSC_generic_spell_scripts()
EluneCandle
@ SPELL_ELUNE_CANDLE_OMEN_HAND_R
@ SPELL_ELUNE_CANDLE_NORMAL
@ NPC_OMEN
@ SPELL_ELUNE_CANDLE_OMEN_HEAD
@ SPELL_ELUNE_CANDLE_OMEN_CHEST
@ SPELL_ELUNE_CANDLE_OMEN_HAND_L
FriendOrFowl
@ SPELL_TURKEY_VENGEANCE
PetSummoned
@ NPC_DOOMGUARD
@ NPC_INFERNAL
@ NPC_IMP
GenericLifebloom
@ SPELL_FACTION_CHAMPIONS_DRU_LIFEBLOOM_FINAL_HEAL
@ SPELL_CENARION_SCOUT_LIFEBLOOM_FINAL_HEAL
@ SPELL_TUR_RAGEPAW_LIFEBLOOM_FINAL_HEAL
@ SPELL_HEXLORD_MALACRASS_LIFEBLOOM_FINAL_HEAL
@ SPELL_TWISTED_VISAGE_LIFEBLOOM_FINAL_HEAL
DefendVisuals
@ SPELL_VISUAL_SHIELD_2
@ SPELL_VISUAL_SHIELD_3
@ SPELL_VISUAL_SHIELD_1
TournamentMountsSpells
@ SPELL_LANCE_EQUIPPED
AnimalBloodPoolSpell
@ SPELL_ANIMAL_BLOOD
@ SPELL_SPAWN_BLOOD_POOL
const Position elementalPos
@ SPELL_BONKED
@ SPELL_FOAM_SWORD_DEFEAT
@ SPELL_ON_GUARD
ParachuteSpells
@ SPELL_PARACHUTE
@ SPELL_PARACHUTE_BUFF
CannibalizeSpells
@ SPELL_CANNIBALIZE_TRIGGERED
SpectatorCheerTrigger
@ EMOTE_ONE_SHOT_APPLAUD
@ EMOTE_ONE_SHOT_EXCLAMATION
@ EMOTE_ONE_SHOT_CHEER
NightmareVine
@ SPELL_NIGHTMARE_POLLEN
const Position jumpPosC
BreakShieldSpells
@ SPELL_BREAK_SHIELD_DAMAGE_10K
@ SPELL_BREAK_SHIELD_TRIGGER_FACTION_MOUNTS
@ SPELL_BREAK_SHIELD_TRIGGER_UNK
@ SPELL_BREAK_SHIELD_DAMAGE_2K
@ SPELL_BREAK_SHIELD_TRIGGER_CAMPAING_WARHORSE
MountedDuelSpells
@ SPELL_MOUNTED_DUEL
@ SPELL_ON_TOURNAMENT_MOUNT
ParachuteIC
@ SPELL_PARACHUTE_IC
float GetExactDist2d(const float x, const float y) const
Definition Object.h:366
float m_positionX
Definition Object.h:287
float GetPositionZ() const
Definition Object.h:330
float m_positionY
Definition Object.h:288
float GetPositionX() const
Definition Object.h:328
float GetPositionY() const
Definition Object.h:329
@ SPELL_SUNREAVER_DISGUISE_MALE
@ SPELL_SILVER_COVENANT_DISGUISE_FEMALE
@ SPELL_SILVER_COVENANT_DISGUISE_MALE
@ SPELL_SUNREAVER_DISGUISE_FEMALE
@ NPC_OMEN