Changed method for getting items by STF name to work with any container

Also moved it out of CreatureObject since that didn't really make sense
anymore.
This commit is contained in:
Ziggeh
2014-07-02 00:56:52 +02:00
parent 777db5d044
commit 3d0a5c2685
2 changed files with 10 additions and 9 deletions
@@ -1821,15 +1821,6 @@ public class CreatureObject extends TangibleObject implements Serializable {
getSlottedObject("inventory").viewChildren(this, true, true, (obj) -> adder.increment());
return adder.intValue();
}
public Vector<SWGObject> getItemsInInventoryByStfName(CreatureObject creature, String stfName) {
Vector<SWGObject> itemList = new Vector<SWGObject>();
SWGObject inventory = creature.getSlottedObject("inventory");
inventory.viewChildren(creature, false, false, (item) -> { if (item.getStfName() == stfName) { itemList.add(item); } });
return itemList;
}
public ObjectMessageBuilder getMessageBuilder() {
return messageBuilder;