Çözüldü Ek envanter slot sorunu

  • Konuyu açan Konuyu açan enes turan
  • Açılış Tarihi Açılış Tarihi
  • Yanıt Yanıt 8
  • Gösterim Gösterim 98
Bu konu çözüme ulaştırılmıştır. Çözüm için konuya yazılan tüm yorumları okumayı unutmayın. Eğer konudaki yorumlar sorununuzu çözmediyse yeni bir konu açabilirsiniz.
Durum
İçerik kilitlendiği için mesaj gönderimine kapatıldı.

enes turan

Premium Üye
Premium Üye
Yardımsever Üye
Usta Üye
Mesaj
1.072
Çözümler
78
Beğeni
1.286
Puan
1.339
Ticaret Puanı
0
merhabalar epeydir üzerinde ugraştığım fakat bir türlü çözüm bulamadığım bir sorun fikri olan varmı ?

Sadece yükseltme ve taş envanterinde böyle bir sorun mevcut

 

Dosya Eklentileri

Son düzenleme:
Çözüm
aynı sorunu yaşayan olursa çözüm

char.h:
Genişlet Daralt Kopyala
//ara
std::array<BYTE,INVENTORY_AND_EQUIP_SLOT_MAX> bItemGrid;
//değiştir
std::array<WORD,INVENTORY_AND_EQUIP_SLOT_MAX> bItemGrid;


