diff options
| author | pete318 <pete318@hotmail.com> | 2015-07-25 16:34:19 +0000 |
|---|---|---|
| committer | r00ty <pete318@hotmail.com> | 2015-09-22 21:33:57 +0200 |
| commit | dcb7082277447c21b11c4a1d59f105fa342c172e (patch) | |
| tree | cdfbcfb3f9019499f4c2ffe1540f88b13122e414 /src/server/game/AuctionHouse/AuctionHouseMgr.cpp | |
| parent | 0427870585f873b724b068541a933cdd68fa35a0 (diff) | |
Map local guids 6.x -> 3.3.35:
Implemented:
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 adds separate (per map) guid sequences depending on object type
* Ported map object container from cmangos/mangos-wotlk@a2d396e
* Added type container visitor for TypeUnorderedMapContainer
* Implemented helper function to erase unique pairs from multimap containers
* Moved object storage of all objects except players and transports to map level
* Added containers linking database spawn id with creature/gameobject in world
* Renamed DBTableGuid to spawnId
* Added a separate spawn id sequence generator for creatures and gameobjects - this will be used in db tables
* Moved building SMSG_UPDATE_OBJECT - updatefields changes broadcast to map update
* Added new function to return but not increment guid
* Adjusted .debug loadcells to show low guid in map before/after load
* Added debug messages for creature spawn/destroy, for map guid debugging
* Store all Gameobjects and Creatures added to OutdoorPvP, so the callback script can be removed when OutdoorPvP instance is destroyed.
Diffstat (limited to 'src/server/game/AuctionHouse/AuctionHouseMgr.cpp')
| -rw-r--r-- | src/server/game/AuctionHouse/AuctionHouseMgr.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp index 4b48f1f341b..265eb6f38ba 100644 --- a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp +++ b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp @@ -91,7 +91,7 @@ void AuctionHouseMgr::SendAuctionWonMail(AuctionEntry* auction, SQLTransaction& return; uint32 bidderAccId = 0; - ObjectGuid bidderGuid(HIGHGUID_PLAYER, auction->bidder); + ObjectGuid bidderGuid(HighGuid::Player, auction->bidder); Player* bidder = ObjectAccessor::FindConnectedPlayer(bidderGuid); // data for gm.log std::string bidderName; @@ -114,7 +114,7 @@ void AuctionHouseMgr::SendAuctionWonMail(AuctionEntry* auction, SQLTransaction& if (logGmTrade) { - ObjectGuid ownerGuid = ObjectGuid(HIGHGUID_PLAYER, auction->owner); + ObjectGuid ownerGuid = ObjectGuid(HighGuid::Player, auction->owner); std::string ownerName; if (!sObjectMgr->GetPlayerNameByGUID(ownerGuid, ownerName)) ownerName = sObjectMgr->GetTrinityStringForDBCLocale(LANG_UNKNOWN); @@ -132,7 +132,7 @@ void AuctionHouseMgr::SendAuctionWonMail(AuctionEntry* auction, SQLTransaction& // owner in `data` will set at mail receive and item extracting PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_ITEM_OWNER); stmt->setUInt32(0, auction->bidder); - stmt->setUInt32(1, pItem->GetGUIDLow()); + stmt->setUInt32(1, pItem->GetGUID().GetCounter()); trans->Append(stmt); if (bidder) @@ -155,7 +155,7 @@ void AuctionHouseMgr::SendAuctionWonMail(AuctionEntry* auction, SQLTransaction& void AuctionHouseMgr::SendAuctionSalePendingMail(AuctionEntry* auction, SQLTransaction& trans) { - ObjectGuid owner_guid(HIGHGUID_PLAYER, auction->owner); + ObjectGuid owner_guid(HighGuid::Player, auction->owner); Player* owner = ObjectAccessor::FindConnectedPlayer(owner_guid); uint32 owner_accId = sObjectMgr->GetPlayerAccountIdByGUID(owner_guid); // owner exist (online or offline) @@ -167,7 +167,7 @@ void AuctionHouseMgr::SendAuctionSalePendingMail(AuctionEntry* auction, SQLTrans //call this method to send mail to auction owner, when auction is successful, it does not clear ram void AuctionHouseMgr::SendAuctionSuccessfulMail(AuctionEntry* auction, SQLTransaction& trans) { - ObjectGuid owner_guid(HIGHGUID_PLAYER, auction->owner); + ObjectGuid owner_guid(HighGuid::Player, auction->owner); Player* owner = ObjectAccessor::FindConnectedPlayer(owner_guid); uint32 owner_accId = sObjectMgr->GetPlayerAccountIdByGUID(owner_guid); // owner exist @@ -198,7 +198,7 @@ void AuctionHouseMgr::SendAuctionExpiredMail(AuctionEntry* auction, SQLTransacti if (!pItem) return; - ObjectGuid owner_guid(HIGHGUID_PLAYER, auction->owner); + ObjectGuid owner_guid(HighGuid::Player, auction->owner); Player* owner = ObjectAccessor::FindConnectedPlayer(owner_guid); uint32 owner_accId = sObjectMgr->GetPlayerAccountIdByGUID(owner_guid); // owner exist @@ -221,7 +221,7 @@ void AuctionHouseMgr::SendAuctionExpiredMail(AuctionEntry* auction, SQLTransacti //this function sends mail to old bidder void AuctionHouseMgr::SendAuctionOutbiddedMail(AuctionEntry* auction, uint32 newPrice, Player* newBidder, SQLTransaction& trans) { - ObjectGuid oldBidder_guid(HIGHGUID_PLAYER, auction->bidder); + ObjectGuid oldBidder_guid(HighGuid::Player, auction->bidder); Player* oldBidder = ObjectAccessor::FindConnectedPlayer(oldBidder_guid); uint32 oldBidder_accId = 0; @@ -243,7 +243,7 @@ void AuctionHouseMgr::SendAuctionOutbiddedMail(AuctionEntry* auction, uint32 new //this function sends mail, when auction is cancelled to old bidder void AuctionHouseMgr::SendAuctionCancelledToBidderMail(AuctionEntry* auction, SQLTransaction& trans) { - ObjectGuid bidder_guid = ObjectGuid(HIGHGUID_PLAYER, auction->bidder); + ObjectGuid bidder_guid = ObjectGuid(HighGuid::Player, auction->bidder); Player* bidder = ObjectAccessor::FindConnectedPlayer(bidder_guid); uint32 bidder_accId = 0; @@ -355,8 +355,8 @@ void AuctionHouseMgr::LoadAuctions() void AuctionHouseMgr::AddAItem(Item* it) { ASSERT(it); - ASSERT(mAitems.find(it->GetGUIDLow()) == mAitems.end()); - mAitems[it->GetGUIDLow()] = it; + ASSERT(mAitems.find(it->GetGUID().GetCounter()) == mAitems.end()); + mAitems[it->GetGUID().GetCounter()] = it; } bool AuctionHouseMgr::RemoveAItem(uint32 id, bool deleteItem) @@ -498,7 +498,7 @@ void AuctionHouseObject::BuildListBidderItems(WorldPacket& data, Player* player, for (AuctionEntryMap::const_iterator itr = AuctionsMap.begin(); itr != AuctionsMap.end(); ++itr) { AuctionEntry* Aentry = itr->second; - if (Aentry && Aentry->bidder == player->GetGUIDLow()) + if (Aentry && Aentry->bidder == player->GetGUID().GetCounter()) { if (itr->second->BuildAuctionInfo(data)) ++count; @@ -513,7 +513,7 @@ void AuctionHouseObject::BuildListOwnerItems(WorldPacket& data, Player* player, for (AuctionEntryMap::const_iterator itr = AuctionsMap.begin(); itr != AuctionsMap.end(); ++itr) { AuctionEntry* Aentry = itr->second; - if (Aentry && Aentry->owner == player->GetGUIDLow()) + if (Aentry && Aentry->owner == player->GetGUID().GetCounter()) { if (Aentry->BuildAuctionInfo(data)) ++count; @@ -756,7 +756,7 @@ std::string AuctionEntry::BuildAuctionMailBody(uint32 lowGuid, uint32 bid, uint3 { std::ostringstream strm; strm.width(16); - strm << std::right << std::hex << ObjectGuid(HIGHGUID_PLAYER, lowGuid).GetRawValue(); // HIGHGUID_PLAYER always present, even for empty guids + strm << std::right << std::hex << ObjectGuid(HighGuid::Player, lowGuid).GetRawValue(); // HighGuid::Player always present, even for empty guids strm << std::dec << ':' << bid << ':' << buyout; strm << ':' << deposit << ':' << cut; return strm.str(); |
