mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-10-07 22:13:08 -04:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user