More refactoring. Adding to bazaar now works for selling and seeking by gil.

This commit is contained in:
Filip Maj 2017-11-11 17:05:07 -05:00
parent bbac4b0fce
commit e8c9904e1d
9 changed files with 109 additions and 75 deletions

View file

@ -27,7 +27,7 @@ function onTrigger(player, argc, qty, name, lastName)
qty = tonumber(qty) or 1;
location = INVENTORY_CURRENCY;
local added = player:GetInventory(location):AddItem(currency, qty, 1);
local added = player:GetItemPackage(location):AddItem(currency, qty, 1);
local messageID = MESSAGE_TYPE_SYSTEM_ERROR;
local message = "unable to add gil";

View file

@ -40,7 +40,7 @@ function onTrigger(player, argc, item, qty, location, name, lastName)
location = INVENTORY_NORMAL;
end;
local added = player:getInventory(location):addItem(item, qty, 1);
local added = player:getItemPackage(location):addItem(item, qty, 1);
if added then
message = string.format("Added item %u of kind %u to %s", item, location, player:GetName());