Yardım k envanter GetItemIndex nasıl oluyor?

Konu sahibi bu konuda soru soruyor. Sorusu ile ilgili bilgisi olanların yanıtlamasını bekliyor.
Durum
İçerik kilitlendiği için mesaj gönderimine kapatıldı.

deadlymans

Üye
Üye
Mesaj
28
Çözümler
1
Beğeni
10
Puan
658
Ticaret Puanı
0
Merhaba k envanterda bulunan itemlerin id lerine erişmek istiyorum
GetItemIndex komutu ile kendi itemlerime erişebilyorum bnunla k envanterdaki itemlere nasıl erişebilirim.
ayrıca k envanter için player.INVENTORY_PAGE_SIZE karşılığı nedir.
gerekirse source paylaşabilirim teşekkürler.
 
Hocam bunu nasıl anlatalım ki bilemedim. :) Baya bi detayları var. Sadece önereceğim şudur. Sorunsuz bir şekilde çalıştığı kanıtlanan sistemleri ekleyin.
 
Bu arada sistemde bir sorun yok sadece k envanterındaki slotlarda okuma işlemi yapmak istiyorum.
 
En son bir moderatör tarafından düzenlenmiş:
K envanteri kendiniz mi eklediniz? Kendiniz eklediyseniz sistemin paylaşıldığı yeri verebilir misiniz?
Yoksa hazır olarak ekli miydi? Eğer hazır olarak ekli ise char_item.cpp içinde ki kodları paylaşır mısınız?
Sistemden sisteme değişkenlik gösterdiği için kodları görmem gerekiyor. Benim kendi yazdığım k envanterde direk o fonksiyon ile itemler alınıyor ama forumlarda paylaşılan bazı k envanter sistemlerinde ayrı fonksiyon tanımlanmış.

player.INVENTORY_PAGE_SIZE envanter boyutu oluyor. 45 değerini hafızada tutar.
 
K envanteri kendiniz mi eklediniz? Kendiniz eklediyseniz sistemin paylaşıldığı yeri verebilir misiniz?
Yoksa hazır olarak ekli miydi? Eğer hazır olarak ekli ise char_item.cpp içinde ki kodları paylaşır mısınız?
Sistemden sisteme değişkenlik gösterdiği için kodları görmem gerekiyor. Benim kendi yazdığım k envanterde direk o fonksiyon ile itemler alınıyor ama forumlarda paylaşılan bazı k envanter sistemlerinde ayrı fonksiyon tanımlanmış.

player.INVENTORY_PAGE_SIZE envanter boyutu oluyor. 45 değerini hafızada tutar.
Dosyayı ekte verdim. İlgilendiğiniz için çok teşekkür ederim öğrenme sürecindeyim.
 

Dosya Eklentileri

  • k envanter.7z
    1,3 MB · Gösterim: 69
char_item.cpp kodları aşağıdaki gibidir. istem başkası tarafından hazırlanmıştır.
C++:
// Arat
LPITEM CHARACTER::GetInventoryItem(WORD wCell) const
{
    return GetItem(TItemPos(INVENTORY, wCell));
}

// Ekle
#ifdef ENABLE_SPLIT_INVENTORY_SYSTEM
LPITEM CHARACTER::GetSkillBookInventoryItem(WORD wCell) const
{
    return GetItem(TItemPos(INVENTORY, wCell));
}
LPITEM CHARACTER::GetUpgradeItemsInventoryItem(WORD wCell) const
{
    return GetItem(TItemPos(INVENTORY, wCell));
}
LPITEM CHARACTER::GetStoneInventoryItem(WORD wCell) const
{
    return GetItem(TItemPos(INVENTORY, wCell));
}
LPITEM CHARACTER::GetBoxInventoryItem(WORD wCell) const
{
    return GetItem(TItemPos(INVENTORY, wCell));
}
LPITEM CHARACTER::GetEfsunInventoryItem(WORD wCell) const
{
    return GetItem(TItemPos(INVENTORY, wCell));
}
LPITEM CHARACTER::GetCicekInventoryItem(WORD wCell) const
{
    return GetItem(TItemPos(INVENTORY, wCell));
}
#endif

// Arat
            if ((wCell < INVENTORY_MAX_NUM) || (BELT_INVENTORY_SLOT_START <= wCell && BELT_INVENTORY_SLOT_END > wCell))
                pItem->SetWindow(INVENTORY);

// Deðiþtir - https://prnt.sc/qaqhow
#ifdef ENABLE_SPLIT_INVENTORY_SYSTEM
            if ((wCell < INVENTORY_MAX_NUM) || (BELT_INVENTORY_SLOT_START <= wCell && BELT_INVENTORY_SLOT_END > wCell) || (SKILL_BOOK_INVENTORY_SLOT_START <= wCell && SKILL_BOOK_INVENTORY_SLOT_END > wCell) || (UPGRADE_ITEMS_INVENTORY_SLOT_START <= wCell && UPGRADE_ITEMS_INVENTORY_SLOT_END > wCell) || (STONE_INVENTORY_SLOT_START <= wCell && STONE_INVENTORY_SLOT_END > wCell) || (BOX_INVENTORY_SLOT_START <= wCell && BOX_INVENTORY_SLOT_END > wCell) || (EFSUN_INVENTORY_SLOT_START <= wCell && EFSUN_INVENTORY_SLOT_END > wCell) || (CICEK_INVENTORY_SLOT_START <= wCell && CICEK_INVENTORY_SLOT_END > wCell))
                pItem->SetWindow(INVENTORY);
#else
            if ((wCell < INVENTORY_MAX_NUM) || (BELT_INVENTORY_SLOT_START <= wCell && BELT_INVENTORY_SLOT_END > wCell))
                pItem->SetWindow(INVENTORY);
#endif

