mirror of
https://github.com/otland/forgottenserver
synced 2026-08-15 16:32:07 -04:00
21 lines
547 B
Lua
21 lines
547 B
Lua
function Combat:getPositions(creature, variant)
|
|
local positions = {}
|
|
function onTargetTile(creature, position)
|
|
positions[#positions + 1] = position
|
|
end
|
|
|
|
self:setCallback(CALLBACK_PARAM_TARGETTILE, "onTargetTile")
|
|
self:execute(creature, variant)
|
|
return positions
|
|
end
|
|
|
|
function Combat:getTargets(creature, variant)
|
|
local targets = {}
|
|
function onTargetCreature(creature, target)
|
|
targets[#targets + 1] = target
|
|
end
|
|
|
|
self:setCallback(CALLBACK_PARAM_TARGETCREATURE, "onTargetCreature")
|
|
self:execute(creature, variant)
|
|
return targets
|
|
end
|