Core/DBLayer: Converted player login queries into prepared statements
Core/DBLayer: Added missing implementation for SQLQueryHolder::SetPreparedQuery --HG-- branch : trunk
This commit is contained in:
@@ -305,8 +305,8 @@ void AuctionHouseMgr::SendAuctionCancelledToBidderMail(AuctionEntry* auction, SQ
|
||||
void AuctionHouseMgr::LoadAuctionItems()
|
||||
{
|
||||
// data needs to be at first place for Item::LoadFromDB
|
||||
// 0 1 2 3 4 5 6 7 8 9 10 11 12
|
||||
QueryResult result = CharacterDatabase.Query("SELECT creatorGuid, giftCreatorGuid, count, duration, charges, flags, enchantments, randomPropertyId, durability, playedTime, text, itemguid, item_template FROM auctionhouse JOIN item_instance ON itemguid = guid");
|
||||
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_LOAD_AUCTION_ITEMS);
|
||||
PreparedQueryResult result = CharacterDatabase.Query(stmt);
|
||||
|
||||
if (!result)
|
||||
{
|
||||
@@ -321,14 +321,12 @@ void AuctionHouseMgr::LoadAuctionItems()
|
||||
|
||||
uint32 count = 0;
|
||||
|
||||
Field *fields;
|
||||
do
|
||||
{
|
||||
bar.step();
|
||||
|
||||
fields = result->Fetch();
|
||||
uint32 item_guid = fields[11].GetUInt32();
|
||||
uint32 item_template = fields[12].GetUInt32();
|
||||
uint32 item_guid = result->GetUInt32(11);
|
||||
uint32 item_template = result->GetUInt32(12);
|
||||
|
||||
ItemPrototype const *proto = sObjectMgr.GetItemPrototype(item_template);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user