diff options
author | megamage <none@none> | 2008-12-28 12:10:31 -0600 |
---|---|---|
committer | megamage <none@none> | 2008-12-28 12:10:31 -0600 |
commit | e2ee47fb355c3ff59c54cd1bd3f2c8b329c8a108 (patch) | |
tree | 806cf365e082008f8b2a22c37f2076d4de7c0006 /src/game/ObjectMgr.cpp | |
parent | 3bbf8d6be8cd67d99fc8c1df3a971fe4e7e680ef (diff) |
*Update to Mangos 6963.
--HG--
branch : trunk
Diffstat (limited to 'src/game/ObjectMgr.cpp')
-rw-r--r-- | src/game/ObjectMgr.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp index add9fa793af..5ae6b5b63e0 100644 --- a/src/game/ObjectMgr.cpp +++ b/src/game/ObjectMgr.cpp @@ -1987,7 +1987,8 @@ void ObjectMgr::LoadItemPrototypes() void ObjectMgr::LoadAuctionItems() { - QueryResult *result = CharacterDatabase.Query( "SELECT itemguid,item_template FROM auctionhouse" ); + // data needs to be at first place for Item::LoadFromDB + QueryResult *result = CharacterDatabase.Query( "SELECT data,itemguid,item_template FROM auctionhouse JOIN item_instance ON itemguid = guid" ); if( !result ) return; @@ -2002,8 +2003,8 @@ void ObjectMgr::LoadAuctionItems() bar.step(); fields = result->Fetch(); - uint32 item_guid = fields[0].GetUInt32(); - uint32 item_template = fields[1].GetUInt32(); + uint32 item_guid = fields[1].GetUInt32(); + uint32 item_template = fields[2].GetUInt32(); ItemPrototype const *proto = GetItemPrototype(item_template); @@ -2015,7 +2016,7 @@ void ObjectMgr::LoadAuctionItems() Item *item = NewItemOrBag(proto); - if(!item->LoadFromDB(item_guid,0)) + if(!item->LoadFromDB(item_guid,0, result)) { delete item; continue; |