Core/PacketIO: Renamed a bunch of opcodes based on more research (only those added after 6.0)

Port From (https://github.com/TrinityCore/TrinityCore/commit/f922c6e7a46a7c712daaaef9b1a72ca865fbe94b)
This commit is contained in:
hondacrx
2020-09-22 20:05:58 -04:00
parent 184915abc2
commit d40c2938a3
65 changed files with 552 additions and 527 deletions
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -95,7 +95,7 @@ namespace Game.Arenas
CheckWinConditions(); CheckWinConditions();
} }
public override void BuildPvPLogDataPacket(out PVPLogData pvpLogData) public override void BuildPvPLogDataPacket(out PVPMatchStatistics pvpLogData)
{ {
base.BuildPvPLogDataPacket(out pvpLogData); base.BuildPvPLogDataPacket(out pvpLogData);
+1 -1
View File
@@ -29,7 +29,7 @@ namespace Game.Arenas
TeamId = (int)(team == Team.Alliance ? BattlegroundTeamId.Alliance : BattlegroundTeamId.Horde); TeamId = (int)(team == Team.Alliance ? BattlegroundTeamId.Alliance : BattlegroundTeamId.Horde);
} }
public override void BuildPvPLogPlayerDataPacket(out PVPLogData.PVPMatchPlayerStatistics playerData) public override void BuildPvPLogPlayerDataPacket(out PVPMatchStatistics.PVPMatchPlayerStatistics playerData)
{ {
base.BuildPvPLogPlayerDataPacket(out playerData); base.BuildPvPLogPlayerDataPacket(out playerData);
+2 -2
View File
@@ -988,7 +988,7 @@ namespace Game
listBucketsResult.HasMoreResults = false; listBucketsResult.HasMoreResults = false;
} }
public void BuildListBidderItems(AuctionListBidderItemsResult listBidderItemsResult, Player player, uint offset, AuctionSortDef[] sorts, int sortCount) public void BuildListBiddedItems(AuctionListBiddedItemsResult listBidderItemsResult, Player player, uint offset, AuctionSortDef[] sorts, int sortCount)
{ {
// always full list // always full list
List<AuctionPosting> auctions = new List<AuctionPosting>(); List<AuctionPosting> auctions = new List<AuctionPosting>();
@@ -1068,7 +1068,7 @@ namespace Game
listItemsResult.HasMoreResults = builder.HasMoreResults(); listItemsResult.HasMoreResults = builder.HasMoreResults();
} }
public void BuildListOwnerItems(AuctionListOwnerItemsResult listOwnerItemsResult, Player player, uint offset, AuctionSortDef[] sorts, int sortCount) public void BuildListOwnedItems(AuctionListOwnedItemsResult listOwnerItemsResult, Player player, uint offset, AuctionSortDef[] sorts, int sortCount)
{ {
// always full list // always full list
List<AuctionPosting> auctions = new List<AuctionPosting>(); List<AuctionPosting> auctions = new List<AuctionPosting>();
+25 -25
View File
@@ -691,12 +691,12 @@ namespace Game.BattleGrounds
//we must set it this way, because end time is sent in packet! //we must set it this way, because end time is sent in packet!
SetRemainingTime(BattlegroundConst.AutocloseBattleground); SetRemainingTime(BattlegroundConst.AutocloseBattleground);
PVPMatchEnd pvpMatchEnd = new PVPMatchEnd(); PVPMatchComplete pvpMatchComplete = new PVPMatchComplete();
pvpMatchEnd.Winner = (byte)GetWinner(); pvpMatchComplete.Winner = (byte)GetWinner();
pvpMatchEnd.Duration = (int)Math.Max(0, (GetElapsedTime() - (int)BattlegroundStartTimeIntervals.Delay2m) / Time.InMilliseconds); pvpMatchComplete.Duration = (int)Math.Max(0, (GetElapsedTime() - (int)BattlegroundStartTimeIntervals.Delay2m) / Time.InMilliseconds);
pvpMatchEnd.LogData.HasValue = true; pvpMatchComplete.LogData.HasValue = true;
BuildPvPLogDataPacket(out pvpMatchEnd.LogData.Value); BuildPvPLogDataPacket(out pvpMatchComplete.LogData.Value);
pvpMatchEnd.Write(); pvpMatchComplete.Write();
foreach (var pair in m_Players) foreach (var pair in m_Players)
{ {
@@ -793,7 +793,7 @@ namespace Game.BattleGrounds
BlockMovement(player); BlockMovement(player);
player.SendPacket(pvpMatchEnd); player.SendPacket(pvpMatchComplete);
player.UpdateCriteria(CriteriaTypes.CompleteBattleground, player.GetMapId()); player.UpdateCriteria(CriteriaTypes.CompleteBattleground, player.GetMapId());
} }
@@ -993,20 +993,20 @@ namespace Game.BattleGrounds
playerJoined.Guid = player.GetGUID(); playerJoined.Guid = player.GetGUID();
SendPacketToTeam(team, playerJoined, player); SendPacketToTeam(team, playerJoined, player);
PVPMatchInit pvpMatchState = new PVPMatchInit(); PVPMatchInitialize pvpMatchInitialize = new PVPMatchInitialize();
pvpMatchState.MapID = GetMapId(); pvpMatchInitialize.MapID = GetMapId();
switch (GetStatus()) switch (GetStatus())
{ {
case BattlegroundStatus.None: case BattlegroundStatus.None:
case BattlegroundStatus.WaitQueue: case BattlegroundStatus.WaitQueue:
pvpMatchState.State = PVPMatchInit.MatchState.Inactive; pvpMatchInitialize.State = PVPMatchInitialize.MatchState.Inactive;
break; break;
case BattlegroundStatus.WaitJoin: case BattlegroundStatus.WaitJoin:
case BattlegroundStatus.InProgress: case BattlegroundStatus.InProgress:
pvpMatchState.State = PVPMatchInit.MatchState.InProgress; pvpMatchInitialize.State = PVPMatchInitialize.MatchState.InProgress;
break; break;
case BattlegroundStatus.WaitLeave: case BattlegroundStatus.WaitLeave:
pvpMatchState.State = PVPMatchInit.MatchState.Complete; pvpMatchInitialize.State = PVPMatchInitialize.MatchState.Complete;
break; break;
default: default:
break; break;
@@ -1014,15 +1014,15 @@ namespace Game.BattleGrounds
if (GetElapsedTime() >= (int)BattlegroundStartTimeIntervals.Delay2m) if (GetElapsedTime() >= (int)BattlegroundStartTimeIntervals.Delay2m)
{ {
pvpMatchState.Duration = (int)(GetElapsedTime() - (int)BattlegroundStartTimeIntervals.Delay2m) / Time.InMilliseconds; pvpMatchInitialize.Duration = (int)(GetElapsedTime() - (int)BattlegroundStartTimeIntervals.Delay2m) / Time.InMilliseconds;
pvpMatchState.StartTime = GameTime.GetGameTime() - pvpMatchState.Duration; pvpMatchInitialize.StartTime = GameTime.GetGameTime() - pvpMatchInitialize.Duration;
} }
pvpMatchState.ArenaFaction = (byte)(player.GetBGTeam() == Team.Horde ? BattlegroundTeamId.Horde : BattlegroundTeamId.Alliance); pvpMatchInitialize.ArenaFaction = (byte)(player.GetBGTeam() == Team.Horde ? BattlegroundTeamId.Horde : BattlegroundTeamId.Alliance);
pvpMatchState.BattlemasterListID = (uint)GetTypeID(); pvpMatchInitialize.BattlemasterListID = (uint)GetTypeID();
pvpMatchState.Registered = false; pvpMatchInitialize.Registered = false;
pvpMatchState.AffectsRating = IsRated(); pvpMatchInitialize.AffectsRating = IsRated();
player.SendPacket(pvpMatchState); player.SendPacket(pvpMatchInitialize);
player.RemoveAurasByType(AuraType.Mounted); player.RemoveAurasByType(AuraType.Mounted);
@@ -1238,13 +1238,13 @@ namespace Game.BattleGrounds
return GetPlayersSize() < GetMaxPlayers(); return GetPlayersSize() < GetMaxPlayers();
} }
public virtual void BuildPvPLogDataPacket(out PVPLogData pvpLogData) public virtual void BuildPvPLogDataPacket(out PVPMatchStatistics pvpLogData)
{ {
pvpLogData = new PVPLogData(); pvpLogData = new PVPMatchStatistics();
foreach (var score in PlayerScores) foreach (var score in PlayerScores)
{ {
PVPLogData.PVPMatchPlayerStatistics playerData; PVPMatchStatistics.PVPMatchPlayerStatistics playerData;
score.Value.BuildPvPLogPlayerDataPacket(out playerData); score.Value.BuildPvPLogPlayerDataPacket(out playerData);
@@ -1704,9 +1704,9 @@ namespace Game.BattleGrounds
BlockMovement(player); BlockMovement(player);
PVPLogDataMessage pvpLogData = new PVPLogDataMessage(); PVPMatchStatisticsMessage pvpMatchStatistics = new PVPMatchStatisticsMessage();
BuildPvPLogDataPacket(out pvpLogData.Data); BuildPvPLogDataPacket(out pvpMatchStatistics.Data);
player.SendPacket(pvpLogData); player.SendPacket(pvpMatchStatistics);
} }
public uint GetAlivePlayersCountByTeam(Team Team) public uint GetAlivePlayersCountByTeam(Team Team)
@@ -57,9 +57,9 @@ namespace Game.BattleGrounds
} }
} }
public virtual void BuildPvPLogPlayerDataPacket(out PVPLogData.PVPMatchPlayerStatistics playerData) public virtual void BuildPvPLogPlayerDataPacket(out PVPMatchStatistics.PVPMatchPlayerStatistics playerData)
{ {
playerData = new PVPLogData.PVPMatchPlayerStatistics(); playerData = new PVPMatchStatistics.PVPMatchPlayerStatistics();
playerData.PlayerGUID = PlayerGuid; playerData.PlayerGUID = PlayerGuid;
playerData.Kills = KillingBlows; playerData.Kills = KillingBlows;
playerData.Faction = (byte)TeamId; playerData.Faction = (byte)TeamId;
@@ -833,12 +833,12 @@ namespace Game.BattleGrounds.Zones
} }
} }
public override void BuildPvPLogPlayerDataPacket(out PVPLogData.PVPMatchPlayerStatistics playerData) public override void BuildPvPLogPlayerDataPacket(out PVPMatchStatistics.PVPMatchPlayerStatistics playerData)
{ {
base.BuildPvPLogPlayerDataPacket(out playerData); base.BuildPvPLogPlayerDataPacket(out playerData);
playerData.Stats.Add(new PVPLogData.PVPMatchPlayerPVPStat((int)ABObjectives.AssaultBase, BasesAssaulted)); playerData.Stats.Add(new PVPMatchStatistics.PVPMatchPlayerPVPStat((int)ABObjectives.AssaultBase, BasesAssaulted));
playerData.Stats.Add(new PVPLogData.PVPMatchPlayerPVPStat((int)ABObjectives.DefendBase, BasesDefended)); playerData.Stats.Add(new PVPMatchStatistics.PVPMatchPlayerPVPStat((int)ABObjectives.DefendBase, BasesDefended));
} }
public override uint GetAttr1() { return BasesAssaulted; } public override uint GetAttr1() { return BasesAssaulted; }
@@ -1033,11 +1033,11 @@ namespace Game.BattleGrounds.Zones
} }
} }
public override void BuildPvPLogPlayerDataPacket(out PVPLogData.PVPMatchPlayerStatistics playerData) public override void BuildPvPLogPlayerDataPacket(out PVPMatchStatistics.PVPMatchPlayerStatistics playerData)
{ {
base.BuildPvPLogPlayerDataPacket(out playerData); base.BuildPvPLogPlayerDataPacket(out playerData);
playerData.Stats.Add(new PVPLogData.PVPMatchPlayerPVPStat((int)EotSMisc.ObjectiveCaptureFlag, FlagCaptures)); playerData.Stats.Add(new PVPMatchStatistics.PVPMatchPlayerPVPStat((int)EotSMisc.ObjectiveCaptureFlag, FlagCaptures));
} }
public override uint GetAttr1() { return FlagCaptures; } public override uint GetAttr1() { return FlagCaptures; }
@@ -1172,12 +1172,12 @@ namespace Game.BattleGrounds.Zones
} }
} }
public override void BuildPvPLogPlayerDataPacket(out PVPLogData.PVPMatchPlayerStatistics playerData) public override void BuildPvPLogPlayerDataPacket(out PVPMatchStatistics.PVPMatchPlayerStatistics playerData)
{ {
base.BuildPvPLogPlayerDataPacket(out playerData); base.BuildPvPLogPlayerDataPacket(out playerData);
playerData.Stats.Add(new PVPLogData.PVPMatchPlayerPVPStat((int)SAObjectives.DemolishersDestroyed, DemolishersDestroyed)); playerData.Stats.Add(new PVPMatchStatistics.PVPMatchPlayerPVPStat((int)SAObjectives.DemolishersDestroyed, DemolishersDestroyed));
playerData.Stats.Add(new PVPLogData.PVPMatchPlayerPVPStat((int)SAObjectives.GatesDestroyed, GatesDestroyed)); playerData.Stats.Add(new PVPMatchStatistics.PVPMatchPlayerPVPStat((int)SAObjectives.GatesDestroyed, GatesDestroyed));
} }
public override uint GetAttr1() { return DemolishersDestroyed; } public override uint GetAttr1() { return DemolishersDestroyed; }
@@ -964,12 +964,12 @@ namespace Game.BattleGrounds.Zones
} }
} }
public override void BuildPvPLogPlayerDataPacket(out PVPLogData.PVPMatchPlayerStatistics playerData) public override void BuildPvPLogPlayerDataPacket(out PVPMatchStatistics.PVPMatchPlayerStatistics playerData)
{ {
base.BuildPvPLogPlayerDataPacket(out playerData); base.BuildPvPLogPlayerDataPacket(out playerData);
playerData.Stats.Add(new PVPLogData.PVPMatchPlayerPVPStat(WSObjectives.CaptureFlag, FlagCaptures)); playerData.Stats.Add(new PVPMatchStatistics.PVPMatchPlayerPVPStat(WSObjectives.CaptureFlag, FlagCaptures));
playerData.Stats.Add(new PVPLogData.PVPMatchPlayerPVPStat(WSObjectives.ReturnFlag, FlagReturns)); playerData.Stats.Add(new PVPMatchStatistics.PVPMatchPlayerPVPStat(WSObjectives.ReturnFlag, FlagReturns));
} }
public override uint GetAttr1() { return FlagCaptures; } public override uint GetAttr1() { return FlagCaptures; }
+6 -6
View File
@@ -399,7 +399,7 @@ namespace Game
uint level = player ? player.GetLevel() : Global.CharacterCacheStorage.GetCharacterLevelByGuid(invitee); uint level = player ? player.GetLevel() : Global.CharacterCacheStorage.GetCharacterLevelByGuid(invitee);
SCalendarEventInvite packet = new SCalendarEventInvite(); CalendarInviteAdded packet = new CalendarInviteAdded();
packet.EventID = calendarEvent != null ? calendarEvent.EventId : 0; packet.EventID = calendarEvent != null ? calendarEvent.EventId : 0;
packet.InviteGuid = invitee; packet.InviteGuid = invitee;
packet.InviteID = calendarEvent != null ? invite.InviteId : 0; packet.InviteID = calendarEvent != null ? invite.InviteId : 0;
@@ -441,7 +441,7 @@ namespace Game
public void SendCalendarEventStatus(CalendarEvent calendarEvent, CalendarInvite invite) public void SendCalendarEventStatus(CalendarEvent calendarEvent, CalendarInvite invite)
{ {
CalendarEventInviteStatus packet = new CalendarEventInviteStatus(); CalendarInviteStatusPacket packet = new CalendarInviteStatusPacket();
packet.ClearPending = true; // FIXME packet.ClearPending = true; // FIXME
packet.Date = calendarEvent.Date; packet.Date = calendarEvent.Date;
packet.EventID = calendarEvent.EventId; packet.EventID = calendarEvent.EventId;
@@ -465,7 +465,7 @@ namespace Game
void SendCalendarEventInviteRemove(CalendarEvent calendarEvent, CalendarInvite invite, uint flags) void SendCalendarEventInviteRemove(CalendarEvent calendarEvent, CalendarInvite invite, uint flags)
{ {
CalendarEventInviteRemoved packet = new CalendarEventInviteRemoved(); CalendarInviteRemoved packet = new CalendarInviteRemoved();
packet.ClearPending = true; // FIXME packet.ClearPending = true; // FIXME
packet.EventID = calendarEvent.EventId; packet.EventID = calendarEvent.EventId;
packet.Flags = flags; packet.Flags = flags;
@@ -476,7 +476,7 @@ namespace Game
public void SendCalendarEventModeratorStatusAlert(CalendarEvent calendarEvent, CalendarInvite invite) public void SendCalendarEventModeratorStatusAlert(CalendarEvent calendarEvent, CalendarInvite invite)
{ {
CalendarEventInviteModeratorStatus packet = new CalendarEventInviteModeratorStatus(); CalendarInviteModeratorStatus packet = new CalendarInviteModeratorStatus();
packet.ClearPending = true; // FIXME packet.ClearPending = true; // FIXME
packet.EventID = calendarEvent.EventId; packet.EventID = calendarEvent.EventId;
packet.InviteGuid = invite.InviteeGuid; packet.InviteGuid = invite.InviteeGuid;
@@ -487,7 +487,7 @@ namespace Game
void SendCalendarEventInviteAlert(CalendarEvent calendarEvent, CalendarInvite invite) void SendCalendarEventInviteAlert(CalendarEvent calendarEvent, CalendarInvite invite)
{ {
CalendarEventInviteAlert packet = new CalendarEventInviteAlert(); CalendarInviteAlert packet = new CalendarInviteAlert();
packet.Date = calendarEvent.Date; packet.Date = calendarEvent.Date;
packet.EventID = calendarEvent.EventId; packet.EventID = calendarEvent.EventId;
packet.EventName = calendarEvent.Title; packet.EventName = calendarEvent.Title;
@@ -569,7 +569,7 @@ namespace Game
Player player = Global.ObjAccessor.FindPlayer(guid); Player player = Global.ObjAccessor.FindPlayer(guid);
if (player) if (player)
{ {
CalendarEventInviteRemovedAlert packet = new CalendarEventInviteRemovedAlert(); CalendarInviteRemovedAlert packet = new CalendarInviteRemovedAlert();
packet.Date = calendarEvent.Date; packet.Date = calendarEvent.Date;
packet.EventID = calendarEvent.EventId; packet.EventID = calendarEvent.EventId;
packet.Flags = calendarEvent.Flags; packet.Flags = calendarEvent.Flags;
@@ -213,41 +213,41 @@ namespace Game.DataStorage
continue; continue;
} }
AreaTriggerCircularMovementInfo circularMovementInfo = new AreaTriggerCircularMovementInfo(); AreaTriggerOrbitInfo orbitInfo = new AreaTriggerOrbitInfo();
circularMovementInfo.StartDelay = circularMovementInfos.Read<uint>(1); orbitInfo.StartDelay = circularMovementInfos.Read<uint>(1);
circularMovementInfo.Radius = circularMovementInfos.Read<float>(2); orbitInfo.Radius = circularMovementInfos.Read<float>(2);
if (!float.IsInfinity(circularMovementInfo.Radius)) if (!float.IsInfinity(orbitInfo.Radius))
{ {
Log.outError(LogFilter.Sql, $"Table `spell_areatrigger_circular` has listed areatrigger (MiscId: {spellMiscId}) with invalid Radius ({circularMovementInfo.Radius}), set to 0!"); Log.outError(LogFilter.Sql, $"Table `spell_areatrigger_circular` has listed areatrigger (MiscId: {spellMiscId}) with invalid Radius ({orbitInfo.Radius}), set to 0!");
circularMovementInfo.Radius = 0.0f; orbitInfo.Radius = 0.0f;
} }
circularMovementInfo.BlendFromRadius = circularMovementInfos.Read<float>(3); orbitInfo.BlendFromRadius = circularMovementInfos.Read<float>(3);
if (!float.IsInfinity(circularMovementInfo.BlendFromRadius)) if (!float.IsInfinity(orbitInfo.BlendFromRadius))
{ {
Log.outError(LogFilter.Sql, $"Table `spell_areatrigger_circular` has listed areatrigger (MiscId: {spellMiscId}) with invalid BlendFromRadius ({circularMovementInfo.BlendFromRadius}), set to 0!"); Log.outError(LogFilter.Sql, $"Table `spell_areatrigger_circular` has listed areatrigger (MiscId: {spellMiscId}) with invalid BlendFromRadius ({orbitInfo.BlendFromRadius}), set to 0!");
circularMovementInfo.BlendFromRadius = 0.0f; orbitInfo.BlendFromRadius = 0.0f;
} }
circularMovementInfo.InitialAngle = circularMovementInfos.Read<float>(4); orbitInfo.InitialAngle = circularMovementInfos.Read<float>(4);
if (!float.IsInfinity(circularMovementInfo.InitialAngle)) if (!float.IsInfinity(orbitInfo.InitialAngle))
{ {
Log.outError(LogFilter.Sql, $"Table `spell_areatrigger_circular` has listed areatrigger (MiscId: {spellMiscId}) with invalid InitialAngle ({circularMovementInfo.InitialAngle}), set to 0!"); Log.outError(LogFilter.Sql, $"Table `spell_areatrigger_circular` has listed areatrigger (MiscId: {spellMiscId}) with invalid InitialAngle ({orbitInfo.InitialAngle}), set to 0!");
circularMovementInfo.InitialAngle = 0.0f; orbitInfo.InitialAngle = 0.0f;
} }
circularMovementInfo.ZOffset = circularMovementInfos.Read<float>(5); orbitInfo.ZOffset = circularMovementInfos.Read<float>(5);
if (!float.IsInfinity(circularMovementInfo.ZOffset)) if (!float.IsInfinity(orbitInfo.ZOffset))
{ {
Log.outError(LogFilter.Sql, $"Table `spell_areatrigger_circular` has listed areatrigger (MiscId: {spellMiscId}) with invalid ZOffset ({circularMovementInfo.ZOffset}), set to 0!"); Log.outError(LogFilter.Sql, $"Table `spell_areatrigger_circular` has listed areatrigger (MiscId: {spellMiscId}) with invalid ZOffset ({orbitInfo.ZOffset}), set to 0!");
circularMovementInfo.ZOffset = 0.0f; orbitInfo.ZOffset = 0.0f;
} }
circularMovementInfo.CounterClockwise = circularMovementInfos.Read<bool>(6); orbitInfo.CounterClockwise = circularMovementInfos.Read<bool>(6);
circularMovementInfo.CanLoop = circularMovementInfos.Read<bool>(7); orbitInfo.CanLoop = circularMovementInfos.Read<bool>(7);
atSpellMisc.CircularMovementInfo = circularMovementInfo; atSpellMisc.OrbitInfo = orbitInfo;
} }
while (circularMovementInfos.NextRow()); while (circularMovementInfos.NextRow());
} }
+29 -29
View File
@@ -157,13 +157,13 @@ namespace Game.Entities
if (GetTemplate().HasFlag(AreaTriggerFlags.HasCircularMovement)) if (GetTemplate().HasFlag(AreaTriggerFlags.HasCircularMovement))
{ {
AreaTriggerCircularMovementInfo cmi = GetMiscTemplate().CircularMovementInfo; AreaTriggerOrbitInfo cmi = GetMiscTemplate().OrbitInfo;
if (target && GetTemplate().HasFlag(AreaTriggerFlags.HasAttached)) if (target && GetTemplate().HasFlag(AreaTriggerFlags.HasAttached))
cmi.PathTarget.Set(target.GetGUID()); cmi.PathTarget.Set(target.GetGUID());
else else
cmi.Center.Set(new Vector3(pos.posX, pos.posY, pos.posZ)); cmi.Center.Set(new Vector3(pos.posX, pos.posY, pos.posZ));
InitCircularMovement(cmi, timeToTarget); InitOrbit(cmi, timeToTarget);
} }
else if (GetMiscTemplate().HasSplines()) else if (GetMiscTemplate().HasSplines())
{ {
@@ -186,8 +186,8 @@ namespace Game.Entities
AI_Initialize(); AI_Initialize();
// Relocate areatriggers with circular movement again // Relocate areatriggers with circular movement again
if (HasCircularMovement()) if (HasOrbit())
Relocate(CalculateCircularMovementPosition()); Relocate(CalculateOrbitPosition());
if (!GetMap().AddToMap(this)) if (!GetMap().AddToMap(this))
{ // Returning false will cause the object to be deleted - remove from transport { // Returning false will cause the object to be deleted - remove from transport
@@ -208,10 +208,10 @@ namespace Game.Entities
base.Update(diff); base.Update(diff);
_timeSinceCreated += diff; _timeSinceCreated += diff;
// "If" order matter here, Circular Movement > Attached > Splines // "If" order matter here, Orbit > Attached > Splines
if (HasCircularMovement()) if (HasOrbit())
{ {
UpdateCircularMovementPosition(diff); UpdateOrbitPosition(diff);
} }
else if(GetTemplate().HasFlag(AreaTriggerFlags.HasAttached)) else if(GetTemplate().HasFlag(AreaTriggerFlags.HasAttached))
{ {
@@ -657,7 +657,7 @@ namespace Game.Entities
_reachedDestination = false; _reachedDestination = false;
} }
void InitCircularMovement(AreaTriggerCircularMovementInfo cmi, uint timeToTarget) void InitOrbit(AreaTriggerOrbitInfo cmi, uint timeToTarget)
{ {
// Circular movement requires either a center position or an attached unit // Circular movement requires either a center position or an attached unit
Cypher.Assert(cmi.Center.HasValue || cmi.PathTarget.HasValue); Cypher.Assert(cmi.Center.HasValue || cmi.PathTarget.HasValue);
@@ -666,51 +666,51 @@ namespace Game.Entities
SetUpdateFieldValue(m_values.ModifyValue(m_areaTriggerData).ModifyValue(m_areaTriggerData.TimeToTarget), timeToTarget); SetUpdateFieldValue(m_values.ModifyValue(m_areaTriggerData).ModifyValue(m_areaTriggerData.TimeToTarget), timeToTarget);
m_areaTriggerData.ClearChanged(m_areaTriggerData.TimeToTarget); m_areaTriggerData.ClearChanged(m_areaTriggerData.TimeToTarget);
_circularMovementInfo.Set(cmi); _orbitInfo.Set(cmi);
_circularMovementInfo.Value.TimeToTarget = timeToTarget; _orbitInfo.Value.TimeToTarget = timeToTarget;
_circularMovementInfo.Value.ElapsedTimeForMovement = 0; _orbitInfo.Value.ElapsedTimeForMovement = 0;
if (IsInWorld) if (IsInWorld)
{ {
AreaTriggerRePath reshape = new AreaTriggerRePath(); AreaTriggerRePath reshape = new AreaTriggerRePath();
reshape.TriggerGUID = GetGUID(); reshape.TriggerGUID = GetGUID();
reshape.AreaTriggerCircularMovement = _circularMovementInfo; reshape.AreaTriggerOrbit = _orbitInfo;
SendMessageToSet(reshape, true); SendMessageToSet(reshape, true);
} }
} }
public bool HasCircularMovement() public bool HasOrbit()
{ {
return _circularMovementInfo.HasValue; return _orbitInfo.HasValue;
} }
Position GetCircularMovementCenterPosition() Position GetOrbitCenterPosition()
{ {
if (!_circularMovementInfo.HasValue) if (!_orbitInfo.HasValue)
return null; return null;
if (_circularMovementInfo.Value.PathTarget.HasValue) if (_orbitInfo.Value.PathTarget.HasValue)
{ {
WorldObject center = Global.ObjAccessor.GetWorldObject(this, _circularMovementInfo.Value.PathTarget.Value); WorldObject center = Global.ObjAccessor.GetWorldObject(this, _orbitInfo.Value.PathTarget.Value);
if (center) if (center)
return center; return center;
} }
if (_circularMovementInfo.Value.Center.HasValue) if (_orbitInfo.Value.Center.HasValue)
return new Position(_circularMovementInfo.Value.Center.Value); return new Position(_orbitInfo.Value.Center.Value);
return null; return null;
} }
Position CalculateCircularMovementPosition() Position CalculateOrbitPosition()
{ {
Position centerPos = GetCircularMovementCenterPosition(); Position centerPos = GetOrbitCenterPosition();
if (centerPos == null) if (centerPos == null)
return GetPosition(); return GetPosition();
AreaTriggerCircularMovementInfo cmi = _circularMovementInfo.Value; AreaTriggerOrbitInfo cmi = _orbitInfo.Value;
// AreaTrigger make exactly "Duration / TimeToTarget" loops during his life time // AreaTrigger make exactly "Duration / TimeToTarget" loops during his life time
float pathProgress = (float)cmi.ElapsedTimeForMovement / cmi.TimeToTarget; float pathProgress = (float)cmi.ElapsedTimeForMovement / cmi.TimeToTarget;
@@ -741,14 +741,14 @@ namespace Game.Entities
return new Position(x, y, z, angle); return new Position(x, y, z, angle);
} }
void UpdateCircularMovementPosition(uint diff) void UpdateOrbitPosition(uint diff)
{ {
if (_circularMovementInfo.Value.StartDelay > GetElapsedTimeForMovement()) if (_orbitInfo.Value.StartDelay > GetElapsedTimeForMovement())
return; return;
_circularMovementInfo.Value.ElapsedTimeForMovement = (int)(GetElapsedTimeForMovement() - _circularMovementInfo.Value.StartDelay); _orbitInfo.Value.ElapsedTimeForMovement = (int)(GetElapsedTimeForMovement() - _orbitInfo.Value.StartDelay);
Position pos = CalculateCircularMovementPosition(); Position pos = CalculateOrbitPosition();
GetMap().AreaTriggerRelocation(this, pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), pos.GetOrientation()); GetMap().AreaTriggerRelocation(this, pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), pos.GetOrientation());
@@ -939,7 +939,7 @@ namespace Game.Entities
public Spline GetSpline() { return _spline; } public Spline GetSpline() { return _spline; }
public uint GetElapsedTimeForMovement() { return GetTimeSinceCreated(); } // @todo: research the right value, in sniffs both timers are nearly identical public uint GetElapsedTimeForMovement() { return GetTimeSinceCreated(); } // @todo: research the right value, in sniffs both timers are nearly identical
public Optional<AreaTriggerCircularMovementInfo> GetCircularMovementInfo() { return _circularMovementInfo; } public Optional<AreaTriggerOrbitInfo> GetCircularMovementInfo() { return _orbitInfo; }
AreaTriggerFieldData m_areaTriggerData; AreaTriggerFieldData m_areaTriggerData;
@@ -962,7 +962,7 @@ namespace Game.Entities
int _lastSplineIndex; int _lastSplineIndex;
uint _movementTime; uint _movementTime;
Optional<AreaTriggerCircularMovementInfo> _circularMovementInfo; Optional<AreaTriggerOrbitInfo> _orbitInfo;
AreaTriggerMiscTemplate _areaTriggerMiscTemplate; AreaTriggerMiscTemplate _areaTriggerMiscTemplate;
List<ObjectGuid> _insideUnits = new List<ObjectGuid>(); List<ObjectGuid> _insideUnits = new List<ObjectGuid>();
@@ -138,7 +138,7 @@ namespace Game.Entities
} }
} }
public struct AreaTriggerCircularMovementInfo public struct AreaTriggerOrbitInfo
{ {
public void Write(WorldPacket data) public void Write(WorldPacket data)
{ {
@@ -265,7 +265,7 @@ namespace Game.Entities
public AreaTriggerScaleInfo OverrideScale = new AreaTriggerScaleInfo(); public AreaTriggerScaleInfo OverrideScale = new AreaTriggerScaleInfo();
public AreaTriggerScaleInfo ExtraScale = new AreaTriggerScaleInfo(); public AreaTriggerScaleInfo ExtraScale = new AreaTriggerScaleInfo();
public AreaTriggerCircularMovementInfo CircularMovementInfo; public AreaTriggerOrbitInfo OrbitInfo;
public AreaTriggerTemplate Template; public AreaTriggerTemplate Template;
public List<Vector3> SplinePoints = new List<Vector3>(); public List<Vector3> SplinePoints = new List<Vector3>();
+11 -11
View File
@@ -1942,10 +1942,10 @@ namespace Game.Entities
return; return;
} }
ArtifactForgeOpened artifactForgeOpened = new ArtifactForgeOpened(); OpenArtifactForge openArtifactForge = new OpenArtifactForge();
artifactForgeOpened.ArtifactGUID = item.GetGUID(); openArtifactForge.ArtifactGUID = item.GetGUID();
artifactForgeOpened.ForgeGUID = GetGUID(); openArtifactForge.ForgeGUID = GetGUID();
player.SendPacket(artifactForgeOpened); player.SendPacket(openArtifactForge);
break; break;
} }
case 2: // Heart Forge case 2: // Heart Forge
@@ -1954,9 +1954,9 @@ namespace Game.Entities
if (!item) if (!item)
return; return;
AzeriteEssenceForgeOpened azeriteEssenceForgeOpened = new AzeriteEssenceForgeOpened(); OpenHeartForge openHeartForge = new OpenHeartForge();
azeriteEssenceForgeOpened.ForgeGUID = GetGUID(); openHeartForge.ForgeGUID = GetGUID();
player.SendPacket(azeriteEssenceForgeOpened); player.SendPacket(openHeartForge);
break; break;
} }
default: default:
@@ -1970,10 +1970,10 @@ namespace Game.Entities
if (!player) if (!player)
return; return;
GameObjectUIAction gameObjectUIAction = new GameObjectUIAction(); GameObjectUILink gameObjectUILink = new GameObjectUILink();
gameObjectUIAction.ObjectGUID = GetGUID(); gameObjectUILink.ObjectGUID = GetGUID();
gameObjectUIAction.UILink = (int)GetGoInfo().UILink.UILinkType; gameObjectUILink.UILink = (int)GetGoInfo().UILink.UILinkType;
player.SendPacket(gameObjectUIAction); player.SendPacket(gameObjectUILink);
return; return;
} }
default: default:
+1 -1
View File
@@ -293,7 +293,7 @@ namespace Game.Entities
SetState(ItemUpdateState.Changed, owner); SetState(ItemUpdateState.Changed, owner);
} }
AzeriteXpGain xpGain = new AzeriteXpGain(); PlayerAzeriteItemGains xpGain = new PlayerAzeriteItemGains();
xpGain.ItemGUID = GetGUID(); xpGain.ItemGUID = GetGUID();
xpGain.XP = xp; xpGain.XP = xp;
owner.SendPacket(xpGain); owner.SendPacket(xpGain);
+1 -1
View File
@@ -1116,7 +1116,7 @@ namespace Game.Entities
public void SendUpdateSockets() public void SendUpdateSockets()
{ {
SocketGemsResult socketGems = new SocketGemsResult(); SocketGemsSuccess socketGems = new SocketGemsSuccess();
socketGems.Item = GetGUID(); socketGems.Item = GetGUID();
GetOwner().SendPacket(socketGems); GetOwner().SendPacket(socketGems);
+3 -3
View File
@@ -466,7 +466,7 @@ namespace Game.Entities
bool hasAreaTriggerPolygon = areaTriggerTemplate.IsPolygon(); bool hasAreaTriggerPolygon = areaTriggerTemplate.IsPolygon();
bool hasAreaTriggerCylinder = areaTriggerTemplate.IsCylinder(); bool hasAreaTriggerCylinder = areaTriggerTemplate.IsCylinder();
bool hasAreaTriggerSpline = areaTrigger.HasSplines(); bool hasAreaTriggerSpline = areaTrigger.HasSplines();
bool hasCircularMovement = areaTrigger.HasCircularMovement(); bool hasOrbit = areaTrigger.HasOrbit();
data.WriteBit(hasAbsoluteOrientation); data.WriteBit(hasAbsoluteOrientation);
data.WriteBit(hasDynamicShape); data.WriteBit(hasDynamicShape);
@@ -488,7 +488,7 @@ namespace Game.Entities
data.WriteBit(hasAreaTriggerPolygon); data.WriteBit(hasAreaTriggerPolygon);
data.WriteBit(hasAreaTriggerCylinder); data.WriteBit(hasAreaTriggerCylinder);
data.WriteBit(hasAreaTriggerSpline); data.WriteBit(hasAreaTriggerSpline);
data.WriteBit(hasCircularMovement); data.WriteBit(hasOrbit);
if (hasUnk3) if (hasUnk3)
data.WriteBit(0); data.WriteBit(0);
@@ -571,7 +571,7 @@ namespace Game.Entities
data.WriteFloat(areaTriggerTemplate.CylinderDatas.LocationZOffsetTarget); data.WriteFloat(areaTriggerTemplate.CylinderDatas.LocationZOffsetTarget);
} }
if (hasCircularMovement) if (hasOrbit)
areaTrigger.GetCircularMovementInfo().Value.Write(data); areaTrigger.GetCircularMovementInfo().Value.Write(data);
} }
@@ -809,23 +809,23 @@ namespace Game.Entities
_favoriteAppearances[itemModifiedAppearanceId] = apperanceState; _favoriteAppearances[itemModifiedAppearanceId] = apperanceState;
TransmogCollectionUpdate transmogCollectionUpdate = new TransmogCollectionUpdate(); AccountTransmogUpdate accountTransmogUpdate = new AccountTransmogUpdate();
transmogCollectionUpdate.IsFullUpdate = false; accountTransmogUpdate.IsFullUpdate = false;
transmogCollectionUpdate.IsSetFavorite = apply; accountTransmogUpdate.IsSetFavorite = apply;
transmogCollectionUpdate.FavoriteAppearances.Add(itemModifiedAppearanceId); accountTransmogUpdate.FavoriteAppearances.Add(itemModifiedAppearanceId);
_owner.SendPacket(transmogCollectionUpdate); _owner.SendPacket(accountTransmogUpdate);
} }
public void SendFavoriteAppearances() public void SendFavoriteAppearances()
{ {
TransmogCollectionUpdate transmogCollectionUpdate = new TransmogCollectionUpdate(); AccountTransmogUpdate accountTransmogUpdate = new AccountTransmogUpdate();
transmogCollectionUpdate.IsFullUpdate = true; accountTransmogUpdate.IsFullUpdate = true;
foreach (var pair in _favoriteAppearances) foreach (var pair in _favoriteAppearances)
if (pair.Value != FavoriteAppearanceState.Removed) if (pair.Value != FavoriteAppearanceState.Removed)
transmogCollectionUpdate.FavoriteAppearances.Add(pair.Key); accountTransmogUpdate.FavoriteAppearances.Add(pair.Key);
_owner.SendPacket(transmogCollectionUpdate); _owner.SendPacket(accountTransmogUpdate);
} }
public void AddTransmogSet(uint transmogSetId) public void AddTransmogSet(uint transmogSetId)
+1 -1
View File
@@ -6202,7 +6202,7 @@ namespace Game.Entities
DB.Characters.CommitTransaction(trans); DB.Characters.CommitTransaction(trans);
SendPacket(new CharacterInventoryOverflowWarning()); SendPacket(new InventoryFullOverflow());
} }
} }
+4 -4
View File
@@ -5651,10 +5651,10 @@ namespace Game.Entities
SendPacket(mountUpdate); SendPacket(mountUpdate);
// SMSG_ACCOUNT_TOYS_UPDATE // SMSG_ACCOUNT_TOYS_UPDATE
AccountToysUpdate toysUpdate = new AccountToysUpdate(); AccountToyUpdate toyUpdate = new AccountToyUpdate();
toysUpdate.IsFullUpdate = true; toyUpdate.IsFullUpdate = true;
toysUpdate.Toys = GetSession().GetCollectionMgr().GetAccountToys(); toyUpdate.Toys = GetSession().GetCollectionMgr().GetAccountToys();
SendPacket(toysUpdate); SendPacket(toyUpdate);
// SMSG_ACCOUNT_HEIRLOOM_UPDATE // SMSG_ACCOUNT_HEIRLOOM_UPDATE
AccountHeirloomUpdate heirloomUpdate = new AccountHeirloomUpdate(); AccountHeirloomUpdate heirloomUpdate = new AccountHeirloomUpdate();
+1 -1
View File
@@ -1466,7 +1466,7 @@ namespace Game.Groups
if (!player || !player.IsInWorld) if (!player || !player.IsInWorld)
return; return;
PartyMemberState packet = new PartyMemberState(); PartyMemberFullState packet = new PartyMemberFullState();
packet.Initialize(player); packet.Initialize(player);
for (GroupReference refe = GetFirstMember(); refe != null; refe = refe.Next()) for (GroupReference refe = GetFirstMember(); refe != null; refe = refe.Next())
+1 -1
View File
@@ -1489,7 +1489,7 @@ namespace Game.Guilds
public void MassInviteToEvent(WorldSession session, uint minLevel, uint maxLevel, uint minRank) public void MassInviteToEvent(WorldSession session, uint minLevel, uint maxLevel, uint minRank)
{ {
CalendarEventInitialInvites packet = new CalendarEventInitialInvites(); CalendarCommunityInvite packet = new CalendarCommunityInvite();
foreach (var member in m_members.Values) foreach (var member in m_members.Values)
{ {
+26 -27
View File
@@ -20,7 +20,6 @@ using Framework.Database;
using Framework.Dynamic; using Framework.Dynamic;
using Game.DataStorage; using Game.DataStorage;
using Game.Entities; using Game.Entities;
using Game.Mails;
using Game.Networking; using Game.Networking;
using Game.Networking.Packets; using Game.Networking.Packets;
using System; using System;
@@ -165,17 +164,17 @@ namespace Game
SendAuctionHello(hello.Guid, unit); SendAuctionHello(hello.Guid, unit);
} }
[WorldPacketHandler(ClientOpcodes.AuctionListBidderItems)] [WorldPacketHandler(ClientOpcodes.AuctionListBiddedItems)]
void HandleAuctionListBidderItems(AuctionListBidderItems listBidderItems) void HandleAuctionListBiddedItems(AuctionListBiddedItems listBiddedItems)
{ {
AuctionThrottleResult throttle = Global.AuctionHouseMgr.CheckThrottle(_player, listBidderItems.TaintedBy.HasValue); AuctionThrottleResult throttle = Global.AuctionHouseMgr.CheckThrottle(_player, listBiddedItems.TaintedBy.HasValue);
if (throttle.Throttled) if (throttle.Throttled)
return; return;
Creature creature = GetPlayer().GetNPCIfCanInteractWith(listBidderItems.Auctioneer, NPCFlags.Auctioneer, NPCFlags2.None); Creature creature = GetPlayer().GetNPCIfCanInteractWith(listBiddedItems.Auctioneer, NPCFlags.Auctioneer, NPCFlags2.None);
if (!creature) if (!creature)
{ {
Log.outDebug(LogFilter.Network, $"WORLD: HandleAuctionListBidderItems - {listBidderItems.Auctioneer} not found or you can't interact with him."); Log.outDebug(LogFilter.Network, $"WORLD: HandleAuctionListBidderItems - {listBiddedItems.Auctioneer} not found or you can't interact with him.");
return; return;
} }
@@ -185,10 +184,10 @@ namespace Game
AuctionHouseObject auctionHouse = Global.AuctionHouseMgr.GetAuctionsMap(creature.GetFaction()); AuctionHouseObject auctionHouse = Global.AuctionHouseMgr.GetAuctionsMap(creature.GetFaction());
AuctionListBidderItemsResult result = new AuctionListBidderItemsResult(); AuctionListBiddedItemsResult result = new AuctionListBiddedItemsResult();
Player player = GetPlayer(); Player player = GetPlayer();
auctionHouse.BuildListBidderItems(result, player, listBidderItems.Offset, listBidderItems.Sorts, listBidderItems.Sorts.Count); auctionHouse.BuildListBiddedItems(result, player, listBiddedItems.Offset, listBiddedItems.Sorts, listBiddedItems.Sorts.Count);
result.DesiredDelay = (uint)throttle.DelayUntilNext.TotalSeconds; result.DesiredDelay = (uint)throttle.DelayUntilNext.TotalSeconds;
SendPacket(result); SendPacket(result);
} }
@@ -288,17 +287,17 @@ namespace Game
SendPacket(listItemsResult); SendPacket(listItemsResult);
} }
[WorldPacketHandler(ClientOpcodes.AuctionListOwnerItems)] [WorldPacketHandler(ClientOpcodes.AuctionListOwnedItems)]
void HandleAuctionListOwnerItems(AuctionListOwnerItems listOwnerItems) void HandleAuctionListOwnedItems(AuctionListOwnedItems listOwnedItems)
{ {
AuctionThrottleResult throttle = Global.AuctionHouseMgr.CheckThrottle(_player, listOwnerItems.TaintedBy.HasValue); AuctionThrottleResult throttle = Global.AuctionHouseMgr.CheckThrottle(_player, listOwnedItems.TaintedBy.HasValue);
if (throttle.Throttled) if (throttle.Throttled)
return; return;
Creature creature = GetPlayer().GetNPCIfCanInteractWith(listOwnerItems.Auctioneer, NPCFlags.Auctioneer, NPCFlags2.None); Creature creature = GetPlayer().GetNPCIfCanInteractWith(listOwnedItems.Auctioneer, NPCFlags.Auctioneer, NPCFlags2.None);
if (!creature) if (!creature)
{ {
Log.outDebug(LogFilter.Network, $"WORLD: HandleAuctionListOwnerItems - {listOwnerItems.Auctioneer} not found or you can't interact with him."); Log.outDebug(LogFilter.Network, $"WORLD: HandleAuctionListOwnerItems - {listOwnedItems.Auctioneer} not found or you can't interact with him.");
return; return;
} }
@@ -308,9 +307,9 @@ namespace Game
AuctionHouseObject auctionHouse = Global.AuctionHouseMgr.GetAuctionsMap(creature.GetFaction()); AuctionHouseObject auctionHouse = Global.AuctionHouseMgr.GetAuctionsMap(creature.GetFaction());
AuctionListOwnerItemsResult result = new AuctionListOwnerItemsResult(); AuctionListOwnedItemsResult result = new AuctionListOwnedItemsResult();
auctionHouse.BuildListOwnerItems(result, _player, listOwnerItems.Offset, listOwnerItems.Sorts, listOwnerItems.Sorts.Count); auctionHouse.BuildListOwnedItems(result, _player, listOwnedItems.Offset, listOwnedItems.Sorts, listOwnedItems.Sorts.Count);
result.DesiredDelay = (uint)throttle.DelayUntilNext.TotalSeconds; result.DesiredDelay = (uint)throttle.DelayUntilNext.TotalSeconds;
SendPacket(result); SendPacket(result);
} }
@@ -925,17 +924,17 @@ namespace Game
DB.Characters.CommitTransaction(trans); DB.Characters.CommitTransaction(trans);
} }
[WorldPacketHandler(ClientOpcodes.AuctionStartCommoditiesPurchase)] [WorldPacketHandler(ClientOpcodes.AuctionGetCommodityQuote)]
void HandleAuctionStartCommoditiesPurchase(AuctionStartCommoditiesPurchase startCommoditiesPurchase) void HandleAuctionGetCommodityQuote(AuctionGetCommodityQuote getCommodityQuote)
{ {
AuctionThrottleResult throttle = Global.AuctionHouseMgr.CheckThrottle(_player, startCommoditiesPurchase.TaintedBy.HasValue, AuctionCommand.PlaceBid); AuctionThrottleResult throttle = Global.AuctionHouseMgr.CheckThrottle(_player, getCommodityQuote.TaintedBy.HasValue, AuctionCommand.PlaceBid);
if (throttle.Throttled) if (throttle.Throttled)
return; return;
Creature creature = GetPlayer().GetNPCIfCanInteractWith(startCommoditiesPurchase.Auctioneer, NPCFlags.Auctioneer, NPCFlags2.None); Creature creature = GetPlayer().GetNPCIfCanInteractWith(getCommodityQuote.Auctioneer, NPCFlags.Auctioneer, NPCFlags2.None);
if (!creature) if (!creature)
{ {
Log.outError(LogFilter.Network, "WORLD: HandleAuctionStartCommoditiesPurchase - {startCommoditiesPurchase.Auctioneer.ToString()} not found or you can't interact with him."); Log.outError(LogFilter.Network, $"WORLD: HandleAuctionStartCommoditiesPurchase - {getCommodityQuote.Auctioneer} not found or you can't interact with him.");
return; return;
} }
@@ -945,19 +944,19 @@ namespace Game
AuctionHouseObject auctionHouse = Global.AuctionHouseMgr.GetAuctionsMap(creature.GetFaction()); AuctionHouseObject auctionHouse = Global.AuctionHouseMgr.GetAuctionsMap(creature.GetFaction());
AuctionCommodityQuote auctionCommodityQuote = new AuctionCommodityQuote(); AuctionGetCommodityQuoteResult commodityQuoteResult = new AuctionGetCommodityQuoteResult();
CommodityQuote quote = auctionHouse.CreateCommodityQuote(_player, (uint)startCommoditiesPurchase.ItemID, startCommoditiesPurchase.Quantity); CommodityQuote quote = auctionHouse.CreateCommodityQuote(_player, (uint)getCommodityQuote.ItemID, getCommodityQuote.Quantity);
if (quote != null) if (quote != null)
{ {
auctionCommodityQuote.TotalPrice.Set(quote.TotalPrice); commodityQuoteResult.TotalPrice.Set(quote.TotalPrice);
auctionCommodityQuote.Quantity.Set(quote.Quantity); commodityQuoteResult.Quantity.Set(quote.Quantity);
auctionCommodityQuote.QuoteDuration.Set((int)(quote.ValidTo - GameTime.GetGameTimeSteadyPoint()).TotalMilliseconds); commodityQuoteResult.QuoteDuration.Set((int)(quote.ValidTo - GameTime.GetGameTimeSteadyPoint()).TotalMilliseconds);
} }
auctionCommodityQuote.DesiredDelay = (uint)throttle.DelayUntilNext.TotalSeconds; commodityQuoteResult.DesiredDelay = (uint)throttle.DelayUntilNext.TotalSeconds;
SendPacket(auctionCommodityQuote); SendPacket(commodityQuoteResult);
} }
public void SendAuctionHello(ObjectGuid guid, Creature unit) public void SendAuctionHello(ObjectGuid guid, Creature unit)
+1 -1
View File
@@ -62,7 +62,7 @@ namespace Game
[WorldPacketHandler(ClientOpcodes.AzeriteEssenceActivateEssence)] [WorldPacketHandler(ClientOpcodes.AzeriteEssenceActivateEssence)]
void HandleAzeriteEssenceActivateEssence(AzeriteEssenceActivateEssence azeriteEssenceActivateEssence) void HandleAzeriteEssenceActivateEssence(AzeriteEssenceActivateEssence azeriteEssenceActivateEssence)
{ {
AzeriteEssenceSelectionResult activateEssenceResult = new AzeriteEssenceSelectionResult(); ActivateEssenceFailed activateEssenceResult = new ActivateEssenceFailed();
activateEssenceResult.AzeriteEssenceID = azeriteEssenceActivateEssence.AzeriteEssenceID; activateEssenceResult.AzeriteEssenceID = azeriteEssenceActivateEssence.AzeriteEssenceID;
Item item = _player.GetItemByEntry(PlayerConst.ItemIdHeartOfAzeroth, ItemSearchLocation.InEquipment); Item item = _player.GetItemByEntry(PlayerConst.ItemIdHeartOfAzeroth, ItemSearchLocation.InEquipment);
+5 -5
View File
@@ -221,9 +221,9 @@ namespace Game
if (bg.IsArena()) if (bg.IsArena())
return; return;
PVPLogDataMessage pvpLogData = new PVPLogDataMessage(); PVPMatchStatisticsMessage pvpMatchStatistics = new PVPMatchStatisticsMessage();
bg.BuildPvPLogDataPacket(out pvpLogData.Data); bg.BuildPvPLogDataPacket(out pvpMatchStatistics.Data);
SendPacket(pvpLogData); SendPacket(pvpMatchStatistics);
} }
[WorldPacketHandler(ClientOpcodes.BattlefieldList)] [WorldPacketHandler(ClientOpcodes.BattlefieldList)]
@@ -581,8 +581,8 @@ namespace Game
[WorldPacketHandler(ClientOpcodes.RequestRatedBattlefieldInfo)] [WorldPacketHandler(ClientOpcodes.RequestRatedBattlefieldInfo)]
void HandleRequestRatedBattlefieldInfo(RequestRatedBattlefieldInfo packet) void HandleRequestRatedBattlefieldInfo(RequestRatedBattlefieldInfo packet)
{ {
RatedBattlefieldInfo ratedBattlefieldInfo = new RatedBattlefieldInfo(); RatedPvpInfo ratedPvpInfo = new RatedPvpInfo();
SendPacket(ratedBattlefieldInfo); SendPacket(ratedPvpInfo);
} }
[WorldPacketHandler(ClientOpcodes.GetPvpOptionsEnabled, Processing = PacketProcessing.Inplace)] [WorldPacketHandler(ClientOpcodes.GetPvpOptionsEnabled, Processing = PacketProcessing.Inplace)]
+5 -5
View File
@@ -31,13 +31,13 @@ namespace Game
Global.ServiceMgr.Dispatch(this, request.Method.GetServiceHash(), request.Method.Token, request.Method.GetMethodId(), new CodedInputStream(request.Data)); Global.ServiceMgr.Dispatch(this, request.Method.GetServiceHash(), request.Method.Token, request.Method.GetMethodId(), new CodedInputStream(request.Data));
} }
[WorldPacketHandler(ClientOpcodes.BattlenetRequestRealmListTicket, Status = SessionStatus.Authed)] [WorldPacketHandler(ClientOpcodes.ChangeRealmTicket, Status = SessionStatus.Authed)]
void HandleBattlenetRequestRealmListTicket(RequestRealmListTicket requestRealmListTicket) void HandleBattlenetChangeRealmTicket(ChangeRealmTicket changeRealmTicket)
{ {
SetRealmListSecret(requestRealmListTicket.Secret); SetRealmListSecret(changeRealmTicket.Secret);
RealmListTicket realmListTicket = new RealmListTicket(); ChangeRealmTicketResponse realmListTicket = new ChangeRealmTicketResponse();
realmListTicket.Token = requestRealmListTicket.Token; realmListTicket.Token = changeRealmTicket.Token;
realmListTicket.Allow = true; realmListTicket.Allow = true;
realmListTicket.Ticket = new Framework.IO.ByteBuffer(); realmListTicket.Ticket = new Framework.IO.ByteBuffer();
realmListTicket.Ticket.WriteCString("WorldserverRealmListTicket"); realmListTicket.Ticket.WriteCString("WorldserverRealmListTicket");
+7 -7
View File
@@ -692,13 +692,13 @@ namespace Game
// Send PVPSeason // Send PVPSeason
{ {
PVPSeason season = new PVPSeason(); SeasonInfo seasonInfo = new SeasonInfo();
season.PreviousSeason = (WorldConfig.GetIntValue(WorldCfg.ArenaSeasonId) - (WorldConfig.GetBoolValue(WorldCfg.ArenaSeasonInProgress) ? 1 : 0)); seasonInfo.PreviousSeason = (WorldConfig.GetIntValue(WorldCfg.ArenaSeasonId) - (WorldConfig.GetBoolValue(WorldCfg.ArenaSeasonInProgress) ? 1 : 0));
if (WorldConfig.GetBoolValue(WorldCfg.ArenaSeasonInProgress)) if (WorldConfig.GetBoolValue(WorldCfg.ArenaSeasonInProgress))
season.CurrentSeason = WorldConfig.GetIntValue(WorldCfg.ArenaSeasonId); seasonInfo.CurrentSeason = WorldConfig.GetIntValue(WorldCfg.ArenaSeasonId);
SendPacket(season); SendPacket(seasonInfo);
} }
SQLResult resultGuild = holder.GetResult(PlayerLoginQueryLoad.Guild); SQLResult resultGuild = holder.GetResult(PlayerLoginQueryLoad.Guild);
@@ -792,7 +792,7 @@ namespace Game
stmt.AddValue(0, pCurrChar.GetGUID().GetCounter()); stmt.AddValue(0, pCurrChar.GetGUID().GetCounter());
GetQueryProcessor().AddCallback(DB.Characters.AsyncQuery(stmt)).WithCallback(favoriteAuctionResult => GetQueryProcessor().AddCallback(DB.Characters.AsyncQuery(stmt)).WithCallback(favoriteAuctionResult =>
{ {
AuctionFavoriteItems favoriteItems = new AuctionFavoriteItems(); AuctionFavoriteList favoriteItems = new AuctionFavoriteList();
if (!favoriteAuctionResult.IsEmpty()) if (!favoriteAuctionResult.IsEmpty())
{ {
do do
@@ -2432,12 +2432,12 @@ namespace Game
{ {
if (result == ResponseCodes.Success) if (result == ResponseCodes.Success)
{ {
CharCustomizeResponse response = new CharCustomizeResponse(customizeInfo); CharCustomizeSuccess response = new CharCustomizeSuccess(customizeInfo);
SendPacket(response); SendPacket(response);
} }
else else
{ {
CharCustomizeFailed failed = new CharCustomizeFailed(); CharCustomizeFailure failed = new CharCustomizeFailure();
failed.Result = (byte)result; failed.Result = (byte)result;
failed.CharGUID = customizeInfo.CharGUID; failed.CharGUID = customizeInfo.CharGUID;
SendPacket(failed); SendPacket(failed);
+1 -1
View File
@@ -586,7 +586,7 @@ namespace Game
[WorldPacketHandler(ClientOpcodes.RequestPartyMemberStats)] [WorldPacketHandler(ClientOpcodes.RequestPartyMemberStats)]
void HandleRequestPartyMemberStats(RequestPartyMemberStats packet) void HandleRequestPartyMemberStats(RequestPartyMemberStats packet)
{ {
PartyMemberState partyMemberStats = new PartyMemberState(); PartyMemberFullState partyMemberStats = new PartyMemberFullState();
Player player = Global.ObjAccessor.FindConnectedPlayer(packet.TargetGUID); Player player = Global.ObjAccessor.FindConnectedPlayer(packet.TargetGUID);
if (!player) if (!player)
+2 -2
View File
@@ -67,14 +67,14 @@ namespace Game
{ {
var hotfixes = Global.DB2Mgr.GetHotfixData(); var hotfixes = Global.DB2Mgr.GetHotfixData();
HotfixResponse hotfixQueryResponse = new HotfixResponse(); HotfixConnect hotfixQueryResponse = new HotfixConnect();
foreach (HotfixRecord hotfixRecord in hotfixQuery.Hotfixes) foreach (HotfixRecord hotfixRecord in hotfixQuery.Hotfixes)
{ {
if (hotfixes.Contains(hotfixRecord)) if (hotfixes.Contains(hotfixRecord))
{ {
var storage = Global.DB2Mgr.GetStorage(hotfixRecord.TableHash); var storage = Global.DB2Mgr.GetStorage(hotfixRecord.TableHash);
HotfixResponse.HotfixData hotfixData = new HotfixResponse.HotfixData(); HotfixConnect.HotfixData hotfixData = new HotfixConnect.HotfixData();
hotfixData.Record = hotfixRecord; hotfixData.Record = hotfixRecord;
if (storage != null && storage.HasRecord((uint)hotfixRecord.RecordID)) if (storage != null && storage.HasRecord((uint)hotfixRecord.RecordID))
{ {
+3 -3
View File
@@ -1072,7 +1072,7 @@ namespace Game
{ {
// TODO: Implement sorting // TODO: Implement sorting
// Placeholder to prevent completely locking out bags clientside // Placeholder to prevent completely locking out bags clientside
SendPacket(new SortBagsResult()); SendPacket(new BagCleanupFinished());
} }
[WorldPacketHandler(ClientOpcodes.SortBankBags)] [WorldPacketHandler(ClientOpcodes.SortBankBags)]
@@ -1080,7 +1080,7 @@ namespace Game
{ {
// TODO: Implement sorting // TODO: Implement sorting
// Placeholder to prevent completely locking out bags clientside // Placeholder to prevent completely locking out bags clientside
SendPacket(new SortBagsResult()); SendPacket(new BagCleanupFinished());
} }
[WorldPacketHandler(ClientOpcodes.SortReagentBankBags)] [WorldPacketHandler(ClientOpcodes.SortReagentBankBags)]
@@ -1088,7 +1088,7 @@ namespace Game
{ {
// TODO: Implement sorting // TODO: Implement sorting
// Placeholder to prevent completely locking out bags clientside // Placeholder to prevent completely locking out bags clientside
SendPacket(new SortBagsResult()); SendPacket(new BagCleanupFinished());
} }
[WorldPacketHandler(ClientOpcodes.RemoveNewItem)] [WorldPacketHandler(ClientOpcodes.RemoveNewItem)]
+1 -1
View File
@@ -648,7 +648,7 @@ namespace Game
[WorldPacketHandler(ClientOpcodes.RequestWorldQuestUpdate)] [WorldPacketHandler(ClientOpcodes.RequestWorldQuestUpdate)]
void HandleRequestWorldQuestUpdate(RequestWorldQuestUpdate packet) void HandleRequestWorldQuestUpdate(RequestWorldQuestUpdate packet)
{ {
WorldQuestUpdate response = new WorldQuestUpdate(); WorldQuestUpdateResponse response = new WorldQuestUpdateResponse();
// @todo: 7.x Has to be implemented // @todo: 7.x Has to be implemented
//response.WorldQuestUpdates.push_back(WorldPackets::Quest::WorldQuestUpdateInfo(lastUpdate, questID, timer, variableID, value)); //response.WorldQuestUpdates.push_back(WorldPackets::Quest::WorldQuestUpdateInfo(lastUpdate, questID, timer, variableID, value));
+14 -14
View File
@@ -29,24 +29,24 @@ namespace Game
[WorldPacketHandler(ClientOpcodes.LearnTalents)] [WorldPacketHandler(ClientOpcodes.LearnTalents)]
void HandleLearnTalents(LearnTalents packet) void HandleLearnTalents(LearnTalents packet)
{ {
LearnTalentsFailed learnTalentsFailed = new LearnTalentsFailed(); LearnTalentFailed learnTalentFailed = new LearnTalentFailed();
bool anythingLearned = false; bool anythingLearned = false;
foreach (uint talentId in packet.Talents) foreach (uint talentId in packet.Talents)
{ {
TalentLearnResult result = _player.LearnTalent(talentId, ref learnTalentsFailed.SpellID); TalentLearnResult result = _player.LearnTalent(talentId, ref learnTalentFailed.SpellID);
if (result != 0) if (result != 0)
{ {
if (learnTalentsFailed.Reason == 0) if (learnTalentFailed.Reason == 0)
learnTalentsFailed.Reason = (uint)result; learnTalentFailed.Reason = (uint)result;
learnTalentsFailed.Talents.Add((ushort)talentId); learnTalentFailed.Talents.Add((ushort)talentId);
} }
else else
anythingLearned = true; anythingLearned = true;
} }
if (learnTalentsFailed.Reason != 0) if (learnTalentFailed.Reason != 0)
SendPacket(learnTalentsFailed); SendPacket(learnTalentFailed);
if (anythingLearned) if (anythingLearned)
GetPlayer().SendTalentsInfoData(); GetPlayer().SendTalentsInfoData();
@@ -55,24 +55,24 @@ namespace Game
[WorldPacketHandler(ClientOpcodes.LearnPvpTalents)] [WorldPacketHandler(ClientOpcodes.LearnPvpTalents)]
void HandleLearnPvpTalents(LearnPvpTalents packet) void HandleLearnPvpTalents(LearnPvpTalents packet)
{ {
LearnPvpTalentsFailed learnPvpTalentsFailed = new LearnPvpTalentsFailed(); LearnPvpTalentFailed learnPvpTalentFailed = new LearnPvpTalentFailed();
bool anythingLearned = false; bool anythingLearned = false;
foreach (var pvpTalent in packet.Talents) foreach (var pvpTalent in packet.Talents)
{ {
TalentLearnResult result = _player.LearnPvpTalent(pvpTalent.PvPTalentID, pvpTalent.Slot, ref learnPvpTalentsFailed.SpellID); TalentLearnResult result = _player.LearnPvpTalent(pvpTalent.PvPTalentID, pvpTalent.Slot, ref learnPvpTalentFailed.SpellID);
if (result != 0) if (result != 0)
{ {
if (learnPvpTalentsFailed.Reason == 0) if (learnPvpTalentFailed.Reason == 0)
learnPvpTalentsFailed.Reason = (uint)result; learnPvpTalentFailed.Reason = (uint)result;
learnPvpTalentsFailed.Talents.Add(pvpTalent); learnPvpTalentFailed.Talents.Add(pvpTalent);
} }
else else
anythingLearned = true; anythingLearned = true;
} }
if (learnPvpTalentsFailed.Reason != 0) if (learnPvpTalentFailed.Reason != 0)
SendPacket(learnPvpTalentsFailed); SendPacket(learnPvpTalentFailed);
if (anythingLearned) if (anythingLearned)
_player.SendTalentsInfoData(); _player.SendTalentsInfoData();
+3 -3
View File
@@ -24,10 +24,10 @@ namespace Game
{ {
public partial class WorldSession public partial class WorldSession
{ {
[WorldPacketHandler(ClientOpcodes.UiTimeRequest, Status = SessionStatus.Authed, Processing = PacketProcessing.Inplace)] [WorldPacketHandler(ClientOpcodes.ServerTimeOffsetRequest, Status = SessionStatus.Authed, Processing = PacketProcessing.Inplace)]
void HandleUITimeRequest(UITimeRequest packet) void HandleServerTimeOffsetRequest(ServerTimeOffsetRequest packet)
{ {
UITime response = new UITime(); ServerTimeOffset response = new ServerTimeOffset();
response.Time = (uint)Time.UnixTime; response.Time = (uint)Time.UnixTime;
SendPacket(response); SendPacket(response);
} }
+8 -8
View File
@@ -23,26 +23,26 @@ namespace Game
{ {
public partial class WorldSession public partial class WorldSession
{ {
[WorldPacketHandler(ClientOpcodes.UpdateWowTokenAuctionableList)] [WorldPacketHandler(ClientOpcodes.CommerceTokenGetLog)]
void HandleUpdateListedAuctionableTokens(UpdateListedAuctionableTokens updateListedAuctionableTokens) void HandleCommerceTokenGetLog(CommerceTokenGetLog commerceTokenGetLog)
{ {
UpdateListedAuctionableTokensResponse response = new UpdateListedAuctionableTokensResponse(); CommerceTokenGetLogResponse response = new CommerceTokenGetLogResponse();
// @todo: fix 6.x implementation // @todo: fix 6.x implementation
response.UnkInt = updateListedAuctionableTokens.UnkInt; response.UnkInt = commerceTokenGetLog.UnkInt;
response.Result = TokenResult.Success; response.Result = TokenResult.Success;
SendPacket(response); SendPacket(response);
} }
[WorldPacketHandler(ClientOpcodes.RequestWowTokenMarketPrice)] [WorldPacketHandler(ClientOpcodes.CommerceTokenGetMarketPrice)]
void HandleRequestWowTokenMarketPrice(RequestWowTokenMarketPrice requestWowTokenMarketPrice) void HandleCommerceTokenGetMarketPrice(CommerceTokenGetMarketPrice commerceTokenGetMarketPrice)
{ {
WowTokenMarketPriceResponse response = new WowTokenMarketPriceResponse(); CommerceTokenGetMarketPriceResponse response = new CommerceTokenGetMarketPriceResponse();
// @todo: 6.x fix implementation // @todo: 6.x fix implementation
response.CurrentMarketPrice = 300000000; response.CurrentMarketPrice = 300000000;
response.UnkInt = requestWowTokenMarketPrice.UnkInt; response.UnkInt = commerceTokenGetMarketPrice.UnkInt;
response.Result = TokenResult.Success; response.Result = TokenResult.Success;
//packet.ReadUInt32("UnkInt32"); //packet.ReadUInt32("UnkInt32");
@@ -294,7 +294,7 @@ namespace Game
public void SendOpenTransmogrifier(ObjectGuid guid) public void SendOpenTransmogrifier(ObjectGuid guid)
{ {
SendPacket(new OpenTransmogrifier(guid)); SendPacket(new TransmogrifyNPC(guid));
} }
} }
} }
+1 -1
View File
@@ -727,7 +727,7 @@ namespace Game.Maps
void SendBossKillCredit(uint encounterId) void SendBossKillCredit(uint encounterId)
{ {
BossKillCredit bossKillCreditMessage = new BossKillCredit(); BossKill bossKillCreditMessage = new BossKill();
bossKillCreditMessage.DungeonEncounterID = encounterId; bossKillCreditMessage.DungeonEncounterID = encounterId;
instance.SendToPlayers(bossKillCreditMessage); instance.SendToPlayers(bossKillCreditMessage);
@@ -71,18 +71,18 @@ namespace Game.Networking.Packets
_worldPacket.WritePackedGuid(TriggerGUID); _worldPacket.WritePackedGuid(TriggerGUID);
_worldPacket.WriteBit(AreaTriggerSpline.HasValue); _worldPacket.WriteBit(AreaTriggerSpline.HasValue);
_worldPacket.WriteBit(AreaTriggerCircularMovement.HasValue); _worldPacket.WriteBit(AreaTriggerOrbit.HasValue);
_worldPacket.FlushBits(); _worldPacket.FlushBits();
if (AreaTriggerSpline.HasValue) if (AreaTriggerSpline.HasValue)
AreaTriggerSpline.Value.Write(_worldPacket); AreaTriggerSpline.Value.Write(_worldPacket);
if (AreaTriggerCircularMovement.HasValue) if (AreaTriggerOrbit.HasValue)
AreaTriggerCircularMovement.Value.Write(_worldPacket); AreaTriggerOrbit.Value.Write(_worldPacket);
} }
public Optional<AreaTriggerSplineInfo> AreaTriggerSpline; public Optional<AreaTriggerSplineInfo> AreaTriggerSpline;
public Optional<AreaTriggerCircularMovementInfo> AreaTriggerCircularMovement; public Optional<AreaTriggerOrbitInfo> AreaTriggerOrbit;
public ObjectGuid TriggerGUID; public ObjectGuid TriggerGUID;
} }
@@ -81,9 +81,9 @@ namespace Game.Networking.Packets
public ObjectGuid NpcGUID; public ObjectGuid NpcGUID;
} }
class ArtifactForgeOpened : ServerPacket class OpenArtifactForge : ServerPacket
{ {
public ArtifactForgeOpened() : base(ServerOpcodes.ArtifactForgeOpened) { } public OpenArtifactForge() : base(ServerOpcodes.OpenArtifactForge) { }
public override void Write() public override void Write()
{ {
@@ -95,9 +95,9 @@ namespace Game.Networking.Packets
public ObjectGuid ForgeGUID; public ObjectGuid ForgeGUID;
} }
class ArtifactRespecConfirm : ServerPacket class ArtifactRespecPrompt : ServerPacket
{ {
public ArtifactRespecConfirm() : base(ServerOpcodes.ArtifactRespecConfirm) { } public ArtifactRespecPrompt() : base(ServerOpcodes.ArtifactRespecPrompt) { }
public override void Write() public override void Write()
{ {
@@ -119,7 +119,7 @@ namespace Game.Networking.Packets
} }
} }
class AuctionListBidderItems : ClientPacket class AuctionListBiddedItems : ClientPacket
{ {
public ObjectGuid Auctioneer; public ObjectGuid Auctioneer;
public uint Offset; public uint Offset;
@@ -127,7 +127,7 @@ namespace Game.Networking.Packets
public Array<AuctionSortDef> Sorts = new Array<AuctionSortDef>(2); public Array<AuctionSortDef> Sorts = new Array<AuctionSortDef>(2);
public Optional<AddOnInfo> TaintedBy; public Optional<AddOnInfo> TaintedBy;
public AuctionListBidderItems(WorldPacket packet) : base(packet) { } public AuctionListBiddedItems(WorldPacket packet) : base(packet) { }
public override void Read() public override void Read()
{ {
@@ -237,14 +237,14 @@ namespace Game.Networking.Packets
} }
} }
class AuctionListOwnerItems : ClientPacket class AuctionListOwnedItems : ClientPacket
{ {
public ObjectGuid Auctioneer; public ObjectGuid Auctioneer;
public uint Offset; public uint Offset;
public Optional<AddOnInfo> TaintedBy; public Optional<AddOnInfo> TaintedBy;
public Array<AuctionSortDef> Sorts = new Array<AuctionSortDef>(2); public Array<AuctionSortDef> Sorts = new Array<AuctionSortDef>(2);
public AuctionListOwnerItems(WorldPacket packet) : base(packet) { } public AuctionListOwnedItems(WorldPacket packet) : base(packet) { }
public override void Read() public override void Read()
{ {
@@ -396,14 +396,14 @@ namespace Game.Networking.Packets
} }
} }
class AuctionStartCommoditiesPurchase : ClientPacket class AuctionGetCommodityQuote : ClientPacket
{ {
public ObjectGuid Auctioneer; public ObjectGuid Auctioneer;
public int ItemID; public int ItemID;
public uint Quantity; public uint Quantity;
public Optional<AddOnInfo> TaintedBy; public Optional<AddOnInfo> TaintedBy;
public AuctionStartCommoditiesPurchase(WorldPacket packet) : base(packet) { } public AuctionGetCommodityQuote(WorldPacket packet) : base(packet) { }
public override void Read() public override void Read()
{ {
@@ -460,7 +460,7 @@ namespace Game.Networking.Packets
} }
} }
class AuctionCommodityQuote : ServerPacket class AuctionGetCommodityQuoteResult : ServerPacket
{ {
public Optional<ulong> TotalPrice; public Optional<ulong> TotalPrice;
public Optional<uint> Quantity; public Optional<uint> Quantity;
@@ -468,7 +468,7 @@ namespace Game.Networking.Packets
public int Unknown830; public int Unknown830;
public uint DesiredDelay; public uint DesiredDelay;
public AuctionCommodityQuote() : base(ServerOpcodes.AuctionCommodityQuote) { } public AuctionGetCommodityQuoteResult() : base(ServerOpcodes.AuctionGetCommodityQuoteResult) { }
public override void Write() public override void Write()
{ {
@@ -504,13 +504,13 @@ namespace Game.Networking.Packets
} }
} }
public class AuctionListBidderItemsResult : ServerPacket public class AuctionListBiddedItemsResult : ServerPacket
{ {
public List<AuctionItem> Items = new List<AuctionItem>(); public List<AuctionItem> Items = new List<AuctionItem>();
public uint DesiredDelay; public uint DesiredDelay;
public bool HasMoreResults; public bool HasMoreResults;
public AuctionListBidderItemsResult() : base(ServerOpcodes.AuctionListBidderItemsResult) { } public AuctionListBiddedItemsResult() : base(ServerOpcodes.AuctionListBiddedItemsResult) { }
public override void Write() public override void Write()
{ {
@@ -550,12 +550,12 @@ namespace Game.Networking.Packets
} }
} }
class AuctionFavoriteItems : ServerPacket class AuctionFavoriteList : ServerPacket
{ {
public uint DesiredDelay; public uint DesiredDelay;
public List<AuctionFavoriteInfo> Items = new List<AuctionFavoriteInfo>(); public List<AuctionFavoriteInfo> Items = new List<AuctionFavoriteInfo>();
public AuctionFavoriteItems() : base(ServerOpcodes.AuctionFavoriteItems) { } public AuctionFavoriteList() : base(ServerOpcodes.AuctionFavoriteList) { }
public override void Write() public override void Write()
{ {
@@ -597,14 +597,14 @@ namespace Game.Networking.Packets
} }
} }
public class AuctionListOwnerItemsResult : ServerPacket public class AuctionListOwnedItemsResult : ServerPacket
{ {
public List<AuctionItem> Items = new List<AuctionItem>(); public List<AuctionItem> Items = new List<AuctionItem>();
public List<AuctionItem> SoldItems = new List<AuctionItem>(); public List<AuctionItem> SoldItems = new List<AuctionItem>();
public uint DesiredDelay; public uint DesiredDelay;
public bool HasMoreResults; public bool HasMoreResults;
public AuctionListOwnerItemsResult() : base(ServerOpcodes.AuctionListOwnerItemsResult) { } public AuctionListOwnedItemsResult() : base(ServerOpcodes.AuctionListOwnedItemsResult) { }
public override void Write() public override void Write()
{ {
@@ -365,14 +365,14 @@ namespace Game.Networking.Packets
byte Con; byte Con;
} }
class EnableEncryption : ServerPacket class EnterEncryptedMode : ServerPacket
{ {
byte[] EncryptionKey; byte[] EncryptionKey;
bool Enabled; bool Enabled;
static byte[] EnableEncryptionSeed = { 0x90, 0x9C, 0xD0, 0x50, 0x5A, 0x2C, 0x14, 0xDD, 0x5C, 0x2C, 0xC0, 0x64, 0x14, 0xF3, 0xFE, 0xC9 }; static byte[] EnableEncryptionSeed = { 0x90, 0x9C, 0xD0, 0x50, 0x5A, 0x2C, 0x14, 0xDD, 0x5C, 0x2C, 0xC0, 0x64, 0x14, 0xF3, 0xFE, 0xC9 };
public EnableEncryption(byte[] encryptionKey, bool enabled) : base(ServerOpcodes.EnableEncryption) public EnterEncryptedMode(byte[] encryptionKey, bool enabled) : base(ServerOpcodes.EnterEncryptedMode)
{ {
EncryptionKey = encryptionKey; EncryptionKey = encryptionKey;
Enabled = enabled; Enabled = enabled;
@@ -21,9 +21,9 @@ using Framework.Dynamic;
namespace Game.Networking.Packets namespace Game.Networking.Packets
{ {
class AzeriteXpGain : ServerPacket class PlayerAzeriteItemGains : ServerPacket
{ {
public AzeriteXpGain() : base(ServerOpcodes.AzeriteXpGain) { } public PlayerAzeriteItemGains() : base(ServerOpcodes.PlayerAzeriteItemGains) { }
public override void Write() public override void Write()
{ {
@@ -35,9 +35,9 @@ namespace Game.Networking.Packets
public ulong XP; public ulong XP;
} }
class AzeriteEssenceForgeOpened : ServerPacket class OpenHeartForge : ServerPacket
{ {
public AzeriteEssenceForgeOpened() : base(ServerOpcodes.AzeriteEssenceForgeOpened) { } public OpenHeartForge() : base(ServerOpcodes.OpenHeartForge) { }
public override void Write() public override void Write()
{ {
@@ -47,9 +47,9 @@ namespace Game.Networking.Packets
public ObjectGuid ForgeGUID; public ObjectGuid ForgeGUID;
} }
class AzeriteEssenceForgeClose : ServerPacket class CloseHeartForge : ServerPacket
{ {
public AzeriteEssenceForgeClose() : base(ServerOpcodes.AzeriteEssenceForgeClose) { } public CloseHeartForge() : base(ServerOpcodes.CloseHeartForge) { }
public override void Write() { } public override void Write() { }
} }
@@ -80,9 +80,9 @@ namespace Game.Networking.Packets
public byte Slot; public byte Slot;
} }
class AzeriteEssenceSelectionResult : ServerPacket class ActivateEssenceFailed : ServerPacket
{ {
public AzeriteEssenceSelectionResult() : base(ServerOpcodes.AzeriteEssenceSelectionResult) { } public ActivateEssenceFailed() : base(ServerOpcodes.ActivateEssenceFailed) { }
public override void Write() public override void Write()
{ {
@@ -130,9 +130,9 @@ namespace Game.Networking.Packets
public byte Slot; public byte Slot;
} }
class AzeriteEmpoweredItemEquippedStatusChanged : ServerPacket class PlayerAzeriteItemEquippedStatusChanged : ServerPacket
{ {
public AzeriteEmpoweredItemEquippedStatusChanged() : base(ServerOpcodes.AzeriteEmpoweredItemEquippedStatusChanged) { } public PlayerAzeriteItemEquippedStatusChanged() : base(ServerOpcodes.PlayerAzeriteItemEquippedStatusChanged) { }
public override void Write() public override void Write()
{ {
@@ -143,9 +143,9 @@ namespace Game.Networking.Packets
public bool IsHeartEquipped; public bool IsHeartEquipped;
} }
class AzeriteEmpoweredItemRespecOpen : ServerPacket class AzeriteRespecNPC : ServerPacket
{ {
public AzeriteEmpoweredItemRespecOpen(ObjectGuid npcGuid) : base(ServerOpcodes.AzeriteEmpoweredItemRespecOpen) public AzeriteRespecNPC(ObjectGuid npcGuid) : base(ServerOpcodes.AzeriteRespecNpc)
{ {
NpcGUID = npcGuid; NpcGUID = npcGuid;
} }
@@ -24,9 +24,9 @@ using System.Collections.Generic;
namespace Game.Networking.Packets namespace Game.Networking.Packets
{ {
public class PVPSeason : ServerPacket public class SeasonInfo : ServerPacket
{ {
public PVPSeason() : base(ServerOpcodes.PvpSeason) { } public SeasonInfo() : base(ServerOpcodes.SeasonInfo) { }
public override void Write() public override void Write()
{ {
@@ -80,16 +80,16 @@ namespace Game.Networking.Packets
public override void Read() { } public override void Read() { }
} }
public class PVPLogDataMessage : ServerPacket public class PVPMatchStatisticsMessage : ServerPacket
{ {
public PVPLogDataMessage() : base(ServerOpcodes.PvpLogData, ConnectionType.Instance) { } public PVPMatchStatisticsMessage() : base(ServerOpcodes.PvpMatchStatistics, ConnectionType.Instance) { }
public override void Write() public override void Write()
{ {
Data.Write(_worldPacket); Data.Write(_worldPacket);
} }
public PVPLogData Data; public PVPMatchStatistics Data;
} }
public class BattlefieldStatusNone : ServerPacket public class BattlefieldStatusNone : ServerPacket
@@ -442,9 +442,9 @@ namespace Game.Networking.Packets
public override void Read() { } public override void Read() { }
} }
class RatedBattlefieldInfo : ServerPacket class RatedPvpInfo : ServerPacket
{ {
public RatedBattlefieldInfo() : base(ServerOpcodes.RatedBattlefieldInfo) { } public RatedPvpInfo() : base(ServerOpcodes.RatedPvpInfo) { }
public override void Write() public override void Write()
{ {
@@ -455,9 +455,9 @@ namespace Game.Networking.Packets
BracketInfo[] Bracket = new BracketInfo[6]; BracketInfo[] Bracket = new BracketInfo[6];
} }
class PVPMatchInit : ServerPacket class PVPMatchInitialize : ServerPacket
{ {
public PVPMatchInit() : base(ServerOpcodes.PvpMatchInit, ConnectionType.Instance) { } public PVPMatchInitialize() : base(ServerOpcodes.PvpMatchInitialize, ConnectionType.Instance) { }
public override void Write() public override void Write()
{ {
@@ -489,9 +489,9 @@ namespace Game.Networking.Packets
public bool AffectsRating; public bool AffectsRating;
} }
class PVPMatchEnd : ServerPacket class PVPMatchComplete : ServerPacket
{ {
public PVPMatchEnd() : base(ServerOpcodes.PvpMatchEnd, ConnectionType.Instance) { } public PVPMatchComplete() : base(ServerOpcodes.PvpMatchComplete, ConnectionType.Instance) { }
public override void Write() public override void Write()
{ {
@@ -506,7 +506,7 @@ namespace Game.Networking.Packets
public byte Winner; public byte Winner;
public int Duration; public int Duration;
public Optional<PVPLogData> LogData; public Optional<PVPMatchStatistics> LogData;
} }
//Structs //Structs
@@ -547,7 +547,7 @@ namespace Game.Networking.Packets
} }
} }
public class PVPLogData public class PVPMatchStatistics
{ {
public List<PVPMatchPlayerStatistics> Statistics = new List<PVPMatchPlayerStatistics>(); public List<PVPMatchPlayerStatistics> Statistics = new List<PVPMatchPlayerStatistics>();
public Optional<RatingData> Ratings; public Optional<RatingData> Ratings;
@@ -53,9 +53,9 @@ namespace Game.Networking.Packets
public ByteBuffer Data = new ByteBuffer(); public ByteBuffer Data = new ByteBuffer();
} }
class SetSessionState : ServerPacket class ConnectionStatus : ServerPacket
{ {
public SetSessionState() : base(ServerOpcodes.BattlenetSetSessionState) { } public ConnectionStatus() : base(ServerOpcodes.BattleNetConnectionStatus) { }
public override void Write() public override void Write()
{ {
@@ -68,9 +68,9 @@ namespace Game.Networking.Packets
public bool SuppressNotification; public bool SuppressNotification;
} }
class RealmListTicket : ServerPacket class ChangeRealmTicketResponse : ServerPacket
{ {
public RealmListTicket() : base(ServerOpcodes.BattlenetRealmListTicket) { } public ChangeRealmTicketResponse() : base(ServerOpcodes.ChangeRealmTicketResponse) { }
public override void Write() public override void Write()
{ {
@@ -101,9 +101,9 @@ namespace Game.Networking.Packets
public byte[] Data; public byte[] Data;
} }
class RequestRealmListTicket : ClientPacket class ChangeRealmTicket : ClientPacket
{ {
public RequestRealmListTicket(WorldPacket packet) : base(packet) { } public ChangeRealmTicket(WorldPacket packet) : base(packet) { }
public override void Read() public override void Read()
{ {
@@ -124,9 +124,9 @@ namespace Game.Networking.Packets
public long Date; public long Date;
} }
class SCalendarEventInvite : ServerPacket class CalendarInviteAdded : ServerPacket
{ {
public SCalendarEventInvite() : base(ServerOpcodes.CalendarEventInvite) { } public CalendarInviteAdded() : base(ServerOpcodes.CalendarInviteAdded) { }
public override void Write() public override void Write()
{ {
@@ -221,9 +221,9 @@ namespace Game.Networking.Packets
public List<CalendarEventInviteInfo> Invites = new List<CalendarEventInviteInfo>(); public List<CalendarEventInviteInfo> Invites = new List<CalendarEventInviteInfo>();
} }
class CalendarEventInviteAlert : ServerPacket class CalendarInviteAlert : ServerPacket
{ {
public CalendarEventInviteAlert() : base(ServerOpcodes.CalendarEventInviteAlert) { } public CalendarInviteAlert() : base(ServerOpcodes.CalendarInviteAlert) { }
public override void Write() public override void Write()
{ {
@@ -301,9 +301,9 @@ namespace Game.Networking.Packets
public CalendarInviteStatus Status; public CalendarInviteStatus Status;
} }
class CalendarEventInviteStatus : ServerPacket class CalendarInviteStatusPacket : ServerPacket
{ {
public CalendarEventInviteStatus() : base(ServerOpcodes.CalendarEventInviteStatus) { } public CalendarInviteStatusPacket() : base(ServerOpcodes.CalendarInviteStatus) { }
public override void Write() public override void Write()
{ {
@@ -327,9 +327,9 @@ namespace Game.Networking.Packets
public ObjectGuid InviteGuid; public ObjectGuid InviteGuid;
} }
class CalendarEventInviteRemoved : ServerPacket class CalendarInviteRemoved : ServerPacket
{ {
public CalendarEventInviteRemoved() : base(ServerOpcodes.CalendarEventInviteRemoved) { } public CalendarInviteRemoved() : base(ServerOpcodes.CalendarInviteRemoved) { }
public override void Write() public override void Write()
{ {
@@ -347,9 +347,9 @@ namespace Game.Networking.Packets
public bool ClearPending; public bool ClearPending;
} }
class CalendarEventInviteModeratorStatus : ServerPacket class CalendarInviteModeratorStatus : ServerPacket
{ {
public CalendarEventInviteModeratorStatus() : base(ServerOpcodes.CalendarEventInviteModeratorStatus) { } public CalendarInviteModeratorStatus() : base(ServerOpcodes.CalendarInviteModeratorStatus) { }
public override void Write() public override void Write()
{ {
@@ -367,9 +367,9 @@ namespace Game.Networking.Packets
public bool ClearPending; public bool ClearPending;
} }
class CalendarEventInviteRemovedAlert : ServerPacket class CalendarInviteRemovedAlert : ServerPacket
{ {
public CalendarEventInviteRemovedAlert() : base(ServerOpcodes.CalendarEventInviteRemovedAlert) { } public CalendarInviteRemovedAlert() : base(ServerOpcodes.CalendarInviteRemovedAlert) { }
public override void Write() public override void Write()
{ {
@@ -639,9 +639,9 @@ namespace Game.Networking.Packets
public int NewTimeRemaining; public int NewTimeRemaining;
} }
class CalendarEventInitialInvites : ServerPacket class CalendarCommunityInvite : ServerPacket
{ {
public CalendarEventInitialInvites() : base(ServerOpcodes.CalendarEventInitialInvites) { } public CalendarCommunityInvite() : base(ServerOpcodes.CalendarCommunityInvite) { }
public override void Write() public override void Write()
{ {
@@ -656,9 +656,9 @@ namespace Game.Networking.Packets
public List<CalendarEventInitialInviteInfo> Invites = new List<CalendarEventInitialInviteInfo>(); public List<CalendarEventInitialInviteInfo> Invites = new List<CalendarEventInitialInviteInfo>();
} }
class CalendarEventInviteStatusAlert : ServerPacket class CalendarInviteStatusAlert : ServerPacket
{ {
public CalendarEventInviteStatusAlert() : base(ServerOpcodes.CalendarEventInviteStatusAlert) { } public CalendarInviteStatusAlert() : base(ServerOpcodes.CalendarInviteStatusAlert) { }
public override void Write() public override void Write()
{ {
@@ -674,9 +674,9 @@ namespace Game.Networking.Packets
public byte Status; public byte Status;
} }
class CalendarEventInviteNotesAlert : ServerPacket class CalendarInviteNotesAlert : ServerPacket
{ {
public CalendarEventInviteNotesAlert(ulong eventID, string notes) : base(ServerOpcodes.CalendarEventInviteNotesAlert) public CalendarInviteNotesAlert(ulong eventID, string notes) : base(ServerOpcodes.CalendarInviteNotesAlert)
{ {
EventID = eventID; EventID = eventID;
Notes = notes; Notes = notes;
@@ -695,9 +695,9 @@ namespace Game.Networking.Packets
public string Notes; public string Notes;
} }
class CalendarEventInviteNotes : ServerPacket class CalendarInviteNotes : ServerPacket
{ {
public CalendarEventInviteNotes() : base(ServerOpcodes.CalendarEventInviteNotes) { } public CalendarInviteNotes() : base(ServerOpcodes.CalendarInviteNotes) { }
public override void Write() public override void Write()
{ {
@@ -969,9 +969,9 @@ namespace Game.Networking.Packets
public uint FactionIndex; public uint FactionIndex;
} }
class CharCustomizeResponse : ServerPacket class CharCustomizeSuccess : ServerPacket
{ {
public CharCustomizeResponse(CharCustomizeInfo customizeInfo) : base(ServerOpcodes.CharCustomize) public CharCustomizeSuccess(CharCustomizeInfo customizeInfo) : base(ServerOpcodes.CharCustomizeSuccess)
{ {
CharGUID = customizeInfo.CharGUID; CharGUID = customizeInfo.CharGUID;
SexID = (byte)customizeInfo.SexID; SexID = (byte)customizeInfo.SexID;
@@ -1010,9 +1010,9 @@ namespace Game.Networking.Packets
public Array<byte> CustomDisplay = new Array<byte>(PlayerConst.CustomDisplaySize); public Array<byte> CustomDisplay = new Array<byte>(PlayerConst.CustomDisplaySize);
} }
class CharCustomizeFailed : ServerPacket class CharCustomizeFailure : ServerPacket
{ {
public CharCustomizeFailed() : base(ServerOpcodes.CharCustomizeFailed) { } public CharCustomizeFailure() : base(ServerOpcodes.CharCustomizeFailure) { }
public override void Write() public override void Write()
{ {
@@ -136,9 +136,9 @@ namespace Game.Networking.Packets
public bool PlayAsDespawn; public bool PlayAsDespawn;
} }
class GameObjectUIAction : ServerPacket class GameObjectUILink : ServerPacket
{ {
public GameObjectUIAction() : base(ServerOpcodes.GameObjectUiAction, ConnectionType.Instance) { } public GameObjectUILink() : base(ServerOpcodes.GameObjectUILink, ConnectionType.Instance) { }
public override void Write() public override void Write()
{ {
@@ -122,9 +122,9 @@ namespace Game.Networking.Packets
public List<HotfixRecord> Hotfixes = new List<HotfixRecord>(); public List<HotfixRecord> Hotfixes = new List<HotfixRecord>();
} }
class HotfixResponse : ServerPacket class HotfixConnect : ServerPacket
{ {
public HotfixResponse() : base(ServerOpcodes.HotfixResponse) { } public HotfixConnect() : base(ServerOpcodes.HotfixConnect) { }
public override void Write() public override void Write()
{ {
@@ -257,9 +257,9 @@ namespace Game.Networking.Packets
public uint CombatResChargeRecovery; public uint CombatResChargeRecovery;
} }
class BossKillCredit : ServerPacket class BossKill : ServerPacket
{ {
public BossKillCredit() : base(ServerOpcodes.BossKillCredit, ConnectionType.Instance) { } public BossKill() : base(ServerOpcodes.BossKill, ConnectionType.Instance) { }
public override void Write() public override void Write()
{ {
@@ -618,9 +618,9 @@ namespace Game.Networking.Packets
public ObjectGuid[] GemItem = new ObjectGuid[ItemConst.MaxGemSockets]; public ObjectGuid[] GemItem = new ObjectGuid[ItemConst.MaxGemSockets];
} }
class SocketGemsResult : ServerPacket class SocketGemsSuccess : ServerPacket
{ {
public SocketGemsResult() : base(ServerOpcodes.SocketGems, ConnectionType.Instance) { } public SocketGemsSuccess() : base(ServerOpcodes.SocketGemsSuccess, ConnectionType.Instance) { }
public override void Write() public override void Write()
{ {
@@ -651,9 +651,9 @@ namespace Game.Networking.Packets
public override void Read() { } public override void Read() { }
} }
class SortBagsResult : ServerPacket class BagCleanupFinished : ServerPacket
{ {
public SortBagsResult() : base(ServerOpcodes.SortBagsResult, ConnectionType.Instance) { } public BagCleanupFinished() : base(ServerOpcodes.BagCleanupFinished, ConnectionType.Instance) { }
public override void Write() { } public override void Write() { }
} }
@@ -670,9 +670,9 @@ namespace Game.Networking.Packets
public ObjectGuid ItemGuid { get; set; } public ObjectGuid ItemGuid { get; set; }
} }
class CharacterInventoryOverflowWarning : ServerPacket class InventoryFullOverflow : ServerPacket
{ {
public CharacterInventoryOverflowWarning() : base(ServerOpcodes.CharacterInventoryOverflowWarning) { } public InventoryFullOverflow() : base(ServerOpcodes.InventoryFullOverflow) { }
public override void Write() { } public override void Write() { }
} }
@@ -294,16 +294,16 @@ namespace Game.Networking.Packets
public uint MovieID; public uint MovieID;
} }
public class UITimeRequest : ClientPacket public class ServerTimeOffsetRequest : ClientPacket
{ {
public UITimeRequest(WorldPacket packet) : base(packet) { } public ServerTimeOffsetRequest(WorldPacket packet) : base(packet) { }
public override void Read() { } public override void Read() { }
} }
public class UITime : ServerPacket public class ServerTimeOffset : ServerPacket
{ {
public UITime() : base(ServerOpcodes.UiTime) { } public ServerTimeOffset() : base(ServerOpcodes.ServerTimeOffset) { }
public override void Write() public override void Write()
{ {
@@ -222,9 +222,9 @@ namespace Game.Networking.Packets
public ObjectGuid TargetGUID; public ObjectGuid TargetGUID;
} }
class PartyMemberState : ServerPacket class PartyMemberFullState : ServerPacket
{ {
public PartyMemberState() : base(ServerOpcodes.PartyMemberState) { } public PartyMemberFullState() : base(ServerOpcodes.PartyMemberFullState) { }
public override void Write() public override void Write()
{ {
@@ -811,9 +811,9 @@ namespace Game.Networking.Packets
public override void Read() { } public override void Read() { }
} }
class WorldQuestUpdate : ServerPacket class WorldQuestUpdateResponse : ServerPacket
{ {
public WorldQuestUpdate() : base(ServerOpcodes.WorldQuestUpdate, ConnectionType.Instance) { } public WorldQuestUpdateResponse() : base(ServerOpcodes.WorldQuestUpdateResponse, ConnectionType.Instance) { }
public override void Write() public override void Write()
{ {
@@ -21,9 +21,9 @@ using System;
namespace Game.Networking.Packets namespace Game.Networking.Packets
{ {
public class ReferAFriendFailure : ServerPacket public class RecruitAFriendFailure : ServerPacket
{ {
public ReferAFriendFailure() : base(ServerOpcodes.ReferAFriendFailure) { } public RecruitAFriendFailure() : base(ServerOpcodes.RecruitAFriendFailure) { }
public override void Write() public override void Write()
{ {
@@ -94,9 +94,9 @@ namespace Game.Networking.Packets
public uint ScenarioID; public uint ScenarioID;
} }
class ScenarioBoot : ServerPacket class ScenarioVacate : ServerPacket
{ {
public ScenarioBoot() : base(ServerOpcodes.ScenarioBoot, ConnectionType.Instance) { } public ScenarioVacate() : base(ServerOpcodes.ScenarioVacate, ConnectionType.Instance) { }
public override void Write() public override void Write()
{ {
@@ -106,9 +106,9 @@ namespace Game.Networking.Packets
public SpecResetType RespecType; public SpecResetType RespecType;
} }
class LearnTalentsFailed : ServerPacket class LearnTalentFailed : ServerPacket
{ {
public LearnTalentsFailed() : base(ServerOpcodes.LearnTalentsFailed) { } public LearnTalentFailed() : base(ServerOpcodes.LearnTalentFailed) { }
public override void Write() public override void Write()
{ {
@@ -157,9 +157,9 @@ namespace Game.Networking.Packets
public Array<PvPTalent> Talents = new Array<PvPTalent>(4); public Array<PvPTalent> Talents = new Array<PvPTalent>(4);
} }
class LearnPvpTalentsFailed : ServerPacket class LearnPvpTalentFailed : ServerPacket
{ {
public LearnPvpTalentsFailed() : base(ServerOpcodes.LearnPvpTalentsFailed) { } public LearnPvpTalentFailed() : base(ServerOpcodes.LearnPvpTalentFailed) { }
public override void Write() public override void Write()
{ {
@@ -20,9 +20,9 @@ using System.Collections.Generic;
namespace Game.Networking.Packets namespace Game.Networking.Packets
{ {
class UpdateListedAuctionableTokens : ClientPacket class CommerceTokenGetLog : ClientPacket
{ {
public UpdateListedAuctionableTokens(WorldPacket packet) : base(packet) { } public CommerceTokenGetLog(WorldPacket packet) : base(packet) { }
public override void Read() public override void Read()
{ {
@@ -32,9 +32,9 @@ namespace Game.Networking.Packets
public uint UnkInt; public uint UnkInt;
} }
class UpdateListedAuctionableTokensResponse : ServerPacket class CommerceTokenGetLogResponse : ServerPacket
{ {
public UpdateListedAuctionableTokensResponse() : base(ServerOpcodes.WowTokenUpdateAuctionableListResponse, ConnectionType.Instance) { } public CommerceTokenGetLogResponse() : base(ServerOpcodes.CommerceTokenGetLogResponse, ConnectionType.Instance) { }
public override void Write() public override void Write()
{ {
@@ -66,9 +66,9 @@ namespace Game.Networking.Packets
} }
} }
class RequestWowTokenMarketPrice : ClientPacket class CommerceTokenGetMarketPrice : ClientPacket
{ {
public RequestWowTokenMarketPrice(WorldPacket packet) : base(packet) { } public CommerceTokenGetMarketPrice(WorldPacket packet) : base(packet) { }
public override void Read() public override void Read()
{ {
@@ -78,9 +78,9 @@ namespace Game.Networking.Packets
public uint UnkInt; public uint UnkInt;
} }
class WowTokenMarketPriceResponse : ServerPacket class CommerceTokenGetMarketPriceResponse : ServerPacket
{ {
public WowTokenMarketPriceResponse() : base(ServerOpcodes.WowTokenMarketPriceResponse) { } public CommerceTokenGetMarketPriceResponse() : base(ServerOpcodes.CommerceTokenGetMarketPriceResponse) { }
public override void Write() public override void Write()
{ {
+2 -2
View File
@@ -46,9 +46,9 @@ namespace Game.Networking.Packets
public SpellCastRequest Cast = new SpellCastRequest(); public SpellCastRequest Cast = new SpellCastRequest();
} }
class AccountToysUpdate : ServerPacket class AccountToyUpdate : ServerPacket
{ {
public AccountToysUpdate() : base(ServerOpcodes.AccountToysUpdate, ConnectionType.Instance) { } public AccountToyUpdate() : base(ServerOpcodes.AccountToyUpdate, ConnectionType.Instance) { }
public override void Write() public override void Write()
{ {
@@ -45,9 +45,9 @@ namespace Game.Networking.Packets
public bool CurrentSpecOnly; public bool CurrentSpecOnly;
} }
class TransmogCollectionUpdate : ServerPacket class AccountTransmogUpdate : ServerPacket
{ {
public TransmogCollectionUpdate() : base(ServerOpcodes.TransmogCollectionUpdate) { } public AccountTransmogUpdate() : base(ServerOpcodes.AccountTransmogUpdate) { }
public override void Write() public override void Write()
{ {
@@ -69,9 +69,9 @@ namespace Game.Networking.Packets
public List<uint> NewAppearances = new List<uint>(); public List<uint> NewAppearances = new List<uint>();
} }
class OpenTransmogrifier : ServerPacket class TransmogrifyNPC : ServerPacket
{ {
public OpenTransmogrifier(ObjectGuid guid) : base(ServerOpcodes.OpenTransmogrifier, ConnectionType.Instance) public TransmogrifyNPC(ObjectGuid guid) : base(ServerOpcodes.TransmogrifyNpc, ConnectionType.Instance)
{ {
Guid = guid; Guid = guid;
} }
@@ -54,9 +54,9 @@ namespace Game.Networking.Packets
public ByteBuffer Data; public ByteBuffer Data;
} }
class WardenDataServer : ServerPacket class Warden3DataServer : ServerPacket
{ {
public WardenDataServer() : base(ServerOpcodes.WardenData) { } public Warden3DataServer() : base(ServerOpcodes.Warden3Data) { }
public override void Write() public override void Write()
{ {
+5 -5
View File
@@ -320,8 +320,8 @@ namespace Game.Networking
connectToFailed.Read(); connectToFailed.Read();
HandleConnectToFailed(connectToFailed); HandleConnectToFailed(connectToFailed);
break; break;
case ClientOpcodes.EnableEncryptionAck: case ClientOpcodes.EnterEncryptedModeAck:
HandleEnableEncryptionAck(); HandleEnterEncryptedModeAck();
break; break;
default: default:
if (_worldSession == null) if (_worldSession == null)
@@ -643,7 +643,7 @@ namespace Game.Networking
// RBAC must be loaded before adding session to check for skip queue permission // RBAC must be loaded before adding session to check for skip queue permission
_worldSession.GetRBACData().LoadFromDBCallback(result); _worldSession.GetRBACData().LoadFromDBCallback(result);
SendPacket(new EnableEncryption(_encryptKey, true)); SendPacket(new EnterEncryptedMode(_encryptKey, true));
} }
void HandleAuthContinuedSession(AuthContinuedSession authSession) void HandleAuthContinuedSession(AuthContinuedSession authSession)
@@ -703,7 +703,7 @@ namespace Game.Networking
// only first 16 bytes of the hmac are used // only first 16 bytes of the hmac are used
Buffer.BlockCopy(encryptKeyGen.Digest, 0, _encryptKey, 0, 16); Buffer.BlockCopy(encryptKeyGen.Digest, 0, _encryptKey, 0, 16);
SendPacket(new EnableEncryption(_encryptKey, true)); SendPacket(new EnterEncryptedMode(_encryptKey, true));
AsyncRead(); AsyncRead();
} }
@@ -746,7 +746,7 @@ namespace Game.Networking
} }
void HandleEnableEncryptionAck() void HandleEnterEncryptedModeAck()
{ {
_worldCrypt.Initialize(_encryptKey); _worldCrypt.Initialize(_encryptKey);
if (_connectType == ConnectionType.Realm) if (_connectType == ConnectionType.Realm)
+1 -1
View File
@@ -331,7 +331,7 @@ namespace Game.Scenarios
void SendBootPlayer(Player player) void SendBootPlayer(Player player)
{ {
ScenarioBoot scenarioBoot = new ScenarioBoot(); ScenarioVacate scenarioBoot = new ScenarioVacate();
scenarioBoot.ScenarioID = (int)_data.Entry.Id; scenarioBoot.ScenarioID = (int)_data.Entry.Id;
player.SendPacket(scenarioBoot); player.SendPacket(scenarioBoot);
} }
+1 -1
View File
@@ -756,7 +756,7 @@ namespace Game
} while (result.NextRow()); } while (result.NextRow());
} }
SetSessionState bnetConnected = new SetSessionState(); ConnectionStatus bnetConnected = new ConnectionStatus();
bnetConnected.State = 1; bnetConnected.State = 1;
SendPacket(bnetConnected); SendPacket(bnetConnected);
+2 -2
View File
@@ -60,7 +60,7 @@ namespace Game
sizeLeft -= burstSize; sizeLeft -= burstSize;
pos += (int)burstSize; pos += (int)burstSize;
WardenDataServer packet = new WardenDataServer(); Warden3DataServer packet = new Warden3DataServer();
packet.Data = EncryptData(transfer.Write()); packet.Data = EncryptData(transfer.Write());
_session.SendPacket(packet); _session.SendPacket(packet);
} }
@@ -78,7 +78,7 @@ namespace Game
request.ModuleKey = _module.Key; request.ModuleKey = _module.Key;
request.Size = _module.CompressedSize; request.Size = _module.CompressedSize;
WardenDataServer packet = new WardenDataServer(); Warden3DataServer packet = new Warden3DataServer();
packet.Data = EncryptData(request.Write()); packet.Data = EncryptData(request.Write());
_session.SendPacket(packet); _session.SendPacket(packet);
} }
+3 -3
View File
@@ -109,7 +109,7 @@ namespace Game
Request.Function3_set = 1; Request.Function3_set = 1;
Request.CheckSumm3 = BuildChecksum(BitConverter.GetBytes(Request.Unk5), 8); Request.CheckSumm3 = BuildChecksum(BitConverter.GetBytes(Request.Unk5), 8);
WardenDataServer packet = new WardenDataServer(); Warden3DataServer packet = new Warden3DataServer();
packet.Data = EncryptData(Request.Write()); packet.Data = EncryptData(Request.Write());
_session.SendPacket(packet); _session.SendPacket(packet);
} }
@@ -123,7 +123,7 @@ namespace Game
Request.Command = WardenOpcodes.Smsg_HashRequest; Request.Command = WardenOpcodes.Smsg_HashRequest;
Request.Seed = _seed; Request.Seed = _seed;
WardenDataServer packet = new WardenDataServer(); Warden3DataServer packet = new Warden3DataServer();
packet.Data = EncryptData(Request.Write()); packet.Data = EncryptData(Request.Write());
_session.SendPacket(packet); _session.SendPacket(packet);
} }
@@ -282,7 +282,7 @@ namespace Game
} }
buffer.WriteUInt8(xorByte); buffer.WriteUInt8(xorByte);
WardenDataServer packet = new WardenDataServer(); Warden3DataServer packet = new Warden3DataServer();
packet.Data = EncryptData(buffer.GetData()); packet.Data = EncryptData(buffer.GetData());
_session.SendPacket(packet); _session.SendPacket(packet);