mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 10:31:29 +00:00
fix for random int -> float error
This commit is contained in:
parent
d22d0a8145
commit
b27ff80c75
@ -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<float>(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);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user