Fixed augs having 100% proc rate

This commit is contained in:
Siroro 2014-02-27 12:00:06 +00:00
parent f32a30fb9a
commit a490b2ff22

View File

@ -4093,20 +4093,24 @@ void Mob::TryWeaponProc(const ItemInst *inst, const Item_Struct *weapon, Mob *on
float APC = ProcChance * (100.0f + // Proc chance for this aug float APC = ProcChance * (100.0f + // Proc chance for this aug
static_cast<float>(aug->ProcRate)) / 100.0f; static_cast<float>(aug->ProcRate)) / 100.0f;
if (MakeRandomFloat(0, 1) <= APC) { if (MakeRandomFloat(0, 1) <= APC) {
if (aug->Proc.Level > ourlevel) {
if (IsPet()) { if (IsPet()) {
Mob *own = GetOwner(); Mob *own = GetOwner();
if (own) if (own)
own->Message_StringID(13, PROC_PETTOOLOW); own->Message_StringID(13, PROC_PETTOOLOW);
} else { }
else {
Message_StringID(13, PROC_TOOLOW); Message_StringID(13, PROC_TOOLOW);
} }
} else { }
else {
ExecWeaponProc(aug_i, aug->Proc.Effect, on); ExecWeaponProc(aug_i, aug->Proc.Effect, on);
break; break;
} }
} }
} }
} }
}
// TODO: Powersource procs // TODO: Powersource procs
if (HasSkillProcs()) if (HasSkillProcs())
TrySkillProc(on, skillinuse, ProcChance); TrySkillProc(on, skillinuse, ProcChance);