From 2cf2ef4fac63652ee606cd31f1243a35c43cc155 Mon Sep 17 00:00:00 2001 From: KayenEQ Date: Tue, 10 Mar 2015 00:33:11 -0400 Subject: [PATCH] Fix to check if weapon actually has a valid proc before trying to proc it. --- zone/attack.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/zone/attack.cpp b/zone/attack.cpp index 2946c0ef7..950663a38 100644 --- a/zone/attack.cpp +++ b/zone/attack.cpp @@ -3650,6 +3650,7 @@ void Mob::CommonDamage(Mob* attacker, int32 &damage, const uint16 spell_id, cons (frontal_stun_resist && zone->random.Roll(frontal_stun_resist))) && !attacker->BehindMob(this, attacker->GetX(), attacker->GetY())) { Log.Out(Logs::Detail, Logs::Combat, "Frontal stun resisted. %d chance.", frontal_stun_resist); + } else { // Normal stun resist check. if (stun_resist && zone->random.Roll(stun_resist)) { @@ -3994,7 +3995,7 @@ void Mob::TryWeaponProc(const ItemInst *inst, const Item_Struct *weapon, Mob *on // We can proc once here, either weapon or one aug bool proced = false; // silly bool to prevent augs from going if weapon does skillinuse = GetSkillByItemType(weapon->ItemType); - if (weapon->Proc.Type == ET_CombatProc) { + if (weapon->Proc.Type == ET_CombatProc && IsValidSpell(weapon->Proc.Effect)) { float WPC = ProcChance * (100.0f + // Proc chance for this weapon static_cast(weapon->ProcRate)) / 100.0f; if (zone->random.Roll(WPC)) { // 255 dex = 0.084 chance of proc. No idea what this number should be really. @@ -4032,7 +4033,7 @@ void Mob::TryWeaponProc(const ItemInst *inst, const Item_Struct *weapon, Mob *on if (!aug) continue; - if (aug->Proc.Type == ET_CombatProc) { + if (aug->Proc.Type == ET_CombatProc && IsValidSpell(aug->Proc.Effect)) { float APC = ProcChance * (100.0f + // Proc chance for this aug static_cast(aug->ProcRate)) / 100.0f; if (zone->random.Roll(APC)) {