fix not giving christmas trees

https://bugs.eressea.de/view.php?id=2171
This commit is contained in:
Enno Rehling 2015-12-05 17:33:41 +01:00
parent e91310f576
commit 02c249d61e
1 changed files with 4 additions and 2 deletions

View File

@ -29,8 +29,10 @@ function self.init()
local tbl = gifts[config.rules]
if tbl then
for _, gift in ipairs(tbl) do
if turn == gift.turn then
give_gifts(gift)
if gift.turn then
if gift.turn==turn then
give_gifts(gift)
end
elseif gift.key and not get_key(gift.key) then
give_gifts(gift)
set_key(gift.key)