// v2.0.0 -
//::////////////////////////////////////////////////////////////////////////////
//:: FileName:  hark_d_inv_tell
//::////////////////////////////////////////////////////////////////////////////
/*
   Will go through everything in the henchman's inventory and speakstring
  what he has.
*/
//::////////////////////////////////////////////////////////////////////////////
#include "hark_i0_equip"
//::////////////////////////////////////////////////////////////////////////////
void main()
{
  // Go through the equipped items.
  int i, nItem = 0;
  object oItem;
  for (i = 0; i < NUM_INVENTORY_SLOTS; ++i)
    {
     oItem = GetItemInSlot(i);
     if (GetIsObjectValid(oItem))
       {
        switch (GetBaseItemType(oItem))
          {
           case BASE_ITEM_CREATUREITEM:
           case BASE_ITEM_CBLUDGWEAPON:
           case BASE_ITEM_CSLASHWEAPON:
           case BASE_ITEM_CSLSHPRCWEAP:
           case BASE_ITEM_CPIERCWEAPON: break;
           default:
             if (GetBaseItemType(oItem) != BASE_ITEM_CREATUREITEM)
               {
                if (TalentIdentifyItem(oItem))
                  { SpeakString(GetName(oItem) + ID_ITEM5 + IntToString(GetNumStackedItems(oItem))); }
                else
                  { SpeakString(ID_ITEM6 + IntToString(GetNumStackedItems(oItem))); }
                nItem++;
                break;
               }
          }
       }
    }

  // Go through the inventory.
  oItem = GetFirstItemInInventory();
  while (GetIsObjectValid(oItem))
    {
     if (TalentIdentifyItem(oItem))
       { SpeakString(GetName(oItem) + ID_ITEM7 + IntToString(GetNumStackedItems(oItem))); }
     else
       { SpeakString(ID_ITEM8 + IntToString(GetNumStackedItems(oItem))); }
     nItem++;
     oItem = GetNextItemInInventory();
    }

  // Didn't find anything, give feedback.
  if (nItem == 0) { SpeakString(ID_ITEM9); }
}
//::////////////////////////////////////////////////////////////////////////////
