actually show trades that are associated with dialogs and options

This commit is contained in:
Sokomine 2021-05-30 17:09:03 +02:00
parent 9c513d5fd1
commit 75bfa4e555

View File

@ -3199,10 +3199,10 @@ yl_speak_up.input_talk = function(player, formname, fields)
end -- end of loop over d_option.o_results
-- if there is a trade associated with this dialog and option, show that trade now
local trade_id = tostring(d_id).." "..tostring(o_id)
local trade_id = tostring(d_id).." "..tostring(o)
if(dialog.trades and dialog.trades[ trade_id ]) then
-- remember which option was selected
yl_speak_up.speak_to[pname].o_id = o_id
yl_speak_up.speak_to[pname].o_id = o
-- which dialog shall be shown in case of a successful trade?
yl_speak_up.speak_to[pname].target_d_id = target_dialog
-- show the trade dialog