aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/game/AuctionHouse/AuctionHouseMgr.cpp30
-rw-r--r--src/server/game/AuctionHouse/AuctionHouseMgr.h16
-rw-r--r--src/server/game/AuctionHouseBot/AuctionHouseBotSeller.cpp2
-rw-r--r--src/server/game/Battlegrounds/ArenaTeam.cpp16
-rw-r--r--src/server/game/Entities/Object/ObjectGuid.cpp32
-rw-r--r--src/server/game/Entities/Object/ObjectGuid.h52
-rw-r--r--src/server/game/Entities/Player/Player.cpp4
-rw-r--r--src/server/game/Guilds/Guild.cpp2
-rw-r--r--src/server/game/Handlers/AuctionHouseHandler.cpp8
-rw-r--r--src/server/game/Handlers/CharacterHandler.cpp4
-rw-r--r--src/server/game/Mails/Mail.cpp2
-rw-r--r--src/server/game/Mails/Mail.h6
-rw-r--r--src/server/scripts/Commands/cs_list.cpp4
13 files changed, 86 insertions, 92 deletions
diff --git a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp
index 9390ec80208..d2ed6558a96 100644
--- a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp
+++ b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp
@@ -363,7 +363,7 @@ void AuctionHouseMgr::AddAItem(Item* it)
mAitems[it->GetGUIDLow()] = it;
}
-bool AuctionHouseMgr::RemoveAItem(uint32 id, bool deleteItem)
+bool AuctionHouseMgr::RemoveAItem(uint64 id, bool deleteItem)
{
ItemMap::iterator i = mAitems.find(id);
if (i == mAitems.end())
@@ -635,7 +635,7 @@ bool AuctionEntry::BuildAuctionInfo(WorldPacket& data) const
Item* item = sAuctionMgr->GetAItem(itemGUIDLow);
if (!item)
{
- TC_LOG_ERROR("misc", "AuctionEntry::BuildAuctionInfo: Auction %u has a non-existent item: %u", Id, itemGUIDLow);
+ TC_LOG_ERROR("misc", "AuctionEntry::BuildAuctionInfo: Auction %u has a non-existent item: " UI64FMTD, Id, itemGUIDLow);
return false;
}
data << uint32(Id);
@@ -688,12 +688,12 @@ void AuctionEntry::SaveToDB(SQLTransaction& trans) const
{
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_AUCTION);
stmt->setUInt32(0, Id);
- stmt->setUInt32(1, auctioneer);
- stmt->setUInt32(2, itemGUIDLow);
- stmt->setUInt32(3, owner);
+ stmt->setUInt64(1, auctioneer);
+ stmt->setUInt64(2, itemGUIDLow);
+ stmt->setUInt64(3, owner);
stmt->setUInt32(4, buyout);
stmt->setUInt32(5, uint32(expire_time));
- stmt->setUInt32(6, bidder);
+ stmt->setUInt64(6, bidder);
stmt->setUInt32(7, bid);
stmt->setUInt32(8, startbid);
stmt->setUInt32(9, deposit);
@@ -703,14 +703,14 @@ void AuctionEntry::SaveToDB(SQLTransaction& trans) const
bool AuctionEntry::LoadFromDB(Field* fields)
{
Id = fields[0].GetUInt32();
- auctioneer = fields[1].GetUInt32();
- itemGUIDLow = fields[2].GetUInt32();
+ auctioneer = fields[1].GetUInt64();
+ itemGUIDLow = fields[2].GetUInt64();
itemEntry = fields[3].GetUInt32();
itemCount = fields[4].GetUInt32();
- owner = fields[5].GetUInt32();
+ owner = fields[5].GetUInt64();
buyout = fields[6].GetUInt32();
expire_time = fields[7].GetUInt32();
- bidder = fields[8].GetUInt32();
+ bidder = fields[8].GetUInt64();
bid = fields[9].GetUInt32();
startbid = fields[10].GetUInt32();
deposit = fields[11].GetUInt32();
@@ -718,14 +718,14 @@ bool AuctionEntry::LoadFromDB(Field* fields)
CreatureData const* auctioneerData = sObjectMgr->GetCreatureData(auctioneer);
if (!auctioneerData)
{
- TC_LOG_ERROR("misc", "Auction %u has not a existing auctioneer (GUID : %u)", Id, auctioneer);
+ TC_LOG_ERROR("misc", "Auction %u has not a existing auctioneer (GUID : " UI64FMTD ")", Id, auctioneer);
return false;
}
CreatureTemplate const* auctioneerInfo = sObjectMgr->GetCreatureTemplate(auctioneerData->id);
if (!auctioneerInfo)
{
- TC_LOG_ERROR("misc", "Auction %u has not a existing auctioneer (GUID : %u Entry: %u)", Id, auctioneer, auctioneerData->id);
+ TC_LOG_ERROR("misc", "Auction %u has not a existing auctioneer (GUID : " UI64FMTD " Entry: %u)", Id, auctioneer, auctioneerData->id);
return false;
}
@@ -733,7 +733,7 @@ bool AuctionEntry::LoadFromDB(Field* fields)
auctionHouseEntry = AuctionHouseMgr::GetAuctionHouseEntry(factionTemplateId);
if (!auctionHouseEntry)
{
- TC_LOG_ERROR("misc", "Auction %u has auctioneer (GUID : %u Entry: %u) with wrong faction %u", Id, auctioneer, auctioneerData->id, factionTemplateId);
+ TC_LOG_ERROR("misc", "Auction %u has auctioneer (GUID : " UI64FMTD " Entry: %u) with wrong faction %u", Id, auctioneer, auctioneerData->id, factionTemplateId);
return false;
}
@@ -741,7 +741,7 @@ bool AuctionEntry::LoadFromDB(Field* fields)
// and itemEntry in fact (GetAItem will fail if problematic in result check in AuctionHouseMgr::LoadAuctionItems)
if (!sAuctionMgr->GetAItem(itemGUIDLow))
{
- TC_LOG_ERROR("misc", "Auction %u has not a existing item : %u", Id, itemGUIDLow);
+ TC_LOG_ERROR("misc", "Auction %u has not a existing item : " UI64FMTD, Id, itemGUIDLow);
return false;
}
return true;
@@ -753,7 +753,7 @@ std::string AuctionEntry::BuildAuctionMailSubject(MailAuctionAnswers response) c
return strm.str();
}
-std::string AuctionEntry::BuildAuctionMailBody(uint32 lowGuid, uint32 bid, uint32 buyout, uint32 deposit, uint32 cut)
+std::string AuctionEntry::BuildAuctionMailBody(uint64 lowGuid, uint32 bid, uint32 buyout, uint32 deposit, uint32 cut)
{
std::ostringstream strm;
strm.width(16);
diff --git a/src/server/game/AuctionHouse/AuctionHouseMgr.h b/src/server/game/AuctionHouse/AuctionHouseMgr.h
index a167acfbd73..bfd4ba5147f 100644
--- a/src/server/game/AuctionHouse/AuctionHouseMgr.h
+++ b/src/server/game/AuctionHouse/AuctionHouseMgr.h
@@ -64,16 +64,16 @@ enum MailAuctionAnswers
struct AuctionEntry
{
uint32 Id;
- uint32 auctioneer; // creature low guid
- uint32 itemGUIDLow;
+ uint64 auctioneer; // creature low guid
+ uint64 itemGUIDLow;
uint32 itemEntry;
uint32 itemCount;
- uint32 owner;
+ uint64 owner;
uint32 startbid; //maybe useless
uint32 bid;
uint32 buyout;
time_t expire_time;
- uint32 bidder;
+ uint64 bidder;
uint32 deposit; //deposit can be calculated only when creating auction
AuctionHouseEntry const* auctionHouseEntry; // in AuctionHouse.dbc
uint32 factionTemplateId;
@@ -88,7 +88,7 @@ struct AuctionEntry
void SaveToDB(SQLTransaction& trans) const;
bool LoadFromDB(Field* fields);
std::string BuildAuctionMailSubject(MailAuctionAnswers response) const;
- static std::string BuildAuctionMailBody(uint32 lowGuid, uint32 bid, uint32 buyout, uint32 deposit, uint32 cut);
+ static std::string BuildAuctionMailBody(uint64 lowGuid, uint32 bid, uint32 buyout, uint32 deposit, uint32 cut);
};
@@ -145,12 +145,12 @@ class AuctionHouseMgr
return &instance;
}
- typedef std::unordered_map<uint32, Item*> ItemMap;
+ typedef std::unordered_map<uint64, Item*> ItemMap;
AuctionHouseObject* GetAuctionsMap(uint32 factionTemplateId);
AuctionHouseObject* GetBidsMap(uint32 factionTemplateId);
- Item* GetAItem(uint32 id)
+ Item* GetAItem(uint64 id)
{
ItemMap::const_iterator itr = mAitems.find(id);
if (itr != mAitems.end())
@@ -177,7 +177,7 @@ class AuctionHouseMgr
void LoadAuctions();
void AddAItem(Item* it);
- bool RemoveAItem(uint32 id, bool deleteItem = false);
+ bool RemoveAItem(uint64 id, bool deleteItem = false);
void Update();
diff --git a/src/server/game/AuctionHouseBot/AuctionHouseBotSeller.cpp b/src/server/game/AuctionHouseBot/AuctionHouseBotSeller.cpp
index b2f524f7eb0..d6626e625a0 100644
--- a/src/server/game/AuctionHouseBot/AuctionHouseBotSeller.cpp
+++ b/src/server/game/AuctionHouseBot/AuctionHouseBotSeller.cpp
@@ -906,7 +906,7 @@ void AuctionBotSeller::AddNewAuctions(SellerConfiguration& config)
items = sAuctionBotConfig->GetItemPerCycleNormal();
uint32 houseid = 0;
- uint32 auctioneer = 0;
+ uint64 auctioneer = 0;
switch (config.GetHouseType())
{
case AUCTION_HOUSE_ALLIANCE:
diff --git a/src/server/game/Battlegrounds/ArenaTeam.cpp b/src/server/game/Battlegrounds/ArenaTeam.cpp
index 8a0b0d04df6..4456457caf7 100644
--- a/src/server/game/Battlegrounds/ArenaTeam.cpp
+++ b/src/server/game/Battlegrounds/ArenaTeam.cpp
@@ -63,13 +63,13 @@ bool ArenaTeam::Create(ObjectGuid captainGuid, uint8 type, std::string const& te
EmblemColor = emblemColor;
BorderStyle = borderStyle;
BorderColor = borderColor;
- uint32 captainLowGuid = captainGuid.GetCounter();
+ uint64 captainLowGuid = captainGuid.GetCounter();
// Save arena team to db
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_ARENA_TEAM);
stmt->setUInt32(0, TeamId);
stmt->setString(1, TeamName);
- stmt->setUInt32(2, captainLowGuid);
+ stmt->setUInt64(2, captainLowGuid);
stmt->setUInt8(3, Type);
stmt->setUInt16(4, Stats.Rating);
stmt->setUInt32(5, BackgroundColor);
@@ -82,7 +82,7 @@ bool ArenaTeam::Create(ObjectGuid captainGuid, uint8 type, std::string const& te
// Add captain as member
AddMember(CaptainGuid);
- TC_LOG_DEBUG("bg.arena", "New ArenaTeam created [Id: %u, Name: %s] [Type: %u] [Captain low GUID: %u]", GetId(), GetName().c_str(), GetType(), captainLowGuid);
+ TC_LOG_DEBUG("bg.arena", "New ArenaTeam created [Id: %u, Name: %s] [Type: %u] [Captain low GUID: " UI64FMTD "]", GetId(), GetName().c_str(), GetType(), captainLowGuid);
return true;
}
@@ -165,7 +165,7 @@ bool ArenaTeam::AddMember(ObjectGuid playerGuid)
// Save player's arena team membership to db
stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_ARENA_TEAM_MEMBER);
stmt->setUInt32(0, TeamId);
- stmt->setUInt32(1, playerGuid.GetCounter());
+ stmt->setUInt64(1, playerGuid.GetCounter());
CharacterDatabase.Execute(stmt);
// Inform player if online
@@ -294,7 +294,7 @@ void ArenaTeam::SetCaptain(ObjectGuid guid)
// Update database
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_ARENA_TEAM_CAPTAIN);
- stmt->setUInt32(0, guid.GetCounter());
+ stmt->setUInt64(0, guid.GetCounter());
stmt->setUInt32(1, GetId());
CharacterDatabase.Execute(stmt);
@@ -335,7 +335,7 @@ void ArenaTeam::DelMember(ObjectGuid guid, bool cleanDb)
{
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_ARENA_TEAM_MEMBER);
stmt->setUInt32(0, GetId());
- stmt->setUInt32(1, guid.GetCounter());
+ stmt->setUInt64(1, guid.GetCounter());
CharacterDatabase.Execute(stmt);
}
}
@@ -854,11 +854,11 @@ void ArenaTeam::SaveToDB()
stmt->setUInt16(3, itr->SeasonGames);
stmt->setUInt16(4, itr->SeasonWins);
stmt->setUInt32(5, GetId());
- stmt->setUInt32(6, itr->Guid.GetCounter());
+ stmt->setUInt64(6, itr->Guid.GetCounter());
trans->Append(stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_REP_CHARACTER_ARENA_STATS);
- stmt->setUInt32(0, itr->Guid.GetCounter());
+ stmt->setUInt64(0, itr->Guid.GetCounter());
stmt->setUInt8(1, GetSlot());
stmt->setUInt16(2, itr->MatchMakerRating);
trans->Append(stmt);
diff --git a/src/server/game/Entities/Object/ObjectGuid.cpp b/src/server/game/Entities/Object/ObjectGuid.cpp
index cbd004a21ee..81442ac37ad 100644
--- a/src/server/game/Entities/Object/ObjectGuid.cpp
+++ b/src/server/game/Entities/Object/ObjectGuid.cpp
@@ -51,7 +51,7 @@ char const* ObjectGuid::GetTypeName(HighGuid high)
std::string ObjectGuid::ToString() const
{
std::ostringstream str;
- str << "GUID Full: 0x" << std::hex << std::setw(16) << std::setfill('0') << _data._guid << std::dec;
+ str << "GUID Full: 0x" << std::hex << std::setw(16) << std::setfill('0') << _guid << std::dec;
str << " Type: " << GetTypeName();
if (HasEntry())
str << (IsPet() ? " Pet number: " : " Entry: ") << GetEntry() << " ";
@@ -61,7 +61,7 @@ std::string ObjectGuid::ToString() const
}
template<HighGuid high>
-uint32 ObjectGuidGenerator<high>::Generate()
+uint64 ObjectGuidGenerator<high>::Generate()
{
if (_nextGuid >= ObjectGuid::GetMaxCounter(high) - 1)
{
@@ -95,17 +95,17 @@ ByteBuffer& operator>>(ByteBuffer& buf, PackedGuidReader const& guid)
return buf;
}
-template uint32 ObjectGuidGenerator<HIGHGUID_ITEM>::Generate();
-template uint32 ObjectGuidGenerator<HIGHGUID_PLAYER>::Generate();
-template uint32 ObjectGuidGenerator<HIGHGUID_GAMEOBJECT>::Generate();
-template uint32 ObjectGuidGenerator<HIGHGUID_TRANSPORT>::Generate();
-template uint32 ObjectGuidGenerator<HIGHGUID_UNIT>::Generate();
-template uint32 ObjectGuidGenerator<HIGHGUID_PET>::Generate();
-template uint32 ObjectGuidGenerator<HIGHGUID_VEHICLE>::Generate();
-template uint32 ObjectGuidGenerator<HIGHGUID_DYNAMICOBJECT>::Generate();
-template uint32 ObjectGuidGenerator<HIGHGUID_CORPSE>::Generate();
-template uint32 ObjectGuidGenerator<HIGHGUID_AREATRIGGER>::Generate();
-template uint32 ObjectGuidGenerator<HIGHGUID_BATTLEGROUND>::Generate();
-template uint32 ObjectGuidGenerator<HIGHGUID_INSTANCE>::Generate();
-template uint32 ObjectGuidGenerator<HIGHGUID_GROUP>::Generate();
-template uint32 ObjectGuidGenerator<HIGHGUID_GUILD>::Generate();
+template uint64 ObjectGuidGenerator<HIGHGUID_ITEM>::Generate();
+template uint64 ObjectGuidGenerator<HIGHGUID_PLAYER>::Generate();
+template uint64 ObjectGuidGenerator<HIGHGUID_GAMEOBJECT>::Generate();
+template uint64 ObjectGuidGenerator<HIGHGUID_TRANSPORT>::Generate();
+template uint64 ObjectGuidGenerator<HIGHGUID_UNIT>::Generate();
+template uint64 ObjectGuidGenerator<HIGHGUID_PET>::Generate();
+template uint64 ObjectGuidGenerator<HIGHGUID_VEHICLE>::Generate();
+template uint64 ObjectGuidGenerator<HIGHGUID_DYNAMICOBJECT>::Generate();
+template uint64 ObjectGuidGenerator<HIGHGUID_CORPSE>::Generate();
+template uint64 ObjectGuidGenerator<HIGHGUID_AREATRIGGER>::Generate();
+template uint64 ObjectGuidGenerator<HIGHGUID_BATTLEGROUND>::Generate();
+template uint64 ObjectGuidGenerator<HIGHGUID_INSTANCE>::Generate();
+template uint64 ObjectGuidGenerator<HIGHGUID_GROUP>::Generate();
+template uint64 ObjectGuidGenerator<HIGHGUID_GUILD>::Generate();
diff --git a/src/server/game/Entities/Object/ObjectGuid.h b/src/server/game/Entities/Object/ObjectGuid.h
index b604f23e3e8..039cd6aad8b 100644
--- a/src/server/game/Entities/Object/ObjectGuid.h
+++ b/src/server/game/Entities/Object/ObjectGuid.h
@@ -87,29 +87,29 @@ class ObjectGuid
public:
static ObjectGuid const Empty;
- ObjectGuid() { _data._guid = UI64LIT(0); }
- explicit ObjectGuid(uint64 guid) { _data._guid = guid; }
- ObjectGuid(HighGuid hi, uint32 entry, uint32 counter) { _data._guid = counter ? uint64(counter) | (uint64(entry) << 32) | (uint64(hi) << ((hi == HIGHGUID_CORPSE || hi == HIGHGUID_AREATRIGGER) ? 48 : 52)) : 0; }
- ObjectGuid(HighGuid hi, uint32 counter) { _data._guid = counter ? uint64(counter) | (uint64(hi) << ((hi == HIGHGUID_CORPSE || hi == HIGHGUID_AREATRIGGER) ? 48 : 52)) : 0; }
+ ObjectGuid() { _guid = UI64LIT(0); }
+ explicit ObjectGuid(uint64 guid) { _guid = guid; }
+ ObjectGuid(HighGuid hi, uint32 entry, uint64 counter) { _guid = counter ? uint64(counter) | (uint64(entry) << 32) | (uint64(hi) << ((hi == HIGHGUID_CORPSE || hi == HIGHGUID_AREATRIGGER) ? 48 : 52)) : 0; }
+ ObjectGuid(HighGuid hi, uint64 counter) { _guid = counter ? uint64(counter) | (uint64(hi) << ((hi == HIGHGUID_CORPSE || hi == HIGHGUID_AREATRIGGER) ? 48 : 52)) : 0; }
- operator uint64() const { return _data._guid; }
- PackedGuidReader ReadAsPacked() { return PackedGuidReader(*this); }
+ operator uint64() const { return _guid; }
+ DECLSPEC_DEPRECATED PackedGuidReader ReadAsPacked() ATTR_DEPRECATED { return PackedGuidReader(*this); }
- void Set(uint64 guid) { _data._guid = guid; }
- void Clear() { _data._guid = 0; }
+ void Set(uint64 guid) { _guid = guid; }
+ void Clear() { _guid = 0; }
- PackedGuid WriteAsPacked() const;
+ DECLSPEC_DEPRECATED PackedGuid WriteAsPacked() const ATTR_DEPRECATED;
- uint64 GetRawValue() const { return _data._guid; }
+ uint64 GetRawValue() const { return _guid; }
HighGuid GetHigh() const
{
- uint32 temp = ((uint64(_data._guid) >> 48) & 0x0000FFFF);
+ uint32 temp = ((uint64(_guid) >> 48) & 0x0000FFFF);
return HighGuid((temp == HIGHGUID_CORPSE || temp == HIGHGUID_AREATRIGGER) ? temp : ((temp >> 4) & 0x00000FFF));
}
- uint32 GetEntry() const { return HasEntry() ? uint32((_data._guid >> 32) & UI64LIT(0x00000000000FFFFF)) : 0; }
+ uint32 GetEntry() const { return HasEntry() ? uint32((_guid >> 32) & UI64LIT(0x00000000000FFFFF)) : 0; }
uint32 GetCounter() const
{
- return uint32(_data._guid & UI64LIT(0x00000000FFFFFFFF));
+ return uint32(_guid & UI64LIT(0x00000000FFFFFFFF));
}
static uint32 GetMaxCounter(HighGuid /*high*/)
@@ -119,19 +119,19 @@ class ObjectGuid
uint32 GetMaxCounter() const { return GetMaxCounter(GetHigh()); }
- uint8& operator[](uint32 index)
+ DECLSPEC_DEPRECATED uint8& operator[](uint32 index) ATTR_DEPRECATED
{
ASSERT(index < sizeof(uint64));
- return _data._bytes[index];
+ return ((uint8*)&_guid)[index];
}
- uint8 const& operator[](uint32 index) const
+ DECLSPEC_DEPRECATED uint8 const& operator[](uint32 index) const ATTR_DEPRECATED
{
ASSERT(index < sizeof(uint64));
- return _data._bytes[index];
+ return ((uint8 const*)&_guid)[index];
}
- bool IsEmpty() const { return _data._guid == 0; }
+ bool IsEmpty() const { return _guid == 0; }
bool IsCreature() const { return GetHigh() == HIGHGUID_UNIT; }
bool IsPet() const { return GetHigh() == HIGHGUID_PET; }
bool IsVehicle() const { return GetHigh() == HIGHGUID_VEHICLE; }
@@ -214,14 +214,8 @@ class ObjectGuid
bool HasEntry() const { return HasEntry(GetHigh()); }
explicit ObjectGuid(uint32 const&) = delete; // no implementation, used to catch wrong type assignment
- ObjectGuid(HighGuid, uint32, uint64 counter) = delete; // no implementation, used to catch wrong type assignment
- ObjectGuid(HighGuid, uint64 counter) = delete; // no implementation, used to catch wrong type assignment
- union
- {
- uint64 _guid;
- uint8 _bytes[sizeof(uint64)];
- } _data;
+ uint64 _guid;
};
// Some Shared defines
@@ -255,14 +249,14 @@ template<HighGuid high>
class ObjectGuidGenerator
{
public:
- explicit ObjectGuidGenerator(uint32 start = 1) : _nextGuid(start) { }
+ explicit ObjectGuidGenerator(uint64 start = 1) : _nextGuid(start) { }
void Set(uint32 val) { _nextGuid = val; }
- uint32 Generate();
- uint32 GetNextAfterMaxUsed() const { return _nextGuid; }
+ uint64 Generate();
+ uint64 GetNextAfterMaxUsed() const { return _nextGuid; }
private:
- uint32 _nextGuid;
+ uint64 _nextGuid;
};
ByteBuffer& operator<<(ByteBuffer& buf, ObjectGuid const& guid);
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index b52e5a2140f..ceb767835af 100644
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -7638,7 +7638,7 @@ void Player::SetInArenaTeam(uint32 ArenaTeamId, uint8 slot, uint8 type)
uint32 Player::GetArenaTeamIdFromDB(ObjectGuid guid, uint8 type)
{
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_ARENA_TEAM_ID_BY_PLAYER_GUID);
- stmt->setUInt32(0, guid.GetCounter());
+ stmt->setUInt64(0, guid.GetCounter());
stmt->setUInt8(1, type);
PreparedQueryResult result = CharacterDatabase.Query(stmt);
@@ -21453,7 +21453,7 @@ void Player::RemovePetitionsAndSigns(ObjectGuid guid, uint32 type)
void Player::LeaveAllArenaTeams(ObjectGuid guid)
{
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_PLAYER_ARENA_TEAMS);
- stmt->setUInt32(0, guid.GetCounter());
+ stmt->setUInt64(0, guid.GetCounter());
PreparedQueryResult result = CharacterDatabase.Query(stmt);
if (!result)
diff --git a/src/server/game/Guilds/Guild.cpp b/src/server/game/Guilds/Guild.cpp
index b7f3f2c2f79..91b8015b2e6 100644
--- a/src/server/game/Guilds/Guild.cpp
+++ b/src/server/game/Guilds/Guild.cpp
@@ -2683,7 +2683,7 @@ void Guild::MassInviteToEvent(WorldSession* session, uint32 minLevel, uint32 max
if (member->GetGUID() != session->GetPlayer()->GetGUID() && level >= minLevel && level <= maxLevel && member->IsRankNotLower(minRank))
{
- data.appendPackGUID(member->GetGUID().GetRawValue());
+ data << member->GetGUID().WriteAsPacked();
data << uint8(0); // unk
++count;
}
diff --git a/src/server/game/Handlers/AuctionHouseHandler.cpp b/src/server/game/Handlers/AuctionHouseHandler.cpp
index ca1787462ba..2f22aa30374 100644
--- a/src/server/game/Handlers/AuctionHouseHandler.cpp
+++ b/src/server/game/Handlers/AuctionHouseHandler.cpp
@@ -311,7 +311,7 @@ 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 %u with count %u with initial bid %u with buyout %u and with time %u (in sec) in auctionhouse %u",
+ 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());
sAuctionMgr->AddAItem(item);
auctionHouse->AddAuction(AH);
@@ -359,7 +359,7 @@ 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 %u with count %u with initial bid %u with buyout %u and with time %u (in sec) in auctionhouse %u",
+ 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());
sAuctionMgr->AddAItem(newItem);
auctionHouse->AddAuction(AH);
@@ -497,7 +497,7 @@ void WorldSession::HandleAuctionPlaceBid(WorldPacket& recvData)
GetPlayer()->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_AUCTION_BID, price);
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_AUCTION_BID);
- stmt->setUInt32(0, auction->bidder);
+ stmt->setUInt64(0, auction->bidder);
stmt->setUInt32(1, auction->bid);
stmt->setUInt32(2, auction->Id);
trans->Append(stmt);
@@ -584,7 +584,7 @@ void WorldSession::HandleAuctionRemoveItem(WorldPacket& recvData)
}
else
{
- TC_LOG_ERROR("network", "Auction id: %u got non existing item (item guid : %u)!", auction->Id, auction->itemGUIDLow);
+ TC_LOG_ERROR("network", "Auction id: %u got non existing item (item guid : " UI64FMTD ")!", auction->Id, auction->itemGUIDLow);
SendAuctionCommandResult(NULL, AUCTION_CANCEL, ERR_AUCTION_DATABASE_ERROR);
return;
}
diff --git a/src/server/game/Handlers/CharacterHandler.cpp b/src/server/game/Handlers/CharacterHandler.cpp
index 25a6397748f..2c26f61c9c6 100644
--- a/src/server/game/Handlers/CharacterHandler.cpp
+++ b/src/server/game/Handlers/CharacterHandler.cpp
@@ -67,7 +67,7 @@ bool LoginQueryHolder::Initialize()
SetSize(MAX_PLAYER_LOGIN_QUERY);
bool res = true;
- uint32 lowGuid = m_guid.GetCounter();
+ uint64 lowGuid = m_guid.GetCounter();
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER);
stmt->setUInt32(0, lowGuid);
@@ -158,7 +158,7 @@ bool LoginQueryHolder::Initialize()
res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_GUILD, stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_ARENAINFO);
- stmt->setUInt32(0, lowGuid);
+ stmt->setUInt64(0, lowGuid);
res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_ARENA_INFO, stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_ACHIEVEMENTS);
diff --git a/src/server/game/Mails/Mail.cpp b/src/server/game/Mails/Mail.cpp
index 820a54b9760..f5dc42271b5 100644
--- a/src/server/game/Mails/Mail.cpp
+++ b/src/server/game/Mails/Mail.cpp
@@ -73,7 +73,7 @@ MailSender::MailSender(Player* sender)
MailReceiver::MailReceiver(Player* receiver) : m_receiver(receiver), m_receiver_lowguid(receiver->GetGUIDLow()) { }
-MailReceiver::MailReceiver(Player* receiver, uint32 receiver_lowguid) : m_receiver(receiver), m_receiver_lowguid(receiver_lowguid)
+MailReceiver::MailReceiver(Player* receiver, uint64 receiver_lowguid) : m_receiver(receiver), m_receiver_lowguid(receiver_lowguid)
{
ASSERT(!receiver || receiver->GetGUIDLow() == receiver_lowguid);
}
diff --git a/src/server/game/Mails/Mail.h b/src/server/game/Mails/Mail.h
index abae99330c0..170ae1ab35c 100644
--- a/src/server/game/Mails/Mail.h
+++ b/src/server/game/Mails/Mail.h
@@ -102,15 +102,15 @@ class MailSender
class MailReceiver
{
public: // Constructors
- explicit MailReceiver(uint32 receiver_lowguid) : m_receiver(NULL), m_receiver_lowguid(receiver_lowguid) { }
+ explicit MailReceiver(uint64 receiver_lowguid) : m_receiver(NULL), m_receiver_lowguid(receiver_lowguid) { }
MailReceiver(Player* receiver);
- MailReceiver(Player* receiver, uint32 receiver_lowguid);
+ MailReceiver(Player* receiver, uint64 receiver_lowguid);
public: // Accessors
Player* GetPlayer() const { return m_receiver; }
uint32 GetPlayerGUIDLow() const { return m_receiver_lowguid; }
private:
Player* m_receiver;
- uint32 m_receiver_lowguid;
+ uint64 m_receiver_lowguid;
};
class MailDraft
diff --git a/src/server/scripts/Commands/cs_list.cpp b/src/server/scripts/Commands/cs_list.cpp
index f12fbee44b5..035400f60aa 100644
--- a/src/server/scripts/Commands/cs_list.cpp
+++ b/src/server/scripts/Commands/cs_list.cpp
@@ -282,8 +282,8 @@ public:
do
{
Field* fields = result->Fetch();
- uint32 itemGuid = fields[0].GetUInt32();
- uint32 owner = fields[1].GetUInt32();
+ uint64 itemGuid = fields[0].GetUInt64();
+ uint64 owner = fields[1].GetUInt64();
uint32 ownerAccountId = fields[2].GetUInt32();
std::string ownerName = fields[3].GetString();