From 9f7c4f6f1eb5368e56bc57dfa72ce7d1ad94c9b5 Mon Sep 17 00:00:00 2001 From: athrxx Date: Tue, 6 Nov 2018 23:34:26 +0100 Subject: KYRA: (EOB) - fix bug in dispel magic spell This bug would occur when casting dispel magic while the weapon slots were temporarily disabled (from using a weapon etc.). This could lead to permanently disabled slots. --- engines/kyra/magic_eob.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/engines/kyra/magic_eob.cpp b/engines/kyra/magic_eob.cpp index a435850e54..52bca46a24 100644 --- a/engines/kyra/magic_eob.cpp +++ b/engines/kyra/magic_eob.cpp @@ -281,11 +281,10 @@ void EoBCoreEngine::removeAllCharacterEffects(int charIndex) { memset(c->effectsRemainder, 0, 4); for (int i = 0; i < 10; i++) { - if (c->events[i] < 0) { + if (c->events[i] < 0) removeCharacterEffect(-c->events[i], charIndex, 0); - c->timers[i] = 0; - c->events[i] = 0; - } + c->timers[i] = 0; + c->events[i] = 0; } setupCharacterTimers(); -- cgit v1.2.3