Skip to content

Commit

Permalink
fixes #103
Browse files Browse the repository at this point in the history
  • Loading branch information
projectdelphai committed Oct 23, 2014
1 parent 2bb0133 commit b97cf50
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/main/java/com/jadventure/game/entities/Entity.java
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ public HashMap equipItem(String place, Item item) {
}
}
this.equipment.put(place, item);
removeItemFromStorage(item);
//removeItemFromStorage(item);
HashMap<String, String> result = new HashMap<String, String>();
switch (item.getItemID().charAt(0)) {
case 'w': {
Expand Down Expand Up @@ -247,7 +247,7 @@ public HashMap unequipItem(Item item) {
if (!place.isEmpty()) {
this.equipment.put(place, new Item("empty"));
}
addItemToStorage(item);
//addItemToStorage(item);
HashMap<String, String> result = new HashMap<String, String>();
if (item.propertiesContainsKey("damage")) {
this.weapon = "hands";
Expand Down
12 changes: 6 additions & 6 deletions src/main/java/com/jadventure/game/entities/Player.java
Original file line number Diff line number Diff line change
Expand Up @@ -313,16 +313,16 @@ public void equipItem(String itemName) {
}

public void equipItem(String place, String itemName) {
Item item = new Item("empty");
if (!itemName.equals("empty")) {
Item item = new Item("empty");
if (!itemName.equals("empty")) {
ArrayList<Item> itemMap = searchItem(itemName, getStorage());
if (!itemMap.isEmpty()) {
item = itemMap.get(0);
}
}
HashMap change = this.equipItem(place, item);
QueueProvider.offer(item.getName() + " equipped");
printStatChange(change);
}
HashMap change = this.equipItem(place, item);
QueueProvider.offer(item.getName() + " equipped");
printStatChange(change);
}

public void dequipItem(String itemName) {
Expand Down

0 comments on commit b97cf50

Please sign in to comment.