- Mesaj
- 1.072
- Çözümler
- 78
- Beğeni
- 1.286
- Puan
- 1.339
- Ticaret Puanı
- 0
//ara
std::array<BYTE,INVENTORY_AND_EQUIP_SLOT_MAX> bItemGrid;
//değiştir
std::array<WORD,INVENTORY_AND_EQUIP_SLOT_MAX> bItemGrid;
#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 =...
şimdi kontrol ettim ama orada bir sorun gözükmüyorsimya envanterindede buna benzer bir sorun vardı game source/common/length.h dosyasında typedef struct SItemPos kısmından kaynaklıydı oraya bir bak.
Can share link sistem?
I try to find same sistem…L-am rupt dintr-un fișier pe care îl aveam. sistem nepartajat.
//ara
std::array<BYTE,INVENTORY_AND_EQUIP_SLOT_MAX> bItemGrid;
//değiştir
std::array<WORD,INVENTORY_AND_EQUIP_SLOT_MAX> bItemGrid;
#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;
}