7 static IEntityComponentSource GetWeaponComponentSource(IEntitySource entitySource)
12 int componentsCount = entitySource.GetComponentCount();
13 for (
int i = 0; i < componentsCount; i++)
15 IEntityComponentSource componentSource = entitySource.GetComponent(i);
16 if (componentSource.GetClassName().ToType().IsInherited(WeaponComponent))
17 return componentSource;
26 static WeaponUIInfo GetWeaponComponentInfo(IEntityComponentSource componentSource)
28 BaseContainer infoSource = componentSource.GetObject(
"UIInfo");
40 static IEntityComponentSource GetInventoryItemComponentSource(IEntitySource entitySource)
45 int componentsCount = entitySource.GetComponentCount();
46 for (
int i = 0; i < componentsCount; i++)
48 IEntityComponentSource componentSource = entitySource.GetComponent(i);
50 return componentSource;
61 BaseContainer infoSource = componentSource.GetObject(
"Attributes");
66 return attributeCollection;