From d3d50eef0108708d48ebe29f1f8bc70754f42977 Mon Sep 17 00:00:00 2001 From: dg <dg@51575b47-30f0-44d4-a5cc-537603b46e54> Date: Mon, 7 Mar 2011 12:13:33 +0000 Subject: [PATCH] fix git-svn-id: http://svn.net-core.org/repos/t-engine4@2958 51575b47-30f0-44d4-a5cc-537603b46e54 --- game/modules/tome/data/zones/shertul-fortress/objects.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/game/modules/tome/data/zones/shertul-fortress/objects.lua b/game/modules/tome/data/zones/shertul-fortress/objects.lua index 3fd6e4b229..0fe4f5e91f 100644 --- a/game/modules/tome/data/zones/shertul-fortress/objects.lua +++ b/game/modules/tome/data/zones/shertul-fortress/objects.lua @@ -39,10 +39,11 @@ When activated it will prompt to destroy items on the floor, if there are none i -- On the floor or inventory if game.level.map:getObjectTotal(who.x, who.y) > 0 then - local d = require("engine.dialogs.ShowPickupFloor").new("Transmogrify", who.x, who.y, function(o) if o:getPrice() <= 0 or o.quest then return false end return true end, function(o, idx) + local x, y = who.x, who.y + local d = require("engine.dialogs.ShowPickupFloor").new("Transmogrify", x, y, function(o) if o:getPrice() <= 0 or o.quest then return false end return true end, function(o, idx) local price = o:getPrice() * o:getNumber() * pricemod(o) price = math.min(price, 25) - game.level.map:removeObject(who.x, who.y, idx) + game.level.map:removeObject(x, y, idx) who:incMoney(price) who:hasQuest("shertul-fortress"):gain_energy(price/10) game.log("You gain %0.2f gold from the transmogrification of %s.", price, o:getName{do_count=true, do_color=true}) -- GitLab