|
|
@ -1430,7 +1430,6 @@ public class CharacterItemManager { |
|
|
|
public synchronized boolean buyFromNPC(Item purchasedItem, NPC npc) { |
|
|
|
public synchronized boolean buyFromNPC(Item purchasedItem, NPC npc) { |
|
|
|
|
|
|
|
|
|
|
|
CharacterItemManager itemMan; |
|
|
|
CharacterItemManager itemMan; |
|
|
|
ItemBase itemBase; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (purchasedItem == null || npc == null) |
|
|
|
if (purchasedItem == null || npc == null) |
|
|
|
return false; |
|
|
|
return false; |
|
|
@ -1440,7 +1439,6 @@ public class CharacterItemManager { |
|
|
|
if (itemMan == null) |
|
|
|
if (itemMan == null) |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
synchronized (this) { |
|
|
|
synchronized (this) { |
|
|
|
synchronized (itemMan) { |
|
|
|
synchronized (itemMan) { |
|
|
|
ItemTemplate template = purchasedItem.template; |
|
|
|
ItemTemplate template = purchasedItem.template; |
|
|
@ -1661,27 +1659,6 @@ public class CharacterItemManager { |
|
|
|
return this.account.getVault().contains(i); |
|
|
|
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) { |
|
|
|
public synchronized boolean equippedContains(Item i) { |
|
|
|
return equipped.containsValue(i); |
|
|
|
return equipped.containsValue(i); |
|
|
|
} |
|
|
|
} |
|
|
|