mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-23 13:46:24 +00:00
refactor(Core/Game): restyle game lib with astyle (#3466)
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
#include "AsyncAuctionListing.h"
|
||||
|
||||
//void called when player click on auctioneer npc
|
||||
void WorldSession::HandleAuctionHelloOpcode(WorldPacket & recvData)
|
||||
void WorldSession::HandleAuctionHelloOpcode(WorldPacket& recvData)
|
||||
{
|
||||
uint64 guid; //NPC guid
|
||||
recvData >> guid;
|
||||
@@ -77,7 +77,7 @@ void WorldSession::SendAuctionCommandResult(uint32 auctionId, uint32 Action, uin
|
||||
//this function sends notification, if bidder is online
|
||||
void WorldSession::SendAuctionBidderNotification(uint32 location, uint32 auctionId, uint64 bidder, uint32 bidSum, uint32 diff, uint32 item_template)
|
||||
{
|
||||
WorldPacket data(SMSG_AUCTION_BIDDER_NOTIFICATION, (8*4));
|
||||
WorldPacket data(SMSG_AUCTION_BIDDER_NOTIFICATION, (8 * 4));
|
||||
data << uint32(location);
|
||||
data << uint32(auctionId);
|
||||
data << uint64(bidder);
|
||||
@@ -91,7 +91,7 @@ void WorldSession::SendAuctionBidderNotification(uint32 location, uint32 auction
|
||||
//this void causes on client to display: "Your auction sold"
|
||||
void WorldSession::SendAuctionOwnerNotification(AuctionEntry* auction)
|
||||
{
|
||||
WorldPacket data(SMSG_AUCTION_OWNER_NOTIFICATION, (8*4));
|
||||
WorldPacket data(SMSG_AUCTION_OWNER_NOTIFICATION, (8 * 4));
|
||||
data << uint32(auction->Id);
|
||||
data << uint32(auction->bid);
|
||||
data << uint32(0); //unk
|
||||
@@ -103,7 +103,7 @@ void WorldSession::SendAuctionOwnerNotification(AuctionEntry* auction)
|
||||
}
|
||||
|
||||
//this void creates new auction and adds auction to some auctionhouse
|
||||
void WorldSession::HandleAuctionSellItem(WorldPacket & recvData)
|
||||
void WorldSession::HandleAuctionSellItem(WorldPacket& recvData)
|
||||
{
|
||||
uint64 auctioneer;
|
||||
uint32 itemsCount, etime, bid, buyout;
|
||||
@@ -202,8 +202,8 @@ void WorldSession::HandleAuctionSellItem(WorldPacket & recvData)
|
||||
itemEntry = item->GetTemplate()->ItemId;
|
||||
|
||||
if (sAuctionMgr->GetAItem(item->GetGUIDLow()) || !item->CanBeTraded() || item->IsNotEmptyBag() ||
|
||||
item->GetTemplate()->Flags & ITEM_FLAG_CONJURED || item->GetUInt32Value(ITEM_FIELD_DURATION) ||
|
||||
item->GetCount() < count[i] || itemEntry != item->GetTemplate()->ItemId)
|
||||
item->GetTemplate()->Flags & ITEM_FLAG_CONJURED || item->GetUInt32Value(ITEM_FIELD_DURATION) ||
|
||||
item->GetCount() < count[i] || itemEntry != item->GetTemplate()->ItemId)
|
||||
{
|
||||
SendAuctionCommandResult(0, AUCTION_SELL_ITEM, ERR_AUCTION_DATABASE_ERROR);
|
||||
return;
|
||||
@@ -373,7 +373,7 @@ void WorldSession::HandleAuctionSellItem(WorldPacket & recvData)
|
||||
}
|
||||
|
||||
//this function is called when client bids or buys out auction
|
||||
void WorldSession::HandleAuctionPlaceBid(WorldPacket & recvData)
|
||||
void WorldSession::HandleAuctionPlaceBid(WorldPacket& recvData)
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_AUCTION_PLACE_BID");
|
||||
@@ -428,7 +428,7 @@ void WorldSession::HandleAuctionPlaceBid(WorldPacket & recvData)
|
||||
|
||||
// price too low for next bid if not buyout
|
||||
if ((price < auction->buyout || auction->buyout == 0) &&
|
||||
price < auction->bid + auction->GetAuctionOutBid())
|
||||
price < auction->bid + auction->GetAuctionOutBid())
|
||||
{
|
||||
//auction has already higher bid, client tests it!
|
||||
return;
|
||||
@@ -503,7 +503,7 @@ void WorldSession::HandleAuctionPlaceBid(WorldPacket & recvData)
|
||||
}
|
||||
|
||||
//this void is called when auction_owner cancels his auction
|
||||
void WorldSession::HandleAuctionRemoveItem(WorldPacket & recvData)
|
||||
void WorldSession::HandleAuctionRemoveItem(WorldPacket& recvData)
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_AUCTION_REMOVE_ITEM");
|
||||
@@ -551,8 +551,8 @@ void WorldSession::HandleAuctionRemoveItem(WorldPacket & recvData)
|
||||
|
||||
// item will deleted or added to received mail list
|
||||
MailDraft(auction->BuildAuctionMailSubject(AUCTION_CANCELED), AuctionEntry::BuildAuctionMailBody(0, 0, auction->buyout, auction->deposit, 0))
|
||||
.AddItem(pItem)
|
||||
.SendMailTo(trans, player, auction, MAIL_CHECK_MASK_COPIED);
|
||||
.AddItem(pItem)
|
||||
.SendMailTo(trans, player, auction, MAIL_CHECK_MASK_COPIED);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -583,7 +583,7 @@ void WorldSession::HandleAuctionRemoveItem(WorldPacket & recvData)
|
||||
}
|
||||
|
||||
//called when player lists his bids
|
||||
void WorldSession::HandleAuctionListBidderItems(WorldPacket & recvData)
|
||||
void WorldSession::HandleAuctionListBidderItems(WorldPacket& recvData)
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_AUCTION_LIST_BIDDER_ITEMS");
|
||||
@@ -618,7 +618,7 @@ void WorldSession::HandleAuctionListBidderItems(WorldPacket & recvData)
|
||||
|
||||
AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(creature->getFaction());
|
||||
|
||||
WorldPacket data(SMSG_AUCTION_BIDDER_LIST_RESULT, (4+4+4)+30000); // pussywizard: ensure there is enough memory
|
||||
WorldPacket data(SMSG_AUCTION_BIDDER_LIST_RESULT, (4 + 4 + 4) + 30000); // pussywizard: ensure there is enough memory
|
||||
Player* player = GetPlayer();
|
||||
data << (uint32) 0; //add 0 as count
|
||||
uint32 count = 0;
|
||||
@@ -644,7 +644,7 @@ void WorldSession::HandleAuctionListBidderItems(WorldPacket & recvData)
|
||||
}
|
||||
|
||||
//this void sends player info about his auctions
|
||||
void WorldSession::HandleAuctionListOwnerItems(WorldPacket & recvData)
|
||||
void WorldSession::HandleAuctionListOwnerItems(WorldPacket& recvData)
|
||||
{
|
||||
// prevent crash caused by malformed packet
|
||||
uint64 guid;
|
||||
@@ -663,7 +663,7 @@ void WorldSession::HandleAuctionListOwnerItems(WorldPacket & recvData)
|
||||
diff = delay;
|
||||
|
||||
_lastAuctionListOwnerItemsMSTime = now + delay; // set longest possible here, actual exectuing will change this to getMSTime of that moment
|
||||
_player->m_Events.AddEvent(new AuctionListOwnerItemsDelayEvent(guid, _player->GetGUID(), true), _player->m_Events.CalculateTime(delay-diff));
|
||||
_player->m_Events.AddEvent(new AuctionListOwnerItemsDelayEvent(guid, _player->GetGUID(), true), _player->m_Events.CalculateTime(delay - diff));
|
||||
}
|
||||
|
||||
|
||||
@@ -690,7 +690,7 @@ void WorldSession::HandleAuctionListOwnerItemsEvent(uint64 creatureGuid)
|
||||
|
||||
AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(creature->getFaction());
|
||||
|
||||
WorldPacket data(SMSG_AUCTION_OWNER_LIST_RESULT, (4+4+4)+60000); // pussywizard: ensure there is enough memory
|
||||
WorldPacket data(SMSG_AUCTION_OWNER_LIST_RESULT, (4 + 4 + 4) + 60000); // pussywizard: ensure there is enough memory
|
||||
data << (uint32) 0; // amount place holder
|
||||
|
||||
uint32 count = 0;
|
||||
@@ -704,7 +704,7 @@ void WorldSession::HandleAuctionListOwnerItemsEvent(uint64 creatureGuid)
|
||||
}
|
||||
|
||||
//this void is called when player clicks on search button
|
||||
void WorldSession::HandleAuctionListItems(WorldPacket & recvData)
|
||||
void WorldSession::HandleAuctionListItems(WorldPacket& recvData)
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_AUCTION_LIST_ITEMS");
|
||||
@@ -748,10 +748,10 @@ void WorldSession::HandleAuctionListItems(WorldPacket & recvData)
|
||||
diff = delay;
|
||||
_lastAuctionListItemsMSTime = now + delay - diff;
|
||||
ACORE_GUARD(ACE_Thread_Mutex, AsyncAuctionListingMgr::GetTempLock());
|
||||
AsyncAuctionListingMgr::GetTempList().push_back( AuctionListItemsDelayEvent(delay-diff, _player->GetGUID(), guid, searchedname, listfrom, levelmin, levelmax, usable, auctionSlotID, auctionMainCategory, auctionSubCategory, quality, getAll) );
|
||||
AsyncAuctionListingMgr::GetTempList().push_back( AuctionListItemsDelayEvent(delay - diff, _player->GetGUID(), guid, searchedname, listfrom, levelmin, levelmax, usable, auctionSlotID, auctionMainCategory, auctionSubCategory, quality, getAll) );
|
||||
}
|
||||
|
||||
void WorldSession::HandleAuctionListPendingSales(WorldPacket & recvData)
|
||||
void WorldSession::HandleAuctionListPendingSales(WorldPacket& recvData)
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_AUCTION_LIST_PENDING_SALES");
|
||||
|
||||
Reference in New Issue
Block a user