Skip to content
Snippets Groups Projects
Commit 46e8b6b9 authored by Gnacik's avatar Gnacik
Browse files

JAVA: Banking InventoryUpdate fix, thanks JiV

parent f45c933d
No related branches found
No related tags found
No related merge requests found
......@@ -16,7 +16,6 @@ package handlers.voicedcommandhandlers;
import com.l2jserver.Config;
import com.l2jserver.gameserver.handler.IVoicedCommandHandler;
import com.l2jserver.gameserver.model.L2ItemInstance;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
/**
......@@ -47,7 +46,7 @@ public class Banking implements IVoicedCommandHandler
{
if (activeChar.getInventory().getInventoryItemCount(57, 0) >= Config.BANKING_SYSTEM_ADENA)
{
if (!activeChar.getInventory().reduceAdena("Goldbar", Config.BANKING_SYSTEM_ADENA, activeChar, null))
if (!activeChar.reduceAdena("Goldbar", Config.BANKING_SYSTEM_ADENA, activeChar, false))
return false;
activeChar.getInventory().addItem("Goldbar", 3470, Config.BANKING_SYSTEM_GOLDBARS, activeChar, null);
activeChar.getInventory().updateDatabase();
......@@ -62,8 +61,7 @@ public class Banking implements IVoicedCommandHandler
{
if (activeChar.getInventory().getInventoryItemCount(3470, 0) >= Config.BANKING_SYSTEM_GOLDBARS)
{
L2ItemInstance item = activeChar.getInventory().destroyItemByItemId("Adena", 3470, Config.BANKING_SYSTEM_GOLDBARS, activeChar, null);
if (item == null)
if (!activeChar.destroyItemByItemId("Adena", 3470, Config.BANKING_SYSTEM_GOLDBARS, activeChar, false))
return false;
activeChar.getInventory().addAdena("Adena", Config.BANKING_SYSTEM_ADENA, activeChar, null);
activeChar.getInventory().updateDatabase();
......
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