Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
spell_monk.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_MONK and SPELLFAMILY_GENERIC spells used by monk players.
8 * Scriptnames of files in this file should be prefixed with "spell_monk_".
9 */
10
11#include "Player.h"
12#include "ScriptMgr.h"
13#include "SpellScript.h"
14#include "SpellAuraEffects.h"
15#include "Containers.h"
16#include "Group.h"
17
19{
21
22 SPELL_MONK_ROLL_TRIGGER = 107427, // 5.4.8 18414
23 SPELL_MONK_ITEM_PVP_GLOVES_BONUS = 124489, // 5.4.8 18414
26 SPELL_MONK_DISABLE_ROOT = 116706, // 5.4.8 18414
27 SPELL_MONK_PARALYSIS = 115078, // 5.4.8 18414
28
29 SPELL_MONK_FLYING_SERPENT_KICK = 101545, // 5.4.8 18414
30 SPELL_MONK_FLYING_SERPENT_KICK_AOE = 123586, // 5.4.8 18414
32
33 SPELL_MONK_PROVOKE_AOE = 118635, // 5.4.8 18414
34 SPELL_MONK_PROVOKE_TARGET = 116189, // 5.4.8 18414
35 //
36
72
73
84};
85
86// 5.4.8 18414
87// 122278 - Dampen Harm
89{
90public:
91 spell_monk_dampen_harm() : SpellScriptLoader("spell_monk_dampen_harm")
92 { }
93
95 {
97
99
100 bool Load()
101 {
103 return GetUnitOwner()->ToPlayer();
104 }
105
106 void CalculateAmount(AuraEffect const* /*auraEffect*/, int32& amount, bool& /*canBeRecalculated*/)
107 {
108 amount = -1;
109 }
110
111 void Absorb(AuraEffect* auraEffect, DamageInfo& dmgInfo, uint32& absorbAmount)
112 {
113 Unit* target = GetTarget();
114
115 uint32 health = target->CountPctFromMaxHealth(healthPct);
116
117 if (dmgInfo.GetDamage() < health)
118 return;
119
120 // The next 3 attacks within 45 sec that deal damage equal to 10% or more of your total health are reduced by half
121 absorbAmount = dmgInfo.GetDamage() / 2;
122 auraEffect->GetBase()->DropCharge();
123 }
124
130 };
131
133 {
135 }
136};
137
138// 5.4.8 18414
139// Provoke - 115546
141{
142public:
143 spell_monk_provoke() : SpellScriptLoader("spell_monk_provoke") { }
144
146 {
148
149 bool Validate(SpellInfo const* /*spell*/)
150 {
151 if (!sSpellMgr->GetSpellInfo(SPELL_MONK_PROVOKE_AOE) ||
152 !sSpellMgr->GetSpellInfo(SPELL_MONK_PROVOKE_TARGET))
153 return false;
154 return true;
155 }
156
157 void HandleDummy(SpellEffIndex /*effIndex*/)
158 {
159 if (Unit* caster = GetCaster())
160 {
161 if (Creature* target = GetHitUnit()->ToCreature())
162 {
163 if (target == GetCaster()->FindNearestCreature(MONK_NPC_BLACK_OX_STATUE, 40.0f))
164 caster->CastSpell(target, SPELL_MONK_PROVOKE_AOE, true);
165 else
166 caster->CastSpell(target, SPELL_MONK_PROVOKE_TARGET, true);
167 }
168 }
169 }
170
175 };
176
178 {
180 }
181};
182
183
184// 5.4.8 18414
185// 115057 - Flying Serpent Kick
187{
188public:
189 spell_monk_flying_serpent_kick() : SpellScriptLoader("spell_monk_flying_serpent_kick") { }
190
192 {
194
195 bool Validate(SpellInfo const* /*spell*/)
196 {
197 if (!sSpellMgr->GetSpellInfo(SPELL_MONK_FLYING_SERPENT_KICK) ||
200 return false;
201 return true;
202 }
203
205 {
206 if (Unit* caster = GetCaster())
207 {
208 if (Player* _player = caster->ToPlayer())
209 {
210 if (_player->HasAura(SPELL_MONK_FLYING_SERPENT_KICK))
211 {
212 _player->CastSpell(_player, SPELL_MONK_FLYING_SERPENT_KICK_AOE, true);
213 _player->RemoveAura(SPELL_MONK_FLYING_SERPENT_KICK);
214 }
215
216 if (caster->HasAura(SPELL_MONK_ITEM_PVP_GLOVES_BONUS))
217 caster->RemoveAurasByType(SPELL_AURA_MOD_DECREASE_SPEED);
218 }
219 }
220 }
221
226 };
227
232};
233
234// 5.4.8 18414
235// 122470 - Touch of Karma
237{
238public:
239 spell_monk_touch_of_karma() : SpellScriptLoader("spell_monk_touch_of_karma") { }
240
242 {
244
246
247 bool Validate(SpellInfo const* /*spell*/)
248 {
250 return false;
251 return true;
252 }
253
254 bool Load()
255 {
257 return true;
258 }
259
260 void CalculateAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
261 {
262 if (GetCaster())
263 amount = GetCaster()->GetMaxHealth();
264 }
265
266 void OnAbsorb(AuraEffect* aurEff, DamageInfo& dmgInfo, uint32& absorbAmount)
267 {
268 if (Unit* caster = dmgInfo.GetVictim())
269 {
270 if (Unit* attacker = dmgInfo.GetAttacker())
271 {
272 totalAbsorbAmount += dmgInfo.GetDamage();
273
274 if (attacker->HasAura(aurEff->GetSpellInfo()->Id, caster->GetGUID()))
276 }
277 }
278 }
279
285 };
286
288 {
290 }
291};
292
293// 5.4.8 18414
294// 115078 - Paralysis
296{
297public:
298 spell_monk_paralysis() : SpellScriptLoader("spell_monk_paralysis") { }
299
301 {
303
305 {
306 if (Unit* caster = GetCaster())
307 {
308 if (Unit* target = GetHitUnit())
309 {
310 if (target->isInBack(caster))
311 {
312 if (AuraApplication* aura = target->GetAuraApplication(SPELL_MONK_PARALYSIS))
313 {
314 int32 maxDuration = aura->GetBase()->GetMaxDuration();
315 int32 newDuration = maxDuration * 1.5;
316 aura->GetBase()->SetDuration(newDuration);
317 aura->GetBase()->SetMaxDuration(newDuration);
318 }
319 }
320 }
321 }
322 }
323
328 };
329
331 {
333 }
334};
335
336// 5.4.8 18414
337// 116095 - Disable
339{
340public:
341 spell_monk_disable() : SpellScriptLoader("spell_monk_disable") { }
342
344 {
346
347 bool Validate(SpellInfo const* /*spell*/)
348 {
349 if (!sSpellMgr->GetSpellInfo(SPELL_MONK_DISABLE_ROOT))
350 return false;
351 return true;
352 }
353
354 void OnPeriodic(AuraEffect const* aurEff)
355 {
356 if (aurEff->GetTickNumber() % aurEff->GetTotalTicks() != 0) // last tick of duration
357 return;
358
359 if (Unit* caster = GetCaster())
360 if (Unit* owner = GetUnitOwner())
361 if ((owner->GetDistance2d(caster) < 10.0f) && caster->IsAlive())
362 aurEff->GetBase()->RefreshDuration();
363 }
364
365 void AfterReapply(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
366 {
367 if (Unit* caster = GetCaster())
368 if (Unit* target = GetTarget())
369 caster->CastSpell(target, SPELL_MONK_DISABLE_ROOT, true);
370 }
371
377 };
378
380 {
382 }
383};
384
385// 5.4.8 18414
386// 115921 - Legacy of the Emperor
388{
389public:
390 spell_monk_legacy_of_the_emperor() : SpellScriptLoader("spell_monk_legacy_of_the_emperor") { }
391
393 {
395
396 bool Validate(SpellInfo const* /*spellInfo*/) override
397 {
400 return false;
401 return true;
402 }
403
404 void HandleDummy(SpellEffIndex /*effIndex*/)
405 {
406 if (!GetHitUnit())
407 return;
408
409 if (GetCaster()->IsInRaidWith(GetHitUnit()))
411 else
413 }
414
419 };
420
421 SpellScript* GetSpellScript() const override
422 {
424 }
425};
426
427// 5.4.8 18414
428// Roll - 109132
430{
431public:
432 spell_monk_roll() : SpellScriptLoader("spell_monk_roll") { }
433
435 {
437
438 bool Validate(SpellInfo const* /*spell*/)
439 {
440 if (!sSpellMgr->GetSpellInfo(SPELL_MONK_ROLL_TRIGGER) ||
442 return false;
443 return true;
444 }
445
447 {
449 if (!aur)
450 return;
451
452 AuraApplication* app = aur->GetApplicationOfTarget(GetCaster()->GetGUID());
453 if (!app)
454 return;
455
456 app->ClientUpdate();
457 }
458
460 {
461 Player* caster = GetCaster()->ToPlayer();
462 if (!caster)
463 return;
464
467
468 caster->CastSpell(caster, SPELL_MONK_ROLL_TRIGGER, true);
469 }
470
476 };
477
479 {
480 return new spell_monk_roll_SpellScript();
481 }
482};
483
484
485
486// 117952 - Crackling Jade Lightning
488{
489 public:
490 spell_monk_crackling_jade_lightning() : SpellScriptLoader("spell_monk_crackling_jade_lightning")
491 { }
492
529
530 AuraScript* GetAuraScript() const override
531 {
533 }
534};
535
536// 117959 Crackling - Jade Lightning
538{
539 public:
540 spell_monk_crackling_jade_lightning_aura() : SpellScriptLoader("spell_monk_crackling_jade_lightning_aura")
541 { }
542
544 {
546
547 bool Validate(SpellInfo const* /*spellInfo*/) override
548 {
550 return false;
551 return true;
552 }
553
554 bool CheckProc(ProcEventInfo& /*eventInfo*/)
555 {
557 return false;
558
559 // Just prevention against buggers
560 Spell* currentChanneledSpell = GetTarget()->GetCurrentSpell(CURRENT_CHANNELED_SPELL);
561 if (!currentChanneledSpell || currentChanneledSpell->GetSpellInfo()->Id != SPELL_MONK_CRACKLING_JADE_LIGHTNING_CHANNEL)
562 return false;
563
564 return true;
565 }
566
572
578 };
579
580 AuraScript* GetAuraScript() const override
581 {
583 }
584};
585
587{
588 public:
589 spell_monk_fortifying_brew() : SpellScriptLoader("spell_monk_fortifying_brew")
590 { }
591
593 {
595
596 bool Validate(SpellInfo const* /*spellInfo*/) override
597 {
599 return false;
600 return true;
601 }
602
603 void HandleOnHit(SpellEffIndex /*effIndex*/)
604 {
605 if (Unit* target = GetHitUnit())
606 {
607 int32 bp0 = GetEffectValue();
608 int32 bp1 = -bp0;
609
610 if (Aura* aura = target->GetAura(SPELL_MONK_GLYPH_OF_FORTIFYING_BREW))
611 {
612 bp0 -= aura->GetEffect(EFFECT_1)->GetAmount();
613 bp1 -= aura->GetEffect(EFFECT_0)->GetAmount();
614 }
615
616 bp0 = CalculatePct(target->GetMaxHealth(), bp0);
617 target->CastCustomSpell(target, SPELL_MONK_FORTIFYING_BREW_AURA, &bp0, &bp1, NULL, true);
618 }
619 }
620
625 };
626
627 SpellScript* GetSpellScript() const override
628 {
630 }
631};
632
634{
635 public:
636 spell_monk_breath_of_fire() : SpellScriptLoader("spell_monk_breath_of_fire")
637 { }
638
640 {
642
643 bool Validate(SpellInfo const* /*spellInfo*/) override
644 {
646 return false;
647 return true;
648 }
649
650 void HandleOnHit(SpellEffIndex /*effIndex*/)
651 {
652 if (!GetHitUnit())
653 return;
654
655 if (GetHitUnit()->HasAura(SPELL_MONK_DIZZYING_HAZE))
656 {
660 }
661 }
662
667 };
668
669 SpellScript* GetSpellScript() const override
670 {
672 }
673};
674
675
676
678{
679 public:
680 spell_monk_expel_harm() : SpellScriptLoader("spell_monk_expel_harm")
681 { }
682
684 {
686
687 bool Validate(SpellInfo const* /*spellInfo*/) override
688 {
689 if (!sSpellMgr->GetSpellInfo(SPELL_MONK_EXPEL_HARM_AREA_DMG))
690 return false;
691 return true;
692 }
693
695 {
696 if (!GetHitUnit())
697 return;
698
699 int32 dmg = GetHitHeal() / 2;
700 if (dmg > 0)
702 }
703
708 };
709
710 SpellScript* GetSpellScript() const override
711 {
713 }
714};
715
717{
718 public:
719 spell_monk_touch_of_death() : SpellScriptLoader("spell_monk_touch_of_death") { }
720
722 {
724
726 {
727 if (Unit* caster = GetCaster())
728 {
729 if (Unit* target = GetExplTargetUnit())
730 {
731 if (target->ToPlayer())
732 {
733 if (caster->HasAura(SPELL_MONK_TOUCH_OF_DEATH_PLAYER))
734 {
735 if (target->HealthAbovePct(GetSpellInfo()->Effects [EFFECT_1].BasePoints))
737 }
738 else
740 }
741 else
742 {
743 if (target->GetHealth() > caster->GetHealth())
745 }
746 }
747 }
749 }
750
755 };
756
757 SpellScript* GetSpellScript() const override
758 {
760 }
761};
762
763
764
765
766
767
768/*
769// Spinning Crane Kick - 107270
770class spell_monk_spinning_crane_kick : public SpellScriptLoader
771{
772 public:
773 spell_monk_spinning_crane_kick() : SpellScriptLoader("spell_monk_spinning_crane_kick")
774 { }
775
776 class spell_monk_spinning_crane_kick_SpellScript : public SpellScript
777 {
778 PrepareSpellScript(spell_monk_spinning_crane_kick_SpellScript);
779
780 bool Validate(SpellInfo const* spell)
781 {
782 if (!sSpellMgr->GetSpellInfo(SPELL_MONK_SPINNING_CRANE_KICK))
783 return false;
784 return true;
785 }
786
787 void HandleOnCast()
788 {
789 if (Unit* caster = GetCaster())
790 {
791 std::list<Unit*> targets;
792 Skyfire::AnyUnfriendlyUnitInObjectRangeCheck u_check(caster, caster, 8.0f);
793 Skyfire::UnitListSearcher<Skyfire::AnyUnfriendlyUnitInObjectRangeCheck> searcher(caster, targets, u_check);
794 caster->VisitNearbyObject(8.0f, searcher);
795 if (targets.size() >= 3)
796 caster->CastSpell(caster, SPELL_MONK_SPINNING_CRANE_KICK_ENERGIZE, true);
797 }
798 }
799
800 void Register()
801 {
802 OnCast += SpellCastFn(spell_monk_spinning_crane_kick_SpellScript::HandleOnCast);
803 }
804 };
805
806 SpellScript* GetSpellScript() const
807 {
808 return new spell_monk_spinning_crane_kick_SpellScript();
809 }
810};
811*/
812// Brewing: Tigereye Brew - 123980
814{
815 public:
816 spell_monk_brewing_tigereye_brew() : SpellScriptLoader("spell_monk_brewing_tigereye_brew")
817 { }
818
820 {
822
823 bool Validate(SpellInfo const* /*spell*/)
824 {
826 return false;
827 return true;
828 }
829
831
833 {
834 chiConsumed = 0;
835 }
836
837 void SetData(uint32 type, uint32 data)
838 {
839 if (Unit* caster = GetCaster())
840 {
841 chiConsumed += data;
842 if (chiConsumed >= 4)
843 {
844 caster->CastSpell(caster, SPELL_MONK_TIGEREYE_BREW_BUFF, true);
845 chiConsumed -= 4;
846 }
847 }
848 }
849
854 };
855
856
861};
862
863#define maxStack 10
864
865// Tigereye Brew - 116740
867{
868 public:
869 spell_monk_tigereye_brew() : SpellScriptLoader("spell_monk_tigereye_brew")
870 { }
871
873 {
875
876 bool Validate(SpellInfo const* /*spell*/)
877 {
878 if (!sSpellMgr->GetSpellInfo(SPELL_MONK_TIGEREYE_BREW))
879 return false;
880 return true;
881 }
882
883 void CalculateAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/)
884 {
885 if (Unit* caster = GetCaster())
886 {
887 if (Aura* aur = caster->GetAura(SPELL_MONK_TIGEREYE_BREW_BUFF))
888 {
889 uint16 stack = aur->GetStackAmount();
890
891 // Max bonus = 60%
892 if (stack > maxStack)
893 amount *= maxStack;
894 else
895 amount *= stack;
896 }
897 }
898 }
899
905 };
906
907
909 {
911 }
912
914 {
916
918 {
919 if (Unit* caster = GetCaster())
920 {
921 if (Aura* aur = caster->GetAura(SPELL_MONK_TIGEREYE_BREW_BUFF))
922 {
923 uint16 stack = aur->GetStackAmount();
924 // Removes at most 10 stacks
925 if (stack > maxStack)
926 {
927 // One of the stacks is already removed automatically
928 aur->SetStackAmount(stack - maxStack + 1);
929 }
930 else
931 caster->RemoveAura(SPELL_MONK_TIGEREYE_BREW_BUFF);
932 }
933 }
934 }
935
940 };
941
946};
947
948// Tiger Strikes - 120273
950{
951 public:
952 spell_monk_tiger_strikes() : SpellScriptLoader("spell_monk_tiger_strikes")
953 { }
954
956 {
958
959 bool Validate(SpellInfo const* /*spell*/)
960 {
961 if (!sSpellMgr->GetSpellInfo(SPELL_MONK_TIGER_STRIKES))
962 return false;
963 return true;
964 }
965
966 void HandleProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
967 {
968 if (Unit* caster = GetCaster())
969 if (Unit* target = eventInfo.GetDamageInfo()->GetVictim())
970 caster->CastSpell(target, 120274, true);
971 }
972
977 };
978
979
981 {
983 }
984};
985
986// Zen Pilgrimage - 126892
988{
989public:
990 spell_monk_zen_pilgrimage() : SpellScriptLoader("spell_monk_zen_pilgrimage")
991 { }
992
994 {
996
997 bool Validate(SpellInfo const* /*spell*/)
998 {
999 if (!sSpellMgr->GetSpellInfo(SPELL_MONK_ZEN_PILGRIMAGE))
1000 return false;
1001 return true;
1002 }
1003
1004 void HandleDummy(SpellEffIndex /*effIndex*/)
1005 {
1006 if (Unit* caster = GetCaster())
1007 if (Player* player = caster->ToPlayer())
1008 player->SaveRecallPosition();
1009 }
1010
1015 };
1016
1018 {
1020 }
1021};
1022
1023// Zen Pilgrimage: Return - 126895
1025{
1026public:
1027 spell_monk_zen_pilgrimage_return() : SpellScriptLoader("spell_monk_zen_pilgrimage_return")
1028 { }
1029
1031 {
1033
1034 bool Validate(SpellInfo const* /*spell*/)
1035 {
1036 if (!sSpellMgr->GetSpellInfo(SPELL_MONK_ZEN_PILGRIMAGE_RETURN))
1037 return false;
1038 return true;
1039 }
1040
1041 void HandleDummy(SpellEffIndex /*effIndex*/)
1042 {
1043 if (Unit* caster = GetCaster())
1044 if (Player* player = caster->ToPlayer())
1045 player->TeleportTo(player->m_recallMap, player->m_recallX, player->m_recallY, player->m_recallZ, player->m_recallO);
1046 }
1047
1052 };
1053
1058};
1059
1064
1065// Enveloping Mist - 124682
1067{
1068 public:
1069 spell_monk_enveloping_mist() : SpellScriptLoader("spell_monk_enveloping_mist")
1070 { }
1071
1073 {
1075
1077 {
1078 if (Player* _player = GetCaster()->ToPlayer())
1079 if (Unit* target = GetExplTargetUnit())
1080 _player->CastSpell(target, SPELL_MONK_ENVELOPING_MIST_HEAL, true);
1081 }
1082
1087 };
1088
1090 {
1092 }
1093};
1094
1099
1100// Surging Mist - 116694
1102{
1103 public:
1104 spell_monk_surging_mist() : SpellScriptLoader("spell_monk_surging_mist")
1105 { }
1106
1108 {
1110
1112 {
1113 if (Player* _player = GetCaster()->ToPlayer())
1114 if (Unit* target = GetExplTargetUnit())
1115 _player->CastSpell(target, SPELL_MONK_SURGING_MIST_HEAL, true);
1116 }
1117
1122 };
1123
1125 {
1127 }
1128};
1129
1137
1143
1150
1151/*
1152// Renewing Mist - 119611
1153class spell_monk_renewing_mist : public SpellScriptLoader
1154{
1155 public:
1156 spell_monk_renewing_mist() : SpellScriptLoader("spell_monk_renewing_mist")
1157 { }
1158
1159 class spell_monk_renewing_mist_SpellScript : public SpellScript
1160 {
1161 PrepareSpellScript(spell_monk_renewing_mist_SpellScript);
1162
1163 void HandleOnHit()
1164 {
1165 if (Player* _player = GetCaster()->ToPlayer())
1166 {
1167 std::list<Unit*> playerList;
1168 std::list<Creature*> tempList;
1169 std::list<Creature*> statueList;
1170 Creature* statue;
1171
1172 _player->GetPartyMembers(playerList);
1173
1174 if (playerList.size() > 1)
1175 {
1176 playerList.sort(Skyfire::HealthPctOrderPred());
1177 playerList.resize(1);
1178 }
1179
1180 _player->GetCreatureListWithEntryInGrid(tempList, CREATURE_SERPENT_ID, 100.0f);
1181 _player->GetCreatureListWithEntryInGrid(statueList, CREATURE_SERPENT_ID, 100.0f);
1182
1183 // Remove other players jade statue
1184 for (std::list<Creature*>::iterator i = tempList.begin(); i != tempList.end(); ++i)
1185 {
1186 Unit* owner = (*i)->GetOwner();
1187 if (owner && owner == _player && (*i)->IsSummon())
1188 continue;
1189
1190 statueList.remove((*i));
1191 }
1192
1193 for (auto itr : playerList)
1194 {
1195 if (statueList.size() == 1)
1196 {
1197 for (auto itrBis : statueList)
1198 statue = itrBis;
1199
1200 if (statue && (statue->IsPet() || statue->IsGuardian()))
1201 {
1202 if (statue->GetOwner() && statue->GetOwner()->GetGUID() == _player->GetGUID())
1203 {
1204 _player->AddAura(SPELL_MONK_RENEWING_MIST_HOT, itr);
1205 _player->CastSpell(itr, SPELL_MONK_RENEWING_MIST_JUMP_AURA, true);
1206 }
1207 }
1208 }
1209 }
1210 }
1211 }
1212
1213 void Register()
1214 {
1215 OnHit += SpellHitFn(spell_monk_renewing_mist_SpellScript::HandleOnHit);
1216 }
1217 };
1218
1219 SpellScript* GetSpellScript() const
1220 {
1221 return new spell_monk_renewing_mist_SpellScript();
1222 }
1223
1224 class spell_monk_renewing_mist_AuraScript : public AuraScript
1225 {
1226 PrepareAuraScript(spell_monk_renewing_mist_AuraScript);
1227
1228 uint32 update;
1229 uint8 spreadCount;
1230
1231 bool Validate(SpellInfo const* /*spell)
1232 {
1233 update = 0;
1234 spreadCount = 1;
1235
1236 if (!sSpellMgr->GetSpellInfo(119611))
1237 return false;
1238 return true;
1239 }
1240
1241 void OnUpdate(uint32 diff, AuraEffect* aurEff)
1242 {
1243 update += diff;
1244
1245 if (update >= 2500)
1246 {
1247 if (GetCaster())
1248 if (Player* _player = GetCaster()->ToPlayer())
1249 _player->CastSpell(_player, SPELL_MONK_UPLIFT_ALLOWING_CAST, true);
1250
1251 update = 0;
1252 }
1253 }
1254
1255 void OnTick(AuraEffect const* aurEff)
1256 {
1257 if (Unit* caster = GetCaster())
1258 {
1259 if (Player* _player = caster->ToPlayer())
1260 {
1261 Player* target = GetTarget()->ToPlayer();
1262 Unit* newTarget;
1263
1264 if (!target)
1265 return;
1266
1267 if (target->HasAura(SPELL_MONK_RENEWING_MIST_JUMP_AURA, _player->GetGUID()))
1268 {
1269 if (_player->HasAura(SPELL_MONK_GLYPH_OF_RENEWING_MIST))
1270 newTarget = target->GetNextRandomRaidMemberOrPet(40.0f);
1271 else
1272 newTarget = target->GetNextRandomRaidMemberOrPet(20.0f);
1273
1274 if (!newTarget)
1275 return;
1276
1277 if (Aura* renewingMistJump = target->GetAura(SPELL_MONK_RENEWING_MIST_JUMP_AURA, _player->GetGUID()))
1278 {
1279 if (renewingMistJump->GetCharges() > 1)
1280 {
1281 renewingMistJump->DropCharge();
1282
1283 // Spreads Renewing Mists 3 times maximum
1284 if (Aura* renewingMistHot = target->GetAura(SPELL_MONK_RENEWING_MIST_HOT, _player->GetGUID()))
1285 _player->AddAura(SPELL_MONK_RENEWING_MIST_HOT, newTarget);
1286 }
1287 else
1288 {
1289 target->RemoveAura(SPELL_MONK_RENEWING_MIST_JUMP_AURA, _player->GetGUID());
1290
1291 // Spreads Renewing Mists 3 times maximum
1292 if (Aura* renewingMistHot = target->GetAura(SPELL_MONK_RENEWING_MIST_HOT, _player->GetGUID()))
1293 _player->AddAura(SPELL_MONK_RENEWING_MIST_HOT, newTarget);
1294 }
1295 }
1296 }
1297 }
1298 }
1299 }
1300
1301 void HandleRemove(AuraEffect const* /*aurEff, AuraEffectHandleModes mode)
1302 {
1303 if (GetCaster())
1304 {
1305 if (Aura* uplift = GetCaster()->GetAura(SPELL_MONK_UPLIFT_ALLOWING_CAST, GetCaster()->GetGUID()))
1306 GetCaster()->RemoveAura(SPELL_MONK_UPLIFT_ALLOWING_CAST, GetCaster()->GetGUID());
1307
1308 if (GetCaster()->HasAura(SPELL_MONK_ITEM_2_S12_MISTWEAVER))
1309 {
1310 AuraRemoveMode removeMode = GetTargetApplication()->GetRemoveMode();
1311 if (removeMode == AURA_REMOVE_BY_EXPIRE)
1312 {
1313 GetCaster()->CastSpell(GetCaster(), SPELL_MONK_MANA_TEA_STACKS, true);
1314 GetCaster()->CastSpell(GetCaster(), SPELL_MONK_PLUS_ONE_MANA_TEA, true);
1315 }
1316 }
1317 }
1318 }
1319
1320 void Register() OVERRIDE
1321 {
1322 OnEffectPeriodic += AuraEffectPeriodicFn(spell_monk_renewing_mist_AuraScript::OnTick, EFFECT_0, SPELL_AURA_PERIODIC_HEAL);
1323 OnEffectUpdatePeriodic += AuraEffectUpdatePeriodicFn(spell_monk_renewing_mist_AuraScript::Update, EFFECT_0, SPELL_AURA_PERIODIC_HEAL);
1324 OnEffectRemove += AuraEffectApplyFn(spell_monk_renewing_mist_AuraScript::HandleRemove, EFFECT_0, SPELL_AURA_PERIODIC_HEAL, AURA_EFFECT_HANDLE_REAL);
1325 }
1326 };
1327
1328 AuraScript* GetAuraScript() const OVERRIDE
1329 {
1330 return new spell_monk_renewing_mist_AuraScript();
1331 }
1332};
1333
1334// Healing Sphere 115460
1335class spell_monk_healing_sphere : public SpellScriptLoader
1336{
1337 public:
1338 spell_monk_healing_sphere() : SpellScriptLoader("spell_monk_healing_sphere")
1339 { }
1340
1341 class spell_monk_healing_sphere_SpellScript : public SpellScript
1342 {
1343 PrepareSpellScript(spell_monk_healing_sphere_SpellScript);
1344
1345 void Sphere(SpellEffIndex /*eff)
1346 {
1347 int32 count = GetCaster()->CountAreaTrigger(SPELL_MONK_HEALING_SPHERE);
1348 if (count >= 3)
1349 {
1350 std::list<AreaTrigger*> sphereList;
1351 GetCaster()->GetAreaTriggerList(sphereList, SPELL_MONK_HEALING_SPHERE);
1352 if (!sphereList.empty())
1353 {
1354 sphereList.sort(Skyfire::AreaTriggerDurationPctOrderPred());
1355 for (auto itr : sphereList)
1356 {
1357 AreaTrigger* sphere = itr;
1358 sphere->SetDuration(0);
1359 break;
1360 }
1361 }
1362 }
1363 }
1364
1365 void Register()
1366 {
1367 OnEffectHit += SpellEffectFn(spell_monk_healing_sphere_SpellScript::Sphere, EFFECT_0, SPELL_EFFECT_CREATE_AREATRIGGER);
1368 }
1369 };
1370
1371 SpellScript* GetSpellScript() const
1372 {
1373 return new spell_monk_healing_sphere_SpellScript();
1374 }
1375};
1376*/
1377/*######
1378## npc_transcendence_spirit -- 54569
1379######*/
1380/*
1381enum TranscendenceSpiritSpells
1382{
1383 SPELL_SPAWN_TRANS = 102141,
1384 SPELL_INITIALIZE_IMAGES = 102284,
1385 SPELL_CLONE_CASTER = 119051,
1386 SPELL_VISUAL_SPIRIT = 119053,
1387 SPELL_MEDITATE = 124416,
1388 SPELL_ROOT_FOR_EVER = 31366
1389};
1390
1391enum transcendenceActions
1392{
1393 ACTION_TELEPORT = 1
1394};
1395
1396class npc_transcendence_spirit : public CreatureScript
1397{
1398 public:
1399 npc_transcendence_spirit() : CreatureScript("npc_transcendence_spirit")
1400 { }
1401
1402 struct npc_transcendence_spiritAI : public ScriptedAI
1403 {
1404 npc_transcendence_spiritAI(Creature* c) : ScriptedAI(c)
1405 {
1406 me->SetReactState(REACT_PASSIVE);
1407 }
1408
1409 void JustDied(Unit* who) override
1410 {
1411 if (me->GetOwner() && me->GetOwner()->GetTypeId() == TYPEID_PLAYER)
1412 me->GetOwner()->ToPlayer()->SetTransSpirit(NULL);
1413 }
1414
1415 void EnterCombat(Unit* /*who*) override
1416 { }
1417 void AttackStart(Unit* /*who*) override
1418 { }
1419
1420 void Reset() override
1421 {
1422 if (!me->HasAura(SPELL_MEDITATE))
1423 me->AddAura(SPELL_MEDITATE, me);
1424 }
1425
1426 void CorpseRemoved(uint32& /*respawnDelay*) override
1427 {
1428 if (me->GetOwner() && me->GetOwner()->GetTypeId() == TYPEID_PLAYER)
1429 me->GetOwner()->ToPlayer()->SetTransSpirit(NULL);
1430 }
1431
1432 void IsSummonedBy(Unit* owner) override
1433 {
1434 if (owner && owner->GetTypeId() == TYPEID_PLAYER)
1435 {
1436 owner->ToPlayer()->SetTransSpirit(me);
1437 }
1438 else
1439 me->DespawnOrUnsummon();
1440 }
1441 };
1442
1443 CreatureAI* GetAI(Creature *creature) const
1444 {
1445 return new npc_transcendence_spiritAI(creature);
1446 }
1447};
1448
1449// 102141 - Transcendence
1450class spell_monk_transcendence : public SpellScriptLoader
1451{
1452 public:
1453 spell_monk_transcendence() : SpellScriptLoader("spell_monk_transcendence")
1454 { }
1455
1456 class spell_monk_transcendence_SpellScript : public SpellScript
1457 {
1458 PrepareSpellScript(spell_monk_transcendence_SpellScript);
1459
1460 void Despawn()
1461 {
1462 if (Player* player = GetCaster()->ToPlayer())
1463 if (Creature* spirit = player->GetTransSpirit())
1464 spirit->DespawnOrUnsummon();
1465 }
1466
1467 void Visualize()
1468 {
1469 if (Player* player = GetCaster()->ToPlayer())
1470 {
1471 if (Creature* spirit = player->GetTransSpirit())
1472 {
1473 player->CastSpell(spirit, SPELL_CLONE_CASTER);
1474 spirit->AddAura(SPELL_VISUAL_SPIRIT, spirit);
1475 spirit->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
1476 spirit->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_ATTACKABLE_1);
1477 spirit->CastSpell(spirit, SPELL_MEDITATE);
1478 spirit->AddAura(SPELL_ROOT_FOR_EVER, spirit);
1479 }
1480 }
1481 }
1482
1483 void Register()
1484 {
1485 BeforeCast += SpellCastFn(spell_monk_transcendence_SpellScript::Despawn);
1486 AfterCast += SpellCastFn(spell_monk_transcendence_SpellScript::Visualize);
1487 }
1488 };
1489
1490 SpellScript* GetSpellScript() const
1491 {
1492 return new spell_monk_transcendence_SpellScript();
1493 }
1494};
1495
1496// 119996 - Transcendence Transfer
1497class spell_monk_transcendence_transfer : public SpellScriptLoader
1498{
1499 public:
1500 spell_monk_transcendence_transfer() : SpellScriptLoader("spell_monk_transcendence_transfer")
1501 { }
1502
1503 class spell_monk_transcendence_transfer_SpellScript : public SpellScript
1504 {
1505 PrepareSpellScript(spell_monk_transcendence_transfer_SpellScript);
1506
1507 SpellCastResult CheckCast()
1508 {
1509 if (GetCaster() && GetCaster()->ToPlayer())
1510 {
1511 Player* player = GetCaster()->ToPlayer();
1512 if (Creature* spirit = player->GetTransSpirit())
1513 {
1514 float distance = 40.0f;
1515
1516 if (player->GetExactDist2d(spirit->GetPositionX(), spirit->GetPositionY()) <= distance)
1517 return SPELL_CAST_OK;
1518 else if (player->GetExactDist2d(spirit->GetPositionX(), spirit->GetPositionY()) >= distance)
1519 return SPELL_FAILED_OUT_OF_RANGE;
1520 }
1521 else
1522 return SPELL_FAILED_NO_PET;
1523 }
1524
1525 return SPELL_FAILED_DONT_REPORT;
1526 }
1527
1528 void Cast()
1529 {
1530 if (GetCaster() && GetCaster()->ToPlayer())
1531 {
1532 Player* player = GetCaster()->ToPlayer();
1533
1534 if (Creature* spirit = player->GetTransSpirit())
1535 {
1536 float distance = 40.0f;
1537 if (player->GetExactDist2d(spirit->GetPositionX(), spirit->GetPositionY()) <= distance)
1538 {
1539 float petX, petY, petZ;
1540 uint32 petMapId;
1541 spirit->GetPosition(petX, petY, petZ);
1542 petMapId = spirit->GetMapId();
1543
1544 spirit->DespawnOrUnsummon();
1545 player->TeleportTo(petMapId, petX, petY, petZ, 0.0f);
1546 player->CastSpell(player, SPELL_SPAWN_TRANS);
1547 }
1548 }
1549 }
1550 }
1551
1552 void Register()
1553 {
1554 OnCast += SpellCastFn(spell_monk_transcendence_transfer_SpellScript::Cast);
1555 OnCheckCast += SpellCheckCastFn(spell_monk_transcendence_transfer_SpellScript::CheckCast);
1556 }
1557 };
1558
1559 SpellScript* GetSpellScript() const
1560 {
1561 return new spell_monk_transcendence_transfer_SpellScript();
1562 }
1563};
1564*/
1565
1566
1567
1569{
1570 auraData(uint32 id, uint64 casterGUID) : m_id(id), m_casterGuid(casterGUID)
1571 { }
1574};
1575
1576// Diffuse Magic - 122783
1578{
1579 public:
1580 spell_monk_diffuse_magic() : SpellScriptLoader("spell_monk_diffuse_magic")
1581 { }
1582
1584 {
1586
1588 {
1589 if (Player* _player = GetCaster()->ToPlayer())
1590 {
1591 std::set<auraData*> auraListToRemove;
1592 Unit::AuraApplicationMap AuraList = _player->GetAppliedAuras();
1593 for (Unit::AuraApplicationMap::iterator iter = AuraList.begin(); iter != AuraList.end(); ++iter)
1594 {
1595 Aura* aura = iter->second->GetBase();
1596 if (!aura)
1597 continue;
1598
1599 Unit* caster = aura->GetCaster();
1600 if (!caster || caster->GetGUID() == _player->GetGUID())
1601 continue;
1602
1603 if (!caster->IsWithinDist(_player, 40.0f))
1604 continue;
1605
1606 if (aura->GetSpellInfo()->IsPositive())
1607 continue;
1608
1610 continue;
1611
1612 _player->AddAura(aura->GetSpellInfo()->Id, caster);
1613
1614 if (Aura* targetAura = caster->GetAura(aura->GetSpellInfo()->Id, _player->GetGUID()))
1615 {
1616 for (int i = 0; i < MAX_SPELL_EFFECTS; ++i)
1617 {
1618 if (targetAura->GetEffect(i) && aura->GetEffect(i))
1619 {
1620 AuraEffect* auraEffect = _player->GetAuraEffect(aura->GetSpellInfo()->Id, i);
1621 if (!auraEffect)
1622 continue;
1623
1624 int32 damage = auraEffect->GetAmount();
1625
1626 // need to check auraEffect pointer here !!
1627 if (auraEffect->GetAuraType() == SPELL_AURA_PERIODIC_DAMAGE ||
1629 damage = caster->SpellDamageBonusDone(_player, aura->GetSpellInfo(), damage, DOT, auraEffect->GetBase()->GetStackAmount());
1630
1631 targetAura->GetEffect(i)->SetAmount(damage);
1632 }
1633 }
1634 }
1635
1636 auraListToRemove.insert(new auraData(aura->GetSpellInfo()->Id, caster->GetGUID()));
1637 }
1638
1639 for (std::set<auraData*>::iterator itr = auraListToRemove.begin(); itr != auraListToRemove.end(); ++itr)
1640 {
1641 _player->RemoveAura((*itr)->m_id, (*itr)->m_casterGuid);
1642 delete (*itr);
1643 }
1644
1645 auraListToRemove.clear();
1646 }
1647 }
1648
1653 };
1654
1656 {
1658 }
1659};
1660
1661enum BlackOx // tehee
1662{
1664};
1665
1666// Guard - 115295
1668{
1669 public:
1670 spell_monk_guard() : SpellScriptLoader("spell_monk_guard")
1671 { }
1672
1674 {
1676
1677 void CalculateAmount(AuraEffect const* /*aurEff*/, int32 & amount, bool & /*canBeRecalculated*/)
1678 {
1679 if (!GetCaster())
1680 return;
1681
1682 if (Player* _plr = GetCaster()->ToPlayer())
1683 amount += int32(_plr->GetTotalAttackPowerValue(WeaponAttackType::BASE_ATTACK) * 1.971f);
1684 else if (GetCaster()->GetOwner()) // For Black Ox Statue
1685 {
1686 if (Player* _plr = GetCaster()->GetOwner()->ToPlayer())
1687 amount += int32(_plr->GetTotalAttackPowerValue(WeaponAttackType::BASE_ATTACK) * 1.971f);
1688 }
1689 }
1690
1695 };
1696
1698 {
1699 return new spell_monk_guard_AuraScript();
1700 }
1701};
1702
1704{
1706};
1707
1708// Glyph of Zen Flight - 125893
1710{
1711 public:
1712 spell_monk_glyph_of_zen_flight() : SpellScriptLoader("spell_monk_glyph_of_zen_flight")
1713 { }
1714
1716 {
1718
1719 void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
1720 {
1721 if (Player* _player = GetTarget()->ToPlayer())
1722 _player->learnSpell(SPELL_MONK_ZEN_FLIGHT, false);
1723 }
1724
1725 void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
1726 {
1727 if (Player* _player = GetTarget()->ToPlayer())
1728 if (_player->HasSpell(SPELL_MONK_ZEN_FLIGHT))
1729 _player->removeSpell(SPELL_MONK_ZEN_FLIGHT, false, false);
1730 }
1731
1737 };
1738
1740 {
1742 }
1743};
1744
1749
1750
1751
1752/*
1753enum Fists
1754{
1755 SPELL_MONK_FISTS_OF_FURY_VISUAL = 123154
1756};
1757
1758// Fists of Fury (stun effect) - 120086
1759class spell_monk_fists_of_fury_stun : public SpellScriptLoader
1760{
1761 public:
1762 spell_monk_fists_of_fury_stun() : SpellScriptLoader("spell_monk_fists_of_fury_stun")
1763 { }
1764
1765 class spell_monk_fists_of_fury_stun_SpellScript : public SpellScript
1766 {
1767 PrepareSpellScript(spell_monk_fists_of_fury_stun_SpellScript);
1768
1769 void RemoveInvalidTargets(std::list<WorldObject*>& targets)
1770 {
1771 targets.remove_if(Skyfire::UnitAuraCheck(true, GetSpellInfo()->Id));
1772 }
1773
1774 void Register()
1775 {
1776 OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_monk_fists_of_fury_stun_SpellScript::RemoveInvalidTargets, EFFECT_0, TARGET_UNIT_CONE_ENEMY_24);
1777 }
1778 };
1779
1780 SpellScript* GetSpellScript() const
1781 {
1782 return new spell_monk_fists_of_fury_stun_SpellScript();
1783 }
1784
1785 class spell_monk_fists_of_fury_stun_AuraScript : public AuraScript
1786 {
1787 PrepareAuraScript(spell_monk_fists_of_fury_stun_AuraScript);
1788
1789 void OnRemove(AuraEffect const* /*aurEff*, AuraEffectHandleModes /*mode*)
1790 {
1791 if (Player* _player = GetTarget()->ToPlayer())
1792 if (_player->HasAura(SPELL_MONK_FISTS_OF_FURY_VISUAL))
1793 _player->RemoveAura(SPELL_MONK_FISTS_OF_FURY_VISUAL);
1794 }
1795
1796 void Register()
1797 {
1798 OnEffectRemove += AuraEffectRemoveFn(spell_monk_fists_of_fury_stun_AuraScript::OnRemove, EFFECT_0, SPELL_EFFECT_APPLY_AURA, AURA_EFFECT_HANDLE_REAL);
1799 }
1800 };
1801
1802 AuraScript* GetAuraScript() const
1803 {
1804 return new spell_monk_fists_of_fury_stun_AuraScript();
1805 }
1806};
1807*/
1814
1815// Grapple Weapon - 117368
1817{
1818 public:
1819 spell_monk_grapple_weapon() : SpellScriptLoader("spell_monk_grapple_weapon")
1820 { }
1821
1823 {
1825
1826 void HandleBeforeHit()
1827 {
1828 if (Player* _player = GetCaster()->ToPlayer())
1829 {
1830 if (Unit* target = GetHitUnit())
1831 {
1832 if (target->ToPlayer())
1833 {
1834 Item* mainItem = _player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_MAINHAND);
1836
1837 if (mainItem && targetMainItem)
1838 {
1839 if (targetMainItem->GetTemplate()->ItemLevel > mainItem->GetTemplate()->ItemLevel)
1840 {
1841 switch (_player->GetTalentSpecialization(_player->GetActiveSpec()))
1842 {
1844 _player->CastSpell(_player, SPELL_MONK_GRAPPLE_WEAPON_TANK_UPGRADE, true);
1845 break;
1847 _player->CastSpell(_player, SPELL_MONK_GRAPPLE_WEAPON_HEAL_UPGRADE, true);
1848 break;
1850 _player->CastSpell(_player, SPELL_MONK_GRAPPLE_WEAPON_DPS_UPGRADE, true);
1851 break;
1852 default:
1853 break;
1854 }
1855 }
1856 }
1857 }
1858 else if (target->GetTypeId() == TypeID::TYPEID_UNIT)
1859 {
1860 if (target->getLevel() > _player->getLevel())
1861 {
1862 switch (_player->GetTalentSpecialization(_player->GetActiveSpec()))
1863 {
1865 _player->CastSpell(_player, SPELL_MONK_GRAPPLE_WEAPON_TANK_UPGRADE, true);
1866 break;
1868 _player->CastSpell(_player, SPELL_MONK_GRAPPLE_WEAPON_HEAL_UPGRADE, true);
1869 break;
1871 _player->CastSpell(_player, SPELL_MONK_GRAPPLE_WEAPON_DPS_UPGRADE, true);
1872 break;
1873 default:
1874 break;
1875 }
1876 }
1877 }
1878 }
1879 }
1880 }
1881
1883 {
1884 BeforeHit += SpellHitFn(spell_monk_grapple_weapon_SpellScript::HandleBeforeHit);
1885 }
1886 };
1887
1889 {
1891 }
1892};
1893
1898
1899// Serpent's Zeal - 127722
1901{
1902 public:
1903 spell_monk_serpents_zeal() : SpellScriptLoader("spell_monk_serpents_zeal")
1904 { }
1905
1907 {
1909
1910 void OnProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
1911 {
1913
1914 if (!GetCaster())
1915 return;
1916
1917 if (eventInfo.GetActor()->GetGUID() != GetTarget()->GetGUID())
1918 return;
1919
1920 if (eventInfo.GetDamageInfo()->GetSpellInfo())
1921 return;
1922
1923 if (!(eventInfo.GetDamageInfo()->GetDamage()))
1924 return;
1925
1927 return;
1928
1929 int32 bp = eventInfo.GetDamageInfo()->GetDamage();
1930
1931 if (Player* _player = GetCaster()->ToPlayer())
1932 {
1933 std::list<Creature*> tempList;
1934 std::list<Creature*> statueList;
1935 Creature* statue = NULL;
1936
1937 if (Aura* serpentsZeal = _player->GetAura(aurEff->GetSpellInfo()->Id))
1938 {
1939 if (serpentsZeal->GetStackAmount() < 2)
1940 bp /= 4;
1941 else
1942 bp /= 2;
1943 }
1944
1946 _player->GetCreatureListWithEntryInGrid(statueList, MONK_NPC_JADE_SERPENT_STATUE, 100.0f);
1947
1948 // Remove other players jade statue
1949 for (std::list<Creature*>::iterator i = tempList.begin(); i != tempList.end(); ++i)
1950 {
1951 Unit* owner = (*i)->GetOwner();
1952 if (owner && owner == _player && (*i)->IsSummon())
1953 continue;
1954
1955 statueList.remove((*i));
1956 }
1957
1958 // you gain Serpent's Zeal causing you to heal nearby injured targets equal to 25% of your auto-attack damage. Stacks up to 2 times.
1959 _player->CastCustomSpell(_player, SPELL_MONK_EMINENCE_HEAL, &bp, NULL, NULL, true);
1960
1961 if (statueList.size() == 1)
1962 {
1963 for (auto itrBis : statueList)
1964 statue = itrBis;
1965
1966 if (statue && (statue->IsPet() || statue->IsGuardian()))
1967 if (statue->GetOwner() && statue->GetOwner()->GetGUID() == _player->GetGUID())
1968 statue->CastCustomSpell(statue, SPELL_MONK_EMINENCE_HEAL, &bp, NULL, NULL, true, 0, NULL, _player->GetGUID()); // Eminence - statue
1969 }
1970 }
1971 }
1972
1977 };
1978
1980 {
1982 }
1983};
1984
1985
1986
1988{
1990};
1991
1992// Bear Hug - 127361
1994{
1995 public:
1996 spell_monk_bear_hug() : SpellScriptLoader("spell_monk_bear_hug")
1997 { }
1998
2000 {
2002
2004 {
2005 if (Player* _player = GetCaster()->ToPlayer())
2006 if (Unit* target = GetHitUnit())
2007 if (Aura* bearHug = target->GetAura(SPELL_MONK_BEAR_HUG, _player->GetGUID()))
2008 if (bearHug->GetEffect(EFFECT_1))
2009 bearHug->GetEffect(EFFECT_1)->SetAmount(_player->CountPctFromMaxHealth(2));
2010 }
2011
2016 };
2017
2019 {
2021 }
2022};
2023
2024// Zen Flight - 125883
2026{
2027 public:
2028 spell_monk_zen_flight_check() : SpellScriptLoader("spell_monk_zen_flight_check")
2029 { }
2030
2032 {
2034
2036 {
2037 if (Player* _player = GetCaster()->ToPlayer())
2038 {
2039 if (_player->GetMap()->IsBattlegroundOrArena())
2041
2042 // In Kalimdor or Eastern Kingdom with Flight Master's License
2043 if (!_player->HasSpell(90267) && (_player->GetMapId() == 1 || _player->GetMapId() == 0))
2045
2046 // In Pandaria with Wisdom of the Four Winds
2047 if (!_player->HasSpell(115913) && (_player->GetMapId() == 870))
2049 }
2050
2052 }
2053
2058 };
2059
2061 {
2063 }
2064
2066 {
2068
2069 bool Load()
2070 {
2072 }
2073
2074 void CalculateAmount(AuraEffect const* /*aurEff*/, int32 & amount, bool & /*canBeRecalculated*/)
2075 {
2076 if (!GetCaster())
2077 return;
2078
2079 if (Player* caster = GetCaster()->ToPlayer())
2080 if (caster->GetSkillValue(SKILL_RIDING) >= 375)
2081 amount = 310;
2082 }
2083
2088 };
2089
2091 {
2093 }
2094};
2095
2101
2102// Called by Jab - 100780
2103// Power Strikes - 121817
2105{
2106 public:
2107 spell_monk_power_strikes() : SpellScriptLoader("spell_monk_power_strikes")
2108 { }
2109
2111 {
2113
2114 void HandleOnHit()
2115 {
2116 if (Player* _player = GetCaster()->ToPlayer())
2117 {
2118 if (Unit* target = GetHitUnit())
2119 {
2120 if (target->GetGUID() != _player->GetGUID())
2121 {
2122 if (_player->HasAura(SPELL_MONK_POWER_STRIKES_TALENT))
2123 {
2124 if (!_player->HasSpellCooldown(SPELL_MONK_POWER_STRIKES_TALENT))
2125 {
2126 if (_player->GetPower(POWER_CHI) < _player->GetMaxPower(POWER_CHI))
2127 {
2128 _player->EnergizeBySpell(_player, GetSpellInfo()->Id, 1, POWER_CHI);
2129 _player->AddSpellCooldown(SPELL_MONK_POWER_STRIKES_TALENT, 0, time(NULL) + 20);
2130 }
2131 else
2132 _player->CastSpell(_player, SPELL_MONK_CREATE_CHI_SPHERE, true);
2133 }
2134 }
2135 }
2136 }
2137 }
2138 }
2139
2141 {
2142 OnHit += SpellHitFn(spell_monk_power_strikes_SpellScript::HandleOnHit);
2143 }
2144 };
2145
2147 {
2149 }
2150};
2151
2158
2159// Spinning Fire Blossom - 123408
2161{
2162 public:
2163 spell_monk_spinning_fire_blossom_damage() : SpellScriptLoader("spell_monk_spinning_fire_blossom_damage")
2164 { }
2165
2167 {
2169
2171 {
2172 if (Player* _player = GetCaster()->ToPlayer())
2173 if (Unit* target = GetExplTargetUnit())
2174 if (_player->IsFriendlyTo(target))
2176
2178 }
2179
2181 {
2182 if (Player* _player = GetCaster()->ToPlayer())
2183 {
2184 if (Unit* target = GetHitUnit())
2185 {
2186 if (target->GetDistance(_player) > 10.0f)
2187 {
2188 SetHitDamage(int32(GetHitDamage() * 1.5f));
2189 _player->CastSpell(target, SPELL_MONK_SPINNING_FIRE_BLOSSOM_ROOT, true);
2190 }
2191 }
2192 }
2193 }
2194
2200 };
2201
2206};
2207
2208// Spinning Fire Blossom - 115073
2210{
2211 public:
2212 spell_monk_spinning_fire_blossom() : SpellScriptLoader("spell_monk_spinning_fire_blossom")
2213 { }
2214
2216 {
2218
2219 void HandleAfterCast()
2220 {
2221 if (Player* _player = GetCaster()->ToPlayer())
2222 {
2223 std::list<Unit*> tempList;
2224 std::list<Unit*> targetList;
2225
2226 _player->GetAttackableUnitListInRange(tempList, 50.0f);
2227
2228 for (auto itr : tempList)
2229 {
2230 if (!_player->IsValidAttackTarget(itr))
2231 continue;
2232
2233 if (!_player->isInFront(itr))
2234 continue;
2235
2236 if (!itr->IsWithinLOSInMap(_player))
2237 continue;
2238
2239 if (itr->GetGUID() == _player->GetGUID())
2240 continue;
2241
2242 targetList.push_back(itr);
2243 }
2244
2245 if (!targetList.empty())
2246 {
2248
2249 for (auto itr : targetList)
2250 _player->CastSpell(itr, SPELL_MONK_SPINNING_FIRE_BLOSSOM_DAMAGE, true);
2251 }
2252 else
2253 _player->CastSpell(_player, SPELL_MONK_SPINNING_FIRE_BLOSSOM_MISSILE, true);
2254 }
2255 }
2256
2258 {
2259 AfterCast += SpellCastFn(spell_monk_spinning_fire_blossom_SpellScript::HandleAfterCast);
2260 }
2261 };
2262
2267};
2268/*
2269enum ThunderTea
2270{
2271 SPELL_MONK_THUNDER_FOCUS_TEA = 116680
2272};
2273
2274
2275// Called by Uplift - 116670 and Uplift - 130316
2276// Thunder Focus Tea - 116680
2277class spell_monk_thunder_focus_tea : public SpellScriptLoader
2278{
2279 public:
2280 spell_monk_thunder_focus_tea() : SpellScriptLoader("spell_monk_thunder_focus_tea")
2281 { }
2282
2283 class spell_monk_thunder_focus_tea_SpellScript : public SpellScript
2284 {
2285 PrepareSpellScript(spell_monk_thunder_focus_tea_SpellScript)
2286
2287 void FilterTargets(std::list<WorldObject*>& unitList)
2288 {
2289 unitList.remove_if(Skyfire::UnitAuraCheck(false, SPELL_MONK_RENEWING_MIST_HOT, GetCaster()->GetGUID()));
2290 }
2291
2292 void HandleOnHit()
2293 {
2294 if (Player* _player = GetCaster()->ToPlayer())
2295 {
2296 if (Unit* target = GetHitUnit())
2297 {
2298 if (_player->HasAura(SPELL_MONK_THUNDER_FOCUS_TEA))
2299 {
2300 std::list<Unit*> groupList;
2301
2302 _player->GetPartyMembers(groupList);
2303
2304 for (auto itr : groupList)
2305 if (Aura* renewingMistGroup = itr->GetAura(SPELL_MONK_RENEWING_MIST_HOT, _player->GetGUID()))
2306 renewingMistGroup->RefreshDuration();
2307
2308 _player->RemoveAura(SPELL_MONK_THUNDER_FOCUS_TEA);
2309 }
2310 }
2311 }
2312 }
2313
2314 void Register()
2315 {
2316 OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_monk_thunder_focus_tea_SpellScript::FilterTargets, EFFECT_1, TARGET_UNIT_CASTER_AREA_RAID);
2317 OnHit += SpellHitFn(spell_monk_thunder_focus_tea_SpellScript::HandleOnHit);
2318 }
2319 };
2320
2321 SpellScript* GetSpellScript() const
2322 {
2323 return new spell_monk_thunder_focus_tea_SpellScript();
2324 }
2325};
2326*/
2331
2332// Called by Spinning Crane Kick - 107270
2333// Teachings of the Monastery - 116645
2362
2363// Glyph of Mana Tea - 115294
2365{
2366 public:
2367 spell_monk_glyph_of_mana_tea() : SpellScriptLoader("spell_monk_glyph_of_mana_tea")
2368 { }
2369
2371 {
2373
2375
2377 {
2378 if (Player* _player = GetCaster()->ToPlayer())
2379 {
2380 int32 stacks = 0;
2381
2382 if (Aura* manaTeaStacks = _player->GetAura(SPELL_MONK_MANA_TEA_STACKS))
2383 stacks = manaTeaStacks->GetStackAmount();
2384
2385 int32 newDuration = stacks * IN_MILLISECONDS;
2386
2387 spellMod = new SpellModifier();
2389 spellMod->type = SPELLMOD_FLAT;
2391 spellMod->value = newDuration;
2392 spellMod->mask [1] = 0x200000;
2393 spellMod->mask [2] = 0x1;
2394
2395 _player->AddSpellMod(spellMod, true);
2396 }
2397 }
2398
2400 {
2401 if (GetCaster())
2402 {
2403 if (Aura* manaTea = GetCaster()->GetAura(SPELL_MONK_MANA_TEA_STACKS))
2404 {
2405 if (manaTea->GetStackAmount() > 1)
2406 manaTea->SetStackAmount(manaTea->GetStackAmount() - 1);
2407 else
2409 }
2410 }
2411 }
2412
2414 {
2415 if (Player* _player = GetCaster()->ToPlayer())
2416 _player->AddSpellMod(spellMod, false);
2417 }
2418
2425 };
2426};
2427
2428// Mana Tea - 115294
2430{
2431 public:
2432 spell_monk_mana_tea() : SpellScriptLoader("spell_monk_mana_tea")
2433 { }
2434
2436 {
2438
2440
2442 {
2443 if (Player* _player = GetCaster()->ToPlayer())
2444 {
2445 int32 stacks = 0;
2446
2447 if (Aura* manaTeaStacks = _player->GetAura(SPELL_MONK_MANA_TEA_STACKS))
2448 stacks = manaTeaStacks->GetStackAmount();
2449
2450 int32 newDuration = stacks * IN_MILLISECONDS;
2451
2452 spellMod = new SpellModifier();
2454 spellMod->type = SPELLMOD_FLAT;
2456 spellMod->value = newDuration;
2457 spellMod->mask [1] = 0x200000;
2458 spellMod->mask [2] = 0x1;
2459
2460 _player->AddSpellMod(spellMod, true);
2461 }
2462 }
2463
2465 {
2466 if (Player* _player = GetCaster()->ToPlayer())
2467 _player->AddSpellMod(spellMod, false);
2468 }
2469
2475 };
2476
2478 {
2480 }
2481
2483 {
2485
2486 void OnTick(AuraEffect const* aurEff)
2487 {
2488 if (GetCaster())
2489 {
2490 // remove one charge per tick instead of remove aura on cast
2491 // "Cancelling the channel will not waste stacks"
2493 {
2494 if (manaTea->GetStackAmount() > 1)
2495 manaTea->SetStackAmount(manaTea->GetStackAmount() - 1);
2496 else
2498 }
2499 }
2500 }
2501
2506 };
2507
2509 {
2510 return new spell_monk_mana_tea_AuraScript();
2511 }
2512};
2513
2514// Brewing : Mana Tea - 123766
2516{
2517 public:
2518 spell_monk_mana_tea_stacks() : SpellScriptLoader("spell_monk_mana_tea_stacks")
2519 { }
2520
2522 {
2524
2526
2527 void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
2528 {
2529 chiConsumed = 0;
2530 }
2531
2532 void SetData(uint32 type, uint32 data)
2533 {
2534 while ((chiConsumed += data) >= 4)
2535 {
2536 chiConsumed = 0;
2537 data = data > 4 ? data - 4 : 0;
2538
2539 if (GetCaster())
2540 {
2543 }
2544 }
2545 }
2546
2551 };
2552
2554 {
2556 }
2557};
2558
2559// Called by : Fortifying Brew - 115203, Chi Brew - 115399, Elusive Brew - 115308, Tigereye Brew - 116740
2560// Purifying Brew - 119582, Mana Tea - 115294, Thunder Focus Tea - 116680 and Energizing Brew - 115288
2561// Healing Elixirs - 122280
2563{
2564 public:
2565 spell_monk_healing_elixirs() : SpellScriptLoader("spell_monk_healing_elixirs")
2566 { }
2567
2569 {
2571
2573 {
2574 if (Player* _player = GetCaster()->ToPlayer())
2575 {
2576 if (_player->HasAura(SPELL_MONK_HEALING_ELIXIRS_AURA))
2577 {
2578 int32 bp = 10;
2579
2580 if (!_player->HasSpellCooldown(SPELL_MONK_HEALING_ELIXIRS_RESTORE_HEALTH))
2581 {
2582 _player->CastCustomSpell(_player, SPELL_MONK_HEALING_ELIXIRS_RESTORE_HEALTH, &bp, NULL, NULL, true);
2583 // This effect cannot occur more than once per 18s
2584 _player->AddSpellCooldown(SPELL_MONK_HEALING_ELIXIRS_RESTORE_HEALTH, 0, time(NULL) + 18);
2585 }
2586 }
2587 }
2588 }
2589
2594 };
2595
2597 {
2599 }
2600};
2601
2602// Zen Sphere - 124081
2604{
2605 public:
2606 spell_monk_zen_sphere() : SpellScriptLoader("spell_monk_zen_sphere")
2607 { }
2608
2610 {
2612
2614
2616 {
2617 active = false;
2618
2619 if (Player* _player = GetCaster()->ToPlayer())
2620 if (Unit* target = GetHitUnit())
2621 if (target->HasAura(SPELL_MONK_ZEN_SPHERE_HEAL))
2622 active = true;
2623 }
2624
2626 {
2627 if (Player* _player = GetCaster()->ToPlayer())
2628 {
2629 if (Unit* target = GetHitUnit())
2630 {
2631 if (active)
2632 {
2633 _player->CastSpell(_player, SPELL_MONK_ZEN_SPHERE_DETONATE_HEAL, true);
2634 _player->CastSpell(_player, SPELL_MONK_ZEN_SPHERE_DETONATE_DAMAGE, true);
2635 _player->RemoveAura(SPELL_MONK_ZEN_SPHERE_HEAL);
2636 active = false;
2637 }
2638 }
2639 }
2640 }
2641
2647 };
2648
2650 {
2652 }
2653};
2654
2655// Zen Sphere - 124081
2657{
2658 public:
2659 spell_monk_zen_sphere_hot() : SpellScriptLoader("spell_monk_zen_sphere_hot")
2660 { }
2661
2663 {
2665
2666 void OnTick(AuraEffect const* aurEff)
2667 {
2668 if (Player* _player = GetCaster()->ToPlayer())
2669 _player->CastSpell(_player, SPELL_MONK_ZEN_SPHERE_DAMAGE, true);
2670 }
2671
2676 };
2677
2679 {
2681 }
2682};
2683
2684// Chi Burst - 123986
2686{
2687 public:
2688 spell_monk_chi_burst() : SpellScriptLoader("spell_monk_chi_burst")
2689 { }
2690
2692 {
2694
2696 {
2697 if (Player* _player = GetCaster()->ToPlayer())
2698 {
2699 if (Unit* target = GetHitUnit())
2700 {
2701 std::list<Unit*> tempUnitMap;
2702 _player->GetAttackableUnitListInRange(tempUnitMap, _player->GetDistance(target));
2703
2704 // Chi Burst will always heal the Monk, but not heal twice if Monk targets himself
2705 if (target->GetGUID() != _player->GetGUID())
2706 _player->CastSpell(_player, SPELL_MONK_CHI_BURST_HEAL, true);
2707
2708 if (_player->IsValidAttackTarget(target))
2709 _player->CastSpell(target, SPELL_MONK_CHI_BURST_DAMAGE, true);
2710 else
2711 _player->CastSpell(target, SPELL_MONK_CHI_BURST_HEAL, true);
2712
2713 for (auto itr : tempUnitMap)
2714 {
2715 if (itr->GetGUID() == _player->GetGUID())
2716 continue;
2717
2718 if (!itr->IsInBetween(_player, target, 3.0f))
2719 continue;
2720
2721 uint32 spell = _player->IsValidAttackTarget(itr) ? SPELL_MONK_CHI_BURST_DAMAGE : SPELL_MONK_CHI_BURST_HEAL;
2722 _player->CastSpell(itr, spell, true);
2723 }
2724 }
2725 }
2726 }
2727
2732 };
2733
2735 {
2737 }
2738};
2739
2740// Energizing Brew - 115288
2769
2770// Spear Hand Strike - 116705
2772{
2773 public:
2774 spell_monk_spear_hand_strike() : SpellScriptLoader("spell_monk_spear_hand_strike")
2775 { }
2776
2778 {
2780
2782 {
2783 if (Player* _player = GetCaster()->ToPlayer())
2784 {
2785 if (Unit* target = GetHitUnit())
2786 {
2787 if (target->isInFront(_player))
2788 {
2789 _player->CastSpell(target, SPELL_MONK_SPEAR_HAND_STRIKE_SILENCE, true);
2790 _player->AddSpellCooldown(116705, 0, time(NULL) + 15);
2791 }
2792 }
2793 }
2794 }
2795
2800 };
2801
2806};
2807
2808// Tiger's Lust - 116841
2810{
2811 public:
2812 spell_monk_tigers_lust() : SpellScriptLoader("spell_monk_tigers_lust")
2813 { }
2814
2816 {
2818
2820 {
2821 if (Player* _player = GetCaster()->ToPlayer())
2822 if (Unit* target = GetHitUnit())
2823 target->RemoveMovementImpairingAuras();
2824 }
2825
2830 };
2831
2833 {
2835 }
2836};
2837
2838
2839// Chi Torpedo - 115008 or Chi Torpedo (3 charges) - 121828
2841{
2842 public:
2843 spell_monk_chi_torpedo() : SpellScriptLoader("spell_monk_chi_torpedo")
2844 { }
2845
2847 {
2849
2851 {
2852 if (Unit* caster = GetCaster())
2853 {
2854 if (Player* _player = caster->ToPlayer())
2855 {
2856 std::list<Unit*> tempUnitMap;
2857 _player->GetAttackableUnitListInRange(tempUnitMap, 20.0f);
2858
2859 for (auto itr : tempUnitMap)
2860 {
2861 if (!itr->isInFront(_player, M_PI / 3) && itr->GetGUID() != _player->GetGUID())
2862 continue;
2863
2864 uint32 spell = _player->IsValidAttackTarget(itr) ? SPELL_MONK_CHI_TORPEDO_DAMAGE : SPELL_MONK_CHI_TORPEDO_HEAL;
2865 _player->CastSpell(itr, spell, true);
2866 }
2867
2868 if (caster->HasAura(SPELL_MONK_ITEM_PVP_GLOVES_BONUS))
2869 caster->RemoveAurasByType(SPELL_AURA_MOD_DECREASE_SPEED);
2870 }
2871 }
2872 }
2873
2878 };
2879
2881 {
2883 }
2884};
2885
2886// Purifying Brew - 119582
2888{
2889 public:
2890 spell_monk_purifying_brew() : SpellScriptLoader("spell_monk_purifying_brew")
2891 { }
2892
2894 {
2896
2898 {
2899 if (Unit* caster = GetCaster())
2900 {
2901 if (Player* _player = caster->ToPlayer())
2902 {
2903 AuraApplication* staggerAmount = _player->GetAuraApplication(SPELL_MONK_LIGHT_STAGGER);
2904
2905 if (!staggerAmount)
2906 staggerAmount = _player->GetAuraApplication(SPELL_MONK_MODERATE_STAGGER);
2907 if (!staggerAmount)
2908 staggerAmount = _player->GetAuraApplication(SPELL_MONK_HEAVY_STAGGER);
2909
2910 if (staggerAmount)
2911 _player->RemoveAura(staggerAmount->GetBase()->GetId());
2912 }
2913 }
2914 }
2915
2920 };
2921
2923 {
2925 }
2926};
2927
2928// Clash - 122057 and Clash - 126449
2930{
2931 public:
2932 spell_monk_clash() : SpellScriptLoader("spell_monk_clash")
2933 { }
2934
2936 {
2938
2940 {
2941 if (Unit* caster = GetCaster())
2942 {
2943 if (Player* _player = caster->ToPlayer())
2944 {
2945 if (Unit* target = GetHitUnit())
2946 {
2947 int32 basePoint = 2;
2948 _player->CastCustomSpell(target, SPELL_MONK_CLASH_CHARGE, &basePoint, NULL, NULL, true);
2949 target->CastSpell(_player, SPELL_MONK_CLASH_CHARGE, true);
2950 }
2951 }
2952 }
2953 }
2954
2959 };
2960
2962 {
2963 return new spell_monk_clash_SpellScript();
2964 }
2965};
2966
2967// Keg Smash - 121253
2969{
2970 public:
2971 spell_monk_keg_smash() : SpellScriptLoader("spell_monk_keg_smash")
2972 { }
2973
2975 {
2977
2979 {
2980 if (Unit* caster = GetCaster())
2981 {
2982 if (Player* _player = caster->ToPlayer())
2983 {
2984 if (Unit* target = GetHitUnit())
2985 {
2986 _player->CastSpell(target, SPELL_MONK_KEG_SMASH_VISUAL, true);
2987 _player->CastSpell(target, SPELL_MONK_WEAKENED_BLOWS, true);
2988 _player->CastSpell(_player, SPELL_MONK_KEG_SMASH_ENERGIZE, true);
2989 // Prevent to receive 2 CHI more than once time per cast
2990 _player->AddSpellCooldown(SPELL_MONK_KEG_SMASH_ENERGIZE, 0, time(NULL) + 1);
2991 _player->CastSpell(target, SPELL_MONK_DIZZYING_HAZE, true);
2992 }
2993 }
2994 }
2995 }
2996
3001 };
3002
3004 {
3006 }
3007};
3008
3009// Elusive Brew - 115308
3011{
3012 public:
3013 spell_monk_elusive_brew() : SpellScriptLoader("spell_monk_elusive_brew")
3014 { }
3015
3017 {
3019
3021 {
3022 int32 stackAmount = 0;
3023
3024 if (Unit* caster = GetCaster())
3025 {
3026 if (Player* _player = caster->ToPlayer())
3027 {
3028 if (AuraApplication* brewStacks = _player->GetAuraApplication(SPELL_MONK_ELUSIVE_BREW_STACKS))
3029 stackAmount = brewStacks->GetBase()->GetStackAmount();
3030
3031 _player->AddAura(SPELL_MONK_ELUSIVE_BREW, _player);
3032
3033 if (AuraApplication* aura = _player->GetAuraApplication(SPELL_MONK_ELUSIVE_BREW))
3034 {
3035 Aura* elusiveBrew = aura->GetBase();
3036 int32 maxDuration = elusiveBrew->GetMaxDuration();
3037 int32 newDuration = stackAmount * 1000;
3038 elusiveBrew->SetDuration(newDuration);
3039
3040 if (newDuration > maxDuration)
3041 elusiveBrew->SetMaxDuration(newDuration);
3042
3043 _player->RemoveAura(SPELL_MONK_ELUSIVE_BREW_STACKS);
3044 }
3045 }
3046 }
3047 }
3048
3053 };
3054
3056 {
3058 }
3059};
3060
3061// Soothing Mist - 115175
3063{
3064 public:
3065 spell_monk_soothing_mist() : SpellScriptLoader("spell_monk_soothing_mist")
3066 { }
3067
3069 {
3071
3072 void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
3073 {
3074 if (!GetCaster())
3075 return;
3076
3077 if (Unit* target = GetTarget())
3078 target->CastSpell(target, SPELL_MONK_SOOTHING_MIST_VISUAL, true);
3079
3080 if (Player* _player = GetCaster()->ToPlayer())
3081 {
3082 if (Unit* target = GetTarget())
3083 {
3084 std::list<Unit*> playerList;
3085 std::list<Creature*> tempList;
3086 std::list<Creature*> statueList;
3087 Creature* statue;
3088
3089 _player->GetPartyMembers(playerList);
3090
3091 if (playerList.size() > 1)
3092 {
3093 playerList.remove(target);
3094 playerList.sort(Skyfire::HealthPctOrderPred());
3095 playerList.resize(1);
3096 }
3097
3098 _player->GetCreatureListWithEntryInGrid(tempList, MONK_NPC_JADE_SERPENT_STATUE, 100.0f);
3099 _player->GetCreatureListWithEntryInGrid(statueList, MONK_NPC_JADE_SERPENT_STATUE, 100.0f);
3100
3101 // Remove other players jade statue
3102 for (std::list<Creature*>::iterator i = tempList.begin(); i != tempList.end(); ++i)
3103 {
3104 Unit* owner = (*i)->GetOwner();
3105 if (owner && owner == _player && (*i)->IsSummon())
3106 continue;
3107
3108 statueList.remove((*i));
3109 }
3110
3111 for (auto itr : playerList)
3112 {
3113 if (statueList.size() == 1)
3114 {
3115 for (auto itrBis : statueList)
3116 statue = itrBis;
3117
3118 if (statue && (statue->IsPet() || statue->IsGuardian()))
3119 if (statue->GetOwner() && statue->GetOwner()->GetGUID() == _player->GetGUID())
3120 statue->CastSpell(itr, GetSpellInfo()->Id, true);
3121 }
3122 }
3123 }
3124 }
3125 }
3126
3127 void HandleEffectPeriodic(AuraEffect const* /*aurEff*/)
3128 {
3129 if (Unit* caster = GetCaster())
3130 if (Unit* target = GetTarget())
3131 // 25% to give 1 chi per tick
3132 if (roll_chance_i(25))
3133 caster->CastSpell(caster, SPELL_MONK_SOOTHING_MIST_ENERGIZE, true);
3134 }
3135
3136 void OnRemove(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
3137 {
3138 if (Unit* caster = GetCaster())
3139 if (Unit* target = GetTarget())
3140 if (target->HasAura(SPELL_MONK_SOOTHING_MIST_VISUAL))
3141 target->RemoveAura(SPELL_MONK_SOOTHING_MIST_VISUAL);
3142 }
3143
3150 };
3151
3153 {
3155 }
3156};
3157
3166
3167// Blackout Kick - 100784
3169{
3170 public:
3171 spell_monk_blackout_kick() : SpellScriptLoader("spell_monk_blackout_kick")
3172 { }
3173
3175 {
3177
3179 {
3180 if (Unit* caster = GetCaster())
3181 {
3182 if (Unit* target = GetHitUnit())
3183 {
3184 // Second effect by spec : Instant heal or DoT
3185 if (caster->GetTypeId() == TypeID::TYPEID_PLAYER && caster->ToPlayer()->GetTalentSpecialization(caster->ToPlayer()->GetActiveSpec()) == SPEC_MONK_WINDWALKER
3186 && caster->ToPlayer()->HasAura(SPELL_MONK_COMBAT_CONDITIONING))
3187 {
3188 // Your Blackout Kick always deals 20% additional damage over 4 sec regardless of positioning but you're unable to trigger the healing effect.
3189 if (caster->HasAura(SPELL_MONK_GLYPH_OF_BLACKOUT_KICK))
3190 {
3191 int32 bp = int32(GetHitDamage() * 0.2f) / 4;
3192 caster->CastCustomSpell(target, SPELL_MONK_BLACKOUT_KICK_DOT, &bp, NULL, NULL, true);
3193 }
3194 else
3195 {
3196 // If behind : 20% damage on DoT
3197 if (target->isInBack(caster))
3198 {
3199 int32 bp = int32(GetHitDamage() * 0.2f) / 4;
3200 caster->CastCustomSpell(target, SPELL_MONK_BLACKOUT_KICK_DOT, &bp, NULL, NULL, true);
3201 }
3202 // else : 20% damage on instant heal
3203 else
3204 {
3205 int32 bp = int32(GetHitDamage() * 0.2f);
3206 caster->CastCustomSpell(caster, SPELL_MONK_BLACKOUT_KICK_HEAL, &bp, NULL, NULL, true);
3207 }
3208 }
3209 }
3210 // Brewmaster : Training - you gain Shuffle, increasing parry chance and stagger amount by 20%
3211 else if (caster->GetTypeId() == TypeID::TYPEID_PLAYER && caster->ToPlayer()->GetTalentSpecialization(caster->ToPlayer()->GetActiveSpec()) == SPEC_MONK_BREWMASTER)
3212 caster->CastSpell(caster, SPELL_MONK_SHUFFLE, true);
3213 }
3214 }
3215 }
3216
3221 };
3222
3224 {
3226 }
3227};
3228
3229// Brewing : Tigereye Brew - 123980
3231{
3232 public:
3233 spell_monk_tigereye_brew_stacks() : SpellScriptLoader("spell_monk_tigereye_brew_stacks")
3234 { }
3235
3237 {
3239
3241
3242 void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
3243 {
3244 chiConsumed = 0;
3245 }
3246
3247 void SetData(uint32 type, uint32 data)
3248 {
3249 while ((chiConsumed += data) >= 4)
3250 {
3251 chiConsumed = 0;
3252 data = data > 4 ? data - 4 : 0;
3253
3254 if (GetCaster())
3256 }
3257 }
3258
3263 };
3264
3269};
3270
3272{
3273 new spell_monk_roll();
3278 new spell_monk_provoke();
3279 new spell_monk_disable();
3281
3282 //new spell_monk_fists_of_fury_stun();
3285 //new npc_transcendence_spirit();
3286 //new spell_monk_transcendence();
3287 //new spell_monk_transcendence_transfer();
3290 new spell_monk_guard();
3291 new spell_monk_bear_hug();
3298 //new spell_monk_thunder_focus_tea();
3300 new spell_monk_mana_tea();
3304 //new spell_monk_renewing_mist();
3315 new spell_monk_clash();
3325 //new spell_monk_healing_sphere();
3326}
@ IN_MILLISECONDS
Definition Common.h:125
#define M_PI
Definition Common.h:192
#define MAX_SPELL_EFFECTS
std::int32_t int32
Definition Define.h:73
std::uint32_t uint32
Definition Define.h:77
std::uint64_t uint64
Definition Define.h:76
std::uint16_t uint16
Definition Define.h:78
@ TYPEID_PLAYER
Definition Object.h:55
@ TYPEID_UNIT
Definition Object.h:54
@ EQUIPMENT_SLOT_MAINHAND
Definition Player.h:704
@ SPELLMOD_FLAT
Definition Player.h:66
#define INVENTORY_SLOT_BAG_0
Definition Player.h:684
@ SPEC_MONK_WINDWALKER
@ SPEC_MONK_BREWMASTER
@ SPEC_MONK_MISTWEAVER
SpellEffIndex
@ EFFECT_1
@ EFFECT_0
@ POWER_CHI
@ SPELL_EFFECT_DUMMY
@ SPELL_EFFECT_SCRIPT_EFFECT
@ SPELL_EFFECT_HEAL
@ SPELL_EFFECT_SCHOOL_DAMAGE
@ SPELL_EFFECT_TELEPORT_UNITS
@ SKILL_RIDING
@ SPELL_SCHOOL_MASK_MAGIC
SpellCastResult
@ SPELL_FAILED_CANT_DO_THAT_RIGHT_NOW
@ SPELL_AURA_PERIODIC_DAMAGE
@ SPELL_AURA_MOD_HEALING_DONE_PERCENT
@ SPELL_AURA_OBS_MOD_POWER
@ SPELL_AURA_MOD_INCREASE_VEHICLE_FLIGHT_SPEED
@ SPELL_AURA_PERIODIC_HEAL
@ SPELL_AURA_PERIODIC_DAMAGE_PERCENT
@ SPELL_AURA_DUMMY
@ SPELL_AURA_MOD_DAMAGE_PERCENT_DONE
@ SPELL_AURA_MOD_DECREASE_SPEED
@ SPELL_AURA_SCHOOL_ABSORB
@ SPELL_AURA_PERIODIC_DUMMY
@ SPELL_AURA_MOD_MELEE_HASTE_3
AuraEffectHandleModes
@ AURA_EFFECT_HANDLE_REAPPLY
@ 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 SpellCastFn(F)
#define AuraEffectAbsorbFn(F, I)
#define AuraEffectApplyFn(F, I, N, M)
#define AuraCheckProcFn(F)
#define SpellHitFn(F)
#define AuraEffectRemoveFn(F, I, N, M)
@ SPELLMOD_DURATION
Definition Unit.h:74
@ SPELLVALUE_BASE_POINT0
Definition Unit.h:114
@ CURRENT_CHANNELED_SPELL
Definition Unit.h:1110
@ DOT
Definition Unit.h:616
bool roll_chance_i(int chance)
Definition Util.h:89
T CalculatePct(T base, U pct)
Definition Util.h:103
void ClientUpdate(bool remove=false)
Aura * GetBase() const
Definition SpellAuras.h:55
uint32 GetTickNumber() const
SpellInfo const * GetSpellInfo() const
AuraType GetAuraType() const
int32 GetTotalTicks() const
Aura * GetBase() const
int32 GetAmount() const
const AuraApplication * GetApplicationOfTarget(uint64 guid) const
Definition SpellAuras.h:176
int32 GetMaxDuration() const
Definition SpellAuras.h:115
uint32 GetId() const
Definition SpellAuras.h:88
AuraEffect * GetEffect(uint8 effIndex) const
Definition SpellAuras.h:168
Unit * GetCaster() const
void SetDuration(int32 duration, bool withMods=false)
void RefreshDuration()
uint8 GetStackAmount() const
Definition SpellAuras.h:133
SpellInfo const * GetSpellInfo() const
Definition SpellAuras.h:87
void SetMaxDuration(int32 duration)
Definition SpellAuras.h:116
bool DropCharge(AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition SpellAuras.h:131
void PreventDefaultAction()
HookList< EffectApplyHandler > AfterEffectRemove
HookList< EffectPeriodicHandler > OnEffectPeriodic
SpellInfo const * GetSpellInfo() const
WorldObject * GetOwner() const
HookList< EffectApplyHandler > AfterEffectApply
HookList< EffectCalcAmountHandler > DoEffectCalcAmount
Unit * GetCaster() const
HookList< EffectAbsorbHandler > OnEffectAbsorb
Aura * GetAura() const
Unit * GetTarget() const
HookList< CheckProcHandler > DoCheckProc
HookList< EffectApplyHandler > OnEffectRemove
HookList< EffectProcHandler > OnEffectProc
Unit * GetUnitOwner() const
HookList< EffectApplyHandler > OnEffectApply
Unit * GetVictim() const
Definition Unit.h:903
Unit * GetAttacker() const
Definition Unit.h:899
SpellInfo const * GetSpellInfo() const
Definition Unit.h:907
WeaponAttackType GetAttackType() const
Definition Unit.h:919
uint32 GetDamage() const
Definition Unit.h:923
Definition Item.h:202
ItemTemplate const * GetTemplate() const
Definition Item.cpp:528
uint64 GetGUID() const
Definition Object.h:119
Player * ToPlayer()
Definition Object.h:204
TypeID GetTypeId() const
Definition Object.h:131
Item * GetItemByPos(uint16 pos) const
DamageInfo * GetDamageInfo() const
Definition Unit.h:985
Unit * GetActor() const
Definition Unit.h:972
int32 CalcValue(Unit const *caster=NULL, int32 const *basePoints=NULL, Unit const *target=NULL) const
Definition Spell.h:289
SpellInfo const * GetSpellInfo() const
Definition Spell.h:565
SpellEffectInfo Effects[MAX_SPELL_EFFECTS]
Definition SpellInfo.h:255
uint32 Id
Definition SpellInfo.h:160
SpellSchoolMask GetSchoolMask() const
bool IsPositive() const
HookList< CastHandler > AfterCast
Unit * GetExplTargetUnit()
HookList< CheckCastHandler > OnCheckCast
HookList< HitHandler > AfterHit
SpellInfo const * GetSpellInfo()
HookList< HitHandler > OnHit
HookList< EffectHandler > OnEffectHitTarget
HookList< CastHandler > OnCast
Unit * GetHitUnit()
int32 GetEffectValue()
HookList< CastHandler > BeforeCast
void SetHitDamage(int32 damage)
int32 GetHitHeal()
Unit * GetCaster()
HookList< HitHandler > BeforeHit
int32 GetHitDamage()
SpellScriptLoader(const char *name)
Definition Unit.h:1367
Unit * GetOwner() const
Definition Unit.cpp:2339
void RemoveAura(AuraApplicationMap::iterator &i, AuraRemoveMode mode=AURA_REMOVE_BY_DEFAULT)
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)
std::multimap< uint32, AuraApplication * > AuraApplicationMap
Definition Unit.h:1376
Aura * GetAura(uint32 spellId, uint64 casterGUID=0, uint64 itemCasterGUID=0, uint32 reqEffMask=0) const
bool IsPet() const
Definition Unit.h:1511
uint32 GetMaxHealth() const
Definition Unit.h:1604
Aura * AddAura(uint32 spellId, Unit *target)
bool HasAura(uint32 spellId, uint64 casterGUID=0, uint64 itemCasterGUID=0, uint32 reqEffMask=0) const
bool IsSummon() const
Definition Unit.h:1503
uint32 SpellDamageBonusDone(Unit *victim, SpellInfo const *spellProto, uint32 pdamage, DamageEffectType damagetype, uint32 stack=1) const
void RemoveAurasByType(AuraType auraType, uint64 casterGUID=0, Aura *except=NULL, bool negative=true, bool positive=true)
bool IsGuardian() const
Definition Unit.h:1507
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)
uint32 CountPctFromMaxHealth(int32 pct) const
Definition Unit.h:1633
void GetPartyMembers(std::list< Unit * > &units)
Definition Unit.cpp:7272
Spell * GetCurrentSpell(CurrentSpellTypes spellType) const
Definition Unit.h:2363
void GetCreatureListWithEntryInGrid(std::list< Creature * > &lList, uint32 uiEntry, float fMaxSearchRange) const
Definition Object.cpp:2841
bool IsWithinDist(WorldObject const *obj, float dist2compare, bool is3D=true) const
Definition Object.cpp:1730
PrepareSpellScript(spell_monk_bear_hug_SpellScript)
SpellScript * GetSpellScript() const
PrepareSpellScript(spell_monk_blackout_kick_SpellScript)
SpellScript * GetSpellScript() const
PrepareSpellScript(spell_monk_breath_of_fire_SpellScript)
SpellScript * GetSpellScript() const override
void HandleOnEffectApply(AuraEffect const *aurEff, AuraEffectHandleModes)
AuraScript * GetAuraScript() const
PrepareSpellScript(spell_monk_chi_burst_SpellScript)
SpellScript * GetSpellScript() const
PrepareSpellScript(spell_monk_chi_torpedo_SpellScript)
SpellScript * GetSpellScript() const
PrepareSpellScript(spell_monk_clash_SpellScript)
SpellScript * GetSpellScript() const
AuraScript * GetAuraScript() const override
AuraScript * GetAuraScript() const override
void Absorb(AuraEffect *auraEffect, DamageInfo &dmgInfo, uint32 &absorbAmount)
void CalculateAmount(AuraEffect const *, int32 &amount, bool &)
PrepareAuraScript(spell_monk_dampen_harm_AuraScript)
AuraScript * GetAuraScript() const
PrepareSpellScript(spell_monk_diffuse_magic_SpellScript)
SpellScript * GetSpellScript() const
PrepareAuraScript(spell_monk_disable_AuraScript)
void AfterReapply(AuraEffect const *aurEff, AuraEffectHandleModes)
AuraScript * GetAuraScript() const
PrepareSpellScript(spell_monk_elusive_brew_SpellScript)
SpellScript * GetSpellScript() const
PrepareSpellScript(spell_monk_energizing_brew_SpellScript)
SpellScript * GetSpellScript() const
PrepareSpellScript(spell_monk_enveloping_mist_SpellScript)
SpellScript * GetSpellScript() const
PrepareSpellScript(spell_monk_expel_harm_SpellScript)
SpellScript * GetSpellScript() const override
SpellScript * GetSpellScript() const
PrepareSpellScript(spell_monk_fortifying_brew_SpellScript)
SpellScript * GetSpellScript() const override
PrepareSpellScript(spell_monk_glyph_of_mana_tea_SpellScript)
AuraScript * GetAuraScript() const
PrepareSpellScript(spell_monk_grapple_weapon_SpellScript) void HandleBeforeHit()
SpellScript * GetSpellScript() const
PrepareAuraScript(spell_monk_guard_AuraScript)
void CalculateAmount(AuraEffect const *, int32 &amount, bool &)
AuraScript * GetAuraScript() const
PrepareSpellScript(spell_monk_healing_elixirs_SpellScript)
SpellScript * GetSpellScript() const
PrepareSpellScript(spell_monk_keg_smash_SpellScript)
SpellScript * GetSpellScript() const
SpellScript * GetSpellScript() const override
PrepareAuraScript(spell_monk_mana_tea_AuraScript)
PrepareSpellScript(spell_monk_mana_tea_SpellScript)
void OnApply(AuraEffect const *, AuraEffectHandleModes)
PrepareAuraScript(spell_monk_mana_tea_stacks_AuraScript)
AuraScript * GetAuraScript() const
SpellScript * GetSpellScript() const
AuraScript * GetAuraScript() const
PrepareSpellScript(spell_monk_paralysis_SpellScript)
SpellScript * GetSpellScript() const
PrepareSpellScript(spell_monk_power_strikes_SpellScript) void HandleOnHit()
SpellScript * GetSpellScript() const
PrepareSpellScript(spell_monk_provoke_SpellScript)
SpellScript * GetSpellScript() const
PrepareSpellScript(spell_monk_purifying_brew_SpellScript)
SpellScript * GetSpellScript() const
PrepareSpellScript(spell_monk_roll_SpellScript)
SpellScript * GetSpellScript() const
PrepareAuraScript(spell_monk_serpents_zeal_AuraScript)
void OnProc(AuraEffect const *aurEff, ProcEventInfo &eventInfo)
AuraScript * GetAuraScript() const
void OnRemove(AuraEffect const *aurEff, AuraEffectHandleModes)
void OnApply(AuraEffect const *, AuraEffectHandleModes)
PrepareAuraScript(spell_monk_soothing_mist_AuraScript)
AuraScript * GetAuraScript() const
PrepareSpellScript(spell_monk_spear_hand_strike_SpellScript)
SpellScript * GetSpellScript() const
PrepareSpellScript(spell_monk_spinning_fire_blossom_SpellScript) void HandleAfterCast()
SpellScript * GetSpellScript() const
PrepareSpellScript(spell_monk_surging_mist_SpellScript)
SpellScript * GetSpellScript() const
void HandleProc(AuraEffect const *, ProcEventInfo &eventInfo)
PrepareAuraScript(spell_monk_tiger_strikes_AuraScript)
AuraScript * GetAuraScript() const
PrepareAuraScript(spell_monk_tigereye_brew_AuraScript)
void CalculateAmount(AuraEffect const *aurEff, int32 &amount, bool &)
PrepareSpellScript(spell_monk_tigereye_brew_SpellScript)
AuraScript * GetAuraScript() const
AuraScript * GetAuraScript() const
SpellScript * GetSpellScript() const
PrepareSpellScript(spell_monk_tigers_lust_SpellScript)
SpellScript * GetSpellScript() const
PrepareSpellScript(spell_monk_touch_of_death_SpellScript)
SpellScript * GetSpellScript() const override
void CalculateAmount(AuraEffect const *, int32 &amount, bool &)
PrepareAuraScript(spell_monk_touch_of_karma_AuraScript)
void OnAbsorb(AuraEffect *aurEff, DamageInfo &dmgInfo, uint32 &absorbAmount)
AuraScript * GetAuraScript() const
void CalculateAmount(AuraEffect const *, int32 &amount, bool &)
PrepareSpellScript(spell_monk_zen_flight_check_SpellScript)
AuraScript * GetAuraScript() const
SpellScript * GetSpellScript() const
PrepareSpellScript(spell_monk_zen_pilgrimage_SpellScript)
SpellScript * GetSpellScript() const
SpellScript * GetSpellScript() const
PrepareSpellScript(spell_monk_zen_sphere_SpellScript)
PrepareAuraScript(spell_monk_zen_sphere_hot_AuraScript)
AuraScript * GetAuraScript() const
SpellScript * GetSpellScript() const
void RandomResizeList(std::list< T > &list, uint32 size)
Definition Containers.h:19
PowerStrikes
@ SPELL_MONK_POWER_STRIKES_TALENT
@ SPELL_MONK_CREATE_CHI_SPHERE
void AddSC_monk_spell_scripts()
Serpent
@ MONK_NPC_JADE_SERPENT_STATUE
Renewing
@ CREATURE_SERPENT_ID
@ SPELL_MONK_RENEWING_MIST_JUMP_AURA
@ SPELL_MONK_GLYPH_OF_RENEWING_MIST
@ SPELL_MONK_RENEWING_MIST_HOT
Teachings
@ SPELL_MONK_SPINNING_CRANE_KICK_HEAL
ManaTea
@ SPELL_MONK_MANA_TEA_STACKS
@ SPELL_MONK_PLUS_ONE_MANA_TEA
@ SPELL_MONK_MANA_TEA_REGEN
Uplift
@ SPELL_MONK_UPLIFT_ALLOWING_CAST
@ SPELL_MONK_ITEM_2_S12_MISTWEAVER
MonkSpells
@ SPELL_MONK_ZEN_SPHERE_DETONATE_HEAL
@ SPELL_MONK_SPINNING_CRANE_KICK_ENERGIZE
@ SPELL_MONK_FLYING_SERPENT_KICK_AOE
@ SPELL_MONK_ELUSIVE_BREW_STACKS
@ SPELL_MONK_PROVOKE_AOE
@ SPELL_MONK_CLASH_CHARGE
@ SPELL_MONK_TOUCH_OF_KARMA_REDIRECT_DAMAGE
@ SPELL_MONK_ROLL_TRIGGER
@ SPELL_MONK_CRACKLING_JADE_LIGHTNING_KNOCKBACK
@ SPELL_MONK_SPINNING_CRANE_KICK
@ SPELL_MONK_CRACKLING_JADE_LIGHTNING_CHANNEL
@ SPELL_MONK_MODERATE_STAGGER
@ SPELL_MONK_ZEN_SPHERE_DETONATE_DAMAGE
@ SPELL_MONK_HEALING_SPHERE
@ SPELL_MONK_SPEAR_HAND_STRIKE_SILENCE
@ SPELL_MONK_TOUCH_OF_DEATH_PLAYER
@ SPELL_MONK_PARALYSIS
@ SPELL_MONK_GLYPH_OF_FORTIFYING_BREW
@ SPELL_MONK_SOOTHING_MIST_VISUAL
@ SPELL_MONK_FLYING_SERPENT_KICK
@ SPELL_MONK_FORTIFYING_BREW_AURA
@ SPELL_MONK_ZEN_PILGRIMAGE_RETURN
@ SPELL_MONK_DISABLE_ROOT
@ SPELL_MONK_HEALING_ELIXIRS_RESTORE_HEALTH
@ SPELL_MONK_TIGER_STRIKES
@ SPELL_MONK_HEALING_ELIXIRS_AURA
@ SPELL_MONK_LEGACY_OF_THE_EMPEROR_RAID
@ SPELL_MONK_LIGHT_STAGGER
@ SPELL_MONK_CHI_BURST_DAMAGE
@ SPELL_MONK_PROVOKE_TARGET
@ SPELL_MONK_BREWING_TIGEREYE_BREW
@ SPELL_MONK_TIGEREYE_BREW_BUFF
@ SPELL_MONK_CRACKLING_JADE_LIGHTNING_AURA
@ SPELL_MONK_CHI_BURST_HEAL
@ SPELL_MONK_BREATH_OF_FIRE_CONFUSE
@ SPELL_MONK_CHI_TORPEDO_HEAL
@ SPELL_MONK_TIGEREYE_BREW_STACKS
@ SPELL_MONK_ZEN_PILGRIMAGE
@ SPELL_MONK_ZEN_SPHERE_DAMAGE
@ MONK_NPC_BLACK_OX_STATUE
@ SPELL_MONK_ITEM_PVP_GLOVES_BONUS
@ SPELL_MONK_HEAVY_STAGGER
@ SPELL_MONK_EXPEL_HARM_AREA_DMG
@ SPELL_MONK_BREATH_OF_FIRE_PERIODIC
@ SPELL_MONK_ZEN_SPHERE_HEAL
@ SPELL_MONK_DIZZYING_HAZE
@ SPELL_MONK_CRACKLING_JADE_LIGHTNING_HIDDEN_CD
@ SPELL_MONK_CHI_TORPEDO_DAMAGE
@ SPELL_MONK_LEGACY_OF_THE_EMPEROR_ALLY
@ SPELL_MONK_KEG_SMASH_ENERGIZE
@ SPELL_MONK_CRACKLING_JADE_LIGHTNING_CHI_PROC
@ SPELL_MONK_GLYPH_OF_BREATH_OF_FIRE
@ SPELL_MONK_KEG_SMASH_VISUAL
@ SPELL_MONK_ELUSIVE_BREW
@ SPELL_MONK_SOOTHING_MIST_ENERGIZE
@ SPELL_MONK_WEAKENED_BLOWS
@ SPELL_MONK_TIGEREYE_BREW
Blackout
@ SPELL_MONK_SHUFFLE
@ SPELL_MONK_BLACKOUT_KICK_HEAL
@ SPELL_MONK_GLYPH_OF_BLACKOUT_KICK
@ SPELL_MONK_BLACKOUT_KICK_DOT
@ SPELL_MONK_COMBAT_CONDITIONING
BlackOx
@ SPELL_MONK_GUARD
SerpentZeal
@ SPELL_MONK_EMINENCE_HEAL
#define maxStack
Enveloping
@ SPELL_MONK_ENVELOPING_MIST_HEAL
bearHug
@ SPELL_MONK_BEAR_HUG
@ SPELL_MONK_ZEN_FLIGHT
SpinningFireBlossom
@ SPELL_MONK_SPINNING_FIRE_BLOSSOM_MISSILE
@ SPELL_MONK_SPINNING_FIRE_BLOSSOM_DAMAGE
@ SPELL_MONK_SPINNING_FIRE_BLOSSOM_ROOT
Grapple
@ SPELL_MONK_GRAPPLE_WEAPON_HEAL_UPGRADE
@ SPELL_MONK_GRAPPLE_WEAPON_DPS_UPGRADE
@ SPELL_MONK_GRAPPLE_WEAPON_TANK_UPGRADE
Surging
@ SPELL_MONK_SURGING_MIST_HEAL
uint32 m_id
auraData(uint32 id, uint64 casterGUID)
uint64 m_casterGuid