Hi,
I use mangos since 3 years now, and I always noticed that vendors have the items sorted randomly.
So, what does it mean ?
On off, you can see ie for a poison vendor: Mortal poison, Mortal poison II, Mortal poison III, Mortal poison IV ... etc. All sorted.
In mangos ... =D We have not "Order by" in the sql request, so we can see Mortal poison II, Instant poison IV, Mortal poison IX ... etc. (this is an exemple, i don't remember how it is with UDB )
So i made this patch which allow custom order in vendors lists.
This is not really "usefull" but i am always bored about search a specific poison, or other item (ie emblems of conquest, item sets must be at the end of the list) in those lists, and i think ordored ones could be fine.
Tested on my local server, you can choose order while adding items, or with a new command : .npc moveitem <itemid/link> [<int>] (if not given, sortOrder = 0)
(slot 0 is first and default slot)
Here is the updated patch without nester query (need test) : [DOWNLOAD LINK][PASTEBIN LINK]
Apply this to your database if you want to have correct text when using command:
INSERT INTO `mangos_string` (`entry`, `content_default`, `content_loc1`, `content_loc2`, `content_loc3`, `content_loc4`, `content_loc5`, `content_loc6`, `content_loc7`, `content_loc8`) VALUES
(10000, 'Item ''%i'' ''%s'' moved in vendor list to place %i', NULL, 'Equipement ''%i'' ''%s'' déplacé dans la liste du vendeur à la place %i.', NULL, NULL, NULL, NULL, NULL, NULL);
And this ... if you want this patch to work =D
ALTER TABLE `npc_vendor` ADD `sortOrder` TINYINT( 3 ) UNSIGNED NOT NULL DEFAULT '0';