Core/Refactor: Part 2
This commit is contained in:
@@ -230,7 +230,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt32(Earned.Count());
|
||||
_worldPacket.WriteUInt32(Earned.Count);
|
||||
|
||||
foreach (EarnedAchievement earned in Earned)
|
||||
earned.Write(_worldPacket);
|
||||
|
||||
@@ -148,8 +148,9 @@ namespace Game.Network.Packets
|
||||
data.WriteInt32(PrimaryTalentTree);
|
||||
data.WriteInt32(PrimaryTalentTreeNameIndex);
|
||||
data.WriteInt32(PlayerRace);
|
||||
if (!Stats.Empty())
|
||||
Stats.ForEach(id => data.WriteUInt32(id));
|
||||
|
||||
foreach (var id in Stats)
|
||||
data.WriteUInt32(id);
|
||||
|
||||
data.WriteBit(Faction);
|
||||
data.WriteBit(IsInWorld);
|
||||
@@ -366,8 +367,9 @@ namespace Game.Network.Packets
|
||||
_worldPacket.WriteUInt8(MinLevel);
|
||||
_worldPacket.WriteUInt8(MaxLevel);
|
||||
_worldPacket.WriteUInt32(Battlefields.Count);
|
||||
if (!Battlefields.Empty())
|
||||
Battlefields.ForEach(field => _worldPacket.WriteInt32(field));
|
||||
|
||||
foreach (var field in Battlefields)
|
||||
_worldPacket.WriteInt32(field);
|
||||
|
||||
_worldPacket.WriteBit(PvpAnywhere);
|
||||
_worldPacket.WriteBit(HasRandomWinToday);
|
||||
@@ -464,8 +466,9 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket .WriteUInt32(FlagCarriers.Count);
|
||||
FlagCarriers.ForEach(pos => pos.Write(_worldPacket));
|
||||
_worldPacket.WriteUInt32(FlagCarriers.Count);
|
||||
foreach (var pos in FlagCarriers)
|
||||
pos.Write(_worldPacket);
|
||||
}
|
||||
|
||||
public List<BattlegroundPlayerPosition> FlagCarriers = new List<BattlegroundPlayerPosition>();
|
||||
|
||||
@@ -515,8 +515,8 @@ namespace Game.Network.Packets
|
||||
foreach (GarrisonTalent talent in Talents)
|
||||
talent.Write(data);
|
||||
|
||||
if (!ArchivedMissions.Empty())
|
||||
ArchivedMissions.ForEach(id => data.WriteInt32(id));
|
||||
foreach(var id in ArchivedMissions)
|
||||
data.WriteInt32(id);
|
||||
|
||||
foreach (GarrisonBuildingInfo building in Buildings)
|
||||
building.Write(data);
|
||||
|
||||
@@ -680,8 +680,8 @@ namespace Game.Network.Packets
|
||||
|
||||
public uint Level = 0;
|
||||
public uint HealthDelta = 0;
|
||||
public uint[] PowerDelta = new uint[6];
|
||||
public uint[] StatDelta = new uint[(int)Stats.Max];
|
||||
public int[] PowerDelta = new int[6];
|
||||
public int[] StatDelta = new int[(int)Stats.Max];
|
||||
public int Cp = 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -283,8 +283,8 @@ namespace Game.Network.Packets
|
||||
|
||||
statsData.WriteFloat(Stats.Size);
|
||||
statsData.WriteUInt8(Stats.QuestItems.Count);
|
||||
foreach (int questItem in Stats.QuestItems)
|
||||
statsData.WriteInt32(questItem);
|
||||
foreach (uint questItem in Stats.QuestItems)
|
||||
statsData.WriteUInt32(questItem);
|
||||
|
||||
statsData.WriteUInt32(Stats.RequiredLevel);
|
||||
|
||||
@@ -731,7 +731,7 @@ namespace Game.Network.Packets
|
||||
public uint DisplayID;
|
||||
public int[] Data = new int[33];
|
||||
public float Size;
|
||||
public List<int> QuestItems = new List<int>();
|
||||
public List<uint> QuestItems = new List<uint>();
|
||||
public uint RequiredLevel;
|
||||
}
|
||||
|
||||
|
||||
@@ -422,8 +422,8 @@ namespace Game.Network.Packets
|
||||
_worldPacket.WriteUInt32(Objectives.Count);
|
||||
_worldPacket.WriteInt32(QuestStartItemID);
|
||||
|
||||
foreach (int spell in LearnSpells)
|
||||
_worldPacket.WriteInt32(spell);
|
||||
foreach (uint spell in LearnSpells)
|
||||
_worldPacket.WriteUInt32(spell);
|
||||
|
||||
foreach (QuestDescEmote emote in DescEmotes)
|
||||
{
|
||||
|
||||
@@ -330,8 +330,8 @@ namespace Game.Network.Packets
|
||||
_worldPacket.WriteUInt32(SpellID.Count);
|
||||
_worldPacket.WriteUInt32(FavoriteSpellID.Count);
|
||||
|
||||
foreach (int spell in SpellID)
|
||||
_worldPacket.WriteInt32(spell);
|
||||
foreach (uint spell in SpellID)
|
||||
_worldPacket.WriteUInt32(spell);
|
||||
|
||||
foreach (int spell in FavoriteSpellID)
|
||||
_worldPacket.WriteInt32(spell);
|
||||
|
||||
Reference in New Issue
Block a user