void ItemPromptUse() { // Grab the current item selected by the user with the mouse CItem *pItem = g_Menu.GetSelectedItem(); // We want to check first to see if the item is equipment or just // a normal item. If it's not a normal item, let's equip it. if(pItem->GetItemType() != kItem) g_Player.SetEquipment(pItem, pItem->GetItemType()); // Regardless of if the item is equipment or not, we still need to // apply it's stats to the player's stats. g_Player.UseItem(pItem); }
DWORD mcmGetItemType(HANDLE hObj) { ASSERT(hObj); CItem *pItem = (CItem *)hObj; return pItem->GetItemType(); }