mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
[7649] Fix resilience damage reduction coefficients changed after client switch
Signed-off-by: DiSlord <dislord@nomail.com>
This commit is contained in:
parent
199c09640d
commit
c4b2e3f67c
2 changed files with 9 additions and 9 deletions
|
|
@ -4557,24 +4557,24 @@ float Player::GetRatingBonusValue(CombatRating cr) const
|
||||||
|
|
||||||
uint32 Player::GetMeleeCritDamageReduction(uint32 damage) const
|
uint32 Player::GetMeleeCritDamageReduction(uint32 damage) const
|
||||||
{
|
{
|
||||||
float melee = GetRatingBonusValue(CR_CRIT_TAKEN_MELEE)*2.0f;
|
float melee = GetRatingBonusValue(CR_CRIT_TAKEN_MELEE)*2.2f;
|
||||||
if (melee>25.0f) melee = 25.0f;
|
if (melee>33.0f) melee = 33.0f;
|
||||||
return uint32 (melee * damage /100.0f);
|
return uint32 (melee * damage /100.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 Player::GetRangedCritDamageReduction(uint32 damage) const
|
uint32 Player::GetRangedCritDamageReduction(uint32 damage) const
|
||||||
{
|
{
|
||||||
float ranged = GetRatingBonusValue(CR_CRIT_TAKEN_RANGED)*2.0f;
|
float ranged = GetRatingBonusValue(CR_CRIT_TAKEN_RANGED)*2.2f;
|
||||||
if (ranged>25.0f) ranged=25.0f;
|
if (ranged>33.0f) ranged=33.0f;
|
||||||
return uint32 (ranged * damage /100.0f);
|
return uint32 (ranged * damage /100.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 Player::GetSpellCritDamageReduction(uint32 damage) const
|
uint32 Player::GetSpellCritDamageReduction(uint32 damage) const
|
||||||
{
|
{
|
||||||
float spell = GetRatingBonusValue(CR_CRIT_TAKEN_SPELL)*2.0f;
|
float spell = GetRatingBonusValue(CR_CRIT_TAKEN_SPELL)*2.2f;
|
||||||
// In wow script resilience limited to 25%
|
// In wow script resilience limited to 33%
|
||||||
if (spell>25.0f)
|
if (spell>33.0f)
|
||||||
spell = 25.0f;
|
spell = 33.0f;
|
||||||
return uint32 (spell * damage / 100.0f);
|
return uint32 (spell * damage / 100.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "7648"
|
#define REVISION_NR "7649"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue