Ayyıldız2 | 2008 TR Yapısı • 1-99 Orta Emek Destan • Oto Avsız • 10 Temmuz 21:00 HEMEN TIKLA!
Yanıyoruz gene![]()
Teşkrlr.
Simya envanteri slot genişletilmesidir. ticarette simya alışverişinizde sıkıntı yaşanmamasını sağlayan kodlar.
Char_item.cpp arat
Kod:bool CHARACTER::IsEmptyItemGrid(TItemPos Cell, BYTE bSize, int iExceptionCell) const
Kod bloğu altına ekle
Kod:bool CHARACTER::IsEmptyItemGridSpecial(const TItemPos &Cell, BYTE bSize, int iExceptionCell, std::vector<WORD>& vec) const { if (std::find(vec.begin(), vec.end(), Cell.cell) != vec.end()) { return false; } switch (Cell.window_type) { case INVENTORY: { WORD bCell = (WORD)Cell.cell; // bItemCellÀº 0ÀÌ falseÀÓÀ» ³ªÅ¸³»±â À§ÇØ + 1 ÇØ¼ ó¸®ÇÑ´Ù. // µû¶ó¼ iExceptionCell¿¡ 1À» ´õÇØ ºñ±³ÇÑ´Ù. ++iExceptionCell; 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; } else if (bCell >= INVENTORY_MAX_NUM) return false; if (m_pointsInstant.bItemGrid[bCell]) { if (m_pointsInstant.bItemGrid[bCell] == iExceptionCell) { if (bSize == 1) return true; int j = 1; WORD bPage = bCell / (45); do { WORD p = bCell + (5 * j); if (p >= INVENTORY_MAX_NUM) return false; if (p / (45) != bPage) return false; if (m_pointsInstant.bItemGrid[p]) if (m_pointsInstant.bItemGrid[p] != iExceptionCell) return false; } while (++j < bSize); return true; } else return false; } // Å©±â°¡ 1À̸é ÇÑÄÀ» Â÷ÁöÇÏ´Â °ÍÀ̹ǷΠ±×³É ¸®ÅÏ if (1 == bSize) return true; else { int j = 1; WORD bPage = bCell / (45); do { WORD p = bCell + (5 * j); if (p >= INVENTORY_MAX_NUM) return false; if (p / (45) != bPage) return false; if (m_pointsInstant.bItemGrid[p]) if (m_pointsInstant.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; // bItemCellÀº 0ÀÌ falseÀÓÀ» ³ªÅ¸³»±â À§ÇØ + 1 ÇØ¼ ó¸®ÇÑ´Ù. // µû¶ó¼ iExceptionCell¿¡ 1À» ´õÇØ ºñ±³ÇÑ´Ù. iExceptionCell++; if (m_pointsInstant.wDSItemGrid[wCell]) { if (m_pointsInstant.wDSItemGrid[wCell] == iExceptionCell) { if (bSize == 1) return true; int j = 1; do { WORD p = wCell + (DRAGON_SOUL_BOX_COLUMN_NUM * j); if (p >= DRAGON_SOUL_INVENTORY_MAX_NUM) return false; if (m_pointsInstant.wDSItemGrid[p]) if (m_pointsInstant.wDSItemGrid[p] != iExceptionCell) return false; } while (++j < bSize); return true; } else return false; } // Å©±â°¡ 1À̸é ÇÑÄÀ» Â÷ÁöÇÏ´Â °ÍÀ̹ǷΠ±×³É ¸®ÅÏ if (1 == bSize) return true; else { int j = 1; do { WORD p = wCell + (DRAGON_SOUL_BOX_COLUMN_NUM * j); if (p >= DRAGON_SOUL_INVENTORY_MAX_NUM) return false; if (m_pointsInstant.bItemGrid[p]) if (m_pointsInstant.wDSItemGrid[p] != iExceptionCell) return false; } while (++j < bSize); return true; } } break; } return false; }
aynı cppde arat
Kod:int CHARACTER::GetEmptyInventory(BYTE size) const
kod bloğu altına ekle
Kod:int CHARACTER::GetEmptyDragonSoulInventoryWithExceptions(LPITEM pItem, std::vector<WORD>& vec /*= -1*/) 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 (IsEmptyItemGridSpecial(TItemPos(DRAGON_SOUL_INVENTORY, i + wBaseCell), bSize, -1, vec)) return i + wBaseCell; return -1; }
char.h aç ve arat
Kod:void CopyDragonSoulItemGrid(std::vector<WORD>& vDragonSoulItemGrid) const;
altına ekle
Kod:int GetEmptyDragonSoulInventoryWithExceptions(LPITEM pItem, std::vector<WORD>& vec /*= -1*/) const;
arat
Kod:bool IsEmptyItemGrid(TItemPos Cell, BYTE size, int iExceptionCell = -1) const;
altına ekle
Kod:IsEmptyItemGridSpecial(const TItemPos &Cell, BYTE bSize, int iExceptionCell, std::vector<WORD>& vec) const;
exchange.cpp aç ve arat
Kod:bool CExchange::CheckSpace() {
altına ekle
Kod:LPCHARACTER me = GetOwner();
arat
Kod:static std::vector <WORD> s_vDSGrid(DRAGON_SOUL_INVENTORY_MAX_NUM);
elseye kadar değiştir
Kod:static std::vector <WORD> s_vDSGrid(DRAGON_SOUL_INVENTORY_MAX_NUM); std::vector<WORD> exceptDSCells; exceptDSCells.clear(); for (i = 0; i < EXCHANGE_ITEM_MAX_NUM; ++i) { if (!((item = GetCompany()->GetItemByPosition(i)))) continue; BYTE itemSize = item->GetSize(); if (item->IsDragonSoul()) { WORD foundCell = me->GetEmptyDragonSoulInventoryWithExceptions(item, exceptDSCells); if (foundCell != -1) { exceptDSCells.push_back(foundCell); continue; } return false;
exchange.h aç ve arat
Kod:bool GetAcceptStatus() { return m_bAccept; }
altına ekle
Kod:CItem * GetItemByPosition(int i) const { return m_apItems[i]; }
Paylaşım için teşekkürler.
Şu an konuyu görüntüleyenler (Toplam : 0, Üye: 0, Misafir: 0)
Benzer konular
- Cevaplar
- 11
- Görüntüleme
- 797
- Cevaplar
- 15
- Görüntüleme
- 774
- Cevaplar
- 9
- Görüntüleme
- 490
- Cevaplar
- 2
- Görüntüleme
- 350
- Cevaplar
- 20
- Görüntüleme
- 860