fix(Core/Vendors): Load npc_vendor items in the right order (#3099)

* 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ì <stefanoborzi32@gmail.com>
Co-authored-by: Francesco Borzì <borzifrancesco@gmail.com>
Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
This commit is contained in:
Barbz
2020-07-27 17:01:27 +02:00
committed by GitHub
parent e3a81ad180
commit a37fa5307c

View File

@@ -8316,7 +8316,7 @@ void ObjectMgr::LoadVendors()
std::set<uint32> 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();