private void RemoveBonuses(Skill skill)
{
_creature.StrBaseSkill -= skill.RankData.StrTotal;
_creature.IntBaseSkill -= skill.RankData.IntTotal;
_creature.DexBaseSkill -= skill.RankData.DexTotal;
_creature.WillBaseSkill -= skill.RankData.WillTotal;
_creature.LuckBaseSkill -= skill.RankData.LuckTotal;
_creature.Life -= skill.RankData.LifeTotal;
_creature.LifeMaxBaseSkill -= skill.RankData.LifeTotal;
_creature.Mana -= skill.RankData.ManaTotal;
_creature.ManaMaxBaseSkill -= skill.RankData.ManaTotal;
_creature.Stamina -= skill.RankData.StaminaTotal;
_creature.StaminaMaxBaseSkill -= skill.RankData.StaminaTotal;
if (skill.Info.Id == SkillId.CombatMastery)
{
_creature.Life -= skill.RankData.Var3;
_creature.StatMods.Remove(Stat.LifeMaxMod, StatModSource.SkillRank, skill.Info.Id);
}
else if (skill.Info.Id == SkillId.MagicMastery)
{
_creature.Mana -= skill.RankData.Var1;
_creature.StatMods.Remove(Stat.ManaMaxMod, StatModSource.SkillRank, skill.Info.Id);
}
else if (skill.Info.Id == SkillId.Defense)
{
_creature.StatMods.Remove(Stat.DefenseBaseMod, StatModSource.SkillRank, skill.Info.Id);
}
this.UpdateHighestSkills();
}