aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Server
diff options
context:
space:
mode:
authorclick <none@none>2010-11-29 00:59:02 +0100
committerclick <none@none>2010-11-29 00:59:02 +0100
commitefeb512fbf6d25e50ade629194037c9cefac46cc (patch)
tree9bd21c445886724719f41ab1d7905b52ed1dd7a7 /src/server/game/Server
parent3fccb2b7bfcbc819988c2f8aa435a810f3707c82 (diff)
Core/AuctionHouse: Calculate deposit taken for item(s) being auctioned properly + pick up correct number of items being auctioned (Thanks to Paradox)
Comment issue 4958 Added and pending further testing. Also need testing for issue 3681 (related to AH packetsize?). Closes issue 4089. Closes issue 4919. --HG-- branch : trunk
Diffstat (limited to 'src/server/game/Server')
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/AuctionHouseHandler.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/server/game/Server/Protocol/Handlers/AuctionHouseHandler.cpp b/src/server/game/Server/Protocol/Handlers/AuctionHouseHandler.cpp
index 3fbfbfe6980..dc75bdbb6f3 100755
--- a/src/server/game/Server/Protocol/Handlers/AuctionHouseHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/AuctionHouseHandler.cpp
@@ -115,11 +115,11 @@ void WorldSession::SendAuctionOwnerNotification(AuctionEntry* auction)
void WorldSession::HandleAuctionSellItem(WorldPacket & recv_data)
{
uint64 auctioneer, item;
- uint32 etime, bid, buyout;
+ uint32 etime, bid, buyout, count;
recv_data >> auctioneer;
recv_data.read_skip<uint32>(); // const 1?
recv_data >> item;
- recv_data.read_skip<uint32>(); // unk 3.2.2, const 1?
+ recv_data >> count; // 3.2.2, number of items being auctioned
recv_data >> bid;
recv_data >> buyout;
recv_data >> etime;
@@ -201,7 +201,7 @@ void WorldSession::HandleAuctionSellItem(WorldPacket & recv_data)
AuctionHouseObject* auctionHouse = sAuctionMgr.GetAuctionsMap(pCreature->getFaction());
//we have to take deposit :
- uint32 deposit = sAuctionMgr.GetAuctionDeposit(auctionHouseEntry, etime, it);
+ uint32 deposit = sAuctionMgr.GetAuctionDeposit(auctionHouseEntry, etime, it, count);
if (!pl->HasEnoughMoney(deposit))
{
SendAuctionCommandResult(0, AUCTION_SELL_ITEM, AUCTION_NOT_ENOUGHT_MONEY);
@@ -211,7 +211,7 @@ void WorldSession::HandleAuctionSellItem(WorldPacket & recv_data)
if (GetSecurity() > SEC_PLAYER && sWorld.getBoolConfig(CONFIG_GM_LOG_TRADE))
{
sLog.outCommand(GetAccountId(),"GM %s (Account: %u) create auction: %s (Entry: %u Count: %u)",
- GetPlayerName(),GetAccountId(),it->GetProto()->Name1,it->GetEntry(),it->GetCount());
+ GetPlayerName(),GetAccountId(),it->GetProto()->Name1,it->GetEntry(),count);
}
pl->ModifyMoney(-int32(deposit));