Vendor item order on Mangos 1.12 Vanilla server menu

User Tag List

Results 1 to 9 of 9
  1. #1
    Judgemend's Avatar Member
    Reputation
    1
    Join Date
    Jun 2014
    Posts
    13
    Thanks G/R
    1/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Vendor item order on Mangos 1.12 Vanilla server

    Recently I downloaded Brotalnia's Vanilla 1.12 pack and everything suits me fine except when I add items to a vendor they appear in some sort of random order even tho I write script in order, even when I add items manually in the game, after server restart there is a mess. I noticed Trinity code has 'slot' but what about Mangos?


    SOLUTION: The only way to make them in order is to add them in order the first time. If you delete 1+ items or if you delete a vendor it will be given random order after you make vendor with same "entry" and/or "id".
    Last edited by Judgemend; 05-18-2017 at 11:13 AM.

    Vendor item order on Mangos 1.12 Vanilla server
  2. #2
    Veritable's Avatar OwnedCore News Correspondent
    Reputation
    326
    Join Date
    Apr 2007
    Posts
    372
    Thanks G/R
    52/123
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Check out this function: server/ObjectMgr.cpp at master * mangosone/server * GitHub

    In particular this line: server/ObjectMgr.cpp at master * mangosone/server * GitHub

    it is the line that queries the DB. It doesn't have a ORDERBY directive in it, so you could maybe add that, recompile the server and see if that solves your issue.

  3. #3
    Judgemend's Avatar Member
    Reputation
    1
    Join Date
    Jun 2014
    Posts
    13
    Thanks G/R
    1/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Where do I put those lines? I am complete noob to server scripting.

  4. #4
    brotalnia's Avatar Elite User
    Reputation
    498
    Join Date
    Apr 2009
    Posts
    473
    Thanks G/R
    26/301
    Trade Feedback
    0 (0%)
    Mentioned
    14 Post(s)
    Tagged
    2 Thread(s)
    You would have to edit the core's source code and recompile it. If you're a noob, then it's not for you.

    Vendor items should be in the order you first added them, but if you delete an item from the list, then it starts acting weird when you add another one. I think it goes in the spot of the item you deleted, instead of being the last one. Make sure you add everything in the order you want the first time!

  5. #5
    Veritable's Avatar OwnedCore News Correspondent
    Reputation
    326
    Join Date
    Apr 2007
    Posts
    372
    Thanks G/R
    52/123
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you want to run your own server, you should be compiling from source anyway. I mean, no offense, I started doing the same thing... just running someones pre-compiled code.

    But once I figured out how the package I was using compiled, things I needed to make work. I could actually go and change certain things and re-compile at will.

    I could even fix bugs myself

  6. #6
    Judgemend's Avatar Member
    Reputation
    1
    Join Date
    Jun 2014
    Posts
    13
    Thanks G/R
    1/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by brotalnia View Post
    You would have to edit the core's source code and recompile it. If you're a noob, then it's not for you.

    Vendor items should be in the order you first added them, but if you delete an item from the list, then it starts acting weird when you add another one. I think it goes in the spot of the item you deleted, instead of being the last one. Make sure you add everything in the order you want the first time!
    Well, the thing is I add around 80 items to vendor at a time with a similar SQL script you have on your repack. And even tho the script itself is in order for some reason they appear randomly in "npc_vendor" list. If what you're saying is true then I have to add them directly in "npc_vendor" one by one which will take huge ass long time for 2k+ items.

  7. #7
    brotalnia's Avatar Elite User
    Reputation
    498
    Join Date
    Apr 2009
    Posts
    473
    Thanks G/R
    26/301
    Trade Feedback
    0 (0%)
    Mentioned
    14 Post(s)
    Tagged
    2 Thread(s)
    Are you sure you did not run your sql twice? If you first added items to the vendor, then deleted them and ran the same sql again, they will be in random order. Make sure this is the first time you are adding items to this vendor. If you **** up, you have to delete the whole mangos database, and then recreate it by importing your clean backup that was made before you tried adding anything. Now if you run your sql on the clean db, the items should be in the right order.

  8. #8
    Judgemend's Avatar Member
    Reputation
    1
    Join Date
    Jun 2014
    Posts
    13
    Thanks G/R
    1/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I very often used script to delete NPCs and and everything about them including items they sell, then running the script again to put them into database. Is there a clean back up that is stored somewhere in your repack?

  9. #9
    brotalnia's Avatar Elite User
    Reputation
    498
    Join Date
    Apr 2009
    Posts
    473
    Thanks G/R
    26/301
    Trade Feedback
    0 (0%)
    Mentioned
    14 Post(s)
    Tagged
    2 Thread(s)
    Yes there is a backup in the "sql" folder. Both of the clean db from github, and of the updated one that comes with the repack (all migrations already applied).

  10. Thanks Judgemend (1 members gave Thanks to brotalnia for this useful post)

Similar Threads

  1. [Release] Custom Vendors [Season 4 Vendor+Items]
    By Mango Jerry in forum World of Warcraft Emulator Servers
    Replies: 107
    Last Post: 07-21-2008, 01:00 AM
  2. Replies: 2
    Last Post: 05-09-2008, 03:49 PM
  3. [Share] BrewFest Pack (GObjects, templates, spawns, vendors, items, quests)
    By latruwski in forum World of Warcraft Emulator Servers
    Replies: 6
    Last Post: 04-06-2008, 02:58 AM
  4. vendor item
    By komothoes in forum World of Warcraft Emulator Servers
    Replies: 3
    Last Post: 03-24-2008, 07:29 PM
  5. Custom Items for Fun!!! (MaNGOS)
    By JoetheDruid in forum World of Warcraft Emulator Servers
    Replies: 6
    Last Post: 09-26-2007, 10:26 AM
All times are GMT -5. The time now is 03:00 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search