I can drop an item, but when I pick it back up, the item is still on the floor and in my inventory. If I try to pick up another copy, however, nothing happens.
Printable View
I can drop an item, but when I pick it back up, the item is still on the floor and in my inventory. If I try to pick up another copy, however, nothing happens.
Bump, I really need help with this.
have you edited anything to do with drop or pickup recently?
Not that I can think of. Although I can't remember if it worked when I started.
Code:package server.model.players.packets;
import server.Server;
import server.model.players.Client;
import server.model.players.PacketType;
/**
* Pickup Item
**/
public class PickupItem implements PacketType {
@Override
public void processPacket(Client c, int packetType, int packetSize) {
c.pItemY = c.getInStream().readSignedWordBigEndian();
c.pItemId = c.getInStream().readUnsignedWord();
c.pItemX = c.getInStream().readSignedWordBigEndian();
Server.itemHandler.removeGroundItem(c, c.pItemId, c.pItemX,
c.pItemY, false);
c.getItems().addItem(c.pItemId, 1);
GlobalDropsHandler.pickup(c, c.pItemId, c.pItemX, c.pItemY);
if (Math.abs(c.getX() - c.pItemX) > 25
|| Math.abs(c.getY() - c.pItemY) > 25) {
c.resetWalkingQueue();
return;
}
c.getCombat().resetPlayerAttack();
}
}