Small BattlegroundScore refactoring
This commit is contained in:
+23
-5
@@ -95,6 +95,23 @@ namespace Game.Arenas
|
|||||||
CheckWinConditions();
|
CheckWinConditions();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override void BuildPvPLogDataPacket(out PVPLogData pvpLogData)
|
||||||
|
{
|
||||||
|
base.BuildPvPLogDataPacket(out pvpLogData);
|
||||||
|
|
||||||
|
if (isRated())
|
||||||
|
{
|
||||||
|
pvpLogData.Ratings.HasValue = true;
|
||||||
|
|
||||||
|
for (byte i = 0; i < SharedConst.BGTeamsCount; ++i)
|
||||||
|
{
|
||||||
|
pvpLogData.Ratings.Value.Postmatch[i] = _arenaTeamScores[i].PostMatchRating;
|
||||||
|
pvpLogData.Ratings.Value.Prematch[i] = _arenaTeamScores[i].PreMatchRating;
|
||||||
|
pvpLogData.Ratings.Value.PrematchMMR[i] = _arenaTeamScores[i].PreMatchMMR;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public override void RemovePlayerAtLeave(ObjectGuid guid, bool Transport, bool SendPacket)
|
public override void RemovePlayerAtLeave(ObjectGuid guid, bool Transport, bool SendPacket)
|
||||||
{
|
{
|
||||||
if (isRated() && GetStatus() == BattlegroundStatus.InProgress)
|
if (isRated() && GetStatus() == BattlegroundStatus.InProgress)
|
||||||
@@ -177,8 +194,8 @@ namespace Game.Arenas
|
|||||||
byte winnerTeam = (byte)(winner == Team.Alliance ? BattlegroundTeamId.Alliance : BattlegroundTeamId.Horde);
|
byte winnerTeam = (byte)(winner == Team.Alliance ? BattlegroundTeamId.Alliance : BattlegroundTeamId.Horde);
|
||||||
byte loserTeam = (byte)(winner == Team.Alliance ? BattlegroundTeamId.Horde : BattlegroundTeamId.Alliance);
|
byte loserTeam = (byte)(winner == Team.Alliance ? BattlegroundTeamId.Horde : BattlegroundTeamId.Alliance);
|
||||||
|
|
||||||
_arenaTeamScores[winnerTeam].Assign((int)winnerTeamRating, (int)(winnerTeamRating + winnerChange), winnerMatchmakerRating);
|
_arenaTeamScores[winnerTeam].Assign(winnerTeamRating, (uint)(winnerTeamRating + winnerChange), winnerMatchmakerRating, GetArenaMatchmakerRating(winner));
|
||||||
_arenaTeamScores[loserTeam].Assign((int)loserTeamRating, (int)(loserTeamRating + loserChange), loserMatchmakerRating);
|
_arenaTeamScores[loserTeam].Assign(loserTeamRating, (uint)(loserTeamRating + loserChange), loserMatchmakerRating, GetArenaMatchmakerRating(GetOtherTeam(winner)));
|
||||||
|
|
||||||
Log.outDebug(LogFilter.Arena, "Arena match Type: {0} for Team1Id: {1} - Team2Id: {2} ended. WinnerTeamId: {3}. Winner rating: +{4}, Loser rating: {5}",
|
Log.outDebug(LogFilter.Arena, "Arena match Type: {0} for Team1Id: {1} - Team2Id: {2} ended. WinnerTeamId: {3}. Winner rating: +{4}, Loser rating: {5}",
|
||||||
GetArenaType(), GetArenaTeamIdByIndex(TeamId.Alliance), GetArenaTeamIdByIndex(TeamId.Horde), winnerArenaTeam.GetId(), winnerChange, loserChange);
|
GetArenaType(), GetArenaTeamIdByIndex(TeamId.Alliance), GetArenaTeamIdByIndex(TeamId.Horde), winnerArenaTeam.GetId(), winnerChange, loserChange);
|
||||||
@@ -200,9 +217,8 @@ namespace Game.Arenas
|
|||||||
// Deduct 16 points from each teams arena-rating if there are no winners after 45+2 minutes
|
// Deduct 16 points from each teams arena-rating if there are no winners after 45+2 minutes
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_arenaTeamScores[(int)BattlegroundTeamId.Alliance].Assign((int)winnerTeamRating, (int)(winnerTeamRating + SharedConst.ArenaTimeLimitPointsLoss), winnerMatchmakerRating);
|
_arenaTeamScores[(int)BattlegroundTeamId.Alliance].Assign(winnerTeamRating, (uint)(winnerTeamRating + SharedConst.ArenaTimeLimitPointsLoss), winnerMatchmakerRating, GetArenaMatchmakerRating(Team.Alliance));
|
||||||
_arenaTeamScores[(int)BattlegroundTeamId.Horde].Assign((int)loserTeamRating, (int)(loserTeamRating + SharedConst.ArenaTimeLimitPointsLoss), loserMatchmakerRating);
|
_arenaTeamScores[(int)BattlegroundTeamId.Horde].Assign(loserTeamRating, (uint)(loserTeamRating + SharedConst.ArenaTimeLimitPointsLoss), loserMatchmakerRating, GetArenaMatchmakerRating(Team.Horde));
|
||||||
|
|
||||||
|
|
||||||
winnerArenaTeam.FinishGame(SharedConst.ArenaTimeLimitPointsLoss);
|
winnerArenaTeam.FinishGame(SharedConst.ArenaTimeLimitPointsLoss);
|
||||||
loserArenaTeam.FinishGame(SharedConst.ArenaTimeLimitPointsLoss);
|
loserArenaTeam.FinishGame(SharedConst.ArenaTimeLimitPointsLoss);
|
||||||
@@ -283,6 +299,8 @@ namespace Game.Arenas
|
|||||||
// end Battleground
|
// end Battleground
|
||||||
base.EndBattleground(winner);
|
base.EndBattleground(winner);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ArenaTeamScore[] _arenaTeamScores = new ArenaTeamScore[SharedConst.BGTeamsCount];
|
||||||
}
|
}
|
||||||
|
|
||||||
struct ArenaWorldStates
|
struct ArenaWorldStates
|
||||||
|
|||||||
+31
-16
@@ -19,6 +19,7 @@ using Framework.Constants;
|
|||||||
using Game.BattleGrounds;
|
using Game.BattleGrounds;
|
||||||
using Game.Entities;
|
using Game.Entities;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using Game.Network.Packets;
|
||||||
|
|
||||||
namespace Game.Arenas
|
namespace Game.Arenas
|
||||||
{
|
{
|
||||||
@@ -29,33 +30,47 @@ namespace Game.Arenas
|
|||||||
TeamId = (int)(team == Team.Alliance ? BattlegroundTeamId.Alliance : BattlegroundTeamId.Horde);
|
TeamId = (int)(team == Team.Alliance ? BattlegroundTeamId.Alliance : BattlegroundTeamId.Horde);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void BuildObjectivesBlock(List<int> stats) { }
|
void BuildPvPLogPlayerDataPacket(PVPLogData.PlayerData playerData)
|
||||||
|
{
|
||||||
|
if (PreMatchRating != 0)
|
||||||
|
playerData.PreMatchRating.Set(PreMatchRating);
|
||||||
|
|
||||||
|
if (PostMatchRating != PreMatchRating)
|
||||||
|
playerData.RatingChange.Set((int)(PostMatchRating - PreMatchRating));
|
||||||
|
|
||||||
|
if (PreMatchMMR != 0)
|
||||||
|
playerData.PreMatchMMR.Set(PreMatchMMR);
|
||||||
|
|
||||||
|
if (PostMatchMMR != PreMatchMMR)
|
||||||
|
playerData.MmrChange.Set((int)(PostMatchMMR - PreMatchMMR));
|
||||||
|
}
|
||||||
|
|
||||||
// For Logging purpose
|
// For Logging purpose
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
{
|
{
|
||||||
return string.Format("Damage done: {0}, Healing done: {1}, Killing blows: {2}", DamageDone, HealingDone, KillingBlows);
|
return $"Damage done: {DamageDone} Healing done: {HealingDone} Killing blows: {KillingBlows} PreMatchRating: {PreMatchRating} " +
|
||||||
|
$"PreMatchMMR: {PreMatchMMR} PostMatchRating: {PostMatchRating} PostMatchMMR: {PostMatchMMR}";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint PreMatchRating;
|
||||||
|
uint PreMatchMMR;
|
||||||
|
uint PostMatchRating;
|
||||||
|
uint PostMatchMMR;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class ArenaTeamScore
|
public class ArenaTeamScore
|
||||||
{
|
{
|
||||||
void Reset()
|
public void Assign(uint preMatchRating, uint postMatchRating, uint preMatchMMR, uint postMatchMMR)
|
||||||
{
|
{
|
||||||
OldRating = 0;
|
PreMatchRating = preMatchRating;
|
||||||
NewRating = 0;
|
PostMatchRating = postMatchRating;
|
||||||
MatchmakerRating = 0;
|
PreMatchMMR = preMatchMMR;
|
||||||
|
PostMatchMMR = postMatchMMR;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Assign(int oldRating, int newRating, uint matchMakerRating)
|
public uint PreMatchRating;
|
||||||
{
|
public uint PostMatchRating;
|
||||||
OldRating = oldRating;
|
public uint PreMatchMMR;
|
||||||
NewRating = newRating;
|
public uint PostMatchMMR;
|
||||||
MatchmakerRating = matchMakerRating;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int OldRating;
|
|
||||||
public int NewRating;
|
|
||||||
public uint MatchmakerRating;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -515,7 +515,13 @@ namespace Game.BattleGrounds
|
|||||||
return player;
|
return player;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetTeamStartLoc(int teamIndex, Position pos)
|
public BattlegroundMap GetBgMap()
|
||||||
|
{
|
||||||
|
Contract.Assert(m_Map);
|
||||||
|
return m_Map;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetTeamStartPosition(int teamIndex, Position pos)
|
||||||
{
|
{
|
||||||
Contract.Assert(teamIndex < TeamId.Neutral);
|
Contract.Assert(teamIndex < TeamId.Neutral);
|
||||||
StartPosition[teamIndex] = pos;
|
StartPosition[teamIndex] = pos;
|
||||||
@@ -1196,7 +1202,7 @@ namespace Game.BattleGrounds
|
|||||||
return GetPlayersSize() < GetMaxPlayers();
|
return GetPlayersSize() < GetMaxPlayers();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void BuildPvPLogDataPacket(out PVPLogData pvpLogData)
|
public virtual void BuildPvPLogDataPacket(out PVPLogData pvpLogData)
|
||||||
{
|
{
|
||||||
pvpLogData = new PVPLogData();
|
pvpLogData = new PVPLogData();
|
||||||
|
|
||||||
@@ -1205,57 +1211,25 @@ namespace Game.BattleGrounds
|
|||||||
|
|
||||||
foreach (var score in PlayerScores)
|
foreach (var score in PlayerScores)
|
||||||
{
|
{
|
||||||
PVPLogData.PlayerData playerData = new PVPLogData.PlayerData();
|
PVPLogData.PlayerData playerData;
|
||||||
|
|
||||||
playerData.PlayerGUID = score.Value.PlayerGuid;
|
score.Value.BuildPvPLogPlayerDataPacket(out playerData);
|
||||||
playerData.Kills = score.Value.KillingBlows;
|
|
||||||
playerData.Faction = (byte)score.Value.TeamId;
|
|
||||||
if (score.Value.HonorableKills != 0 || score.Value.Deaths != 0 || score.Value.BonusHonor != 0)
|
|
||||||
{
|
|
||||||
playerData.Honor.HasValue = true;
|
|
||||||
PVPLogData.HonorData honorData = playerData.Honor.Value;
|
|
||||||
honorData.HonorKills = score.Value.HonorableKills;
|
|
||||||
honorData.Deaths = score.Value.Deaths;
|
|
||||||
honorData.ContributionPoints = score.Value.BonusHonor;
|
|
||||||
}
|
|
||||||
|
|
||||||
playerData.DamageDone = score.Value.DamageDone;
|
|
||||||
playerData.HealingDone = score.Value.HealingDone;
|
|
||||||
score.Value.BuildObjectivesBlock(playerData.Stats);
|
|
||||||
|
|
||||||
Player player = Global.ObjAccessor.GetPlayer(GetBgMap(), playerData.PlayerGUID);
|
Player player = Global.ObjAccessor.GetPlayer(GetBgMap(), playerData.PlayerGUID);
|
||||||
if (player)
|
if (player)
|
||||||
{
|
{
|
||||||
playerData.IsInWorld = true;
|
playerData.IsInWorld = true;
|
||||||
playerData.PrimaryTalentTree = (int)player.GetUInt32Value(PlayerFields.CurrentSpecId);
|
playerData.PrimaryTalentTree = (int)player.GetUInt32Value(PlayerFields.CurrentSpecId);
|
||||||
|
playerData.PrimaryTalentTreeNameIndex = 0;
|
||||||
playerData.PlayerRace = player.GetRace();
|
playerData.PlayerRace = player.GetRace();
|
||||||
|
playerData.Prestige = player.GetPrestigeLevel();
|
||||||
}
|
}
|
||||||
|
|
||||||
//if (isRated())
|
|
||||||
//{
|
|
||||||
// playerData.PreMatchRating;
|
|
||||||
// playerData.RatingChange;
|
|
||||||
// playerData.PreMatchMMR;
|
|
||||||
// playerData.MmrChange;
|
|
||||||
//}
|
|
||||||
|
|
||||||
pvpLogData.Players.Add(playerData);
|
pvpLogData.Players.Add(playerData);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isRated())
|
pvpLogData.PlayerCount[(int)BattlegroundTeamId.Horde] = (sbyte)GetPlayersCountByTeam(Team.Horde);
|
||||||
{
|
pvpLogData.PlayerCount[(int)BattlegroundTeamId.Alliance] = (sbyte)GetPlayersCountByTeam(Team.Alliance);
|
||||||
pvpLogData.Ratings.HasValue = true;
|
|
||||||
PVPLogData.RatingData ratingData = pvpLogData.Ratings.Value;
|
|
||||||
for (byte i = 0; i < SharedConst.BGTeamsCount; ++i)
|
|
||||||
{
|
|
||||||
ratingData.Postmatch[i] = _arenaTeamScores[i].NewRating;
|
|
||||||
ratingData.Prematch[i] = _arenaTeamScores[i].OldRating;
|
|
||||||
ratingData.PrematchMMR[i] = (int)_arenaTeamScores[i].MatchmakerRating;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pvpLogData.PlayerCount[0] = (sbyte)GetPlayersCountByTeam(Team.Horde);
|
|
||||||
pvpLogData.PlayerCount[1] = (sbyte)GetPlayersCountByTeam(Team.Alliance);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual bool UpdatePlayerScore(Player player, ScoreType type, uint value, bool doAddHonor = true)
|
public virtual bool UpdatePlayerScore(Player player, ScoreType type, uint value, bool doAddHonor = true)
|
||||||
@@ -1907,7 +1881,6 @@ namespace Game.BattleGrounds
|
|||||||
public uint GetMapId() { return m_MapId; }
|
public uint GetMapId() { return m_MapId; }
|
||||||
|
|
||||||
public void SetBgMap(BattlegroundMap map) { m_Map = map; }
|
public void SetBgMap(BattlegroundMap map) { m_Map = map; }
|
||||||
public BattlegroundMap GetBgMap() { return m_Map; }
|
|
||||||
BattlegroundMap FindBgMap() { return m_Map; }
|
BattlegroundMap FindBgMap() { return m_Map; }
|
||||||
|
|
||||||
public Position GetTeamStartPosition(int teamIndex)
|
public Position GetTeamStartPosition(int teamIndex)
|
||||||
@@ -2007,8 +1980,6 @@ namespace Game.BattleGrounds
|
|||||||
public BGHonorMode m_HonorMode;
|
public BGHonorMode m_HonorMode;
|
||||||
public uint[] m_TeamScores = new uint[SharedConst.BGTeamsCount];
|
public uint[] m_TeamScores = new uint[SharedConst.BGTeamsCount];
|
||||||
|
|
||||||
public ArenaTeamScore[] _arenaTeamScores = new ArenaTeamScore[SharedConst.BGTeamsCount];
|
|
||||||
|
|
||||||
protected Dictionary<int, ObjectGuid> BgObjects = new Dictionary<int, ObjectGuid>();
|
protected Dictionary<int, ObjectGuid> BgObjects = new Dictionary<int, ObjectGuid>();
|
||||||
protected Dictionary<int, ObjectGuid> BgCreatures = new Dictionary<int, ObjectGuid>();
|
protected Dictionary<int, ObjectGuid> BgCreatures = new Dictionary<int, ObjectGuid>();
|
||||||
|
|
||||||
|
|||||||
@@ -374,8 +374,8 @@ namespace Game.BattleGrounds
|
|||||||
bg.SetMaxPlayersPerTeam(bgTemplate.MaxPlayersPerTeam);
|
bg.SetMaxPlayersPerTeam(bgTemplate.MaxPlayersPerTeam);
|
||||||
bg.SetMinPlayers(bgTemplate.MinPlayersPerTeam * 2);
|
bg.SetMinPlayers(bgTemplate.MinPlayersPerTeam * 2);
|
||||||
bg.SetMaxPlayers(bgTemplate.MaxPlayersPerTeam * 2);
|
bg.SetMaxPlayers(bgTemplate.MaxPlayersPerTeam * 2);
|
||||||
bg.SetTeamStartLoc(TeamId.Alliance, bgTemplate.StartLocation[TeamId.Alliance]);
|
bg.SetTeamStartPosition(TeamId.Alliance, bgTemplate.StartLocation[TeamId.Alliance]);
|
||||||
bg.SetTeamStartLoc(TeamId.Horde, bgTemplate.StartLocation[TeamId.Horde]);
|
bg.SetTeamStartPosition(TeamId.Horde, bgTemplate.StartLocation[TeamId.Horde]);
|
||||||
bg.SetStartMaxDist(bgTemplate.StartMaxDist);
|
bg.SetStartMaxDist(bgTemplate.StartMaxDist);
|
||||||
bg.SetLevelRange(bgTemplate.MinLevel, bgTemplate.MaxLevel);
|
bg.SetLevelRange(bgTemplate.MinLevel, bgTemplate.MaxLevel);
|
||||||
bg.SetScriptId(bgTemplate.scriptId);
|
bg.SetScriptId(bgTemplate.scriptId);
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ using Framework.Constants;
|
|||||||
using Game.Entities;
|
using Game.Entities;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics.Contracts;
|
using System.Diagnostics.Contracts;
|
||||||
|
using Game.Network.Packets;
|
||||||
|
|
||||||
namespace Game.BattleGrounds
|
namespace Game.BattleGrounds
|
||||||
{
|
{
|
||||||
@@ -27,7 +28,7 @@ namespace Game.BattleGrounds
|
|||||||
public BattlegroundScore(ObjectGuid playerGuid, Team team)
|
public BattlegroundScore(ObjectGuid playerGuid, Team team)
|
||||||
{
|
{
|
||||||
PlayerGuid = playerGuid;
|
PlayerGuid = playerGuid;
|
||||||
TeamId = team == Team.Alliance ? 1 : 0;
|
TeamId = (int)(team == Team.Alliance ? BattlegroundTeamId.Alliance : BattlegroundTeamId.Horde);
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void UpdateScore(ScoreType type, uint value)
|
public virtual void UpdateScore(ScoreType type, uint value)
|
||||||
@@ -58,7 +59,23 @@ namespace Game.BattleGrounds
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void BuildObjectivesBlock(List<int> stats) { }
|
public virtual void BuildPvPLogPlayerDataPacket(out PVPLogData.PlayerData playerData)
|
||||||
|
{
|
||||||
|
playerData = new PVPLogData.PlayerData();
|
||||||
|
playerData.PlayerGUID = PlayerGuid;
|
||||||
|
playerData.Kills = KillingBlows;
|
||||||
|
playerData.Faction = (byte)TeamId;
|
||||||
|
if (HonorableKills != 0 || Deaths != 0 || BonusHonor != 0)
|
||||||
|
{
|
||||||
|
playerData.Honor.HasValue = true;
|
||||||
|
playerData.Honor.Value.HonorKills = HonorableKills;
|
||||||
|
playerData.Honor.Value.Deaths = Deaths;
|
||||||
|
playerData.Honor.Value.ContributionPoints = BonusHonor;
|
||||||
|
}
|
||||||
|
|
||||||
|
playerData.DamageDone = DamageDone;
|
||||||
|
playerData.HealingDone = HealingDone;
|
||||||
|
}
|
||||||
|
|
||||||
public virtual uint GetAttr1() { return 0; }
|
public virtual uint GetAttr1() { return 0; }
|
||||||
public virtual uint GetAttr2() { return 0; }
|
public virtual uint GetAttr2() { return 0; }
|
||||||
|
|||||||
@@ -863,10 +863,12 @@ namespace Game.BattleGrounds
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void BuildObjectivesBlock(List<int> stats)
|
public override void BuildPvPLogPlayerDataPacket(out PVPLogData.PlayerData playerData)
|
||||||
{
|
{
|
||||||
stats.Add((int)BasesAssaulted);
|
base.BuildPvPLogPlayerDataPacket(out playerData);
|
||||||
stats.Add((int)BasesDefended);
|
|
||||||
|
playerData.Stats.Add(BasesAssaulted);
|
||||||
|
playerData.Stats.Add(BasesDefended);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override uint GetAttr1() { return BasesAssaulted; }
|
public override uint GetAttr1() { return BasesAssaulted; }
|
||||||
|
|||||||
@@ -1021,9 +1021,12 @@ namespace Game.BattleGrounds
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public override void BuildObjectivesBlock(List<int> stats)
|
|
||||||
|
public override void BuildPvPLogPlayerDataPacket(out PVPLogData.PlayerData playerData)
|
||||||
{
|
{
|
||||||
stats.Add((int)FlagCaptures);
|
base.BuildPvPLogPlayerDataPacket(out playerData);
|
||||||
|
|
||||||
|
playerData.Stats.Add(FlagCaptures);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override uint GetAttr1() { return FlagCaptures; }
|
public override uint GetAttr1() { return FlagCaptures; }
|
||||||
|
|||||||
@@ -982,10 +982,12 @@ namespace Game.BattleGrounds
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void BuildObjectivesBlock(List<int> stats)
|
public override void BuildPvPLogPlayerDataPacket(out PVPLogData.PlayerData playerData)
|
||||||
{
|
{
|
||||||
stats.Add((int)FlagCaptures);
|
base.BuildPvPLogPlayerDataPacket(out playerData);
|
||||||
stats.Add((int)FlagReturns);
|
|
||||||
|
playerData.Stats.Add(FlagCaptures);
|
||||||
|
playerData.Stats.Add(FlagReturns);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override uint GetAttr1() { return FlagCaptures; }
|
public override uint GetAttr1() { return FlagCaptures; }
|
||||||
|
|||||||
@@ -108,18 +108,18 @@ namespace Game.Network.Packets
|
|||||||
public void Write(WorldPacket data)
|
public void Write(WorldPacket data)
|
||||||
{
|
{
|
||||||
foreach (var id in Prematch)
|
foreach (var id in Prematch)
|
||||||
data.WriteInt32(id);
|
data.WriteUInt32(id);
|
||||||
|
|
||||||
foreach (var id in Postmatch)
|
foreach (var id in Postmatch)
|
||||||
data.WriteInt32(id);
|
data.WriteUInt32(id);
|
||||||
|
|
||||||
foreach (var id in PrematchMMR)
|
foreach (var id in PrematchMMR)
|
||||||
data.WriteInt32(id);
|
data.WriteUInt32(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int[] Prematch = new int[2];
|
public uint[] Prematch = new uint[2];
|
||||||
public int[] Postmatch = new int[2];
|
public uint[] Postmatch = new uint[2];
|
||||||
public int[] PrematchMMR = new int[2];
|
public uint[] PrematchMMR = new uint[2];
|
||||||
}
|
}
|
||||||
|
|
||||||
public struct HonorData
|
public struct HonorData
|
||||||
@@ -149,7 +149,7 @@ namespace Game.Network.Packets
|
|||||||
data.WriteInt32(PrimaryTalentTreeNameIndex);
|
data.WriteInt32(PrimaryTalentTreeNameIndex);
|
||||||
data.WriteInt32(PlayerRace);
|
data.WriteInt32(PlayerRace);
|
||||||
if (!Stats.Empty())
|
if (!Stats.Empty())
|
||||||
Stats.ForEach(id => data.WriteInt32(id));
|
Stats.ForEach(id => data.WriteUInt32(id));
|
||||||
|
|
||||||
data.WriteBit(Faction);
|
data.WriteBit(Faction);
|
||||||
data.WriteBit(IsInWorld);
|
data.WriteBit(IsInWorld);
|
||||||
@@ -187,7 +187,7 @@ namespace Game.Network.Packets
|
|||||||
public Optional<int> RatingChange;
|
public Optional<int> RatingChange;
|
||||||
public Optional<uint> PreMatchMMR;
|
public Optional<uint> PreMatchMMR;
|
||||||
public Optional<int> MmrChange;
|
public Optional<int> MmrChange;
|
||||||
public List<int> Stats = new List<int>();
|
public List<uint> Stats = new List<uint>();
|
||||||
public int PrimaryTalentTree;
|
public int PrimaryTalentTree;
|
||||||
public int PrimaryTalentTreeNameIndex; // controls which name field from ChrSpecialization.dbc will be sent to lua
|
public int PrimaryTalentTreeNameIndex; // controls which name field from ChrSpecialization.dbc will be sent to lua
|
||||||
public Race PlayerRace;
|
public Race PlayerRace;
|
||||||
|
|||||||
Reference in New Issue
Block a user