Browse Source

More itembase refactor

combat-2
MagicBot 8 months ago
parent
commit
5d367a737c
  1. 23
      src/engine/objects/CharacterItemManager.java

23
src/engine/objects/CharacterItemManager.java

@ -1430,7 +1430,6 @@ public class CharacterItemManager { @@ -1430,7 +1430,6 @@ public class CharacterItemManager {
public synchronized boolean buyFromNPC(Item purchasedItem, NPC npc) {
CharacterItemManager itemMan;
ItemBase itemBase;
if (purchasedItem == null || npc == null)
return false;
@ -1440,7 +1439,6 @@ public class CharacterItemManager { @@ -1440,7 +1439,6 @@ public class CharacterItemManager {
if (itemMan == null)
return false;
synchronized (this) {
synchronized (itemMan) {
ItemTemplate template = purchasedItem.template;
@ -1661,27 +1659,6 @@ public class CharacterItemManager { @@ -1661,27 +1659,6 @@ public class CharacterItemManager {
return this.account.getVault().contains(i);
}
public synchronized boolean vaultContainsType(ItemBase ib) {
if (ib.getUUID() == 7)
return (this.getGoldVault() != null);
for (Item i : vault) {
if (i.getItemBase().getUUID() == ib.getUUID())
return true;
}
return false;
}
//for calling from devCmd fill vault. Already synchronized
public boolean vaultContainsTypeA(ItemBase ib) {
if (ib.getUUID() == 7)
return (this.getGoldVault() != null);
for (Item i : vault) {
if (i.getItemBase().getUUID() == ib.getUUID())
return true;
}
return false;
}
public synchronized boolean equippedContains(Item i) {
return equipped.containsValue(i);
}

Loading…
Cancel
Save