2535 {
2537 string item_name;
2538 GameInventory inventory = GetInventory();
2540
2541 for (int att = 0; att < attcount; ++att)
2542 {
2544 if (attachment.IsItemBase())
2545 {
2546 item_name = attachment.GetType();
2547 if (
g_Game.IsKindOf(item_name, searched_item))
2548 {
2549 return attachment;
2550 }
2551 }
2552 }
2553 return NULL;
2554 }
proto native EntityAI GetAttachmentFromIndex(int index)
proto native int AttachmentCount()
Returns count of attachments attached to this item.