From 1cfd02329d12c6fd3c0fa95e9b5c196e280ad1f5 Mon Sep 17 00:00:00 2001 From: Arthur Dene Ice Date: Sat, 10 May 2014 14:59:50 -0700 Subject: [PATCH] partial_modifier should be a float not an int --- zone/spells.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/zone/spells.cpp b/zone/spells.cpp index 4e3ae6dbb..ea6de77f9 100644 --- a/zone/spells.cpp +++ b/zone/spells.cpp @@ -4390,7 +4390,7 @@ float Mob::ResistSpell(uint8 resist_type, uint16 spell_id, Mob *caster, bool use resist_chance = 1; } - int partial_modifier = ((150 * (roll - resist_chance)) / resist_chance); + float partial_modifier = ((150 * (roll - resist_chance)) / resist_chance); if(IsNPC()) { @@ -4414,7 +4414,7 @@ float Mob::ResistSpell(uint8 resist_type, uint16 spell_id, Mob *caster, bool use { if((GetLevel() - caster->GetLevel()) >= 20) { - partial_modifier += (GetLevel() - caster->GetLevel()) * 1.5; + partial_modifier = partial_modifier+(GetLevel() - caster->GetLevel()) * 1.5f; } } @@ -4428,7 +4428,7 @@ float Mob::ResistSpell(uint8 resist_type, uint16 spell_id, Mob *caster, bool use return 100; } - return (float)partial_modifier; + return partial_modifier; } } } @@ -4641,7 +4641,7 @@ void NPC::Stun(int duration) { void NPC::UnStun() { Mob::UnStun(); - SetRunAnimSpeed(this->GetRunspeed()); + SetRunAnimSpeed((int8)this->GetRunspeed()); SendPosition(); }