TrinityCore
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
spell_pet.cpp
Go to the documentation of this file.
1/*
2 * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the
6 * Free Software Foundation; either version 2 of the License, or (at your
7 * option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18/*
19 * Scripts for spells with SPELLFAMILY_DEATHKNIGHT and SPELLFAMILY_GENERIC spells used by deathknight players.
20 * Ordered alphabetically using scriptname.
21 * Scriptnames of files in this file should be prefixed with "spell_dk_".
22 */
23
24#include "ScriptMgr.h"
25#include "ObjectMgr.h"
26#include "Pet.h"
27#include "Player.h"
28#include "SpellAuraEffects.h"
29#include "SpellMgr.h"
30#include "SpellScript.h"
31#include "Unit.h"
32
34{
45};
46
48{
60 ENTRY_IMP = 416,
62};
63
65{
73};
74
76{
81};
82
84{
89};
90
92{
93 public:
94 spell_gen_pet_calculate() : SpellScriptLoader("spell_gen_pet_calculate") { }
95
97 {
99
100 bool Load() override
101 {
102 if (!GetCaster() || !GetCaster()->GetOwner() || GetCaster()->GetOwner()->GetTypeId() != TYPEID_PLAYER)
103 return false;
104 return true;
105 }
106
107 void CalculateAmountCritSpell(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
108 {
109 if (Player* owner = GetCaster()->GetOwner()->ToPlayer())
110 {
111 // For others recalculate it from:
112 float CritSpell = 0.0f;
113 // Crit from Intellect
114 CritSpell += owner->GetSpellCritFromIntellect();
115 // Increase crit from SPELL_AURA_MOD_SPELL_CRIT_CHANCE
116 CritSpell += owner->GetTotalAuraModifier(SPELL_AURA_MOD_SPELL_CRIT_CHANCE);
117 // Increase crit from SPELL_AURA_MOD_CRIT_PCT
118 CritSpell += owner->GetTotalAuraModifier(SPELL_AURA_MOD_CRIT_PCT);
119 // Increase crit spell from spell crit ratings
120 CritSpell += owner->GetRatingBonusValue(CR_CRIT_SPELL);
121
122 amount += int32(CritSpell);
123 }
124 }
125
126 void CalculateAmountCritMelee(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
127 {
128 if (Player* owner = GetCaster()->GetOwner()->ToPlayer())
129 {
130 // For others recalculate it from:
131 float CritMelee = 0.0f;
132 // Crit from Agility
133 CritMelee += owner->GetMeleeCritFromAgility();
134 // Increase crit from SPELL_AURA_MOD_WEAPON_CRIT_PERCENT
135 CritMelee += owner->GetTotalAuraModifier(SPELL_AURA_MOD_WEAPON_CRIT_PERCENT);
136 // Increase crit from SPELL_AURA_MOD_CRIT_PCT
137 CritMelee += owner->GetTotalAuraModifier(SPELL_AURA_MOD_CRIT_PCT);
138 // Increase crit melee from melee crit ratings
139 CritMelee += owner->GetRatingBonusValue(CR_CRIT_MELEE);
140
141 amount += int32(CritMelee);
142 }
143 }
144
145 void CalculateAmountMeleeHit(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
146 {
147 if (Player* owner = GetCaster()->GetOwner()->ToPlayer())
148 {
149 // For others recalculate it from:
150 float HitMelee = 0.0f;
151 // Increase hit from SPELL_AURA_MOD_HIT_CHANCE
152 HitMelee += owner->GetTotalAuraModifier(SPELL_AURA_MOD_HIT_CHANCE);
153 // Increase hit melee from meele hit ratings
154 HitMelee += owner->GetRatingBonusValue(CR_HIT_MELEE);
155
156 amount += int32(HitMelee);
157 }
158 }
159
160 void CalculateAmountSpellHit(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
161 {
162 if (Player* owner = GetCaster()->GetOwner()->ToPlayer())
163 {
164 // For others recalculate it from:
165 float HitSpell = 0.0f;
166 // Increase hit from SPELL_AURA_MOD_SPELL_HIT_CHANCE
167 HitSpell += owner->GetTotalAuraModifier(SPELL_AURA_MOD_SPELL_HIT_CHANCE);
168 // Increase hit spell from spell hit ratings
169 HitSpell += owner->GetRatingBonusValue(CR_HIT_SPELL);
170
171 amount += int32(HitSpell);
172 }
173 }
174
175 void CalculateAmountExpertise(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
176 {
177 if (Player* owner = GetCaster()->GetOwner()->ToPlayer())
178 {
179 // For others recalculate it from:
180 float Expertise = 0.0f;
181 // Increase hit from SPELL_AURA_MOD_EXPERTISE
182 Expertise += owner->GetTotalAuraModifier(SPELL_AURA_MOD_EXPERTISE);
183 // Increase Expertise from Expertise ratings
184 Expertise += owner->GetRatingBonusValue(CR_EXPERTISE);
185
186 amount += int32(Expertise);
187 }
188 }
189
190 void Register() override
191 {
192 switch (m_scriptSpellId)
193 {
197 break;
201 break;
207 break;
209// case SPELL_SHAMAN_PET_HIT:
212 break;
213 default:
214 break;
215 }
216 }
217 };
218
219 AuraScript* GetAuraScript() const override
220 {
222 }
223};
224
226{
227public:
228 spell_warl_pet_scaling_01() : SpellScriptLoader("spell_warl_pet_scaling_01") { }
229
231 {
233
234 public:
236 {
237 _tempBonus = 0;
238 }
239
240 private:
241 bool Load() override
242 {
243 if (!GetCaster() || !GetCaster()->GetOwner() || GetCaster()->GetOwner()->GetTypeId() != TYPEID_PLAYER)
244 return false;
245 return true;
246 }
247
248 void CalculateStaminaAmount(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
249 {
250 if (Unit* pet = GetUnitOwner())
251 if (pet->IsPet())
252 if (Unit* owner = pet->ToPet()->GetOwner())
253 {
254 float ownerBonus = CalculatePct(owner->GetStat(STAT_STAMINA), 75);
255
256 amount += ownerBonus;
257 }
258 }
259
260 void ApplyEffect(AuraEffect const* /* aurEff */, AuraEffectHandleModes /*mode*/)
261 {
262 if (Unit* pet = GetUnitOwner())
263 if (_tempBonus)
264 {
265 PetLevelInfo const* pInfo = sObjectMgr->GetPetLevelInfo(pet->GetEntry(), pet->GetLevel());
266 uint32 healthMod = 0;
267 uint32 baseHealth = pInfo->health;
268 switch (pet->GetEntry())
269 {
270 case ENTRY_IMP:
271 healthMod = uint32(_tempBonus * 8.4f);
272 break;
273 case ENTRY_FELGUARD:
274 case ENTRY_VOIDWALKER:
275 healthMod = _tempBonus * 11;
276 break;
277 case ENTRY_SUCCUBUS:
278 healthMod = uint32(_tempBonus * 9.1f);
279 break;
280 case ENTRY_FELHUNTER:
281 healthMod = uint32(_tempBonus * 9.5f);
282 break;
283 default:
284 healthMod = 0;
285 break;
286 }
287 if (healthMod)
288 pet->ToPet()->SetCreateHealth(baseHealth + healthMod);
289 }
290 }
291
292 void RemoveEffect(AuraEffect const* /* aurEff */, AuraEffectHandleModes /*mode*/)
293 {
294 if (Unit* pet = GetUnitOwner())
295 if (pet->IsPet())
296 {
297 PetLevelInfo const* pInfo = sObjectMgr->GetPetLevelInfo(pet->GetEntry(), pet->GetLevel());
298 pet->ToPet()->SetCreateHealth(pInfo->health);
299 }
300 }
301
302 void CalculateAttackPowerAmount(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
303 {
304 if (Unit* pet = GetUnitOwner())
305 if (pet->IsPet())
306
307 if (Unit* owner = pet->ToPet()->GetOwner())
308 {
311 int32 maximum = (fire > shadow) ? fire : shadow;
312 if (maximum < 0)
313 maximum = 0;
314 float bonusAP = maximum * 0.57f;
315
316 amount += bonusAP;
317
318 // Glyph of felguard
319 if (pet->GetEntry() == ENTRY_FELGUARD)
320 {
321 if (AuraEffect* /* aurEff */ect = owner->GetAuraEffect(56246, EFFECT_0))
322 {
323 float base_attPower = pet->GetFlatModifierValue(UNIT_MOD_ATTACK_POWER, BASE_VALUE) * pet->GetPctModifierValue(UNIT_MOD_ATTACK_POWER, BASE_PCT);
324 amount += CalculatePct(amount+base_attPower, /* aurEff */ect->GetAmount());
325 }
326 }
327 }
328 }
329
330 void CalculateDamageDoneAmount(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
331 {
332 if (Unit* pet = GetUnitOwner())
333 if (pet->IsPet())
334 if (Unit* owner = pet->ToPet()->GetOwner())
335 {
336 //the damage bonus used for pets is either fire or shadow damage, whatever is higher
339 int32 maximum = (fire > shadow) ? fire : shadow;
340 float bonusDamage = 0.0f;
341
342 if (maximum > 0)
343 bonusDamage = maximum * 0.15f;
344
345 amount += bonusDamage;
346 }
347 }
348
349 void Register() override
350 {
356 }
357
358 private:
360 };
361
362 AuraScript* GetAuraScript() const override
363 {
365 }
366};
367
369{
370public:
371 spell_warl_pet_scaling_02() : SpellScriptLoader("spell_warl_pet_scaling_02") { }
372
374 {
376
377 public:
379 {
380 _tempBonus = 0;
381 }
382
383 private:
384 bool Load() override
385 {
386 if (!GetCaster() || !GetCaster()->GetOwner() || GetCaster()->GetOwner()->GetTypeId() != TYPEID_PLAYER)
387 return false;
388 return true;
389 }
390
391 void CalculateIntellectAmount(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
392 {
393 if (Unit* pet = GetUnitOwner())
394 if (pet->IsPet())
395 if (Unit* owner = pet->ToPet()->GetOwner())
396 {
397 float ownerBonus = 0.0f;
398
399 ownerBonus = CalculatePct(owner->GetStat(STAT_INTELLECT), 30);
400
401 amount += ownerBonus;
402 _tempBonus = ownerBonus;
403 }
404 }
405
406 void ApplyEffect(AuraEffect const* /* aurEff */, AuraEffectHandleModes /*mode*/)
407 {
408 if (Unit* pet = GetUnitOwner())
409 if (_tempBonus)
410 {
411 PetLevelInfo const* pInfo = sObjectMgr->GetPetLevelInfo(pet->GetEntry(), pet->GetLevel());
412 uint32 manaMod = 0;
413 uint32 baseMana = pInfo->mana;
414 switch (pet->GetEntry())
415 {
416 case ENTRY_IMP:
417 manaMod = uint32(_tempBonus * 4.9f);
418 break;
419 case ENTRY_VOIDWALKER:
420 case ENTRY_SUCCUBUS:
421 case ENTRY_FELHUNTER:
422 case ENTRY_FELGUARD:
423 manaMod = uint32(_tempBonus * 11.5f);
424 break;
425 default:
426 manaMod = 0;
427 break;
428 }
429 if (manaMod)
430 pet->ToPet()->SetCreateMana(baseMana + manaMod);
431 }
432 }
433
434 void RemoveEffect(AuraEffect const* /* aurEff */, AuraEffectHandleModes /*mode*/)
435 {
436 if (Unit* pet = GetUnitOwner())
437 if (pet->IsPet())
438 {
439 PetLevelInfo const* pInfo = sObjectMgr->GetPetLevelInfo(pet->GetEntry(), pet->GetLevel());
440 pet->ToPet()->SetCreateMana(pInfo->mana);
441 }
442 }
443
444 void CalculateArmorAmount(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
445 {
446 if (Unit* pet = GetUnitOwner())
447 if (pet->IsPet())
448 if (Unit* owner = pet->ToPet()->GetOwner())
449 {
450 float ownerBonus = 0.0f;
451 ownerBonus = CalculatePct(owner->GetArmor(), 35);
452 amount += ownerBonus;
453 }
454 }
455
456 void CalculateFireResistanceAmount(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
457 {
458 if (Unit* pet = GetUnitOwner())
459 if (pet->IsPet())
460 if (Unit* owner = pet->ToPet()->GetOwner())
461 {
462 float ownerBonus = 0.0f;
463 ownerBonus = CalculatePct(owner->GetResistance(SPELL_SCHOOL_FIRE), 40);
464 amount += ownerBonus;
465 }
466 }
467
468 void Register() override
469 {
475 }
476
477 private:
479 };
480
481 AuraScript* GetAuraScript() const override
482 {
484 }
485};
486
488{
489public:
490 spell_warl_pet_scaling_03() : SpellScriptLoader("spell_warl_pet_scaling_03") { }
491
493 {
495
496 bool Load() override
497 {
498 if (!GetCaster() || !GetCaster()->GetOwner() || GetCaster()->GetOwner()->GetTypeId() != TYPEID_PLAYER)
499 return false;
500 return true;
501 }
502
503 void CalculateFrostResistanceAmount(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
504 {
505 if (Unit* pet = GetUnitOwner())
506 if (pet->IsPet())
507 if (Unit* owner = pet->ToPet()->GetOwner())
508 {
509 float ownerBonus = 0.0f;
510 ownerBonus = CalculatePct(owner->GetResistance(SPELL_SCHOOL_FROST), 40);
511 amount += ownerBonus;
512 }
513 }
514
515 void CalculateArcaneResistanceAmount(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
516 {
517 if (Unit* pet = GetUnitOwner())
518 if (pet->IsPet())
519 if (Unit* owner = pet->ToPet()->GetOwner())
520 {
521 float ownerBonus = 0.0f;
522 ownerBonus = CalculatePct(owner->GetResistance(SPELL_SCHOOL_ARCANE), 40);
523 amount += ownerBonus;
524 }
525 }
526
527 void CalculateNatureResistanceAmount(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
528 {
529 if (Unit* pet = GetUnitOwner())
530 if (pet->IsPet())
531 if (Unit* owner = pet->ToPet()->GetOwner())
532 {
533 float ownerBonus = 0.0f;
534 ownerBonus = CalculatePct(owner->GetResistance(SPELL_SCHOOL_NATURE), 40);
535 amount += ownerBonus;
536 }
537 }
538
539 void Register() override
540 {
544 }
545 };
546
547 AuraScript* GetAuraScript() const override
548 {
550 }
551};
552
554{
555public:
556 spell_warl_pet_scaling_04() : SpellScriptLoader("spell_warl_pet_scaling_04") { }
557
559 {
561
562 bool Load() override
563 {
564 if (!GetCaster() || !GetCaster()->GetOwner() || GetCaster()->GetOwner()->GetTypeId() != TYPEID_PLAYER)
565 return false;
566 return true;
567 }
568
569 void CalculateShadowResistanceAmount(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
570 {
571 if (Unit* pet = GetUnitOwner())
572 if (pet->IsPet())
573 if (Unit* owner = pet->ToPet()->GetOwner())
574 {
575 float ownerBonus = 0.0f;
576 ownerBonus = CalculatePct(owner->GetResistance(SPELL_SCHOOL_SHADOW), 40);
577 amount += ownerBonus;
578 }
579 }
580
581 void Register() override
582 {
584 }
585 };
586
587 AuraScript* GetAuraScript() const override
588 {
590 }
591};
592
594{
595public:
596 spell_warl_pet_scaling_05() : SpellScriptLoader("spell_warl_pet_scaling_05") { }
597
599 {
601
602 bool Load() override
603 {
604 if (!GetCaster() || !GetCaster()->GetOwner() || GetCaster()->GetOwner()->GetTypeId() != TYPEID_PLAYER)
605 return false;
606 return true;
607 }
608
609 void CalculateAmountMeleeHit(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
610 {
611 if (Player* owner = GetCaster()->GetOwner()->ToPlayer())
612 {
613 // For others recalculate it from:
614 float HitMelee = 0.0f;
615 // Increase hit from SPELL_AURA_MOD_SPELL_HIT_CHANCE
616 HitMelee += owner->GetTotalAuraModifier(SPELL_AURA_MOD_SPELL_HIT_CHANCE);
617 // Increase hit spell from spell hit ratings
618 HitMelee += owner->GetRatingBonusValue(CR_HIT_SPELL);
619
620 amount += int32(HitMelee);
621 }
622 }
623
624 void CalculateAmountSpellHit(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
625 {
626 if (Player* owner = GetCaster()->GetOwner()->ToPlayer())
627 {
628 // For others recalculate it from:
629 float HitSpell = 0.0f;
630 // Increase hit from SPELL_AURA_MOD_SPELL_HIT_CHANCE
631 HitSpell += owner->GetTotalAuraModifier(SPELL_AURA_MOD_SPELL_HIT_CHANCE);
632 // Increase hit spell from spell hit ratings
633 HitSpell += owner->GetRatingBonusValue(CR_HIT_SPELL);
634
635 amount += int32(HitSpell);
636 }
637 }
638
639 void CalculateAmountExpertise(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
640 {
641 if (Player* owner = GetCaster()->GetOwner()->ToPlayer())
642 {
643 // For others recalculate it from:
644 float Expertise = 0.0f;
645 // Increase hit from SPELL_AURA_MOD_SPELL_HIT_CHANCE
646 Expertise += owner->GetTotalAuraModifier(SPELL_AURA_MOD_SPELL_HIT_CHANCE);
647 // Increase hit spell from spell hit ratings
648 Expertise += owner->GetRatingBonusValue(CR_HIT_SPELL);
649
650 amount += int32(Expertise);
651 }
652 }
653
654 void Register() override
655 {
659 }
660 };
661
662 AuraScript* GetAuraScript() const override
663 {
665 }
666};
667
669{
670public:
671 spell_warl_pet_passive() : SpellScriptLoader("spell_warl_pet_passive") { }
672
674 {
676
677 bool Load() override
678 {
679 if (!GetCaster() || !GetCaster()->GetOwner() || GetCaster()->GetOwner()->GetTypeId() != TYPEID_PLAYER)
680 return false;
681 return true;
682 }
683
684 void CalculateAmountCritSpell(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
685 {
686 if (Player* owner = GetCaster()->GetOwner()->ToPlayer())
687 {
688 // For others recalculate it from:
689 float CritSpell = 0.0f;
690 // Crit from Intellect
691 CritSpell += owner->GetSpellCritFromIntellect();
692 // Increase crit from SPELL_AURA_MOD_SPELL_CRIT_CHANCE
693 CritSpell += owner->GetTotalAuraModifier(SPELL_AURA_MOD_SPELL_CRIT_CHANCE);
694 // Increase crit from SPELL_AURA_MOD_CRIT_PCT
695 CritSpell += owner->GetTotalAuraModifier(SPELL_AURA_MOD_CRIT_PCT);
696 // Increase crit spell from spell crit ratings
697 CritSpell += owner->GetRatingBonusValue(CR_CRIT_SPELL);
698
699 if (AuraApplication* improvedDemonicTacticsApp = owner->GetAuraApplicationOfRankedSpell(54347))
700 if (Aura* improvedDemonicTactics = improvedDemonicTacticsApp->GetBase())
701 if (AuraEffect* improvedDemonicTacticsEffect = improvedDemonicTactics->GetEffect(EFFECT_0))
702 amount += CalculatePct(CritSpell, improvedDemonicTacticsEffect->GetAmount());
703 }
704 }
705
706 void CalculateAmountCritMelee(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
707 {
708 if (Player* owner = GetCaster()->GetOwner()->ToPlayer())
709 {
710 // For others recalculate it from:
711 float CritMelee = 0.0f;
712 // Crit from Agility
713 CritMelee += owner->GetMeleeCritFromAgility();
714 // Increase crit from SPELL_AURA_MOD_WEAPON_CRIT_PERCENT
715 CritMelee += owner->GetTotalAuraModifier(SPELL_AURA_MOD_WEAPON_CRIT_PERCENT);
716 // Increase crit from SPELL_AURA_MOD_CRIT_PCT
717 CritMelee += owner->GetTotalAuraModifier(SPELL_AURA_MOD_CRIT_PCT);
718 // Increase crit melee from melee crit ratings
719 CritMelee += owner->GetRatingBonusValue(CR_CRIT_MELEE);
720
721 if (AuraApplication* improvedDemonicTacticsApp = owner->GetAuraApplicationOfRankedSpell(54347))
722 if (Aura* improvedDemonicTactics = improvedDemonicTacticsApp->GetBase())
723 if (AuraEffect* improvedDemonicTacticsEffect = improvedDemonicTactics->GetEffect(EFFECT_0))
724 amount += CalculatePct(CritMelee, improvedDemonicTacticsEffect->GetAmount());
725 }
726 }
727
728 void Register() override
729 {
732 }
733 };
734
735 AuraScript* GetAuraScript() const override
736 {
738 }
739};
740// this doesnt actually fit in here
742{
743public:
744 spell_warl_pet_passive_damage_done() : SpellScriptLoader("spell_warl_pet_passive_damage_done") { }
745
747 {
749
750 bool Load() override
751 {
752 if (!GetCaster() || !GetCaster()->GetOwner() || GetCaster()->GetOwner()->GetTypeId() != TYPEID_PLAYER)
753 return false;
754 return true;
755 }
756
757 void CalculateAmountDamageDone(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
758 {
759 if (!GetCaster() || !GetCaster()->GetOwner())
760 return;
761 if (GetCaster()->GetOwner()->ToPlayer())
762 {
763 switch (GetCaster()->GetEntry())
764 {
765 case ENTRY_VOIDWALKER:
766 amount += -16;
767 break;
768 case ENTRY_FELHUNTER:
769 amount += -20;
770 break;
771 case ENTRY_SUCCUBUS:
772 case ENTRY_FELGUARD:
773 amount += 5;
774 break;
775 }
776 }
777 }
778
779 void Register() override
780 {
783 }
784 };
785
786 AuraScript* GetAuraScript() const override
787 {
789 }
790};
791
793{
794public:
795 spell_warl_pet_passive_voidwalker() : SpellScriptLoader("spell_warl_pet_passive_voidwalker") { }
796
798 {
800
801 bool Load() override
802 {
803 if (!GetCaster() || !GetCaster()->GetOwner() || GetCaster()->GetOwner()->GetTypeId() != TYPEID_PLAYER)
804 return false;
805 return true;
806 }
807
808 void CalculateAmount(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
809 {
810 if (Unit* pet = GetUnitOwner())
811 if (pet->IsPet())
812 if (Unit* owner = pet->ToPet()->GetOwner())
813 if (AuraEffect* /* aurEff */ect = owner->GetAuraEffect(SPELL_WARLOCK_GLYPH_OF_VOIDWALKER, EFFECT_0))
814 amount += /* aurEff */ect->GetAmount();
815 }
816
817 void Register() override
818 {
820 }
821 };
822
823 AuraScript* GetAuraScript() const override
824 {
826 }
827};
828
830{
831public:
832 spell_sha_pet_scaling_04() : SpellScriptLoader("spell_sha_pet_scaling_04") { }
833
835 {
837
838 bool Load() override
839 {
840 if (!GetCaster() || !GetCaster()->GetOwner() || GetCaster()->GetOwner()->GetTypeId() != TYPEID_PLAYER)
841 return false;
842 return true;
843 }
844
845 void CalculateAmountMeleeHit(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
846 {
847 if (Player* owner = GetCaster()->GetOwner()->ToPlayer())
848 {
849 // For others recalculate it from:
850 float HitMelee = 0.0f;
851 // Increase hit from SPELL_AURA_MOD_HIT_CHANCE
852 HitMelee += owner->GetTotalAuraModifier(SPELL_AURA_MOD_HIT_CHANCE);
853 // Increase hit melee from meele hit ratings
854 HitMelee += owner->GetRatingBonusValue(CR_HIT_MELEE);
855
856 amount += int32(HitMelee);
857 }
858 }
859
860 void CalculateAmountSpellHit(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
861 {
862 if (Player* owner = GetCaster()->GetOwner()->ToPlayer())
863 {
864 // For others recalculate it from:
865 float HitSpell = 0.0f;
866 // Increase hit from SPELL_AURA_MOD_SPELL_HIT_CHANCE
867 HitSpell += owner->GetTotalAuraModifier(SPELL_AURA_MOD_SPELL_HIT_CHANCE);
868 // Increase hit spell from spell hit ratings
869 HitSpell += owner->GetRatingBonusValue(CR_HIT_SPELL);
870
871 amount += int32(HitSpell);
872 }
873 }
874
875 void Register() override
876 {
879 }
880 };
881
882 AuraScript* GetAuraScript() const override
883 {
885 }
886};
887
889{
890public:
891 spell_hun_pet_scaling_01() : SpellScriptLoader("spell_hun_pet_scaling_01") { }
892
894 {
896
897 public:
899 {
900 _tempHealth = 0;
901 }
902
903 private:
904 void CalculateStaminaAmount(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
905 {
906 if (Unit* pet = GetUnitOwner())
907 if (pet->IsPet())
908 if (Unit* owner = pet->ToPet()->GetOwner())
909 {
910 float mod = 0.45f;
911 float ownerBonus = 0.0f;
912
913 PetSpellMap::const_iterator itr = (pet->ToPet()->m_spells.find(62758)); // Wild Hunt rank 1
914 if (itr == pet->ToPet()->m_spells.end())
915 itr = pet->ToPet()->m_spells.find(62762); // Wild Hunt rank 2
916
917 if (itr != pet->ToPet()->m_spells.end()) // If pet has Wild Hunt
918 {
919 SpellInfo const* spellInfo = sSpellMgr->AssertSpellInfo(itr->first); // Then get the SpellProto and add the dummy effect value
920 AddPct(mod, spellInfo->GetEffect(EFFECT_0).CalcValue());
921 }
922
923 ownerBonus = owner->GetStat(STAT_STAMINA)*mod;
924
925 amount += ownerBonus;
926 }
927 }
928
929 void ApplyEffect(AuraEffect const* /* aurEff */, AuraEffectHandleModes /*mode*/)
930 {
931 if (Unit* pet = GetUnitOwner())
932 if (_tempHealth)
933 pet->SetHealth(_tempHealth);
934 }
935
936 void RemoveEffect(AuraEffect const* /* aurEff */, AuraEffectHandleModes /*mode*/)
937 {
938 if (Unit* pet = GetUnitOwner())
939 _tempHealth = pet->GetHealth();
940 }
941
942 void CalculateAttackPowerAmount(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
943 {
944 if (Unit* pet = GetUnitOwner())
945 {
946 if (!pet->IsPet())
947 return;
948
949 Unit* owner = pet->ToPet()->GetOwner();
950 if (!owner)
951 return;
952
953 float mod = 1.0f; //Hunter contribution modifier
954 float bonusAP = 0.0f;
955
956 PetSpellMap::const_iterator itr = (pet->ToPet()->m_spells.find(62758)); // Wild Hunt rank 1
957 if (itr == pet->ToPet()->m_spells.end())
958 itr = pet->ToPet()->m_spells.find(62762); // Wild Hunt rank 2
959
960 if (itr != pet->ToPet()->m_spells.end()) // If pet has Wild Hunt
961 {
962 SpellInfo const* spellInfo = sSpellMgr->AssertSpellInfo(itr->first); // Then get the SpellProto and add the dummy effect value
963 mod += CalculatePct(1.0f, spellInfo->GetEffect(EFFECT_1).CalcValue());
964 }
965
966 bonusAP = owner->GetTotalAttackPowerValue(RANGED_ATTACK) * 0.22f * mod;
967
968 amount += bonusAP;
969 }
970 }
971
972 void CalculateDamageDoneAmount(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
973 {
974 if (Unit* pet = GetUnitOwner())
975 {
976 if (!pet->IsPet())
977 return;
978
979 Unit* owner = pet->ToPet()->GetOwner();
980 if (!owner)
981 return;
982
983 float mod = 1.0f; //Hunter contribution modifier
984 float bonusDamage = 0.0f;
985
986 PetSpellMap::const_iterator itr = (pet->ToPet()->m_spells.find(62758)); // Wild Hunt rank 1
987 if (itr == pet->ToPet()->m_spells.end())
988 itr = pet->ToPet()->m_spells.find(62762); // Wild Hunt rank 2
989
990 if (itr != pet->ToPet()->m_spells.end()) // If pet has Wild Hunt
991 {
992 SpellInfo const* spellInfo = sSpellMgr->AssertSpellInfo(itr->first); // Then get the SpellProto and add the dummy effect value
993 mod += CalculatePct(1.0f, spellInfo->GetEffect(EFFECT_1).CalcValue());
994 }
995
996 bonusDamage = owner->GetTotalAttackPowerValue(RANGED_ATTACK) * 0.1287f * mod;
997
998 amount += bonusDamage;
999 }
1000 }
1001
1002 void Register() override
1003 {
1009 }
1010
1011 private:
1013 };
1014
1015 AuraScript* GetAuraScript() const override
1016 {
1018 }
1019};
1020
1022{
1023public:
1024 spell_hun_pet_scaling_02() : SpellScriptLoader("spell_hun_pet_scaling_02") { }
1025
1027 {
1029
1030 bool Load() override
1031 {
1032 if (!GetCaster() || !GetCaster()->GetOwner() || GetCaster()->GetOwner()->GetTypeId() != TYPEID_PLAYER)
1033 return false;
1034 return true;
1035 }
1036
1037 void CalculateFrostResistanceAmount(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
1038 {
1039 if (Unit* pet = GetUnitOwner())
1040 {
1041 if (!pet->IsPet())
1042 return;
1043
1044 Unit* owner = pet->ToPet()->GetOwner();
1045 if (!owner)
1046 return;
1047
1048 float ownerBonus = 0.0f;
1049
1050 ownerBonus = CalculatePct(owner->GetResistance(SPELL_SCHOOL_FROST), 40);
1051
1052 amount += ownerBonus;
1053 }
1054 }
1055
1056 void CalculateFireResistanceAmount(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
1057 {
1058 if (Unit* pet = GetUnitOwner())
1059 {
1060 if (!pet->IsPet())
1061 return;
1062
1063 Unit* owner = pet->ToPet()->GetOwner();
1064 if (!owner)
1065 return;
1066
1067 float ownerBonus = 0.0f;
1068
1069 ownerBonus = CalculatePct(owner->GetResistance(SPELL_SCHOOL_FIRE), 40);
1070
1071 amount += ownerBonus;
1072 }
1073 }
1074
1075 void CalculateNatureResistanceAmount(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
1076 {
1077 if (Unit* pet = GetUnitOwner())
1078 {
1079 if (!pet->IsPet())
1080 return;
1081
1082 Unit* owner = pet->ToPet()->GetOwner();
1083 if (!owner)
1084 return;
1085
1086 float ownerBonus = 0.0f;
1087
1088 ownerBonus = CalculatePct(owner->GetResistance(SPELL_SCHOOL_NATURE), 40);
1089
1090 amount += ownerBonus;
1091 }
1092 }
1093
1094 void Register() override
1095 {
1099 }
1100 };
1101
1102 AuraScript* GetAuraScript() const override
1103 {
1105 }
1106};
1107
1109{
1110public:
1111 spell_hun_pet_scaling_03() : SpellScriptLoader("spell_hun_pet_scaling_03") { }
1112
1114 {
1116
1117 bool Load() override
1118 {
1119 if (!GetCaster() || !GetCaster()->GetOwner() || GetCaster()->GetOwner()->GetTypeId() != TYPEID_PLAYER)
1120 return false;
1121 return true;
1122 }
1123
1124 void CalculateShadowResistanceAmount(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
1125 {
1126 if (Unit* pet = GetUnitOwner())
1127 {
1128 if (!pet->IsPet())
1129 return;
1130
1131 Unit* owner = pet->ToPet()->GetOwner();
1132 if (!owner)
1133 return;
1134
1135 float ownerBonus = 0.0f;
1136
1137 ownerBonus = CalculatePct(owner->GetResistance(SPELL_SCHOOL_SHADOW), 40);
1138
1139 amount += ownerBonus;
1140 }
1141 }
1142
1143 void CalculateArcaneResistanceAmount(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
1144 {
1145 if (Unit* pet = GetUnitOwner())
1146 {
1147 if (!pet->IsPet())
1148 return;
1149
1150 Unit* owner = pet->ToPet()->GetOwner();
1151 if (!owner)
1152 return;
1153
1154 float ownerBonus = 0.0f;
1155
1156 ownerBonus = CalculatePct(owner->GetResistance(SPELL_SCHOOL_ARCANE), 40);
1157
1158 amount += ownerBonus;
1159 }
1160 }
1161
1162 void CalculateArmorAmount(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
1163 {
1164 if (Unit* pet = GetUnitOwner())
1165 {
1166 if (!pet->IsPet())
1167 return;
1168
1169 Unit* owner = pet->ToPet()->GetOwner();
1170 if (!owner)
1171 return;
1172
1173 float ownerBonus = 0.0f;
1174
1175 ownerBonus = CalculatePct(owner->GetArmor(), 35);
1176
1177 amount += ownerBonus;
1178 }
1179 }
1180
1181 void Register() override
1182 {
1186 }
1187 };
1188
1189 AuraScript* GetAuraScript() const override
1190 {
1192 }
1193};
1194
1196{
1197public:
1198 spell_hun_pet_scaling_04() : SpellScriptLoader("spell_hun_pet_scaling_04") { }
1199
1201 {
1203
1204 bool Load() override
1205 {
1206 if (!GetCaster() || !GetCaster()->GetOwner() || GetCaster()->GetOwner()->GetTypeId() != TYPEID_PLAYER)
1207 return false;
1208 return true;
1209 }
1210
1211 void CalculateAmountMeleeHit(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
1212 {
1213 if (!GetCaster() || !GetCaster()->GetOwner())
1214 return;
1215 if (Player* owner = GetCaster()->GetOwner()->ToPlayer())
1216 {
1217 // For others recalculate it from:
1218 float HitMelee = 0.0f;
1219 // Increase hit from SPELL_AURA_MOD_HIT_CHANCE
1220 HitMelee += owner->GetTotalAuraModifier(SPELL_AURA_MOD_HIT_CHANCE);
1221 // Increase hit melee from meele hit ratings
1222 HitMelee += owner->GetRatingBonusValue(CR_HIT_MELEE);
1223
1224 amount += int32(HitMelee);
1225 }
1226 }
1227
1228 void CalculateAmountSpellHit(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
1229 {
1230 if (!GetCaster() || !GetCaster()->GetOwner())
1231 return;
1232 if (Player* owner = GetCaster()->GetOwner()->ToPlayer())
1233 {
1234 // For others recalculate it from:
1235 float HitSpell = 0.0f;
1236 // Increase hit from SPELL_AURA_MOD_SPELL_HIT_CHANCE
1237 HitSpell += owner->GetTotalAuraModifier(SPELL_AURA_MOD_SPELL_HIT_CHANCE);
1238 // Increase hit spell from spell hit ratings
1239 HitSpell += owner->GetRatingBonusValue(CR_HIT_SPELL);
1240
1241 amount += int32(HitSpell);
1242 }
1243 }
1244
1245 void CalculateAmountExpertise(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
1246 {
1247 if (!GetCaster() || !GetCaster()->GetOwner())
1248 return;
1249 if (Player* owner = GetCaster()->GetOwner()->ToPlayer())
1250 {
1251 // For others recalculate it from:
1252 float Expertise = 0.0f;
1253 // Increase hit from SPELL_AURA_MOD_EXPERTISE
1254 Expertise += owner->GetTotalAuraModifier(SPELL_AURA_MOD_EXPERTISE);
1255 // Increase Expertise from Expertise ratings
1256 Expertise += owner->GetRatingBonusValue(CR_EXPERTISE);
1257
1258 amount += int32(Expertise);
1259 }
1260 }
1261
1262 void Register() override
1263 {
1267 }
1268 };
1269
1270 AuraScript* GetAuraScript() const override
1271 {
1273 }
1274};
1275
1277{
1278public:
1279 spell_hun_pet_passive_crit() : SpellScriptLoader("spell_hun_pet_passive_crit") { }
1280
1282 {
1284
1285 bool Load() override
1286 {
1287 if (!GetCaster() || !GetCaster()->GetOwner() || GetCaster()->GetOwner()->GetTypeId() != TYPEID_PLAYER)
1288 return false;
1289 return true;
1290 }
1291
1292 void CalculateAmountCritSpell(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
1293 {
1294 if (!GetCaster() || !GetCaster()->GetOwner())
1295 return;
1296 if (GetCaster()->GetOwner()->ToPlayer())
1297 {
1298 // For others recalculate it from:
1299 float CritSpell = 0.0f;
1300 // Crit from Intellect
1301 // CritSpell += owner->GetSpellCritFromIntellect();
1302 // Increase crit from SPELL_AURA_MOD_SPELL_CRIT_CHANCE
1303 // CritSpell += owner->GetTotalAuraModifier(SPELL_AURA_MOD_SPELL_CRIT_CHANCE);
1304 // Increase crit from SPELL_AURA_MOD_CRIT_PCT
1305 // CritSpell += owner->GetTotalAuraModifier(SPELL_AURA_MOD_CRIT_PCT);
1306 // Increase crit spell from spell crit ratings
1307 // CritSpell += owner->GetRatingBonusValue(CR_CRIT_SPELL);
1308
1309 amount += (CritSpell*0.8f);
1310 }
1311 }
1312
1313 void CalculateAmountCritMelee(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
1314 {
1315 if (!GetCaster() || !GetCaster()->GetOwner())
1316 return;
1317 if (GetCaster()->GetOwner()->ToPlayer())
1318 {
1319 // For others recalculate it from:
1320 float CritMelee = 0.0f;
1321 // Crit from Agility
1322 // CritMelee += owner->GetMeleeCritFromAgility();
1323 // Increase crit from SPELL_AURA_MOD_WEAPON_CRIT_PERCENT
1324 // CritMelee += owner->GetTotalAuraModifier(SPELL_AURA_MOD_WEAPON_CRIT_PERCENT);
1325 // Increase crit from SPELL_AURA_MOD_CRIT_PCT
1326 // CritMelee += owner->GetTotalAuraModifier(SPELL_AURA_MOD_CRIT_PCT);
1327 // Increase crit melee from melee crit ratings
1328 // CritMelee += owner->GetRatingBonusValue(CR_CRIT_MELEE);
1329
1330 amount += (CritMelee*0.8f);
1331 }
1332 }
1333
1334 void Register() override
1335 {
1338 }
1339 };
1340
1341 AuraScript* GetAuraScript() const override
1342 {
1344 }
1345};
1346
1348{
1349public:
1350 spell_hun_pet_passive_damage_done() : SpellScriptLoader("spell_hun_pet_passive_damage_done") { }
1351
1353 {
1355
1356 bool Load() override
1357 {
1358 if (!GetCaster() || !GetCaster()->GetOwner() || GetCaster()->GetOwner()->GetTypeId() != TYPEID_PLAYER)
1359 return false;
1360 return true;
1361 }
1362
1363 void CalculateAmountDamageDone(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
1364 {
1365 if (!GetCaster() || !GetCaster()->GetOwner())
1366 return;
1367 if (GetCaster()->GetOwner()->ToPlayer())
1368 {
1369 // Pet's base damage changes depending on happiness
1370 if (GetCaster()->IsPet() && GetCaster()->IsHunterPet())
1371 {
1372 switch (GetCaster()->ToPet()->GetHappinessState())
1373 {
1374 case HAPPY:
1375 // 125% of normal damage
1376 amount += 25.0f;
1377 break;
1378 case CONTENT:
1379 // 100% of normal damage, nothing to modify
1380 break;
1381 case UNHAPPY:
1382 // 75% of normal damage
1383 amount += -25.0f;
1384 break;
1385 }
1386 }
1387 // Cobra Reflexes
1388 if (AuraEffect* cobraReflexes = GetCaster()->GetAuraEffectOfRankedSpell(61682, EFFECT_0))
1389 amount -= cobraReflexes->GetAmount();
1390 }
1391 }
1392
1393 void Register() override
1394 {
1396 }
1397 };
1398
1399 AuraScript* GetAuraScript() const override
1400 {
1402 }
1403};
1404
1406{
1407public:
1408 spell_hun_animal_handler() : SpellScriptLoader("spell_hun_animal_handler") { }
1409
1411 {
1413
1414 bool Load() override
1415 {
1416 if (!GetCaster() || !GetCaster()->GetOwner() || GetCaster()->GetOwner()->GetTypeId() != TYPEID_PLAYER)
1417 return false;
1418 return true;
1419 }
1420
1421 void CalculateAmountDamageDone(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
1422 {
1423 if (!GetCaster() || !GetCaster()->GetOwner())
1424 return;
1425 if (Player* owner = GetCaster()->GetOwner()->ToPlayer())
1426 {
1427 if (AuraEffect* /* aurEff */ect = owner->GetAuraEffectOfRankedSpell(SPELL_HUNTER_ANIMAL_HANDLER, EFFECT_1))
1428 amount = /* aurEff */ect->GetAmount();
1429 else
1430 amount = 0;
1431 }
1432 }
1433
1434 void Register() override
1435 {
1437 }
1438 };
1439
1440 AuraScript* GetAuraScript() const override
1441 {
1443 }
1444};
1445
1447{
1448public:
1449 spell_dk_avoidance_passive() : SpellScriptLoader("spell_dk_avoidance_passive") { }
1450
1452 {
1454
1455 bool Load() override
1456 {
1457 if (!GetCaster() || !GetCaster()->GetOwner() || GetCaster()->GetOwner()->GetTypeId() != TYPEID_PLAYER)
1458 return false;
1459 return true;
1460 }
1461
1462 void CalculateAvoidanceAmount(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
1463 {
1464 if (Unit* pet = GetUnitOwner())
1465 {
1466 if (Unit* owner = pet->GetOwner())
1467 {
1468 // Army of the dead ghoul
1469 if (pet->GetEntry() == ENTRY_ARMY_OF_THE_DEAD_GHOUL)
1470 amount = -90;
1471 // Night of the dead
1472 else if (Aura* aur = owner->GetAuraOfRankedSpell(SPELL_NIGHT_OF_THE_DEAD))
1473 amount = aur->GetSpellInfo()->GetEffect(EFFECT_2).CalcValue();
1474 }
1475 }
1476 }
1477
1478 void Register() override
1479 {
1481 }
1482 };
1483
1484 AuraScript* GetAuraScript() const override
1485 {
1487 }
1488};
1489
1491{
1492public:
1493 spell_dk_pet_scaling_01() : SpellScriptLoader("spell_dk_pet_scaling_01") { }
1494
1496 {
1498
1499 bool Load() override
1500 {
1501 if (!GetCaster() || !GetCaster()->GetOwner() || GetCaster()->GetOwner()->GetTypeId() != TYPEID_PLAYER)
1502 return false;
1503 return true;
1504 }
1505
1506 void CalculateStaminaAmount(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
1507 {
1508 if (Unit* pet = GetUnitOwner())
1509 {
1510 if (pet->IsGuardian())
1511 {
1512 if (Unit* owner = pet->GetOwner())
1513 {
1514 float mod = 0.3f;
1515
1516 // Ravenous Dead. Check just if owner has Ravenous Dead since it's effect is not an aura
1517 if (AuraEffect const* aurEff = owner->GetAuraEffect(SPELL_AURA_MOD_TOTAL_STAT_PERCENTAGE, SPELLFAMILY_DEATHKNIGHT, 3010, 0))
1518 mod += aurEff->GetSpellInfo()->GetEffect(EFFECT_1).CalcValue()/100; // Ravenous Dead edits the original scale
1519
1520 // Glyph of the Ghoul
1521 if (AuraEffect const* aurEff = owner->GetAuraEffect(SPELL_DEATH_KNIGHT_GLYPH_OF_GHOUL, 0))
1522 mod += aurEff->GetAmount()/100;
1523
1524 float ownerBonus = float(owner->GetStat(STAT_STAMINA)) * mod;
1525 amount += ownerBonus;
1526 }
1527 }
1528 }
1529 }
1530
1531 void ApplyEffect(AuraEffect const* /* aurEff */, AuraEffectHandleModes /*mode*/)
1532 {
1533 if (Unit* pet = GetUnitOwner())
1534 if (_tempHealth)
1535 pet->SetHealth(_tempHealth);
1536 }
1537
1538 void RemoveEffect(AuraEffect const* /* aurEff */, AuraEffectHandleModes /*mode*/)
1539 {
1540 if (Unit* pet = GetUnitOwner())
1541 _tempHealth = pet->GetHealth();
1542 }
1543
1544 void CalculateStrengthAmount(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
1545 {
1546 if (Unit* pet = GetUnitOwner())
1547 {
1548 if (!pet->IsGuardian())
1549 return;
1550
1551 Unit* owner = pet->GetOwner();
1552 if (!owner)
1553 return;
1554
1555 float mod = 0.7f;
1556
1557 // Ravenous Dead
1558 AuraEffect const* aurEff = nullptr;
1559 // Check just if owner has Ravenous Dead since it's effect is not an aura
1561 if (aurEff)
1562 {
1563 mod += CalculatePct(mod, aurEff->GetSpellInfo()->GetEffect(EFFECT_1).CalcValue()); // Ravenous Dead edits the original scale
1564 }
1565 // Glyph of the Ghoul
1566 aurEff = owner->GetAuraEffect(58686, 0);
1567 if (aurEff)
1568 mod += CalculatePct(1.0f, aurEff->GetAmount()); // Glyph of the Ghoul adds a flat value to the scale mod
1569 float ownerBonus = float(owner->GetStat(STAT_STRENGTH)) * mod;
1570 amount += ownerBonus;
1571 }
1572 }
1573
1574 void Register() override
1575 {
1580 }
1581
1583 };
1584
1585 AuraScript* GetAuraScript() const override
1586 {
1588 }
1589};
1590
1592{
1593public:
1594 spell_dk_pet_scaling_02() : SpellScriptLoader("spell_dk_pet_scaling_02") { }
1595
1597 {
1599
1600 bool Load() override
1601 {
1602 if (!GetCaster() || !GetCaster()->GetOwner() || GetCaster()->GetOwner()->GetTypeId() != TYPEID_PLAYER)
1603 return false;
1604 return true;
1605 }
1606
1607 void CalculateAmountMeleeHaste(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
1608 {
1609 if (!GetCaster() || !GetCaster()->GetOwner())
1610 return;
1611 if (Player* owner = GetCaster()->GetOwner()->ToPlayer())
1612 {
1613 // For others recalculate it from:
1614 float HasteMelee = 0.0f;
1615 // Increase hit from SPELL_AURA_MOD_HIT_CHANCE
1616 HasteMelee += (1-owner->m_modAttackSpeedPct[BASE_ATTACK])*100;
1617
1618 amount += int32(HasteMelee);
1619 }
1620 }
1621
1622 void Register() override
1623 {
1625 }
1626 };
1627
1628 AuraScript* GetAuraScript() const override
1629 {
1631 }
1632};
1633
1635{
1636public:
1637 spell_dk_pet_scaling_03() : SpellScriptLoader("spell_dk_pet_scaling_03") { }
1638
1640 {
1642
1643 bool Load() override
1644 {
1645 if (!GetCaster() || !GetCaster()->GetOwner() || GetCaster()->GetOwner()->GetTypeId() != TYPEID_PLAYER)
1646 return false;
1647 return true;
1648 }
1649
1650 void CalculateAmountMeleeHit(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
1651 {
1652 if (!GetCaster() || !GetCaster()->GetOwner())
1653 return;
1654 if (Player* owner = GetCaster()->GetOwner()->ToPlayer())
1655 {
1656 // For others recalculate it from:
1657 float HitMelee = 0.0f;
1658 // Increase hit from SPELL_AURA_MOD_HIT_CHANCE
1659 HitMelee += owner->GetTotalAuraModifier(SPELL_AURA_MOD_HIT_CHANCE);
1660 // Increase hit melee from meele hit ratings
1661 HitMelee += owner->GetRatingBonusValue(CR_HIT_MELEE);
1662
1663 amount += int32(HitMelee);
1664 }
1665 }
1666
1667 void CalculateAmountSpellHit(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
1668 {
1669 if (!GetCaster() || !GetCaster()->GetOwner())
1670 return;
1671 if (Player* owner = GetCaster()->GetOwner()->ToPlayer())
1672 {
1673 // For others recalculate it from:
1674 float HitSpell = 0.0f;
1675 // Increase hit from SPELL_AURA_MOD_SPELL_HIT_CHANCE
1676 HitSpell += owner->GetTotalAuraModifier(SPELL_AURA_MOD_SPELL_HIT_CHANCE);
1677 // Increase hit spell from spell hit ratings
1678 HitSpell += owner->GetRatingBonusValue(CR_HIT_SPELL);
1679
1680 amount += int32(HitSpell);
1681 }
1682 }
1683
1684 void Register() override
1685 {
1688 }
1689 };
1690
1691 AuraScript* GetAuraScript() const override
1692 {
1694 }
1695};
1696
1698{
1699public:
1700 spell_dk_rune_weapon_scaling_02() : SpellScriptLoader("spell_dk_rune_weapon_scaling_02") { }
1701
1703 {
1705
1706 bool Load() override
1707 {
1708 if (!GetCaster() || !GetCaster()->GetOwner() || GetCaster()->GetOwner()->GetTypeId() != TYPEID_PLAYER)
1709 return false;
1710 return true;
1711 }
1712
1713 void CalculateDamageDoneAmount(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
1714 {
1715 if (Unit* pet = GetUnitOwner())
1716 {
1717 Unit* owner = pet->GetOwner();
1718 if (!owner)
1719 return;
1720
1721 if (pet->IsGuardian())
1722 ((Guardian*)pet)->SetBonusDamage(owner->GetTotalAttackPowerValue(BASE_ATTACK));
1723
1724 for (uint8 i = 0; i < MAX_ITEM_PROTO_DAMAGES; ++i)
1725 amount += owner->CalculateDamage(BASE_ATTACK, true, true, i);
1726 }
1727 }
1728
1729 void CalculateAmountMeleeHaste(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
1730 {
1731 if (!GetCaster() || !GetCaster()->GetOwner())
1732 return;
1733 if (Player* owner = GetCaster()->GetOwner()->ToPlayer())
1734 {
1735 // For others recalculate it from:
1736 float HasteMelee = 0.0f;
1737 // Increase hit from SPELL_AURA_MOD_HIT_CHANCE
1738 HasteMelee += (1-owner->m_modAttackSpeedPct[BASE_ATTACK])*100;
1739
1740 amount += int32(HasteMelee);
1741 }
1742 }
1743
1744 void Register() override
1745 {
1748 }
1749 };
1750
1751 AuraScript* GetAuraScript() const override
1752 {
1754 }
1755};
1756
1758{
1760}
uint8_t uint8
Definition: Define.h:135
int32_t int32
Definition: Define.h:129
uint32_t uint32
Definition: Define.h:133
#define MAX_ITEM_PROTO_DAMAGES
Definition: ItemTemplate.h:596
@ TYPEID_PLAYER
Definition: ObjectGuid.h:39
#define sObjectMgr
Definition: ObjectMgr.h:1723
@ HAPPY
Definition: PetDefines.h:52
@ CONTENT
Definition: PetDefines.h:51
@ UNHAPPY
Definition: PetDefines.h:50
@ EFFECT_1
Definition: SharedDefines.h:32
@ EFFECT_0
Definition: SharedDefines.h:31
@ EFFECT_2
Definition: SharedDefines.h:33
@ SPELL_SCHOOL_SHADOW
@ SPELL_SCHOOL_NATURE
@ SPELL_SCHOOL_FROST
@ SPELL_SCHOOL_ARCANE
@ SPELL_SCHOOL_FIRE
@ BASE_ATTACK
@ RANGED_ATTACK
@ SPELLFAMILY_DEATHKNIGHT
@ STAT_INTELLECT
@ STAT_STRENGTH
@ STAT_STAMINA
AuraEffectHandleModes
@ AURA_EFFECT_HANDLE_CHANGE_AMOUNT_MASK
@ SPELL_AURA_MOD_TOTAL_STAT_PERCENTAGE
@ SPELL_AURA_MOD_ATTACK_POWER
@ SPELL_AURA_MOD_CREATURE_AOE_DAMAGE_AVOIDANCE
@ SPELL_AURA_MOD_SPELL_HIT_CHANCE
@ SPELL_AURA_MELEE_SLOW
@ SPELL_AURA_MOD_RESISTANCE
@ SPELL_AURA_MOD_EXPERTISE
@ SPELL_AURA_MOD_SPELL_CRIT_CHANCE
@ SPELL_AURA_MOD_HIT_CHANCE
@ SPELL_AURA_MOD_STAT
@ SPELL_AURA_MOD_DAMAGE_PERCENT_DONE
@ SPELL_AURA_MOD_CRIT_PCT
@ SPELL_AURA_MOD_WEAPON_CRIT_PERCENT
@ SPELL_AURA_MOD_DAMAGE_DONE
@ SPELL_AURA_MOD_ATTACK_POWER_PCT
#define sSpellMgr
Definition: SpellMgr.h:738
#define AuraEffectCalcAmountFn(F, I, N)
Definition: SpellScript.h:827
#define AuraEffectApplyFn(F, I, N, M)
Definition: SpellScript.h:798
#define AuraEffectRemoveFn(F, I, N, M)
Definition: SpellScript.h:809
@ BASE_VALUE
Definition: Unit.h:138
@ UNIT_MOD_ATTACK_POWER
Definition: Unit.h:178
@ CR_EXPERTISE
Definition: Unit.h:345
@ CR_HIT_MELEE
Definition: Unit.h:327
@ CR_CRIT_MELEE
Definition: Unit.h:330
@ CR_HIT_SPELL
Definition: Unit.h:329
@ CR_CRIT_SPELL
Definition: Unit.h:332
@ BASE_PCT
Definition: Unit.h:145
@ PLAYER_FIELD_MOD_DAMAGE_DONE_POS
Definition: UpdateFields.h:360
@ PLAYER_FIELD_MOD_DAMAGE_DONE_NEG
Definition: UpdateFields.h:361
T AddPct(T &base, U pct)
Definition: Util.h:77
constexpr std::underlying_type< E >::type AsUnderlyingType(E enumValue)
Definition: Util.h:554
T CalculatePct(T base, U pct)
Definition: Util.h:71
SpellInfo const * GetSpellInfo() const
int32 GetAmount() const
WorldObject * GetOwner() const
HookList< EffectApplyHandler > AfterEffectApply
Definition: SpellScript.h:797
HookList< EffectCalcAmountHandler > DoEffectCalcAmount
Definition: SpellScript.h:826
Unit * GetCaster() const
HookList< EffectApplyHandler > OnEffectRemove
Definition: SpellScript.h:804
Unit * GetUnitOwner() const
Player * GetOwner() const
Definition: Pet.cpp:2003
PetSpellMap m_spells
Definition: Pet.h:128
Definition: Player.h:915
int32 CalcValue(WorldObject const *caster=nullptr, int32 const *basePoints=nullptr) const
Definition: SpellInfo.cpp:433
SpellEffectInfo const & GetEffect(SpellEffIndex index) const
Definition: SpellInfo.h:487
Definition: Unit.h:769
Pet * ToPet()
Definition: Unit.h:1788
AuraEffect * GetAuraEffect(uint32 spellId, uint8 effIndex, ObjectGuid casterGUID=ObjectGuid::Empty) const
Definition: Unit.cpp:4355
uint32 CalculateDamage(WeaponAttackType attType, bool normalized, bool addTotalPct, uint8 itemDamagesMask=0) const
Definition: Unit.cpp:2274
uint32 GetArmor() const
Definition: Unit.h:903
float GetStat(Stats stat) const
Definition: Unit.h:901
int32 GetResistance(SpellSchools school) const
Definition: Unit.h:906
float GetTotalAttackPowerValue(WeaponAttackType attType) const
Definition: Unit.cpp:9302
Unit * GetOwner() const
Definition: Object.cpp:2179
uint32 m_scriptSpellId
Definition: SpellScript.h:117
PrepareAuraScript(spell_dk_avoidance_passive_AuraScript)
void CalculateAvoidanceAmount(AuraEffect const *, int32 &amount, bool &)
Definition: spell_pet.cpp:1462
AuraScript * GetAuraScript() const override
Definition: spell_pet.cpp:1484
void RemoveEffect(AuraEffect const *, AuraEffectHandleModes)
Definition: spell_pet.cpp:1538
void CalculateStaminaAmount(AuraEffect const *, int32 &amount, bool &)
Definition: spell_pet.cpp:1506
void ApplyEffect(AuraEffect const *, AuraEffectHandleModes)
Definition: spell_pet.cpp:1531
void CalculateStrengthAmount(AuraEffect const *, int32 &amount, bool &)
Definition: spell_pet.cpp:1544
PrepareAuraScript(spell_dk_pet_scaling_01_AuraScript)
AuraScript * GetAuraScript() const override
Definition: spell_pet.cpp:1585
void CalculateAmountMeleeHaste(AuraEffect const *, int32 &amount, bool &)
Definition: spell_pet.cpp:1607
PrepareAuraScript(spell_dk_pet_scaling_02_AuraScript)
AuraScript * GetAuraScript() const override
Definition: spell_pet.cpp:1628
void CalculateAmountMeleeHit(AuraEffect const *, int32 &amount, bool &)
Definition: spell_pet.cpp:1650
void CalculateAmountSpellHit(AuraEffect const *, int32 &amount, bool &)
Definition: spell_pet.cpp:1667
PrepareAuraScript(spell_dk_pet_scaling_03_AuraScript)
AuraScript * GetAuraScript() const override
Definition: spell_pet.cpp:1691
void CalculateDamageDoneAmount(AuraEffect const *, int32 &amount, bool &)
Definition: spell_pet.cpp:1713
void CalculateAmountMeleeHaste(AuraEffect const *, int32 &amount, bool &)
Definition: spell_pet.cpp:1729
AuraScript * GetAuraScript() const override
Definition: spell_pet.cpp:1751
void CalculateAmountCritMelee(AuraEffect const *, int32 &amount, bool &)
Definition: spell_pet.cpp:126
void CalculateAmountExpertise(AuraEffect const *, int32 &amount, bool &)
Definition: spell_pet.cpp:175
void CalculateAmountSpellHit(AuraEffect const *, int32 &amount, bool &)
Definition: spell_pet.cpp:160
PrepareAuraScript(spell_gen_pet_calculate_AuraScript)
void CalculateAmountCritSpell(AuraEffect const *, int32 &amount, bool &)
Definition: spell_pet.cpp:107
void CalculateAmountMeleeHit(AuraEffect const *, int32 &amount, bool &)
Definition: spell_pet.cpp:145
AuraScript * GetAuraScript() const override
Definition: spell_pet.cpp:219
PrepareAuraScript(spell_hun_animal_handler_AuraScript)
void CalculateAmountDamageDone(AuraEffect const *, int32 &amount, bool &)
Definition: spell_pet.cpp:1421
AuraScript * GetAuraScript() const override
Definition: spell_pet.cpp:1440
PrepareAuraScript(spell_hun_pet_passive_crit_AuraScript)
void CalculateAmountCritSpell(AuraEffect const *, int32 &amount, bool &)
Definition: spell_pet.cpp:1292
void CalculateAmountCritMelee(AuraEffect const *, int32 &amount, bool &)
Definition: spell_pet.cpp:1313
AuraScript * GetAuraScript() const override
Definition: spell_pet.cpp:1341
void CalculateAmountDamageDone(AuraEffect const *, int32 &amount, bool &)
Definition: spell_pet.cpp:1363
AuraScript * GetAuraScript() const override
Definition: spell_pet.cpp:1399
void CalculateStaminaAmount(AuraEffect const *, int32 &amount, bool &)
Definition: spell_pet.cpp:904
void RemoveEffect(AuraEffect const *, AuraEffectHandleModes)
Definition: spell_pet.cpp:936
void ApplyEffect(AuraEffect const *, AuraEffectHandleModes)
Definition: spell_pet.cpp:929
void CalculateDamageDoneAmount(AuraEffect const *, int32 &amount, bool &)
Definition: spell_pet.cpp:972
void CalculateAttackPowerAmount(AuraEffect const *, int32 &amount, bool &)
Definition: spell_pet.cpp:942
PrepareAuraScript(spell_hun_pet_scaling_01_AuraScript)
AuraScript * GetAuraScript() const override
Definition: spell_pet.cpp:1015
PrepareAuraScript(spell_hun_pet_scaling_02_AuraScript)
void CalculateFireResistanceAmount(AuraEffect const *, int32 &amount, bool &)
Definition: spell_pet.cpp:1056
void CalculateFrostResistanceAmount(AuraEffect const *, int32 &amount, bool &)
Definition: spell_pet.cpp:1037
void CalculateNatureResistanceAmount(AuraEffect const *, int32 &amount, bool &)
Definition: spell_pet.cpp:1075
AuraScript * GetAuraScript() const override
Definition: spell_pet.cpp:1102
void CalculateArcaneResistanceAmount(AuraEffect const *, int32 &amount, bool &)
Definition: spell_pet.cpp:1143
void CalculateArmorAmount(AuraEffect const *, int32 &amount, bool &)
Definition: spell_pet.cpp:1162
void CalculateShadowResistanceAmount(AuraEffect const *, int32 &amount, bool &)
Definition: spell_pet.cpp:1124
PrepareAuraScript(spell_hun_pet_scaling_03_AuraScript)
AuraScript * GetAuraScript() const override
Definition: spell_pet.cpp:1189
PrepareAuraScript(spell_hun_pet_scaling_04_AuraScript)
void CalculateAmountMeleeHit(AuraEffect const *, int32 &amount, bool &)
Definition: spell_pet.cpp:1211
void CalculateAmountSpellHit(AuraEffect const *, int32 &amount, bool &)
Definition: spell_pet.cpp:1228
void CalculateAmountExpertise(AuraEffect const *, int32 &amount, bool &)
Definition: spell_pet.cpp:1245
AuraScript * GetAuraScript() const override
Definition: spell_pet.cpp:1270
PrepareAuraScript(spell_sha_pet_scaling_04_AuraScript)
void CalculateAmountMeleeHit(AuraEffect const *, int32 &amount, bool &)
Definition: spell_pet.cpp:845
void CalculateAmountSpellHit(AuraEffect const *, int32 &amount, bool &)
Definition: spell_pet.cpp:860
AuraScript * GetAuraScript() const override
Definition: spell_pet.cpp:882
void CalculateAmountCritSpell(AuraEffect const *, int32 &amount, bool &)
Definition: spell_pet.cpp:684
PrepareAuraScript(spell_warl_pet_passive_AuraScript)
void CalculateAmountCritMelee(AuraEffect const *, int32 &amount, bool &)
Definition: spell_pet.cpp:706
void CalculateAmountDamageDone(AuraEffect const *, int32 &amount, bool &)
Definition: spell_pet.cpp:757
AuraScript * GetAuraScript() const override
Definition: spell_pet.cpp:786
AuraScript * GetAuraScript() const override
Definition: spell_pet.cpp:823
AuraScript * GetAuraScript() const override
Definition: spell_pet.cpp:735
void CalculateDamageDoneAmount(AuraEffect const *, int32 &amount, bool &)
Definition: spell_pet.cpp:330
void RemoveEffect(AuraEffect const *, AuraEffectHandleModes)
Definition: spell_pet.cpp:292
void ApplyEffect(AuraEffect const *, AuraEffectHandleModes)
Definition: spell_pet.cpp:260
void CalculateAttackPowerAmount(AuraEffect const *, int32 &amount, bool &)
Definition: spell_pet.cpp:302
void CalculateStaminaAmount(AuraEffect const *, int32 &amount, bool &)
Definition: spell_pet.cpp:248
PrepareAuraScript(spell_warl_pet_scaling_01_AuraScript)
AuraScript * GetAuraScript() const override
Definition: spell_pet.cpp:362
void CalculateFireResistanceAmount(AuraEffect const *, int32 &amount, bool &)
Definition: spell_pet.cpp:456
void RemoveEffect(AuraEffect const *, AuraEffectHandleModes)
Definition: spell_pet.cpp:434
void CalculateIntellectAmount(AuraEffect const *, int32 &amount, bool &)
Definition: spell_pet.cpp:391
void CalculateArmorAmount(AuraEffect const *, int32 &amount, bool &)
Definition: spell_pet.cpp:444
PrepareAuraScript(spell_warl_pet_scaling_02_AuraScript)
void ApplyEffect(AuraEffect const *, AuraEffectHandleModes)
Definition: spell_pet.cpp:406
AuraScript * GetAuraScript() const override
Definition: spell_pet.cpp:481
PrepareAuraScript(spell_warl_pet_scaling_03_AuraScript)
void CalculateArcaneResistanceAmount(AuraEffect const *, int32 &amount, bool &)
Definition: spell_pet.cpp:515
void CalculateFrostResistanceAmount(AuraEffect const *, int32 &amount, bool &)
Definition: spell_pet.cpp:503
void CalculateNatureResistanceAmount(AuraEffect const *, int32 &amount, bool &)
Definition: spell_pet.cpp:527
AuraScript * GetAuraScript() const override
Definition: spell_pet.cpp:547
PrepareAuraScript(spell_warl_pet_scaling_04_AuraScript)
void CalculateShadowResistanceAmount(AuraEffect const *, int32 &amount, bool &)
Definition: spell_pet.cpp:569
AuraScript * GetAuraScript() const override
Definition: spell_pet.cpp:587
void CalculateAmountExpertise(AuraEffect const *, int32 &amount, bool &)
Definition: spell_pet.cpp:639
PrepareAuraScript(spell_warl_pet_scaling_05_AuraScript)
void CalculateAmountSpellHit(AuraEffect const *, int32 &amount, bool &)
Definition: spell_pet.cpp:624
void CalculateAmountMeleeHit(AuraEffect const *, int32 &amount, bool &)
Definition: spell_pet.cpp:609
AuraScript * GetAuraScript() const override
Definition: spell_pet.cpp:662
DKPetCalculate
Definition: spell_pet.cpp:65
@ SPELL_NIGHT_OF_THE_DEAD
Definition: spell_pet.cpp:70
@ SPELL_DEATH_KNIGHT_RUNE_WEAPON_02
Definition: spell_pet.cpp:66
@ SPELL_DEATH_KNIGHT_GLYPH_OF_GHOUL
Definition: spell_pet.cpp:72
@ SPELL_DEATH_KNIGHT_PET_SCALING_02
Definition: spell_pet.cpp:68
@ SPELL_DEATH_KNIGHT_PET_SCALING_03
Definition: spell_pet.cpp:69
@ SPELL_DEATH_KNIGHT_PET_SCALING_01
Definition: spell_pet.cpp:67
@ ENTRY_ARMY_OF_THE_DEAD_GHOUL
Definition: spell_pet.cpp:71
WarlockPetCalculate
Definition: spell_pet.cpp:48
@ SPELL_WARLOCK_PET_SCALING_02
Definition: spell_pet.cpp:52
@ SPELL_WARLOCK_GLYPH_OF_VOIDWALKER
Definition: spell_pet.cpp:61
@ SPELL_PET_PASSIVE_CRIT
Definition: spell_pet.cpp:49
@ SPELL_WARLOCK_PET_SCALING_04
Definition: spell_pet.cpp:54
@ SPELL_WARLOCK_PET_SCALING_01
Definition: spell_pet.cpp:51
@ ENTRY_VOIDWALKER
Definition: spell_pet.cpp:57
@ SPELL_WARLOCK_PET_SCALING_05
Definition: spell_pet.cpp:55
@ SPELL_WARLOCK_PET_SCALING_03
Definition: spell_pet.cpp:53
@ ENTRY_FELGUARD
Definition: spell_pet.cpp:56
@ SPELL_PET_PASSIVE_DAMAGE_TAKEN
Definition: spell_pet.cpp:50
@ ENTRY_IMP
Definition: spell_pet.cpp:60
@ ENTRY_FELHUNTER
Definition: spell_pet.cpp:58
@ ENTRY_SUCCUBUS
Definition: spell_pet.cpp:59
ShamanPetCalculate
Definition: spell_pet.cpp:76
@ SPELL_FERAL_SPIRIT_PET_SCALING_04
Definition: spell_pet.cpp:80
@ SPELL_FERAL_SPIRIT_PET_UNK_03
Definition: spell_pet.cpp:79
@ SPELL_FERAL_SPIRIT_PET_UNK_02
Definition: spell_pet.cpp:78
@ SPELL_FERAL_SPIRIT_PET_UNK_01
Definition: spell_pet.cpp:77
MiscPetCalculate
Definition: spell_pet.cpp:84
@ SPELL_MAGE_PET_PASSIVE_ELEMENTAL
Definition: spell_pet.cpp:85
@ SPELL_PET_UNK_01
Definition: spell_pet.cpp:87
@ SPELL_PET_UNK_02
Definition: spell_pet.cpp:88
@ SPELL_PET_HEALTH_SCALING
Definition: spell_pet.cpp:86
HunterPetCalculate
Definition: spell_pet.cpp:34
@ SPELL_HUNTER_ANIMAL_HANDLER
Definition: spell_pet.cpp:44
@ SPELL_HUNTER_PET_SCALING_02
Definition: spell_pet.cpp:41
@ SPELL_TAMED_PET_PASSIVE_07
Definition: spell_pet.cpp:36
@ SPELL_TAMED_PET_PASSIVE_06
Definition: spell_pet.cpp:35
@ SPELL_TAMED_PET_PASSIVE_08
Definition: spell_pet.cpp:37
@ SPELL_HUNTER_PET_SCALING_03
Definition: spell_pet.cpp:42
@ SPELL_TAMED_PET_PASSIVE_09
Definition: spell_pet.cpp:38
@ SPELL_TAMED_PET_PASSIVE_10
Definition: spell_pet.cpp:39
@ SPELL_HUNTER_PET_SCALING_04
Definition: spell_pet.cpp:43
@ SPELL_HUNTER_PET_SCALING_01
Definition: spell_pet.cpp:40
void AddSC_pet_spell_scripts()
Definition: spell_pet.cpp:1757
uint16 health
Definition: ObjectMgr.h:710
uint16 mana
Definition: ObjectMgr.h:711