[8455] Do not disband guild, if guild ranks are not defined for that guild, removed obsolete comment.

Do not allow to delete guild rank, when there are only 5 or less ranks defined.

    Signed-off-by: Triply <triply@getmangos.com>

--HG--
branch : trunk
This commit is contained in:
megamage
2009-09-02 18:40:27 -05:00
parent 4d94b923ef
commit 09974f0598
3 changed files with 18 additions and 8 deletions
+10 -4
View File
@@ -1615,6 +1615,7 @@ uint32 Unit::CalcArmorReducedDamage(Unit* pVictim, const uint32 damage, SpellEnt
{
uint32 newdamage = 0;
float armor = pVictim->GetArmor();
// Ignore enemy armor by SPELL_AURA_MOD_TARGET_RESISTANCE aura
armor += GetTotalAuraModifierByMiscMask(SPELL_AURA_MOD_TARGET_RESISTANCE, SPELL_SCHOOL_MASK_NORMAL);
@@ -1679,19 +1680,24 @@ uint32 Unit::CalcArmorReducedDamage(Unit* pVictim, const uint32 damage, SpellEnt
armor -= armorPen;
}
if (armor < 0.0f) armor=0.0f;
// Ignore enemy armor by SPELL_AURA_MOD_TARGET_ARMOR_PCT
//armor *= 1.0f - GetTotalAuraModifier(SPELL_AURA_MOD_ARMOR_PENETRATION_PCT) / 100.0f;
if (armor < 0.0f)
armor = 0.0f;
float levelModifier = getLevel();
if ( levelModifier > 59 )
if (levelModifier > 59)
levelModifier = levelModifier + (4.5f * (levelModifier-59));
float tmpvalue = 0.1f * armor / (8.5f * levelModifier + 40);
tmpvalue = tmpvalue/(1.0f + tmpvalue);
if(tmpvalue < 0.0f)
if (tmpvalue < 0.0f)
tmpvalue = 0.0f;
if(tmpvalue > 0.75f)
if (tmpvalue > 0.75f)
tmpvalue = 0.75f;
newdamage = uint32(damage - (damage * tmpvalue));
return (newdamage > 1) ? newdamage : 1;