From cbb619c2d91478d8988f5f0a247618bb0a094c4b Mon Sep 17 00:00:00 2001 From: nytmyr <53322305+nytmyr@users.noreply.github.com> Date: Sun, 2 Feb 2025 08:22:24 -0600 Subject: [PATCH] Clean up InterruptSpell --- zone/spells.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/zone/spells.cpp b/zone/spells.cpp index b2f9e1e2a..8b624fb76 100644 --- a/zone/spells.cpp +++ b/zone/spells.cpp @@ -1257,12 +1257,11 @@ void Mob::InterruptSpell(uint16 message, uint16 color, uint16 spellid) bool bard_song_mode = false; //has the bard song gone to auto repeat mode if (IsBot()) { - CastToBot()->SetCastedSpellType(UINT16_MAX); - } + auto bot = CastToBot(); + bot->SetCastedSpellType(UINT16_MAX); - if (IsBot() && IsValidSpell(spellid)) { - if (CastToBot()->CheckSpellRecastTimer(spellid)) { - CastToBot()->ClearSpellRecastTimer(spellid); + if (IsValidSpell(spellid) && bot->CheckSpellRecastTimer(spellid)) { + bot->ClearSpellRecastTimer(spellid); } }