Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
spell_mage.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_MAGE and SPELLFAMILY_GENERIC spells used by mage players.
8 * Ordered alphabetically using scriptname.
9 * Scriptnames of files in this file should be prefixed with "spell_mage_".
10 */
11
12#include "Player.h"
13#include "GridNotifiers.h"
14#include "ScriptMgr.h"
15#include "SpellScript.h"
16#include "SpellAuraEffects.h"
17#include "Pet.h"
18
55
64
69
70// Frostjaw - 102051 // 5.4.8
72{
73public:
74 spell_mage_frostjaw() : SpellScriptLoader("spell_mage_frostjaw") { }
75
77 {
79
80 bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
81 {
82 if (!sSpellMgr->GetSpellInfo(SPELL_MAGE_FROSTJAW))
83 return false;
84 return true;
85 }
86
88 {
89 if (Player* player = GetCaster()->ToPlayer())
90 if (Unit* target = GetHitUnit())
91 if (target->GetTypeId() == TypeID::TYPEID_PLAYER)
92 if (Aura* aura = target->GetAura(SPELL_MAGE_FROSTJAW, player->GetGUID()))
93 {
94 aura->SetDuration(aura->GetDuration() / 2);
95 aura->SetMaxDuration(aura->GetMaxDuration() / 2);
96 }
97 }
98
103 };
104
109};
110
111// Pyroblast - 11366 // 5.4.8
113{
114public:
115 spell_mage_pyroblast() : SpellScriptLoader("spell_mage_pyroblast") { }
117 {
119
120 bool Validate(SpellInfo const* /*spellInfo*/) override
121 {
122 if (!sSpellMgr->GetSpellInfo(SPELL_MAGE_PYROBLAST_CLEARCAST))
123 return false;
124 return true;
125 }
127 {
128 Unit* caster = GetCaster();
129
131 {
132 int basedmg = GetHitDamage();
133 int bonusdmg = CalculatePct(basedmg, GetSpellInfo()->Effects[EFFECT_1].CalcValue(GetCaster()));
134 SetHitDamage(basedmg + bonusdmg);
136 }
137 }
142 };
143
144 SpellScript* GetSpellScript() const override
145 {
147 }
148};
149
150// Time Warp - 80353
152{
153public:
154 spell_mage_time_warp() : SpellScriptLoader("spell_mage_time_warp") { }
186 SpellScript* GetSpellScript() const override
187 {
189 }
190};
191
192// 11113 - Blast Wave
194{
195public:
196 spell_mage_blast_wave() : SpellScriptLoader("spell_mage_blast_wave") { }
197
199 {
201
202 bool Validate(SpellInfo const* /*spellInfo*/) override
203 {
204 if (!sSpellMgr->GetSpellInfo(SPELL_MAGE_FLAMESTRIKE))
205 return false;
206 return true;
207 }
208
209 void CountTargets(std::list<WorldObject*>& targetList)
210 {
211 _targetCount = targetList.size();
212 }
213
215 {
216 if (_targetCount >= 2)
218 if (roll_chance_i(aurEff->GetAmount()))
219 {
220 float x, y, z;
221 WorldLocation const* loc = GetExplTargetDest();
222 if (!loc)
223 return;
224
225 loc->GetPosition(x, y, z);
226 GetCaster()->CastSpell(x, y, z, SPELL_MAGE_FLAMESTRIKE, true);
227 }
228 }
229
235
236 private:
238 };
239
240 SpellScript* GetSpellScript() const override
241 {
243 }
244};
245
246// 11958 - Cold Snap // 5.4.8
248{
249public:
250 spell_mage_cold_snap() : SpellScriptLoader("spell_mage_cold_snap") { }
251
253 {
255
256 bool Load() override
257 {
259 }
260
261 void HandleDummy(SpellEffIndex /*effIndex*/)
262 {
263 Player* caster = GetCaster()->ToPlayer();
264 // immediately finishes the cooldown of Frost Nova, Cone of Cold, Ice Block
265 const SpellCooldowns& cm = caster->GetSpellCooldownMap();
266 for (SpellCooldowns::const_iterator itr = cm.begin(); itr != cm.end();)
267 {
268 SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(itr->first);
269
270 if (spellInfo->SpellFamilyName == SPELLFAMILY_MAGE &&
271 (
272 // Frost Nova
273 (spellInfo->SpellIconID == 193 && spellInfo->SpellFamilyFlags[0] == 0x00000040) ||
274 // Cone of Cold
275 (spellInfo->SpellIconID == 35 && spellInfo->SpellFamilyFlags[0] == 0x00000200) ||
276 // Ice Block
277 (spellInfo->SpellIconID == 14 && spellInfo->SpellFamilyFlags[1] == 0x00000080 && spellInfo->SpellFamilyFlags[2] == 0x00000008)
278 ))
279 {
280 caster->RemoveSpellCooldown((itr++)->first, true);
281 }
282 else
283 ++itr;
284 }
285 }
286
291 };
292
293 SpellScript* GetSpellScript() const override
294 {
296 }
297};
298
305
308{
309 { 72, 79, 120056 }, // R5: Item: 43518, Spell: 43988, Object: 186812
310 { 80, 84, 120055 }, // R6: Item: 43523, Spell: 92822, Object: 207386
311 { 85, 89, 120054 }, // R7: Item: 65499, Spell: 92826, Object: 207387
312 { 90, 90, 120053 }, // R8: Item: 80610, Spell: 116136, Object: 211363
313};
314
315// 43987 - Conjure Refreshment Table
317{
318public:
319 spell_mage_conjure_refreshment_table() : SpellScriptLoader("spell_mage_conjure_refreshment_table") { }
320
322 {
324
325 bool Validate(SpellInfo const* /*spellInfo*/) override
326 {
327 for (uint8 i = 0; i < MAX_CONJURE_REFRESHMENT_TABLE_SPELLS; ++i)
328 if (!sSpellMgr->GetSpellInfo(_conjureTableData[i].spellId))
329 return false;
330 return true;
331 }
332
333 bool Load() override
334 {
335 if (GetCaster()->GetTypeId() != TypeID::TYPEID_PLAYER)
336 return false;
337 return true;
338 }
339
340 void HandleDummy(SpellEffIndex /*effIndex*/)
341 {
342 uint8 level = GetHitUnit()->getLevel();
343 for (uint8 i = 0; i < MAX_CONJURE_REFRESHMENT_TABLE_SPELLS; ++i)
344 {
346 if (level < spellData.minLevel || level > spellData.maxLevel)
347 continue;
348 GetHitUnit()->CastSpell(GetHitUnit(), spellData.spellId);
349 break;
350 }
351 }
352
357 };
358
359 SpellScript* GetSpellScript() const override
360 {
362 }
363};
364
365
366// 42955 Conjure Refreshment
374
377{
378 { 33, 43, 92739 },
379 { 44, 53, 92799 },
380 { 54, 63, 92802 },
381 { 64, 73, 92805 },
382 { 74, 79, 74625 },
383 { 80, 84, 42956 },
384 { 85, 89, 92727 },
385 { 90, 90, 116130 },
386};
387
388// 42955 - Conjure Refreshment
390{
391public:
392 spell_mage_conjure_refreshment() : SpellScriptLoader("spell_mage_conjure_refreshment") { }
393
395 {
397
398 bool Validate(SpellInfo const* /*spellInfo*/) override
399 {
400 for (uint8 i = 0; i < MAX_CONJURE_REFRESHMENT_SPELLS; ++i)
401 if (!sSpellMgr->GetSpellInfo(_conjureData[i].spellId))
402 return false;
403 return true;
404 }
405
406 bool Load() override
407 {
408 if (GetCaster()->GetTypeId() != TypeID::TYPEID_PLAYER)
409 return false;
410 return true;
411 }
412
413 void HandleDummy(SpellEffIndex /*effIndex*/)
414 {
415 uint8 level = GetHitUnit()->getLevel();
416 for (uint8 i = 0; i < MAX_CONJURE_REFRESHMENT_SPELLS; ++i)
417 {
418 ConjureRefreshmentData const& spellData = _conjureData[i];
419 if (level < spellData.minLevel || level > spellData.maxLevel)
420 continue;
421 GetHitUnit()->CastSpell(GetHitUnit(), spellData.spellId);
422 break;
423 }
424 }
425
430 };
431
432 SpellScript* GetSpellScript() const override
433 {
435 }
436};
437
438// 56372 - Glyph of Ice Block
440{
441public:
442 spell_mage_glyph_of_ice_block() : SpellScriptLoader("spell_mage_glyph_of_ice_block") { }
443
445 {
447
448 bool Validate(SpellInfo const* /*spellInfo*/) override
449 {
450 if (!sSpellMgr->GetSpellInfo(SPELL_MAGE_FROST_NOVA))
451 return false;
452 return true;
453 }
454
455 bool CheckProc(ProcEventInfo& /*eventInfo*/)
456 {
458 }
459
460 void HandleEffectProc(AuraEffect const* /*aurEff*/, ProcEventInfo& /*eventInfo*/)
461 {
463 // Remove Frost Nova cooldown
465 }
466
472 };
473
474 AuraScript* GetAuraScript() const override
475 {
477 }
478};
479
480// 56375 - Glyph of Polymorph
482{
483public:
484 spell_mage_glyph_of_polymorph() : SpellScriptLoader("spell_mage_glyph_of_polymorph") { }
485
487 {
489
490 bool Validate(SpellInfo const* /*spellInfo*/) override
491 {
492 if (!sSpellMgr->GetSpellInfo(SPELL_PRIEST_SHADOW_WORD_DEATH))
493 return false;
494 return true;
495 }
496
497 void HandleEffectProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
498 {
500 Unit* target = eventInfo.GetProcTarget();
501
502 target->RemoveAurasByType(SPELL_AURA_PERIODIC_DAMAGE, 0, target->GetAura(SPELL_PRIEST_SHADOW_WORD_DEATH)); // SW:D shall not be removed.
505 }
506
511 };
512
513 AuraScript* GetAuraScript() const override
514 {
516 }
517};
518
519// 44457 - Living Bomb
521{
522public:
523 spell_mage_living_bomb() : SpellScriptLoader("spell_mage_living_bomb") { }
524
526 {
528
529 bool Validate(SpellInfo const* spellInfo) override
530 {
531 if (!sSpellMgr->GetSpellInfo(uint32(spellInfo->Effects[EFFECT_1].CalcValue())))
532 return false;
533 return true;
534 }
535
536 void AfterRemove(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
537 {
539 if (removeMode != AURA_REMOVE_BY_ENEMY_SPELL && removeMode != AURA_REMOVE_BY_EXPIRE)
540 return;
541
542 if (Unit* caster = GetCaster())
543 caster->CastSpell(GetTarget(), uint32(aurEff->GetAmount()), true, NULL, aurEff);
544 }
545
550 };
551
552 AuraScript* GetAuraScript() const override
553 {
555 }
556};
557
558// -11119 - Ignite
560{
561public:
562 spell_mage_ignite() : SpellScriptLoader("spell_mage_ignite") { }
563
565 {
567
568 bool Validate(SpellInfo const* /*spellInfo*/) override
569 {
570 if (!sSpellMgr->GetSpellInfo(SPELL_MAGE_IGNITE))
571 return false;
572 return true;
573 }
574
575 bool CheckProc(ProcEventInfo& eventInfo)
576 {
577 return eventInfo.GetProcTarget();
578 }
579
580 void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
581 {
583
584 SpellInfo const* igniteDot = sSpellMgr->GetSpellInfo(SPELL_MAGE_IGNITE);
585 int32 pct = 8 * GetSpellInfo()->GetRank();
586
587 int32 amount = int32(CalculatePct(eventInfo.GetDamageInfo()->GetDamage(), pct) / igniteDot->GetMaxTicks());
589 GetTarget()->CastCustomSpell(SPELL_MAGE_IGNITE, SPELLVALUE_BASE_POINT0, amount, eventInfo.GetProcTarget(), true, NULL, aurEff);
590 }
591
597 };
598
599 AuraScript* GetAuraScript() const override
600 {
601 return new spell_mage_ignite_AuraScript();
602 }
603};
604
605// 86181 - Nether Vortex
607{
608public:
609 spell_mage_nether_vortex() : SpellScriptLoader("spell_mage_nether_vortex") { }
610
612 {
614
615 bool Validate(SpellInfo const* /*spellInfo*/) override
616 {
617 if (!sSpellMgr->GetSpellInfo(SPELL_MAGE_SLOW))
618 return false;
619 return true;
620 }
621
622 bool DoCheck(ProcEventInfo& eventInfo)
623 {
624 if (Aura* aura = eventInfo.GetProcTarget()->GetAura(SPELL_MAGE_SLOW))
625 if (aura->GetCasterGUID() != GetTarget()->GetGUID())
626 return false;
627
628 return true;
629 }
630
631 void HandleEffectProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
632 {
634 GetTarget()->CastSpell(eventInfo.GetProcTarget(), SPELL_MAGE_SLOW, true, NULL, aurEff);
635 }
636
642 };
643
644 AuraScript* GetAuraScript() const override
645 {
647 }
648};
649
654
656// 32826 - Polymorph (Visual)
658{
659public:
660 spell_mage_polymorph_cast_visual() : SpellScriptLoader("spell_mage_polymorph_visual") { }
661
663 {
665
666 static const uint32 PolymorhForms[6];
667
668 bool Validate(SpellInfo const* /*spellInfo*/) override
669 {
670 // check if spell ids exist in dbc
671 for (uint32 i = 0; i < 6; i++)
672 if (!sSpellMgr->GetSpellInfo(PolymorhForms[i]))
673 return false;
674 return true;
675 }
676
677 void HandleDummy(SpellEffIndex /*effIndex*/)
678 {
679 if (Unit* target = GetCaster()->FindNearestCreature(NPC_AUROSALIA, 30.0f))
680 if (target->GetTypeId() == TypeID::TYPEID_UNIT)
681 target->CastSpell(target, PolymorhForms[std::rand() % 5], true);
682 }
683
684 void Register() override
685 {
686 // add dummy effect spell handler to Polymorph visual
688 }
689 };
690
691 SpellScript* GetSpellScript() const override
692 {
694 }
695};
696
706
707// 82676 - Ring of Frost
710{
711public:
712 spell_mage_ring_of_frost() : SpellScriptLoader("spell_mage_ring_of_frost") { }
713
715 {
717
718 bool Validate(SpellInfo const* /*spellInfo*/) override
719 {
720 if (!sSpellMgr->GetSpellInfo(SPELL_MAGE_RING_OF_FROST_SUMMON))
721 return false;
722 if (!sSpellMgr->GetSpellInfo(SPELL_MAGE_RING_OF_FROST_FREEZE))
723 return false;
724 if (!sSpellMgr->GetSpellInfo(SPELL_MAGE_RING_OF_FROST_DUMMY))
725 return false;
726 return true;
727 }
728
729 bool Load() override
730 {
731 ringOfFrost = NULL;
732 return true;
733 }
734
735 void HandleEffectPeriodic(AuraEffect const* /*aurEff*/)
736 {
737 if (ringOfFrost)
738 if (GetMaxDuration() - (int32)ringOfFrost->GetTimer() >= sSpellMgr->GetSpellInfo(SPELL_MAGE_RING_OF_FROST_DUMMY)->GetDuration())
739 GetTarget()->CastSpell(ringOfFrost->GetPositionX(), ringOfFrost->GetPositionY(), ringOfFrost->GetPositionZ(), SPELL_MAGE_RING_OF_FROST_FREEZE, true);
740 }
741
742 void Apply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
743 {
744 std::list<Creature*> MinionList;
745 GetTarget()->GetAllMinionsByEntry(MinionList, GetSpellInfo()->Effects[EFFECT_0].MiscValue);
746
747 // Get the last summoned RoF, save it and despawn older ones
748 for (std::list<Creature*>::iterator itr = MinionList.begin(); itr != MinionList.end(); ++itr)
749 {
750 TempSummon* summon = (*itr)->ToTempSummon();
751
752 if (ringOfFrost && summon)
753 {
754 if (summon->GetTimer() > ringOfFrost->GetTimer())
755 {
756 ringOfFrost->DespawnOrUnsummon();
757 ringOfFrost = summon;
758 }
759 else
760 summon->DespawnOrUnsummon();
761 }
762 else if (summon)
763 ringOfFrost = summon;
764 }
765 }
766
768
774 };
775
776 AuraScript* GetAuraScript() const override
777 {
779 }
780};
781
782// 82691 - Ring of Frost (freeze efect)
785{
786public:
787 spell_mage_ring_of_frost_freeze() : SpellScriptLoader("spell_mage_ring_of_frost_freeze") { }
788
790 {
792
793 bool Validate(SpellInfo const* /*spellInfo*/) override
794 {
795 if (!sSpellMgr->GetSpellInfo(SPELL_MAGE_RING_OF_FROST_SUMMON))
796 return false;
797 if (!sSpellMgr->GetSpellInfo(SPELL_MAGE_RING_OF_FROST_FREEZE))
798 return false;
799 return true;
800 }
801
802 void FilterTargets(std::list<WorldObject*>& targets)
803 {
804 float outRadius = sSpellMgr->GetSpellInfo(SPELL_MAGE_RING_OF_FROST_SUMMON)->Effects[EFFECT_0].CalcRadius();
805 float inRadius = 4.7f;
806
807 for (std::list<WorldObject*>::iterator itr = targets.begin(); itr != targets.end(); ++itr)
808 if (Unit* unit = (*itr)->ToUnit())
809 if (unit->HasAura(SPELL_MAGE_RING_OF_FROST_DUMMY) || unit->HasAura(SPELL_MAGE_RING_OF_FROST_FREEZE) || unit->GetExactDist(GetExplTargetDest()) > outRadius || unit->GetExactDist(GetExplTargetDest()) < inRadius)
810 targets.erase(itr--);
811 }
812
817 };
818
819 SpellScript* GetSpellScript() const override
820 {
822 }
823
825 {
827
828 bool Validate(SpellInfo const* /*spellInfo*/) override
829 {
830 if (!sSpellMgr->GetSpellInfo(SPELL_MAGE_RING_OF_FROST_DUMMY))
831 return false;
832 return true;
833 }
834
835 void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
836 {
837 if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_EXPIRE)
838 if (GetCaster())
840 }
841
846 };
847
848 AuraScript* GetAuraScript() const override
849 {
851 }
852};
853
854// 33395 Water Elemental's Freeze
857{
858public:
859 spell_mage_water_elemental_freeze() : SpellScriptLoader("spell_mage_water_elemental_freeze") { }
860
862 {
864
865 bool Validate(SpellInfo const* /*spellInfo*/) override
866 {
867 if (!sSpellMgr->GetSpellInfo(SPELL_MAGE_FINGERS_OF_FROST))
868 return false;
869 return true;
870 }
871
872 void CountTargets(std::list<WorldObject*>& targetList)
873 {
874 _didHit = !targetList.empty();
875 }
876
878 {
879 if (!_didHit)
880 return;
881
882 Unit* owner = GetCaster()->GetOwner();
883 if (!owner)
884 return;
885
887 {
888 if (roll_chance_i(aurEff->GetAmount()))
890 }
891 }
892
898
899 private:
901 };
902
907};
908
909// 55342 - Mirror Image
911{
912public:
913 spell_mage_mirror_image() : SpellScriptLoader("spell_mage_mirror_image") { }
914
916 {
918
919 bool Validate(SpellInfo const* /*spellInfo*/) override
920 {
923 return false;
924 return true;
925 }
926
927 void HandleDummy(SpellEffIndex /*effIndex*/)
928 {
929 Unit* caster = GetCaster();
930
932
933 if (Player* player = caster->ToPlayer())
934 {
936 {
937 switch (player->GetTalentSpecialization(player->GetActiveSpec()))
938 {
939 case SPEC_MAGE_ARCANE:
941 break;
942 case SPEC_MAGE_FIRE:
944 break;
945 case SPEC_MAGE_FROST:
947 break;
948 }
949 }
950 }
951
952 caster->CastSpell(caster, spellId, true);
953 }
954
959 };
960
961 SpellScript* GetSpellScript() const override
962 {
964 }
965};
966
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
@ TYPEID_PLAYER
Definition Object.h:55
@ TYPEID_UNIT
Definition Object.h:54
std::map< uint32, SpellCooldown > SpellCooldowns
Definition Player.h:305
@ SPEC_MAGE_FIRE
@ SPEC_MAGE_FROST
@ SPEC_MAGE_ARCANE
SpellEffIndex
@ EFFECT_1
@ EFFECT_0
@ EFFECT_2
@ SPELL_EFFECT_DUMMY
@ SPELL_EFFECT_SCHOOL_DAMAGE
@ TARGET_UNIT_DEST_AREA_ENEMY
@ TARGET_UNIT_CASTER_AREA_RAID
@ SPELLFAMILY_MAGE
@ SPELL_AURA_PERIODIC_DAMAGE
@ SPELL_AURA_PERIODIC_DAMAGE_PERCENT
@ SPELL_AURA_DUMMY
@ SPELL_AURA_PERIODIC_LEECH
@ SPELL_AURA_PERIODIC_TRIGGER_SPELL
@ SPELL_AURA_MOD_STUN
AuraEffectHandleModes
@ AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK
@ AURA_EFFECT_HANDLE_REAL
#define sSpellMgr
Definition SpellMgr.h:744
#define AuraEffectProcFn(F, I, N)
#define SpellEffectFn(F, I, N)
#define SpellObjectAreaTargetSelectFn(F, I, N)
#define AuraEffectPeriodicFn(F, I, N)
#define SpellCastFn(F)
#define AuraEffectApplyFn(F, I, N, M)
#define AuraCheckProcFn(F)
#define SpellHitFn(F)
#define AuraEffectRemoveFn(F, I, N, M)
@ SPELLVALUE_AURA_STACK
Definition Unit.h:119
@ SPELLVALUE_BASE_POINT0
Definition Unit.h:114
AuraRemoveMode
Definition Unit.h:405
@ AURA_REMOVE_BY_EXPIRE
Definition Unit.h:410
@ AURA_REMOVE_BY_ENEMY_SPELL
Definition Unit.h:409
bool roll_chance_i(int chance)
Definition Util.h:89
T CalculatePct(T base, U pct)
Definition Util.h:103
AuraRemoveMode GetRemoveMode() const
Definition SpellAuras.h:66
int32 GetAmount() const
void PreventDefaultAction()
AuraApplication const * GetTargetApplication() const
HookList< EffectApplyHandler > AfterEffectRemove
HookList< EffectPeriodicHandler > OnEffectPeriodic
SpellInfo const * GetSpellInfo() const
int32 GetMaxDuration() const
Unit * GetCaster() const
Unit * GetTarget() const
HookList< CheckProcHandler > DoCheckProc
HookList< EffectProcHandler > OnEffectProc
HookList< EffectApplyHandler > OnEffectApply
void DespawnOrUnsummon(uint32 msTimeToDespawn=0)
uint32 GetDamage() const
Definition Unit.h:923
uint64 GetGUID() const
Definition Object.h:119
Player * ToPlayer()
Definition Object.h:204
TypeID GetTypeId() const
Definition Object.h:131
Unit * ToUnit()
Definition Object.h:210
SpellCooldowns const & GetSpellCooldownMap() const
Definition Player.h:2150
void RemoveSpellCooldown(uint32 spell_id, bool update=false)
Definition Player.cpp:4284
DamageInfo * GetDamageInfo() const
Definition Unit.h:985
Unit * GetProcTarget() const
Definition Unit.h:974
Unit * GetActor() const
Definition Unit.h:972
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 GetMaxTicks() const
uint8 GetRank() const
flag128 SpellFamilyFlags
Definition SpellInfo.h:227
uint32 SpellIconID
Definition SpellInfo.h:220
uint32 SpellFamilyName
Definition SpellInfo.h:226
HookList< CastHandler > AfterCast
WorldLocation const * GetExplTargetDest()
HookList< HitHandler > AfterHit
SpellInfo const * GetSpellInfo()
HookList< HitHandler > OnHit
HookList< EffectHandler > OnEffectHit
HookList< EffectHandler > OnEffectHitTarget
Unit * GetHitUnit()
void SetHitDamage(int32 damage)
Unit * GetCaster()
HookList< ObjectAreaTargetSelectHandler > OnObjectAreaTargetSelect
int32 GetHitDamage()
SpellScriptLoader(const char *name)
uint32 GetTimer() const
Definition Unit.h:1367
Unit * GetOwner() const
Definition Unit.cpp:2339
uint32 GetRemainingPeriodicAmount(uint64 caster, uint32 spellId, AuraType auraType, uint8 effectIndex=0) const
Definition Unit.cpp:9031
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)
Aura * GetAura(uint32 spellId, uint64 casterGUID=0, uint64 itemCasterGUID=0, uint32 reqEffMask=0) const
TempSummon * ToTempSummon()
Definition Unit.h:2821
bool HasAura(uint32 spellId, uint64 casterGUID=0, uint64 itemCasterGUID=0, uint32 reqEffMask=0) const
void RemoveAurasByType(AuraType auraType, uint64 casterGUID=0, Aura *except=NULL, bool negative=true, bool positive=true)
AuraEffect * GetAuraEffect(uint32 spellId, uint8 effIndex, uint64 casterGUID=0) const
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)
uint8 getLevel() const
Definition Unit.h:1528
void GetAllMinionsByEntry(std::list< Creature * > &Minions, uint32 entry)
Definition Unit.cpp:2592
PrepareSpellScript(spell_mage_blast_wave_SpellScript)
void CountTargets(std::list< WorldObject * > &targetList)
SpellScript * GetSpellScript() const override
PrepareSpellScript(spell_mage_cold_snap_SpellScript)
SpellScript * GetSpellScript() const override
SpellScript * GetSpellScript() const override
SpellScript * GetSpellScript() const override
PrepareSpellScript(spell_mage_frostjaw_SpellScript)
SpellScript * GetSpellScript() const OVERRIDE
AuraScript * GetAuraScript() const override
void HandleEffectProc(AuraEffect const *, ProcEventInfo &eventInfo)
AuraScript * GetAuraScript() const override
bool Validate(SpellInfo const *) override
void HandleProc(AuraEffect const *aurEff, ProcEventInfo &eventInfo)
PrepareAuraScript(spell_mage_ignite_AuraScript)
bool CheckProc(ProcEventInfo &eventInfo)
AuraScript * GetAuraScript() const override
PrepareAuraScript(spell_mage_living_bomb_AuraScript)
void AfterRemove(AuraEffect const *aurEff, AuraEffectHandleModes)
bool Validate(SpellInfo const *spellInfo) override
AuraScript * GetAuraScript() const override
PrepareSpellScript(spell_mage_mirror_image_SpellScript)
SpellScript * GetSpellScript() const override
PrepareAuraScript(spell_mage_nether_vortex_AuraScript)
void HandleEffectProc(AuraEffect const *aurEff, ProcEventInfo &eventInfo)
AuraScript * GetAuraScript() const override
SpellScript * GetSpellScript() const override
PrepareSpellScript(spell_mage_pyroblast_SpellScript)
SpellScript * GetSpellScript() const override
void Apply(AuraEffect const *, AuraEffectHandleModes)
PrepareAuraScript(spell_mage_ring_of_frost_AuraScript)
SpellScript * GetSpellScript() const override
AuraScript * GetAuraScript() const override
AuraScript * GetAuraScript() const override
PrepareSpellScript(spell_mage_time_warp_SpellScript)
void RemoveInvalidTargets(std::list< WorldObject * > &targets)
SpellScript * GetSpellScript() const override
SpellScript * GetSpellScript() const
ConjureRefreshmentData const _conjureData[MAX_CONJURE_REFRESHMENT_SPELLS]
uint8 const MAX_CONJURE_REFRESHMENT_TABLE_SPELLS
ConjureRefreshmentTableData const _conjureTableData[MAX_CONJURE_REFRESHMENT_TABLE_SPELLS]
MageIcons
@ ICON_MAGE_IMPROVED_FLAMESTRIKE
@ ICON_MAGE_SHATTER
@ ICON_MAGE_IMPROVED_MANA_GEM
@ ICON_MAGE_IMPROVED_FREEZE
@ ICON_MAGE_INCANTER_S_ABSORPTION
MiscSpells
@ SPELL_PRIEST_SHADOW_WORD_DEATH
void AddSC_mage_spell_scripts()
@ SPELL_MAGE_FLAMESTRIKE
@ SPELL_MAGE_FROSTJAW
@ SPELL_MAGE_WORGEN_FORM
@ SPELL_SHAMAN_SATED
@ SPELL_MAGE_RING_OF_FROST_SUMMON
@ SPELL_MAGE_COLD_SNAP
@ SPELL_MAGE_PYROBLAST_CLEARCAST
@ SPELL_MAGE_IGNITE
@ SPELL_MAGE_GIRAFFE_FORM
@ SPELL_MAGE_FINGERS_OF_FROST
@ SPELL_MAGE_TEMPORAL_DISPLACEMENT
@ SPELL_MAGE_SLOW
@ SPELL_MAGE_DRAGONHAWK_FORM
@ SPELL_MAGE_RING_OF_FROST_FREEZE
@ SPELL_HUNTER_INSANITY
@ SPELL_MAGE_SQUIRREL_FORM
@ SPELL_MAGE_SUMMON_IMAGES_FIRE
@ SPELL_MAGE_GLYPH_OF_MIRROR_IMAGE
@ SPELL_MAGE_SERPENT_FORM
@ SPELL_MAGE_SUMMON_IMAGES_ARCANE
@ SPELL_MAGE_FROST_NOVA
@ SPELL_MAGE_SHEEP_FORM
@ SPELL_MAGE_SUMMON_IMAGES_FROST
@ SPELL_MAGE_RING_OF_FROST_DUMMY
uint8 const MAX_CONJURE_REFRESHMENT_SPELLS
SilvermoonPolymorph
@ NPC_AUROSALIA
void GetPosition(float &x, float &y) const
Definition Object.h:333