Core/Refactor: Fix alot of Possible loss of fraction warnings

This commit is contained in:
hondacrx
2018-05-07 17:34:41 -04:00
parent daa425b029
commit b2c1554065
17 changed files with 31 additions and 30 deletions
+2 -2
View File
@@ -784,7 +784,7 @@ namespace Game.Entities
uint VictimDefense = victim.GetMaxSkillValueForLevel(this);
uint AttackerMeleeSkill = GetMaxSkillValueForLevel();
Probability *= (float)(AttackerMeleeSkill / VictimDefense * 0.16);
Probability *= (AttackerMeleeSkill / (float)VictimDefense * 0.16f);
if (Probability < 0)
Probability = 0;
@@ -1014,7 +1014,7 @@ namespace Game.Entities
victim.ToCreature().LowerPlayerDamageReq(health < damage ? health : damage);
}
damage /= (uint)victim.GetHealthMultiplierForTarget(this);
damage = (uint)(damage / victim.GetHealthMultiplierForTarget(this));
if (health <= damage)
{