5 protected ref array<ref SCR_ArsenalItemStandalone> m_aArsenalItems;
7 protected ref map<SCR_EArsenalItemType, ref array<SCR_ArsenalItem>> m_mArsenalItemsByType =
new map<SCR_EArsenalItemType, ref array<SCR_ArsenalItem>>();
12 bool GetArsenalItems(out array<ref SCR_ArsenalItemStandalone> arsenalItems)
14 arsenalItems = m_aArsenalItems;
15 return arsenalItems !=
null && !arsenalItems.IsEmpty();
28 for (
int i = 0, count = m_aArsenalItems.Count(); i < count; i++)
31 if (item.GetItemResourceName() == prefab)
33 itemType = item.GetItemType();
34 itemMode = item.GetItemMode();
50 array<SCR_ArsenalItem> filteredItems =
new array<SCR_ArsenalItem>();
52 array<SCR_ArsenalItem> itemsByType = m_mArsenalItemsByType.Get(typeFilter);
55 itemsByType =
new array<SCR_ArsenalItem>();
56 array<ref SCR_ArsenalItemStandalone> availableArsenalItems;
57 if (GetArsenalItems(availableArsenalItems))
59 for (
int i = 0, count = availableArsenalItems.Count(); i < count; i++)
62 if (requiresDisplayType != -1 && !availableArsenalItems[i].
GetDisplayDataOfType(requiresDisplayType))
65 if (availableArsenalItems[i].
GetItemType() & typeFilter)
67 itemsByType.Insert(availableArsenalItems[i]);
71 m_mArsenalItemsByType.Insert(typeFilter, itemsByType);
77 if (item.GetItemMode() & modeFilter)
78 filteredItems.Insert(item);
90 for (
int i = 0, count = m_aArsenalItems.Count(); i < count; i++)
93 if (item.GetItemResourceName() == prefab)
95 itemMode = item.GetItemMode();