aboutsummaryrefslogtreecommitdiff
path: root/src/game/ObjectMgr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/ObjectMgr.cpp')
-rw-r--r--src/game/ObjectMgr.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp
index 0ce50659fb1..cffb81253a3 100644
--- a/src/game/ObjectMgr.cpp
+++ b/src/game/ObjectMgr.cpp
@@ -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 entry, 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'", item);
if (!result)
{
barGoLink bar(1);
@@ -8269,17 +8269,16 @@ int ObjectMgr::LoadReferenceVendor(int32 vendor, int32 item, std::set<uint32> *s
bar.step();
Field* fields = result->Fetch();
- uint32 entry = fields[0].GetUInt32();
- int32 item_id = fields[1].GetInt32();
+ int32 item_id = fields[0].GetInt32();
// if item is a negative, its a reference
if (item_id < 0)
count += LoadReferenceVendor(vendor, -item_id, skip_vendors);
else
{
- int32 maxcount = fields[2].GetInt32();
- uint32 incrtime = fields[3].GetUInt32();
- uint32 ExtendedCost = fields[4].GetUInt32();
+ int32 maxcount = fields[1].GetInt32();
+ uint32 incrtime = fields[2].GetUInt32();
+ uint32 ExtendedCost = fields[3].GetUInt32();
if (!IsVendorItemValid(vendor,item_id,maxcount,incrtime,ExtendedCost,NULL,skip_vendors))
continue;