112 float CritSpell = 0.0f;
114 CritSpell += owner->GetSpellCritFromIntellect();
122 amount +=
int32(CritSpell);
131 float CritMelee = 0.0f;
133 CritMelee += owner->GetMeleeCritFromAgility();
141 amount +=
int32(CritMelee);
150 float HitMelee = 0.0f;
156 amount +=
int32(HitMelee);
165 float HitSpell = 0.0f;
171 amount +=
int32(HitSpell);
180 float Expertise = 0.0f;
186 amount +=
int32(Expertise);
256 amount += ownerBonus;
268 switch (pet->GetEntry())
288 pet->ToPet()->SetCreateHealth(baseHealth + healthMod);
298 pet->ToPet()->SetCreateHealth(pInfo->
health);
311 int32 maximum = (fire > shadow) ? fire : shadow;
314 float bonusAP = maximum * 0.57f;
324 amount +=
CalculatePct(amount+base_attPower, ect->GetAmount());
339 int32 maximum = (fire > shadow) ? fire : shadow;
340 float bonusDamage = 0.0f;
343 bonusDamage = maximum * 0.15f;
345 amount += bonusDamage;
397 float ownerBonus = 0.0f;
401 amount += ownerBonus;
414 switch (pet->GetEntry())
430 pet->ToPet()->SetCreateMana(baseMana + manaMod);
440 pet->ToPet()->SetCreateMana(pInfo->
mana);
450 float ownerBonus = 0.0f;
452 amount += ownerBonus;
462 float ownerBonus = 0.0f;
464 amount += ownerBonus;
509 float ownerBonus = 0.0f;
511 amount += ownerBonus;
521 float ownerBonus = 0.0f;
523 amount += ownerBonus;
533 float ownerBonus = 0.0f;
535 amount += ownerBonus;
575 float ownerBonus = 0.0f;
577 amount += ownerBonus;
614 float HitMelee = 0.0f;
620 amount +=
int32(HitMelee);
629 float HitSpell = 0.0f;
635 amount +=
int32(HitSpell);
644 float Expertise = 0.0f;
650 amount +=
int32(Expertise);
689 float CritSpell = 0.0f;
691 CritSpell += owner->GetSpellCritFromIntellect();
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());
711 float CritMelee = 0.0f;
713 CritMelee += owner->GetMeleeCritFromAgility();
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());
814 amount += ect->GetAmount();
850 float HitMelee = 0.0f;
856 amount +=
int32(HitMelee);
865 float HitSpell = 0.0f;
871 amount +=
int32(HitSpell);
911 float ownerBonus = 0.0f;
913 PetSpellMap::const_iterator itr = (pet->ToPet()->m_spells.find(62758));
914 if (itr == pet->ToPet()->m_spells.end())
915 itr = pet->ToPet()->m_spells.find(62762);
917 if (itr != pet->ToPet()->m_spells.end())
925 amount += ownerBonus;
954 float bonusAP = 0.0f;
956 PetSpellMap::const_iterator itr = (pet->ToPet()->m_spells.find(62758));
957 if (itr == pet->ToPet()->m_spells.end())
960 if (itr != pet->ToPet()->m_spells.end())
984 float bonusDamage = 0.0f;
986 PetSpellMap::const_iterator itr = (pet->ToPet()->m_spells.find(62758));
987 if (itr == pet->ToPet()->m_spells.end())
990 if (itr != pet->ToPet()->m_spells.end())
998 amount += bonusDamage;
1048 float ownerBonus = 0.0f;
1052 amount += ownerBonus;
1067 float ownerBonus = 0.0f;
1071 amount += ownerBonus;
1086 float ownerBonus = 0.0f;
1090 amount += ownerBonus;
1135 float ownerBonus = 0.0f;
1139 amount += ownerBonus;
1154 float ownerBonus = 0.0f;
1158 amount += ownerBonus;
1173 float ownerBonus = 0.0f;
1177 amount += ownerBonus;
1218 float HitMelee = 0.0f;
1224 amount +=
int32(HitMelee);
1235 float HitSpell = 0.0f;
1241 amount +=
int32(HitSpell);
1252 float Expertise = 0.0f;
1258 amount +=
int32(Expertise);
1299 float CritSpell = 0.0f;
1309 amount += (CritSpell*0.8f);
1320 float CritMelee = 0.0f;
1330 amount += (CritMelee*0.8f);
1372 switch (
GetCaster()->ToPet()->GetHappinessState())
1389 amount -= cobraReflexes->GetAmount();
1428 amount = ect->GetAmount();
1473 amount = aur->GetSpellInfo()->GetEffect(
EFFECT_2).CalcValue();
1510 if (pet->IsGuardian())
1518 mod += aurEff->GetSpellInfo()->GetEffect(
EFFECT_1).CalcValue()/100;
1522 mod += aurEff->GetAmount()/100;
1524 float ownerBonus = float(owner->GetStat(
STAT_STAMINA)) * mod;
1525 amount += ownerBonus;
1548 if (!pet->IsGuardian())
1570 amount += ownerBonus;
1614 float HasteMelee = 0.0f;
1616 HasteMelee += (1-owner->m_modAttackSpeedPct[
BASE_ATTACK])*100;
1618 amount +=
int32(HasteMelee);
1657 float HitMelee = 0.0f;
1663 amount +=
int32(HitMelee);
1674 float HitSpell = 0.0f;
1680 amount +=
int32(HitSpell);
1721 if (pet->IsGuardian())
1736 float HasteMelee = 0.0f;
1738 HasteMelee += (1-owner->m_modAttackSpeedPct[
BASE_ATTACK])*100;
1740 amount +=
int32(HasteMelee);
#define MAX_ITEM_PROTO_DAMAGES
@ SPELLFAMILY_DEATHKNIGHT
@ 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_MOD_RESISTANCE
@ SPELL_AURA_MOD_EXPERTISE
@ SPELL_AURA_MOD_SPELL_CRIT_CHANCE
@ SPELL_AURA_MOD_HIT_CHANCE
@ 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 AuraEffectCalcAmountFn(F, I, N)
#define AuraEffectApplyFn(F, I, N, M)
#define AuraEffectRemoveFn(F, I, N, M)
@ PLAYER_FIELD_MOD_DAMAGE_DONE_POS
@ PLAYER_FIELD_MOD_DAMAGE_DONE_NEG
constexpr std::underlying_type< E >::type AsUnderlyingType(E enumValue)
T CalculatePct(T base, U pct)
SpellInfo const * GetSpellInfo() const
WorldObject * GetOwner() const
HookList< EffectApplyHandler > AfterEffectApply
HookList< EffectCalcAmountHandler > DoEffectCalcAmount
HookList< EffectApplyHandler > OnEffectRemove
Unit * GetUnitOwner() const
Player * GetOwner() const
int32 CalcValue(WorldObject const *caster=nullptr, int32 const *basePoints=nullptr) const
SpellEffectInfo const & GetEffect(SpellEffIndex index) const
AuraEffect * GetAuraEffect(uint32 spellId, uint8 effIndex, ObjectGuid casterGUID=ObjectGuid::Empty) const
uint32 CalculateDamage(WeaponAttackType attType, bool normalized, bool addTotalPct, uint8 itemDamagesMask=0) const
float GetStat(Stats stat) const
int32 GetResistance(SpellSchools school) const
float GetTotalAttackPowerValue(WeaponAttackType attType) const
PrepareAuraScript(spell_dk_avoidance_passive_AuraScript)
void CalculateAvoidanceAmount(AuraEffect const *, int32 &amount, bool &)
spell_dk_avoidance_passive()
AuraScript * GetAuraScript() const override
void RemoveEffect(AuraEffect const *, AuraEffectHandleModes)
void CalculateStaminaAmount(AuraEffect const *, int32 &amount, bool &)
void ApplyEffect(AuraEffect const *, AuraEffectHandleModes)
void CalculateStrengthAmount(AuraEffect const *, int32 &amount, bool &)
PrepareAuraScript(spell_dk_pet_scaling_01_AuraScript)
spell_dk_pet_scaling_01()
AuraScript * GetAuraScript() const override
void CalculateAmountMeleeHaste(AuraEffect const *, int32 &amount, bool &)
PrepareAuraScript(spell_dk_pet_scaling_02_AuraScript)
AuraScript * GetAuraScript() const override
spell_dk_pet_scaling_02()
void CalculateAmountMeleeHit(AuraEffect const *, int32 &amount, bool &)
void CalculateAmountSpellHit(AuraEffect const *, int32 &amount, bool &)
PrepareAuraScript(spell_dk_pet_scaling_03_AuraScript)
AuraScript * GetAuraScript() const override
spell_dk_pet_scaling_03()
void CalculateDamageDoneAmount(AuraEffect const *, int32 &amount, bool &)
void CalculateAmountMeleeHaste(AuraEffect const *, int32 &amount, bool &)
PrepareAuraScript(spell_dk_rune_weapon_scaling_02_AuraScript)
spell_dk_rune_weapon_scaling_02()
AuraScript * GetAuraScript() const override
void CalculateAmountCritMelee(AuraEffect const *, int32 &amount, bool &)
void CalculateAmountExpertise(AuraEffect const *, int32 &amount, bool &)
void CalculateAmountSpellHit(AuraEffect const *, int32 &amount, bool &)
PrepareAuraScript(spell_gen_pet_calculate_AuraScript)
void CalculateAmountCritSpell(AuraEffect const *, int32 &amount, bool &)
void CalculateAmountMeleeHit(AuraEffect const *, int32 &amount, bool &)
spell_gen_pet_calculate()
AuraScript * GetAuraScript() const override
PrepareAuraScript(spell_hun_animal_handler_AuraScript)
void CalculateAmountDamageDone(AuraEffect const *, int32 &amount, bool &)
AuraScript * GetAuraScript() const override
spell_hun_animal_handler()
PrepareAuraScript(spell_hun_pet_passive_crit_AuraScript)
void CalculateAmountCritSpell(AuraEffect const *, int32 &amount, bool &)
void CalculateAmountCritMelee(AuraEffect const *, int32 &amount, bool &)
spell_hun_pet_passive_crit()
AuraScript * GetAuraScript() const override
PrepareAuraScript(spell_hun_pet_passive_damage_done_AuraScript)
void CalculateAmountDamageDone(AuraEffect const *, int32 &amount, bool &)
AuraScript * GetAuraScript() const override
spell_hun_pet_passive_damage_done()
void CalculateStaminaAmount(AuraEffect const *, int32 &amount, bool &)
void RemoveEffect(AuraEffect const *, AuraEffectHandleModes)
void ApplyEffect(AuraEffect const *, AuraEffectHandleModes)
void CalculateDamageDoneAmount(AuraEffect const *, int32 &amount, bool &)
spell_hun_pet_scaling_01_AuraScript()
void CalculateAttackPowerAmount(AuraEffect const *, int32 &amount, bool &)
PrepareAuraScript(spell_hun_pet_scaling_01_AuraScript)
spell_hun_pet_scaling_01()
AuraScript * GetAuraScript() const override
PrepareAuraScript(spell_hun_pet_scaling_02_AuraScript)
void CalculateFireResistanceAmount(AuraEffect const *, int32 &amount, bool &)
void CalculateFrostResistanceAmount(AuraEffect const *, int32 &amount, bool &)
void CalculateNatureResistanceAmount(AuraEffect const *, int32 &amount, bool &)
spell_hun_pet_scaling_02()
AuraScript * GetAuraScript() const override
void CalculateArcaneResistanceAmount(AuraEffect const *, int32 &amount, bool &)
void CalculateArmorAmount(AuraEffect const *, int32 &amount, bool &)
void CalculateShadowResistanceAmount(AuraEffect const *, int32 &amount, bool &)
PrepareAuraScript(spell_hun_pet_scaling_03_AuraScript)
spell_hun_pet_scaling_03()
AuraScript * GetAuraScript() const override
PrepareAuraScript(spell_hun_pet_scaling_04_AuraScript)
void CalculateAmountMeleeHit(AuraEffect const *, int32 &amount, bool &)
void CalculateAmountSpellHit(AuraEffect const *, int32 &amount, bool &)
void CalculateAmountExpertise(AuraEffect const *, int32 &amount, bool &)
AuraScript * GetAuraScript() const override
spell_hun_pet_scaling_04()
PrepareAuraScript(spell_sha_pet_scaling_04_AuraScript)
void CalculateAmountMeleeHit(AuraEffect const *, int32 &amount, bool &)
void CalculateAmountSpellHit(AuraEffect const *, int32 &amount, bool &)
AuraScript * GetAuraScript() const override
spell_sha_pet_scaling_04()
void CalculateAmountCritSpell(AuraEffect const *, int32 &amount, bool &)
PrepareAuraScript(spell_warl_pet_passive_AuraScript)
void CalculateAmountCritMelee(AuraEffect const *, int32 &amount, bool &)
PrepareAuraScript(spell_warl_pet_passive_damage_done_AuraScript)
void CalculateAmountDamageDone(AuraEffect const *, int32 &amount, bool &)
spell_warl_pet_passive_damage_done()
AuraScript * GetAuraScript() const override
PrepareAuraScript(spell_warl_pet_passive_voidwalker_AuraScript)
void CalculateAmount(AuraEffect const *, int32 &amount, bool &)
spell_warl_pet_passive_voidwalker()
AuraScript * GetAuraScript() const override
AuraScript * GetAuraScript() const override
void CalculateDamageDoneAmount(AuraEffect const *, int32 &amount, bool &)
void RemoveEffect(AuraEffect const *, AuraEffectHandleModes)
void ApplyEffect(AuraEffect const *, AuraEffectHandleModes)
spell_warl_pet_scaling_01_AuraScript()
void CalculateAttackPowerAmount(AuraEffect const *, int32 &amount, bool &)
void CalculateStaminaAmount(AuraEffect const *, int32 &amount, bool &)
PrepareAuraScript(spell_warl_pet_scaling_01_AuraScript)
AuraScript * GetAuraScript() const override
spell_warl_pet_scaling_01()
void CalculateFireResistanceAmount(AuraEffect const *, int32 &amount, bool &)
void RemoveEffect(AuraEffect const *, AuraEffectHandleModes)
spell_warl_pet_scaling_02_AuraScript()
void CalculateIntellectAmount(AuraEffect const *, int32 &amount, bool &)
void CalculateArmorAmount(AuraEffect const *, int32 &amount, bool &)
PrepareAuraScript(spell_warl_pet_scaling_02_AuraScript)
void ApplyEffect(AuraEffect const *, AuraEffectHandleModes)
AuraScript * GetAuraScript() const override
spell_warl_pet_scaling_02()
PrepareAuraScript(spell_warl_pet_scaling_03_AuraScript)
void CalculateArcaneResistanceAmount(AuraEffect const *, int32 &amount, bool &)
void CalculateFrostResistanceAmount(AuraEffect const *, int32 &amount, bool &)
void CalculateNatureResistanceAmount(AuraEffect const *, int32 &amount, bool &)
AuraScript * GetAuraScript() const override
spell_warl_pet_scaling_03()
PrepareAuraScript(spell_warl_pet_scaling_04_AuraScript)
void CalculateShadowResistanceAmount(AuraEffect const *, int32 &amount, bool &)
AuraScript * GetAuraScript() const override
spell_warl_pet_scaling_04()
void CalculateAmountExpertise(AuraEffect const *, int32 &amount, bool &)
PrepareAuraScript(spell_warl_pet_scaling_05_AuraScript)
void CalculateAmountSpellHit(AuraEffect const *, int32 &amount, bool &)
void CalculateAmountMeleeHit(AuraEffect const *, int32 &amount, bool &)
spell_warl_pet_scaling_05()
AuraScript * GetAuraScript() const override
@ SPELL_NIGHT_OF_THE_DEAD
@ SPELL_DEATH_KNIGHT_RUNE_WEAPON_02
@ SPELL_DEATH_KNIGHT_GLYPH_OF_GHOUL
@ SPELL_DEATH_KNIGHT_PET_SCALING_02
@ SPELL_DEATH_KNIGHT_PET_SCALING_03
@ SPELL_DEATH_KNIGHT_PET_SCALING_01
@ ENTRY_ARMY_OF_THE_DEAD_GHOUL
@ SPELL_WARLOCK_PET_SCALING_02
@ SPELL_WARLOCK_GLYPH_OF_VOIDWALKER
@ SPELL_WARLOCK_PET_SCALING_04
@ SPELL_WARLOCK_PET_SCALING_01
@ SPELL_WARLOCK_PET_SCALING_05
@ SPELL_WARLOCK_PET_SCALING_03
@ SPELL_PET_PASSIVE_DAMAGE_TAKEN
@ SPELL_FERAL_SPIRIT_PET_SCALING_04
@ SPELL_FERAL_SPIRIT_PET_UNK_03
@ SPELL_FERAL_SPIRIT_PET_UNK_02
@ SPELL_FERAL_SPIRIT_PET_UNK_01
@ SPELL_MAGE_PET_PASSIVE_ELEMENTAL
@ SPELL_PET_HEALTH_SCALING
@ SPELL_HUNTER_ANIMAL_HANDLER
@ SPELL_HUNTER_PET_SCALING_02
@ SPELL_TAMED_PET_PASSIVE_07
@ SPELL_TAMED_PET_PASSIVE_06
@ SPELL_TAMED_PET_PASSIVE_08
@ SPELL_HUNTER_PET_SCALING_03
@ SPELL_TAMED_PET_PASSIVE_09
@ SPELL_TAMED_PET_PASSIVE_10
@ SPELL_HUNTER_PET_SCALING_04
@ SPELL_HUNTER_PET_SCALING_01
void AddSC_pet_spell_scripts()