From 029e73d19a78a4881c9271cd581365d14beabafe Mon Sep 17 00:00:00 2001 From: DarkGod <darkgod@net-core.org> Date: Mon, 6 Oct 2014 01:12:18 +0200 Subject: [PATCH] GameState:findEventGridRadius also returns the center of the grids --- game/modules/tome/class/GameState.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/game/modules/tome/class/GameState.lua b/game/modules/tome/class/GameState.lua index a284800df7..d57fed6968 100644 --- a/game/modules/tome/class/GameState.lua +++ b/game/modules/tome/class/GameState.lua @@ -2250,7 +2250,7 @@ end function _M:canEventGridRadius(level, x, y, radius, min) local list = {} for i = -radius, radius do for j = -radius, radius do - if game.state:canEventGrid(level, x+i, y+j) then list[#list+1] = {x=x+i, y=y+j} end + if game.state:canEventGrid(level, x+i, y+j) then list[#list+1] = {x=x+i, y=y+j, bx=x, by=y} end end end if #list < min then return false -- GitLab