Core/Spells: fix spell scripts from recent commit and cleanup scripts
This commit is contained in:
1 parent
478de6298e
commit
9d19be2ee5
8 files changed
+110
-206
No files matched your search
@@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
@@ -102,7 +102,7 @@ class spell_gen_pet_calculate : public SpellScriptLoader
|
||||
return true;
|
||||
}
|
||||
|
||||
void CalculateAmountCritSpell(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
|
||||
void CalculateAmountCritSpell(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
|
||||
{
|
||||
if (Player* owner = GetCaster()->GetOwner()->ToPlayer())
|
||||
{
|
||||
@@ -121,7 +121,7 @@ class spell_gen_pet_calculate : public SpellScriptLoader
|
||||
}
|
||||
}
|
||||
|
||||
void CalculateAmountCritMelee(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
|
||||
void CalculateAmountCritMelee(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
|
||||
{
|
||||
if (Player* owner = GetCaster()->GetOwner()->ToPlayer())
|
||||
{
|
||||
@@ -140,7 +140,7 @@ class spell_gen_pet_calculate : public SpellScriptLoader
|
||||
}
|
||||
}
|
||||
|
||||
void CalculateAmountMeleeHit(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
|
||||
void CalculateAmountMeleeHit(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
|
||||
{
|
||||
if (Player* owner = GetCaster()->GetOwner()->ToPlayer())
|
||||
{
|
||||
@@ -155,7 +155,7 @@ class spell_gen_pet_calculate : public SpellScriptLoader
|
||||
}
|
||||
}
|
||||
|
||||
void CalculateAmountSpellHit(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
|
||||
void CalculateAmountSpellHit(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
|
||||
{
|
||||
if (Player* owner = GetCaster()->GetOwner()->ToPlayer())
|
||||
{
|
||||
@@ -170,7 +170,7 @@ class spell_gen_pet_calculate : public SpellScriptLoader
|
||||
}
|
||||
}
|
||||
|
||||
void CalculateAmountExpertise(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
|
||||
void CalculateAmountExpertise(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
|
||||
{
|
||||
if (Player* owner = GetCaster()->GetOwner()->ToPlayer())
|
||||
{
|
||||
@@ -237,7 +237,7 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
void CalculateStaminaAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/)
|
||||
void CalculateStaminaAmount(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
|
||||
{
|
||||
if (Unit* pet = GetUnitOwner())
|
||||
if (pet->isPet())
|
||||
@@ -249,7 +249,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void ApplyEffect(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
void ApplyEffect(AuraEffect const* /* aurEff */, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
if (Unit* pet = GetUnitOwner())
|
||||
if (_tempBonus)
|
||||
@@ -281,7 +281,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void RemoveEffect(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
void RemoveEffect(AuraEffect const* /* aurEff */, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
if (Unit* pet = GetUnitOwner())
|
||||
if (pet->isPet())
|
||||
@@ -291,7 +291,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void CalculateAttackPowerAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/)
|
||||
void CalculateAttackPowerAmount(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
|
||||
{
|
||||
if (Unit* pet = GetUnitOwner())
|
||||
if (pet->isPet())
|
||||
@@ -310,16 +310,16 @@ public:
|
||||
// Glyph of felguard
|
||||
if (pet->GetEntry() == ENTRY_FELGUARD)
|
||||
{
|
||||
if (AuraEffect* aurEffect = owner->GetAuraEffect(56246, EFFECT_0))
|
||||
if (AuraEffect* /* aurEff */ect = owner->GetAuraEffect(56246, EFFECT_0))
|
||||
{
|
||||
float base_attPower = pet->GetModifierValue(UNIT_MOD_ATTACK_POWER, BASE_VALUE) * pet->GetModifierValue(UNIT_MOD_ATTACK_POWER, BASE_PCT);
|
||||
amount += CalculatePctN(amount+base_attPower, aurEffect->GetAmount());
|
||||
amount += CalculatePctN(amount+base_attPower, /* aurEff */ect->GetAmount());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CalculateDamageDoneAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/)
|
||||
void CalculateDamageDoneAmount(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
|
||||
{
|
||||
if (Unit* pet = GetUnitOwner())
|
||||
if (pet->isPet())
|
||||
@@ -374,7 +374,7 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
void CalculateIntellectAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/)
|
||||
void CalculateIntellectAmount(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
|
||||
{
|
||||
if (Unit* pet = GetUnitOwner())
|
||||
if (pet->isPet())
|
||||
@@ -389,7 +389,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void ApplyEffect(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
void ApplyEffect(AuraEffect const* /* aurEff */, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
if (Unit* pet = GetUnitOwner())
|
||||
if (_tempBonus)
|
||||
@@ -417,7 +417,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void RemoveEffect(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
void RemoveEffect(AuraEffect const* /* aurEff */, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
if (Unit* pet = GetUnitOwner())
|
||||
if (pet->isPet())
|
||||
@@ -427,7 +427,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void CalculateArmorAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/)
|
||||
void CalculateArmorAmount(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
|
||||
{
|
||||
if (Unit* pet = GetUnitOwner())
|
||||
if (pet->isPet())
|
||||
@@ -439,7 +439,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void CalculateFireResistanceAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/)
|
||||
void CalculateFireResistanceAmount(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
|
||||
{
|
||||
if (Unit* pet = GetUnitOwner())
|
||||
if (pet->isPet())
|
||||
@@ -486,7 +486,7 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
void CalculateFrostResistanceAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/)
|
||||
void CalculateFrostResistanceAmount(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
|
||||
{
|
||||
if (Unit* pet = GetUnitOwner())
|
||||
if (pet->isPet())
|
||||
@@ -498,7 +498,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void CalculateArcaneResistanceAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/)
|
||||
void CalculateArcaneResistanceAmount(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
|
||||
{
|
||||
if (Unit* pet = GetUnitOwner())
|
||||
if (pet->isPet())
|
||||
@@ -510,7 +510,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void CalculateNatureResistanceAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/)
|
||||
void CalculateNatureResistanceAmount(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
|
||||
{
|
||||
if (Unit* pet = GetUnitOwner())
|
||||
if (pet->isPet())
|
||||
@@ -553,7 +553,7 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
void CalculateShadowResistanceAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/)
|
||||
void CalculateShadowResistanceAmount(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
|
||||
{
|
||||
if (Unit* pet = GetUnitOwner())
|
||||
if (pet->isPet())
|
||||
@@ -593,7 +593,7 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
void CalculateAmountMeleeHit(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
|
||||
void CalculateAmountMeleeHit(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
|
||||
{
|
||||
if (Player* owner = GetCaster()->GetOwner()->ToPlayer())
|
||||
{
|
||||
@@ -608,7 +608,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void CalculateAmountSpellHit(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
|
||||
void CalculateAmountSpellHit(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
|
||||
{
|
||||
if (Player* owner = GetCaster()->GetOwner()->ToPlayer())
|
||||
{
|
||||
@@ -623,7 +623,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void CalculateAmountExpertise(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
|
||||
void CalculateAmountExpertise(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
|
||||
{
|
||||
if (Player* owner = GetCaster()->GetOwner()->ToPlayer())
|
||||
{
|
||||
@@ -668,7 +668,7 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
void CalculateAmountCritSpell(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
|
||||
void CalculateAmountCritSpell(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
|
||||
{
|
||||
if (Player* owner = GetCaster()->GetOwner()->ToPlayer())
|
||||
{
|
||||
@@ -690,7 +690,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void CalculateAmountCritMelee(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
|
||||
void CalculateAmountCritMelee(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
|
||||
{
|
||||
if (Player* owner = GetCaster()->GetOwner()->ToPlayer())
|
||||
{
|
||||
@@ -741,11 +741,11 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
void CalculateAmountDamageDone(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
|
||||
void CalculateAmountDamageDone(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
|
||||
{
|
||||
if (!GetCaster() || !GetCaster()->GetOwner())
|
||||
return;
|
||||
if (Player* owner = GetCaster()->GetOwner()->ToPlayer())
|
||||
if (GetCaster()->GetOwner()->ToPlayer())
|
||||
{
|
||||
switch (GetCaster()->GetEntry())
|
||||
{
|
||||
@@ -792,13 +792,13 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
void CalculateAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/)
|
||||
void CalculateAmount(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
|
||||
{
|
||||
if (Unit* pet = GetUnitOwner())
|
||||
if (pet->isPet())
|
||||
if (Unit* owner = pet->ToPet()->GetOwner())
|
||||
if (AuraEffect* aurEffect = owner->GetAuraEffect(SPELL_WARLOCK_GLYPH_OF_VOIDWALKER, EFFECT_0))
|
||||
amount += aurEffect->GetAmount();
|
||||
if (AuraEffect* /* aurEff */ect = owner->GetAuraEffect(SPELL_WARLOCK_GLYPH_OF_VOIDWALKER, EFFECT_0))
|
||||
amount += /* aurEff */ect->GetAmount();
|
||||
}
|
||||
|
||||
void Register()
|
||||
@@ -830,10 +830,8 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
void CalculateAmountMeleeHit(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
|
||||
void CalculateAmountMeleeHit(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
|
||||
{
|
||||
if (!GetCaster() || !GetCaster()->GetOwner())
|
||||
return;
|
||||
if (Player* owner = GetCaster()->GetOwner()->ToPlayer())
|
||||
{
|
||||
// For others recalculate it from:
|
||||
@@ -847,10 +845,8 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void CalculateAmountSpellHit(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
|
||||
void CalculateAmountSpellHit(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
|
||||
{
|
||||
if (!GetCaster() || !GetCaster()->GetOwner())
|
||||
return;
|
||||
if (Player* owner = GetCaster()->GetOwner()->ToPlayer())
|
||||
{
|
||||
// For others recalculate it from:
|
||||
@@ -886,50 +882,45 @@ public:
|
||||
{
|
||||
PrepareAuraScript(spell_hun_pet_scaling_01_AuraScript);
|
||||
|
||||
void CalculateStaminaAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/)
|
||||
void CalculateStaminaAmount(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
|
||||
{
|
||||
if (Unit* pet = GetUnitOwner())
|
||||
{
|
||||
if (!pet->isPet())
|
||||
return;
|
||||
if (pet->isPet())
|
||||
if (Unit* owner = pet->ToPet()->GetOwner())
|
||||
{
|
||||
float mod = 0.45f;
|
||||
float ownerBonus = 0.0f;
|
||||
|
||||
Unit* owner = pet->ToPet()->GetOwner();
|
||||
if (!owner)
|
||||
return;
|
||||
PetSpellMap::const_iterator itr = (pet->ToPet()->m_spells.find(62758)); // Wild Hunt rank 1
|
||||
if (itr == pet->ToPet()->m_spells.end())
|
||||
itr = pet->ToPet()->m_spells.find(62762); // Wild Hunt rank 2
|
||||
|
||||
float mod = 0.45f;
|
||||
float ownerBonus = 0.0f;
|
||||
if (itr != pet->ToPet()->m_spells.end()) // If pet has Wild Hunt
|
||||
{
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(itr->first); // Then get the SpellProto and add the dummy effect value
|
||||
AddPctN(mod, spellInfo->Effects[EFFECT_0].CalcValue());
|
||||
}
|
||||
|
||||
PetSpellMap::const_iterator itr = (pet->ToPet()->m_spells.find(62758)); // Wild Hunt rank 1
|
||||
if (itr == pet->ToPet()->m_spells.end())
|
||||
itr = pet->ToPet()->m_spells.find(62762); // Wild Hunt rank 2
|
||||
ownerBonus = owner->GetStat(STAT_STAMINA)*mod;
|
||||
|
||||
if (itr != pet->ToPet()->m_spells.end()) // If pet has Wild Hunt
|
||||
{
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(itr->first); // Then get the SpellProto and add the dummy effect value
|
||||
AddPctN(mod, spellInfo->Effects[EFFECT_0].CalcValue());
|
||||
}
|
||||
|
||||
ownerBonus = owner->GetStat(STAT_STAMINA)*mod;
|
||||
|
||||
amount += ownerBonus;
|
||||
}
|
||||
amount += ownerBonus;
|
||||
}
|
||||
}
|
||||
|
||||
void ApplyEffect(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
void ApplyEffect(AuraEffect const* /* aurEff */, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
if (Unit* pet = GetUnitOwner())
|
||||
if (_tempHealth)
|
||||
pet->SetHealth(_tempHealth);
|
||||
}
|
||||
|
||||
void RemoveEffect(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
void RemoveEffect(AuraEffect const* /* aurEff */, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
if (Unit* pet = GetUnitOwner())
|
||||
_tempHealth = pet->GetHealth();
|
||||
}
|
||||
|
||||
void CalculateAttackPowerAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/)
|
||||
void CalculateAttackPowerAmount(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
|
||||
{
|
||||
if (Unit* pet = GetUnitOwner())
|
||||
{
|
||||
@@ -959,7 +950,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void CalculateDamageDoneAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/)
|
||||
void CalculateDamageDoneAmount(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
|
||||
{
|
||||
if (Unit* pet = GetUnitOwner())
|
||||
{
|
||||
@@ -1024,7 +1015,7 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
void CalculateFrostResistanceAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/)
|
||||
void CalculateFrostResistanceAmount(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
|
||||
{
|
||||
if (Unit* pet = GetUnitOwner())
|
||||
{
|
||||
@@ -1043,7 +1034,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void CalculateFireResistanceAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/)
|
||||
void CalculateFireResistanceAmount(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
|
||||
{
|
||||
if (Unit* pet = GetUnitOwner())
|
||||
{
|
||||
@@ -1062,7 +1053,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void CalculateNatureResistanceAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/)
|
||||
void CalculateNatureResistanceAmount(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
|
||||
{
|
||||
if (Unit* pet = GetUnitOwner())
|
||||
{
|
||||
@@ -1111,7 +1102,7 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
void CalculateShadowResistanceAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/)
|
||||
void CalculateShadowResistanceAmount(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
|
||||
{
|
||||
if (Unit* pet = GetUnitOwner())
|
||||
{
|
||||
@@ -1130,7 +1121,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void CalculateArcaneResistanceAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/)
|
||||
void CalculateArcaneResistanceAmount(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
|
||||
{
|
||||
if (Unit* pet = GetUnitOwner())
|
||||
{
|
||||
@@ -1149,7 +1140,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void CalculateArmorAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/)
|
||||
void CalculateArmorAmount(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
|
||||
{
|
||||
if (Unit* pet = GetUnitOwner())
|
||||
{
|
||||
@@ -1198,7 +1189,7 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
void CalculateAmountMeleeHit(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
|
||||
void CalculateAmountMeleeHit(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
|
||||
{
|
||||
if (!GetCaster() || !GetCaster()->GetOwner())
|
||||
return;
|
||||
@@ -1215,7 +1206,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void CalculateAmountSpellHit(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
|
||||
void CalculateAmountSpellHit(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
|
||||
{
|
||||
if (!GetCaster() || !GetCaster()->GetOwner())
|
||||
return;
|
||||
@@ -1232,7 +1223,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void CalculateAmountExpertise(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
|
||||
void CalculateAmountExpertise(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
|
||||
{
|
||||
if (!GetCaster() || !GetCaster()->GetOwner())
|
||||
return;
|
||||
@@ -1279,11 +1270,11 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
void CalculateAmountCritSpell(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
|
||||
void CalculateAmountCritSpell(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
|
||||
{
|
||||
if (!GetCaster() || !GetCaster()->GetOwner())
|
||||
return;
|
||||
if (Player* owner = GetCaster()->GetOwner()->ToPlayer())
|
||||
if (GetCaster()->GetOwner()->ToPlayer())
|
||||
{
|
||||
// For others recalculate it from:
|
||||
float CritSpell = 0.0f;
|
||||
@@ -1300,11 +1291,11 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void CalculateAmountCritMelee(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
|
||||
void CalculateAmountCritMelee(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
|
||||
{
|
||||
if (!GetCaster() || !GetCaster()->GetOwner())
|
||||
return;
|
||||
if (Player* owner = GetCaster()->GetOwner()->ToPlayer())
|
||||
if (GetCaster()->GetOwner()->ToPlayer())
|
||||
{
|
||||
// For others recalculate it from:
|
||||
float CritMelee = 0.0f;
|
||||
@@ -1350,11 +1341,11 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
void CalculateAmountDamageDone(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
|
||||
void CalculateAmountDamageDone(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
|
||||
{
|
||||
if (!GetCaster() || !GetCaster()->GetOwner())
|
||||
return;
|
||||
if (Player* owner = GetCaster()->GetOwner()->ToPlayer())
|
||||
if (GetCaster()->GetOwner()->ToPlayer())
|
||||
{
|
||||
// Pet's base damage changes depending on happiness
|
||||
if (GetCaster()->isPet() && GetCaster()->ToPet()->isHunterPet())
|
||||
@@ -1408,14 +1399,14 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
void CalculateAmountDamageDone(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
|
||||
void CalculateAmountDamageDone(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
|
||||
{
|
||||
if (!GetCaster() || !GetCaster()->GetOwner())
|
||||
return;
|
||||
if (Player* owner = GetCaster()->GetOwner()->ToPlayer())
|
||||
{
|
||||
if (AuraEffect* aurEffect = owner->GetAuraEffectOfRankedSpell(SPELL_HUNTER_ANIMAL_HANDLER, EFFECT_1))
|
||||
amount = aurEffect->GetAmount();
|
||||
if (AuraEffect* /* aurEff */ect = owner->GetAuraEffectOfRankedSpell(SPELL_HUNTER_ANIMAL_HANDLER, EFFECT_1))
|
||||
amount = /* aurEff */ect->GetAmount();
|
||||
else
|
||||
amount = 0;
|
||||
}
|
||||
@@ -1450,18 +1441,19 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
void CalculateAvoidanceAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/)
|
||||
void CalculateAvoidanceAmount(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
|
||||
{
|
||||
if (Unit* pet = GetUnitOwner())
|
||||
{
|
||||
if (Unit* owner = pet->GetOwner())
|
||||
|
||||
{
|
||||
// Army of the dead ghoul
|
||||
if (pet->GetEntry() == ENTRY_ARMY_OF_THE_DEAD_GHOUL)
|
||||
amount = -90;
|
||||
// Night of the dead
|
||||
else if ( Aura * aur = owner->GetAuraOfRankedSpell(SPELL_NIGHT_OF_THE_DEAD))
|
||||
amount = aur->GetSpellInfo()->Effects[EFFECT_2].CalcValue();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1494,7 +1486,7 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
void CalculateStaminaAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/)
|
||||
void CalculateStaminaAmount(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
|
||||
{
|
||||
if (Unit* pet = GetUnitOwner())
|
||||
{
|
||||
@@ -1520,20 +1512,20 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void ApplyEffect(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
void ApplyEffect(AuraEffect const* /* aurEff */, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
if (Unit* pet = GetUnitOwner())
|
||||
if (_tempHealth)
|
||||
pet->SetHealth(_tempHealth);
|
||||
}
|
||||
|
||||
void RemoveEffect(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
void RemoveEffect(AuraEffect const* /* aurEff */, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
if (Unit* pet = GetUnitOwner())
|
||||
_tempHealth = pet->GetHealth();
|
||||
}
|
||||
|
||||
void CalculateStrengthAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/)
|
||||
void CalculateStrengthAmount(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
|
||||
{
|
||||
if (Unit* pet = GetUnitOwner())
|
||||
{
|
||||
@@ -1597,7 +1589,7 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
void CalculateAmountMeleeHaste(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
|
||||
void CalculateAmountMeleeHaste(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
|
||||
{
|
||||
if (!GetCaster() || !GetCaster()->GetOwner())
|
||||
return;
|
||||
@@ -1640,7 +1632,7 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
void CalculateAmountMeleeHit(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
|
||||
void CalculateAmountMeleeHit(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
|
||||
{
|
||||
if (!GetCaster() || !GetCaster()->GetOwner())
|
||||
return;
|
||||
@@ -1657,7 +1649,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void CalculateAmountSpellHit(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
|
||||
void CalculateAmountSpellHit(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
|
||||
{
|
||||
if (!GetCaster() || !GetCaster()->GetOwner())
|
||||
return;
|
||||
@@ -1703,7 +1695,7 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
void CalculateDamageDoneAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/)
|
||||
void CalculateDamageDoneAmount(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
|
||||
{
|
||||
if (Unit* pet = GetUnitOwner())
|
||||
{
|
||||
@@ -1718,7 +1710,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void CalculateAmountMeleeHaste(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
|
||||
void CalculateAmountMeleeHaste(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
|
||||
{
|
||||
if (!GetCaster() || !GetCaster()->GetOwner())
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user