Add support for sorting vendor itemlists

--HG--
branch : trunk
This commit is contained in:
click committed 2010-05-01 08:10:14 +02:00
1 parent ea2d4d9536
commit 3a61667492
5 files changed
+13 -5

No files matched your search

+2 -2
View File
@@ -8252,7 +8252,7 @@ void ObjectMgr::LoadTrainerSpell()
int ObjectMgr::LoadReferenceVendor(int32 vendor, int32 item, std::set<uint32> *skip_vendors)
{
// find all items from the reference vendor
QueryResult_AutoPtr result = WorldDatabase.PQuery("SELECT item, maxcount, incrtime, ExtendedCost FROM npc_vendor WHERE entry='%d'", item);
QueryResult_AutoPtr result = WorldDatabase.PQuery("SELECT item, maxcount, incrtime, ExtendedCost FROM npc_vendor WHERE entry='%d' ORDER BY slot ASC", item);
if (!result)
{
barGoLink bar(1);
@@ -8303,7 +8303,7 @@ void ObjectMgr::LoadVendors()
std::set<uint32> skip_vendors;
QueryResult_AutoPtr result = WorldDatabase.Query("SELECT entry, item, maxcount, incrtime, ExtendedCost FROM npc_vendor");
QueryResult_AutoPtr result = WorldDatabase.Query("SELECT entry, item, maxcount, incrtime, ExtendedCost FROM npc_vendor ORDER BY entry, slot ASC");
if (!result)
{
barGoLink bar(1);