#ifdef ENABLE_SPLIT_INVENTORY_SYSTEM
for (int i = SKILL_BOOK_INVENTORY_SLOT_START; i < SKILL_BOOK_INVENTORY_SLOT_END; ++i)
{
LPITEM item = GetSkillBookInventoryItem(i);
if (!item)
continue;
#ifdef __SORT_INVENTORY_ITEMS__
if (item->GetOriginalVnum() == dwItemVnum && FN_check_item_socket(item))
#else
if (item->GetVnum() == dwItemVnum && FN_check_item_socket(item))
#endif
{
if (IS_SET(p->dwFlags, ITEM_FLAG_MAKECOUNT))
{
if (bCount < p->alValues[1])
bCount = p->alValues[1];
}
BYTE bCount2 = MIN(200 - item->GetCount(), bCount);
bCount -= bCount2;
item->SetCount(item->GetCount() + bCount2);
if (bCount == 0)
{
if (bMsg)
ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¾ÆÀÌÅÛ È¹µæ: %s"), item->GetName());
ReloadCrystalDrop();
return item;
}
}
}
for (int i = UPGRADE_ITEMS_INVENTORY_SLOT_START; i < UPGRADE_ITEMS_INVENTORY_SLOT_END; ++i)
{
LPITEM item = GetUpgradeItemsInventoryItem(i);
if (!item)
continue;
#ifdef __SORT_INVENTORY_ITEMS__
if (item->GetOriginalVnum() == dwItemVnum && FN_check_item_socket(item))
#else
if (item->GetVnum() == dwItemVnum && FN_check_item_socket(item))
#endif
{
if (IS_SET(p->dwFlags, ITEM_FLAG_MAKECOUNT))
{
if (bCount < p->alValues[1])
bCount = p->alValues[1];
}
BYTE bCount2 = MIN(200 - item->GetCount(), bCount);
bCount -= bCount2;
item->SetCount(item->GetCount() + bCount2);
if (bCount == 0)
{
if (bMsg)
ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¾ÆÀÌÅÛ È¹µæ: %s"), item->GetName());
ReloadCrystalDrop();
return item;
}
}
}
for (int i = STONE_INVENTORY_SLOT_START; i < STONE_INVENTORY_SLOT_END; ++i)
{
LPITEM item = GetStoneInventoryItem(i);
if (!item)
continue;
#ifdef __SORT_INVENTORY_ITEMS__
if (item->GetOriginalVnum() == dwItemVnum && FN_check_item_socket(item))
#else
if (item->GetVnum() == dwItemVnum && FN_check_item_socket(item))
#endif
{
if (IS_SET(p->dwFlags, ITEM_FLAG_MAKECOUNT))
{
if (bCount < p->alValues[1])
bCount = p->alValues[1];
}
BYTE bCount2 = MIN(200 - item->GetCount(), bCount);
bCount -= bCount2;
item->SetCount(item->GetCount() + bCount2);
if (bCount == 0)
{
if (bMsg)
ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¾ÆÀÌÅÛ È¹µæ: %s"), item->GetName());
ReloadCrystalDrop();
return item;
}
}
}
#endif