int CHARACTER::BKBul(long skillindex) const
{
int cell = 999;
LPITEM item = NULL;
#ifdef ENABLE_SPECIAL_STORAGE
for (int i = 0; i < SPECIAL_INVENTORY_MAX_NUM; ++i)
{
item = GetItem(TItemPos(BOOK_INVENTORY, i));
if (NULL != item && item->GetSocket(0) == skillindex && item->GetVnum() == 50300)
{
if (m_pkMyShop && m_pkMyShop->IsSellingItem(item->GetID()))
continue;
else
cell = item->GetCell();
}
}
#else
for (int i = 0; i < INVENTORY_MAX_NUM; ++i)
{
item = GetInventoryItem(i);
if (NULL != item && item->GetSocket(0) == skillindex && item->GetVnum() == 50300)
{
if (m_pkMyShop && m_pkMyShop->IsSellingItem(item->GetID()))
continue;
else
cell = item->GetCell();
}
}
#endif
return cell;
}