Fixed freight withdraw issues.

This commit is contained in:
MobiusDev
2018-08-29 18:21:28 +00:00
parent 9d805745b5
commit 3ed319e431
22 changed files with 57 additions and 28 deletions

View File

@ -3823,7 +3823,7 @@ public final class L2PcInstance extends L2Playable
public L2ItemInstance checkItemManipulation(int objectId, long count, String action)
{
// TODO: if we remove objects that are not visisble from the L2World, we'll have to remove this check
// TODO: if we remove objects that are not visible from the L2World, we'll have to remove this check
if (L2World.getInstance().findObject(objectId) == null)
{
LOGGER.finest(getObjectId() + ": player tried to " + action + " item not available in L2World");
@ -3861,7 +3861,7 @@ public final class L2PcInstance extends L2Playable
return null;
}
// We cannot put a Weapon with Augmention in WH while casting (Possible Exploit)
// We cannot put a Weapon with Augmentation in WH while casting (Possible Exploit)
if (item.isAugmented() && isCastingNow())
{
return null;
@ -11020,7 +11020,6 @@ public final class L2PcInstance extends L2Playable
{
clanMember.setPlayerInstance(null);
}
}
catch (Exception e)
{

View File

@ -18,6 +18,7 @@ package com.l2jmobius.gameserver.network.clientpackets;
import com.l2jmobius.Config;
import com.l2jmobius.commons.network.PacketReader;
import com.l2jmobius.gameserver.model.L2World;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.holders.ItemHolder;
@ -191,6 +192,10 @@ public class RequestPackageSend implements IClientIncomingPacket
playerIU.addRemovedItem(oldItem);
}
}
// Remove item objects from the world.
L2World.getInstance().removeObject(oldItem);
L2World.getInstance().removeObject(newItem);
}
warehouse.deleteMe();