Ask question

Ask Questions and Get Answers from Our Community

Answer

Answer Questions and Become an Expert on Your Topic

Contact Staff

Our Experts are Ready to Answer your Questions

C++ Autogiveıtem Boş Envanter Kontrolü

nyami

Yeni Üye
Katılım
20 May 2022
Mesajlar
10
Tepki
8
Puan
3
Credits
126
Points
50

AutoGiveItem Boş Envanter Kontrolü​


common/service.h:
C++:
//Ekle
#define ENABLE_AUTOGIVEITEM_CELL_CHECK                                        // AutoGiveItim Bos Envanter Kontrol
char_item.cpp:
C++:
//Arat
LPITEM CHARACTER::AutoGiveItem(DWORD dwItemVnum, BYTE bCount, int iRarePct, bool bMsg)
{
    TItemTable* p = ITEM_MANAGER::instance().GetTable(dwItemVnum);

    if (!p)
        return NULL;
    
//Altına Ekle
#ifdef ENABLE_AUTOGIVEITEM_CELL_CHECK
    LPITEM itemCheck = ITEM_MANAGER::instance().CreateItem(dwItemVnum, bCount, 0, true, -1, true);
    if (itemCheck)
    {
        int iEmptyCell = -1;
        if (p->bType == ITEM_DS)
            iEmptyCell = GetEmptyDragonSoulInventory(itemCheck);
#ifdef ENABLE_SPECIAL_STORAGE
        else if (IsUpgradeItem(dwItemVnum))
            iEmptyCell = GetEmptyUpgradeInventory(itemCheck);
        else if (IsStoneSpecial(dwItemVnum, p->bType))
            iEmptyCell = GetEmptyStoneInventory(itemCheck);
        else if (ITEM_SKILLBOOK == p->bType)
            iEmptyCell = GetEmptyBookInventory(itemCheck);
        else if (IsFlowerItem(dwItemVnum))
            iEmptyCell = GetEmptyFlowerInventory(itemCheck);
        else if (IsAttrSpecial(dwItemVnum))
            iEmptyCell = GetEmptyAttrInventory(itemCheck);
        else if (IsChestItem(dwItemVnum))
            iEmptyCell = GetEmptyChestInventory(itemCheck);
#endif
        else
            iEmptyCell = GetEmptyInventory(p->bSize);
        
        if (iEmptyCell == -1)
        {
            if (bMsg)
                ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Envanterinde yer yok autogiveitem!"));
            return NULL;
        }
    }
#endif
 

Şu anda bu konu'yu okuyan kullanıcılar

Benzer konular Forum Tarih
T R I O D I S Grafik/Models/Maps 1 54

Benzer konular

Üst