-
Posts
8 -
Joined
-
Last visited
-
Feedback
0%
Content Type
Forums
Store
Third Party - Providers Directory
Feature Plan
Release Notes
Docs
Events
Posts posted by vagabond20
-
-
Compiler : qt(mingw)
run qt tool mingw->
cd "your eternexus path"->
qmake EterNexus.pro->
mingw32-make or mingw32-make <"release","debug" ...>
Note: not testing
qt down: https://www.qt.io/developers/ or http://download.qt.io/archive/qt/
Source :
https://metin2.download/picture/Co351Sne7KEJTV3l0CcNaiB03re052vG/.png
- 48
- 3
- 2
- 4
- 2
- 1
- 7
- 1
- 35
-
Not WOM2
cmd.cpp ???
{ "channel", do_channel_switch, 0, POS_DEAD, GM_PLAYER },
subcmd ?
{ "channel", do_channel, SCMD_CHANNEL, POS_DEAD, GM_PLAYER },
-
I read the version of CBaran (The old one which he now edited away and corrected after i posted) and it didnt really make a lot of sense to me so well here is mine:If someone is able to test this great i did not because we dont need 4 inventories at WoM
bool CExchange::CheckSpace() { static CGrid s_grid1(5, INVENTORY_MAX_NUM / 5 / 4); // inven page 1 9 Rows a 5 Columns static CGrid s_grid2(5, INVENTORY_MAX_NUM / 5 / 4); // inven page 2 9 Rows a 5 Columns static CGrid s_grid3(5, INVENTORY_MAX_NUM / 5 / 4); // inven page 3 9 Rows a 5 Columns static CGrid s_grid4(5, INVENTORY_MAX_NUM / 5 / 4); // inven page 4 9 Rows a 5 Columns s_grid1.Clear(); s_grid2.Clear(); s_grid3.Clear(); s_grid4.Clear(); LPCHARACTER victim = GetCompany()->GetOwner(); LPITEM item; int i; const int perPageSlotCount = INVENTORY_MAX_NUM / 4; for (i = 0; i < INVENTORY_MAX_NUM; ++i) { if (!(item = victim->GetInventoryItem(i))) continue; BYTE itemSize = item->GetSize(); if (i < perPageSlotCount) // Notice: This is adjusted for 4 Pages only! s_grid1.Put(i, 1, itemSize); else if (i < perPageSlotCount * 2) s_grid2.Put(i - perPageSlotCount, 1, itemSize); else if (i < perPageSlotCount * 3) s_grid3.Put(i - perPageSlotCount * 2, 1, itemSize); else s_grid4.Put(i - perPageSlotCount * 3, 1, itemSize); } static std::vector <WORD> s_vDSGrid(DRAGON_SOUL_INVENTORY_MAX_NUM); bool bDSInitialized = false; for (i = 0; i < EXCHANGE_ITEM_MAX_NUM; ++i) { if (!(item = m_apItems[i])) continue; BYTE itemSize = item->GetSize(); if (item->IsDragonSoul()) { if (!victim->DragonSoul_IsQualified()) return false; if (!bDSInitialized) { bDSInitialized = true; victim->CopyDragonSoulItemGrid(s_vDSGrid); } bool bExistEmptySpace = false; WORD wBasePos = DSManager::instance().GetBasePosition(item); if (wBasePos >= DRAGON_SOUL_INVENTORY_MAX_NUM) return false; for (int i = 0; i < DRAGON_SOUL_BOX_SIZE; i++) { WORD wPos = wBasePos + i; if (0 == s_vDSGrid[wBasePos]) { bool bEmpty = true; for (int j = 1; j < item->GetSize(); j++) { if (s_vDSGrid[wPos + j * DRAGON_SOUL_BOX_COLUMN_NUM]) { bEmpty = false; break; } } if (bEmpty) { for (int j = 0; j < item->GetSize(); j++) { s_vDSGrid[wPos + j * DRAGON_SOUL_BOX_COLUMN_NUM] = wPos + 1; } bExistEmptySpace = true; break; } } if (bExistEmptySpace) break; } if (!bExistEmptySpace) return false; } else { int iPos = s_grid1.FindBlank(1, itemSize); if (iPos >= 0) { s_grid1.Put(iPos, 1, itemSize); continue; } iPos = s_grid2.FindBlank(1, itemSize); if (iPos >= 0) { s_grid2.Put(iPos, 1, itemSize); continue; } iPos = s_grid3.FindBlank(1, itemSize); if (iPos >= 0) { s_grid3.Put(iPos, 1, itemSize); continue; } iPos = s_grid4.FindBlank(1, itemSize); if (iPos >= 0) { s_grid4.Put(iPos, 1, itemSize); continue; } return false; // No space left in inventory } } return true; }
PS: If there are any errors please report them asap because i have no way to test this.
Kind regards
MartPwnS
bool CExchange::CheckSpace() // vagabond20 4 env. { static CGrid s_grid1(5, INVENTORY_MAX_NUM/5 / 4); // inven page 1 static CGrid s_grid2(5, INVENTORY_MAX_NUM/5 / 4); // inven page 2 static CGrid s_grid3(5, INVENTORY_MAX_NUM/5 / 4); // inven page 3 static CGrid s_grid4(5, INVENTORY_MAX_NUM/5 / 4); // inven page 4 s_grid1.Clear(); s_grid2.Clear(); s_grid3.Clear(); s_grid4.Clear(); LPCHARACTER victim = GetCompany()->GetOwner(); LPITEM item; int i; for (i = 0; i < INVENTORY_MAX_NUM / 4; ++i) { if (!(item = victim->GetInventoryItem(i))) continue; s_grid1.Put(i, 1, item->GetSize()); } for (i = INVENTORY_MAX_NUM / 4; i < INVENTORY_MAX_NUM / 2; ++i) { if (!(item = victim->GetInventoryItem(i))) continue; s_grid2.Put(i - INVENTORY_MAX_NUM / 4, 1, item->GetSize()); } for (i = INVENTORY_MAX_NUM / 2; i < (INVENTORY_MAX_NUM / 4) * 3; ++i) { if (!(item = victim->GetInventoryItem(i))) continue; s_grid3.Put(i - INVENTORY_MAX_NUM / 2, 1, item->GetSize()); } for (i = (INVENTORY_MAX_NUM / 4) * 3; i < INVENTORY_MAX_NUM; ++i) { if (!(item = victim->GetInventoryItem(i))) continue; s_grid4.Put(i - (INVENTORY_MAX_NUM / 4) * 3, 1, item->GetSize()); } // ¾Æ... ¹º°¡ °³º´½Å °°Áö¸¸... ¿ëÈ¥¼® Àκ¥À» ³ë¸Ö Àκ¥ º¸°í µû¶ó ¸¸µç ³» À߸øÀÌ´Ù ¤Ğ¤Ğ static std::vector <WORD> s_vDSGrid(DRAGON_SOUL_INVENTORY_MAX_NUM); // ÀÏ´Ü ¿ëÈ¥¼®À» ±³È¯ÇÏÁö ¾ÊÀ» °¡´É¼ºÀÌ Å©¹Ç·Î, ¿ëÈ¥¼® Àκ¥ º¹»ç´Â ¿ëÈ¥¼®ÀÌ ÀÖÀ» ¶§ Çϵµ·Ï ÇÑ´Ù. bool bDSInitialized = false; for (i = 0; i < EXCHANGE_ITEM_MAX_NUM; ++i) { if (!(item = m_apItems[i])) continue; if (item->IsDragonSoul()) { if (!victim->DragonSoul_IsQualified()) { return false; } if (!bDSInitialized) { bDSInitialized = true; victim->CopyDragonSoulItemGrid(s_vDSGrid); } bool bExistEmptySpace = false; WORD wBasePos = DSManager::instance().GetBasePosition(item); if (wBasePos >= DRAGON_SOUL_INVENTORY_MAX_NUM) return false; for (int i = 0; i < DRAGON_SOUL_BOX_SIZE; i++) { WORD wPos = wBasePos + i; if (0 == s_vDSGrid[wBasePos]) { bool bEmpty = true; for (int j = 1; j < item->GetSize(); j++) { if (s_vDSGrid[wPos + j * DRAGON_SOUL_BOX_COLUMN_NUM]) { bEmpty = false; break; } } if (bEmpty) { for (int j = 0; j < item->GetSize(); j++) { s_vDSGrid[wPos + j * DRAGON_SOUL_BOX_COLUMN_NUM] = wPos + 1; } bExistEmptySpace = true; break; } } if (bExistEmptySpace) break; } if (!bExistEmptySpace) return false; } else { int iPos = s_grid1.FindBlank(1, item->GetSize()); if (iPos >= 0) { s_grid1.Put(iPos, 1, item->GetSize()); } else { iPos = s_grid2.FindBlank(1, item->GetSize()); if (iPos >= 0) { s_grid2.Put(iPos, 1, item->GetSize()); } else { iPos = s_grid3.FindBlank(1, item->GetSize()); if (iPos >= 0) { s_grid3.Put(iPos, 1, item->GetSize()); } else { iPos = s_grid4.FindBlank(1, item->GetSize()); if (iPos >= 0) { s_grid4.Put(iPos, 1, item->GetSize()); } else { return false; } } } } } } return true; }
- 1
-
db/src/ClientManager open;
Code Search:
"SELECT id, window+0, pos, count, vnum, socket0, socket1, socket2 "
Code Replace:
"SELECT id, window+0, pos, count, vnum, socket0, socket1, socket2, socket3, socket4, socket5 "
launcher source/gamelib/itemdata.h search
ITEM_SOCKET_SLOT_MAX_NUM = 3,and replaceITEM_SOCKET_SLOT_MAX_NUM = 6,UserInterfaceGameType.h
-
Thanks bro.
- 1
-
Thanks bro. useful
-
Thanks bro.
EterNexus Src
in Tools & Programs
Posted
Thanks bro
I did not actually try. Can be useful for developers...