From 66fbbd025fdeaed563b4f70f5f8119a4e648178b Mon Sep 17 00:00:00 2001 From: Jaka Kranjc Date: Thu, 28 Oct 2010 18:36:39 +0200 Subject: [PATCH] dispel the sanctuary only when casting offensive spells --- gemrb/core/Scriptable/ActorBlock.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gemrb/core/Scriptable/ActorBlock.cpp b/gemrb/core/Scriptable/ActorBlock.cpp index 77911f79e..710a39881 100644 --- a/gemrb/core/Scriptable/ActorBlock.cpp +++ b/gemrb/core/Scriptable/ActorBlock.cpp @@ -698,7 +698,8 @@ void Scriptable::CreateProjectile(const ieResRef SpellResRef, ieDword tgt, bool } else { me->CureInvisibility(); } - if (target!=this) { //FIXME: only dispel it for hostile spells + // sanctuary ends with all hostile actions or when the caster targets someone else + if (target != this && spl->Flags & SF_HOSTILE) { me->CureSanctuary(); } } -- 2.11.4.GIT