Item Count in Item Tooltip

06/10/2018 20:46 direktbottle#1
So I'm trying to display the amount of items that are in one item stack in your inventory, and display that text in the item description. So if you have a stack of 99 items and mouseover it, it should say "Count: 99". This is as far as I got and it's not displaying the number correctly. Someone can help?

Code:
if (pItemElem->GetProp()->dwPackMax > 1)
	{
	short nItemNum = pItemElem->m_nItemNum;

	strTemp.Format("\nCount: %d", prj.GetItemProp(pItemElem->m_nItemNum));
	pEdit->AddString(strTemp, dwItemColor[g_Option.m_nToolTipText].dwCommand);
	}
06/10/2018 20:49 Kiseku#2
strTemp.Format("\nCount: %d", nItemNum);