mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-07-28 23:15:53 -04:00
Fixed issue with getting items from containers
The method should now work with any container that, even ones that aren't related to PlayerObject and CreatureObject.
This commit is contained in:
@@ -730,11 +730,10 @@ public class ObjectService implements INetworkDispatch {
|
||||
|
||||
return objectId;
|
||||
}
|
||||
|
||||
|
||||
public Vector<SWGObject> getItemsInContainerByStfName(CreatureObject creature, String containerName, String stfName) {
|
||||
public Vector<SWGObject> getItemsInContainerByStfName(CreatureObject creature, long containerId, String stfName) {
|
||||
Vector<SWGObject> itemList = new Vector<SWGObject>();
|
||||
SWGObject container = creature.getSlottedObject(containerName);
|
||||
SWGObject container = getObject(containerId);
|
||||
|
||||
container.viewChildren(creature, false, false, (item) -> { if (item.getStfName() == stfName) { itemList.add(item); } });
|
||||
|
||||
|
||||
Reference in New Issue
Block a user