コード例 #1
0
ファイル: Menu.cpp プロジェクト: jiangguang5201314/ZNginx
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);
}
コード例 #2
0
ファイル: TextBox.cpp プロジェクト: mygaldre/mmsstv
DWORD mcmGetItemType(HANDLE hObj)
{
	ASSERT(hObj);
	CItem *pItem = (CItem *)hObj;
	return pItem->GetItemType();
}