search

void CHARACTER::SetShopSafebox(offlineshop::CShopSafebox* pk)

add

bool CHARACTER::CanTakeInventoryItem(LPITEM item, TItemPos* cell)
{
    int iEmpty = -1;
    if (item->IsDragonSoul())
    {
        cell->window_type = DRAGON_SOUL_INVENTORY;
        cell->cell = iEmpty = GetEmptyDragonSoulInventory(item);
    }
#ifdef ENABLE_SPECIAL_INVENTORY
    else if (item->IsBook())
    {
        cell->window_type = BOOK_INVENTORY;
        cell->cell = iEmpty = GetEmptyBookInventory(item->GetSize());
    }
    else if (item->IsUpgradeItem())
    {
        cell->window_type = UPGRADE_INVENTORY;
        cell->cell = iEmpty = GetEmptyUpgradeInventory(item->GetSize());
    }
    else if (item->IsStone())
    {
        cell->window_type = STONE_INVENTORY;
        cell->cell = iEmpty = GetEmptyStoneInventory(item->GetSize());
    }
    else if (item->IsAttr())
    {
        cell->window_type = ATTR_INVENTORY;
        cell->cell = iEmpty = GetEmptyAttrInventory(item->GetSize());
    }
    else if (item->IsFlower())
    {
        cell->window_type = FLOWER_INVENTORY;
        cell->cell = iEmpty = GetEmptyFlowerInventory(item->GetSize());
    }
    else if (item->IsBlendS())
    {
        cell->window_type = BLEND_INVENTORY;
        cell->cell = iEmpty = GetEmptyBlendInventory(item->GetSize());
    }
#endif
    else
    {
        cell->window_type = INVENTORY;
        cell->cell = iEmpty = GetEmptyInventory(item->GetSize());
    }

    return iEmpty != -1;
}