Skip to content
Snippets Groups Projects
Commit 787027e2 authored by dg's avatar dg
Browse files

Jeweler correctly deducts his fee when making a ring

git-svn-id: http://svn.net-core.org/repos/t-engine4@1155 51575b47-30f0-44d4-a5cc-537603b46e54
parent 3189f546
No related branches found
No related tags found
No related merge requests found
......@@ -24,6 +24,7 @@ local imbue_ring = function(npc, player)
if price > player.money then require("engine.Dialog"):simplePopup("Not enough money", "This costs "..price.." gold, you need more gold.") return end
require("engine.Dialog"):yesnoPopup("Imbue cost", "This will cost you "..price.." gold, do you accept?", function(ret) if ret then
player.money = player.money - price
player:removeObject(player:getInven("INVEN"), gem_item)
ring.wielder = ring.wielder or {}
table.mergeAdd(ring.wielder, gem.imbue_powers, true)
......@@ -44,6 +45,7 @@ local artifact_imbue_ring = function(npc, player)
if price > player.money then require("engine.Dialog"):simplePopup("Not enough money", "Limmir needs more gold for the magical plating.") return end
require("engine.Dialog"):yesnoPopup("Imbue cost", "You need to use "..price.." gold for the plating, do you accept?", function(ret) if ret then
player.money = player.money - price
local gem3 = game.zone:makeEntity(game.level, "object", {type="gem"}, nil, true)
print("Imbue third gem", gem3.name)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment