From 050e78b1b6e137c97d4cf6d630bdca61261d60a7 Mon Sep 17 00:00:00 2001 From: RoTPvP <77220477+RoT-PvP@users.noreply.github.com> Date: Fri, 2 Apr 2021 20:44:59 -0700 Subject: [PATCH] Added a check to stop Bard song for Mezz/Stun (#1319) * Added a check to stop Bard song for Mezz/Stun * Cleaned Song stun / mezz stop * Update client_process.cpp * removed bard check & added else where * code clean up Co-authored-by: ProducerZekServer --- zone/spells.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/zone/spells.cpp b/zone/spells.cpp index 19b9a8f2b..ed4c6c57a 100644 --- a/zone/spells.cpp +++ b/zone/spells.cpp @@ -4924,11 +4924,13 @@ void Mob::Stun(int duration) if(stunned && stunned_timer.GetRemainingTime() > uint32(duration)) return; - if(IsValidSpell(casting_spell_id) && !spells[casting_spell_id].uninterruptable) { + auto spell_id = bardsong ? bardsong : casting_spell_id; + + if(IsValidSpell(spell_id) && !spells[spell_id].uninterruptable) { int persistent_casting = spellbonuses.PersistantCasting + itembonuses.PersistantCasting + aabonuses.PersistantCasting; if(zone->random.Int(0,99) > persistent_casting) - InterruptSpell(); + InterruptSpell(spell_id); } if(duration > 0) @@ -4984,9 +4986,11 @@ void Mob::Mesmerize() { mezzed = true; - if (casting_spell_id) - InterruptSpell(); + auto spell_id = bardsong ? bardsong : casting_spell_id; + if (spell_id) + InterruptSpell(spell_id); + StopNavigation(); }