From a37fa5307c054f788a141bc2da15cb680453d052 Mon Sep 17 00:00:00 2001 From: Barbz Date: Mon, 27 Jul 2020 17:01:27 +0200 Subject: [PATCH] fix(Core/Vendors): Load npc_vendor items in the right order (#3099) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(Core/Vendors): Load npc_vendor items in the right order Before that commit, if you copied a npc_vendor, the order would not be replicated (if all items were on the same `slot`). Now it works fine and it's consistent. * Update ObjectMgr.cpp * fix(sql): ASC position in the query * Update ObjectMgr.cpp Co-authored-by: Stefano Borzì Co-authored-by: Francesco Borzì Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com> --- src/server/game/Globals/ObjectMgr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index 0e8b3f3cd..633d18804 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -8316,7 +8316,7 @@ void ObjectMgr::LoadVendors() std::set skip_vendors; - QueryResult result = WorldDatabase.Query("SELECT entry, item, maxcount, incrtime, ExtendedCost FROM npc_vendor ORDER BY entry, slot ASC"); + QueryResult result = WorldDatabase.Query("SELECT entry, item, maxcount, incrtime, ExtendedCost FROM npc_vendor ORDER BY entry, slot ASC, item, ExtendedCost"); if (!result) { sLog->outString();