Skip to content
Snippets Groups Projects
Commit 0a2ef083 authored by dg's avatar dg
Browse files

Fix a bug when putting on an inscription of which type you have too many already

git-svn-id: http://svn.net-core.org/repos/t-engine4@2922 51575b47-30f0-44d4-a5cc-537603b46e54
parent 34e61e86
No related branches found
No related tags found
No related merge requests found
......@@ -28,7 +28,7 @@ local answers = {}
for i = 1, player.max_inscriptions do
local name = player.inscriptions[i]
local t = player:getTalentFromId("T_"..name)
if not replace_same or replace_same.."_"..i == name then
if (not replace_same or replace_same.."_"..i == name) then
answers[#answers+1] = {t.name, action=function(npc, player)
player:setInscription(i, iname, idata, true, true, {obj=obj}, replace_same)
player:removeObject(inven, item)
......@@ -39,7 +39,7 @@ for i = 1, player.max_inscriptions do
end
end
if player.inscriptions_slots_added < 2 and player.unused_talents_types > 0 then
if not replace_same and player.inscriptions_slots_added < 2 and player.unused_talents_types > 0 then
answers[#answers+1] = {"Buy a new slot with one #{bold}#talent category point#{normal}#.", action=function(npc, player)
player.unused_talents_types = player.unused_talents_types - 1
player.max_inscriptions = player.max_inscriptions + 1
......
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