Map local guids 6.x -> 4.3.4
Ported the following commits: https://github.com/TrinityCore/TrinityCore/commit/ca83e14f8b141fab0a13e08f48fca6c1ace0c4c7 https://github.com/TrinityCore/TrinityCore/commit/ee1c1b97be4492ecabe8b15ea6323fc37e4eaa8c https://github.com/TrinityCore/TrinityCore/commit/18e4ab6911468b829b0fc768e532a770263c3717 https://github.com/TrinityCore/TrinityCore/commit/bf37446b3c2ed73b4d3aa9e227d3eff5c53b378b https://github.com/TrinityCore/TrinityCore/commit/cb854a2b7bb7bd96cf9c4d1daf3789f797bf4db8
This commit is contained in:
1 parent
694c89d76d
commit
b3ea9fbbe5
163 files changed
+2448
-2328
No files matched your search
@@ -174,7 +174,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 (GUID %u) attempted to sell item with higher price than max gold amount.", _player->GetName().c_str(), _player->GetGUID().GetCounter());
|
||||
SendAuctionCommandResult(NULL, AUCTION_SELL_ITEM, ERR_AUCTION_DATABASE_ERROR);
|
||||
return;
|
||||
}
|
||||
@@ -226,7 +226,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)
|
||||
{
|
||||
@@ -286,7 +286,7 @@ void WorldSession::HandleAuctionSellItem(WorldPacket& recvData)
|
||||
AH->houseId = AUCTIONHOUSE_NEUTRAL;
|
||||
else
|
||||
{
|
||||
CreatureData const* auctioneerData = sObjectMgr->GetCreatureData(creature->GetDBTableGUIDLow());
|
||||
CreatureData const* auctioneerData = sObjectMgr->GetCreatureData(creature->GetSpawnId());
|
||||
if (!auctioneerData)
|
||||
{
|
||||
TC_LOG_ERROR("misc", "Data for auctioneer not found (%s)", auctioneer.ToString().c_str());
|
||||
@@ -314,10 +314,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;
|
||||
@@ -328,7 +328,7 @@ void WorldSession::HandleAuctionSellItem(WorldPacket& recvData)
|
||||
AH->auctionHouseEntry = auctionHouseEntry;
|
||||
|
||||
TC_LOG_INFO("network", "CMSG_AUCTION_SELL_ITEM: Player %s (guid %d) is selling item %s entry %u (guid %d) 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(), item->GetCount(), bid, buyout, auctionTime, AH->GetHouseId());
|
||||
_player->GetName().c_str(), _player->GetGUID().GetCounter(), item->GetTemplate()->Name1.c_str(), item->GetEntry(), item->GetGUID().GetCounter(), item->GetCount(), bid, buyout, auctionTime, AH->GetHouseId());
|
||||
sAuctionMgr->AddAItem(item);
|
||||
auctionHouse->AddAuction(AH);
|
||||
sAuctionMgr->PendingAuctionAdd(_player, AH);
|
||||
@@ -365,10 +365,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;
|
||||
@@ -379,7 +379,7 @@ void WorldSession::HandleAuctionSellItem(WorldPacket& recvData)
|
||||
AH->auctionHouseEntry = auctionHouseEntry;
|
||||
|
||||
TC_LOG_INFO("network", "CMSG_AUCTION_SELL_ITEM: Player %s (guid %d) is selling item %s entry %u (guid %d) 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(), newItem->GetCount(), bid, buyout, auctionTime, AH->GetHouseId());
|
||||
_player->GetName().c_str(), _player->GetGUID().GetCounter(), newItem->GetTemplate()->Name1.c_str(), newItem->GetEntry(), newItem->GetGUID().GetCounter(), newItem->GetCount(), bid, buyout, auctionTime, AH->GetHouseId());
|
||||
sAuctionMgr->AddAItem(newItem);
|
||||
auctionHouse->AddAuction(AH);
|
||||
sAuctionMgr->PendingAuctionAdd(_player, AH);
|
||||
@@ -455,7 +455,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);
|
||||
@@ -463,7 +463,7 @@ void WorldSession::HandleAuctionPlaceBid(WorldPacket& recvData)
|
||||
}
|
||||
|
||||
// impossible have online own another character (use this for speedup check in case online owner)
|
||||
ObjectGuid ownerGuid(HIGHGUID_PLAYER, auction->owner);
|
||||
ObjectGuid ownerGuid(HighGuid::Player, auction->owner);
|
||||
Player* auction_owner = ObjectAccessor::FindPlayer(ownerGuid);
|
||||
if (!auction_owner && sObjectMgr->GetPlayerAccountIdByGUID(ownerGuid) == player->GetSession()->GetAccountId())
|
||||
{
|
||||
@@ -498,7 +498,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
|
||||
{
|
||||
@@ -510,7 +510,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);
|
||||
|
||||
@@ -525,7 +525,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
|
||||
{
|
||||
@@ -533,7 +533,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);
|
||||
|
||||
@@ -580,7 +580,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)
|
||||
@@ -610,7 +610,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: %u tried to cancel auction (id: %u) of another player or auction is NULL", player->GetGUID().GetCounter(), auctionId);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user