// Arat
void CHARACTER::ClearItem()
{
    int        i;
    LPITEM    item;

    for (i = 0; i < INVENTORY_AND_EQUIP_SLOT_MAX; ++i)
    {
        if ((item = GetInventoryItem(i)))
        {
            item->SetSkipSave(true);
            ITEM_MANAGER::instance().FlushDelayedSave(item);

            item->RemoveFromCharacter();
            M2_DESTROY_ITEM(item);

            SyncQuickslot(QUICKSLOT_TYPE_ITEM, i, 255);
        }
    }
    for (i = 0; i < DRAGON_SOUL_INVENTORY_MAX_NUM; ++i)
    {
        if ((item = GetItem(TItemPos(DRAGON_SOUL_INVENTORY, i))))
        {
            item->SetSkipSave(true);
            ITEM_MANAGER::instance().FlushDelayedSave(item);

            item->RemoveFromCharacter();
            M2_DESTROY_ITEM(item);
        }
    }

// Ekle
#ifdef ENABLE_SPLIT_INVENTORY_SYSTEM
    for (i = 0; i < SKILL_BOOK_INVENTORY_MAX_NUM; ++i)
    {
        if ((item = GetItem(TItemPos(SKILL_BOOK_INVENTORY, i))))
        {
            item->SetSkipSave(true);
            ITEM_MANAGER::instance().FlushDelayedSave(item);

            item->RemoveFromCharacter();
            M2_DESTROY_ITEM(item);
        }
    }
   
    for (i = 0; i < UPGRADE_ITEMS_INVENTORY_MAX_NUM; ++i)
    {
        if ((item = GetItem(TItemPos(UPGRADE_ITEMS_INVENTORY, i))))
        {
            item->SetSkipSave(true);
            ITEM_MANAGER::instance().FlushDelayedSave(item);

            item->RemoveFromCharacter();
            M2_DESTROY_ITEM(item);
        }
    }
   
    for (i = 0; i < STONE_INVENTORY_MAX_NUM; ++i)
    {
        if ((item = GetItem(TItemPos(STONE_INVENTORY, i))))
        {
            item->SetSkipSave(true);
            ITEM_MANAGER::instance().FlushDelayedSave(item);

            item->RemoveFromCharacter();
            M2_DESTROY_ITEM(item);
        }
    }
   
    for (i = 0; i < BOX_INVENTORY_MAX_NUM; ++i)
    {
        if ((item = GetItem(TItemPos(BOX_INVENTORY, i))))
        {
            item->SetSkipSave(true);
            ITEM_MANAGER::instance().FlushDelayedSave(item);

            item->RemoveFromCharacter();
            M2_DESTROY_ITEM(item);
        }
    }
   
    for (i = 0; i < EFSUN_INVENTORY_MAX_NUM; ++i)
    {
        if ((item = GetItem(TItemPos(EFSUN_INVENTORY, i))))
        {
            item->SetSkipSave(true);
            ITEM_MANAGER::instance().FlushDelayedSave(item);

            item->RemoveFromCharacter();
            M2_DESTROY_ITEM(item);
        }
    }
   
    for (i = 0; i < CICEK_INVENTORY_MAX_NUM; ++i)
    {
        if ((item = GetItem(TItemPos(CICEK_INVENTORY, i))))
        {
            item->SetSkipSave(true);
            ITEM_MANAGER::instance().FlushDelayedSave(item);

            item->RemoveFromCharacter();
            M2_DESTROY_ITEM(item);
        }
    }
#endif

// Arat
            if (Cell.IsBeltInventoryPosition())
            {
                LPITEM beltItem = GetWear(WEAR_BELT);

                if (NULL == beltItem)
                    return false;

                if (false == CBeltInventoryHelper::IsAvailableCell(bCell - BELT_INVENTORY_SLOT_START, beltItem->GetValue(0)))
                    return false;

                if (m_pointsInstant.bItemGrid[bCell])
                {
                    if (m_pointsInstant.bItemGrid[bCell] == iExceptionCell)
                        return true;

                    return false;
                }

                if (bSize == 1)
                    return true;

            }

// Ekle
#ifdef ENABLE_SPLIT_INVENTORY_SYSTEM
            else if (Cell.IsSkillBookInventoryPosition())
            {
                if (bCell < SKILL_BOOK_INVENTORY_SLOT_START)
                    return false;
               
                if (bCell > SKILL_BOOK_INVENTORY_SLOT_END)
                    return false;
               
                if (m_pointsInstant.bItemGrid[bCell] == (UINT)iExceptionCell)
                {
                    if (bSize == 1)
                        return true;

                    int j = 1;
                    UINT bPage = bCell / (SKILL_BOOK_INVENTORY_MAX_NUM / 3);

                    do
                    {
                        UINT p = bCell + (5 * j);

                        if (p >= SKILL_BOOK_INVENTORY_MAX_NUM)
                            return false;

                        if (p / (SKILL_BOOK_INVENTORY_MAX_NUM / 3) != bPage)
                            return false;

                        if (m_pointsInstant.bItemGrid[p])
                            if (m_pointsInstant.bItemGrid[p] != iExceptionCell)
                                return false;
                    }
                    while (++j < bSize);

                    return true;
                }
            }
            else if (Cell.IsUpgradeItemsInventoryPosition())
            {
                if (bCell < UPGRADE_ITEMS_INVENTORY_SLOT_START)
                    return false;
               
                if (bCell > UPGRADE_ITEMS_INVENTORY_SLOT_END)
                    return false;
               
                if (m_pointsInstant.bItemGrid[bCell] == (UINT)iExceptionCell)
                {
                    if (bSize == 1)
                        return true;

                    int j = 1;
                    UINT bPage = bCell / (UPGRADE_ITEMS_INVENTORY_MAX_NUM / 3);

                    do
                    {
                        UINT p = bCell + (5 * j);

                        if (p >= UPGRADE_ITEMS_INVENTORY_MAX_NUM)
                            return false;

                        if (p / (UPGRADE_ITEMS_INVENTORY_MAX_NUM / 3) != bPage)
                            return false;

                        if (m_pointsInstant.bItemGrid[p])
                            if (m_pointsInstant.bItemGrid[p] != iExceptionCell)
                                return false;
                    }
                    while (++j < bSize);

                    return true;
                }
            }
            else if (Cell.IsStoneInventoryPosition())
            {
                if (bCell < STONE_INVENTORY_SLOT_START)
                    return false;
               
                if (bCell > STONE_INVENTORY_SLOT_END)
                    return false;
               
                if (m_pointsInstant.bItemGrid[bCell] == (UINT)iExceptionCell)
                {
                    if (bSize == 1)
                        return true;

                    int j = 1;
                    UINT bPage = bCell / (STONE_INVENTORY_MAX_NUM / 3);

                    do
                    {
                        UINT p = bCell + (5 * j);

                        if (p >= STONE_INVENTORY_MAX_NUM)
                            return false;

                        if (p / (STONE_INVENTORY_MAX_NUM / 3) != bPage)
                            return false;

                        if (m_pointsInstant.bItemGrid[p])
                            if (m_pointsInstant.bItemGrid[p] != iExceptionCell)
                                return false;
                    }
                    while (++j < bSize);

                    return true;
                }
            }
            else if (Cell.IsBoxInventoryPosition())
            {
                if (bCell < BOX_INVENTORY_SLOT_START)
                    return false;
               
                if (bCell > BOX_INVENTORY_SLOT_END)
                    return false;
               
                if (m_pointsInstant.bItemGrid[bCell] == (UINT)iExceptionCell)
                {
                    if (bSize == 1)
                        return true;

                    int j = 1;
                    UINT bPage = bCell / (BOX_INVENTORY_MAX_NUM / 3);

                    do
                    {
                        UINT p = bCell + (5 * j);

                        if (p >= BOX_INVENTORY_MAX_NUM)
                            return false;

                        if (p / (BOX_INVENTORY_MAX_NUM / 3) != bPage)
                            return false;

                        if (m_pointsInstant.bItemGrid[p])
                            if (m_pointsInstant.bItemGrid[p] != iExceptionCell)
                                return false;
                    }
                    while (++j < bSize);

                    return true;
                }
            }
            else if (Cell.IsEfsunInventoryPosition())
            {
                if (bCell < EFSUN_INVENTORY_SLOT_START)
                    return false;
               
                if (bCell > EFSUN_INVENTORY_SLOT_END)
                    return false;
               
                if (m_pointsInstant.bItemGrid[bCell] == (UINT)iExceptionCell)
                {
                    if (bSize == 1)
                        return true;

                    int j = 1;
                    UINT bPage = bCell / (EFSUN_INVENTORY_MAX_NUM / 3);

                    do
                    {
                        UINT p = bCell + (5 * j);

                        if (p >= EFSUN_INVENTORY_MAX_NUM)
                            return false;

                        if (p / (EFSUN_INVENTORY_MAX_NUM / 3) != bPage)
                            return false;

                        if (m_pointsInstant.bItemGrid[p])
                            if (m_pointsInstant.bItemGrid[p] != iExceptionCell)
                                return false;
                    }
                    while (++j < bSize);

                    return true;
                }
            }
            else if (Cell.IsCicekInventoryPosition())
            {
                if (bCell < CICEK_INVENTORY_SLOT_START)
                    return false;
               
                if (bCell > CICEK_INVENTORY_SLOT_END)
                    return false;
               
                if (m_pointsInstant.bItemGrid[bCell] == (UINT)iExceptionCell)
                {
                    if (bSize == 1)
                        return true;

                    int j = 1;
                    UINT bPage = bCell / (CICEK_INVENTORY_MAX_NUM / 3);

                    do
                    {
                        UINT p = bCell + (5 * j);

                        if (p >= CICEK_INVENTORY_MAX_NUM)
                            return false;

                        if (p / (CICEK_INVENTORY_MAX_NUM / 3) != bPage)
                            return false;

                        if (m_pointsInstant.bItemGrid[p])
                            if (m_pointsInstant.bItemGrid[p] != iExceptionCell)
                                return false;
                    }
                    while (++j < bSize);

                    return true;
                }
            }
#endif

// Arat
int CHARACTER::GetEmptyDragonSoulInventory(LPITEM pItem) const
{
    if (NULL == pItem || !pItem->IsDragonSoul())
        return -1;
    if (!DragonSoul_IsQualified())
    {
        return -1;
    }
    BYTE bSize = pItem->GetSize();
    WORD wBaseCell = DSManager::instance().GetBasePosition(pItem);

    if (WORD_MAX == wBaseCell)
        return -1;

    for (int i = 0; i < DRAGON_SOUL_BOX_SIZE; ++i)
        if (IsEmptyItemGrid(TItemPos(DRAGON_SOUL_INVENTORY, i + wBaseCell), bSize))
            return i + wBaseCell;

    return -1;
}

// Ekle
#ifdef ENABLE_SPLIT_INVENTORY_SYSTEM
int CHARACTER::GetEmptySkillBookInventory(BYTE size) const
{
    for (int i = SKILL_BOOK_INVENTORY_SLOT_START; i < SKILL_BOOK_INVENTORY_SLOT_END; ++i)
        if (IsEmptyItemGrid(TItemPos(INVENTORY, i), size))
            return i;
       
    return -1;
}

int CHARACTER::GetEmptyUpgradeItemsInventory(BYTE size) const
{
    for (int i = UPGRADE_ITEMS_INVENTORY_SLOT_START; i < UPGRADE_ITEMS_INVENTORY_SLOT_END; ++i)
        if (IsEmptyItemGrid(TItemPos(INVENTORY, i), size))
            return i;
       
    return -1;
}

int CHARACTER::GetEmptyStoneInventory(BYTE size) const
{
    for (int i = STONE_INVENTORY_SLOT_START; i < STONE_INVENTORY_SLOT_END; ++i)
        if (IsEmptyItemGrid(TItemPos(INVENTORY, i), size))
            return i;
       
    return -1;
}

int CHARACTER::GetEmptyBoxInventory(BYTE size) const
{
    for (int i = BOX_INVENTORY_SLOT_START; i < BOX_INVENTORY_SLOT_END; ++i)
        if (IsEmptyItemGrid(TItemPos(INVENTORY, i), size))
            return i;
       
    return -1;
}

int CHARACTER::GetEmptyEfsunInventory(BYTE size) const
{
    for (int i = EFSUN_INVENTORY_SLOT_START; i < EFSUN_INVENTORY_SLOT_END; ++i)
        if (IsEmptyItemGrid(TItemPos(INVENTORY, i), size))
            return i;
       
    return -1;
}

int CHARACTER::GetEmptyCicekInventory(BYTE size) const
{
    for (int i = CICEK_INVENTORY_SLOT_START; i < CICEK_INVENTORY_SLOT_END; ++i)
        if (IsEmptyItemGrid(TItemPos(INVENTORY, i), size))
            return i;
       
    return -1;
}
#endif

// Arat int CHARACTER::CountEmptyInventory() const içinde
    for (int i = 0; i < INVENTORY_MAX_NUM; ++i)

// Deðiþtir - https://prnt.sc/qaqihk
#ifdef ENABLE_SPLIT_INVENTORY_SYSTEM
    for (int i = 0; i < INVENTORY_AND_EQUIP_SLOT_MAX; ++i)
#else
    for (int i = 0; i < INVENTORY_MAX_NUM; ++i)
#endif

// Arat bool CHARACTER::MoveItem(TItemPos Cell, TItemPos DestCell, BYTE count) Ýçinde
    if (INVENTORY == Cell.window_type && Cell.cell >= INVENTORY_MAX_NUM && IS_SET(item->GetFlag(), ITEM_FLAG_IRREMOVABLE))
        return false;

// Deðiþtir - https://prnt.sc/qaqirn
#ifdef ENABLE_SPLIT_INVENTORY_SYSTEM
    if (INVENTORY == Cell.window_type && Cell.cell >= INVENTORY_AND_EQUIP_SLOT_MAX && IS_SET(item->GetFlag(), ITEM_FLAG_IRREMOVABLE))
        return false;
#else
    if (INVENTORY == Cell.window_type && Cell.cell >= INVENTORY_MAX_NUM && IS_SET(item->GetFlag(), ITEM_FLAG_IRREMOVABLE))
        return false;
#endif

// Arat
    // ±âȹÀÚÀÇ ¿äûÀ¸·Î º§Æ® Àκ¥Å丮¿¡´Â ƯÁ¤ ŸÀÔÀÇ ¾ÆÀÌÅÛ¸¸ ³ÖÀ» ¼ö ÀÖ´Ù.
    if (DestCell.IsBeltInventoryPosition() && false == CBeltInventoryHelper::CanMoveIntoBeltInventory(item))
    {
        ChatPacket(CHAT_TYPE_INFO, LC_TEXT("ÀÌ ¾ÆÀÌÅÛÀº º§Æ® Àκ¥Å丮·Î ¿Å±æ ¼ö ¾ø½À´Ï´Ù."));
        return false;
    }

// Ekle
#ifdef ENABLE_SPLIT_INVENTORY_SYSTEM
    if (Cell.IsSkillBookInventoryPosition() && !DestCell.IsSkillBookInventoryPosition())
    {
        ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Cannot move item this window."));
        return false;
    }
    if (Cell.IsUpgradeItemsInventoryPosition() && !DestCell.IsUpgradeItemsInventoryPosition())
    {
        ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Cannot move item this window."));
        return false;
    }
    if (Cell.IsStoneInventoryPosition() && !DestCell.IsStoneInventoryPosition())
    {
        ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Cannot move item this window."));
        return false;
    }
    if (Cell.IsBoxInventoryPosition() && !DestCell.IsBoxInventoryPosition())
    {
        ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Cannot move item this window."));
        return false;
    }
    if (Cell.IsEfsunInventoryPosition() && !DestCell.IsEfsunInventoryPosition())
    {
        ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Cannot move item this window."));
        return false;
    }
    if (Cell.IsCicekInventoryPosition() && !DestCell.IsCicekInventoryPosition())
    {
        ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Cannot move item this window."));
        return false;
    }
    if (Cell.IsDefaultInventoryPosition() && DestCell.IsSkillBookInventoryPosition())
    {
        ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Cannot move item this window."));
        return false;
    }
    if (Cell.IsDefaultInventoryPosition() && DestCell.IsUpgradeItemsInventoryPosition())
    {
        ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Cannot move item this window."));
        return false;
    }
    if (Cell.IsDefaultInventoryPosition() && DestCell.IsStoneInventoryPosition())
    {
        ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Cannot move item this window."));
        return false;
    }
    if (Cell.IsDefaultInventoryPosition() && DestCell.IsBoxInventoryPosition())
    {
        ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Cannot move item this window."));
        return false;
    }
    if (Cell.IsDefaultInventoryPosition() && DestCell.IsEfsunInventoryPosition())
    {
        ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Cannot move item this window."));
        return false;
    }
    if (Cell.IsDefaultInventoryPosition() && DestCell.IsCicekInventoryPosition())
    {
        ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Cannot move item this window."));
        return false;
    }
    if (Cell.IsEquipPosition() && DestCell.IsSkillBookInventoryPosition())
    {
        ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Cannot move item this window."));
        return false;
    }
    if (Cell.IsEquipPosition() && DestCell.IsUpgradeItemsInventoryPosition())
    {
        ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Cannot move item this window."));
        return false;
    }
    if (Cell.IsEquipPosition() && DestCell.IsStoneInventoryPosition())
    {
        ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Cannot move item this window."));
        return false;
    }
    if (Cell.IsEquipPosition() && DestCell.IsBoxInventoryPosition())
    {
        ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Cannot move item this window."));
        return false;
    }
    if (Cell.IsEquipPosition() && DestCell.IsEfsunInventoryPosition())
    {
        ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Cannot move item this window."));
        return false;
    }
    if (Cell.IsEquipPosition() && DestCell.IsCicekInventoryPosition())
    {
        ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Cannot move item this window."));
        return false;
    }
#endif

// Arat bool CHARACTER::PickupItem(DWORD dwVID) içinde
                    for (int i = 0; i < INVENTORY_MAX_NUM; ++i)

// Deðiþtir - https://prnt.sc/qaqj2l
#ifdef ENABLE_SPLIT_INVENTORY_SYSTEM
                    for (int i = 0; i < INVENTORY_AND_EQUIP_SLOT_MAX; ++i)
#else
                    for (int i = 0; i < INVENTORY_MAX_NUM; ++i)
#endif

// Arat bool CHARACTER::PickupItem(DWORD dwVID) Ýçinde
                int iEmptyCell;
                if (item->IsDragonSoul())
                {
                    if ((iEmptyCell = GetEmptyDragonSoulInventory(item)) == -1)
                    {
                        sys_log(0, "No empty ds inventory pid %u size %ud itemid %u", GetPlayerID(), item->GetSize(), item->GetID());
                        ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¼ÒÁöÇÏ°í ÀÖ´Â ¾ÆÀÌÅÛÀÌ ³Ê¹« ¸¹½À´Ï´Ù."));
                        return false;
                    }
                }

// Ekle
#ifdef ENABLE_SPLIT_INVENTORY_SYSTEM
                else if (item->IsSkillBook())
                {
                    if ((iEmptyCell = GetEmptySkillBookInventory(item->GetSize())) == -1)
                    {
                        sys_log(0, "No empty ds inventory pid %u size %ud itemid %u", GetPlayerID(), item->GetSize(), item->GetID());
                        ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¼ÒÁöÇÏ°í ÀÖ´Â ¾ÆÀÌÅÛÀÌ ³Ê¹« ¸¹½À´Ï´Ù."));
                        return false;
                    }
                }
                else if (item->IsUpgradeItem())
                {
                    if ((iEmptyCell = GetEmptyUpgradeItemsInventory(item->GetSize())) == -1)
                    {
                        sys_log(0, "No empty ds inventory pid %u size %ud itemid %u", GetPlayerID(), item->GetSize(), item->GetID());
                        ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¼ÒÁöÇÏ°í ÀÖ´Â ¾ÆÀÌÅÛÀÌ ³Ê¹« ¸¹½À´Ï´Ù."));
                        return false;
                    }
                }
                else if (item->IsStone())
                {
                    if ((iEmptyCell = GetEmptyStoneInventory(item->GetSize())) == -1)
                    {
                        sys_log(0, "No empty ds inventory pid %u size %ud itemid %u", GetPlayerID(), item->GetSize(), item->GetID());
                        ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¼ÒÁöÇÏ°í ÀÖ´Â ¾ÆÀÌÅÛÀÌ ³Ê¹« ¸¹½À´Ï´Ù."));
                        return false;
                    }
                }
                else if (item->IsBox())
                {
                    if ((iEmptyCell = GetEmptyBoxInventory(item->GetSize())) == -1)
                    {
                        sys_log(0, "No empty ds inventory pid %u size %ud itemid %u", GetPlayerID(), item->GetSize(), item->GetID());
                        ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¼ÒÁöÇÏ°í ÀÖ´Â ¾ÆÀÌÅÛÀÌ ³Ê¹« ¸¹½À´Ï´Ù."));
                        return false;
                    }
                }
                else if (item->IsEfsun())
                {
                    if ((iEmptyCell = GetEmptyEfsunInventory(item->GetSize())) == -1)
                    {
                        sys_log(0, "No empty ds inventory pid %u size %ud itemid %u", GetPlayerID(), item->GetSize(), item->GetID());
                        ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¼ÒÁöÇÏ°í ÀÖ´Â ¾ÆÀÌÅÛÀÌ ³Ê¹« ¸¹½À´Ï´Ù."));
                        return false;
                    }
                }
                else if (item->IsCicek())
                {
                    if ((iEmptyCell = GetEmptyCicekInventory(item->GetSize())) == -1)
                    {
                        sys_log(0, "No empty ds inventory pid %u size %ud itemid %u", GetPlayerID(), item->GetSize(), item->GetID());
                        ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¼ÒÁöÇÏ°í ÀÖ´Â ¾ÆÀÌÅÛÀÌ ³Ê¹« ¸¹½À´Ï´Ù."));
                        return false;
                    }
                }
#endif

// Arat bool CHARACTER::PickupItem(DWORD dwVID) Ýçinde
                item->RemoveFromGround();

                if (item->IsDragonSoul())
                    item->AddToCharacter(this, TItemPos(DRAGON_SOUL_INVENTORY, iEmptyCell));

// Ekle
#ifdef ENABLE_SPLIT_INVENTORY_SYSTEM
                else if (item->IsSkillBook())
                    item->AddToCharacter(this, TItemPos(INVENTORY, iEmptyCell));
                else if (item->IsUpgradeItem())
                    item->AddToCharacter(this, TItemPos(INVENTORY, iEmptyCell));
                else if (item->IsStone())
                    item->AddToCharacter(this, TItemPos(INVENTORY, iEmptyCell));
                else if (item->IsBox())
                    item->AddToCharacter(this, TItemPos(INVENTORY, iEmptyCell));
                else if (item->IsEfsun())
                    item->AddToCharacter(this, TItemPos(INVENTORY, iEmptyCell));
                else if (item->IsCicek())
                    item->AddToCharacter(this, TItemPos(INVENTORY, iEmptyCell));
#endif


// Arat bool CHARACTER::PickupItem(DWORD dwVID) Ýçinde
            int iEmptyCell;

            if (item->IsDragonSoul())
            {
                if (!(owner && (iEmptyCell = owner->GetEmptyDragonSoulInventory(item)) != -1))
                {
                    owner = this;

                    if ((iEmptyCell = GetEmptyDragonSoulInventory(item)) == -1)
                    {
                        owner->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¼ÒÁöÇÏ°í ÀÖ´Â ¾ÆÀÌÅÛÀÌ ³Ê¹« ¸¹½À´Ï´Ù."));
                        return false;
                    }
                }
            }

// Ekle
#ifdef ENABLE_SPLIT_INVENTORY_SYSTEM
            else if (item->IsSkillBook())
            {
                if (!(owner && (iEmptyCell = owner->GetEmptySkillBookInventory(item->GetSize())) != -1))
                {
                    owner = this;

                    if ((iEmptyCell = GetEmptySkillBookInventory(item->GetSize())) == -1)
                    {
                        owner->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¼ÒÁöÇÏ°í ÀÖ´Â ¾ÆÀÌÅÛÀÌ ³Ê¹« ¸¹½À´Ï´Ù."));
                        return false;
                    }
                }
            }
            else if (item->IsUpgradeItem())
            {
                if (!(owner && (iEmptyCell = owner->GetEmptyUpgradeItemsInventory(item->GetSize())) != -1))
                {
                    owner = this;

                    if ((iEmptyCell = GetEmptyUpgradeItemsInventory(item->GetSize())) == -1)
                    {
                        owner->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¼ÒÁöÇÏ°í ÀÖ´Â ¾ÆÀÌÅÛÀÌ ³Ê¹« ¸¹½À´Ï´Ù."));
                        return false;
                    }
                }
            }
            else if (item->IsStone())
            {
                if (!(owner && (iEmptyCell = owner->GetEmptyStoneInventory(item->GetSize())) != -1))
                {
                    owner = this;

                    if ((iEmptyCell = GetEmptyStoneInventory(item->GetSize())) == -1)
                    {
                        owner->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¼ÒÁöÇÏ°í ÀÖ´Â ¾ÆÀÌÅÛÀÌ ³Ê¹« ¸¹½À´Ï´Ù."));
                        return false;
                    }
                }
            }
            else if (item->IsBox())
            {
                if (!(owner && (iEmptyCell = owner->GetEmptyBoxInventory(item->GetSize())) != -1))
                {
                    owner = this;

                    if ((iEmptyCell = GetEmptyBoxInventory(item->GetSize())) == -1)
                    {
                        owner->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¼ÒÁöÇÏ°í ÀÖ´Â ¾ÆÀÌÅÛÀÌ ³Ê¹« ¸¹½À´Ï´Ù."));
                        return false;
                    }
                }
            }
            else if (item->IsEfsun())
            {
                if (!(owner && (iEmptyCell = owner->GetEmptyEfsunInventory(item->GetSize())) != -1))
                {
                    owner = this;

                    if ((iEmptyCell = GetEmptyEfsunInventory(item->GetSize())) == -1)
                    {
                        owner->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¼ÒÁöÇÏ°í ÀÖ´Â ¾ÆÀÌÅÛÀÌ ³Ê¹« ¸¹½À´Ï´Ù."));
                        return false;
                    }
                }
            }
            else if (item->IsCicek())
            {
                if (!(owner && (iEmptyCell = owner->GetEmptyCicekInventory(item->GetSize())) != -1))
                {
                    owner = this;

                    if ((iEmptyCell = GetEmptyCicekInventory(item->GetSize())) == -1)
                    {
                        owner->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¼ÒÁöÇÏ°í ÀÖ´Â ¾ÆÀÌÅÛÀÌ ³Ê¹« ¸¹½À´Ï´Ù."));
                        return false;
                    }
                }
            }
#endif


// Arat bool CHARACTER::PickupItem(DWORD dwVID) Ýçinde
            item->RemoveFromGround();

            if (item->IsDragonSoul())
                item->AddToCharacter(owner, TItemPos(DRAGON_SOUL_INVENTORY, iEmptyCell));

// Ekle
#ifdef ENABLE_SPLIT_INVENTORY_SYSTEM
            else if (item->IsSkillBook())
                item->AddToCharacter(owner, TItemPos(INVENTORY, iEmptyCell));
            else if (item->IsUpgradeItem())
                item->AddToCharacter(owner, TItemPos(INVENTORY, iEmptyCell));
            else if (item->IsStone())
                item->AddToCharacter(owner, TItemPos(INVENTORY, iEmptyCell));
            else if (item->IsBox())
                item->AddToCharacter(owner, TItemPos(INVENTORY, iEmptyCell));
            else if (item->IsEfsun())
                item->AddToCharacter(owner, TItemPos(INVENTORY, iEmptyCell));
            else if (item->IsCicek())
                item->AddToCharacter(owner, TItemPos(INVENTORY, iEmptyCell));
#endif

// Arat
bool CHARACTER::UnequipItem(LPITEM item)
{
    if (false == CanUnequipNow(item))
        return false;

    int pos;
    if (item->IsDragonSoul())
        pos = GetEmptyDragonSoulInventory(item);

// Ekle - https://prnt.sc/qaqk44
#ifdef ENABLE_SPLIT_INVENTORY_SYSTEM
    else if (item->IsSkillBook())
        pos = GetEmptySkillBookInventory(item->GetSize());
    else if (item->IsUpgradeItem())
        pos = GetEmptyUpgradeItemsInventory(item->GetSize());
    else if (item->IsStone())
        pos = GetEmptyStoneInventory(item->GetSize());
    else if (item->IsBox())
        pos = GetEmptyBoxInventory(item->GetSize());
    else if (item->IsEfsun())
        pos = GetEmptyEfsunInventory(item->GetSize());
    else if (item->IsCicek())
        pos = GetEmptyCicekInventory(item->GetSize());
#endif

// Arat
    // HARD CODING
    if (item->GetVnum() == UNIQUE_ITEM_HIDE_ALIGNMENT_TITLE)
        ShowAlignment(true);

    if (item->IsDragonSoul())
        item->AddToCharacter(this, TItemPos(DRAGON_SOUL_INVENTORY, pos));

// Ekle - https://prnt.sc/qaqk97
#ifdef ENABLE_SPLIT_INVENTORY_SYSTEM
    else if (item->IsSkillBook())
        item->AddToCharacter(this, TItemPos(SKILL_BOOK_INVENTORY, pos));
    else if (item->IsUpgradeItem())
        item->AddToCharacter(this, TItemPos(UPGRADE_ITEMS_INVENTORY, pos));
    else if (item->IsStone())
        item->AddToCharacter(this, TItemPos(STONE_INVENTORY, pos));
    else if (item->IsBox())
        item->AddToCharacter(this, TItemPos(BOX_INVENTORY, pos));
    else if (item->IsEfsun())
        item->AddToCharacter(this, TItemPos(EFSUN_INVENTORY, pos));
    else if (item->IsCicek())
        item->AddToCharacter(this, TItemPos(CICEK_INVENTORY, pos));
#endif

// Arat LPITEM CHARACTER::FindSpecifyItem(DWORD vnum) const Ýçinde
    for (int i = 0; i < INVENTORY_MAX_NUM; ++i)

// Deðiþtir
#ifdef ENABLE_SPLIT_INVENTORY_SYSTEM
    for (int i = 0; i < INVENTORY_AND_EQUIP_SLOT_MAX; ++i)
#else
    for (int i = 0; i < INVENTORY_MAX_NUM; ++i)
#endif

// Arat LPITEM CHARACTER::FindItemByID(DWORD id) const Ýçinde
    for (int i = 0; i < INVENTORY_MAX_NUM; ++i)

// Deðiþtir
#ifdef ENABLE_SPLIT_INVENTORY_SYSTEM
    for (int i = 0; i < INVENTORY_AND_EQUIP_SLOT_MAX; ++i)
#else
    for (int i = 0; i < INVENTORY_MAX_NUM; ++i)
#endif

// Arat
int CHARACTER::CountSpecifyItem(DWORD vnum) const
{
    int    count = 0;
    LPITEM item;

    for (int i = 0; i < INVENTORY_MAX_NUM; ++i)
    {
        item = GetInventoryItem(i);
        if (NULL != item && item->GetVnum() == vnum)
        {
            // °³ÀÎ »óÁ¡¿¡ µî·ÏµÈ ¹°°ÇÀÌ¸é ³Ñ¾î°£´Ù.
            if (m_pkMyShop && m_pkMyShop->IsSellingItem(item->GetID()))
            {
                continue;
            }
            else
            {
                count += item->GetCount();
            }
        }
    }

// Ekle
#ifdef ENABLE_SPLIT_INVENTORY_SYSTEM
    for (int i = SKILL_BOOK_INVENTORY_SLOT_START; i < SKILL_BOOK_INVENTORY_SLOT_END; ++i)
    {
        item = GetSkillBookInventoryItem(i);
        if (NULL != item && item->GetVnum() == vnum)
        {
            if (m_pkMyShop && m_pkMyShop->IsSellingItem(item->GetID()))
            {
                continue;
            }
            else
            {
                count += item->GetCount();
            }
        }
    }
   
    for (int i = UPGRADE_ITEMS_INVENTORY_SLOT_START; i < UPGRADE_ITEMS_INVENTORY_SLOT_END; ++i)
    {
        item = GetUpgradeItemsInventoryItem(i);
        if (NULL != item && item->GetVnum() == vnum)
        {
            if (m_pkMyShop && m_pkMyShop->IsSellingItem(item->GetID()))
            {
                continue;
            }
            else
            {
                count += item->GetCount();
            }
        }
    }
   
    for (int i = STONE_INVENTORY_SLOT_START; i < STONE_INVENTORY_SLOT_END; ++i)
    {
        item = GetStoneInventoryItem(i);
        if (NULL != item && item->GetVnum() == vnum)
        {
            if (m_pkMyShop && m_pkMyShop->IsSellingItem(item->GetID()))
            {
                continue;
            }
            else
            {
                count += item->GetCount();
            }
        }
    }
   
    for (int i = BOX_INVENTORY_SLOT_START; i < BOX_INVENTORY_SLOT_END; ++i)
    {
        item = GetBoxInventoryItem(i);
        if (NULL != item && item->GetVnum() == vnum)
        {
            if (m_pkMyShop && m_pkMyShop->IsSellingItem(item->GetID()))
            {
                continue;
            }
            else
            {
                count += item->GetCount();
            }
        }
    }
   
    for (int i = EFSUN_INVENTORY_SLOT_START; i < EFSUN_INVENTORY_SLOT_END; ++i)
    {
        item = GetEfsunInventoryItem(i);
        if (NULL != item && item->GetVnum() == vnum)
        {
            if (m_pkMyShop && m_pkMyShop->IsSellingItem(item->GetID()))
            {
                continue;
            }
            else
            {
                count += item->GetCount();
            }
        }
    }
   
    for (int i = CICEK_INVENTORY_SLOT_START; i < CICEK_INVENTORY_SLOT_END; ++i)
    {
        item = GetCicekInventoryItem(i);
        if (NULL != item && item->GetVnum() == vnum)
        {
            if (m_pkMyShop && m_pkMyShop->IsSellingItem(item->GetID()))
            {
                continue;
            }
            else
            {
                count += item->GetCount();
            }
        }
    }
#endif

// Arat void CHARACTER::RemoveSpecifyItem(DWORD vnum, DWORD count) Ýçinde
            if (0 == count)
                return;
        }
        else
        {
            GetInventoryItem(i)->SetCount(GetInventoryItem(i)->GetCount() - count);
            return;
        }
    }

// Ekle
#ifdef ENABLE_SPLIT_INVENTORY_SYSTEM
    for (UINT i = SKILL_BOOK_INVENTORY_SLOT_START; i < CICEK_INVENTORY_SLOT_END; ++i)
    {
        if (NULL == GetInventoryItem(i))
            continue;

        if (GetInventoryItem(i)->GetVnum() != vnum)
            continue;

        if(m_pkMyShop)
        {
            bool isItemSelling = m_pkMyShop->IsSellingItem(GetInventoryItem(i)->GetID());
            if (isItemSelling)
                continue;
        }

        if (vnum >= 80003 && vnum <= 80007)
            LogManager::instance().GoldBarLog(GetPlayerID(), GetInventoryItem(i)->GetID(), QUEST, "RemoveSpecifyItem");

        if (count >= GetInventoryItem(i)->GetCount())
        {
            count -= GetInventoryItem(i)->GetCount();
            GetInventoryItem(i)->SetCount(0);

            if (0 == count)
                return;
        }
        else
        {
            GetInventoryItem(i)->SetCount(GetInventoryItem(i)->GetCount() - count);
            return;
        }
    }
#endif

// Arat int CHARACTER::CountSpecifyTypeItem(BYTE type) const Ýçinde
    for (int i = 0; i < INVENTORY_MAX_NUM; ++i)

// Deðiþtir
#ifdef ENABLE_SPLIT_INVENTORY_SYSTEM
    for (int i = SKILL_BOOK_INVENTORY_SLOT_START; i < STONE_INVENTORY_SLOT_END; ++i)
#else
    for (int i = 0; i < INVENTORY_MAX_NUM; ++i)
#endif

// Arat void CHARACTER::RemoveSpecifyTypeItem(BYTE type, DWORD count) Ýçinde
    for (UINT i = 0; i < INVENTORY_MAX_NUM; ++i)

// Deðiþtir
#ifdef ENABLE_SPLIT_INVENTORY_SYSTEM
    for (UINT i = SKILL_BOOK_INVENTORY_SLOT_START; i < STONE_INVENTORY_SLOT_END; ++i)
#else
    for (UINT i = 0; i < INVENTORY_MAX_NUM; ++i)
#endif

// Arat void CHARACTER::AutoGiveItem(LPITEM item, bool longOwnerShip) Ýçinde
    int cell;
    if (item->IsDragonSoul())
    {
        cell = GetEmptyDragonSoulInventory(item);
    }

// Ekle
#ifdef ENABLE_SPLIT_INVENTORY_SYSTEM
    else if (item->IsSkillBook())
    {
        cell = GetEmptySkillBookInventory(item->GetSize());
    }
    else if (item->IsUpgradeItem())
    {
        cell = GetEmptyUpgradeItemsInventory(item->GetSize());
    }
    else if (item->IsStone())
    {
        cell = GetEmptyStoneInventory(item->GetSize());
    }
    else if (item->IsBox())
    {
        cell = GetEmptyBoxInventory(item->GetSize());
    }
    else if (item->IsEfsun())
    {
        cell = GetEmptyEfsunInventory(item->GetSize());
    }
    else if (item->IsCicek())
    {
        cell = GetEmptyCicekInventory(item->GetSize());
    }
#endif

// Ayný blok içinde arat
    if (cell != -1)
    {
        if (item->IsDragonSoul())
            item->AddToCharacter(this, TItemPos(DRAGON_SOUL_INVENTORY, cell));

// Ekle - https://prnt.sc/qaqll8
#ifdef ENABLE_SPLIT_INVENTORY_SYSTEM
        else if (item->IsSkillBook())
            item->AddToCharacter(this, TItemPos(INVENTORY, cell));
        else if (item->IsUpgradeItem())
            item->AddToCharacter(this, TItemPos(INVENTORY, cell));
        else if (item->IsStone())
            item->AddToCharacter(this, TItemPos(INVENTORY, cell));
        else if (item->IsBox())
            item->AddToCharacter(this, TItemPos(INVENTORY, cell));
        else if (item->IsEfsun())
            item->AddToCharacter(this, TItemPos(INVENTORY, cell));
        else if (item->IsCicek())
            item->AddToCharacter(this, TItemPos(INVENTORY, cell));
#endif

// Arat LPITEM CHARACTER::AutoGiveItem(DWORD dwItemVnum, BYTE bCount, int iRarePct, bool bMsg) Ýçinde
        for (int i = 0; i < INVENTORY_MAX_NUM; ++i)

// Deðiþtir
#ifdef ENABLE_SPLIT_INVENTORY_SYSTEM
        for (int i = 0; i < INVENTORY_AND_EQUIP_SLOT_MAX; ++i)
#else
        for (int i = 0; i < INVENTORY_MAX_NUM; ++i)
#endif

// Arat LPITEM CHARACTER::AutoGiveItem(DWORD dwItemVnum, BYTE bCount, int iRarePct, bool bMsg) Ýçinde ( Yanlýþlýk yok iki defa var)
        for (int i=0; i < INVENTORY_MAX_NUM; i++)

// Deðiþtir
#ifdef ENABLE_SPLIT_INVENTORY_SYSTEM
        for (int i=0; i < INVENTORY_AND_EQUIP_SLOT_MAX; i++)
#else
        for (int i=0; i < INVENTORY_MAX_NUM; i++)
#endif

// Arat LPITEM CHARACTER::AutoGiveItem(DWORD dwItemVnum, BYTE bCount, int iRarePct, bool bMsg) Ýçinde
    int iEmptyCell;
    if (item->IsDragonSoul())
    {
        iEmptyCell = GetEmptyDragonSoulInventory(item);
    }

// Ekle
#ifdef ENABLE_SPLIT_INVENTORY_SYSTEM
    else if (item->IsSkillBook())
    {
        iEmptyCell = GetEmptySkillBookInventory(item->GetSize());
    }
    else if (item->IsUpgradeItem())
    {
        iEmptyCell = GetEmptyUpgradeItemsInventory(item->GetSize());
    }
    else if (item->IsStone())
    {
        iEmptyCell = GetEmptyStoneInventory(item->GetSize());
    }
    else if (item->IsBox())
    {
        iEmptyCell = GetEmptyBoxInventory(item->GetSize());
    }
    else if (item->IsEfsun())
    {
        iEmptyCell = GetEmptyEfsunInventory(item->GetSize());
    }
    else if (item->IsCicek())
    {
        iEmptyCell = GetEmptyCicekInventory(item->GetSize());
    }
#endif

// Arat LPITEM CHARACTER::AutoGiveItem(DWORD dwItemVnum, BYTE bCount, int iRarePct, bool bMsg) Ýçinde
    if (iEmptyCell != -1)
    {
        if (bMsg)
            ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¾ÆÀÌÅÛ È¹µæ: %s"), item->GetName());

        if (item->IsDragonSoul())
            item->AddToCharacter(this, TItemPos(DRAGON_SOUL_INVENTORY, iEmptyCell));

// Ekle
#ifdef ENABLE_SPLIT_INVENTORY_SYSTEM
        else if (item->IsSkillBook())
            item->AddToCharacter(this, TItemPos(INVENTORY, iEmptyCell));
        else if (item->IsUpgradeItem())
            item->AddToCharacter(this, TItemPos(INVENTORY, iEmptyCell));
        else if (item->IsStone())
            item->AddToCharacter(this, TItemPos(INVENTORY, iEmptyCell));
        else if (item->IsBox())
            item->AddToCharacter(this, TItemPos(INVENTORY, iEmptyCell));
        else if (item->IsEfsun())
            item->AddToCharacter(this, TItemPos(INVENTORY, iEmptyCell));
        else if (item->IsCicek())
            item->AddToCharacter(this, TItemPos(INVENTORY, iEmptyCell));
#endif

// Arat bool CHARACTER::CanUnequipNow(const LPITEM item, const TItemPos& srcCell, const TItemPos& destCell) Ýçinde
        int pos = -1;

        if (item->IsDragonSoul())
            pos = GetEmptyDragonSoulInventory(item);

// Ekle - https://prnt.sc/qaqmly
#ifdef ENABLE_SPLIT_INVENTORY_SYSTEM
        else if (item->IsSkillBook())
            pos = GetEmptySkillBookInventory(item->GetSize());
        else if (item->IsUpgradeItem())
            pos = GetEmptyUpgradeItemsInventory(item->GetSize());
        else if (item->IsStone())
            pos = GetEmptyStoneInventory(item->GetSize());
        else if (item->IsBox())
            pos = GetEmptyBoxInventory(item->GetSize());
        else if (item->IsEfsun())
            pos = GetEmptyEfsunInventory(item->GetSize());
        else if (item->IsCicek())
            pos = GetEmptyCicekInventory(item->GetSize());
#endif
 
Kodlarınızı inceledim. Mevcut fonksiyonun item bilgilerini alması gerekiyor.
Örnek kullanım;
Python:
selectedItemVNum = player.GetItemIndex(itemSlotIndex)
itemCount = player.GetItemCount(itemSlotIndex)

itemSlotIndex kısmı itemin bilgisini alabilmek için kutucuğun numarasını cliente gönderiyor.
uiinventory.py dosyasını inceleyerek itemSlotIndex'in nereden geldiğini görebilirsiniz.
 
BAHSETTİĞİNİZ YERDE BU ATAMALAR VAR item.SKILL_BOOK_INVENTORY_SLOT_START İLE k envanterındaki itemi okuyabilir miyim
Python:
def SelectItemSlot(self, itemSlotIndex):
            if constInfo.GET_ITEM_QUESTION_DIALOG_STATUS() == 1:
                return
             
            if self.inventoryType == 0:
                itemSlotIndex += item.SKILL_BOOK_INVENTORY_SLOT_START
                if self.GetInventoryPageIndex() == 1:
                    itemSlotIndex += 45
                elif self.GetInventoryPageIndex() == 2:
                    itemSlotIndex += 90
            elif self.inventoryType == 2:
                itemSlotIndex += item.STONE_INVENTORY_SLOT_START
                if self.GetInventoryPageIndex() == 1:
                    itemSlotIndex += 45
                elif self.GetInventoryPageIndex() == 2:
                    itemSlotIndex += 90
            elif self.inventoryType == 3:
                itemSlotIndex += item.BOX_INVENTORY_SLOT_START
                if self.GetInventoryPageIndex() == 1:
                    itemSlotIndex += 45
                elif self.GetInventoryPageIndex() == 2:
                    itemSlotIndex += 90
            elif self.inventoryType == 4:
                itemSlotIndex += item.EFSUN_INVENTORY_SLOT_START
                if self.GetInventoryPageIndex() == 1:
                    itemSlotIndex += 45
                elif self.GetInventoryPageIndex() == 2:
                    itemSlotIndex += 90
            elif self.inventoryType == 5:
                itemSlotIndex += item.CICEK_INVENTORY_SLOT_START
                if self.GetInventoryPageIndex() == 1:
                    itemSlotIndex += 45
                elif self.GetInventoryPageIndex() == 2:
                    itemSlotIndex += 90
            else:
                itemSlotIndex += item.UPGRADE_ITEMS_INVENTORY_SLOT_START
                if self.GetInventoryPageIndex() == 1:
                    itemSlotIndex += 45
                elif self.GetInventoryPageIndex() == 2:
                    itemSlotIndex += 90

Python:
# İmportlar arasına ekle
import uiPickEtc

# Arat
    def RefreshCostumeSlot(self):
        getItemVNum=player.GetItemIndex
       
        for i in xrange(item.COSTUME_SLOT_COUNT):
            slotNumber = item.COSTUME_SLOT_START + i
            self.wndEquip.SetItemSlot(slotNumber, getItemVNum(slotNumber), 0)

        self.wndEquip.RefreshSlot()

# Altına ekle
if app.WJ_SPLIT_INVENTORY_SYSTEM:
    class ExtendedInventoryWindow(ui.ScriptWindow):
        tooltipItem = None
        interface = None
        dlgPickMoney = None
        dlgPickItem = None
        sellingSlotNumber = -1
        isLoaded = 0
       
        def __init__(self):
            ui.ScriptWindow.__init__(self)
            self.inventoryPageIndex = 0
            self.__LoadWindow()
           
        def __del__(self):
            ui.ScriptWindow.__del__(self)


        def Show(self):
            self.__LoadWindow()
            ui.ScriptWindow.Show(self)   
           
        def BindInterfaceClass(self, interface):
            self.interface = interface

        def __LoadWindow(self):
            if self.isLoaded == 1:
                return

            self.isLoaded = 1
           
            try:
                pyScrLoader = ui.PythonScriptLoader()
                pyScrLoader.LoadScriptFile(self, "UIScript/ExtendedInventoryWindow.py")
            except:
                import exception
                exception.Abort("ExtendedInventoryWindow.LoadWindow.LoadObject")

            try:
                wndItem = self.GetChild("ItemSlot")
                self.GetChild("TitleBar").SetCloseEvent(ui.__mem_func__(self.Close))
                self.titleName = self.GetChild("TitleName")
                self.SkillBookButton = self.GetChild("SkillBookButton")
                self.UpgradeItemsButton = self.GetChild("UpgradeItemsButton")
                self.stoneButton = self.GetChild("StoneButton")
                self.boxButton = self.GetChild("BoxButton")
                self.efsunButton = self.GetChild("EfsunButton")
                self.cicekButton = self.GetChild("CicekButton")
                self.inventoryTab = []
                self.inventoryTab.append(self.GetChild("Inventory_Tab_01"))
                self.inventoryTab.append(self.GetChild("Inventory_Tab_02"))
                self.inventoryTab.append(self.GetChild("Inventory_Tab_03"))
                self.MalzemeDeposuInfo = self.GetChild("MalzemeDeposuInfo")
            except:
                import exception
                exception.Abort("ExtendedInventoryWindow.LoadWindow.BindObject")

            ## Info
            self.tlInfo = uiToolTip.ItemToolTip()
            self.tlInfo.Hide()
            self.tooltipInfo = [self.tlInfo]*7
            self.InformationText = [localeInfo.MALZEME_DEPOSU,
                                    localeInfo.BK_ENVANTER_TEXT1,
                                    localeInfo.BK_ENVANTER_TEXT2,
                                    localeInfo.BK_ENVANTER_TEXT3,
                                    localeInfo.BK_ENVANTER_TEXT4,
                                    localeInfo.BK_ENVANTER_TEXT5,
                                    localeInfo.BK_ENVANTER_TEXT6
            ]
           
            for i in xrange(7):
                self.tooltipInfo[i].SetFollow(True)
                self.tooltipInfo[i].AlignHorizonalCenter()
                if i == 0:
                    TITLE_COLOR = grp.GenerateColor(0.9490, 0.9058, 0.7568, 1.0)
                    self.tooltipInfo[i].AutoAppendTextLine(self.InformationText[i], TITLE_COLOR)
                else:
                    self.tooltipInfo[i].AutoAppendTextLine(self.InformationText[i])
                self.tooltipInfo[i].Hide()
                self.tooltipInfo[i].toolTipWidth += 10

            ## Item
            wndItem.SetSelectEmptySlotEvent(ui.__mem_func__(self.SelectEmptySlot))
            wndItem.SetSelectItemSlotEvent(ui.__mem_func__(self.SelectItemSlot))
            wndItem.SetUnselectItemSlotEvent(ui.__mem_func__(self.UseItemSlot))
            wndItem.SetUseSlotEvent(ui.__mem_func__(self.UseItemSlot))
            wndItem.SetOverInItemEvent(ui.__mem_func__(self.OverInItem))
            wndItem.SetOverOutItemEvent(ui.__mem_func__(self.OverOutItem))

            self.envanterileacilsin = ui.CheckBox()
            self.envanterileacilsin.SetParent(self)
            self.envanterileacilsin.SetPosition(17, 385)
            self.envanterileacilsin.SetEvent(ui.__mem_func__(self.__OnClickEnableEnvanterOn), "ON_CHECK", True)
            self.envanterileacilsin.SetEvent(ui.__mem_func__(self.__OnClickDisableEnvanterOf), "ON_UNCKECK", False)
            self.envanterileacilsin.SetTextInfo(localeInfo.ENVANTER_ILE_AC)
            self.envanterileacilsin.SetCheckStatus(constInfo.EnvanterAcilsinmi)
            self.envanterileacilsin.Show()

            self.SkillBookButton.SetEvent(lambda arg=0: self.SetInventoryType(arg))
            self.UpgradeItemsButton.SetEvent(lambda arg=1: self.SetInventoryType(arg))
            self.stoneButton.SetEvent(lambda arg=2: self.SetInventoryType(arg))
            self.boxButton.SetEvent(lambda arg=3: self.SetInventoryType(arg))
            self.efsunButton.SetEvent(lambda arg=4: self.SetInventoryType(arg))
            self.cicekButton.SetEvent(lambda arg=5: self.SetInventoryType(arg))
            self.SkillBookButton.Down()

            self.inventoryTab[0].SetEvent(lambda arg=0: self.SetInventoryPage(arg))
            self.inventoryTab[1].SetEvent(lambda arg=1: self.SetInventoryPage(arg))
            self.inventoryTab[2].SetEvent(lambda arg=2: self.SetInventoryPage(arg))
            self.inventoryTab[0].Down()
           
            ## PickMoneyDialog
            dlgPickMoney = uiPickMoney.PickMoneyDialog()
            dlgPickMoney.LoadDialog()
            dlgPickMoney.Hide()

            ## PickItemDialog
            dlgPickItem = uiPickEtc.PickEtcDialog()
            dlgPickItem.LoadDialog()
            dlgPickItem.Hide()
           
            self.dlgPickMoney = dlgPickMoney
           
            self.wndItem = wndItem
            self.SetInventoryType(0)
            self.SetInventoryPage(0)

            self.dlgPickItem = dlgPickItem

            self.wndCostume = None
           
        def Destroy(self):
            self.ClearDictionary()
            self.dlgPickMoney.Destroy()
            self.dlgPickItem.Destroy()
            self.dlgPickItem = 0
            self.dlgPickMoney = 0
            self.tooltipItem = None
            self.wndItem = 0
            self.interface = None
            self.inventoryTab = []
            self.envanterileacilsin = []

        def __OnClickEnableEnvanterOn(self):
            constInfo.EnvanterAcilsinmi = 1
            chat.AppendChat(chat.CHAT_TYPE_INFO, "<Sistem> Envanter ile açılma aktif.")

        def __OnClickDisableEnvanterOf(self):
            constInfo.EnvanterAcilsinmi = 0
            chat.AppendChat(chat.CHAT_TYPE_INFO, "<Sistem> Envanter ile açılma pasif.")

        def Hide(self):
            if None != self.tooltipItem:
                self.tooltipItem.HideToolTip()
                self.tlInfo.Hide()
            if self.dlgPickItem:
                self.dlgPickItem.Close()
            wndMgr.Hide(self.hWnd)
           
        def Close(self):
            if self.tooltipItem:
                self.tooltipItem.HideToolTip()
            self.tlInfo.Hide()
            self.Hide()

        def OnUpdate(self):
            for i in xrange(7):
                if self.MalzemeDeposuInfo.IsIn():
                    self.tooltipInfo[i].Show()
                else:
                    self.tooltipInfo[i].Hide()

        def SetInventoryType(self, type):
            self.inventoryType = type
            if type == 0:
                self.SkillBookButton.Down()
                self.efsunButton.SetUp()
                self.cicekButton.SetUp()
                self.UpgradeItemsButton.SetUp()
                self.stoneButton.SetUp()
                self.boxButton.SetUp()
                self.titleName.SetText(localeInfo.INVENTORY_SKILL_BOOK_TOOLTIP)
            elif type == 2:
                self.stoneButton.Down()
                self.efsunButton.SetUp()
                self.cicekButton.SetUp()
                self.UpgradeItemsButton.SetUp()
                self.SkillBookButton.SetUp()
                self.boxButton.SetUp()
                self.titleName.SetText(localeInfo.INVENTORY_STONE_TOOLTIP)
            elif type == 3:
                self.boxButton.Down()
                self.efsunButton.SetUp()
                self.UpgradeItemsButton.SetUp()
                self.cicekButton.SetUp()
                self.stoneButton.SetUp()
                self.SkillBookButton.SetUp()
                self.titleName.SetText(localeInfo.INVENTORY_BOX_TOOLTIP)
            elif type == 4:
                self.efsunButton.Down()
                self.boxButton.SetUp()
                self.cicekButton.SetUp()
                self.UpgradeItemsButton.SetUp()
                self.stoneButton.SetUp()
                self.SkillBookButton.SetUp()
                self.titleName.SetText(localeInfo.INVENTORY_EFSUN_TOOLTIP)
            elif type == 5:
                self.cicekButton.Down()
                self.efsunButton.SetUp()
                self.boxButton.SetUp()
                self.UpgradeItemsButton.SetUp()
                self.stoneButton.SetUp()
                self.SkillBookButton.SetUp()
                self.titleName.SetText(localeInfo.INVENTORY_CICEK_TOOLTIP)
            else:
                self.UpgradeItemsButton.Down()
                self.SkillBookButton.SetUp()
                self.efsunButton.SetUp()
                self.cicekButton.SetUp()
                self.stoneButton.SetUp()
                self.boxButton.SetUp()
                self.titleName.SetText(localeInfo.INVENTORY_UPGRADE_ITEM_TOOLTIP)
            self.RefreshBagSlotWindow()
           
        def SetInventoryPage(self, page):
            self.inventoryPageIndex = page
            for i in range(0,len(self.inventoryTab)):
                self.inventoryTab[i].SetUp()
            self.inventoryTab[page].Down()
            self.RefreshBagSlotWindow()

        def OnPickItem(self, count):
            itemSlotIndex = self.dlgPickItem.itemGlobalSlotIndex
            selectedItemVNum = player.GetItemIndex(itemSlotIndex)
            mouseModule.mouseController.AttachObject(self, player.SLOT_TYPE_SKILL_BOOK_INVENTORY, itemSlotIndex, selectedItemVNum, count)
               
        def __InventoryLocalSlotPosToGlobalSlotPos(self, local):
            if self.inventoryType == 0:
                return self.inventoryPageIndex*player.SKILL_BOOK_INVENTORY_SLOT_COUNT + local + item.SKILL_BOOK_INVENTORY_SLOT_START
            elif self.inventoryType == 2:
                return self.inventoryPageIndex*player.STONE_INVENTORY_SLOT_COUNT + local + item.STONE_INVENTORY_SLOT_START
            elif self.inventoryType == 3:
                return self.inventoryPageIndex*player.BOX_INVENTORY_SLOT_COUNT + local + item.BOX_INVENTORY_SLOT_START
            elif self.inventoryType == 4:
                return self.inventoryPageIndex*player.EFSUN_INVENTORY_SLOT_COUNT + local + item.EFSUN_INVENTORY_SLOT_START
            elif self.inventoryType == 5:
                return self.inventoryPageIndex*player.CICEK_INVENTORY_SLOT_COUNT + local + item.CICEK_INVENTORY_SLOT_START
            else:
                return self.inventoryPageIndex*player.UPGRADE_ITEMS_INVENTORY_SLOT_COUNT + local + item.UPGRADE_ITEMS_INVENTORY_SLOT_START
               
        def GetInventoryPageIndex(self):
            return self.inventoryPageIndex
           
        def RefreshBagSlotWindow(self):
            getItemVNum=player.GetItemIndex
            getItemCount=player.GetItemCount
            setItemVNum=self.wndItem.SetItemSlot
           
            if self.inventoryType == 0:
                for i in xrange(player.SKILL_BOOK_INVENTORY_SLOT_COUNT):
                    slotNumber = item.SKILL_BOOK_INVENTORY_SLOT_START + i
                    if self.GetInventoryPageIndex() == 1:
                        slotNumber += 45
                    elif self.GetInventoryPageIndex() == 2:
                        slotNumber += 90
                    itemCount = getItemCount(slotNumber)
                    if 0 == itemCount:
                        self.wndItem.ClearSlot(i)
                        continue
                    elif 1 == itemCount:
                        itemCount = 0   
                    itemVnum = getItemVNum(slotNumber)
                    setItemVNum(i, itemVnum, itemCount)
            elif self.inventoryType == 2:
                for i in xrange(player.STONE_INVENTORY_SLOT_COUNT):
                    slotNumber = item.STONE_INVENTORY_SLOT_START + i
                    if self.GetInventoryPageIndex() == 1:
                        slotNumber += 45
                    elif self.GetInventoryPageIndex() == 2:
                        slotNumber += 90
                    itemCount = getItemCount(slotNumber)
                    if 0 == itemCount:
                        self.wndItem.ClearSlot(i)
                        continue
                    elif 1 == itemCount:
                        itemCount = 0   
                    itemVnum = getItemVNum(slotNumber)
                    setItemVNum(i, itemVnum, itemCount)   
            elif self.inventoryType == 3:
                for i in xrange(player.BOX_INVENTORY_SLOT_COUNT):
                    slotNumber = item.BOX_INVENTORY_SLOT_START + i
                    if self.GetInventoryPageIndex() == 1:
                        slotNumber += 45
                    elif self.GetInventoryPageIndex() == 2:
                        slotNumber += 90
                    itemCount = getItemCount(slotNumber)
                    if 0 == itemCount:
                        self.wndItem.ClearSlot(i)
                        continue
                    elif 1 == itemCount:
                        itemCount = 0
                    itemVnum = getItemVNum(slotNumber)
                    setItemVNum(i, itemVnum, itemCount)   
            elif self.inventoryType == 4:
                for i in xrange(player.EFSUN_INVENTORY_SLOT_COUNT):
                    slotNumber = item.EFSUN_INVENTORY_SLOT_START + i
                    if self.GetInventoryPageIndex() == 1:
                        slotNumber += 45
                    elif self.GetInventoryPageIndex() == 2:
                        slotNumber += 90
                    itemCount = getItemCount(slotNumber)
                    if 0 == itemCount:
                        self.wndItem.ClearSlot(i)
                        continue
                    elif 1 == itemCount:
                        itemCount = 0
                    itemVnum = getItemVNum(slotNumber)
                    setItemVNum(i, itemVnum, itemCount)   
            elif self.inventoryType == 5:
                for i in xrange(player.CICEK_INVENTORY_SLOT_COUNT):
                    slotNumber = item.CICEK_INVENTORY_SLOT_START + i
                    if self.GetInventoryPageIndex() == 1:
                        slotNumber += 45
                    elif self.GetInventoryPageIndex() == 2:
                        slotNumber += 90
                    itemCount = getItemCount(slotNumber)
                    if 0 == itemCount:
                        self.wndItem.ClearSlot(i)
                        continue
                    elif 1 == itemCount:
                        itemCount = 0
                    itemVnum = getItemVNum(slotNumber)
                    setItemVNum(i, itemVnum, itemCount)   
            else:
                for i in xrange(player.UPGRADE_ITEMS_INVENTORY_SLOT_COUNT):
                    slotNumber = item.UPGRADE_ITEMS_INVENTORY_SLOT_START + i
                    if self.GetInventoryPageIndex() == 1:
                        slotNumber += 45
                    elif self.GetInventoryPageIndex() == 2:
                        slotNumber += 90
                    itemCount = getItemCount(slotNumber)
                    if 0 == itemCount:
                        self.wndItem.ClearSlot(i)
                        continue
                    elif 1 == itemCount:
                        itemCount = 0
                    itemVnum = getItemVNum(slotNumber)
                    setItemVNum(i, itemVnum, itemCount)
            self.wndItem.RefreshSlot()

        def RefreshItemSlot(self):
            self.RefreshBagSlotWindow()

        def RefreshStatus(self):
            pass

        def SetItemToolTip(self, tooltipItem):
            self.tooltipItem = tooltipItem
           
        def SelectEmptySlot(self, selectedSlotPos):
            if constInfo.GET_ITEM_QUESTION_DIALOG_STATUS() == 1:
                return
           
            if self.inventoryType == 0:
                selectedSlotPos += item.SKILL_BOOK_INVENTORY_SLOT_START
                if self.GetInventoryPageIndex() == 1:
                    selectedSlotPos += 45
                elif self.GetInventoryPageIndex() == 2:
                    selectedSlotPos += 90
            elif self.inventoryType == 2:
                selectedSlotPos += item.STONE_INVENTORY_SLOT_START
                if self.GetInventoryPageIndex() == 1:
                    selectedSlotPos += 45
                elif self.GetInventoryPageIndex() == 2:
                    selectedSlotPos += 90
            elif self.inventoryType == 3:
                selectedSlotPos += item.BOX_INVENTORY_SLOT_START
                if self.GetInventoryPageIndex() == 1:
                    selectedSlotPos += 45
                elif self.GetInventoryPageIndex() == 2:
                    selectedSlotPos += 90
            elif self.inventoryType == 4:
                selectedSlotPos += item.EFSUN_INVENTORY_SLOT_START
                if self.GetInventoryPageIndex() == 1:
                    selectedSlotPos += 45
                elif self.GetInventoryPageIndex() == 2:
                    selectedSlotPos += 90
            elif self.inventoryType == 5:
                selectedSlotPos += item.CICEK_INVENTORY_SLOT_START
                if self.GetInventoryPageIndex() == 1:
                    selectedSlotPos += 45
                elif self.GetInventoryPageIndex() == 2:
                    selectedSlotPos += 90
            else:
                selectedSlotPos += item.UPGRADE_ITEMS_INVENTORY_SLOT_START
                if self.GetInventoryPageIndex() == 1:
                    selectedSlotPos += 45
                elif self.GetInventoryPageIndex() == 2:
                    selectedSlotPos += 90
           
            if mouseModule.mouseController.isAttached():

                attachedSlotType = mouseModule.mouseController.GetAttachedType()
                attachedSlotPos = mouseModule.mouseController.GetAttachedSlotNumber()
                attachedItemCount = mouseModule.mouseController.GetAttachedItemCount()
                attachedItemIndex = mouseModule.mouseController.GetAttachedItemIndex()

                if player.SLOT_TYPE_SKILL_BOOK_INVENTORY == attachedSlotType or\
                    player.SLOT_TYPE_UPGRADE_ITEMS_INVENTORY == attachedSlotType or\
                    player.SLOT_TYPE_STONE_INVENTORY == attachedSlotType or\
                    player.SLOT_TYPE_BOX_INVENTORY == attachedSlotType or\
                    player.SLOT_TYPE_EFSUN_INVENTORY == attachedSlotType or\
                    player.SLOT_TYPE_CICEK_INVENTORY == attachedSlotType:
                    itemCount = player.GetItemCount(attachedSlotPos)
                    attachedCount = mouseModule.mouseController.GetAttachedItemCount()
                    self.__SendMoveItemPacket(attachedSlotPos, selectedSlotPos, attachedCount)

                    if item.IsRefineScroll(attachedItemIndex):
                        self.wndItem.SetUseMode(False)

                elif player.SLOT_TYPE_PRIVATE_SHOP == attachedSlotType:
                    mouseModule.mouseController.RunCallBack("INVENTORY")

                elif player.SLOT_TYPE_SHOP == attachedSlotType:
                    net.SendShopBuyPacket(attachedSlotPos)

                elif player.SLOT_TYPE_SAFEBOX == attachedSlotType:

                    if player.ITEM_MONEY == attachedItemIndex:
                        net.SendSafeboxWithdrawMoneyPacket(mouseModule.mouseController.GetAttachedItemCount())
                        snd.PlaySound("sound/ui/money.wav")

                    else:
                        net.SendSafeboxCheckoutPacket(attachedSlotPos, selectedSlotPos)

                elif player.SLOT_TYPE_MALL == attachedSlotType:
                    net.SendMallCheckoutPacket(attachedSlotPos, selectedSlotPos)

                mouseModule.mouseController.DeattachObject()
               
        def SelectItemSlot(self, itemSlotIndex):
            if constInfo.GET_ITEM_QUESTION_DIALOG_STATUS() == 1:
                return
               
            if self.inventoryType == 0:
                itemSlotIndex += item.SKILL_BOOK_INVENTORY_SLOT_START
                if self.GetInventoryPageIndex() == 1:
                    itemSlotIndex += 45
                elif self.GetInventoryPageIndex() == 2:
                    itemSlotIndex += 90
            elif self.inventoryType == 2:
                itemSlotIndex += item.STONE_INVENTORY_SLOT_START
                if self.GetInventoryPageIndex() == 1:
                    itemSlotIndex += 45
                elif self.GetInventoryPageIndex() == 2:
                    itemSlotIndex += 90
            elif self.inventoryType == 3:
                itemSlotIndex += item.BOX_INVENTORY_SLOT_START
                if self.GetInventoryPageIndex() == 1:
                    itemSlotIndex += 45
                elif self.GetInventoryPageIndex() == 2:
                    itemSlotIndex += 90
            elif self.inventoryType == 4:
                itemSlotIndex += item.EFSUN_INVENTORY_SLOT_START
                if self.GetInventoryPageIndex() == 1:
                    itemSlotIndex += 45
                elif self.GetInventoryPageIndex() == 2:
                    itemSlotIndex += 90
            elif self.inventoryType == 5:
                itemSlotIndex += item.CICEK_INVENTORY_SLOT_START
                if self.GetInventoryPageIndex() == 1:
                    itemSlotIndex += 45
                elif self.GetInventoryPageIndex() == 2:
                    itemSlotIndex += 90
            else:
                itemSlotIndex += item.UPGRADE_ITEMS_INVENTORY_SLOT_START
                if self.GetInventoryPageIndex() == 1:
                    itemSlotIndex += 45
                elif self.GetInventoryPageIndex() == 2:
                    itemSlotIndex += 90

            if mouseModule.mouseController.isAttached():
                attachedSlotType = mouseModule.mouseController.GetAttachedType()
                attachedSlotPos = mouseModule.mouseController.GetAttachedSlotNumber()
                attachedItemVID = mouseModule.mouseController.GetAttachedItemIndex()
                attachedItemCount = mouseModule.mouseController.GetAttachedItemCount()
               
                if player.GetItemCount(itemSlotIndex) > attachedItemCount:
                    return
           
                if player.SLOT_TYPE_SKILL_BOOK_INVENTORY == attachedSlotType or\
                    player.SLOT_TYPE_UPGRADE_ITEMS_INVENTORY == attachedSlotType or\
                    player.SLOT_TYPE_STONE_INVENTORY == attachedSlotType or\
                    player.SLOT_TYPE_BOX_INVENTORY == attachedSlotType or\
                    player.SLOT_TYPE_EFSUN_INVENTORY == attachedSlotType or\
                    player.SLOT_TYPE_CICEK_INVENTORY == attachedSlotType:
                    self.__SendMoveItemPacket(attachedSlotPos, itemSlotIndex, attachedItemCount)
       
                mouseModule.mouseController.DeattachObject()
            else:

                curCursorNum = app.GetCursor()
                #if app.SELL == curCursorNum:
                    #self.__SellItem(itemSlotIndex)
                   
                if app.BUY == curCursorNum:
                    chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.SHOP_BUY_INFO)

                elif app.IsPressed(app.DIK_LALT):
                    link = player.GetItemLink(itemSlotIndex)
                    ime.PasteString(link)

                elif app.IsPressed(app.DIK_LALT):
                    link = player.GetItemLink(itemSlotIndex)
                    ime.PasteString(link)

                elif app.IsPressed(app.DIK_LSHIFT):
                    itemCount = player.GetItemCount(itemSlotIndex)
               
                    if itemCount > 1:
                        self.dlgPickItem.SetTitleName(localeInfo.PICK_ITEM_TITLE)
                        self.dlgPickItem.SetAcceptEvent(ui.__mem_func__(self.OnPickItem))
                        self.dlgPickItem.Open(itemCount)
                        self.dlgPickItem.itemGlobalSlotIndex = itemSlotIndex

                elif app.IsPressed(app.DIK_LCONTROL):
                    itemIndex = player.GetItemIndex(itemSlotIndex)

                    if TRUE == item.CanAddToQuickSlotItem(itemIndex):
                        player.RequestAddToEmptyLocalQuickSlot(player.SLOT_TYPE_INVENTORY, itemSlotIndex)
                    else:
                        chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.QUICKSLOT_REGISTER_DISABLE_ITEM)
                else:
                    selectedItemVNum = player.GetItemIndex(itemSlotIndex)
                    itemCount = player.GetItemCount(itemSlotIndex)
                    if self.inventoryType == 0:
                        mouseModule.mouseController.AttachObject(self, player.SLOT_TYPE_SKILL_BOOK_INVENTORY, itemSlotIndex, selectedItemVNum, itemCount)
                    elif self.inventoryType == 2:
                        mouseModule.mouseController.AttachObject(self, player.SLOT_TYPE_STONE_INVENTORY, itemSlotIndex, selectedItemVNum, itemCount)
                    elif self.inventoryType == 3:
                        mouseModule.mouseController.AttachObject(self, player.SLOT_TYPE_BOX_INVENTORY, itemSlotIndex, selectedItemVNum, itemCount)
                    elif self.inventoryType == 4:
                        mouseModule.mouseController.AttachObject(self, player.SLOT_TYPE_EFSUN_INVENTORY, itemSlotIndex, selectedItemVNum, itemCount)
                    elif self.inventoryType == 5:
                        mouseModule.mouseController.AttachObject(self, player.SLOT_TYPE_CICEK_INVENTORY, itemSlotIndex, selectedItemVNum, itemCount)
                    else:
                        mouseModule.mouseController.AttachObject(self, player.SLOT_TYPE_UPGRADE_ITEMS_INVENTORY, itemSlotIndex, selectedItemVNum, itemCount)
                    self.wndItem.SetUseMode(True)

                    snd.PlaySound("sound/ui/pick.wav")

        def OnCloseQuestionDialog(self):
            if not self.questionDialog:
                return
           
            self.questionDialog.Close()
            self.questionDialog = None
            constInfo.SET_ITEM_QUESTION_DIALOG_STATUS(0)

        def Sat(self):
            if self.sellingSlotitemIndex == player.GetItemIndex(self.sellingSlotNumber):
                if self.sellingSlotitemCount == player.GetItemCount(self.sellingSlotNumber):
                    net.SendShopSellPacketNew(self.sellingSlotNumber, self.questionDialog.count, player.INVENTORY)
                    snd.PlaySound("sound/ui/money.wav")
            self.OnCloseQuestionDialog()
           
        def __OnClosePopupDialog(self):
            self.pop = None
           
        def OverOutItem(self):
            self.wndItem.SetUsableItem(False)
            if None != self.tooltipItem:
                self.tooltipItem.HideToolTip()

        def OverInItem(self, overSlotPos):
            if self.inventoryType == 0:
                overSlotPos += item.SKILL_BOOK_INVENTORY_SLOT_START
                if self.GetInventoryPageIndex() == 1:
                    overSlotPos += 45
                elif self.GetInventoryPageIndex() == 2:
                    overSlotPos += 90
            elif self.inventoryType == 2:
                overSlotPos += item.STONE_INVENTORY_SLOT_START
                if self.GetInventoryPageIndex() == 1:
                    overSlotPos += 45
                elif self.GetInventoryPageIndex() == 2:
                    overSlotPos += 90
            elif self.inventoryType == 3:
                overSlotPos += item.BOX_INVENTORY_SLOT_START
                if self.GetInventoryPageIndex() == 1:
                    overSlotPos += 45
                elif self.GetInventoryPageIndex() == 2:
                    overSlotPos += 90
            elif self.inventoryType == 4:
                overSlotPos += item.EFSUN_INVENTORY_SLOT_START
                if self.GetInventoryPageIndex() == 1:
                    overSlotPos += 45
                elif self.GetInventoryPageIndex() == 2:
                    overSlotPos += 90
            elif self.inventoryType == 5:
                overSlotPos += item.CICEK_INVENTORY_SLOT_START
                if self.GetInventoryPageIndex() == 1:
                    overSlotPos += 45
                elif self.GetInventoryPageIndex() == 2:
                    overSlotPos += 90
            else:
                overSlotPos += item.UPGRADE_ITEMS_INVENTORY_SLOT_START
                if self.GetInventoryPageIndex() == 1:
                    overSlotPos += 45
                elif self.GetInventoryPageIndex() == 2:
                    overSlotPos += 90
            self.wndItem.SetUsableItem(False)
            self.ShowToolTip(overSlotPos)
           
        def ShowToolTip(self, slotIndex):
            if None != self.tooltipItem:
                self.tooltipItem.SetInventoryItem(slotIndex)
               
        def OnPressEscapeKey(self):
            self.Close()
            return True   
           
        def UseItemSlot(self, slotIndex):
            if constInfo.GET_ITEM_QUESTION_DIALOG_STATUS():
                return
               
            if self.inventoryType == 0:
                slotIndex += item.SKILL_BOOK_INVENTORY_SLOT_START
                if self.GetInventoryPageIndex() == 1:
                    slotIndex += 45
                elif self.GetInventoryPageIndex() == 2:
                    slotIndex += 90
            elif self.inventoryType == 2:
                slotIndex += item.STONE_INVENTORY_SLOT_START
                if self.GetInventoryPageIndex() == 1:
                    slotIndex += 45
                elif self.GetInventoryPageIndex() == 2:
                    slotIndex += 90
            elif self.inventoryType == 3:
                slotIndex += item.BOX_INVENTORY_SLOT_START
                if self.GetInventoryPageIndex() == 1:
                    slotIndex += 45
                elif self.GetInventoryPageIndex() == 2:
                    slotIndex += 90
            elif self.inventoryType == 4:
                slotIndex += item.EFSUN_INVENTORY_SLOT_START
                if self.GetInventoryPageIndex() == 1:
                    slotIndex += 45
                elif self.GetInventoryPageIndex() == 2:
                    slotIndex += 90
            elif self.inventoryType == 5:
                slotIndex += item.CICEK_INVENTORY_SLOT_START
                if self.GetInventoryPageIndex() == 1:
                    slotIndex += 45
                elif self.GetInventoryPageIndex() == 2:
                    slotIndex += 90
            else:
                slotIndex += item.UPGRADE_ITEMS_INVENTORY_SLOT_START
                if self.GetInventoryPageIndex() == 1:
                    slotIndex += 45
                elif self.GetInventoryPageIndex() == 2:
                    slotIndex += 90
            self.__UseItem(slotIndex)
            mouseModule.mouseController.DeattachObject()
            self.OverOutItem()

        def __UseItem(self, slotIndex):
            ItemVNum = player.GetItemIndex(slotIndex)
            item.SelectItem(ItemVNum)

            if item.IsFlag(item.ITEM_FLAG_CONFIRM_WHEN_USE):
                self.questionDialog = uiCommon.QuestionDialog()
                self.questionDialog.SetText(localeInfo.INVENTORY_REALLY_USE_ITEM)
                self.questionDialog.SetAcceptEvent(ui.__mem_func__(self.__UseItemQuestionDialog_OnAccept))
                self.questionDialog.SetCancelEvent(ui.__mem_func__(self.__UseItemQuestionDialog_OnCancel))
                self.questionDialog.Open()
                self.questionDialog.slotIndex = slotIndex
           
                constInfo.SET_ITEM_QUESTION_DIALOG_STATUS(1)

            elif app.IsPressed(app.DIK_LSHIFT):
                if player.GetItemTypeBySlot(slotIndex) == item.ITEM_TYPE_GIFTBOX and\
                    ItemVNum != 31374 and ItemVNum != 50255 and\
                    ItemVNum != 50187 and ItemVNum != 50197 and\
                    ItemVNum != 50188 and ItemVNum != 50189 and\
                    ItemVNum != 50190 and ItemVNum != 50191 and\
                    ItemVNum != 50192 and ItemVNum != 50193 and\
                    ItemVNum != 50194 and ItemVNum != 50195:
                    if app.ENABLE_SHOW_CHEST_DROP:
                        if self.interface:
                            if self.interface.dlgChestDrop:
                                if not self.interface.dlgChestDrop.IsShow():
                                    self.interface.dlgChestDrop.Open(slotIndex)
                                    net.SendChestDropInfo(slotIndex)
            else:
                self.__SendUseItemPacket(slotIndex)
               
        def __UseItemQuestionDialog_OnCancel(self):
            self.OnCloseQuestionDialog()

        def __UseItemQuestionDialog_OnAccept(self):
            self.__SendUseItemPacket(self.questionDialog.slotIndex)
            self.OnCloseQuestionDialog()   
           
        def __SendUseItemPacket(self, slotPos):
            if uiPrivateShopBuilder.IsBuildingPrivateShop():
                chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.USE_ITEM_FAILURE_PRIVATE_SHOP)
                return

            net.SendItemUsePacket(slotPos)

        def __SendMoveItemPacket(self, srcSlotPos, dstSlotPos, srcItemCount):
            if uiPrivateShopBuilder.IsBuildingPrivateShop():
                chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.MOVE_ITEM_FAILURE_PRIVATE_SHOP)
                return

            net.SendItemMovePacket(srcSlotPos, dstSlotPos, srcItemCount)