bu bloğuda buna göre düzenlersiniz
char_item.cpp:
Genişlet Daralt Kopyala
#ifdef ENABLE_ADDITIONAL_EQUIPMENT_PAGE
bool CHARACTER::IsEmptyItemGrid(TItemPos Cell, BYTE bSize, int iExceptionCell)
#else
bool CHARACTER::IsEmptyItemGrid(TItemPos Cell, BYTE bSize, int iExceptionCell) const
#endif
{
    if (!m_PlayerSlots)
        return false;

    switch (Cell.window_type)
    {
    case INVENTORY:
        {
            WORD bCell = Cell.cell;

            ++iExceptionCell;

            if (Cell.IsBeltInventoryPosition())
            {
#ifdef ENABLE_ADDITIONAL_EQUIPMENT_PAGE
                LPITEM beltItem =...
simya envanterindede buna benzer bir sorun vardı game source/common/length.h dosyasında typedef struct SItemPos kısmından kaynaklıydı oraya bir bak.
 
abi bu sorunla daha once bende karsılastım thınborad alakalı genel olarak yada max value lımıtı yukseltmen gerekıcek pazar sıstemı gıbı dusunsen onun mantıgıda o sekılde ılerlıyor
 
aynı sorunu yaşayan olursa çözüm

char.h:
Genişlet Daralt Kopyala
//ara
std::array<BYTE,INVENTORY_AND_EQUIP_SLOT_MAX> bItemGrid;
//değiştir
std::array<WORD,INVENTORY_AND_EQUIP_SLOT_MAX> bItemGrid;


bu bloğuda buna göre düzenlersiniz
char_item.cpp:
Genişlet Daralt Kopyala
#ifdef ENABLE_ADDITIONAL_EQUIPMENT_PAGE
bool CHARACTER::IsEmptyItemGrid(TItemPos Cell, BYTE bSize, int iExceptionCell)
#else
bool CHARACTER::IsEmptyItemGrid(TItemPos Cell, BYTE bSize, int iExceptionCell) const
#endif
{
    if (!m_PlayerSlots)
        return false;

    switch (Cell.window_type)
    {
    case INVENTORY:
        {
            WORD bCell = Cell.cell;

            ++iExceptionCell;

            if (Cell.IsBeltInventoryPosition())
            {
#ifdef ENABLE_ADDITIONAL_EQUIPMENT_PAGE
                LPITEM beltItem = GetEquipWear(WEAR_BELT);
#else
                LPITEM beltItem = GetWear(WEAR_BELT);
#endif

                if (NULL == beltItem)
                    return false;

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

                if (m_PlayerSlots->bItemGrid[bCell])
                {
                    if (m_PlayerSlots->bItemGrid[bCell] == iExceptionCell)
                        return true;

                    return false;
                }

                if (bSize == 1)
                    return true;
            }

#if defined(__SPECIAL_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_PlayerSlots->bItemGrid[bCell] == iExceptionCell)
                {
                    if (bSize == 1)
                        return true;

                    int j = 1;
                    BYTE bPage = bCell / (SPECIAL_INVENTORY_MAX_NUM / SPECIAL_INVENTORY_PAGE_COUNT);

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

                        if (p >= SPECIAL_INVENTORY_MAX_NUM)
                            return false;

                        if (p / (SPECIAL_INVENTORY_MAX_NUM / SPECIAL_INVENTORY_PAGE_COUNT) != bPage)
                            return false;

                        if (m_PlayerSlots->bItemGrid[p])
                            if (m_PlayerSlots->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_PlayerSlots->bItemGrid[bCell] == iExceptionCell)
                {
                    if (bSize == 1)
                        return true;

                    int j = 1;
                    BYTE bPage = bCell / (SPECIAL_INVENTORY_MAX_NUM / SPECIAL_INVENTORY_PAGE_COUNT);

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

                        if (p >= SPECIAL_INVENTORY_MAX_NUM)
                            return false;

                        if (p / (SPECIAL_INVENTORY_MAX_NUM / SPECIAL_INVENTORY_PAGE_COUNT) != bPage)
                            return false;

                        if (m_PlayerSlots->bItemGrid[p])
                            if (m_PlayerSlots->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_PlayerSlots->bItemGrid[bCell] == iExceptionCell)
                {
                    if (bSize == 1)
                        return true;

                    int j = 1;
                    BYTE bPage = bCell / (SPECIAL_INVENTORY_MAX_NUM / SPECIAL_INVENTORY_PAGE_COUNT);

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

                        if (p >= SPECIAL_INVENTORY_MAX_NUM)
                            return false;

                        if (p / (SPECIAL_INVENTORY_MAX_NUM / SPECIAL_INVENTORY_PAGE_COUNT) != bPage)
                            return false;

                        if (m_PlayerSlots->bItemGrid[p])
                            if (m_PlayerSlots->bItemGrid[p] != iExceptionCell)
                                return false;
                    } while (++j < bSize);

                    return true;
                }
            }
            else if (Cell.IsGiftBoxInventoryPosition())
            {
                if (bCell < GIFT_BOX_INVENTORY_SLOT_START)
                    return false;

                if (bCell > GIFT_BOX_INVENTORY_SLOT_END)
                    return false;

                if (m_PlayerSlots->bItemGrid[bCell] == iExceptionCell)
                {
                    if (bSize == 1)
                        return true;

                    int j = 1;
                    BYTE bPage = bCell / (SPECIAL_INVENTORY_MAX_NUM / SPECIAL_INVENTORY_PAGE_COUNT);

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

                        if (p >= SPECIAL_INVENTORY_MAX_NUM)
                            return false;

                        if (p / (SPECIAL_INVENTORY_MAX_NUM / SPECIAL_INVENTORY_PAGE_COUNT) != bPage)
                            return false;

                        if (m_PlayerSlots->bItemGrid[p])
                            if (m_PlayerSlots->bItemGrid[p] != iExceptionCell)
                                return false;
                    } while (++j < bSize);

                    return true;
                }
            }
#endif

            else if (bCell >= INVENTORY_MAX_NUM)
                return false;

            if (m_PlayerSlots->bItemGrid[bCell])
            {
                if (m_PlayerSlots->bItemGrid[bCell] == iExceptionCell)
                {
                    if (bSize == 1)
                        return true;

                    int j = 1;
                    BYTE bPage = bCell / (INVENTORY_MAX_NUM / INVENTORY_PAGE_COUNT);

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

                        if (p >= INVENTORY_MAX_NUM)
                            return false;

                        if (p / (INVENTORY_MAX_NUM / INVENTORY_PAGE_COUNT) != bPage)
                            return false;

                        if (m_PlayerSlots->bItemGrid[p])
                            if (m_PlayerSlots->bItemGrid[p] != iExceptionCell)
                                return false;
                    }
                    while (++j < bSize);

                    return true;
                }
                else
                    return false;
            }

            if (1 == bSize)
                return true;
            else
            {
                int j = 1;
                BYTE bPage = bCell / (INVENTORY_MAX_NUM / INVENTORY_PAGE_COUNT);

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

                    if (p >= INVENTORY_MAX_NUM)
                        return false;

                    if (p / (INVENTORY_MAX_NUM / INVENTORY_PAGE_COUNT) != bPage)
                        return false;

                    if (m_PlayerSlots->bItemGrid[p])
                        if (m_PlayerSlots->bItemGrid[p] != iExceptionCell)
                            return false;
                }
                while (++j < bSize);

                return true;
            }
        }
        break;
    case DRAGON_SOUL_INVENTORY:
        {
            WORD wCell = Cell.cell;
            if (wCell >= DRAGON_SOUL_INVENTORY_MAX_NUM)
                return false;

            iExceptionCell++;

            if (m_PlayerSlots->wDSItemGrid[wCell])
            {
                if (m_PlayerSlots->wDSItemGrid[wCell] == iExceptionCell)
                {
                    if (bSize == 1)
                        return true;

                    int j = 1;

                    do
                    {
                        int p = wCell + (DRAGON_SOUL_BOX_COLUMN_NUM * j);

                        if (p >= DRAGON_SOUL_INVENTORY_MAX_NUM)
                            return false;

                        if (m_PlayerSlots->wDSItemGrid[p])
                            if (m_PlayerSlots->wDSItemGrid[p] != iExceptionCell)
                                return false;
                    }
                    while (++j < bSize);

                    return true;
                }
                else
                    return false;
            }

            if (1 == bSize)
                return true;
            else
            {
                int j = 1;

                do
                {
                    int p = wCell + (DRAGON_SOUL_BOX_COLUMN_NUM * j);

                    if (p >= DRAGON_SOUL_INVENTORY_MAX_NUM)
                        return false;

                    if (m_PlayerSlots->wDSItemGrid[p]) // @fixme159 (from bItemGrid)
                        if (m_PlayerSlots->wDSItemGrid[p] != iExceptionCell)
                            return false;
                }
                while (++j < bSize);

                return true;
            }
        }
    break;
    }
    return false;
}
 
Son düzenleme:
Çözüm
Durum
İçerik kilitlendiği için mesaj gönderimine kapatıldı.
Geri
Üst