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

@ -4091,18 +4091,22 @@ void Mob::TryWeaponProc(const ItemInst *inst, const Item_Struct *weapon, Mob *on
if (aug->Proc.Type == ET_CombatProc) { if (aug->Proc.Type == ET_CombatProc) {
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 (IsPet()) { if (aug->Proc.Level > ourlevel) {
Mob *own = GetOwner(); if (IsPet()) {
if (own) Mob *own = GetOwner();
own->Message_StringID(13, PROC_PETTOOLOW); if (own)
} else { own->Message_StringID(13, PROC_PETTOOLOW);
Message_StringID(13, PROC_TOOLOW); }
else {
Message_StringID(13, PROC_TOOLOW);
}
}
else {
ExecWeaponProc(aug_i, aug->Proc.Effect, on);
break;
} }
} else {
ExecWeaponProc(aug_i, aug->Proc.Effect, on);
break;
} }
} }
} }