Finnael 478 Posted October 30, 2020 Share Posted October 30, 2020 M2 Download Center This is the hidden content, please Sign In or Sign Up ( Internal ) A very fast item split system written by me. A very optimized one. Instead of sending hundered of packets it only sends maybe a dozen max. It is searching algorithm is also better than most split systems. It can do backward searching. This is the hidden content, please Sign In or Sign Up 91 1 1 1 17 1 30 Link to comment Share on other sites More sharing options...
Honorable Member Mali 41765 Posted November 1, 2020 Honorable Member Share Posted November 1, 2020 (edited) I don't understand, why are you sending game to client packets? and this is not optimized, vec is copying object every time Edited August 25, 2022 by Metin2 Dev Core X - External 2 Internal 3 Link to comment Share on other sites More sharing options...
HITRON 694 Posted November 1, 2020 Share Posted November 1, 2020 (edited) if (iSlot >= 0 && iSlot <= INVENTORY_MAX_NUM && bCount >= 0 && bCount <= g_bItemCountLimit) { LPITEM item = ch->GetInventoryItem(iSlot); if (item) { BYTE bItemCount = item->GetCount(); TItemPos ItemCell; ItemCell.window_type = INVENTORY; ItemCell.cell = item->GetCell(); for (int i = 0; i < (bItemCount / bCount) - 1; ++i) { int iEmptySlot = ch->GetEmptyInventory(item->GetSize()); TItemPos DestItemCell; DestItemCell.window_type = INVENTORY; DestItemCell.cell = iEmptySlot; ch->MoveItem(ItemCell, DestItemCell, bCount); } } } With command that using args - (Item Slot & Split Count) I don't know why you copy the Item, but items that can be Split have no Sockets & Bonus random so the copy seems useless (Is just a move from the count of the item). Edited November 1, 2020 by HITRON Link to comment Share on other sites More sharing options...
Endymion 319 Posted November 1, 2020 Share Posted November 1, 2020 56 minutes ago, HITRON said: bCount >= 0 56 minutes ago, HITRON said: bItemCount / bCount 1 Link to comment Share on other sites More sharing options...
Management AZICKO 7330 Posted November 1, 2020 Management Share Posted November 1, 2020 (edited) Good Idea! Awesome! Edited August 25, 2022 by Metin2 Dev Core X - External 2 Internal 1 Scamming ? Reselling ? metin2.download | metin2.dev | fr.metin2.dev | metin2dev.org | metin2.top | top-metin2.org Link to comment Share on other sites More sharing options...
Finnael 478 Posted November 3, 2020 Author Share Posted November 3, 2020 On 11/1/2020 at 7:15 PM, HITRON said: if (iSlot >= 0 && iSlot <= INVENTORY_MAX_NUM && bCount >= 0 && bCount <= g_bItemCountLimit) { LPITEM item = ch->GetInventoryItem(iSlot); if (item) { BYTE bItemCount = item->GetCount(); TItemPos ItemCell; ItemCell.window_type = INVENTORY; ItemCell.cell = item->GetCell(); for (int i = 0; i < (bItemCount / bCount) - 1; ++i) { int iEmptySlot = ch->GetEmptyInventory(item->GetSize()); TItemPos DestItemCell; DestItemCell.window_type = INVENTORY; DestItemCell.cell = iEmptySlot; ch->MoveItem(ItemCell, DestItemCell, bCount); } } } With command that using args - (Item Slot & Split Count) I don't know why you copy the Item, but items that can be Split have no Sockets & Bonus random so the copy seems useless (Is just a move from the count of the item). Is this your split function? If it is I'd like to see a video of you trying to split all the items by 1 in a completly empty inventory. And yours doesn't do backward searching. Yeah maybe you can further optimize it without copying the socket and attributes, I haven't tried it tbh. Link to comment Share on other sites More sharing options...
Kafa 153 Posted November 3, 2020 Share Posted November 3, 2020 I have implemented it, but doesnt work and no syserr too Link to comment Share on other sites More sharing options...
Finnael 478 Posted November 5, 2020 Author Share Posted November 5, 2020 On 11/3/2020 at 11:21 PM, Kafa said: I have implemented it, but doesnt work and no syserr too Updated the files, try implementing again. (Forgot to include some files sorry) 1 Link to comment Share on other sites More sharing options...
ProjectOW2 2 Posted November 6, 2020 Share Posted November 6, 2020 (edited) hi. i have problem with complie game. someone could help please? https://metin2.download/picture/8TB5ij40DnUxDM1nL4521vmy4O24Yv1t/.png Edited September 11, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Recommended Posts