# Arat     def SelectEmptySlot(self, selectedSlotPos): İçinde
            if player.SLOT_TYPE_INVENTORY == attachedSlotType:

# Değiş
            if player.SLOT_TYPE_INVENTORY == attachedSlotType or\
                player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == attachedSlotType or\
                player.SLOT_TYPE_SKILL_BOOK_INVENTORY == attachedSlotType or\
                player.SLOT_TYPE_UPGRADE_ITEMS_INVENTORY == attachedSlotType or\
                player.SLOT_TYPE_STONE_INVENTORY == attachedSlotType or\
                player.SLOT_TYPE_BOX_INVENTORY == attachedSlotType or\
                player.SLOT_TYPE_EFSUN_INVENTORY == attachedSlotType or\
                player.SLOT_TYPE_CICEK_INVENTORY == attachedSlotType:
                itemCount = player.GetItemCount(attachedSlotPos)
                attachedCount = mouseModule.mouseController.GetAttachedItemCount()
                self.__SendMoveItemPacket(attachedSlotPos, selectedSlotPos, attachedCount)

# Ara     def SelectItemSlot(self, itemSlotIndex): İçinde
            if player.SLOT_TYPE_INVENTORY == attachedSlotType:

#Değiş
            if player.SLOT_TYPE_INVENTORY == attachedSlotType or\
                player.SLOT_TYPE_SKILL_BOOK_INVENTORY == attachedSlotType or\
                player.SLOT_TYPE_UPGRADE_ITEMS_INVENTORY == attachedSlotType or\
                player.SLOT_TYPE_STONE_INVENTORY == attachedSlotType or\
                player.SLOT_TYPE_BOX_INVENTORY == attachedSlotType or\
                player.SLOT_TYPE_EFSUN_INVENTORY == attachedSlotType or\
                player.SLOT_TYPE_CICEK_INVENTORY == attachedSlotType:

