From 009918cbd10fdfe3e4ce9a7ea587e44b83e31d90 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Sat, 27 Jun 2015 22:43:00 -0400 Subject: [PATCH] Fix songcap implementation --- zone/client_mods.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/zone/client_mods.cpp b/zone/client_mods.cpp index 76ce5195c..13a8130bd 100644 --- a/zone/client_mods.cpp +++ b/zone/client_mods.cpp @@ -1979,10 +1979,17 @@ uint32 Mob::GetInstrumentMod(uint16 spell_id) const uint32 effectmod = 10; int effectmodcap = 0; - if (RuleB(Character, UseSpellFileSongCap)) + bool nocap = false; + if (RuleB(Character, UseSpellFileSongCap)) { effectmodcap = spells[spell_id].songcap / 10; - else + // this looks a bit weird, but easiest way I could think to keep both systems working + if (effectmodcap == 0) + nocap = true; + else + effectmodcap += 10; + } else { effectmodcap = RuleI(Character, BaseInstrumentSoftCap); + } // this should never use spell modifiers... // if a spell grants better modifers, they are copied into the item mods // because the spells are supposed to act just like having the intrument. @@ -2056,7 +2063,7 @@ uint32 Mob::GetInstrumentMod(uint16 spell_id) const effectmodcap += aabonuses.songModCap + spellbonuses.songModCap + itembonuses.songModCap; if (effectmod < 10) effectmod = 10; - if (effectmodcap && effectmod > effectmodcap) // if the cap is calculated to be 0 using new rules, no cap. + if (!nocap && effectmod > effectmodcap) // if the cap is calculated to be 0 using new rules, no cap. effectmod = effectmodcap; Log.Out(Logs::Detail, Logs::Spells, "%s::GetInstrumentMod() spell=%d mod=%d modcap=%d\n", GetName(), spell_id, effectmod, effectmodcap);