From 748e2cfe93bf03005233536c8c075340ebf7b895 Mon Sep 17 00:00:00 2001 From: Jaka Kranjc Date: Sun, 12 Jan 2014 14:21:04 +0100 Subject: [PATCH] Actor::CheckCastingInterrupt: noop when not casting avoids extreneus spam --- gemrb/core/Scriptable/Actor.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gemrb/core/Scriptable/Actor.cpp b/gemrb/core/Scriptable/Actor.cpp index d2dd541c24..de5f5d77a4 100644 --- a/gemrb/core/Scriptable/Actor.cpp +++ b/gemrb/core/Scriptable/Actor.cpp @@ -3750,6 +3750,11 @@ bool Actor::CheckCastingInterrupt(int damage, int spellLevel) if (!third) { return true; } + // FIXME: change to SpellTarget once the split is done + if (!LastTarget && LastTargetPos.isempty()) { + // not casting, nothing to do + return false; + } int roll = core->Roll(1, 20, 0); int concentration = Modified[IE_CONCENTRATION]; int bonus = 4; // combat casting bonus for when injured