# Ara     def OverInItem(self, overSlotPos): İçinde
            if player.SLOT_TYPE_INVENTORY == attachedItemType:

#Değiş
            if player.SLOT_TYPE_INVENTORY == attachedItemType or player.SLOT_TYPE_STONE_INVENTORY == attachedItemType or player.SLOT_TYPE_EFSUN_INVENTORY == attachedItemType:

# Ara
        if srcSlotPos == dstSlotPos:
            return False

#Değiş
        if srcSlotPos == dstSlotPos and not item.IsMetin(srcItemVNum):
            return False

#Arat
                elif self.__CanUseSrcItemToDstItem(attachedItemVNum, attachedSlotPos, overSlotPos):
                    self.wndItem.SetUsableItem(True)

# Altına Ekle
                    self.wndItem.SetUseMode(True)
 
Metin2 için sistem geliştirmeden önce oyunun ana yapısını iyi öğrenmek gerekiyor.
item.SKILL_BOOK_INVENTORY_SLOT_START bu sorduğunuz aslında integer değer tutar. Yetenek envanterinin başlangıç numarası tanımlıdır ve sabittir.

Oyunda itemlerin saklandığı her yerin bi idsi vardır. Envanter, kuşak, simya vs.
Mesajınıza eklediğiniz ilk kodları incelerseniz daha detaylı anlayabilirsiniz. Mesela yetenek kitabının 3. kutucuğunda ki itemi almak istiyorsunuz diyelim. item.SKILL_BOOK_INVENTORY_SLOT_START + 3 dediğiniz zaman serverin anlayacağı hale getiriyoruz. Çünkü envanteriniz tek vector altında tutuluyor. 1. attığınız kodda bu işlemi yapıyor. :)

Kısacası, evet okuyabilirsiniz.

Aklınıza takılan başka soru varsa sorabilirsiniz
 
Çok teşekkürler amacım şimdilik sistem geliştirmek değil, öncelikle oyun kaynak kodlarını kurcalıyorum , birkaç basit kodla da deniyorum değerli bilginizi paylaştığınız için tekrar teşekkürler.
 
Doğru yolda ilerliyorsunuz. :)
Anlayamadığınız yerler olursa sorabilirsiniz. Bilgim yettiği kadar anlatmaya çalışırım.
 
Durum
İçerik kilitlendiği için mesaj gönderimine kapatıldı.
Geri
Üst