From 92c3052b49e18750d800ffe66675a6145a4f3162 Mon Sep 17 00:00:00 2001
From: DarkGod <darkgod@net-core.org>
Date: Tue, 21 Jul 2020 18:13:26 +0200
Subject: [PATCH] Corpselight correctly checks for caster's position

---
 game/modules/tome/data/timed_effects/magical.lua | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/game/modules/tome/data/timed_effects/magical.lua b/game/modules/tome/data/timed_effects/magical.lua
index db94c7e050..12bd14474b 100644
--- a/game/modules/tome/data/timed_effects/magical.lua
+++ b/game/modules/tome/data/timed_effects/magical.lua
@@ -4979,6 +4979,9 @@ newEffect{
 	callbackOnTalentPost = function(self, eff, ab)
 		if not ab.is_spell or ab.id == self.T_CORPSELIGHT then return end
 		if eff.stacks >= eff.max_stacks then return end
+		local found_self = false
+		self:projectApply({type="ball", radius=eff.effective_radius, x=eff.x, y=eff.y}, eff.x, eff.y, Map.ACTOR, function(tgt) if tgt == self then found_self = true end end)
+		if not found_self then return end
 		local oldradius = math.min(eff.radius + eff.stacks, 10)
 		eff.stacks = eff.stacks + 1
 
-- 
GitLab