mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-06 00:32:25 +00:00
partial_modifier should be a float not an int
This commit is contained in:
parent
1e1281b805
commit
1cfd02329d
@ -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();
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user