2354 {
2356 string item_name;
2357 GameInventory inventory = GetInventory();
2359
2360 for (int att = 0; att < attcount; ++att)
2361 {
2363 if (attachment.IsItemBase())
2364 {
2365 item_name = attachment.GetType();
2366 if (
g_Game.IsKindOf(item_name, searched_item))
2367 {
2368 return attachment;
2369 }
2370 }
2371 }
2372 return NULL;
2373 }
proto native EntityAI GetAttachmentFromIndex(int index)
proto native int AttachmentCount()
Returns count of attachments attached to this item.