thespeedy 20 Posted October 13, 2015 Share Posted October 13, 2015 (edited) I cant sort the Ex Shop.txt... he sort from item value and this is false Edited August 20, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Aerrow 41 Posted October 14, 2015 Share Posted October 14, 2015 It's an interesting "bug". Sort like this: 1 10 1 1 10 20 1 1 11 30 1 1 12 40 1 1 13 50 1 1 14 60 1 1 2 80 1 1 3 90 1 1 4 100 1 1 5 110 1 1 6 120 1 1 7 130 1 1 8 140 1 1 9 150 1 1 I hope someone knows how to "fix" it.. Link to comment Share on other sites More sharing options...
thespeedy 20 Posted October 14, 2015 Author Share Posted October 14, 2015 (edited) you have skype and help me for sorting? pn me Can you explain how did you get on 10/11/12/13/14? Edited October 14, 2015 by thespeedy Skype ID removed (Read Board Rules) Link to comment Share on other sites More sharing options...
Honorable Member xP3NG3Rx 19783 Posted October 14, 2015 Honorable Member Share Posted October 14, 2015 You can sort the items by those names in Ascending or Descending, I did some (C&P)changes, but I did not test yet, so I do not know it works or not.shop_manager.cpp New function for sorting: bool CompareShopItemPos(const SShopItemTable& lhs, const SShopItemTable& rhs) { return (lhs.display_pos < rhs.display_pos); } Extended sorting statement: std::string stSort; if (!pNode->GetValue("sort", 0, stSort)) { stSort = "None"; } if (boost::iequals(stSort, "Asc")) { std::sort(shopItems.begin(), shopItems.end(), CompareShopItemName); } else if(boost::iequals(stSort, "Desc")) { std::sort(shopItems.rbegin(), shopItems.rend(), CompareShopItemName); } else if (boost::iequals(stSort, "Pos")) { std::sort(shopItems.begin(), shopItems.end(), CompareShopItemPos); } Group B02 { Vnum 51 Name Costumes CoinType SecondaryCoin Sort Pos Group Items { #--# Vnum Count Price 1 41003 1 50 2 41004 1 50 3 45003 1 30 4 45004 1 30 } } 1 Link to comment Share on other sites More sharing options...
Aerrow 41 Posted October 16, 2015 Share Posted October 16, 2015 I think it would be better, if the serial number exactly follow, and not so: 1 10 1 1 10 20 1 1 11 30 1 1 12 40 1 1 13 50 1 1 14 60 1 1 15 70 1 1 16 80 1 1 17 90 1 1 18 100 1 1 19 110 1 1 2 120 1 1 20 130 1 1 21 140 1 1 22 150 1 1 3 160 1 1 30 170 1 1 31 180 1 1 32 190 1 1 4 200 1 1 5 210 1 1 6 220 1 1 7 230 1 1 8 240 1 1 9 250 1 1 But so: 1 10 1 1 2 120 1 1 3 160 1 1 4 200 1 1 5 210 1 1 6 220 1 1 7 230 1 1 8 240 1 1 9 250 1 1 10 20 1 1 11 30 1 1 12 40 1 1 13 50 1 1 14 60 1 1 15 70 1 1 16 80 1 1 17 90 1 1 18 100 1 1 19 110 1 1 20 130 1 1 21 140 1 1 22 150 1 1 30 170 1 1 31 180 1 1 32 190 1 1 This can be done? Link to comment Share on other sites More sharing options...
Aerrow 41 Posted June 8, 2020 Share Posted June 8, 2020 Any update on this topic? No one still not know how to solve this? I'm currently trying to fix that with not much luck. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now