aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Handlers/AuctionHouseHandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Handlers/AuctionHouseHandler.cpp')
-rw-r--r--src/server/game/Handlers/AuctionHouseHandler.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/server/game/Handlers/AuctionHouseHandler.cpp b/src/server/game/Handlers/AuctionHouseHandler.cpp
index 20deb5b5460..10395673a2f 100644
--- a/src/server/game/Handlers/AuctionHouseHandler.cpp
+++ b/src/server/game/Handlers/AuctionHouseHandler.cpp
@@ -175,7 +175,7 @@ void WorldSession::HandleAuctionSellItem(WorldPacket& recvData)
if (bid > MAX_MONEY_AMOUNT || buyout > MAX_MONEY_AMOUNT)
{
- TC_LOG_DEBUG("network", "WORLD: HandleAuctionSellItem - Player %s (GUID %u) attempted to sell item with higher price than max gold amount.", _player->GetName().c_str(), _player->GetGUIDLow());
+ TC_LOG_DEBUG("network", "WORLD: HandleAuctionSellItem - Player %s (%s) attempted to sell item with higher price than max gold amount.", _player->GetName().c_str(), _player->GetGUID().ToString().c_str());
SendAuctionCommandResult(NULL, AUCTION_SELL_ITEM, ERR_AUCTION_DATABASE_ERROR);
return;
}
@@ -228,7 +228,7 @@ void WorldSession::HandleAuctionSellItem(WorldPacket& recvData)
if (itemEntry == 0)
itemEntry = item->GetTemplate()->ItemId;
- if (sAuctionMgr->GetAItem(item->GetGUIDLow()) || !item->CanBeTraded() || item->IsNotEmptyBag() ||
+ if (sAuctionMgr->GetAItem(item->GetGUID().GetCounter()) || !item->CanBeTraded() || item->IsNotEmptyBag() ||
item->GetTemplate()->Flags & ITEM_PROTO_FLAG_CONJURED || item->GetUInt32Value(ITEM_FIELD_DURATION) ||
item->GetCount() < count[i] || itemEntry != item->GetTemplate()->ItemId)
{
@@ -299,10 +299,10 @@ void WorldSession::HandleAuctionSellItem(WorldPacket& recvData)
}
AH->Id = sObjectMgr->GenerateAuctionID();
- AH->itemGUIDLow = item->GetGUIDLow();
+ AH->itemGUIDLow = item->GetGUID().GetCounter();
AH->itemEntry = item->GetEntry();
AH->itemCount = item->GetCount();
- AH->owner = _player->GetGUIDLow();
+ AH->owner = _player->GetGUID().GetCounter();
AH->startbid = bid;
AH->bidder = 0;
AH->bid = 0;
@@ -311,8 +311,8 @@ void WorldSession::HandleAuctionSellItem(WorldPacket& recvData)
AH->deposit = deposit;
AH->auctionHouseEntry = auctionHouseEntry;
- TC_LOG_INFO("network", "CMSG_AUCTION_SELL_ITEM: Player %s (guid %d) is selling item %s entry %u (guid %d) to auctioneer " UI64FMTD " with count %u with initial bid %u with buyout %u and with time %u (in sec) in auctionhouse %u",
- _player->GetName().c_str(), _player->GetGUIDLow(), item->GetTemplate()->Name1.c_str(), item->GetEntry(), item->GetGUIDLow(), AH->auctioneer, item->GetCount(), bid, buyout, auctionTime, AH->GetHouseId());
+ TC_LOG_INFO("network", "CMSG_AUCTION_SELL_ITEM: %s %s is selling item %s %s to auctioneer " UI64FMTD " with count %u with initial bid %u with buyout %u and with time %u (in sec) in auctionhouse %u",
+ _player->GetGUID().ToString().c_str(), _player->GetName().c_str(), item->GetGUID().ToString().c_str(), item->GetTemplate()->Name1.c_str(), AH->auctioneer, item->GetCount(), bid, buyout, auctionTime, AH->GetHouseId());
sAuctionMgr->AddAItem(item);
auctionHouse->AddAuction(AH);
@@ -347,10 +347,10 @@ void WorldSession::HandleAuctionSellItem(WorldPacket& recvData)
}
AH->Id = sObjectMgr->GenerateAuctionID();
- AH->itemGUIDLow = newItem->GetGUIDLow();
+ AH->itemGUIDLow = newItem->GetGUID().GetCounter();
AH->itemEntry = newItem->GetEntry();
AH->itemCount = newItem->GetCount();
- AH->owner = _player->GetGUIDLow();
+ AH->owner = _player->GetGUID().GetCounter();
AH->startbid = bid;
AH->bidder = 0;
AH->bid = 0;
@@ -359,8 +359,8 @@ void WorldSession::HandleAuctionSellItem(WorldPacket& recvData)
AH->deposit = deposit;
AH->auctionHouseEntry = auctionHouseEntry;
- TC_LOG_INFO("network", "CMSG_AUCTION_SELL_ITEM: Player %s (guid %d) is selling item %s entry %u (guid %d) to auctioneer " UI64FMTD " with count %u with initial bid %u with buyout %u and with time %u (in sec) in auctionhouse %u",
- _player->GetName().c_str(), _player->GetGUIDLow(), newItem->GetTemplate()->Name1.c_str(), newItem->GetEntry(), newItem->GetGUIDLow(), AH->auctioneer, newItem->GetCount(), bid, buyout, auctionTime, AH->GetHouseId());
+ TC_LOG_INFO("network", "CMSG_AUCTION_SELL_ITEM: %s %s is selling %s %s to auctioneer " UI64FMTD " with count %u with initial bid %u with buyout %u and with time %u (in sec) in auctionhouse %u",
+ _player->GetGUID().ToString().c_str(), _player->GetName().c_str(), newItem->GetGUID().ToString().c_str(), newItem->GetTemplate()->Name1.c_str(), AH->auctioneer, newItem->GetCount(), bid, buyout, auctionTime, AH->GetHouseId());
sAuctionMgr->AddAItem(newItem);
auctionHouse->AddAuction(AH);
@@ -437,7 +437,7 @@ void WorldSession::HandleAuctionPlaceBid(WorldPacket& recvData)
AuctionEntry* auction = auctionHouse->GetAuction(auctionId);
Player* player = GetPlayer();
- if (!auction || auction->owner == player->GetGUIDLow())
+ if (!auction || auction->owner == player->GetGUID().GetCounter())
{
//you cannot bid your own auction:
SendAuctionCommandResult(NULL, AUCTION_PLACE_BID, ERR_AUCTION_BID_OWN);
@@ -480,7 +480,7 @@ void WorldSession::HandleAuctionPlaceBid(WorldPacket& recvData)
{
if (auction->bidder > 0)
{
- if (auction->bidder == player->GetGUIDLow())
+ if (auction->bidder == player->GetGUID().GetCounter())
player->ModifyMoney(-int64(price - auction->bid));
else
{
@@ -492,7 +492,7 @@ void WorldSession::HandleAuctionPlaceBid(WorldPacket& recvData)
else
player->ModifyMoney(-int64(price));
- auction->bidder = player->GetGUIDLow();
+ auction->bidder = player->GetGUID().GetCounter();
auction->bid = price;
GetPlayer()->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_AUCTION_BID, price);
@@ -507,7 +507,7 @@ void WorldSession::HandleAuctionPlaceBid(WorldPacket& recvData)
else
{
//buyout:
- if (player->GetGUIDLow() == auction->bidder)
+ if (player->GetGUID().GetCounter() == auction->bidder)
player->ModifyMoney(-int64(auction->buyout - auction->bid));
else
{
@@ -515,7 +515,7 @@ void WorldSession::HandleAuctionPlaceBid(WorldPacket& recvData)
if (auction->bidder) //buyout for bidded auction ..
sAuctionMgr->SendAuctionOutbiddedMail(auction, auction->buyout, GetPlayer(), trans);
}
- auction->bidder = player->GetGUIDLow();
+ auction->bidder = player->GetGUID().GetCounter();
auction->bid = auction->buyout;
GetPlayer()->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_AUCTION_BID, auction->buyout);
@@ -563,7 +563,7 @@ void WorldSession::HandleAuctionRemoveItem(WorldPacket& recvData)
Player* player = GetPlayer();
SQLTransaction trans = CharacterDatabase.BeginTransaction();
- if (auction && auction->owner == player->GetGUIDLow())
+ if (auction && auction->owner == player->GetGUID().GetCounter())
{
Item* pItem = sAuctionMgr->GetAItem(auction->itemGUIDLow);
if (pItem)
@@ -593,7 +593,7 @@ void WorldSession::HandleAuctionRemoveItem(WorldPacket& recvData)
{
SendAuctionCommandResult(NULL, AUCTION_CANCEL, ERR_AUCTION_DATABASE_ERROR);
//this code isn't possible ... maybe there should be assert
- TC_LOG_ERROR("network", "CHEATER: %u tried to cancel auction (id: %u) of another player or auction is NULL", player->GetGUIDLow(), auctionId);
+ TC_LOG_ERROR("network", "CHEATER: %s tried to cancel auction (id: %u) of another player or auction is NULL", player->GetGUID().ToString().c_str(), auctionId);
return;
}