From 45cdc4c29ae969afd201d37f1d075eb5697c1964 Mon Sep 17 00:00:00 2001 From: KayenEQ Date: Mon, 8 Apr 2024 15:15:21 -0400 Subject: [PATCH] minor bug fixes to SPA382 Fixing a few missing breaks and other minor bug fixes for SPA382 --- zone/bonuses.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/zone/bonuses.cpp b/zone/bonuses.cpp index 13aa824bc..3c1a5cfa4 100644 --- a/zone/bonuses.cpp +++ b/zone/bonuses.cpp @@ -4401,8 +4401,9 @@ uint8 Mob::IsFocusEffect(uint16 spell_id,int effect_index, bool AA,uint32 aa_eff void Mob::NegateSpellEffectBonuses(uint16 spell_id) { - if (!IsValidSpell(spell_id)) + if (!IsValidSpell(spell_id)) { return; + } int effect_value = 0; @@ -4451,6 +4452,7 @@ void Mob::NegateSpellEffectBonuses(uint16 spell_id) break; } + //Negate focus effects for (int e = 0; e < HIGHEST_FOCUS + 1; e++) { @@ -4763,6 +4765,7 @@ void Mob::NegateSpellEffectBonuses(uint16 spell_id) if (negate_aabonus) { aabonuses.CriticalHitChance[e] = effect_value; } if (negate_itembonus) { itembonuses.CriticalHitChance[e] = effect_value; } } + break; } case SE_CrippBlowChance: @@ -5231,7 +5234,7 @@ void Mob::NegateSpellEffectBonuses(uint16 spell_id) if (negate_spellbonus) { spellbonuses.MeleeThresholdGuard[SBIndex::THRESHOLDGUARD_MITIGATION_PERCENT] = effect_value; spellbonuses.MeleeThresholdGuard[SBIndex::THRESHOLDGUARD_BUFFSLOT] = -1; - spellbonuses.MeleeThresholdGuard[SBIndex::THRESHOLDGUARD_BUFFSLOT] = effect_value; + spellbonuses.MeleeThresholdGuard[SBIndex::THRESHOLDGUARD_MIN_DMG_TO_TRIGGER] = effect_value; } break; @@ -5240,7 +5243,7 @@ void Mob::NegateSpellEffectBonuses(uint16 spell_id) if (negate_spellbonus) { spellbonuses.SpellThresholdGuard[SBIndex::THRESHOLDGUARD_MITIGATION_PERCENT] = effect_value; spellbonuses.SpellThresholdGuard[SBIndex::THRESHOLDGUARD_BUFFSLOT] = -1; - spellbonuses.SpellThresholdGuard[SBIndex::THRESHOLDGUARD_BUFFSLOT] = effect_value; + spellbonuses.SpellThresholdGuard[SBIndex::THRESHOLDGUARD_MIN_DMG_TO_TRIGGER] = effect_value; } break; @@ -5277,6 +5280,7 @@ void Mob::NegateSpellEffectBonuses(uint16 spell_id) if (negate_spellbonus) { spellbonuses.ShieldBlock = effect_value; } if (negate_aabonus) { aabonuses.ShieldBlock = effect_value; } if (negate_itembonus) { itembonuses.ShieldBlock = effect_value; } + break; case SE_BlockBehind: if (negate_spellbonus) { spellbonuses.BlockBehind = effect_value; }