diff --git a/data/scripts/commands/gm/delcurrency.lua b/data/scripts/commands/gm/delcurrency.lua index 28318d71..dab322be 100644 --- a/data/scripts/commands/gm/delcurrency.lua +++ b/data/scripts/commands/gm/delcurrency.lua @@ -26,7 +26,7 @@ function onTrigger(player, argc, currency, qty, name, lastName) currency = tonumber(currency) or nil; qty = tonumber(qty) or 1; - local removed = player:GetInventory(INVENTORY_CURRENCY):RemoveItem(currency, qty); + local removed = player:GetItemPackage(INVENTORY_CURRENCY):RemoveItem(currency, qty); local messageID = MESSAGE_TYPE_SYSTEM_ERROR; local message = "Attempting to remove currency" -- "unable to remove currency"; diff --git a/data/scripts/commands/gm/delitem.lua b/data/scripts/commands/gm/delitem.lua index bdfcd761..23dc3b19 100644 --- a/data/scripts/commands/gm/delitem.lua +++ b/data/scripts/commands/gm/delitem.lua @@ -39,7 +39,7 @@ function onTrigger(player, argc, item, qty, location, name, lastName) location = INVENTORY_NORMAL; end; - local removed = player:GetInventory(location):RemoveItem(item, qty); + local removed = player:GetItemPackage(location):RemoveItem(item, qty); if removed then -- RemoveItem() currently returns nothing for verification, this statement can't work message = string.format("Removed item %u of kind %u to %s", item, location, player:GetName()); diff --git a/data/scripts/commands/gm/delkeyitem.lua b/data/scripts/commands/gm/delkeyitem.lua index be763961..90b76585 100644 --- a/data/scripts/commands/gm/delkeyitem.lua +++ b/data/scripts/commands/gm/delkeyitem.lua @@ -27,7 +27,7 @@ function onTrigger(player, argc, keyitem, qty, name, lastName) qty = tonumber(qty) or 1; local location = INVENTORY_KEYITEMS; - local removed = player:GetInventory(location):RemoveItem(keyitem, qty); + local removed = player:GetItemPackage(location):RemoveItem(keyitem, qty); local messageID = MESSAGE_TYPE_SYSTEM_ERROR; local message = "Attempting to remove keyitem" -- "unable to remove keyitem"; diff --git a/data/scripts/commands/gm/givekeyitem.lua b/data/scripts/commands/gm/givekeyitem.lua index 9963005e..2e23f6ec 100644 --- a/data/scripts/commands/gm/givekeyitem.lua +++ b/data/scripts/commands/gm/givekeyitem.lua @@ -27,7 +27,7 @@ function onTrigger(player, argc, keyitem, name, lastName) qty = 1; location = INVENTORY_KEYITEMS; - local added = player:GetInventory(location):AddItem(keyitem, qty, 1); + local added = player:GetItemPackage(location):AddItem(keyitem, qty, 1); local messageID = MESSAGE_TYPE_SYSTEM_ERROR; local message = "unable to add keyitem"; diff --git a/data/scripts/gcseals.lua b/data/scripts/gcseals.lua index da6e1e40..2017956d 100644 --- a/data/scripts/gcseals.lua +++ b/data/scripts/gcseals.lua @@ -35,7 +35,7 @@ function GetGCSeals(player, company) company = tonumber(company); if company ~= nil and company > 0 and company < 4 then - return player:GetInventory(INVENTORY_CURRENCY):GetItemQuantity(companySeal[tonumber(company)]); + return player:GetItemPackage(INVENTORY_CURRENCY):GetItemQuantity(companySeal[tonumber(company)]); else return -1; end @@ -52,7 +52,7 @@ function AddGCSeals(player, company, amount) if currentAmount ~= -1 then if amount then if currentAmount + amount <= maxAmount then - invCheck = player:GetInventory(INVENTORY_CURRENCY):AddItem(companySeal[company], amount, 1); + invCheck = player:GetItemPackage(INVENTORY_CURRENCY):AddItem(companySeal[company], amount, 1); if invCheck == INV_ERROR_SUCCESS then return INV_ERROR_SUCCESS; end diff --git a/data/scripts/unique/fst0Town01a/PopulaceStandard/serpent_lieutenant_marette.lua b/data/scripts/unique/fst0Town01a/PopulaceStandard/serpent_lieutenant_marette.lua index 8cc5d507..44b89d81 100644 --- a/data/scripts/unique/fst0Town01a/PopulaceStandard/serpent_lieutenant_marette.lua +++ b/data/scripts/unique/fst0Town01a/PopulaceStandard/serpent_lieutenant_marette.lua @@ -4,9 +4,9 @@ function onEventStarted(player, npc) Spl = GetStaticActor("Spl000"); magickedPrism = 3020615; - if not player:GetInventory(INVENTORY_NORMAL):HasItem(magickedPrism) then + if not player:GetItemPackage(INVENTORY_NORMAL):HasItem(magickedPrism) then callClientFunction(player, "delegateEvent", player, Spl, "processEventELNAURE", 2); - local invCheck = player:GetInventory(INVENTORY_NORMAL):AddItem(magickedPrism, 10, 1); + local invCheck = player:GetItemPackage(INVENTORY_NORMAL):AddItem(magickedPrism, 10, 1); if invCheck == INV_ERROR_SUCCESS then player:SendGameMessage(player, GetWorldMaster(), 25246, MESSAGE_TYPE_SYSTEM, magickedPrism, 10); end