Core/Spells: Removed outdated mechanic (spell downranking coef penalty)
This commit is contained in:
1 parent
3ac066856b
commit
7be6304306
4 files changed
+63
-30
No files matched your search
@@ -2262,22 +2262,6 @@ uint32 Unit::CalculateDamage(WeaponAttackType attType, bool normalized, bool add
|
||||
return urand(uint32(minDamage), uint32(maxDamage));
|
||||
}
|
||||
|
||||
float Unit::CalculateLevelPenalty(SpellInfo const* spellProto) const
|
||||
{
|
||||
if (spellProto->SpellLevel <= 0 || spellProto->SpellLevel >= spellProto->MaxLevel)
|
||||
return 1.0f;
|
||||
|
||||
float LvlPenalty = 0.0f;
|
||||
|
||||
if (spellProto->SpellLevel < 20)
|
||||
LvlPenalty = (20.0f - spellProto->SpellLevel) * 3.75f;
|
||||
float LvlFactor = (float(spellProto->SpellLevel) + 6.0f) / float(getLevel());
|
||||
if (LvlFactor > 1.0f)
|
||||
LvlFactor = 1.0f;
|
||||
|
||||
return AddPct(LvlFactor, -LvlPenalty);
|
||||
}
|
||||
|
||||
void Unit::SendMeleeAttackStart(Unit* victim)
|
||||
{
|
||||
WorldPacket data(SMSG_ATTACKSTART, 8 + 8);
|
||||
@@ -6545,15 +6529,13 @@ uint32 Unit::SpellDamageBonusDone(Unit* victim, SpellInfo const* spellProto, uin
|
||||
if (!bonus || coeff < 0)
|
||||
coeff = CalculateDefaultCoefficient(spellProto, damagetype) * int32(stack);
|
||||
|
||||
float factorMod = CalculateLevelPenalty(spellProto) * stack;
|
||||
|
||||
if (Player* modOwner = GetSpellModOwner())
|
||||
{
|
||||
coeff *= 100.0f;
|
||||
modOwner->ApplySpellMod<SPELLMOD_BONUS_MULTIPLIER>(spellProto->Id, coeff);
|
||||
coeff /= 100.0f;
|
||||
}
|
||||
DoneTotal += int32(DoneAdvertisedBenefit * coeff * factorMod);
|
||||
DoneTotal += int32(DoneAdvertisedBenefit * coeff * stack);
|
||||
}
|
||||
|
||||
float tmpDamage = (int32(pdamage) + DoneTotal);
|
||||
@@ -6839,7 +6821,6 @@ uint32 Unit::SpellDamageBonusTaken(Unit* caster, SpellInfo const* spellProto, ui
|
||||
if (!bonus || coeff < 0)
|
||||
coeff = CalculateDefaultCoefficient(spellProto, damagetype) * int32(stack);
|
||||
|
||||
float factorMod = CalculateLevelPenalty(spellProto) * stack;
|
||||
// level penalty still applied on Taken bonus - is it blizzlike?
|
||||
if (Player* modOwner = GetSpellModOwner())
|
||||
{
|
||||
@@ -6847,7 +6828,7 @@ uint32 Unit::SpellDamageBonusTaken(Unit* caster, SpellInfo const* spellProto, ui
|
||||
modOwner->ApplySpellMod<SPELLMOD_BONUS_MULTIPLIER>(spellProto->Id, coeff);
|
||||
coeff /= 100.0f;
|
||||
}
|
||||
TakenTotal += int32(TakenAdvertisedBenefit * coeff * factorMod);
|
||||
TakenTotal += int32(TakenAdvertisedBenefit * coeff * stack);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7263,7 +7244,6 @@ uint32 Unit::SpellHealingBonusDone(Unit* victim, SpellInfo const* spellProto, ui
|
||||
// Check for table values
|
||||
SpellBonusEntry const* bonus = sSpellMgr->GetSpellBonusData(spellProto->Id);
|
||||
float coeff = 0;
|
||||
float factorMod = 1.0f;
|
||||
if (bonus)
|
||||
{
|
||||
if (damagetype == DOT)
|
||||
@@ -7294,8 +7274,6 @@ uint32 Unit::SpellHealingBonusDone(Unit* victim, SpellInfo const* spellProto, ui
|
||||
if (!bonus || coeff < 0)
|
||||
coeff = CalculateDefaultCoefficient(spellProto, damagetype) * int32(stack) * 1.88f; // As wowwiki says: C = (Cast Time / 3.5) * 1.88 (for healing spells)
|
||||
|
||||
factorMod *= CalculateLevelPenalty(spellProto) * stack;
|
||||
|
||||
if (Player* modOwner = GetSpellModOwner())
|
||||
{
|
||||
coeff *= 100.0f;
|
||||
@@ -7303,7 +7281,7 @@ uint32 Unit::SpellHealingBonusDone(Unit* victim, SpellInfo const* spellProto, ui
|
||||
coeff /= 100.0f;
|
||||
}
|
||||
|
||||
DoneTotal += int32(DoneAdvertisedBenefit * coeff * factorMod);
|
||||
DoneTotal += int32(DoneAdvertisedBenefit * coeff * stack);
|
||||
}
|
||||
|
||||
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
|
||||
@@ -7454,7 +7432,6 @@ uint32 Unit::SpellHealingBonusTaken(Unit* caster, SpellInfo const* spellProto, u
|
||||
// Check for table values
|
||||
SpellBonusEntry const* bonus = sSpellMgr->GetSpellBonusData(spellProto->Id);
|
||||
float coeff = 0;
|
||||
float factorMod = 1.0f;
|
||||
if (bonus)
|
||||
coeff = (damagetype == DOT) ? bonus->dot_damage : bonus->direct_damage;
|
||||
else
|
||||
@@ -7473,7 +7450,6 @@ uint32 Unit::SpellHealingBonusTaken(Unit* caster, SpellInfo const* spellProto, u
|
||||
if (!bonus || coeff < 0)
|
||||
coeff = CalculateDefaultCoefficient(spellProto, damagetype) * int32(stack) * 1.88f; // As wowwiki says: C = (Cast Time / 3.5) * 1.88 (for healing spells)
|
||||
|
||||
factorMod *= CalculateLevelPenalty(spellProto) * int32(stack);
|
||||
if (Player* modOwner = GetSpellModOwner())
|
||||
{
|
||||
coeff *= 100.0f;
|
||||
@@ -7481,7 +7457,7 @@ uint32 Unit::SpellHealingBonusTaken(Unit* caster, SpellInfo const* spellProto, u
|
||||
coeff /= 100.0f;
|
||||
}
|
||||
|
||||
TakenTotal += int32(TakenAdvertisedBenefit * coeff * factorMod);
|
||||
TakenTotal += int32(TakenAdvertisedBenefit * coeff * stack);
|
||||
}
|
||||
|
||||
AuraEffectList const& mHealingGet= GetAuraEffectsByType(SPELL_AURA_MOD_HEALING_RECEIVED);
|
||||
|
||||
Reference in new issue
Block a user