Browse Source

optimize

lakebane-master
FatBoy-DOTC 8 months ago
parent
commit
3378272a19
  1. 4
      src/engine/net/client/ClientMessagePump.java
  2. 2
      src/engine/objects/Item.java
  3. 2
      src/engine/objects/ItemBase.java

4
src/engine/net/client/ClientMessagePump.java

@ -567,9 +567,9 @@ public class ClientMessagePump implements NetMsgHandler {
if (!itemManager.inventoryContains(i)) if (!itemManager.inventoryContains(i))
return; return;
if (i.isCanDestroy()) { if (i.canDestroy) {
if (itemManager.delete(i) == true) { if (itemManager.delete(i) == true) {
int value = i.getItemBase().getBaseValue(); int value = i.getItemBase().value;
if(i.getItemBase().isRune()) if(i.getItemBase().isRune())
value = 500000; value = 500000;
sourcePlayer.getCharItemManager().addGoldToInventory(value,false); sourcePlayer.getCharItemManager().addGoldToInventory(value,false);

2
src/engine/objects/Item.java

@ -51,7 +51,7 @@ public class Item extends AbstractWorldObject {
private short durabilityCurrent; private short durabilityCurrent;
private byte chargesRemaining; private byte chargesRemaining;
private byte equipSlot; private byte equipSlot;
private boolean canDestroy; public boolean canDestroy;
private boolean rentable; private boolean rentable;
private boolean isRandom = false; private boolean isRandom = false;
private int value; private int value;

2
src/engine/objects/ItemBase.java

@ -39,7 +39,7 @@ public class ItemBase{
private int uuid; private int uuid;
private String name; private String name;
private float durability; private float durability;
private int value; public int value;
private short weight; private short weight;
private short color; private short color;
private ItemType type; private ItemType type;

Loading…
Cancel
Save