mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core/PacketIO: Use new time utilities in packets instead of plain time_t/uint32
This commit is contained in:
@@ -417,8 +417,8 @@ void PlayerAchievementMgr::SendAllData(Player const* /*receiver*/) const
|
||||
progress.Player = itr->second.PlayerGUID;
|
||||
progress.Flags = 0;
|
||||
progress.Date = itr->second.Date;
|
||||
progress.TimeFromStart = 0;
|
||||
progress.TimeFromCreate = 0;
|
||||
progress.TimeFromStart = Seconds::zero();
|
||||
progress.TimeFromCreate = Seconds::zero();
|
||||
achievementData.Data.Progress.push_back(progress);
|
||||
|
||||
if (criteria->FlagsCu & CRITERIA_FLAG_CU_ACCOUNT)
|
||||
@@ -429,8 +429,8 @@ void PlayerAchievementMgr::SendAllData(Player const* /*receiver*/) const
|
||||
progress.Player = _owner->GetSession()->GetBattlenetAccountGUID();
|
||||
progress.Flags = 0;
|
||||
progress.Date = itr->second.Date;
|
||||
progress.TimeFromStart = 0;
|
||||
progress.TimeFromCreate = 0;
|
||||
progress.TimeFromStart = Seconds::zero();
|
||||
progress.TimeFromCreate = Seconds::zero();
|
||||
allAccountCriteria.Progress.push_back(progress);
|
||||
}
|
||||
}
|
||||
@@ -474,8 +474,8 @@ void PlayerAchievementMgr::SendAchievementInfo(Player* receiver, uint32 /*achiev
|
||||
progress.Player = itr->second.PlayerGUID;
|
||||
progress.Flags = 0;
|
||||
progress.Date = itr->second.Date;
|
||||
progress.TimeFromStart = 0;
|
||||
progress.TimeFromCreate = 0;
|
||||
progress.TimeFromStart = Seconds::zero();
|
||||
progress.TimeFromCreate = Seconds::zero();
|
||||
inspectedAchievements.Data.Progress.push_back(progress);
|
||||
}
|
||||
|
||||
@@ -596,8 +596,8 @@ void PlayerAchievementMgr::SendCriteriaUpdate(Criteria const* criteria, Criteria
|
||||
criteriaUpdate.Progress.Flags = timedCompleted ? 1 : 0; // 1 is for keeping the counter at 0 in client
|
||||
|
||||
criteriaUpdate.Progress.Date = progress->Date;
|
||||
criteriaUpdate.Progress.TimeFromStart = uint32(timeElapsed.count());
|
||||
criteriaUpdate.Progress.TimeFromCreate = 0;
|
||||
criteriaUpdate.Progress.TimeFromStart = timeElapsed;
|
||||
criteriaUpdate.Progress.TimeFromCreate = Seconds::zero();
|
||||
|
||||
SendPacket(criteriaUpdate.Write());
|
||||
}
|
||||
@@ -613,7 +613,7 @@ void PlayerAchievementMgr::SendCriteriaUpdate(Criteria const* criteria, Criteria
|
||||
criteriaUpdate.Flags = timedCompleted ? 1 : 0; // 1 is for keeping the counter at 0 in client
|
||||
|
||||
criteriaUpdate.CurrentTime = progress->Date;
|
||||
criteriaUpdate.ElapsedTime = uint32(timeElapsed.count());
|
||||
criteriaUpdate.ElapsedTime = timeElapsed;
|
||||
criteriaUpdate.CreationTime = 0;
|
||||
|
||||
SendPacket(criteriaUpdate.Write());
|
||||
|
||||
@@ -411,11 +411,11 @@ inline void Battleground::_ProcessJoin(uint32 diff)
|
||||
// Send packet every 10 seconds until the 2nd field reach 0
|
||||
if (m_CountdownTimer >= 10000)
|
||||
{
|
||||
int32 countdownMaxForBGType = isArena() ? ARENA_COUNTDOWN_MAX : BATTLEGROUND_COUNTDOWN_MAX;
|
||||
Seconds countdownMaxForBGType = Seconds(isArena() ? ARENA_COUNTDOWN_MAX : BATTLEGROUND_COUNTDOWN_MAX);
|
||||
|
||||
WorldPackets::Misc::StartTimer startTimer;
|
||||
startTimer.Type = 0;
|
||||
startTimer.TimeLeft = countdownMaxForBGType - (GetElapsedTime() / 1000);
|
||||
startTimer.TimeLeft = std::chrono::duration_cast<Seconds>(countdownMaxForBGType - Milliseconds(GetElapsedTime()));
|
||||
startTimer.TotalTime = countdownMaxForBGType;
|
||||
|
||||
for (BattlegroundPlayerMap::const_iterator itr = GetPlayers().begin(); itr != GetPlayers().end(); ++itr)
|
||||
@@ -745,7 +745,7 @@ void Battleground::EndBattleground(uint32 winner)
|
||||
|
||||
WorldPackets::Battleground::PVPMatchComplete pvpMatchComplete;
|
||||
pvpMatchComplete.Winner = GetWinner();
|
||||
pvpMatchComplete.Duration = std::max<int32>(0, (GetElapsedTime() - BG_START_DELAY_2M) / IN_MILLISECONDS);
|
||||
pvpMatchComplete.Duration = std::chrono::duration_cast<Seconds>(Milliseconds(std::max<int32>(0, (GetElapsedTime() - BG_START_DELAY_2M))));
|
||||
pvpMatchComplete.LogData.emplace();
|
||||
BuildPvPLogDataPacket(*pvpMatchComplete.LogData);
|
||||
pvpMatchComplete.Write();
|
||||
@@ -1076,8 +1076,9 @@ void Battleground::AddPlayer(Player* player)
|
||||
|
||||
if (GetElapsedTime() >= BG_START_DELAY_2M)
|
||||
{
|
||||
pvpMatchInitialize.Duration = (GetElapsedTime() - BG_START_DELAY_2M) / IN_MILLISECONDS;
|
||||
pvpMatchInitialize.StartTime = GameTime::GetGameTime() - pvpMatchInitialize.Duration;
|
||||
Milliseconds duration(GetElapsedTime() - BG_START_DELAY_2M);
|
||||
pvpMatchInitialize.Duration = std::chrono::duration_cast<Seconds>(duration);
|
||||
pvpMatchInitialize.StartTime = GameTime::GetGameTimeSystemPoint() - duration;
|
||||
}
|
||||
pvpMatchInitialize.ArenaFaction = player->GetBGTeam() == HORDE ? BG_TEAM_HORDE : BG_TEAM_ALLIANCE;
|
||||
pvpMatchInitialize.BattlemasterListID = GetTypeID();
|
||||
@@ -1107,11 +1108,11 @@ void Battleground::AddPlayer(Player* player)
|
||||
{
|
||||
player->CastSpell(player, SPELL_PREPARATION, true); // reduces all mana cost of spells.
|
||||
|
||||
int32 countdownMaxForBGType = isArena() ? ARENA_COUNTDOWN_MAX : BATTLEGROUND_COUNTDOWN_MAX;
|
||||
Seconds countdownMaxForBGType = Seconds(isArena() ? ARENA_COUNTDOWN_MAX : BATTLEGROUND_COUNTDOWN_MAX);
|
||||
|
||||
WorldPackets::Misc::StartTimer startTimer;
|
||||
startTimer.Type = 0;
|
||||
startTimer.TimeLeft = countdownMaxForBGType - (GetElapsedTime() / 1000);
|
||||
startTimer.TimeLeft = std::chrono::duration_cast<Seconds>(countdownMaxForBGType - Milliseconds(GetElapsedTime()));
|
||||
startTimer.TotalTime = countdownMaxForBGType;
|
||||
player->SendDirectMessage(startTimer.Write());
|
||||
}
|
||||
|
||||
@@ -2299,7 +2299,7 @@ void Group::StartReadyCheck(ObjectGuid starterGuid, int8 partyIndex, Millisecond
|
||||
readyCheckStarted.PartyGUID = m_guid;
|
||||
readyCheckStarted.PartyIndex = partyIndex;
|
||||
readyCheckStarted.InitiatorGUID = starterGuid;
|
||||
readyCheckStarted.Duration = uint32(duration.count());
|
||||
readyCheckStarted.Duration = duration;
|
||||
BroadcastPacket(readyCheckStarted.Write(), false);
|
||||
}
|
||||
|
||||
|
||||
@@ -182,7 +182,7 @@ void WorldSession::HandleAuctionGetCommodityQuote(WorldPackets::AuctionHouse::Au
|
||||
{
|
||||
commodityQuoteResult.TotalPrice = quote->TotalPrice;
|
||||
commodityQuoteResult.Quantity = quote->Quantity;
|
||||
commodityQuoteResult.QuoteDuration = std::chrono::duration_cast<Milliseconds>(quote->ValidTo - GameTime::GetGameTimeSteadyPoint()).count();
|
||||
commodityQuoteResult.QuoteDuration = std::chrono::duration_cast<Milliseconds>(quote->ValidTo - GameTime::GetGameTimeSteadyPoint());
|
||||
}
|
||||
|
||||
commodityQuoteResult.DesiredDelay = uint32(throttle.DelayUntilNext.count());
|
||||
|
||||
@@ -261,7 +261,7 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPackets::Battleground::Battl
|
||||
if (!_player->InBattlegroundQueue())
|
||||
{
|
||||
TC_LOG_DEBUG("bg.battleground", "CMSG_BATTLEFIELD_PORT %s Slot: %u, Unk: %u, Time: %u, AcceptedInvite: %u. Player not in queue!",
|
||||
GetPlayerInfo().c_str(), battlefieldPort.Ticket.Id, uint32(battlefieldPort.Ticket.Type), battlefieldPort.Ticket.Time, uint32(battlefieldPort.AcceptedInvite));
|
||||
GetPlayerInfo().c_str(), battlefieldPort.Ticket.Id, uint32(battlefieldPort.Ticket.Type), battlefieldPort.Ticket.Time.AsUnderlyingType(), uint32(battlefieldPort.AcceptedInvite));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -269,7 +269,7 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPackets::Battleground::Battl
|
||||
if (bgQueueTypeId == BATTLEGROUND_QUEUE_NONE)
|
||||
{
|
||||
TC_LOG_DEBUG("bg.battleground", "CMSG_BATTLEFIELD_PORT %s Slot: %u, Unk: %u, Time: %u, AcceptedInvite: %u. Invalid queueSlot!",
|
||||
GetPlayerInfo().c_str(), battlefieldPort.Ticket.Id, uint32(battlefieldPort.Ticket.Type), battlefieldPort.Ticket.Time, uint32(battlefieldPort.AcceptedInvite));
|
||||
GetPlayerInfo().c_str(), battlefieldPort.Ticket.Id, uint32(battlefieldPort.Ticket.Type), battlefieldPort.Ticket.Time.AsUnderlyingType(), uint32(battlefieldPort.AcceptedInvite));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -280,14 +280,14 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPackets::Battleground::Battl
|
||||
if (!bgQueue.GetPlayerGroupInfoData(_player->GetGUID(), &ginfo))
|
||||
{
|
||||
TC_LOG_DEBUG("bg.battleground", "CMSG_BATTLEFIELD_PORT %s Slot: %u, Unk: %u, Time: %u, AcceptedInvite: %u. Player not in queue (No player Group Info)!",
|
||||
GetPlayerInfo().c_str(), battlefieldPort.Ticket.Id, uint32(battlefieldPort.Ticket.Type), battlefieldPort.Ticket.Time, uint32(battlefieldPort.AcceptedInvite));
|
||||
GetPlayerInfo().c_str(), battlefieldPort.Ticket.Id, uint32(battlefieldPort.Ticket.Type), battlefieldPort.Ticket.Time.AsUnderlyingType(), uint32(battlefieldPort.AcceptedInvite));
|
||||
return;
|
||||
}
|
||||
// if action == 1, then player must have been invited to join
|
||||
if (!ginfo.IsInvitedToBGInstanceGUID && battlefieldPort.AcceptedInvite)
|
||||
{
|
||||
TC_LOG_DEBUG("bg.battleground", "CMSG_BATTLEFIELD_PORT %s Slot: %u, Unk: %u, Time: %u, AcceptedInvite: %u. Player is not invited to any bg!",
|
||||
GetPlayerInfo().c_str(), battlefieldPort.Ticket.Id, uint32(battlefieldPort.Ticket.Type), battlefieldPort.Ticket.Time, uint32(battlefieldPort.AcceptedInvite));
|
||||
GetPlayerInfo().c_str(), battlefieldPort.Ticket.Id, uint32(battlefieldPort.Ticket.Type), battlefieldPort.Ticket.Time.AsUnderlyingType(), uint32(battlefieldPort.AcceptedInvite));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -300,7 +300,7 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPackets::Battleground::Battl
|
||||
if (battlefieldPort.AcceptedInvite)
|
||||
{
|
||||
TC_LOG_DEBUG("bg.battleground", "CMSG_BATTLEFIELD_PORT %s Slot: %u, Unk: %u, Time: %u, AcceptedInvite: %u. Cant find BG with id %u!",
|
||||
GetPlayerInfo().c_str(), battlefieldPort.Ticket.Id, uint32(battlefieldPort.Ticket.Type), battlefieldPort.Ticket.Time, uint32(battlefieldPort.AcceptedInvite), ginfo.IsInvitedToBGInstanceGUID);
|
||||
GetPlayerInfo().c_str(), battlefieldPort.Ticket.Id, uint32(battlefieldPort.Ticket.Type), battlefieldPort.Ticket.Time.AsUnderlyingType(), uint32(battlefieldPort.AcceptedInvite), ginfo.IsInvitedToBGInstanceGUID);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -313,7 +313,7 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPackets::Battleground::Battl
|
||||
}
|
||||
|
||||
TC_LOG_DEBUG("bg.battleground", "CMSG_BATTLEFIELD_PORT %s Slot: %u, Unk: %u, Time: %u, AcceptedInvite: %u.",
|
||||
GetPlayerInfo().c_str(), battlefieldPort.Ticket.Id, uint32(battlefieldPort.Ticket.Type), battlefieldPort.Ticket.Time, uint32(battlefieldPort.AcceptedInvite));
|
||||
GetPlayerInfo().c_str(), battlefieldPort.Ticket.Id, uint32(battlefieldPort.Ticket.Type), battlefieldPort.Ticket.Time.AsUnderlyingType(), uint32(battlefieldPort.AcceptedInvite));
|
||||
|
||||
// get real bg type
|
||||
bgTypeId = bg->GetTypeID();
|
||||
|
||||
@@ -1057,9 +1057,9 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder* holder)
|
||||
|
||||
WorldPackets::ClientConfig::AccountDataTimes accountDataTimes;
|
||||
accountDataTimes.PlayerGuid = playerGuid;
|
||||
accountDataTimes.ServerTime = uint32(GameTime::GetGameTime());
|
||||
accountDataTimes.ServerTime = GameTime::GetGameTimeSystemPoint();
|
||||
for (uint32 i = 0; i < NUM_ACCOUNT_DATA_TYPES; ++i)
|
||||
accountDataTimes.AccountTimes[i] = uint32(GetAccountData(AccountDataType(i))->Time);
|
||||
accountDataTimes.AccountTimes[i] = GetAccountData(AccountDataType(i))->Time;
|
||||
|
||||
SendPacket(accountDataTimes.Write());
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include "WorldSession.h"
|
||||
#include "AchievementPackets.h"
|
||||
#include "Common.h"
|
||||
#include "GameTime.h"
|
||||
#include "Guild.h"
|
||||
#include "GuildMgr.h"
|
||||
#include "GuildPackets.h"
|
||||
@@ -386,7 +387,7 @@ void WorldSession::HandleRequestGuildRewardsList(WorldPackets::Guild::RequestGui
|
||||
std::vector<GuildReward> const& rewards = sGuildMgr->GetGuildRewards();
|
||||
|
||||
WorldPackets::Guild::GuildRewardList rewardList;
|
||||
rewardList.Version = uint32(time(nullptr));
|
||||
rewardList.Version = GameTime::GetGameTimeSystemPoint();
|
||||
rewardList.RewardItems.reserve(rewards.size());
|
||||
|
||||
for (uint32 i = 0; i < rewards.size(); i++)
|
||||
|
||||
@@ -634,7 +634,7 @@ void WorldSession::HandleAreaTriggerOpcode(WorldPackets::AreaTrigger::AreaTrigge
|
||||
void WorldSession::HandleUpdateAccountData(WorldPackets::ClientConfig::UserClientUpdateAccountData& packet)
|
||||
{
|
||||
TC_LOG_DEBUG("network", "WORLD: Received CMSG_UPDATE_ACCOUNT_DATA: type %u, time %u, decompressedSize %u",
|
||||
packet.DataType, packet.Time, packet.Size);
|
||||
packet.DataType, packet.Time.AsUnderlyingType(), packet.Size);
|
||||
|
||||
if (packet.DataType > NUM_ACCOUNT_DATA_TYPES)
|
||||
return;
|
||||
@@ -1045,7 +1045,7 @@ void WorldSession::HandleGuildSetFocusedAchievement(WorldPackets::Achievement::G
|
||||
void WorldSession::HandleServerTimeOffsetRequest(WorldPackets::Misc::ServerTimeOffsetRequest& /*request*/)
|
||||
{
|
||||
WorldPackets::Misc::ServerTimeOffset response;
|
||||
response.Time = time(nullptr);
|
||||
response.Time = GameTime::GetGameTimeSystemPoint();
|
||||
SendPacket(response.Write());
|
||||
}
|
||||
|
||||
|
||||
@@ -427,7 +427,7 @@ void WorldSession::SendQueryPetNameResponse(ObjectGuid guid)
|
||||
if (Creature* unit = ObjectAccessor::GetCreatureOrPetOrVehicle(*_player, guid))
|
||||
{
|
||||
response.Allow = true;
|
||||
response.Timestamp = unit->m_unitData->PetNameTimestamp;
|
||||
response.Timestamp = *unit->m_unitData->PetNameTimestamp;
|
||||
response.Name = unit->GetName();
|
||||
|
||||
if (Pet* pet = unit->ToPet())
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "Corpse.h"
|
||||
#include "DatabaseEnv.h"
|
||||
#include "DB2Stores.h"
|
||||
#include "GameTime.h"
|
||||
#include "Item.h"
|
||||
#include "Log.h"
|
||||
#include "MapManager.h"
|
||||
@@ -59,7 +60,7 @@ void WorldSession::HandleQueryTimeOpcode(WorldPackets::Query::QueryTime& /*query
|
||||
void WorldSession::SendQueryTimeResponse()
|
||||
{
|
||||
WorldPackets::Query::QueryTimeResponse queryTimeResponse;
|
||||
queryTimeResponse.CurrentTime = time(nullptr);
|
||||
queryTimeResponse.CurrentTime = GameTime::GetGameTimeSystemPoint();
|
||||
SendPacket(queryTimeResponse.Write());
|
||||
}
|
||||
|
||||
|
||||
@@ -254,7 +254,7 @@ void QuestObjectiveCriteriaMgr::SendCriteriaUpdate(Criteria const* criteria, Cri
|
||||
criteriaUpdate.Flags = timedCompleted ? 1 : 0; // 1 is for keeping the counter at 0 in client
|
||||
|
||||
criteriaUpdate.CurrentTime = progress->Date;
|
||||
criteriaUpdate.ElapsedTime = uint32(timeElapsed.count());
|
||||
criteriaUpdate.ElapsedTime = timeElapsed;
|
||||
criteriaUpdate.CreationTime = 0;
|
||||
|
||||
SendPacket(criteriaUpdate.Write());
|
||||
|
||||
@@ -149,8 +149,8 @@ void Scenario::SendCriteriaUpdate(Criteria const * criteria, CriteriaProgress co
|
||||
if (criteria->Entry->StartTimer)
|
||||
progressUpdate.CriteriaProgress.Flags = timedCompleted ? 1 : 0;
|
||||
|
||||
progressUpdate.CriteriaProgress.TimeFromStart = uint32(timeElapsed.count());
|
||||
progressUpdate.CriteriaProgress.TimeFromCreate = 0;
|
||||
progressUpdate.CriteriaProgress.TimeFromStart = timeElapsed;
|
||||
progressUpdate.CriteriaProgress.TimeFromCreate = Seconds::zero();
|
||||
|
||||
SendPacket(progressUpdate.Write());
|
||||
}
|
||||
|
||||
@@ -33,8 +33,8 @@ ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::Achievement::CriteriaProg
|
||||
data << uint64(criteria.Quantity);
|
||||
data << criteria.Player;
|
||||
data.AppendPackedTime(criteria.Date);
|
||||
data << uint32(criteria.TimeFromStart);
|
||||
data << uint32(criteria.TimeFromCreate);
|
||||
data << criteria.TimeFromStart;
|
||||
data << criteria.TimeFromCreate;
|
||||
data.WriteBits(criteria.Flags, 4);
|
||||
data.WriteBit(criteria.RafAcceptanceID.is_initialized());
|
||||
data.FlushBits();
|
||||
@@ -90,8 +90,8 @@ WorldPacket const* WorldPackets::Achievement::CriteriaUpdate::Write()
|
||||
_worldPacket << PlayerGUID;
|
||||
_worldPacket << uint32(Flags);
|
||||
_worldPacket.AppendPackedTime(CurrentTime);
|
||||
_worldPacket << uint32(ElapsedTime);
|
||||
_worldPacket << uint32(CreationTime);
|
||||
_worldPacket << ElapsedTime;
|
||||
_worldPacket << CreationTime;
|
||||
_worldPacket.WriteBit(RafAcceptanceID.is_initialized());
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
@@ -155,8 +155,8 @@ WorldPacket const* WorldPackets::Achievement::GuildCriteriaUpdate::Write()
|
||||
for (GuildCriteriaProgress const& progress : Progress)
|
||||
{
|
||||
_worldPacket << int32(progress.CriteriaID);
|
||||
_worldPacket << uint32(progress.DateCreated);
|
||||
_worldPacket << uint32(progress.DateStarted);
|
||||
_worldPacket << progress.DateCreated;
|
||||
_worldPacket << progress.DateStarted;
|
||||
_worldPacket.AppendPackedTime(progress.DateUpdated);
|
||||
_worldPacket << uint64(progress.Quantity);
|
||||
_worldPacket << progress.PlayerGUID;
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "Packet.h"
|
||||
#include "ObjectGuid.h"
|
||||
#include "Optional.h"
|
||||
#include "PacketUtilities.h"
|
||||
|
||||
namespace WorldPackets
|
||||
{
|
||||
@@ -42,8 +43,8 @@ namespace WorldPackets
|
||||
ObjectGuid Player;
|
||||
uint32 Flags = 0;
|
||||
time_t Date = time_t(0);
|
||||
uint32 TimeFromStart = 0;
|
||||
uint32 TimeFromCreate = 0;
|
||||
Duration<Seconds> TimeFromStart;
|
||||
Duration<Seconds> TimeFromCreate;
|
||||
Optional<uint64> RafAcceptanceID;
|
||||
};
|
||||
|
||||
@@ -96,8 +97,8 @@ namespace WorldPackets
|
||||
ObjectGuid PlayerGUID;
|
||||
uint32 Flags = 0;
|
||||
time_t CurrentTime = time_t(0);
|
||||
uint32 ElapsedTime = 0;
|
||||
uint32 CreationTime = 0;
|
||||
Duration<Seconds> ElapsedTime;
|
||||
Timestamp<> CreationTime;
|
||||
Optional<uint64> RafAcceptanceID;
|
||||
};
|
||||
|
||||
@@ -164,8 +165,8 @@ namespace WorldPackets
|
||||
struct GuildCriteriaProgress
|
||||
{
|
||||
int32 CriteriaID = 0;
|
||||
uint32 DateCreated = 0;
|
||||
uint32 DateStarted = 0;
|
||||
Timestamp<> DateCreated;
|
||||
Timestamp<> DateStarted;
|
||||
time_t DateUpdated = 0;
|
||||
uint64 Quantity = 0;
|
||||
ObjectGuid PlayerGUID;
|
||||
|
||||
@@ -554,7 +554,7 @@ WorldPacket const* AuctionGetCommodityQuoteResult::Write()
|
||||
_worldPacket << uint32(*Quantity);
|
||||
|
||||
if (QuoteDuration)
|
||||
_worldPacket << int32(*QuoteDuration);
|
||||
_worldPacket << *QuoteDuration;
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
@@ -396,7 +396,7 @@ namespace WorldPackets
|
||||
|
||||
Optional<uint64> TotalPrice;
|
||||
Optional<uint32> Quantity;
|
||||
Optional<int32> QuoteDuration;
|
||||
Optional<Duration<Milliseconds>> QuoteDuration;
|
||||
int32 Unknown830 = 0;
|
||||
uint32 DesiredDelay = 0;
|
||||
};
|
||||
|
||||
@@ -127,7 +127,7 @@ WorldPacket const* WorldPackets::Auth::AuthResponse::Write()
|
||||
_worldPacket << uint32(SuccessInfo->AvailableClasses->size());
|
||||
_worldPacket << uint32(SuccessInfo->Templates.size());
|
||||
_worldPacket << uint32(SuccessInfo->CurrencyID);
|
||||
_worldPacket << int32(SuccessInfo->Time);
|
||||
_worldPacket << SuccessInfo->Time;
|
||||
|
||||
for (RaceClassAvailability const& raceClassAvailability : *SuccessInfo->AvailableClasses)
|
||||
{
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "Packet.h"
|
||||
#include "Define.h"
|
||||
#include "Optional.h"
|
||||
#include "PacketUtilities.h"
|
||||
#include <array>
|
||||
#include <unordered_map>
|
||||
|
||||
@@ -146,7 +147,7 @@ namespace WorldPackets
|
||||
uint32 VirtualRealmAddress = 0; ///< a special identifier made from the Index, BattleGroup and Region.
|
||||
uint32 TimeSecondsUntilPCKick = 0; ///< @todo research
|
||||
uint32 CurrencyID = 0; ///< this is probably used for the ingame shop. @todo implement
|
||||
int32 Time = 0;
|
||||
Timestamp<> Time;
|
||||
|
||||
GameTime GameTimeInfo;
|
||||
|
||||
|
||||
@@ -343,8 +343,8 @@ WorldPacket const* WorldPackets::Battleground::PVPMatchInitialize::Write()
|
||||
{
|
||||
_worldPacket << uint32(MapID);
|
||||
_worldPacket << uint8(State);
|
||||
_worldPacket << int32(StartTime);
|
||||
_worldPacket << int32(Duration);
|
||||
_worldPacket << StartTime;
|
||||
_worldPacket << Duration;
|
||||
_worldPacket << uint8(ArenaFaction);
|
||||
_worldPacket << uint32(BattlemasterListID);
|
||||
_worldPacket.WriteBit(Registered);
|
||||
@@ -357,7 +357,7 @@ WorldPacket const* WorldPackets::Battleground::PVPMatchInitialize::Write()
|
||||
WorldPacket const* WorldPackets::Battleground::PVPMatchComplete::Write()
|
||||
{
|
||||
_worldPacket << uint8(Winner);
|
||||
_worldPacket << int32(Duration);
|
||||
_worldPacket << Duration;
|
||||
_worldPacket.WriteBit(LogData.is_initialized());
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
|
||||
@@ -468,8 +468,8 @@ namespace WorldPackets
|
||||
|
||||
uint32 MapID = 0;
|
||||
MatchState State = Inactive;
|
||||
time_t StartTime = time_t(0);
|
||||
int32 Duration = 0;
|
||||
Timestamp<> StartTime;
|
||||
WorldPackets::Duration<Seconds> Duration;
|
||||
uint8 ArenaFaction = 0;
|
||||
uint32 BattlemasterListID = 0;
|
||||
bool Registered = false;
|
||||
@@ -484,7 +484,7 @@ namespace WorldPackets
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
uint8 Winner = 0;
|
||||
int32 Duration = 0;
|
||||
WorldPackets::Duration<Seconds> Duration;
|
||||
Optional<PVPMatchStatistics> LogData;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ ByteBuffer& operator>>(ByteBuffer& data, WorldPackets::BlackMarket::BlackMarketI
|
||||
|
||||
WorldPacket const* WorldPackets::BlackMarket::BlackMarketRequestItemsResult::Write()
|
||||
{
|
||||
_worldPacket << int32(LastUpdateID);
|
||||
_worldPacket << LastUpdateID;
|
||||
_worldPacket << uint32(Items.size());
|
||||
|
||||
for (BlackMarketItem const& item : Items)
|
||||
|
||||
@@ -69,7 +69,7 @@ namespace WorldPackets
|
||||
void Read() override;
|
||||
|
||||
ObjectGuid Guid;
|
||||
uint32 LastUpdateID = 0;
|
||||
Timestamp<> LastUpdateID;
|
||||
};
|
||||
|
||||
class BlackMarketRequestItemsResult final : public ServerPacket
|
||||
@@ -79,7 +79,7 @@ namespace WorldPackets
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
int32 LastUpdateID = 0;
|
||||
Timestamp<> LastUpdateID;
|
||||
std::vector<BlackMarketItem> Items;
|
||||
};
|
||||
|
||||
|
||||
@@ -190,7 +190,7 @@ ByteBuffer& operator<<(ByteBuffer& data, EnumCharactersResult::CharacterInfo con
|
||||
for (EnumCharactersResult::CharacterInfo::VisualItemInfo const& visualItem : charInfo.VisualItems)
|
||||
data << visualItem;
|
||||
|
||||
data << uint32(charInfo.LastPlayedTime);
|
||||
data << charInfo.LastPlayedTime;
|
||||
data << uint16(charInfo.SpecID);
|
||||
data << uint32(charInfo.Unknown703);
|
||||
data << uint32(charInfo.LastLoginVersion);
|
||||
|
||||
@@ -137,7 +137,7 @@ namespace WorldPackets
|
||||
uint32 Flags4 = 0;
|
||||
bool FirstLogin = false;
|
||||
uint8 unkWod61x = 0;
|
||||
uint32 LastPlayedTime = 0;
|
||||
Timestamp<> LastPlayedTime;
|
||||
uint16 SpecID = 0;
|
||||
uint32 Unknown703 = 0;
|
||||
uint32 LastLoginVersion = 0;
|
||||
|
||||
@@ -20,8 +20,9 @@
|
||||
WorldPacket const* WorldPackets::ClientConfig::AccountDataTimes::Write()
|
||||
{
|
||||
_worldPacket << PlayerGuid;
|
||||
_worldPacket << uint32(ServerTime);
|
||||
_worldPacket.append(AccountTimes.data(), AccountTimes.size());
|
||||
_worldPacket << ServerTime;
|
||||
for (Timestamp<> const& accountDataTime : AccountTimes)
|
||||
_worldPacket << accountDataTime;
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
@@ -42,7 +43,7 @@ void WorldPackets::ClientConfig::RequestAccountData::Read()
|
||||
WorldPacket const* WorldPackets::ClientConfig::UpdateAccountData::Write()
|
||||
{
|
||||
_worldPacket << Player;
|
||||
_worldPacket << uint32(Time);
|
||||
_worldPacket << Time;
|
||||
_worldPacket << uint32(Size);
|
||||
_worldPacket.WriteBits(DataType, 3);
|
||||
_worldPacket << uint32(CompressedData.size());
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#define ClientConfigPackets_h__
|
||||
|
||||
#include "Packet.h"
|
||||
#include "PacketUtilities.h"
|
||||
#include "WorldSession.h"
|
||||
|
||||
namespace WorldPackets
|
||||
@@ -33,8 +34,8 @@ namespace WorldPackets
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
ObjectGuid PlayerGuid;
|
||||
uint32 ServerTime = 0;
|
||||
std::array<uint32, NUM_ACCOUNT_DATA_TYPES> AccountTimes = { };
|
||||
Timestamp<> ServerTime;
|
||||
std::array<Timestamp<>, NUM_ACCOUNT_DATA_TYPES> AccountTimes = { };
|
||||
};
|
||||
|
||||
class ClientCacheVersion final : public ServerPacket
|
||||
@@ -66,7 +67,7 @@ namespace WorldPackets
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
ObjectGuid Player;
|
||||
uint32 Time = 0; ///< UnixTime
|
||||
Timestamp<> Time;
|
||||
uint32 Size = 0; ///< decompressed size
|
||||
uint8 DataType = 0; ///< @see enum AccountDataType
|
||||
ByteBuffer CompressedData;
|
||||
@@ -80,7 +81,7 @@ namespace WorldPackets
|
||||
void Read() override;
|
||||
|
||||
ObjectGuid PlayerGuid;
|
||||
uint32 Time = 0; ///< UnixTime
|
||||
Timestamp<> Time;
|
||||
uint32 Size = 0; ///< decompressed size
|
||||
uint8 DataType = 0; ///< @see enum AccountDataType
|
||||
ByteBuffer CompressedData;
|
||||
|
||||
@@ -51,9 +51,9 @@ ByteBuffer& operator<<(ByteBuffer& data, GarrisonBuildingInfo const& buildingInf
|
||||
{
|
||||
data << uint32(buildingInfo.GarrPlotInstanceID);
|
||||
data << uint32(buildingInfo.GarrBuildingID);
|
||||
data << uint32(buildingInfo.TimeBuilt);
|
||||
data << buildingInfo.TimeBuilt;
|
||||
data << uint32(buildingInfo.CurrentGarSpecID);
|
||||
data << uint32(buildingInfo.TimeSpecCooldown);
|
||||
data << buildingInfo.TimeSpecCooldown;
|
||||
data.WriteBit(buildingInfo.Active);
|
||||
data.FlushBits();
|
||||
|
||||
@@ -77,7 +77,7 @@ ByteBuffer& operator<<(ByteBuffer& data, GarrisonFollower const& follower)
|
||||
data << uint32(follower.FollowerStatus);
|
||||
data << int32(follower.Health);
|
||||
data << int8(follower.BoardIndex);
|
||||
data << int32(follower.HealingTimestamp);
|
||||
data << follower.HealingTimestamp;
|
||||
for (GarrAbilityEntry const* ability : follower.AbilityID)
|
||||
data << uint32(ability->ID);
|
||||
|
||||
@@ -92,11 +92,11 @@ ByteBuffer& operator<<(ByteBuffer& data, GarrisonMission const& mission)
|
||||
{
|
||||
data << uint64(mission.DbID);
|
||||
data << uint32(mission.MissionRecID);
|
||||
data << uint32(mission.OfferTime);
|
||||
data << uint32(mission.OfferDuration);
|
||||
data << uint32(mission.StartTime);
|
||||
data << uint32(mission.TravelDuration);
|
||||
data << uint32(mission.MissionDuration);
|
||||
data << mission.OfferTime;
|
||||
data << mission.OfferDuration;
|
||||
data << mission.StartTime;
|
||||
data << mission.TravelDuration;
|
||||
data << mission.MissionDuration;
|
||||
data << uint32(mission.MissionState);
|
||||
data << uint32(mission.SuccessChance);
|
||||
data << uint32(mission.Flags);
|
||||
@@ -126,7 +126,7 @@ ByteBuffer& operator<<(ByteBuffer& data, GarrisonMissionReward const& missionRew
|
||||
ByteBuffer& operator<<(ByteBuffer& data, GarrisonMissionBonusAbility const& areaBonus)
|
||||
{
|
||||
data << uint32(areaBonus.GarrMssnBonusAbilityID);
|
||||
data << uint32(areaBonus.StartTime);
|
||||
data << areaBonus.StartTime;
|
||||
|
||||
return data;
|
||||
}
|
||||
@@ -143,7 +143,7 @@ ByteBuffer& operator<<(ByteBuffer& data, GarrisonTalent const& talent)
|
||||
{
|
||||
data << int32(talent.GarrTalentID);
|
||||
data << int32(talent.Rank);
|
||||
data << int32(talent.ResearchStartTime);
|
||||
data << talent.ResearchStartTime;
|
||||
data << int32(talent.Flags);
|
||||
data.WriteBit(talent.Socket.is_initialized());
|
||||
data.FlushBits();
|
||||
|
||||
@@ -75,9 +75,9 @@ namespace WorldPackets
|
||||
{
|
||||
uint32 GarrPlotInstanceID = 0;
|
||||
uint32 GarrBuildingID = 0;
|
||||
time_t TimeBuilt = time_t(0);
|
||||
Timestamp<> TimeBuilt;
|
||||
uint32 CurrentGarSpecID = 0;
|
||||
time_t TimeSpecCooldown = time_t(2288912640); // 06/07/1906 18:35:44 - another in the series of magic blizz dates
|
||||
Timestamp<> TimeSpecCooldown = time_t(2288912640); // 06/07/1906 18:35:44 - another in the series of magic blizz dates
|
||||
bool Active = false;
|
||||
};
|
||||
|
||||
@@ -97,7 +97,7 @@ namespace WorldPackets
|
||||
uint32 ZoneSupportSpellID = 0;
|
||||
uint32 FollowerStatus = 0;
|
||||
int32 Health = 0;
|
||||
int32 HealingTimestamp = 0;
|
||||
Timestamp<> HealingTimestamp;
|
||||
int8 BoardIndex = 0;
|
||||
std::string CustomName;
|
||||
};
|
||||
@@ -106,11 +106,11 @@ namespace WorldPackets
|
||||
{
|
||||
uint64 DbID = 0;
|
||||
uint32 MissionRecID = 0;
|
||||
time_t OfferTime = time_t(0);
|
||||
uint32 OfferDuration = 0;
|
||||
time_t StartTime = time_t(2288912640);
|
||||
uint32 TravelDuration = 0;
|
||||
uint32 MissionDuration = 0;
|
||||
Timestamp<> OfferTime;
|
||||
Duration<Seconds> OfferDuration;
|
||||
Timestamp<> StartTime = time_t(2288912640);
|
||||
Duration<Seconds> TravelDuration;
|
||||
Duration<Seconds> MissionDuration;
|
||||
uint32 MissionState = 0;
|
||||
uint32 SuccessChance = 0;
|
||||
uint32 Flags = 0;
|
||||
@@ -132,7 +132,7 @@ namespace WorldPackets
|
||||
struct GarrisonMissionBonusAbility
|
||||
{
|
||||
uint32 GarrMssnBonusAbilityID = 0;
|
||||
time_t StartTime = time_t(0);
|
||||
Timestamp<> StartTime;
|
||||
};
|
||||
|
||||
struct GarrisonTalentSocketData
|
||||
@@ -145,7 +145,7 @@ namespace WorldPackets
|
||||
{
|
||||
int32 GarrTalentID = 0;
|
||||
int32 Rank = 0;
|
||||
time_t ResearchStartTime = time_t(0);
|
||||
Timestamp<> ResearchStartTime;
|
||||
int32 Flags = 0;
|
||||
Optional<GarrisonTalentSocketData> Socket;
|
||||
};
|
||||
|
||||
@@ -108,7 +108,7 @@ ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::GuildFinder::GuildPostDat
|
||||
data << int32(post.Availability);
|
||||
data << int32(post.ClassRoles);
|
||||
data << int32(post.LevelRange);
|
||||
data << int32(post.SecondsRemaining);
|
||||
data << post.SecondsRemaining;
|
||||
data.WriteString(post.Comment);
|
||||
return data;
|
||||
}
|
||||
@@ -151,7 +151,7 @@ ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::GuildFinder::LFGuildRecru
|
||||
WorldPacket const* WorldPackets::GuildFinder::LFGuildRecruits::Write()
|
||||
{
|
||||
_worldPacket << uint32(Recruits.size());
|
||||
_worldPacket << uint32(UpdateTime);
|
||||
_worldPacket << UpdateTime;
|
||||
for (LFGuildRecruitData const& recruit : Recruits)
|
||||
_worldPacket << recruit;
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "Packet.h"
|
||||
#include "ObjectGuid.h"
|
||||
#include "Optional.h"
|
||||
#include "PacketUtilities.h"
|
||||
|
||||
namespace WorldPackets
|
||||
{
|
||||
@@ -157,7 +158,7 @@ namespace WorldPackets
|
||||
int32 Availability = 0;
|
||||
int32 ClassRoles = 0;
|
||||
int32 LevelRange = 0;
|
||||
int32 SecondsRemaining = 0;
|
||||
Duration<Seconds> SecondsRemaining;
|
||||
std::string Comment;
|
||||
};
|
||||
|
||||
@@ -178,7 +179,7 @@ namespace WorldPackets
|
||||
|
||||
void Read() override;
|
||||
|
||||
uint32 LastUpdate = 0;
|
||||
Timestamp<> LastUpdate;
|
||||
};
|
||||
|
||||
struct LFGuildRecruitData
|
||||
@@ -205,7 +206,7 @@ namespace WorldPackets
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
std::vector<LFGuildRecruitData> Recruits;
|
||||
time_t UpdateTime = time_t(0);
|
||||
Timestamp<> UpdateTime;
|
||||
};
|
||||
|
||||
class LFGuildRemoveRecruit final : public ClientPacket
|
||||
|
||||
@@ -539,7 +539,7 @@ void WorldPackets::Guild::RequestGuildRewardsList::Read()
|
||||
|
||||
WorldPacket const* WorldPackets::Guild::GuildRewardList::Write()
|
||||
{
|
||||
_worldPacket << int32(Version);
|
||||
_worldPacket << Version;
|
||||
_worldPacket << uint32(RewardItems.size());
|
||||
|
||||
for (GuildRewardItem const& item : RewardItems)
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include "ItemPacketsCommon.h"
|
||||
#include "Guild.h"
|
||||
#include "ObjectGuid.h"
|
||||
#include "PacketUtilities.h"
|
||||
|
||||
namespace WorldPackets
|
||||
{
|
||||
@@ -678,7 +679,7 @@ namespace WorldPackets
|
||||
|
||||
void Read() override;
|
||||
|
||||
uint32 CurrentVersion = 0;
|
||||
Timestamp<> CurrentVersion;
|
||||
};
|
||||
|
||||
struct GuildRewardItem
|
||||
@@ -700,7 +701,7 @@ namespace WorldPackets
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
std::vector<GuildRewardItem> RewardItems;
|
||||
int32 Version = 0;
|
||||
Timestamp<> Version;
|
||||
};
|
||||
|
||||
class GuildBankActivate final : public ClientPacket
|
||||
|
||||
@@ -32,7 +32,7 @@ ByteBuffer& operator<<(ByteBuffer& data, WorldPackets::LFG::RideTicket const& ti
|
||||
data << ticket.RequesterGuid;
|
||||
data << uint32(ticket.Id);
|
||||
data << uint32(ticket.Type);
|
||||
data << int32(ticket.Time);
|
||||
data << ticket.Time;
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
|
||||
#include "Packet.h"
|
||||
#include "ObjectGuid.h"
|
||||
#include "PacketUtilities.h"
|
||||
|
||||
namespace WorldPackets
|
||||
{
|
||||
@@ -37,7 +38,7 @@ namespace WorldPackets
|
||||
ObjectGuid RequesterGuid;
|
||||
uint32 Id = 0;
|
||||
RideType Type = RideType::None;
|
||||
int32 Time = 0;
|
||||
Timestamp<> Time;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -705,8 +705,8 @@ void WorldPackets::Misc::CloseInteraction::Read()
|
||||
|
||||
WorldPacket const* WorldPackets::Misc::StartTimer::Write()
|
||||
{
|
||||
_worldPacket << int32(TimeLeft);
|
||||
_worldPacket << int32(TotalTime);
|
||||
_worldPacket << TimeLeft;
|
||||
_worldPacket << TotalTime;
|
||||
_worldPacket << int32(Type);
|
||||
|
||||
return &_worldPacket;
|
||||
|
||||
@@ -222,7 +222,7 @@ namespace WorldPackets
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
uint32 Time = 0; ///< UnixTime
|
||||
Timestamp<> Time;
|
||||
};
|
||||
|
||||
class TutorialFlags : public ServerPacket
|
||||
@@ -916,8 +916,8 @@ namespace WorldPackets
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
int32 Type = 0;
|
||||
int32 TimeLeft = 0;
|
||||
int32 TotalTime = 0;
|
||||
Duration<Seconds> TimeLeft;
|
||||
Duration<Seconds> TotalTime;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -410,7 +410,7 @@ namespace WorldPackets
|
||||
int8 PartyIndex = 0;
|
||||
ObjectGuid PartyGUID;
|
||||
ObjectGuid InitiatorGUID;
|
||||
uint32 Duration = 0u;
|
||||
WorldPackets::Duration<Milliseconds> Duration;
|
||||
};
|
||||
|
||||
class ReadyCheckResponseClient final : public ClientPacket
|
||||
|
||||
@@ -338,7 +338,7 @@ WorldPacket const* WorldPackets::Query::CorpseTransportQuery::Write()
|
||||
|
||||
WorldPacket const* WorldPackets::Query::QueryTimeResponse::Write()
|
||||
{
|
||||
_worldPacket << int32(CurrentTime);
|
||||
_worldPacket << CurrentTime;
|
||||
|
||||
return &_worldPacket;
|
||||
}
|
||||
|
||||
@@ -306,7 +306,7 @@ namespace WorldPackets
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
time_t CurrentTime = time_t(0);
|
||||
Timestamp<> CurrentTime;
|
||||
};
|
||||
|
||||
class QuestPOIQuery final : public ClientPacket
|
||||
@@ -378,7 +378,7 @@ namespace WorldPackets
|
||||
|
||||
bool HasDeclined = false;
|
||||
DeclinedName DeclinedNames;
|
||||
uint32 Timestamp = 0;
|
||||
WorldPackets::Timestamp<> Timestamp;
|
||||
std::string Name;
|
||||
};
|
||||
|
||||
|
||||
@@ -624,7 +624,7 @@ WorldPacket const* WorldQuestUpdateResponse::Write()
|
||||
|
||||
for (WorldQuestUpdateInfo const& worldQuestUpdate : WorldQuestUpdates)
|
||||
{
|
||||
_worldPacket << int32(worldQuestUpdate.LastUpdate);
|
||||
_worldPacket << worldQuestUpdate.LastUpdate;
|
||||
_worldPacket << uint32(worldQuestUpdate.QuestID);
|
||||
_worldPacket << uint32(worldQuestUpdate.Timer);
|
||||
_worldPacket << int32(worldQuestUpdate.VariableID);
|
||||
|
||||
@@ -629,9 +629,9 @@ namespace WorldPackets
|
||||
|
||||
struct WorldQuestUpdateInfo
|
||||
{
|
||||
WorldQuestUpdateInfo(int32 lastUpdate, uint32 questID, uint32 timer, int32 variableID, int32 value) :
|
||||
WorldQuestUpdateInfo(time_t lastUpdate, uint32 questID, uint32 timer, int32 variableID, int32 value) :
|
||||
LastUpdate(lastUpdate), QuestID(questID), Timer(timer), VariableID(variableID), Value(value) { }
|
||||
int32 LastUpdate;
|
||||
Timestamp<> LastUpdate;
|
||||
uint32 QuestID;
|
||||
uint32 Timer;
|
||||
// WorldState
|
||||
|
||||
@@ -39,13 +39,13 @@ WorldPacket const* WorldPackets::Ticket::GMTicketCaseStatus::Write()
|
||||
{
|
||||
_worldPacket << int32(Cases.size());
|
||||
|
||||
for (auto const& c : Cases)
|
||||
for (GMTicketCase const& c : Cases)
|
||||
{
|
||||
_worldPacket << int32(c.CaseID);
|
||||
_worldPacket << int32(c.CaseOpened);
|
||||
_worldPacket << c.CaseOpened;
|
||||
_worldPacket << int32(c.CaseStatus);
|
||||
_worldPacket << int16(c.CfgRealmID);
|
||||
_worldPacket << int64(c.CharacterID);
|
||||
_worldPacket << uint16(c.CfgRealmID);
|
||||
_worldPacket << uint64(c.CharacterID);
|
||||
_worldPacket << int32(c.WaitTimeOverrideMinutes);
|
||||
|
||||
_worldPacket.WriteBits(c.Url.size(), 11);
|
||||
@@ -76,7 +76,7 @@ void WorldPackets::Ticket::SubmitUserFeedback::Read()
|
||||
}
|
||||
}
|
||||
|
||||
WorldPackets::Ticket::SupportTicketSubmitComplaint::SupportTicketChatLine::SupportTicketChatLine(uint32 timestamp, std::string const& text) :
|
||||
WorldPackets::Ticket::SupportTicketSubmitComplaint::SupportTicketChatLine::SupportTicketChatLine(time_t timestamp, std::string const& text) :
|
||||
Timestamp(timestamp), Text(text)
|
||||
{ }
|
||||
|
||||
|
||||
@@ -66,10 +66,10 @@ namespace WorldPackets
|
||||
struct GMTicketCase
|
||||
{
|
||||
int32 CaseID = 0;
|
||||
int32 CaseOpened = 0;
|
||||
Timestamp<> CaseOpened;
|
||||
int32 CaseStatus = 0;
|
||||
int16 CfgRealmID = 0;
|
||||
int64 CharacterID = 0;
|
||||
uint16 CfgRealmID = 0;
|
||||
uint64 CharacterID = 0;
|
||||
int32 WaitTimeOverrideMinutes = 0;
|
||||
std::string Url;
|
||||
std::string WaitTimeOverrideMessage;
|
||||
@@ -110,9 +110,9 @@ namespace WorldPackets
|
||||
struct SupportTicketChatLine
|
||||
{
|
||||
SupportTicketChatLine(ByteBuffer& data);
|
||||
SupportTicketChatLine(uint32 timestamp, std::string const& text);
|
||||
SupportTicketChatLine(time_t timestamp, std::string const& text);
|
||||
|
||||
uint32 Timestamp = 0;
|
||||
WorldPackets::Timestamp<> Timestamp;
|
||||
std::string Text;
|
||||
};
|
||||
|
||||
@@ -133,7 +133,7 @@ namespace WorldPackets
|
||||
uint8 field_6;
|
||||
};
|
||||
|
||||
int32 Timestamp;
|
||||
WorldPackets::Timestamp<> Timestamp;
|
||||
ObjectGuid AuthorGUID;
|
||||
Optional<uint64> ClubID;
|
||||
Optional<ObjectGuid> ChannelGUID;
|
||||
|
||||
@@ -27,13 +27,13 @@ WorldPacket const* WorldPackets::Token::CommerceTokenGetLogResponse::Write()
|
||||
_worldPacket << UnkInt;
|
||||
_worldPacket << Result;
|
||||
_worldPacket << uint32(AuctionableTokenAuctionableList.size());
|
||||
for (AuctionableTokenAuctionable const& auctionableTokenAuctionable : AuctionableTokenAuctionableList)
|
||||
for (AuctionableTokenInfo const& auctionableTokenAuctionable : AuctionableTokenAuctionableList)
|
||||
{
|
||||
_worldPacket << auctionableTokenAuctionable.UnkInt1;
|
||||
_worldPacket << auctionableTokenAuctionable.UnkInt2;
|
||||
_worldPacket << auctionableTokenAuctionable.Owner;
|
||||
_worldPacket << auctionableTokenAuctionable.BuyoutPrice;
|
||||
_worldPacket << auctionableTokenAuctionable.EndTime;
|
||||
_worldPacket << auctionableTokenAuctionable.DurationLeft;
|
||||
}
|
||||
|
||||
return &_worldPacket;
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#define TokenPackets_h__
|
||||
|
||||
#include "Packet.h"
|
||||
#include "PacketUtilities.h"
|
||||
|
||||
namespace WorldPackets
|
||||
{
|
||||
@@ -41,18 +42,18 @@ namespace WorldPackets
|
||||
|
||||
WorldPacket const* Write() override;
|
||||
|
||||
struct AuctionableTokenAuctionable
|
||||
struct AuctionableTokenInfo
|
||||
{
|
||||
uint64 UnkInt1 = 0;
|
||||
uint32 UnkInt2 = 0;
|
||||
uint32 Owner = 0;
|
||||
Timestamp<> UnkInt2;
|
||||
int32 Owner = 0;
|
||||
uint64 BuyoutPrice = 0;
|
||||
uint32 EndTime = 0;
|
||||
uint32 DurationLeft = 0;
|
||||
};
|
||||
|
||||
uint32 UnkInt = 0; // send CMSG_UPDATE_WOW_TOKEN_AUCTIONABLE_LIST
|
||||
uint32 Result = 0;
|
||||
std::vector<AuctionableTokenAuctionable> AuctionableTokenAuctionableList;
|
||||
std::vector<AuctionableTokenInfo> AuctionableTokenAuctionableList;
|
||||
};
|
||||
|
||||
class CommerceTokenGetMarketPrice final : public ClientPacket
|
||||
|
||||
Reference in New Issue
Block a user