From b27ff80c751354a739669e4f31a0066cb75fc8e8 Mon Sep 17 00:00:00 2001 From: KayenEQ Date: Tue, 8 Jul 2014 08:04:56 -0400 Subject: [PATCH] fix for random int -> float error --- zone/attack.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zone/attack.cpp b/zone/attack.cpp index 6bf7b744c..37759bc9a 100644 --- a/zone/attack.cpp +++ b/zone/attack.cpp @@ -3983,9 +3983,9 @@ void Mob::TryDefensiveProc(const ItemInst* weapon, Mob *on, uint16 hand, int dam if (bDefensiveProc){ for (int i = 0; i < MAX_PROCS; i++) { - if (DefensiveProcs[i].spellID != SPELL_UNKNOWN) { + if (IsValidSpell(DefensiveProcs[i].spellID)) { float chance = ProcChance * (static_cast(DefensiveProcs[i].chance)/100.0f); - if ((MakeRandomInt(0, 1) <= chance)) { + if ((MakeRandomFloat(0, 1) <= chance)) { ExecWeaponProc(nullptr, DefensiveProcs[i].spellID, on); CheckNumHitsRemaining(NUMHIT_DefensiveSpellProcs,0,DefensiveProcs[i].base_spellID); }