- moved GetSaveAmount() from the base armor class

This commit is contained in:
Blue Shadow 2019-08-03 11:14:03 +03:00
parent 479a992a3e
commit 5abffabb56

View file

@ -40,23 +40,6 @@ class Armor : Inventory
Inventory.PickupSound "misc/armor_pkup";
+INVENTORY.ISARMOR
}
int GetSaveAmount ()
{
if (self is 'BasicArmorBonus')
{
let armor = BasicArmorBonus(self);
return !armor.bIgnoreSkill ? int(armor.SaveAmount * G_SkillPropertyFloat(SKILLP_ArmorFactor)) : armor.SaveAmount;
}
if (self is 'BasicArmorPickup')
{
let armor = BasicArmorPickup(self);
return !armor.bIgnoreSkill ? int(armor.SaveAmount * G_SkillPropertyFloat(SKILLP_ArmorFactor)) : armor.SaveAmount;
}
return 0;
}
}
//===========================================================================
@ -342,6 +325,11 @@ class BasicArmorBonus : Armor
{
SaveAmount *= amount;
}
int GetSaveAmount ()
{
return !bIgnoreSkill ? int(SaveAmount * G_SkillPropertyFloat(SKILLP_ArmorFactor)) : SaveAmount;
}
}
//===========================================================================
@ -443,6 +431,10 @@ class BasicArmorPickup : Armor
SaveAmount *= amount;
}
int GetSaveAmount ()
{
return !bIgnoreSkill ? int(SaveAmount * G_SkillPropertyFloat(SKILLP_ArmorFactor)) : SaveAmount;
}
}
//===========================================================================