Updated to 8.2.0.31429 (scripts disabled atm, they still need updated)
Code Port from TrinityCore https://github.com/TrinityCore/TrinityCore Casc from WoW-Tools https://github.com/WoW-Tools/CASCExplorer
This commit is contained in:
@@ -108,9 +108,9 @@ namespace Game.Network
|
||||
this.opcode = (uint)opcode;
|
||||
}
|
||||
|
||||
public WorldPacket(byte[] data, uint opcode) : base(data)
|
||||
public WorldPacket(byte[] data) : base(data)
|
||||
{
|
||||
this.opcode = opcode;
|
||||
opcode = ReadUInt16();
|
||||
}
|
||||
|
||||
public ObjectGuid ReadPackedGuid()
|
||||
@@ -223,18 +223,23 @@ namespace Game.Network
|
||||
uint opcode;
|
||||
}
|
||||
|
||||
public class ServerPacketHeader
|
||||
public class PacketHeader
|
||||
{
|
||||
public ServerPacketHeader(uint size, ServerOpcodes opcode)
|
||||
public int Size;
|
||||
public byte[] Tag = new byte[12];
|
||||
|
||||
public void Read(byte[] buffer)
|
||||
{
|
||||
Size = size + 2;
|
||||
Opcode = opcode;
|
||||
Size = BitConverter.ToInt32(buffer, 0);
|
||||
Buffer.BlockCopy(buffer, 4, Tag, 0, 12);
|
||||
}
|
||||
|
||||
data = BitConverter.GetBytes(Size).Combine(BitConverter.GetBytes((ushort)opcode));
|
||||
}
|
||||
public void Write(ByteBuffer byteBuffer)
|
||||
{
|
||||
byteBuffer.WriteInt32(Size);
|
||||
byteBuffer.WriteBytes(Tag, 12);
|
||||
}
|
||||
|
||||
public ServerOpcodes Opcode { get; set; }
|
||||
public uint Size { get; set; }
|
||||
public byte[] data { get; set; }
|
||||
public bool IsValidSize() { return Size < 0x10000; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,6 +69,9 @@ public class PacketLog
|
||||
else
|
||||
Buffer.BlockCopy(address.GetAddressBytes(), 0, SocketIPBytes, 0, 16);
|
||||
|
||||
if (!isClientPacket)
|
||||
data.Combine(new byte[2]);
|
||||
|
||||
writer.Write(data.Length + 4);
|
||||
writer.Write(SocketIPBytes);
|
||||
writer.Write(port);
|
||||
|
||||
@@ -149,11 +149,11 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt32(Progress.Count);
|
||||
_worldPacket.WriteInt32(Progress.Count);
|
||||
|
||||
foreach (GuildCriteriaProgress progress in Progress)
|
||||
{
|
||||
_worldPacket.WriteInt32(progress.CriteriaID);
|
||||
_worldPacket.WriteUInt32(progress.CriteriaID);
|
||||
_worldPacket.WriteUInt32(progress.DateCreated);
|
||||
_worldPacket.WriteUInt32(progress.DateStarted);
|
||||
_worldPacket.WritePackedTime(progress.DateUpdated);
|
||||
@@ -230,7 +230,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt32(Earned.Count);
|
||||
_worldPacket.WriteInt32(Earned.Count);
|
||||
|
||||
foreach (EarnedAchievement earned in Earned)
|
||||
earned.Write(_worldPacket);
|
||||
@@ -263,7 +263,7 @@ namespace Game.Network.Packets
|
||||
{
|
||||
_worldPacket.WritePackedGuid(GuildGUID);
|
||||
_worldPacket.WriteUInt32(AchievementID);
|
||||
_worldPacket.WriteUInt32(Member.Count);
|
||||
_worldPacket.WriteInt32(Member.Count);
|
||||
foreach (ObjectGuid guid in Member)
|
||||
_worldPacket.WritePackedGuid(guid);
|
||||
}
|
||||
@@ -330,8 +330,8 @@ namespace Game.Network.Packets
|
||||
{
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteUInt32(Earned.Count);
|
||||
data.WriteUInt32(Progress.Count);
|
||||
data.WriteInt32(Earned.Count);
|
||||
data.WriteInt32(Progress.Count);
|
||||
|
||||
foreach (EarnedAchievement earned in Earned)
|
||||
earned.Write(data);
|
||||
|
||||
@@ -66,9 +66,9 @@ namespace Game.Network.Packets
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt32(AuctionItemID);
|
||||
_worldPacket.WriteInt32(Command);
|
||||
_worldPacket.WriteInt32(ErrorCode);
|
||||
_worldPacket.WriteInt32(BagResult);
|
||||
_worldPacket.WriteInt32((int)Command);
|
||||
_worldPacket.WriteInt32((int)ErrorCode);
|
||||
_worldPacket.WriteInt32((int)BagResult);
|
||||
_worldPacket.WritePackedGuid(Guid);
|
||||
_worldPacket.WriteUInt64(MinIncrement);
|
||||
_worldPacket.WriteUInt64(Money);
|
||||
@@ -206,8 +206,8 @@ namespace Game.Network.Packets
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteInt32(Items.Count);
|
||||
_worldPacket.WriteInt32(TotalCount);
|
||||
_worldPacket.WriteInt32(DesiredDelay);
|
||||
_worldPacket.WriteUInt32(TotalCount);
|
||||
_worldPacket.WriteUInt32(DesiredDelay);
|
||||
_worldPacket.WriteBit(OnlyUsable);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
@@ -358,7 +358,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt32(Mails.Count);
|
||||
_worldPacket.WriteInt32(Mails.Count);
|
||||
_worldPacket.WriteInt32(TotalNumRecords);
|
||||
|
||||
foreach (var mail in Mails)
|
||||
@@ -441,7 +441,7 @@ namespace Game.Network.Packets
|
||||
_worldPacket.WriteUInt32(ChangeNumberGlobal);
|
||||
_worldPacket.WriteUInt32(ChangeNumberCursor);
|
||||
_worldPacket.WriteUInt32(ChangeNumberTombstone);
|
||||
_worldPacket.WriteUInt32(Items.Count);
|
||||
_worldPacket.WriteInt32(Items.Count);
|
||||
|
||||
foreach (var item in Items)
|
||||
item.Write(_worldPacket);
|
||||
@@ -486,7 +486,7 @@ namespace Game.Network.Packets
|
||||
{
|
||||
data.WritePackedGuid(ItemGuid);
|
||||
data.WritePackedGuid(OwnerAccountID);
|
||||
data.WriteInt32(EndTime);
|
||||
data.WriteUInt32(EndTime);
|
||||
}
|
||||
|
||||
if (!CensorBidInfo)
|
||||
|
||||
@@ -23,6 +23,8 @@ using Game.DataStorage;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using System.Security.Cryptography;
|
||||
using System.Linq;
|
||||
|
||||
namespace Game.Network.Packets
|
||||
{
|
||||
@@ -113,7 +115,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt32(Result);
|
||||
_worldPacket.WriteUInt32((uint)Result);
|
||||
_worldPacket.WriteBit(SuccessInfo.HasValue);
|
||||
_worldPacket.WriteBit(WaitInfo.HasValue);
|
||||
_worldPacket.FlushBits();
|
||||
@@ -121,13 +123,13 @@ namespace Game.Network.Packets
|
||||
if (SuccessInfo.HasValue)
|
||||
{
|
||||
_worldPacket.WriteUInt32(SuccessInfo.Value.VirtualRealmAddress);
|
||||
_worldPacket.WriteUInt32(SuccessInfo.Value.VirtualRealms.Count);
|
||||
_worldPacket.WriteInt32(SuccessInfo.Value.VirtualRealms.Count);
|
||||
_worldPacket.WriteUInt32(SuccessInfo.Value.TimeRested);
|
||||
_worldPacket.WriteUInt8(SuccessInfo.Value.ActiveExpansionLevel);
|
||||
_worldPacket.WriteUInt8(SuccessInfo.Value.AccountExpansionLevel);
|
||||
_worldPacket.WriteUInt32(SuccessInfo.Value.TimeSecondsUntilPCKick);
|
||||
_worldPacket.WriteUInt32(SuccessInfo.Value.AvailableClasses.Count);
|
||||
_worldPacket.WriteUInt32(SuccessInfo.Value.Templates.Count);
|
||||
_worldPacket.WriteInt32(SuccessInfo.Value.AvailableClasses.Count);
|
||||
_worldPacket.WriteInt32(SuccessInfo.Value.Templates.Count);
|
||||
_worldPacket.WriteUInt32(SuccessInfo.Value.CurrencyID);
|
||||
_worldPacket.WriteUInt32(SuccessInfo.Value.Time);
|
||||
|
||||
@@ -170,11 +172,11 @@ namespace Game.Network.Packets
|
||||
foreach (var templat in SuccessInfo.Value.Templates)
|
||||
{
|
||||
_worldPacket.WriteUInt32(templat.TemplateSetId);
|
||||
_worldPacket.WriteUInt32(templat.Classes.Count);
|
||||
_worldPacket.WriteInt32(templat.Classes.Count);
|
||||
foreach (var templateClass in templat.Classes)
|
||||
{
|
||||
_worldPacket.WriteUInt8(templateClass.ClassID);
|
||||
_worldPacket.WriteUInt8(templateClass.FactionGroup);
|
||||
_worldPacket.WriteUInt8((byte)templateClass.FactionGroup);
|
||||
}
|
||||
|
||||
_worldPacket.WriteBits(templat.Name.GetByteCount(), 7);
|
||||
@@ -252,53 +254,41 @@ namespace Game.Network.Packets
|
||||
public ConnectTo() : base(ServerOpcodes.ConnectTo)
|
||||
{
|
||||
Payload = new ConnectPayload();
|
||||
Payload.PanamaKey = "F41DCB2D728CF3337A4FF338FA89DB01BBBE9C3B65E9DA96268687353E48B94C".ToByteArray();
|
||||
Payload.Adler32 = 0xA0A66C10;
|
||||
|
||||
Crypt = new RsaCrypt();
|
||||
Crypt.InitializeEncryption(RsaStore.P, RsaStore.Q, RsaStore.DP, RsaStore.DQ, RsaStore.InverseQ);
|
||||
}
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
byte[] port = BitConverter.GetBytes((ushort)Payload.Where.Port);
|
||||
byte[] address = new byte[16];
|
||||
byte addressType = 3;
|
||||
if (Payload.Where.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork)
|
||||
ByteBuffer whereBuffer = new ByteBuffer();
|
||||
whereBuffer.WriteUInt8((byte)Payload.Where.Type);
|
||||
|
||||
switch (Payload.Where.Type)
|
||||
{
|
||||
Buffer.BlockCopy(Payload.Where.Address.GetAddressBytes(), 0, address, 0, 4);
|
||||
addressType = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
Buffer.BlockCopy(Payload.Where.Address.GetAddressBytes(), 0, address, 0, 16);
|
||||
addressType = 2;
|
||||
case AddressType.IPv4:
|
||||
whereBuffer.WriteBytes(Payload.Where.IPv4);
|
||||
break;
|
||||
case AddressType.IPv6:
|
||||
whereBuffer.WriteBytes(Payload.Where.IPv6);
|
||||
break;
|
||||
case AddressType.NamedSocket:
|
||||
whereBuffer.WriteString(Payload.Where.NameSocket);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
HmacHash hmacHash = new HmacHash(RsaStore.WherePacketHmac);
|
||||
hmacHash.Process(address, 16);
|
||||
hmacHash.Process(BitConverter.GetBytes(addressType), 1);
|
||||
hmacHash.Process(port, 2);
|
||||
hmacHash.Process(Haiku);
|
||||
hmacHash.Process(Payload.PanamaKey, 32);
|
||||
hmacHash.Process(PiDigits, 108);
|
||||
hmacHash.Finish(BitConverter.GetBytes(Payload.XorMagic), 1);
|
||||
Sha256 hash = new Sha256();
|
||||
hash.Process(whereBuffer.GetData(), (int)whereBuffer.GetSize());
|
||||
hash.Process((uint)Payload.Where.Type);
|
||||
hash.Finish(BitConverter.GetBytes(Payload.Port));
|
||||
|
||||
ByteBuffer payload = new ByteBuffer();
|
||||
payload.WriteUInt32(Payload.Adler32);
|
||||
payload.WriteUInt8(addressType);
|
||||
payload.WriteBytes(address, 16);
|
||||
payload.WriteUInt16(Payload.Where.Port);
|
||||
payload.WriteString(Haiku);
|
||||
payload.WriteBytes(Payload.PanamaKey, 32);
|
||||
payload.WriteBytes(PiDigits, 108);
|
||||
payload.WriteUInt8(Payload.XorMagic);
|
||||
payload.WriteBytes(hmacHash.Digest);
|
||||
Payload.Signature = RsaCrypt.RSA.SignHash(hash.Digest, HashAlgorithmName.SHA256, RSASignaturePadding.Pkcs1).Reverse().ToArray();
|
||||
|
||||
_worldPacket.WriteUInt64(Key);
|
||||
_worldPacket.WriteUInt32(Serial);
|
||||
_worldPacket.WriteBytes(Crypt.Encrypt(payload.GetData()), 256);
|
||||
_worldPacket.WriteBytes(Payload.Signature, (uint)Payload.Signature.Length);
|
||||
_worldPacket.WriteBytes(whereBuffer);
|
||||
_worldPacket.WriteUInt16(Payload.Port);
|
||||
_worldPacket.WriteUInt32((uint)Serial);
|
||||
_worldPacket.WriteUInt8(Con);
|
||||
_worldPacket.WriteUInt64(Key);
|
||||
}
|
||||
|
||||
public ulong Key;
|
||||
@@ -306,24 +296,29 @@ namespace Game.Network.Packets
|
||||
public ConnectPayload Payload;
|
||||
public byte Con;
|
||||
|
||||
public string Haiku = "An island of peace\nCorruption is brought ashore\nPandarens will rise\n\0\0\0";
|
||||
public byte[] PiDigits = { 0x31, 0x41, 0x59, 0x26, 0x53, 0x58, 0x97, 0x93, 0x23, 0x84, 0x62, 0x64, 0x33, 0x83, 0x27, 0x95, 0x02, 0x88, 0x41, 0x97,
|
||||
0x16, 0x93, 0x99, 0x37, 0x51, 0x05, 0x82, 0x09, 0x74, 0x94, 0x45, 0x92, 0x30, 0x78, 0x16, 0x40, 0x62, 0x86, 0x20, 0x89,
|
||||
0x98, 0x62, 0x80, 0x34, 0x82, 0x53, 0x42, 0x11, 0x70, 0x67, 0x98, 0x21, 0x48, 0x08, 0x65, 0x13, 0x28, 0x23, 0x06, 0x64,
|
||||
0x70, 0x93, 0x84, 0x46, 0x09, 0x55, 0x05, 0x82, 0x23, 0x17, 0x25, 0x35, 0x94, 0x08, 0x12, 0x84, 0x81, 0x11, 0x74, 0x50,
|
||||
0x28, 0x41, 0x02, 0x70, 0x19, 0x38, 0x52, 0x11, 0x05, 0x55, 0x96, 0x44, 0x62, 0x29, 0x48, 0x95, 0x49, 0x30, 0x38, 0x19,
|
||||
0x64, 0x42, 0x88, 0x10, 0x97, 0x56, 0x65, 0x93, 0x34, 0x46, 0x12, 0x84, 0x75, 0x64, 0x82, 0x33, 0x78, 0x67, 0x83, 0x16,
|
||||
0x52, 0x71, 0x20, 0x19, 0x09, 0x14, 0x56, 0x48, 0x56, 0x69 };
|
||||
|
||||
public class ConnectPayload
|
||||
{
|
||||
public IPEndPoint Where;
|
||||
public uint Adler32;
|
||||
public byte XorMagic = 0x2A;
|
||||
public byte[] PanamaKey = new byte[32];
|
||||
public SocketAddress Where;
|
||||
public ushort Port;
|
||||
public byte[] Signature = new byte[256];
|
||||
}
|
||||
|
||||
RsaCrypt Crypt;
|
||||
public struct SocketAddress
|
||||
{
|
||||
public AddressType Type;
|
||||
|
||||
public byte[] IPv4;
|
||||
public byte[] IPv6;
|
||||
public string NameSocket;
|
||||
|
||||
}
|
||||
|
||||
public enum AddressType
|
||||
{
|
||||
IPv4 = 1,
|
||||
IPv6 = 2,
|
||||
NamedSocket = 3 // not supported by windows client
|
||||
}
|
||||
}
|
||||
|
||||
class AuthContinuedSession : ClientPacket
|
||||
@@ -367,9 +362,27 @@ namespace Game.Network.Packets
|
||||
|
||||
class EnableEncryption : ServerPacket
|
||||
{
|
||||
public EnableEncryption() : base(ServerOpcodes.EnableEncryption) { }
|
||||
byte[] EncryptionKey;
|
||||
bool Enabled;
|
||||
|
||||
public override void Write() { }
|
||||
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)
|
||||
{
|
||||
EncryptionKey = encryptionKey;
|
||||
Enabled = enabled;
|
||||
}
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
HmacSha256 hash = new HmacSha256(EncryptionKey);
|
||||
hash.Process(BitConverter.GetBytes(Enabled), 1);
|
||||
hash.Finish(EnableEncryptionSeed, 16);
|
||||
|
||||
_worldPacket.WriteBytes(RsaCrypt.RSA.SignHash(hash.Digest, HashAlgorithmName.SHA256, RSASignaturePadding.Pkcs1).Reverse().ToArray());
|
||||
_worldPacket.WriteBit(Enabled);
|
||||
_worldPacket.FlushBits();
|
||||
}
|
||||
}
|
||||
|
||||
//Structs
|
||||
|
||||
@@ -30,14 +30,16 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt32(CurrentSeason);
|
||||
_worldPacket.WriteUInt32(PreviousSeason);
|
||||
_worldPacket.WriteUInt32(PvpSeasonID);
|
||||
_worldPacket.WriteInt32(MythicPlusSeasonID);
|
||||
_worldPacket.WriteInt32(CurrentSeason);
|
||||
_worldPacket.WriteInt32(PreviousSeason);
|
||||
_worldPacket.WriteInt32(PvpSeasonID);
|
||||
}
|
||||
|
||||
public uint PreviousSeason;
|
||||
public uint CurrentSeason;
|
||||
public uint PvpSeasonID;
|
||||
public int MythicPlusSeasonID;
|
||||
public int PreviousSeason;
|
||||
public int CurrentSeason;
|
||||
public int PvpSeasonID;
|
||||
}
|
||||
|
||||
public class AreaSpiritHealerQuery : ClientPacket
|
||||
@@ -85,23 +87,18 @@ namespace Game.Network.Packets
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteBit(Ratings.HasValue);
|
||||
_worldPacket.WriteBit(Winner.HasValue);
|
||||
_worldPacket.WriteUInt32(Players.Count);
|
||||
_worldPacket.WriteInt32(Statistics.Count);
|
||||
foreach (var id in PlayerCount)
|
||||
_worldPacket.WriteInt8(id);
|
||||
|
||||
if (Ratings.HasValue)
|
||||
Ratings.Value.Write(_worldPacket);
|
||||
|
||||
if (Winner.HasValue)
|
||||
_worldPacket.WriteUInt8(Winner.Value);
|
||||
|
||||
foreach (PlayerData player in Players)
|
||||
foreach (PVPMatchPlayerStatistics player in Statistics)
|
||||
player.Write(_worldPacket);
|
||||
}
|
||||
|
||||
public Optional<byte> Winner;
|
||||
public List<PlayerData> Players = new List<PlayerData>();
|
||||
public List<PVPMatchPlayerStatistics> Statistics = new List<PVPMatchPlayerStatistics>();
|
||||
public Optional<RatingData> Ratings;
|
||||
public sbyte[] PlayerCount = new sbyte[2];
|
||||
|
||||
@@ -138,7 +135,7 @@ namespace Game.Network.Packets
|
||||
public uint ContributionPoints;
|
||||
}
|
||||
|
||||
public class PlayerData
|
||||
public class PVPMatchPlayerStatistics
|
||||
{
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
@@ -146,10 +143,10 @@ namespace Game.Network.Packets
|
||||
data.WriteUInt32(Kills);
|
||||
data.WriteUInt32(DamageDone);
|
||||
data.WriteUInt32(HealingDone);
|
||||
data.WriteUInt32(Stats.Count);
|
||||
data.WriteInt32(Stats.Count);
|
||||
data.WriteInt32(PrimaryTalentTree);
|
||||
data.WriteInt32(Sex);
|
||||
data.WriteInt32(PlayerRace);
|
||||
data.WriteUInt32((uint)PlayerRace);
|
||||
data.WriteInt32(PlayerClass);
|
||||
data.WriteInt32(CreatureID);
|
||||
data.WriteInt32(HonorLevel);
|
||||
@@ -287,7 +284,7 @@ namespace Game.Network.Packets
|
||||
{
|
||||
Ticket.Write(_worldPacket);
|
||||
_worldPacket.WriteUInt64(QueueID);
|
||||
_worldPacket.WriteUInt32(Reason);
|
||||
_worldPacket.WriteInt32(Reason);
|
||||
_worldPacket.WritePackedGuid(ClientID);
|
||||
}
|
||||
|
||||
@@ -374,7 +371,7 @@ namespace Game.Network.Packets
|
||||
_worldPacket.WriteInt32(BattlemasterListID);
|
||||
_worldPacket.WriteUInt8(MinLevel);
|
||||
_worldPacket.WriteUInt8(MaxLevel);
|
||||
_worldPacket.WriteUInt32(Battlefields.Count);
|
||||
_worldPacket.WriteInt32(Battlefields.Count);
|
||||
|
||||
foreach (var field in Battlefields)
|
||||
_worldPacket.WriteInt32(field);
|
||||
@@ -449,7 +446,7 @@ namespace Game.Network.Packets
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WritePackedGuid(Offender);
|
||||
_worldPacket.WriteUInt8(Result);
|
||||
_worldPacket.WriteUInt8((byte)Result);
|
||||
_worldPacket.WriteUInt8(NumBlackMarksOnOffender);
|
||||
_worldPacket.WriteUInt8(NumPlayersIHaveReported);
|
||||
}
|
||||
@@ -474,7 +471,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt32(FlagCarriers.Count);
|
||||
_worldPacket.WriteInt32(FlagCarriers.Count);
|
||||
foreach (var pos in FlagCarriers)
|
||||
pos.Write(_worldPacket);
|
||||
}
|
||||
|
||||
@@ -27,8 +27,8 @@ namespace Game.Network.Packets
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt64(QueueID);
|
||||
_worldPacket.WriteUInt32(AreaID);
|
||||
_worldPacket.WriteUInt32(ExpireTime);
|
||||
_worldPacket.WriteInt32(AreaID);
|
||||
_worldPacket.WriteUInt32((uint)ExpireTime);
|
||||
}
|
||||
|
||||
public ulong QueueID;
|
||||
@@ -57,7 +57,7 @@ namespace Game.Network.Packets
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt64(QueueID);
|
||||
_worldPacket.WriteInt8(BattleState);
|
||||
_worldPacket.WriteInt8((sbyte)BattleState);
|
||||
_worldPacket.WriteUInt32(Timeout);
|
||||
_worldPacket.WriteInt32(MinLevel);
|
||||
_worldPacket.WriteInt32(MaxLevel);
|
||||
@@ -101,7 +101,7 @@ namespace Game.Network.Packets
|
||||
_worldPacket.WriteInt32(AreaID);
|
||||
_worldPacket.WriteInt8(Result);
|
||||
_worldPacket.WritePackedGuid(FailedPlayerGUID);
|
||||
_worldPacket.WriteInt8(BattleState);
|
||||
_worldPacket.WriteInt8((sbyte)BattleState);
|
||||
_worldPacket.WriteBit(LoggingIn);
|
||||
_worldPacket.FlushBits();
|
||||
}
|
||||
@@ -151,8 +151,8 @@ namespace Game.Network.Packets
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt64(QueueID);
|
||||
_worldPacket.WriteInt8(Reason);
|
||||
_worldPacket.WriteInt8(BattleState);
|
||||
_worldPacket.WriteInt8((sbyte)Reason);
|
||||
_worldPacket.WriteInt8((sbyte)BattleState);
|
||||
_worldPacket.WriteBit(Relocated);
|
||||
_worldPacket.FlushBits();
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt32(BnetStatus);
|
||||
_worldPacket.WriteUInt32((uint)BnetStatus);
|
||||
Method.Write(_worldPacket);
|
||||
_worldPacket.WriteUInt32(Data.GetSize());
|
||||
_worldPacket.WriteBytes(Data);
|
||||
@@ -60,10 +60,12 @@ namespace Game.Network.Packets
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteBits(State, 2);
|
||||
_worldPacket.WriteBit(SuppressNotification);
|
||||
_worldPacket.FlushBits();
|
||||
}
|
||||
|
||||
public byte State;
|
||||
public bool SuppressNotification;
|
||||
}
|
||||
|
||||
class RealmListTicket : ServerPacket
|
||||
|
||||
@@ -69,7 +69,7 @@ namespace Game.Network.Packets
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteInt32(LastUpdateID);
|
||||
_worldPacket.WriteUInt32(Items.Count);
|
||||
_worldPacket.WriteInt32(Items.Count);
|
||||
|
||||
foreach (BlackMarketItem item in Items)
|
||||
item.Write(_worldPacket);
|
||||
@@ -104,7 +104,7 @@ namespace Game.Network.Packets
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt32(MarketID);
|
||||
_worldPacket.WriteUInt32(Result);
|
||||
_worldPacket.WriteUInt32((uint)Result);
|
||||
Item.Write(_worldPacket);
|
||||
}
|
||||
|
||||
@@ -163,14 +163,14 @@ namespace Game.Network.Packets
|
||||
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteInt32(MarketID);
|
||||
data.WriteInt32(SellerNPC);
|
||||
data.WriteInt32(Quantity);
|
||||
data.WriteUInt32(MarketID);
|
||||
data.WriteUInt32(SellerNPC);
|
||||
data.WriteUInt32(Quantity);
|
||||
data.WriteUInt64(MinBid);
|
||||
data.WriteUInt64(MinIncrement);
|
||||
data.WriteUInt64(CurrentBid);
|
||||
data.WriteInt32(SecondsRemaining);
|
||||
data.WriteInt32(NumBids);
|
||||
data.WriteUInt32(SecondsRemaining);
|
||||
data.WriteUInt32(NumBids);
|
||||
Item.Write(data);
|
||||
data.WriteBit(HighBid);
|
||||
data.FlushBits();
|
||||
|
||||
@@ -134,7 +134,7 @@ namespace Game.Network.Packets
|
||||
_worldPacket.WriteUInt64(EventID);
|
||||
_worldPacket.WriteUInt64(InviteID);
|
||||
_worldPacket.WriteUInt8(Level);
|
||||
_worldPacket.WriteUInt8(Status);
|
||||
_worldPacket.WriteUInt8((byte)Status);
|
||||
_worldPacket.WriteUInt8(Type);
|
||||
_worldPacket.WritePackedTime(ResponseTime);
|
||||
|
||||
@@ -159,9 +159,9 @@ namespace Game.Network.Packets
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WritePackedTime(ServerTime);
|
||||
_worldPacket.WriteUInt32(Invites.Count);
|
||||
_worldPacket.WriteUInt32(Events.Count);
|
||||
_worldPacket.WriteUInt32(RaidLockouts.Count);
|
||||
_worldPacket.WriteInt32(Invites.Count);
|
||||
_worldPacket.WriteInt32(Events.Count);
|
||||
_worldPacket.WriteInt32(RaidLockouts.Count);
|
||||
|
||||
foreach (var invite in Invites)
|
||||
invite.Write(_worldPacket);
|
||||
@@ -185,16 +185,16 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt8(EventType);
|
||||
_worldPacket.WriteUInt8((byte)EventType);
|
||||
_worldPacket.WritePackedGuid(OwnerGuid);
|
||||
_worldPacket.WriteUInt64(EventID);
|
||||
_worldPacket.WriteUInt8(GetEventType);
|
||||
_worldPacket.WriteUInt8((byte)GetEventType);
|
||||
_worldPacket.WriteInt32(TextureID);
|
||||
_worldPacket.WriteUInt32(Flags);
|
||||
_worldPacket.WriteUInt32((uint)Flags);
|
||||
_worldPacket.WritePackedTime(Date);
|
||||
_worldPacket.WriteUInt32(LockDate);
|
||||
_worldPacket.WriteUInt32((uint)LockDate);
|
||||
_worldPacket.WritePackedGuid(EventGuildID);
|
||||
_worldPacket.WriteUInt32(Invites.Count);
|
||||
_worldPacket.WriteInt32(Invites.Count);
|
||||
|
||||
_worldPacket.WriteBits(EventName.GetByteCount(), 8);
|
||||
_worldPacket.WriteBits(Description.GetByteCount(), 11);
|
||||
@@ -229,13 +229,13 @@ namespace Game.Network.Packets
|
||||
{
|
||||
_worldPacket.WriteUInt64(EventID);
|
||||
_worldPacket.WritePackedTime(Date);
|
||||
_worldPacket.WriteUInt32(Flags);
|
||||
_worldPacket.WriteUInt8(EventType);
|
||||
_worldPacket.WriteUInt32((uint)Flags);
|
||||
_worldPacket.WriteUInt8((byte)EventType);
|
||||
_worldPacket.WriteInt32(TextureID);
|
||||
_worldPacket.WritePackedGuid(EventGuildID);
|
||||
_worldPacket.WriteUInt64(InviteID);
|
||||
_worldPacket.WriteUInt8(Status);
|
||||
_worldPacket.WriteUInt8(ModeratorStatus);
|
||||
_worldPacket.WriteUInt8((byte)Status);
|
||||
_worldPacket.WriteUInt8((byte)ModeratorStatus);
|
||||
|
||||
// Todo: check order
|
||||
_worldPacket.WritePackedGuid(InvitedByGuid);
|
||||
@@ -310,8 +310,8 @@ namespace Game.Network.Packets
|
||||
_worldPacket.WritePackedGuid(InviteGuid);
|
||||
_worldPacket.WriteUInt64(EventID);
|
||||
_worldPacket.WritePackedTime(Date);
|
||||
_worldPacket.WriteUInt32(Flags);
|
||||
_worldPacket.WriteUInt8(Status);
|
||||
_worldPacket.WriteUInt32((uint)Flags);
|
||||
_worldPacket.WriteUInt8((byte)Status);
|
||||
_worldPacket.WritePackedTime(ResponseTime);
|
||||
|
||||
_worldPacket.WriteBit(ClearPending);
|
||||
@@ -355,7 +355,7 @@ namespace Game.Network.Packets
|
||||
{
|
||||
_worldPacket.WritePackedGuid(InviteGuid);
|
||||
_worldPacket.WriteUInt64(EventID);
|
||||
_worldPacket.WriteUInt8(Status);
|
||||
_worldPacket.WriteUInt8((byte)Status);
|
||||
|
||||
_worldPacket.WriteBit(ClearPending);
|
||||
_worldPacket.FlushBits();
|
||||
@@ -375,8 +375,8 @@ namespace Game.Network.Packets
|
||||
{
|
||||
_worldPacket.WriteUInt64(EventID);
|
||||
_worldPacket.WritePackedTime(Date);
|
||||
_worldPacket.WriteUInt32(Flags);
|
||||
_worldPacket.WriteUInt8(Status);
|
||||
_worldPacket.WriteUInt32((uint)Flags);
|
||||
_worldPacket.WriteUInt8((byte)Status);
|
||||
}
|
||||
|
||||
public ulong EventID;
|
||||
@@ -402,10 +402,10 @@ namespace Game.Network.Packets
|
||||
|
||||
_worldPacket.WritePackedTime(OriginalDate);
|
||||
_worldPacket.WritePackedTime(Date);
|
||||
_worldPacket.WriteUInt32(LockDate);
|
||||
_worldPacket.WriteUInt32(Flags);
|
||||
_worldPacket.WriteUInt32(TextureID);
|
||||
_worldPacket.WriteUInt8(EventType);
|
||||
_worldPacket.WriteUInt32((uint)LockDate);
|
||||
_worldPacket.WriteUInt32((uint)Flags);
|
||||
_worldPacket.WriteInt32(TextureID);
|
||||
_worldPacket.WriteUInt8((byte)EventType);
|
||||
|
||||
_worldPacket.WriteBits(EventName.GetByteCount(), 8);
|
||||
_worldPacket.WriteBits(Description.GetByteCount(), 11);
|
||||
@@ -571,7 +571,7 @@ namespace Game.Network.Packets
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt8(Command);
|
||||
_worldPacket.WriteUInt8(Result);
|
||||
_worldPacket.WriteUInt8((byte)Result);
|
||||
|
||||
_worldPacket.WriteBits(Name.GetByteCount(), 9);
|
||||
_worldPacket.FlushBits();
|
||||
@@ -592,7 +592,7 @@ namespace Game.Network.Packets
|
||||
_worldPacket.WriteUInt64(InstanceID);
|
||||
_worldPacket.WriteUInt32(ServerTime);
|
||||
_worldPacket.WriteInt32(MapID);
|
||||
_worldPacket.WriteUInt32(DifficultyID);
|
||||
_worldPacket.WriteUInt32((uint)DifficultyID);
|
||||
_worldPacket.WriteInt32(TimeRemaining);
|
||||
}
|
||||
|
||||
@@ -611,7 +611,7 @@ namespace Game.Network.Packets
|
||||
{
|
||||
_worldPacket.WriteUInt64(InstanceID);
|
||||
_worldPacket.WriteInt32(MapID);
|
||||
_worldPacket.WriteUInt32(DifficultyID);
|
||||
_worldPacket.WriteUInt32((uint)DifficultyID);
|
||||
}
|
||||
|
||||
public ulong InstanceID;
|
||||
@@ -625,7 +625,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt32(ServerTime);
|
||||
_worldPacket.WriteUInt32((uint)ServerTime);
|
||||
_worldPacket.WriteInt32(MapID);
|
||||
_worldPacket.WriteUInt32(DifficultyID);
|
||||
_worldPacket.WriteInt32(NewTimeRemaining);
|
||||
@@ -645,7 +645,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt32(Invites.Count);
|
||||
_worldPacket.WriteInt32(Invites.Count);
|
||||
foreach (var invite in Invites)
|
||||
{
|
||||
_worldPacket.WritePackedGuid(invite.InviteGuid);
|
||||
@@ -832,8 +832,8 @@ namespace Game.Network.Packets
|
||||
{
|
||||
data.WriteUInt64(EventID);
|
||||
data.WriteUInt64(InviteID);
|
||||
data.WriteUInt8(Status);
|
||||
data.WriteUInt8(Moderator);
|
||||
data.WriteUInt8((byte)Status);
|
||||
data.WriteUInt8((byte)Moderator);
|
||||
data.WriteUInt8(InviteType);
|
||||
data.WritePackedGuid(InviterGuid);
|
||||
}
|
||||
@@ -852,7 +852,7 @@ namespace Game.Network.Packets
|
||||
data.WriteUInt64(InstanceID);
|
||||
data.WriteInt32(MapID);
|
||||
data.WriteUInt32(DifficultyID);
|
||||
data.WriteUInt32(ExpireTime);
|
||||
data.WriteUInt32((uint)ExpireTime);
|
||||
}
|
||||
|
||||
public ulong InstanceID;
|
||||
@@ -866,9 +866,9 @@ namespace Game.Network.Packets
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteUInt64(EventID);
|
||||
data.WriteUInt8(EventType);
|
||||
data.WriteUInt8((byte)EventType);
|
||||
data.WritePackedTime(Date);
|
||||
data.WriteUInt32(Flags);
|
||||
data.WriteUInt32((uint)Flags);
|
||||
data.WriteInt32(TextureID);
|
||||
data.WriteUInt64(EventClubID);
|
||||
data.WritePackedGuid(OwnerGuid);
|
||||
@@ -896,8 +896,8 @@ namespace Game.Network.Packets
|
||||
data.WriteUInt64(InviteID);
|
||||
|
||||
data.WriteUInt8(Level);
|
||||
data.WriteUInt8(Status);
|
||||
data.WriteUInt8(Moderator);
|
||||
data.WriteUInt8((byte)Status);
|
||||
data.WriteUInt8((byte)Moderator);
|
||||
data.WriteUInt8(InviteType);
|
||||
|
||||
data.WritePackedTime(ResponseTime);
|
||||
|
||||
@@ -33,15 +33,15 @@ namespace Game.Network.Packets
|
||||
{
|
||||
_worldPacket.WriteBit(Display);
|
||||
_worldPacket.WriteBits(Channel.GetByteCount(), 7);
|
||||
_worldPacket.WriteUInt32(ChannelFlags);
|
||||
_worldPacket.WriteUInt32(Members.Count);
|
||||
_worldPacket.WriteUInt32((uint)ChannelFlags);
|
||||
_worldPacket.WriteInt32(Members.Count);
|
||||
_worldPacket.WriteString(Channel);
|
||||
|
||||
foreach (ChannelPlayer player in Members)
|
||||
{
|
||||
_worldPacket.WritePackedGuid(player.Guid);
|
||||
_worldPacket.WriteUInt32(player.VirtualRealmAddress);
|
||||
_worldPacket.WriteUInt8(player.Flags);
|
||||
_worldPacket.WriteUInt8((byte)player.Flags);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,8 +84,8 @@ namespace Game.Network.Packets
|
||||
|
||||
if (Type == ChatNotify.ModeChangeNotice)
|
||||
{
|
||||
_worldPacket.WriteUInt8(OldFlags);
|
||||
_worldPacket.WriteUInt8(NewFlags);
|
||||
_worldPacket.WriteUInt8((byte)OldFlags);
|
||||
_worldPacket.WriteUInt8((byte)NewFlags);
|
||||
}
|
||||
|
||||
_worldPacket.WriteString(Channel);
|
||||
@@ -112,10 +112,10 @@ namespace Game.Network.Packets
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteBits(Channel.GetByteCount(), 7);
|
||||
_worldPacket.WriteBits(ChannelWelcomeMsg.GetByteCount(), 10);
|
||||
_worldPacket.WriteUInt32(ChannelFlags);
|
||||
_worldPacket.WriteBits(ChannelWelcomeMsg.GetByteCount(), 11);
|
||||
_worldPacket.WriteUInt32((uint)ChannelFlags);
|
||||
_worldPacket.WriteInt32(ChatChannelID);
|
||||
_worldPacket.WriteUInt64(InstanceID);
|
||||
_worldPacket.WriteUInt64((ulong)InstanceID);
|
||||
_worldPacket.WriteString(Channel);
|
||||
_worldPacket.WriteString(ChannelWelcomeMsg);
|
||||
}
|
||||
@@ -151,8 +151,8 @@ namespace Game.Network.Packets
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WritePackedGuid(AddedUserGUID);
|
||||
_worldPacket.WriteUInt8(UserFlags);
|
||||
_worldPacket.WriteUInt32(ChannelFlags);
|
||||
_worldPacket.WriteUInt8((byte)UserFlags);
|
||||
_worldPacket.WriteUInt32((uint)ChannelFlags);
|
||||
_worldPacket.WriteUInt32(ChannelID);
|
||||
|
||||
_worldPacket.WriteBits(ChannelName.GetByteCount(), 7);
|
||||
@@ -174,7 +174,7 @@ namespace Game.Network.Packets
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WritePackedGuid(RemovedUserGUID);
|
||||
_worldPacket.WriteUInt32(ChannelFlags);
|
||||
_worldPacket.WriteUInt32((uint)ChannelFlags);
|
||||
_worldPacket.WriteUInt32(ChannelID);
|
||||
|
||||
_worldPacket.WriteBits(ChannelName.GetByteCount(), 7);
|
||||
@@ -195,8 +195,8 @@ namespace Game.Network.Packets
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WritePackedGuid(UpdatedUserGUID);
|
||||
_worldPacket.WriteUInt8(UserFlags);
|
||||
_worldPacket.WriteUInt32(ChannelFlags);
|
||||
_worldPacket.WriteUInt8((byte)UserFlags);
|
||||
_worldPacket.WriteUInt32((uint)ChannelFlags);
|
||||
_worldPacket.WriteUInt32(ChannelID);
|
||||
|
||||
_worldPacket.WriteBits(ChannelName.GetByteCount(), 7);
|
||||
|
||||
@@ -46,10 +46,10 @@ namespace Game.Network.Packets
|
||||
_worldPacket.WriteBit(IsDemonHunterCreationAllowed);
|
||||
_worldPacket.WriteBit(DisabledClassesMask.HasValue);
|
||||
_worldPacket.WriteBit(IsAlliedRacesCreationAllowed);
|
||||
_worldPacket.WriteUInt32(Characters.Count);
|
||||
_worldPacket.WriteInt32(Characters.Count);
|
||||
_worldPacket.WriteInt32(MaxCharacterLevel);
|
||||
_worldPacket.WriteUInt32(RaceUnlockData.Count);
|
||||
_worldPacket.WriteUInt32(UnlockedConditionalAppearances.Count);
|
||||
_worldPacket.WriteInt32(RaceUnlockData.Count);
|
||||
_worldPacket.WriteInt32(UnlockedConditionalAppearances.Count);
|
||||
|
||||
if (DisabledClassesMask.HasValue)
|
||||
_worldPacket.WriteUInt32(DisabledClassesMask.Value);
|
||||
@@ -190,7 +190,7 @@ namespace Game.Network.Packets
|
||||
data.WriteUInt64(GuildClubMemberID);
|
||||
data.WriteUInt8(ListPosition);
|
||||
data.WriteUInt8(RaceId);
|
||||
data.WriteUInt8(ClassId);
|
||||
data.WriteUInt8((byte)ClassId);
|
||||
data.WriteUInt8(Sex);
|
||||
data.WriteUInt8(Skin);
|
||||
data.WriteUInt8(Face);
|
||||
@@ -206,8 +206,8 @@ namespace Game.Network.Packets
|
||||
data.WriteUInt32(MapId);
|
||||
data.WriteVector3(PreLoadPosition);
|
||||
data.WritePackedGuid(GuildGuid);
|
||||
data.WriteUInt32(Flags);
|
||||
data.WriteUInt32(CustomizationFlag);
|
||||
data.WriteUInt32((uint)Flags);
|
||||
data.WriteUInt32((uint)CustomizationFlag);
|
||||
data.WriteUInt32(Flags3);
|
||||
data.WriteUInt32(Pet.CreatureDisplayId);
|
||||
data.WriteUInt32(Pet.Level);
|
||||
@@ -356,7 +356,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt8(Code);
|
||||
_worldPacket.WriteUInt8((byte)Code);
|
||||
_worldPacket.WritePackedGuid(Guid);
|
||||
}
|
||||
|
||||
@@ -382,7 +382,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt8(Code);
|
||||
_worldPacket.WriteUInt8((byte)Code);
|
||||
}
|
||||
|
||||
public ResponseCodes Code;
|
||||
@@ -411,7 +411,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt8(Result);
|
||||
_worldPacket.WriteUInt8((byte)Result);
|
||||
_worldPacket.WriteBit(Guid.HasValue);
|
||||
_worldPacket.WriteBits(Name.GetByteCount(), 6);
|
||||
_worldPacket.FlushBits();
|
||||
@@ -493,7 +493,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt8(Result);
|
||||
_worldPacket.WriteUInt8((byte)Result);
|
||||
_worldPacket.WritePackedGuid(Guid);
|
||||
_worldPacket.WriteBit(Display.HasValue);
|
||||
_worldPacket.FlushBits();
|
||||
@@ -593,7 +593,7 @@ namespace Game.Network.Packets
|
||||
public override void Read()
|
||||
{
|
||||
UndeleteInfo = new CharacterUndeleteInfo();
|
||||
_worldPacket.WriteUInt32(UndeleteInfo.ClientToken);
|
||||
_worldPacket.WriteInt32(UndeleteInfo.ClientToken);
|
||||
_worldPacket.WritePackedGuid(UndeleteInfo.CharacterGuid);
|
||||
}
|
||||
|
||||
@@ -608,7 +608,7 @@ namespace Game.Network.Packets
|
||||
{
|
||||
Cypher.Assert(UndeleteInfo != null);
|
||||
_worldPacket.WriteInt32(UndeleteInfo.ClientToken);
|
||||
_worldPacket.WriteUInt32(Result);
|
||||
_worldPacket.WriteUInt32((uint)Result);
|
||||
_worldPacket.WritePackedGuid(UndeleteInfo.CharacterGuid);
|
||||
}
|
||||
|
||||
@@ -681,7 +681,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt8(Code);
|
||||
_worldPacket.WriteUInt8((byte)Code);
|
||||
}
|
||||
|
||||
LoginFailureReason Code;
|
||||
@@ -849,7 +849,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteInt32(Result);
|
||||
_worldPacket.WriteInt32((int)Result);
|
||||
}
|
||||
|
||||
public ResultEnum Result;
|
||||
@@ -871,7 +871,7 @@ namespace Game.Network.Packets
|
||||
{
|
||||
_worldPacket.WritePackedGuid(Victim);
|
||||
_worldPacket.WriteInt32(Original);
|
||||
_worldPacket.WriteUInt8(Reason);
|
||||
_worldPacket.WriteUInt8((byte)Reason);
|
||||
_worldPacket.WriteInt32(Amount);
|
||||
_worldPacket.WriteFloat(GroupBonus);
|
||||
_worldPacket.WriteUInt8(ReferAFriendBonusType);
|
||||
@@ -1044,7 +1044,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteInt32(ResultCode);
|
||||
_worldPacket.WriteInt32((int)ResultCode);
|
||||
_worldPacket.WritePackedGuid(Player);
|
||||
}
|
||||
|
||||
|
||||
@@ -208,8 +208,8 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt8(SlashCmd);
|
||||
_worldPacket.WriteUInt32(_Language);
|
||||
_worldPacket.WriteUInt8((byte)SlashCmd);
|
||||
_worldPacket.WriteUInt32((uint)_Language);
|
||||
_worldPacket.WritePackedGuid(SenderGUID);
|
||||
_worldPacket.WritePackedGuid(SenderGuildGUID);
|
||||
_worldPacket.WritePackedGuid(SenderAccountGUID);
|
||||
@@ -269,7 +269,7 @@ namespace Game.Network.Packets
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WritePackedGuid(Guid);
|
||||
_worldPacket.WriteUInt32(EmoteID);
|
||||
_worldPacket.WriteInt32(EmoteID);
|
||||
}
|
||||
|
||||
public ObjectGuid Guid;
|
||||
@@ -300,7 +300,7 @@ namespace Game.Network.Packets
|
||||
{
|
||||
_worldPacket.WritePackedGuid(SourceGUID);
|
||||
_worldPacket.WritePackedGuid(SourceAccountGUID);
|
||||
_worldPacket.WriteUInt32(EmoteID);
|
||||
_worldPacket.WriteInt32(EmoteID);
|
||||
_worldPacket.WriteInt32(SoundIndex);
|
||||
_worldPacket.WritePackedGuid(TargetGUID);
|
||||
}
|
||||
@@ -376,7 +376,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt8(Reason);
|
||||
_worldPacket.WriteUInt8((byte)Reason);
|
||||
}
|
||||
|
||||
ChatRestrictionType Reason;
|
||||
|
||||
@@ -76,7 +76,7 @@ namespace Game.Network.Packets
|
||||
_worldPacket.WriteBits(DataType, 3);
|
||||
|
||||
var bytes = CompressedData.GetData();
|
||||
_worldPacket.WriteUInt32(bytes.Length);
|
||||
_worldPacket.WriteInt32(bytes.Length);
|
||||
_worldPacket.WriteBytes(bytes);
|
||||
}
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@ namespace Game.Network.Packets
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WritePackedGuid(Victim);
|
||||
_worldPacket.WriteUInt8(Type);
|
||||
_worldPacket.WriteUInt8((byte)Type);
|
||||
_worldPacket.WriteInt32(Amount);
|
||||
_worldPacket.WriteInt32(Resisted);
|
||||
_worldPacket.WriteInt32(Absorbed);
|
||||
@@ -136,18 +136,18 @@ namespace Game.Network.Packets
|
||||
{
|
||||
_worldPacket.WritePackedGuid(Caster);
|
||||
_worldPacket.WriteUInt32(SpellID);
|
||||
_worldPacket.WriteUInt32(Effects.Count);
|
||||
_worldPacket.WriteInt32(Effects.Count);
|
||||
|
||||
foreach (SpellLogEffect effect in Effects)
|
||||
{
|
||||
_worldPacket.WriteUInt32(effect.Effect);
|
||||
_worldPacket.WriteInt32(effect.Effect);
|
||||
|
||||
_worldPacket.WriteUInt32(effect.PowerDrainTargets.Count);
|
||||
_worldPacket.WriteUInt32(effect.ExtraAttacksTargets.Count);
|
||||
_worldPacket.WriteUInt32(effect.DurabilityDamageTargets.Count);
|
||||
_worldPacket.WriteUInt32(effect.GenericVictimTargets.Count);
|
||||
_worldPacket.WriteUInt32(effect.TradeSkillTargets.Count);
|
||||
_worldPacket.WriteUInt32(effect.FeedPetTargets.Count);
|
||||
_worldPacket.WriteInt32(effect.PowerDrainTargets.Count);
|
||||
_worldPacket.WriteInt32(effect.ExtraAttacksTargets.Count);
|
||||
_worldPacket.WriteInt32(effect.DurabilityDamageTargets.Count);
|
||||
_worldPacket.WriteInt32(effect.GenericVictimTargets.Count);
|
||||
_worldPacket.WriteInt32(effect.TradeSkillTargets.Count);
|
||||
_worldPacket.WriteInt32(effect.FeedPetTargets.Count);
|
||||
|
||||
foreach (SpellLogEffectPowerDrainParams powerDrainTarget in effect.PowerDrainTargets)
|
||||
{
|
||||
@@ -260,7 +260,7 @@ namespace Game.Network.Packets
|
||||
_worldPacket.WritePackedGuid(TargetGUID);
|
||||
_worldPacket.WritePackedGuid(CasterGUID);
|
||||
_worldPacket.WriteUInt32(SpellID);
|
||||
_worldPacket.WriteUInt32(Effects.Count);
|
||||
_worldPacket.WriteInt32(Effects.Count);
|
||||
WriteLogDataBit();
|
||||
FlushBits();
|
||||
|
||||
@@ -358,9 +358,9 @@ namespace Game.Network.Packets
|
||||
_worldPacket.WriteBit(data.Rolled.HasValue);
|
||||
_worldPacket.WriteBit(data.Needed.HasValue);
|
||||
if (data.Rolled.HasValue)
|
||||
_worldPacket.WriteUInt32(data.Rolled.Value);
|
||||
_worldPacket.WriteInt32(data.Rolled.Value);
|
||||
if (data.Needed.HasValue)
|
||||
_worldPacket.WriteUInt32(data.Needed.Value);
|
||||
_worldPacket.WriteInt32(data.Needed.Value);
|
||||
|
||||
_worldPacket.FlushBits();
|
||||
}
|
||||
@@ -385,7 +385,7 @@ namespace Game.Network.Packets
|
||||
_worldPacket.WritePackedGuid(CasterGUID);
|
||||
|
||||
_worldPacket.WriteUInt32(SpellID);
|
||||
_worldPacket.WriteUInt32(Type);
|
||||
_worldPacket.WriteUInt32((uint)Type);
|
||||
_worldPacket.WriteInt32(Amount);
|
||||
_worldPacket.WriteInt32(OverEnergize);
|
||||
|
||||
@@ -426,7 +426,7 @@ namespace Game.Network.Packets
|
||||
{
|
||||
_worldPacket.WriteUInt32(SpellID);
|
||||
_worldPacket.WritePackedGuid(Caster);
|
||||
_worldPacket.WriteUInt32(Entries);
|
||||
_worldPacket.WriteInt32(Entries.Count);
|
||||
|
||||
foreach (SpellLogMissEntry missEntry in Entries)
|
||||
missEntry.Write(_worldPacket);
|
||||
@@ -523,13 +523,13 @@ namespace Game.Network.Packets
|
||||
public override void Write()
|
||||
{
|
||||
WorldPacket attackRoundInfo = new WorldPacket();
|
||||
attackRoundInfo.WriteUInt32(hitInfo);
|
||||
attackRoundInfo.WriteUInt32((uint)hitInfo);
|
||||
attackRoundInfo.WritePackedGuid(AttackerGUID);
|
||||
attackRoundInfo.WritePackedGuid(VictimGUID);
|
||||
attackRoundInfo.WriteInt32(Damage);
|
||||
attackRoundInfo.WriteInt32(OriginalDamage);
|
||||
attackRoundInfo.WriteInt32(OverDamage);
|
||||
attackRoundInfo.WriteUInt8(SubDmg.HasValue);
|
||||
attackRoundInfo.WriteUInt8((byte)(SubDmg.HasValue ? 1 : 0));
|
||||
|
||||
if (SubDmg.HasValue)
|
||||
{
|
||||
@@ -543,8 +543,8 @@ namespace Game.Network.Packets
|
||||
}
|
||||
|
||||
attackRoundInfo.WriteUInt8(VictimState);
|
||||
attackRoundInfo.WriteInt32(AttackerState);
|
||||
attackRoundInfo.WriteInt32(MeleeSpellID);
|
||||
attackRoundInfo.WriteUInt32(AttackerState);
|
||||
attackRoundInfo.WriteUInt32(MeleeSpellID);
|
||||
|
||||
if (hitInfo.HasAnyFlag(HitInfo.Block))
|
||||
attackRoundInfo.WriteInt32(BlockAmount);
|
||||
@@ -571,7 +571,7 @@ namespace Game.Network.Packets
|
||||
if (hitInfo.HasAnyFlag(HitInfo.Block | HitInfo.Unk12))
|
||||
attackRoundInfo.WriteFloat(Unk);
|
||||
|
||||
attackRoundInfo.WriteUInt8(ContentTuning.TuningType);
|
||||
attackRoundInfo.WriteUInt8((byte)ContentTuning.TuningType);
|
||||
attackRoundInfo.WriteUInt8(ContentTuning.TargetLevel);
|
||||
attackRoundInfo.WriteUInt8(ContentTuning.Expansion);
|
||||
attackRoundInfo.WriteUInt8(ContentTuning.TargetMinScalingLevel);
|
||||
@@ -580,13 +580,13 @@ namespace Game.Network.Packets
|
||||
attackRoundInfo.WriteInt8(ContentTuning.TargetScalingLevelDelta);
|
||||
attackRoundInfo.WriteUInt16(ContentTuning.PlayerItemLevel);
|
||||
attackRoundInfo.WriteUInt16(ContentTuning.ScalingHealthItemLevelCurveID);
|
||||
attackRoundInfo.WriteUInt8(ContentTuning.ScalesWithItemLevel ? 1 : 0);
|
||||
attackRoundInfo.WriteUInt8((byte)(ContentTuning.ScalesWithItemLevel ? 1 : 0));
|
||||
|
||||
WriteLogDataBit();
|
||||
FlushBits();
|
||||
WriteLogData();
|
||||
|
||||
_worldPacket.WriteInt32(attackRoundInfo.GetSize());
|
||||
_worldPacket.WriteUInt32(attackRoundInfo.GetSize());
|
||||
_worldPacket.WriteBytes(attackRoundInfo);
|
||||
}
|
||||
|
||||
|
||||
@@ -156,7 +156,7 @@ namespace Game.Network.Packets
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WritePackedGuid(UnitGUID);
|
||||
_worldPacket.WriteUInt32(Reaction);
|
||||
_worldPacket.WriteUInt32((uint)Reaction);
|
||||
}
|
||||
|
||||
public ObjectGuid UnitGUID;
|
||||
@@ -180,7 +180,7 @@ namespace Game.Network.Packets
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WritePackedGuid(Guid);
|
||||
_worldPacket.WriteUInt32(Powers.Count);
|
||||
_worldPacket.WriteInt32(Powers.Count);
|
||||
foreach (var power in Powers)
|
||||
{
|
||||
_worldPacket.WriteInt32(power.Power);
|
||||
|
||||
@@ -44,11 +44,11 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt32(SetData.Count);
|
||||
_worldPacket.WriteInt32(SetData.Count);
|
||||
|
||||
foreach (var equipSet in SetData)
|
||||
{
|
||||
_worldPacket.WriteInt32(equipSet.Type);
|
||||
_worldPacket.WriteInt32((int)equipSet.Type);
|
||||
_worldPacket.WriteUInt64(equipSet.Guid);
|
||||
_worldPacket.WriteUInt32(equipSet.SetID);
|
||||
_worldPacket.WriteUInt32(equipSet.IgnoreMask);
|
||||
|
||||
@@ -75,7 +75,7 @@ namespace Game.Network.Packets
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WritePackedGuid(ObjectGUID);
|
||||
_worldPacket.WriteUInt32(AnimKitID);
|
||||
_worldPacket.WriteInt32(AnimKitID);
|
||||
_worldPacket.WriteBit(Maintain);
|
||||
_worldPacket.FlushBits();
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt32(Result);
|
||||
_worldPacket.WriteUInt32((uint)Result);
|
||||
_worldPacket.WriteUInt32(GarrSiteID);
|
||||
}
|
||||
|
||||
@@ -64,9 +64,9 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteInt32(FactionIndex);
|
||||
_worldPacket.WriteUInt32(Garrisons.Count);
|
||||
_worldPacket.WriteUInt32(FollowerSoftCaps.Count);
|
||||
_worldPacket.WriteUInt32(FactionIndex);
|
||||
_worldPacket.WriteInt32(Garrisons.Count);
|
||||
_worldPacket.WriteInt32(FollowerSoftCaps.Count);
|
||||
|
||||
foreach (FollowerSoftCapInfo followerSoftCapInfo in FollowerSoftCaps)
|
||||
followerSoftCapInfo.Write(_worldPacket);
|
||||
@@ -86,7 +86,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt32(Sites.Count);
|
||||
_worldPacket.WriteInt32(Sites.Count);
|
||||
foreach (GarrisonRemoteSiteInfo site in Sites)
|
||||
site.Write(_worldPacket);
|
||||
}
|
||||
@@ -116,8 +116,8 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteInt32(GarrTypeID);
|
||||
_worldPacket.WriteUInt32(Result);
|
||||
_worldPacket.WriteInt32((int)GarrTypeID);
|
||||
_worldPacket.WriteUInt32((uint)Result);
|
||||
BuildingInfo.Write(_worldPacket);
|
||||
_worldPacket.WriteBit(PlayActivationCinematic);
|
||||
_worldPacket.FlushBits();
|
||||
@@ -149,8 +149,8 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteInt32(GarrTypeID);
|
||||
_worldPacket.WriteUInt32(Result);
|
||||
_worldPacket.WriteInt32((int)GarrTypeID);
|
||||
_worldPacket.WriteUInt32((uint)Result);
|
||||
_worldPacket.WriteUInt32(GarrPlotInstanceID);
|
||||
_worldPacket.WriteUInt32(GarrBuildingID);
|
||||
}
|
||||
@@ -167,8 +167,8 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteInt32(GarrTypeID);
|
||||
_worldPacket.WriteUInt32(Result);
|
||||
_worldPacket.WriteInt32((int)GarrTypeID);
|
||||
_worldPacket.WriteUInt32((uint)Result);
|
||||
_worldPacket.WriteUInt32(BuildingID);
|
||||
}
|
||||
|
||||
@@ -183,8 +183,8 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteInt32(GarrTypeID);
|
||||
_worldPacket.WriteUInt32(Result);
|
||||
_worldPacket.WriteInt32((int)GarrTypeID);
|
||||
_worldPacket.WriteUInt32((uint)Result);
|
||||
_worldPacket.WriteUInt32(BuildingID);
|
||||
}
|
||||
|
||||
@@ -206,9 +206,9 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteInt32(GarrTypeID);
|
||||
_worldPacket.WriteUInt32(BlueprintsKnown != null ? BlueprintsKnown.Count : 0);
|
||||
_worldPacket.WriteUInt32(SpecializationsKnown != null ? SpecializationsKnown.Count : 0);
|
||||
_worldPacket.WriteUInt32((uint)GarrTypeID);
|
||||
_worldPacket.WriteInt32(BlueprintsKnown != null ? BlueprintsKnown.Count : 0);
|
||||
_worldPacket.WriteInt32(SpecializationsKnown != null ? SpecializationsKnown.Count : 0);
|
||||
if (BlueprintsKnown != null)
|
||||
foreach (uint blueprint in BlueprintsKnown)
|
||||
_worldPacket.WriteUInt32(blueprint);
|
||||
@@ -236,7 +236,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt32(Landmarks.Count);
|
||||
_worldPacket.WriteInt32(Landmarks.Count);
|
||||
foreach (GarrisonBuildingLandmark landmark in Landmarks)
|
||||
landmark.Write(_worldPacket);
|
||||
}
|
||||
@@ -250,7 +250,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteInt32(GarrTypeID);
|
||||
_worldPacket.WriteInt32((int)GarrTypeID);
|
||||
PlotInfo.Write(_worldPacket);
|
||||
}
|
||||
|
||||
@@ -276,8 +276,8 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteInt32(GarrTypeID);
|
||||
_worldPacket .WriteUInt32(Result);
|
||||
_worldPacket.WriteInt32((int)GarrTypeID);
|
||||
_worldPacket .WriteUInt32((uint)Result);
|
||||
Follower.Write(_worldPacket);
|
||||
}
|
||||
|
||||
@@ -337,9 +337,9 @@ namespace Game.Network.Packets
|
||||
{
|
||||
data.WriteUInt32(GarrPlotInstanceID);
|
||||
data.WriteUInt32(GarrBuildingID);
|
||||
data.WriteUInt32(TimeBuilt);
|
||||
data.WriteUInt32((uint)TimeBuilt);
|
||||
data.WriteUInt32(CurrentGarSpecID);
|
||||
data.WriteUInt32(TimeSpecCooldown);
|
||||
data.WriteUInt32((uint)TimeSpecCooldown);
|
||||
data.WriteBit(Active);
|
||||
data.FlushBits();
|
||||
}
|
||||
@@ -366,7 +366,7 @@ namespace Game.Network.Packets
|
||||
data.WriteUInt32(Durability);
|
||||
data.WriteUInt32(CurrentBuildingID);
|
||||
data.WriteUInt32(CurrentMissionID);
|
||||
data.WriteUInt32(AbilityID.Count);
|
||||
data.WriteInt32(AbilityID.Count);
|
||||
data.WriteUInt32(ZoneSupportSpellID);
|
||||
data.WriteUInt32(FollowerStatus);
|
||||
|
||||
@@ -399,9 +399,9 @@ namespace Game.Network.Packets
|
||||
{
|
||||
data.WriteUInt64(DbID);
|
||||
data.WriteUInt32(MissionRecID);
|
||||
data.WriteUInt32(OfferTime);
|
||||
data.WriteUInt32((uint)OfferTime);
|
||||
data.WriteUInt32(OfferDuration);
|
||||
data.WriteUInt32(StartTime);
|
||||
data.WriteUInt32((uint)StartTime);
|
||||
data.WriteUInt32(TravelDuration);
|
||||
data.WriteUInt32(MissionDuration);
|
||||
data.WriteUInt32(MissionState);
|
||||
@@ -448,7 +448,7 @@ namespace Game.Network.Packets
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteUInt32(GarrMssnBonusAbilityID);
|
||||
data.WriteUInt32(StartTime);
|
||||
data.WriteUInt32((uint)StartTime);
|
||||
}
|
||||
|
||||
public uint GarrMssnBonusAbilityID;
|
||||
@@ -460,7 +460,7 @@ namespace Game.Network.Packets
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteInt32(GarrTalentID);
|
||||
data.WriteInt32(ResearchStartTime);
|
||||
data.WriteUInt32((uint)ResearchStartTime);
|
||||
data.WriteInt32(Flags);
|
||||
}
|
||||
|
||||
@@ -473,20 +473,20 @@ namespace Game.Network.Packets
|
||||
{
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteInt32(GarrTypeID);
|
||||
data.WriteInt32(GarrSiteID);
|
||||
data.WriteInt32(GarrSiteLevelID);
|
||||
data.WriteUInt32(Buildings.Count);
|
||||
data.WriteUInt32(Plots.Count);
|
||||
data.WriteUInt32(Followers.Count);
|
||||
data.WriteUInt32(Missions.Count);
|
||||
data.WriteUInt32(MissionRewards.Count);
|
||||
data.WriteUInt32(MissionOvermaxRewards.Count);
|
||||
data.WriteUInt32(MissionAreaBonuses.Count);
|
||||
data.WriteUInt32(Talents.Count);
|
||||
data.WriteUInt32(CanStartMission.Count);
|
||||
data.WriteUInt32(ArchivedMissions.Count);
|
||||
data.WriteInt32(NumFollowerActivationsRemaining);
|
||||
data.WriteUInt32((uint)GarrTypeID);
|
||||
data.WriteUInt32(GarrSiteID);
|
||||
data.WriteUInt32(GarrSiteLevelID);
|
||||
data.WriteInt32(Buildings.Count);
|
||||
data.WriteInt32(Plots.Count);
|
||||
data.WriteInt32(Followers.Count);
|
||||
data.WriteInt32(Missions.Count);
|
||||
data.WriteInt32(MissionRewards.Count);
|
||||
data.WriteInt32(MissionOvermaxRewards.Count);
|
||||
data.WriteInt32(MissionAreaBonuses.Count);
|
||||
data.WriteInt32(Talents.Count);
|
||||
data.WriteInt32(CanStartMission.Count);
|
||||
data.WriteInt32(ArchivedMissions.Count);
|
||||
data.WriteUInt32(NumFollowerActivationsRemaining);
|
||||
data.WriteUInt32(NumMissionsStartedToday);
|
||||
|
||||
foreach (GarrisonPlotInfo plot in Plots)
|
||||
@@ -497,14 +497,14 @@ namespace Game.Network.Packets
|
||||
|
||||
foreach (List<GarrisonMissionReward> missionReward in MissionRewards)
|
||||
{
|
||||
data.WriteUInt32(missionReward.Count);
|
||||
data.WriteInt32(missionReward.Count);
|
||||
foreach (GarrisonMissionReward missionRewardItem in missionReward)
|
||||
missionRewardItem.Write(data);
|
||||
}
|
||||
|
||||
foreach (List<GarrisonMissionReward> missionReward in MissionOvermaxRewards)
|
||||
{
|
||||
data.WriteUInt32(missionReward.Count);
|
||||
data.WriteInt32(missionReward.Count);
|
||||
foreach (GarrisonMissionReward missionRewardItem in missionReward)
|
||||
missionRewardItem.Write(data);
|
||||
}
|
||||
@@ -582,7 +582,7 @@ namespace Game.Network.Packets
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteUInt32(GarrSiteLevelID);
|
||||
data.WriteUInt32(Buildings.Count);
|
||||
data.WriteInt32(Buildings.Count);
|
||||
foreach (GarrisonRemoteBuildingInfo building in Buildings)
|
||||
building.Write(data);
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt32(Post.Count);
|
||||
_worldPacket.WriteInt32(Post.Count);
|
||||
foreach (LFGuildBrowseData guildData in Post)
|
||||
guildData.Write(_worldPacket);
|
||||
}
|
||||
@@ -115,7 +115,7 @@ namespace Game.Network.Packets
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteInt32(NumRemaining);
|
||||
_worldPacket.WriteUInt32(Application.Count);
|
||||
_worldPacket.WriteInt32(Application.Count);
|
||||
foreach (LFGuildApplicationData application in Application)
|
||||
application.Write(_worldPacket);
|
||||
}
|
||||
@@ -164,8 +164,8 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt32(Recruits.Count);
|
||||
_worldPacket.WriteUInt32(UpdateTime);
|
||||
_worldPacket.WriteInt32(Recruits.Count);
|
||||
_worldPacket.WriteUInt32((uint)UpdateTime);
|
||||
foreach (LFGuildRecruitData recruit in Recruits)
|
||||
recruit.Write(_worldPacket);
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ namespace Game.Network.Packets
|
||||
{
|
||||
_worldPacket.WritePackedGuid(Info.GuildGuid);
|
||||
_worldPacket.WriteUInt32(Info.VirtualRealmAddress);
|
||||
_worldPacket.WriteUInt32(Info.Ranks.Count);
|
||||
_worldPacket.WriteInt32(Info.Ranks.Count);
|
||||
_worldPacket.WriteUInt32(Info.EmblemStyle);
|
||||
_worldPacket.WriteUInt32(Info.EmblemColor);
|
||||
_worldPacket.WriteUInt32(Info.BorderStyle);
|
||||
@@ -129,8 +129,8 @@ namespace Game.Network.Packets
|
||||
_worldPacket.WriteInt32(NumAccounts);
|
||||
_worldPacket.WritePackedTime(CreateDate);
|
||||
_worldPacket.WriteInt32(GuildFlags);
|
||||
_worldPacket.WriteUInt32(MemberData.Count);
|
||||
_worldPacket.WriteBits(WelcomeText.GetByteCount(), 10);
|
||||
_worldPacket.WriteInt32(MemberData.Count);
|
||||
_worldPacket.WriteBits(WelcomeText.GetByteCount(), 11);
|
||||
_worldPacket.WriteBits(InfoText.GetByteCount(), 10);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
@@ -157,7 +157,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt32(MemberData.Count);
|
||||
_worldPacket.WriteInt32(MemberData.Count);
|
||||
|
||||
MemberData.ForEach(p => p.Write(_worldPacket));
|
||||
}
|
||||
@@ -171,7 +171,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Read()
|
||||
{
|
||||
uint textLen = _worldPacket.ReadBits<uint>(10);
|
||||
uint textLen = _worldPacket.ReadBits<uint>(11);
|
||||
MotdText = _worldPacket.ReadString(textLen);
|
||||
}
|
||||
|
||||
@@ -184,8 +184,8 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteInt32(Result);
|
||||
_worldPacket.WriteInt32(Command);
|
||||
_worldPacket.WriteUInt32((uint)Result);
|
||||
_worldPacket.WriteUInt32((uint)Command);
|
||||
|
||||
_worldPacket.WriteBits(Name.GetByteCount(), 8);
|
||||
_worldPacket.WriteString(Name);
|
||||
@@ -307,7 +307,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteBits(MotdText.GetByteCount(), 10);
|
||||
_worldPacket.WriteBits(MotdText.GetByteCount(), 11);
|
||||
_worldPacket.WriteString(MotdText);
|
||||
}
|
||||
|
||||
@@ -386,7 +386,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt32(Entry.Count);
|
||||
_worldPacket.WriteInt32(Entry.Count);
|
||||
|
||||
foreach (GuildEventEntry entry in Entry)
|
||||
{
|
||||
@@ -528,7 +528,7 @@ namespace Game.Network.Packets
|
||||
_worldPacket.WriteInt32(WithdrawGoldLimit);
|
||||
_worldPacket.WriteInt32(Flags);
|
||||
_worldPacket.WriteInt32(NumTabs);
|
||||
_worldPacket.WriteUInt32(Tab.Count);
|
||||
_worldPacket.WriteInt32(Tab.Count);
|
||||
|
||||
foreach (GuildRankTabPermissions tab in Tab)
|
||||
{
|
||||
@@ -648,7 +648,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt32(Ranks.Count);
|
||||
_worldPacket.WriteInt32(Ranks.Count);
|
||||
|
||||
Ranks.ForEach(p => p.Write(_worldPacket));
|
||||
}
|
||||
@@ -878,7 +878,7 @@ namespace Game.Network.Packets
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt32(Version);
|
||||
_worldPacket.WriteUInt32(RewardItems.Count);
|
||||
_worldPacket.WriteInt32(RewardItems.Count);
|
||||
|
||||
foreach (var item in RewardItems)
|
||||
item.Write(_worldPacket);
|
||||
@@ -1016,14 +1016,14 @@ namespace Game.Network.Packets
|
||||
_worldPacket.WriteUInt64(Money);
|
||||
_worldPacket.WriteInt32(Tab);
|
||||
_worldPacket.WriteInt32(WithdrawalsRemaining);
|
||||
_worldPacket.WriteUInt32(TabInfo.Count);
|
||||
_worldPacket.WriteUInt32(ItemInfo.Count);
|
||||
_worldPacket.WriteInt32(TabInfo.Count);
|
||||
_worldPacket.WriteInt32(ItemInfo.Count);
|
||||
_worldPacket.WriteBit(FullUpdate);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
foreach (GuildBankTabInfo tab in TabInfo)
|
||||
{
|
||||
_worldPacket.WriteUInt32(tab.TabIndex);
|
||||
_worldPacket.WriteInt32(tab.TabIndex);
|
||||
_worldPacket.WriteBits(tab.Name.GetByteCount(), 7);
|
||||
_worldPacket.WriteBits(tab.Icon.GetByteCount(), 9);
|
||||
|
||||
@@ -1121,7 +1121,7 @@ namespace Game.Network.Packets
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteInt32(Tab);
|
||||
_worldPacket.WriteUInt32(Entry.Count);
|
||||
_worldPacket.WriteInt32(Entry.Count);
|
||||
_worldPacket.WriteBit(WeeklyBonusMoney.HasValue);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
@@ -1222,7 +1222,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt32(NewsEvents.Count);
|
||||
_worldPacket.WriteInt32(NewsEvents.Count);
|
||||
foreach (var newsEvent in NewsEvents)
|
||||
newsEvent.Write(_worldPacket);
|
||||
}
|
||||
@@ -1327,7 +1327,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteInt32(Error);
|
||||
_worldPacket.WriteUInt32((uint)Error);
|
||||
}
|
||||
|
||||
public GuildEmblemError Error;
|
||||
@@ -1475,10 +1475,10 @@ namespace Game.Network.Packets
|
||||
{
|
||||
data.WriteUInt32(ItemID);
|
||||
data.WriteUInt32(Unk4);
|
||||
data.WriteUInt32(AchievementsRequired.Count);
|
||||
data.WriteInt32(AchievementsRequired.Count);
|
||||
data.WriteUInt64(RaceMask);
|
||||
data.WriteUInt32(MinGuildLevel);
|
||||
data.WriteUInt32(MinGuildRep);
|
||||
data.WriteInt32(MinGuildLevel);
|
||||
data.WriteInt32(MinGuildRep);
|
||||
data.WriteUInt64(Cost);
|
||||
|
||||
foreach (var achievementId in AchievementsRequired)
|
||||
@@ -1538,7 +1538,7 @@ namespace Game.Network.Packets
|
||||
data.WriteInt32(Data[i]);
|
||||
|
||||
data.WritePackedGuid(MemberGuid);
|
||||
data.WriteUInt32(MemberList.Count);
|
||||
data.WriteInt32(MemberList.Count);
|
||||
|
||||
foreach (ObjectGuid memberGuid in MemberList)
|
||||
data.WritePackedGuid(memberGuid);
|
||||
|
||||
@@ -132,7 +132,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt32(Hotfixes.Count);
|
||||
_worldPacket.WriteInt32(Hotfixes.Count);
|
||||
foreach (HotfixData hotfix in Hotfixes)
|
||||
hotfix.Write(_worldPacket);
|
||||
|
||||
@@ -150,7 +150,7 @@ namespace Game.Network.Packets
|
||||
Record.Write(data);
|
||||
if (Size.HasValue)
|
||||
{
|
||||
data.WriteUInt32(Size);
|
||||
data.WriteUInt32(Size.Value);
|
||||
data.WriteBit(true);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -19,6 +19,7 @@ using Framework.Constants;
|
||||
using Framework.Dynamic;
|
||||
using Game.Entities;
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
|
||||
namespace Game.Network.Packets
|
||||
{
|
||||
@@ -36,23 +37,23 @@ namespace Game.Network.Packets
|
||||
|
||||
public class InspectResult : ServerPacket
|
||||
{
|
||||
public InspectResult() : base(ServerOpcodes.InspectResult) { }
|
||||
public InspectResult() : base(ServerOpcodes.InspectResult)
|
||||
{
|
||||
DisplayInfo = new PlayerModelDisplayInfo();
|
||||
}
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WritePackedGuid(InspecteeGUID);
|
||||
_worldPacket.WriteUInt32(Items.Count);
|
||||
_worldPacket.WriteUInt32(Glyphs.Count);
|
||||
_worldPacket.WriteUInt32(Talents.Count);
|
||||
_worldPacket.WriteUInt32(PvpTalents.Count);
|
||||
_worldPacket.WriteInt32(ClassID);
|
||||
_worldPacket.WriteInt32(SpecializationID);
|
||||
_worldPacket.WriteInt32(GenderID);
|
||||
DisplayInfo.Write(_worldPacket);
|
||||
_worldPacket.WriteInt32(Glyphs.Count);
|
||||
_worldPacket.WriteInt32(Talents.Count);
|
||||
_worldPacket.WriteInt32(PvpTalents.Count);
|
||||
_worldPacket.WriteInt32(ItemLevel);
|
||||
_worldPacket.WriteUInt8(LifetimeMaxRank);
|
||||
_worldPacket.WriteUInt16(TodayHK);
|
||||
_worldPacket.WriteUInt16(YesterdayHK);
|
||||
_worldPacket.WriteInt32(LifetimeHK);
|
||||
_worldPacket.WriteInt32(HonorLevel);
|
||||
_worldPacket.WriteUInt32(LifetimeHK);
|
||||
_worldPacket.WriteUInt32(HonorLevel);
|
||||
|
||||
for (int i = 0; i < Glyphs.Count; ++i)
|
||||
_worldPacket.WriteUInt16(Glyphs[i]);
|
||||
@@ -75,22 +76,16 @@ namespace Game.Network.Packets
|
||||
|
||||
if (AzeriteLevel.HasValue)
|
||||
_worldPacket.WriteInt32(AzeriteLevel.Value);
|
||||
|
||||
foreach (InspectItemData item in Items)
|
||||
item.Write(_worldPacket);
|
||||
}
|
||||
|
||||
public ObjectGuid InspecteeGUID;
|
||||
public List<InspectItemData> Items = new List<InspectItemData>();
|
||||
public PlayerModelDisplayInfo DisplayInfo;
|
||||
public List<ushort> Glyphs = new List<ushort>();
|
||||
public List<ushort> Talents = new List<ushort>();
|
||||
public List<ushort> PvpTalents = new List<ushort>();
|
||||
public Class ClassID = Class.None;
|
||||
public Gender GenderID = Gender.None;
|
||||
public Optional<InspectGuildData> GuildData = new Optional<InspectGuildData>();
|
||||
public Array<PVPBracketData> Bracket = new Array<PVPBracketData>(6);
|
||||
public int SpecializationID;
|
||||
public Optional<int> AzeriteLevel;
|
||||
public int ItemLevel;
|
||||
public uint LifetimeHK;
|
||||
public uint HonorLevel;
|
||||
public ushort TodayHK;
|
||||
@@ -136,7 +131,7 @@ namespace Game.Network.Packets
|
||||
{
|
||||
public InspectItemData(Item item, byte index)
|
||||
{
|
||||
CreatorGUID = item.GetGuidValue(ItemFields.Creator);
|
||||
CreatorGUID = item.GetCreator();
|
||||
|
||||
Item = new ItemInstance(item);
|
||||
Index = index;
|
||||
@@ -150,7 +145,7 @@ namespace Game.Network.Packets
|
||||
}
|
||||
|
||||
byte i = 0;
|
||||
foreach (ItemDynamicFieldGems gemData in item.GetGems())
|
||||
foreach (SocketedGem gemData in item.m_itemData.Gems)
|
||||
{
|
||||
if (gemData.ItemId != 0)
|
||||
{
|
||||
@@ -167,7 +162,7 @@ namespace Game.Network.Packets
|
||||
{
|
||||
data.WritePackedGuid(CreatorGUID);
|
||||
data.WriteUInt8(Index);
|
||||
data.WriteUInt32(AzeritePowers.Count);
|
||||
data.WriteInt32(AzeritePowers.Count);
|
||||
foreach (var id in AzeritePowers)
|
||||
data.WriteInt32(id);
|
||||
|
||||
@@ -193,6 +188,67 @@ namespace Game.Network.Packets
|
||||
public List<int> AzeritePowers = new List<int>();
|
||||
}
|
||||
|
||||
public class PlayerModelDisplayInfo
|
||||
{
|
||||
public ObjectGuid GUID;
|
||||
public List<InspectItemData> Items = new List<InspectItemData>();
|
||||
public string Name;
|
||||
public uint SpecializationID;
|
||||
public byte GenderID;
|
||||
public byte Skin;
|
||||
public byte HairColor;
|
||||
public byte HairStyle;
|
||||
public byte FacialHairStyle;
|
||||
public byte Face;
|
||||
public byte Race;
|
||||
public byte ClassID;
|
||||
public Array<byte> CustomDisplay = new Array<byte>(PlayerConst.CustomDisplaySize);
|
||||
|
||||
public void Initialize(Player player)
|
||||
{
|
||||
GUID = player.GetGUID();
|
||||
SpecializationID = player.GetPrimarySpecialization();
|
||||
Name = player.GetName();
|
||||
GenderID = player.m_playerData.NativeSex;
|
||||
Skin = player.m_playerData.SkinID;
|
||||
HairColor = player.m_playerData.HairColorID;
|
||||
HairStyle = player.m_playerData.HairStyleID;
|
||||
FacialHairStyle = player.m_playerData.FacialHairStyleID;
|
||||
Face = player.m_playerData.FaceID;
|
||||
Race = (byte)player.GetRace();
|
||||
ClassID = (byte)player.GetClass();
|
||||
CustomDisplay.AddRange(player.m_playerData.CustomDisplayOption._values);
|
||||
|
||||
for (byte i = 0; i < EquipmentSlot.End; ++i)
|
||||
{
|
||||
Item item = player.GetItemByPos(InventorySlots.Bag0, i);
|
||||
if (item != null)
|
||||
Items.Add(new InspectItemData(item, i));
|
||||
}
|
||||
}
|
||||
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WritePackedGuid(GUID);
|
||||
data.WriteUInt32(SpecializationID);
|
||||
data.WriteInt32(Items.Count);
|
||||
data.WriteBits(Name.GetByteCount(), 6);
|
||||
data.WriteUInt8(GenderID);
|
||||
data.WriteUInt8(Skin);
|
||||
data.WriteUInt8(HairColor);
|
||||
data.WriteUInt8(HairStyle);
|
||||
data.WriteUInt8(FacialHairStyle);
|
||||
data.WriteUInt8(Face);
|
||||
data.WriteUInt8(Race);
|
||||
data.WriteUInt8(ClassID);
|
||||
CustomDisplay.ForEach(id => data.WriteUInt8(id));
|
||||
|
||||
data.WriteString(Name);
|
||||
|
||||
foreach (InspectItemData item in Items)
|
||||
item.Write(data);
|
||||
}
|
||||
}
|
||||
public struct InspectGuildData
|
||||
{
|
||||
public void Write(WorldPacket data)
|
||||
|
||||
@@ -121,7 +121,7 @@ namespace Game.Network.Packets
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteInt32(Delay);
|
||||
_worldPacket.WriteUInt32(Reason);
|
||||
_worldPacket.WriteUInt32((uint)Reason);
|
||||
}
|
||||
|
||||
public int Delay;
|
||||
@@ -153,9 +153,9 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt8(Type);
|
||||
_worldPacket.WriteUInt8((byte)Type);
|
||||
_worldPacket.WriteUInt32(MapID);
|
||||
_worldPacket.WriteUInt32(DifficultyID);
|
||||
_worldPacket.WriteUInt32((uint)DifficultyID);
|
||||
_worldPacket.WriteBit(Locked);
|
||||
_worldPacket.WriteBit(Extended);
|
||||
_worldPacket.FlushBits();
|
||||
@@ -277,7 +277,7 @@ namespace Game.Network.Packets
|
||||
data.WriteUInt32(MapID);
|
||||
data.WriteUInt32(DifficultyID);
|
||||
data.WriteUInt64(InstanceID);
|
||||
data.WriteUInt32(TimeRemaining);
|
||||
data.WriteInt32(TimeRemaining);
|
||||
data.WriteUInt32(CompletedMask);
|
||||
|
||||
data.WriteBit(Locked);
|
||||
|
||||
@@ -90,7 +90,7 @@ namespace Game.Network.Packets
|
||||
{
|
||||
_worldPacket.WritePackedGuid(VendorGUID);
|
||||
_worldPacket.WriteUInt32(Muid);
|
||||
_worldPacket.WriteUInt8(Reason);
|
||||
_worldPacket.WriteUInt8((byte)Reason);
|
||||
}
|
||||
|
||||
public ObjectGuid VendorGUID;
|
||||
@@ -237,7 +237,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteInt8(BagResult);
|
||||
_worldPacket.WriteInt8((sbyte)BagResult);
|
||||
_worldPacket.WritePackedGuid(Item[0]);
|
||||
_worldPacket.WritePackedGuid(Item[1]);
|
||||
_worldPacket.WriteUInt8(ContainerBSlot); // bag type subclass, used with EQUIP_ERR_EVENT_AUTOEQUIP_BIND_CONFIRM and EQUIP_ERR_WRONG_BAG_TYPE_2
|
||||
@@ -246,7 +246,7 @@ namespace Game.Network.Packets
|
||||
{
|
||||
case InventoryResult.CantEquipLevelI:
|
||||
case InventoryResult.PurchaseLevelTooLow:
|
||||
_worldPacket.WriteUInt32(Level);
|
||||
_worldPacket.WriteInt32(Level);
|
||||
break;
|
||||
case InventoryResult.EventAutoequipBindConfirm:
|
||||
_worldPacket.WritePackedGuid(SrcContainer);
|
||||
@@ -403,7 +403,7 @@ namespace Game.Network.Packets
|
||||
{
|
||||
_worldPacket.WritePackedGuid(VendorGUID);
|
||||
_worldPacket.WritePackedGuid(ItemGUID);
|
||||
_worldPacket.WriteUInt8(Reason);
|
||||
_worldPacket.WriteUInt8((byte)Reason);
|
||||
}
|
||||
|
||||
public ObjectGuid VendorGUID;
|
||||
@@ -423,7 +423,7 @@ namespace Game.Network.Packets
|
||||
_worldPacket.WriteInt32(QuestLogItemID);
|
||||
_worldPacket.WriteUInt32(Quantity);
|
||||
_worldPacket.WriteUInt32(QuantityInInventory);
|
||||
_worldPacket.WriteUInt32(DungeonEncounterID);
|
||||
_worldPacket.WriteInt32(DungeonEncounterID);
|
||||
_worldPacket.WriteInt32(BattlePetSpeciesID);
|
||||
_worldPacket.WriteInt32(BattlePetBreedID);
|
||||
_worldPacket.WriteUInt32(BattlePetBreedQuality);
|
||||
@@ -603,39 +603,6 @@ namespace Game.Network.Packets
|
||||
public ObjectGuid ItemGuid;
|
||||
}
|
||||
|
||||
class UpgradeItem : ClientPacket
|
||||
{
|
||||
public UpgradeItem(WorldPacket packet) : base(packet) { }
|
||||
|
||||
public override void Read()
|
||||
{
|
||||
ItemMaster = _worldPacket.ReadPackedGuid();
|
||||
ItemGUID = _worldPacket.ReadPackedGuid();
|
||||
UpgradeID = _worldPacket.ReadInt32();
|
||||
ContainerSlot = _worldPacket.ReadInt32();
|
||||
Slot = _worldPacket.ReadInt32();
|
||||
}
|
||||
|
||||
public ObjectGuid ItemMaster;
|
||||
public ObjectGuid ItemGUID;
|
||||
public int ContainerSlot;
|
||||
public int UpgradeID;
|
||||
public int Slot;
|
||||
}
|
||||
|
||||
class ItemUpgradeResult : ServerPacket
|
||||
{
|
||||
public ItemUpgradeResult() : base(ServerOpcodes.ItemUpgradeResult) { }
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteBit(Success);
|
||||
_worldPacket.FlushBits();
|
||||
}
|
||||
|
||||
public bool Success;
|
||||
}
|
||||
|
||||
class SocketGems : ClientPacket
|
||||
{
|
||||
public SocketGems(WorldPacket packet) : base(packet) { }
|
||||
@@ -716,7 +683,7 @@ namespace Game.Network.Packets
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteUInt8(Context);
|
||||
data.WriteUInt32(BonusListIDs.Count);
|
||||
data.WriteInt32(BonusListIDs.Count);
|
||||
foreach (uint bonusID in BonusListIDs)
|
||||
data.WriteUInt32(bonusID);
|
||||
}
|
||||
@@ -774,15 +741,15 @@ namespace Game.Network.Packets
|
||||
public ItemInstance(Item item)
|
||||
{
|
||||
ItemID = item.GetEntry();
|
||||
var bonusListIds = item.GetDynamicValues(ItemDynamicFields.BonusListIds);
|
||||
List<uint> bonusListIds = item.m_itemData.BonusListIDs;
|
||||
if (!bonusListIds.Empty())
|
||||
{
|
||||
ItemBonus.HasValue = true;
|
||||
ItemBonus.Value.BonusListIDs.AddRange(bonusListIds);
|
||||
ItemBonus.Value.Context = (byte)item.GetUInt32Value(ItemFields.Context);
|
||||
ItemBonus.Value.Context = (byte)item.m_itemData.Context;
|
||||
}
|
||||
|
||||
uint mask = item.GetUInt32Value(ItemFields.ModifiersMask);
|
||||
uint mask = item.m_itemData.ModifiersMask;
|
||||
if (mask != 0)
|
||||
{
|
||||
Modifications.HasValue = true;
|
||||
@@ -799,11 +766,13 @@ namespace Game.Network.Packets
|
||||
{
|
||||
ItemID = lootItem.itemid;
|
||||
|
||||
if (!lootItem.BonusListIDs.Empty())
|
||||
if (!lootItem.BonusListIDs.Empty() || lootItem.randomBonusListId != 0)
|
||||
{
|
||||
ItemBonus.HasValue = true;
|
||||
ItemBonus.Value.BonusListIDs = lootItem.BonusListIDs;
|
||||
ItemBonus.Value.Context = lootItem.context;
|
||||
if (lootItem.randomBonusListId != 0)
|
||||
ItemBonus.Value.BonusListIDs.Add(lootItem.randomBonusListId);
|
||||
}
|
||||
|
||||
if (lootItem.upgradeId != 0)
|
||||
@@ -836,7 +805,7 @@ namespace Game.Network.Packets
|
||||
}
|
||||
}
|
||||
|
||||
public ItemInstance(ItemDynamicFieldGems gem)
|
||||
public ItemInstance(SocketedGem gem)
|
||||
{
|
||||
ItemID = gem.ItemId;
|
||||
|
||||
|
||||
@@ -141,7 +141,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt32(Dungeons.Count);
|
||||
_worldPacket.WriteInt32(Dungeons.Count);
|
||||
BlackList.Write(_worldPacket);
|
||||
|
||||
foreach (var dungeonInfo in Dungeons)
|
||||
@@ -158,7 +158,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt32(Player.Count);
|
||||
_worldPacket.WriteInt32(Player.Count);
|
||||
foreach (var blackList in Player)
|
||||
blackList.Write(_worldPacket);
|
||||
}
|
||||
@@ -176,9 +176,9 @@ namespace Game.Network.Packets
|
||||
|
||||
_worldPacket.WriteUInt8(SubType);
|
||||
_worldPacket.WriteUInt8(Reason);
|
||||
_worldPacket.WriteUInt32(Slots.Count);
|
||||
_worldPacket.WriteInt32(Slots.Count);
|
||||
_worldPacket.WriteUInt32(RequestedRoles);
|
||||
_worldPacket.WriteUInt32(SuspendedPlayers.Count);
|
||||
_worldPacket.WriteInt32(SuspendedPlayers.Count);
|
||||
|
||||
foreach (var slot in Slots)
|
||||
_worldPacket.WriteUInt32(slot);
|
||||
@@ -216,7 +216,7 @@ namespace Game.Network.Packets
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WritePackedGuid(Player);
|
||||
_worldPacket.WriteUInt32(RoleMask);
|
||||
_worldPacket.WriteUInt32((uint)RoleMask);
|
||||
_worldPacket.WriteBit(Accepted);
|
||||
_worldPacket.FlushBits();
|
||||
}
|
||||
@@ -234,10 +234,10 @@ namespace Game.Network.Packets
|
||||
{
|
||||
_worldPacket.WriteUInt8(PartyIndex);
|
||||
_worldPacket.WriteUInt8(RoleCheckStatus);
|
||||
_worldPacket.WriteUInt32(JoinSlots.Count);
|
||||
_worldPacket.WriteUInt32(BgQueueIDs.Count);
|
||||
_worldPacket.WriteUInt32(GroupFinderActivityID);
|
||||
_worldPacket.WriteUInt32(Members.Count);
|
||||
_worldPacket.WriteInt32(JoinSlots.Count);
|
||||
_worldPacket.WriteInt32(BgQueueIDs.Count);
|
||||
_worldPacket.WriteInt32(GroupFinderActivityID);
|
||||
_worldPacket.WriteInt32(Members.Count);
|
||||
|
||||
foreach (var slot in JoinSlots)
|
||||
_worldPacket.WriteUInt32(slot);
|
||||
@@ -273,8 +273,8 @@ namespace Game.Network.Packets
|
||||
|
||||
_worldPacket.WriteUInt8(Result);
|
||||
_worldPacket.WriteUInt8(ResultDetail);
|
||||
_worldPacket.WriteUInt32(BlackList.Count);
|
||||
_worldPacket.WriteUInt32(BlackListNames.Count);
|
||||
_worldPacket.WriteInt32(BlackList.Count);
|
||||
_worldPacket.WriteInt32(BlackListNames.Count);
|
||||
|
||||
foreach (LFGJoinBlackList blackList in BlackList)
|
||||
blackList.Write(_worldPacket);
|
||||
@@ -334,7 +334,7 @@ namespace Game.Network.Packets
|
||||
_worldPacket.WriteUInt32(ActualSlot);
|
||||
_worldPacket.WriteUInt32(RewardMoney);
|
||||
_worldPacket.WriteUInt32(AddedXP);
|
||||
_worldPacket.WriteUInt32(Rewards.Count);
|
||||
_worldPacket.WriteInt32(Rewards.Count);
|
||||
|
||||
foreach (var reward in Rewards)
|
||||
reward.Write(_worldPacket);
|
||||
@@ -373,7 +373,7 @@ namespace Game.Network.Packets
|
||||
_worldPacket.WriteUInt8(State);
|
||||
_worldPacket.WriteUInt32(CompletedMask);
|
||||
_worldPacket.WriteUInt32(EncounterMask);
|
||||
_worldPacket.WriteUInt32(Players.Count);
|
||||
_worldPacket.WriteInt32(Players.Count);
|
||||
_worldPacket.WriteUInt8(Unused);
|
||||
_worldPacket.WriteBit(ValidCompletedMask);
|
||||
_worldPacket.WriteBit(ProposalSilent);
|
||||
@@ -458,7 +458,7 @@ namespace Game.Network.Packets
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteBit(PlayerGuid.HasValue);
|
||||
data.WriteUInt32(Slot.Count);
|
||||
data.WriteInt32(Slot.Count);
|
||||
if (PlayerGuid.HasValue)
|
||||
data.WritePackedGuid(PlayerGuid.Value);
|
||||
|
||||
@@ -503,7 +503,7 @@ namespace Game.Network.Packets
|
||||
{
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteInt32(Mask);
|
||||
data.WriteUInt32(Mask);
|
||||
data.WriteUInt32(RewardMoney);
|
||||
data.WriteUInt32(RewardXP);
|
||||
data.WriteInt32(Item.Count);
|
||||
@@ -566,7 +566,7 @@ namespace Game.Network.Packets
|
||||
{
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteInt32(Slot);
|
||||
data.WriteUInt32(Slot);
|
||||
data.WriteInt32(CompletionQuantity);
|
||||
data.WriteInt32(CompletionLimit);
|
||||
data.WriteInt32(CompletionCurrencyID);
|
||||
@@ -579,7 +579,7 @@ namespace Game.Network.Packets
|
||||
data.WriteInt32(PurseQuantity);
|
||||
data.WriteInt32(PurseLimit);
|
||||
data.WriteInt32(Quantity);
|
||||
data.WriteInt32(CompletedMask);
|
||||
data.WriteUInt32(CompletedMask);
|
||||
data.WriteUInt32(EncounterMask);
|
||||
data.WriteInt32(ShortageReward.Count);
|
||||
data.WriteBit(FirstReward);
|
||||
@@ -658,7 +658,7 @@ namespace Game.Network.Packets
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WritePackedGuid(PlayerGuid);
|
||||
data.WriteUInt32(Slots.Count);
|
||||
data.WriteInt32(Slots.Count);
|
||||
|
||||
foreach (LFGJoinBlackListSlot lfgBlackListSlot in Slots)
|
||||
{
|
||||
@@ -702,7 +702,7 @@ namespace Game.Network.Packets
|
||||
data.WriteUInt32(Quantity);
|
||||
data.WriteInt32(BonusQuantity);
|
||||
if (RewardCurrency.HasValue)
|
||||
data.WriteInt32(RewardCurrency.Value);
|
||||
data.WriteUInt32(RewardCurrency.Value);
|
||||
}
|
||||
|
||||
public Optional<ItemInstance> RewardItem;
|
||||
@@ -723,7 +723,7 @@ namespace Game.Network.Packets
|
||||
data.WritePackedGuid(Target);
|
||||
data.WriteUInt32(TotalVotes);
|
||||
data.WriteUInt32(BootVotes);
|
||||
data.WriteInt32(TimeLeft);
|
||||
data.WriteUInt32(TimeLeft);
|
||||
data.WriteUInt32(VotesNeeded);
|
||||
data.WriteString(Reason);
|
||||
}
|
||||
@@ -775,7 +775,7 @@ namespace Game.Network.Packets
|
||||
{
|
||||
data.WritePackedGuid(RequesterGuid);
|
||||
data.WriteUInt32(Id);
|
||||
data.WriteUInt32(Type);
|
||||
data.WriteUInt32((uint)Type);
|
||||
data.WriteInt32(Time);
|
||||
}
|
||||
|
||||
|
||||
@@ -42,13 +42,13 @@ namespace Game.Network.Packets
|
||||
{
|
||||
_worldPacket.WritePackedGuid(Owner);
|
||||
_worldPacket.WritePackedGuid(LootObj);
|
||||
_worldPacket.WriteUInt8(FailureReason);
|
||||
_worldPacket.WriteUInt8((byte)FailureReason);
|
||||
_worldPacket.WriteUInt8(AcquireReason);
|
||||
_worldPacket.WriteUInt8(LootMethod);
|
||||
_worldPacket.WriteUInt8((byte)LootMethod);
|
||||
_worldPacket.WriteUInt8(Threshold);
|
||||
_worldPacket.WriteUInt32(Coins);
|
||||
_worldPacket.WriteUInt32(Items.Count);
|
||||
_worldPacket.WriteUInt32(Currencies.Count);
|
||||
_worldPacket.WriteInt32(Items.Count);
|
||||
_worldPacket.WriteInt32(Currencies.Count);
|
||||
_worldPacket.WriteBit(Acquired);
|
||||
_worldPacket.WriteBit(AELooting);
|
||||
_worldPacket.FlushBits();
|
||||
@@ -250,8 +250,8 @@ namespace Game.Network.Packets
|
||||
_worldPacket.WritePackedGuid(LootObj);
|
||||
_worldPacket.WriteInt32(MapID);
|
||||
_worldPacket.WriteUInt32(RollTime);
|
||||
_worldPacket.WriteUInt8(ValidRolls);
|
||||
_worldPacket.WriteUInt8(Method);
|
||||
_worldPacket.WriteUInt8((byte)ValidRolls);
|
||||
_worldPacket.WriteUInt8((byte)Method);
|
||||
Item.Write(_worldPacket);
|
||||
}
|
||||
|
||||
@@ -272,7 +272,7 @@ namespace Game.Network.Packets
|
||||
_worldPacket.WritePackedGuid(LootObj);
|
||||
_worldPacket.WritePackedGuid(Player);
|
||||
_worldPacket.WriteInt32(Roll);
|
||||
_worldPacket.WriteUInt8(RollType);
|
||||
_worldPacket.WriteUInt8((byte)RollType);
|
||||
Item.Write(_worldPacket);
|
||||
_worldPacket.WriteBit(Autopassed);
|
||||
_worldPacket.FlushBits();
|
||||
@@ -295,7 +295,7 @@ namespace Game.Network.Packets
|
||||
_worldPacket.WritePackedGuid(LootObj);
|
||||
_worldPacket.WritePackedGuid(Winner);
|
||||
_worldPacket.WriteInt32(Roll);
|
||||
_worldPacket.WriteUInt8(RollType);
|
||||
_worldPacket.WriteUInt8((byte)RollType);
|
||||
Item.Write(_worldPacket);
|
||||
_worldPacket.WriteBit(MainSpec);
|
||||
_worldPacket.FlushBits();
|
||||
@@ -366,7 +366,7 @@ namespace Game.Network.Packets
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WritePackedGuid(LootObj);
|
||||
_worldPacket.WriteUInt32(Players.Count);
|
||||
_worldPacket.WriteInt32(Players.Count);
|
||||
Players.ForEach(guid => _worldPacket.WritePackedGuid(guid));
|
||||
}
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt32(Mails.Count);
|
||||
_worldPacket.WriteInt32(Mails.Count);
|
||||
_worldPacket.WriteInt32(TotalNumRecords);
|
||||
|
||||
Mails.ForEach(p => p.Write(_worldPacket));
|
||||
@@ -317,8 +317,8 @@ namespace Game.Network.Packets
|
||||
Item = new ItemInstance(item);
|
||||
Count = item.GetCount();
|
||||
Charges = item.GetSpellCharges();
|
||||
MaxDurability = item.GetUInt32Value(ItemFields.MaxDurability);
|
||||
Durability = item.GetUInt32Value(ItemFields.Durability);
|
||||
MaxDurability = item.m_itemData.MaxDurability;
|
||||
Durability = item.m_itemData.Durability;
|
||||
Unlocked = !item.IsLocked();
|
||||
|
||||
for (EnchantmentSlot slot = 0; slot < EnchantmentSlot.MaxInspected; slot++)
|
||||
@@ -330,7 +330,7 @@ namespace Game.Network.Packets
|
||||
}
|
||||
|
||||
byte i = 0;
|
||||
foreach (ItemDynamicFieldGems gemData in item.GetGems())
|
||||
foreach (SocketedGem gemData in item.m_itemData.Gems)
|
||||
{
|
||||
if (gemData.ItemId != 0)
|
||||
{
|
||||
@@ -346,11 +346,11 @@ namespace Game.Network.Packets
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteUInt8(Position);
|
||||
data.WriteUInt32(AttachID);
|
||||
data.WriteInt32(Count);
|
||||
data.WriteInt32(AttachID);
|
||||
data.WriteUInt32(Count);
|
||||
data.WriteInt32(Charges);
|
||||
data.WriteInt32(MaxDurability);
|
||||
data.WriteInt32(Durability);
|
||||
data.WriteUInt32(MaxDurability);
|
||||
data.WriteUInt32(Durability);
|
||||
Item.Write(data);
|
||||
data.WriteBits(Enchants.Count, 4);
|
||||
data.WriteBits(Gems.Count, 2);
|
||||
@@ -423,7 +423,7 @@ namespace Game.Network.Packets
|
||||
data.WriteInt32(Flags);
|
||||
data.WriteFloat(DaysLeft);
|
||||
data.WriteInt32(MailTemplateID);
|
||||
data.WriteUInt32(Attachments.Count);
|
||||
data.WriteInt32(Attachments.Count);
|
||||
|
||||
data.WriteBit(SenderCharacter.HasValue);
|
||||
data.WriteBit(AltSenderID.HasValue);
|
||||
@@ -437,7 +437,7 @@ namespace Game.Network.Packets
|
||||
data.WritePackedGuid(SenderCharacter.Value);
|
||||
|
||||
if (AltSenderID.HasValue)
|
||||
data.WriteInt32(AltSenderID.Value);
|
||||
data.WriteUInt32(AltSenderID.Value);
|
||||
|
||||
data.WriteString(Subject);
|
||||
data.WriteString(Body);
|
||||
|
||||
@@ -94,8 +94,8 @@ namespace Game.Network.Packets
|
||||
_worldPacket.WritePackedTime(ServerTime);
|
||||
_worldPacket.WritePackedTime(GameTime);
|
||||
_worldPacket.WriteFloat(NewSpeed);
|
||||
_worldPacket.WriteUInt32(ServerTimeHolidayOffset);
|
||||
_worldPacket.WriteUInt32(GameTimeHolidayOffset);
|
||||
_worldPacket.WriteInt32(ServerTimeHolidayOffset);
|
||||
_worldPacket.WriteInt32(GameTimeHolidayOffset);
|
||||
}
|
||||
|
||||
public float NewSpeed;
|
||||
@@ -160,8 +160,8 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt32("Type");
|
||||
_worldPacket.WriteUInt32("MaxWeeklyQuantity");
|
||||
_worldPacket.WriteUInt32(Type);
|
||||
_worldPacket.WriteUInt32(MaxWeeklyQuantity);
|
||||
}
|
||||
|
||||
public uint MaxWeeklyQuantity;
|
||||
@@ -193,7 +193,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt32(Data.Count);
|
||||
_worldPacket.WriteInt32(Data.Count);
|
||||
|
||||
foreach (Record data in Data)
|
||||
{
|
||||
@@ -214,7 +214,7 @@ namespace Game.Network.Packets
|
||||
if (data.TrackedQuantity.HasValue)
|
||||
_worldPacket.WriteUInt32(data.TrackedQuantity.Value);
|
||||
if (data.MaxQuantity.HasValue)
|
||||
_worldPacket.WriteUInt32(data.MaxQuantity.Value);
|
||||
_worldPacket.WriteInt32(data.MaxQuantity.Value);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -424,7 +424,7 @@ namespace Game.Network.Packets
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteInt32(DifficultyID);
|
||||
_worldPacket.WriteUInt8(Legacy);
|
||||
_worldPacket.WriteUInt8((byte)(Legacy ? 1 : 0));
|
||||
}
|
||||
|
||||
public int DifficultyID;
|
||||
@@ -516,7 +516,7 @@ namespace Game.Network.Packets
|
||||
_worldPacket.WriteBit(IsGossipTriggered);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
_worldPacket.WriteUInt32(CemeteryID.Count);
|
||||
_worldPacket.WriteInt32(CemeteryID.Count);
|
||||
foreach (uint cemetery in CemeteryID)
|
||||
_worldPacket.WriteUInt32(cemetery);
|
||||
}
|
||||
@@ -550,7 +550,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt32(WeatherID);
|
||||
_worldPacket.WriteUInt32((uint)WeatherID);
|
||||
_worldPacket.WriteFloat(Intensity);
|
||||
_worldPacket.WriteBit(Abrupt);
|
||||
|
||||
@@ -585,13 +585,28 @@ namespace Game.Network.Packets
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt32(AnimKitID);
|
||||
_worldPacket.WriteUInt8(State);
|
||||
_worldPacket.WriteUInt8((byte)State);
|
||||
}
|
||||
|
||||
uint AnimKitID;
|
||||
UnitStandStateType State;
|
||||
}
|
||||
|
||||
public class SetAnimTier : ServerPacket
|
||||
{
|
||||
public SetAnimTier() : base(ServerOpcodes.SetAnimTier, ConnectionType.Instance) { }
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WritePackedGuid(Unit);
|
||||
_worldPacket.WriteBits(Tier, 3);
|
||||
_worldPacket.FlushBits();
|
||||
}
|
||||
|
||||
public ObjectGuid Unit;
|
||||
public int Tier;
|
||||
}
|
||||
|
||||
public class StartMirrorTimer : ServerPacket
|
||||
{
|
||||
public StartMirrorTimer(MirrorTimerType timer, int value, int maxValue, int scale, int spellID, bool paused) : base(ServerOpcodes.StartMirrorTimer)
|
||||
@@ -606,7 +621,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteInt32(Timer);
|
||||
_worldPacket.WriteInt32((int)Timer);
|
||||
_worldPacket.WriteInt32(Value);
|
||||
_worldPacket.WriteInt32(MaxValue);
|
||||
_worldPacket.WriteInt32(Scale);
|
||||
@@ -633,7 +648,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteInt32(Timer);
|
||||
_worldPacket.WriteInt32((int)Timer);
|
||||
_worldPacket.WriteBit(Paused);
|
||||
_worldPacket.FlushBits();
|
||||
}
|
||||
@@ -651,7 +666,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteInt32(Timer);
|
||||
_worldPacket.WriteInt32((int)Timer);
|
||||
}
|
||||
|
||||
public MirrorTimerType Timer;
|
||||
@@ -769,15 +784,15 @@ namespace Game.Network.Packets
|
||||
{
|
||||
_worldPacket.WritePackedGuid(Client);
|
||||
Phaseshift.Write(_worldPacket);
|
||||
_worldPacket.WriteUInt32(VisibleMapIDs.Count * 2); // size in bytes
|
||||
_worldPacket.WriteInt32(VisibleMapIDs.Count * 2); // size in bytes
|
||||
foreach (ushort visibleMapId in VisibleMapIDs)
|
||||
_worldPacket.WriteUInt16(visibleMapId); // Active terrain swap map id
|
||||
|
||||
_worldPacket.WriteUInt32(PreloadMapIDs.Count * 2); // size in bytes
|
||||
_worldPacket.WriteInt32(PreloadMapIDs.Count * 2); // size in bytes
|
||||
foreach (ushort preloadMapId in PreloadMapIDs)
|
||||
_worldPacket.WriteUInt16(preloadMapId); // Inactive terrain swap map id
|
||||
|
||||
_worldPacket.WriteUInt32(UiMapPhaseIDs.Count * 2); // size in bytes
|
||||
_worldPacket.WriteInt32(UiMapPhaseIDs.Count * 2); // size in bytes
|
||||
foreach (ushort uiMapPhaseId in UiMapPhaseIDs)
|
||||
_worldPacket.WriteUInt16(uiMapPhaseId); // UI map id, WorldMapArea.db2, controls map display
|
||||
}
|
||||
@@ -993,7 +1008,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt32(CUFProfiles.Count);
|
||||
_worldPacket.WriteInt32(CUFProfiles.Count);
|
||||
|
||||
foreach (CUFProfile cufProfile in CUFProfiles)
|
||||
{
|
||||
@@ -1134,7 +1149,7 @@ namespace Game.Network.Packets
|
||||
_worldPacket.WriteUInt32(item.Key);
|
||||
|
||||
foreach (var flags in Heirlooms)
|
||||
_worldPacket.WriteUInt32(flags.Value.flags);
|
||||
_worldPacket.WriteUInt32((uint)flags.Value.flags);
|
||||
}
|
||||
|
||||
public bool IsFullUpdate;
|
||||
@@ -1211,7 +1226,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt32(Type);
|
||||
_worldPacket.WriteUInt32((uint)Type);
|
||||
_worldPacket.WriteUInt32(TimeRemaining);
|
||||
_worldPacket.WriteUInt32(TotalTime);
|
||||
}
|
||||
@@ -1240,7 +1255,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt32(Error);
|
||||
_worldPacket.WriteUInt32((uint)Error);
|
||||
_worldPacket.WriteBit(Arg.HasValue);
|
||||
_worldPacket.WriteBit(Arg2.HasValue);
|
||||
_worldPacket.FlushBits();
|
||||
@@ -1264,7 +1279,7 @@ namespace Game.Network.Packets
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteBit(IsFullUpdate);
|
||||
_worldPacket.WriteUInt32(Mounts.Count);
|
||||
_worldPacket.WriteInt32(Mounts.Count);
|
||||
|
||||
foreach (var spell in Mounts)
|
||||
{
|
||||
@@ -1329,7 +1344,7 @@ namespace Game.Network.Packets
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteUInt32(PhaseShiftFlags);
|
||||
data.WriteUInt32(Phases.Count);
|
||||
data.WriteInt32(Phases.Count);
|
||||
data.WritePackedGuid(PersonalGUID);
|
||||
foreach (PhaseShiftDataPhase phaseShiftDataPhase in Phases)
|
||||
phaseShiftDataPhase.Write(data);
|
||||
|
||||
@@ -201,7 +201,7 @@ namespace Game.Network.Packets
|
||||
{
|
||||
data.WriteUInt32((uint)moveSpline.splineflags.Flags); // SplineFlags
|
||||
data.WriteInt32(moveSpline.timePassed()); // Elapsed
|
||||
data.WriteUInt32(moveSpline.Duration()); // Duration
|
||||
data.WriteInt32(moveSpline.Duration()); // Duration
|
||||
data.WriteFloat(1.0f); // DurationModifier
|
||||
data.WriteFloat(1.0f); // NextDurationModifier
|
||||
data.WriteBits((byte)moveSpline.facing.type, 2); // Face
|
||||
@@ -240,7 +240,7 @@ namespace Game.Network.Packets
|
||||
}
|
||||
|
||||
if (hasFadeObjectTime)
|
||||
data.WriteUInt32(moveSpline.effect_start_time); // FadeObjectTime
|
||||
data.WriteInt32(moveSpline.effect_start_time); // FadeObjectTime
|
||||
|
||||
foreach (var vec in moveSpline.getPath())
|
||||
data.WriteVector3(vec);
|
||||
@@ -256,7 +256,7 @@ namespace Game.Network.Packets
|
||||
if (moveSpline.splineflags.hasFlag(SplineFlag.Parabolic))
|
||||
{
|
||||
data.WriteFloat(moveSpline.vertical_acceleration);
|
||||
data.WriteUInt32(moveSpline.effect_start_time);
|
||||
data.WriteInt32(moveSpline.effect_start_time);
|
||||
data.WriteUInt32(0); // Duration (override)
|
||||
}
|
||||
}
|
||||
@@ -316,7 +316,7 @@ namespace Game.Network.Packets
|
||||
|
||||
if (splineFlags.hasFlag(SplineFlag.Animation))
|
||||
{
|
||||
movementSpline.AnimTier = splineFlags.getAnimationId();
|
||||
movementSpline.AnimTier = splineFlags.getAnimTier();
|
||||
movementSpline.TierTransStartTime = (uint)moveSpline.effect_start_time;
|
||||
}
|
||||
|
||||
@@ -911,7 +911,7 @@ namespace Game.Network.Packets
|
||||
_worldPacket.WritePackedGuid(SummonerGUID);
|
||||
_worldPacket.WriteUInt32(SummonerVirtualRealmAddress);
|
||||
_worldPacket.WriteInt32(AreaID);
|
||||
_worldPacket.WriteUInt8(Reason);
|
||||
_worldPacket.WriteUInt8((byte)Reason);
|
||||
_worldPacket.WriteBit(SkipStartingArea);
|
||||
_worldPacket.FlushBits();
|
||||
}
|
||||
@@ -978,7 +978,7 @@ namespace Game.Network.Packets
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WritePackedGuid(MoverGUID);
|
||||
_worldPacket.WriteUInt32(StateChanges.Count);
|
||||
_worldPacket.WriteInt32(StateChanges.Count);
|
||||
foreach (MoveStateChange stateChange in StateChanges)
|
||||
stateChange.Write(_worldPacket);
|
||||
}
|
||||
@@ -1010,7 +1010,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteUInt16(MessageID);
|
||||
data.WriteUInt16((ushort)MessageID);
|
||||
data.WriteUInt32(SequenceIndex);
|
||||
data.WriteBit(Speed.HasValue);
|
||||
data.WriteBit(KnockBack.HasValue);
|
||||
@@ -1076,7 +1076,7 @@ namespace Game.Network.Packets
|
||||
{
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteUInt32(FilterKeys.Count);
|
||||
data.WriteInt32(FilterKeys.Count);
|
||||
data.WriteFloat(BaseSpeed);
|
||||
data.WriteInt16(StartOffset);
|
||||
data.WriteFloat(DistToPrevFilterKey);
|
||||
|
||||
@@ -59,8 +59,8 @@ namespace Game.Network.Packets
|
||||
foreach (ClientGossipOptions options in GossipOptions)
|
||||
{
|
||||
_worldPacket.WriteInt32(options.ClientOption);
|
||||
_worldPacket.WriteInt8(options.OptionNPC);
|
||||
_worldPacket.WriteInt8(options.OptionFlags);
|
||||
_worldPacket.WriteUInt8(options.OptionNPC);
|
||||
_worldPacket.WriteUInt8(options.OptionFlags);
|
||||
_worldPacket.WriteInt32(options.OptionCost);
|
||||
|
||||
_worldPacket.WriteBits(options.Text.GetByteCount(), 12);
|
||||
@@ -155,16 +155,16 @@ namespace Game.Network.Packets
|
||||
_worldPacket.WriteInt32(Spells.Count);
|
||||
foreach (TrainerListSpell spell in Spells)
|
||||
{
|
||||
_worldPacket.WriteInt32(spell.SpellID);
|
||||
_worldPacket.WriteInt32(spell.MoneyCost);
|
||||
_worldPacket.WriteInt32(spell.ReqSkillLine);
|
||||
_worldPacket.WriteInt32(spell.ReqSkillRank);
|
||||
_worldPacket.WriteUInt32(spell.SpellID);
|
||||
_worldPacket.WriteUInt32(spell.MoneyCost);
|
||||
_worldPacket.WriteUInt32(spell.ReqSkillLine);
|
||||
_worldPacket.WriteUInt32(spell.ReqSkillRank);
|
||||
|
||||
for (uint i = 0; i < SharedConst.MaxTrainerspellAbilityReqs; ++i)
|
||||
_worldPacket.WriteInt32(spell.ReqAbility[i]);
|
||||
_worldPacket.WriteUInt32(spell.ReqAbility[i]);
|
||||
|
||||
_worldPacket.WriteInt8(spell.Usable);
|
||||
_worldPacket.WriteInt8(spell.ReqLevel);
|
||||
_worldPacket.WriteUInt8((byte)spell.Usable);
|
||||
_worldPacket.WriteUInt8(spell.ReqLevel);
|
||||
}
|
||||
|
||||
_worldPacket.WriteBits(Greeting.GetByteCount(), 11);
|
||||
@@ -276,7 +276,7 @@ namespace Game.Network.Packets
|
||||
{
|
||||
_worldPacket.WritePackedGuid(TrainerGUID);
|
||||
_worldPacket.WriteUInt32(SpellID);
|
||||
_worldPacket.WriteUInt32(TrainerFailedReason);
|
||||
_worldPacket.WriteUInt32((uint)TrainerFailedReason);
|
||||
}
|
||||
|
||||
public ObjectGuid TrainerGUID;
|
||||
@@ -323,7 +323,7 @@ namespace Game.Network.Packets
|
||||
{
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteUInt32(MuID);
|
||||
data.WriteInt32(MuID);
|
||||
data.WriteInt32(Type);
|
||||
data.WriteInt32(Quantity);
|
||||
data.WriteUInt64(Price);
|
||||
|
||||
@@ -110,7 +110,7 @@ namespace Game.Network.Packets
|
||||
_worldPacket.WritePackedGuid(InviterGUID);
|
||||
_worldPacket.WritePackedGuid(InviterBNetAccountId);
|
||||
_worldPacket.WriteUInt16(Unk1);
|
||||
_worldPacket.WriteInt32(ProposedRoles);
|
||||
_worldPacket.WriteUInt32(ProposedRoles);
|
||||
_worldPacket.WriteInt32(LfgSlots.Count);
|
||||
_worldPacket.WriteInt32(LfgCompletedMask);
|
||||
|
||||
@@ -249,7 +249,7 @@ namespace Game.Network.Packets
|
||||
|
||||
if (!player.IsAlive())
|
||||
{
|
||||
if (player.HasFlag(PlayerFields.Flags, PlayerFlags.Ghost))
|
||||
if (player.HasPlayerFlag(PlayerFlags.Ghost))
|
||||
MemberStats.Status |= GroupMemberOnlineStatus.Ghost;
|
||||
else
|
||||
MemberStats.Status |= GroupMemberOnlineStatus.Dead;
|
||||
@@ -286,9 +286,9 @@ namespace Game.Network.Packets
|
||||
MemberStats.PositionY = (short)(player.GetPositionY());
|
||||
MemberStats.PositionZ = (short)(player.GetPositionZ());
|
||||
|
||||
MemberStats.SpecID = (ushort)player.GetUInt32Value(PlayerFields.CurrentSpecId);
|
||||
MemberStats.PartyType[0] = (sbyte)(player.GetByteValue(PlayerFields.Bytes3, PlayerFieldOffsets.Bytes3OffsetPartyType) & 0xF);
|
||||
MemberStats.PartyType[1] = (sbyte)(player.GetByteValue(PlayerFields.Bytes3, PlayerFieldOffsets.Bytes3OffsetPartyType) >> 4);
|
||||
MemberStats.SpecID = (ushort)player.GetPrimarySpecialization();
|
||||
MemberStats.PartyType[0] = (sbyte)(player.m_playerData.PartyType & 0xF);
|
||||
MemberStats.PartyType[1] = (sbyte)(player.m_playerData.PartyType >> 4);
|
||||
MemberStats.WmoGroupID = 0;
|
||||
MemberStats.WmoDoodadPlacementID = 0;
|
||||
|
||||
@@ -741,14 +741,14 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt16(PartyFlags);
|
||||
_worldPacket.WriteUInt16((ushort)PartyFlags);
|
||||
_worldPacket.WriteUInt8(PartyIndex);
|
||||
_worldPacket.WriteUInt8(PartyType);
|
||||
_worldPacket.WriteUInt8((byte)PartyType);
|
||||
_worldPacket.WriteInt32(MyIndex);
|
||||
_worldPacket.WritePackedGuid(PartyGUID);
|
||||
_worldPacket.WriteInt32(SequenceNum);
|
||||
_worldPacket.WritePackedGuid(LeaderGUID);
|
||||
_worldPacket.WriteUInt32(PlayerList.Count);
|
||||
_worldPacket.WriteInt32(PlayerList.Count);
|
||||
_worldPacket.WriteBit(LfgInfos.HasValue);
|
||||
_worldPacket.WriteBit(LootSettings.HasValue);
|
||||
_worldPacket.WriteBit(DifficultySettings.HasValue);
|
||||
@@ -905,8 +905,8 @@ namespace Game.Network.Packets
|
||||
{
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteUInt32(PhaseShiftFlags);
|
||||
data.WriteUInt32(List.Count);
|
||||
data.WriteInt32(PhaseShiftFlags);
|
||||
data.WriteInt32(List.Count);
|
||||
data.WritePackedGuid(PersonalGUID);
|
||||
|
||||
foreach (PartyMemberPhase phase in List)
|
||||
@@ -944,7 +944,7 @@ namespace Game.Network.Packets
|
||||
data.WriteInt32(ModelId);
|
||||
data.WriteInt32(CurrentHealth);
|
||||
data.WriteInt32(MaxHealth);
|
||||
data.WriteUInt32(Auras.Count);
|
||||
data.WriteInt32(Auras.Count);
|
||||
Auras.ForEach(p => p.Write(data));
|
||||
|
||||
data.WriteBits(Name.GetByteCount(), 8);
|
||||
@@ -969,9 +969,9 @@ namespace Game.Network.Packets
|
||||
for (byte i = 0; i < 2; i++)
|
||||
data.WriteInt8(PartyType[i]);
|
||||
|
||||
data.WriteInt16(Status);
|
||||
data.WriteInt16((short)Status);
|
||||
data.WriteUInt8(PowerType);
|
||||
data.WriteInt16(PowerDisplayID);
|
||||
data.WriteInt16((short)PowerDisplayID);
|
||||
data.WriteInt32(CurrentHealth);
|
||||
data.WriteInt32(MaxHealth);
|
||||
data.WriteUInt16(CurrentPower);
|
||||
@@ -1036,7 +1036,7 @@ namespace Game.Network.Packets
|
||||
data.WriteBit(FromSocialQueue);
|
||||
data.WriteBit(VoiceChatSilenced);
|
||||
data.WritePackedGuid(GUID);
|
||||
data.WriteUInt8(Status);
|
||||
data.WriteUInt8((byte)Status);
|
||||
data.WriteUInt8(Subgroup);
|
||||
data.WriteUInt8(Flags);
|
||||
data.WriteUInt8(RolesAssigned);
|
||||
|
||||
@@ -93,14 +93,14 @@ namespace Game.Network.Packets
|
||||
_worldPacket.WriteUInt16(Specialization);
|
||||
_worldPacket.WriteUInt32(TimeLimit);
|
||||
_worldPacket.WriteUInt16((ushort)((byte)CommandState | (Flag << 16)));
|
||||
_worldPacket.WriteUInt8(ReactState);
|
||||
_worldPacket.WriteUInt8((byte)ReactState);
|
||||
|
||||
foreach (uint actionButton in ActionButtons)
|
||||
_worldPacket.WriteUInt32(actionButton);
|
||||
|
||||
_worldPacket.WriteUInt32(Actions.Count);
|
||||
_worldPacket.WriteUInt32(Cooldowns.Count);
|
||||
_worldPacket.WriteUInt32(SpellHistory.Count);
|
||||
_worldPacket.WriteInt32(Actions.Count);
|
||||
_worldPacket.WriteInt32(Cooldowns.Count);
|
||||
_worldPacket.WriteInt32(SpellHistory.Count);
|
||||
|
||||
foreach (uint action in Actions)
|
||||
_worldPacket.WriteUInt32(action);
|
||||
@@ -116,8 +116,8 @@ namespace Game.Network.Packets
|
||||
|
||||
foreach (PetSpellHistory history in SpellHistory)
|
||||
{
|
||||
_worldPacket.WriteInt32(history.CategoryID);
|
||||
_worldPacket.WriteInt32(history.RecoveryTime);
|
||||
_worldPacket.WriteUInt32(history.CategoryID);
|
||||
_worldPacket.WriteUInt32(history.RecoveryTime);
|
||||
_worldPacket.WriteFloat(history.ChargeModRate);
|
||||
_worldPacket.WriteInt8(history.ConsumedCharges);
|
||||
}
|
||||
@@ -146,7 +146,7 @@ namespace Game.Network.Packets
|
||||
{
|
||||
_worldPacket.WritePackedGuid(StableMaster);
|
||||
|
||||
_worldPacket.WriteUInt32(Pets.Count);
|
||||
_worldPacket.WriteInt32(Pets.Count);
|
||||
foreach (PetStableInfo pet in Pets)
|
||||
{
|
||||
_worldPacket.WriteUInt32(pet.PetSlot);
|
||||
@@ -154,7 +154,7 @@ namespace Game.Network.Packets
|
||||
_worldPacket.WriteUInt32(pet.CreatureID);
|
||||
_worldPacket.WriteUInt32(pet.DisplayID);
|
||||
_worldPacket.WriteUInt32(pet.ExperienceLevel);
|
||||
_worldPacket.WriteUInt8(pet.PetFlags);
|
||||
_worldPacket.WriteUInt8((byte)pet.PetFlags);
|
||||
_worldPacket.WriteBits(pet.PetName.GetByteCount(), 8);
|
||||
_worldPacket.WriteString(pet.PetName);
|
||||
}
|
||||
@@ -170,7 +170,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket .WriteUInt32(Spells.Count);
|
||||
_worldPacket.WriteInt32(Spells.Count);
|
||||
foreach (uint spell in Spells)
|
||||
_worldPacket.WriteUInt32(spell);
|
||||
}
|
||||
@@ -184,7 +184,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt32(Spells);
|
||||
_worldPacket.WriteInt32(Spells.Count);
|
||||
foreach (uint spell in Spells)
|
||||
_worldPacket.WriteUInt32(spell);
|
||||
}
|
||||
@@ -198,11 +198,11 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt8(Result);
|
||||
_worldPacket.WriteUInt8((byte)Result);
|
||||
_worldPacket.WritePackedGuid(RenameData.PetGUID);
|
||||
_worldPacket.WriteInt32(RenameData.PetNumber);
|
||||
|
||||
_worldPacket.WriteUInt8(RenameData.NewName.GetByteCount());
|
||||
_worldPacket.WriteUInt8((byte)RenameData.NewName.GetByteCount());
|
||||
|
||||
_worldPacket.WriteBit(RenameData.HasDeclinedNames);
|
||||
|
||||
@@ -295,7 +295,7 @@ namespace Game.Network.Packets
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WritePackedGuid(UnitGUID);
|
||||
_worldPacket.WriteUInt32(Action);
|
||||
_worldPacket.WriteUInt32((uint)Action);
|
||||
}
|
||||
|
||||
public ObjectGuid UnitGUID;
|
||||
@@ -309,7 +309,7 @@ namespace Game.Network.Packets
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt32(SpellID);
|
||||
_worldPacket.WriteUInt8(Response);
|
||||
_worldPacket.WriteUInt8((byte)Response);
|
||||
}
|
||||
|
||||
public uint SpellID;
|
||||
|
||||
@@ -124,7 +124,7 @@ namespace Game.Network.Packets
|
||||
_worldPacket.WritePackedGuid(OwnerAccountID);
|
||||
_worldPacket.WriteInt32(PetitionID);
|
||||
|
||||
_worldPacket.WriteUInt32(Signatures.Count);
|
||||
_worldPacket.WriteInt32(Signatures.Count);
|
||||
foreach (PetitionSignature signature in Signatures)
|
||||
{
|
||||
_worldPacket.WritePackedGuid(signature.Signer);
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteInt8(Result);
|
||||
_worldPacket.WriteInt8((sbyte)Result);
|
||||
_worldPacket.WritePackedGuid(Player);
|
||||
|
||||
if (Result == ResponseCodes.Success)
|
||||
@@ -112,7 +112,7 @@ namespace Game.Network.Packets
|
||||
for (var i = 0; i < SharedConst.MaxCreatureKillCredit; ++i)
|
||||
_worldPacket.WriteUInt32(Stats.ProxyCreatureID[i]);
|
||||
|
||||
_worldPacket.WriteUInt32(Stats.Display.CreatureDisplay.Count);
|
||||
_worldPacket.WriteInt32(Stats.Display.CreatureDisplay.Count);
|
||||
_worldPacket.WriteFloat(Stats.Display.TotalProbability);
|
||||
|
||||
foreach (CreatureXDisplay display in Stats.Display.CreatureDisplay)
|
||||
@@ -125,11 +125,11 @@ namespace Game.Network.Packets
|
||||
_worldPacket.WriteFloat(Stats.HpMulti);
|
||||
_worldPacket.WriteFloat(Stats.EnergyMulti);
|
||||
|
||||
_worldPacket.WriteUInt32(Stats.QuestItems.Count);
|
||||
_worldPacket.WriteInt32(Stats.QuestItems.Count);
|
||||
_worldPacket.WriteUInt32(Stats.CreatureMovementInfoID);
|
||||
_worldPacket.WriteInt32(Stats.HealthScalingExpansion);
|
||||
_worldPacket.WriteUInt32(Stats.RequiredExpansion);
|
||||
_worldPacket.WriteInt32(Stats.VignetteID);
|
||||
_worldPacket.WriteUInt32(Stats.VignetteID);
|
||||
_worldPacket.WriteInt32(Stats.Class);
|
||||
_worldPacket.WriteFloat(Stats.FadeRegionRadius);
|
||||
_worldPacket.WriteInt32(Stats.WidgetSetID);
|
||||
@@ -145,7 +145,7 @@ namespace Game.Network.Packets
|
||||
_worldPacket.WriteCString(Stats.CursorName);
|
||||
|
||||
foreach (var questItem in Stats.QuestItems)
|
||||
_worldPacket.WriteInt32(questItem);
|
||||
_worldPacket.WriteUInt32(questItem);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -180,7 +180,7 @@ namespace Game.Network.Packets
|
||||
|
||||
if (Allow)
|
||||
{
|
||||
_worldPacket.WriteUInt32(Pages.Count);
|
||||
_worldPacket.WriteInt32(Pages.Count);
|
||||
foreach (PageTextInfo pageText in Pages)
|
||||
pageText.Write(_worldPacket);
|
||||
}
|
||||
@@ -292,7 +292,7 @@ namespace Game.Network.Packets
|
||||
statsData.WriteInt32(Stats.Data[i]);
|
||||
|
||||
statsData.WriteFloat(Stats.Size);
|
||||
statsData.WriteUInt8(Stats.QuestItems.Count);
|
||||
statsData.WriteUInt8((byte)Stats.QuestItems.Count);
|
||||
foreach (uint questItem in Stats.QuestItems)
|
||||
statsData.WriteUInt32(questItem);
|
||||
|
||||
@@ -389,7 +389,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteInt32(CurrentTime);
|
||||
_worldPacket.WriteUInt32((uint)CurrentTime);
|
||||
}
|
||||
|
||||
public long CurrentTime;
|
||||
@@ -422,7 +422,7 @@ namespace Game.Network.Packets
|
||||
|
||||
foreach (QuestPOIData questPOIData in QuestPOIDataStats)
|
||||
{
|
||||
_worldPacket.WriteInt32(questPOIData.QuestID);
|
||||
_worldPacket.WriteUInt32(questPOIData.QuestID);
|
||||
|
||||
_worldPacket.WriteInt32(questPOIData.QuestPOIBlobDataStats.Count);
|
||||
|
||||
@@ -478,12 +478,12 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt32(QuestCompletionNPCs.Count);
|
||||
_worldPacket.WriteInt32(QuestCompletionNPCs.Count);
|
||||
foreach (var quest in QuestCompletionNPCs)
|
||||
{
|
||||
_worldPacket.WriteUInt32(quest.QuestID);
|
||||
|
||||
_worldPacket.WriteUInt32(quest.NPCs.Count);
|
||||
_worldPacket.WriteInt32(quest.NPCs.Count);
|
||||
foreach (var npc in quest.NPCs)
|
||||
_worldPacket.WriteUInt32(npc);
|
||||
}
|
||||
@@ -636,7 +636,7 @@ namespace Game.Network.Packets
|
||||
BnetAccountID = player.GetSession().GetBattlenetAccountGUID();
|
||||
Name = player.GetName();
|
||||
RaceID = player.GetRace();
|
||||
Sex = (Gender)player.GetByteValue(PlayerFields.Bytes3, PlayerFieldOffsets.Bytes3OffsetGender);
|
||||
Sex = (Gender)(byte)player.m_playerData.NativeSex;
|
||||
ClassID = player.GetClass();
|
||||
Level = (byte)player.getLevel();
|
||||
|
||||
@@ -682,9 +682,9 @@ namespace Game.Network.Packets
|
||||
data.WritePackedGuid(GuidActual);
|
||||
data.WriteUInt64(GuildClubMemberID);
|
||||
data.WriteUInt32(VirtualRealmAddress);
|
||||
data.WriteUInt8(RaceID);
|
||||
data.WriteUInt8(Sex);
|
||||
data.WriteUInt8(ClassID);
|
||||
data.WriteUInt8((byte)RaceID);
|
||||
data.WriteUInt8((byte)Sex);
|
||||
data.WriteUInt8((byte)ClassID);
|
||||
data.WriteUInt8(Level);
|
||||
data.WriteString(Name);
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ namespace Game.Network.Packets
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WritePackedGuid(QuestGiver.Guid);
|
||||
_worldPacket.WriteUInt32(QuestGiver.Status);
|
||||
_worldPacket.WriteUInt32((uint)QuestGiver.Status);
|
||||
}
|
||||
|
||||
public QuestGiverInfo QuestGiver;
|
||||
@@ -68,7 +68,7 @@ namespace Game.Network.Packets
|
||||
foreach (QuestGiverInfo questGiver in QuestGiver)
|
||||
{
|
||||
_worldPacket.WritePackedGuid(questGiver.Guid);
|
||||
_worldPacket.WriteUInt32(questGiver.Status);
|
||||
_worldPacket.WriteUInt32((uint)questGiver.Status);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -114,90 +114,90 @@ namespace Game.Network.Packets
|
||||
|
||||
if (Allow)
|
||||
{
|
||||
_worldPacket.WriteInt32(Info.QuestID);
|
||||
_worldPacket.WriteUInt32(Info.QuestID);
|
||||
_worldPacket.WriteInt32(Info.QuestType);
|
||||
_worldPacket.WriteInt32(Info.QuestLevel);
|
||||
_worldPacket.WriteInt32(Info.QuestScalingFactionGroup);
|
||||
_worldPacket.WriteInt32(Info.QuestMaxScalingLevel);
|
||||
_worldPacket.WriteInt32(Info.QuestPackageID);
|
||||
_worldPacket.WriteUInt32(Info.QuestPackageID);
|
||||
_worldPacket.WriteInt32(Info.QuestMinLevel);
|
||||
_worldPacket.WriteInt32(Info.QuestSortID);
|
||||
_worldPacket.WriteInt32(Info.QuestInfoID);
|
||||
_worldPacket.WriteInt32(Info.SuggestedGroupNum);
|
||||
_worldPacket.WriteInt32(Info.RewardNextQuest);
|
||||
_worldPacket.WriteInt32(Info.RewardXPDifficulty);
|
||||
_worldPacket.WriteUInt32(Info.QuestInfoID);
|
||||
_worldPacket.WriteUInt32(Info.SuggestedGroupNum);
|
||||
_worldPacket.WriteUInt32(Info.RewardNextQuest);
|
||||
_worldPacket.WriteUInt32(Info.RewardXPDifficulty);
|
||||
_worldPacket.WriteFloat(Info.RewardXPMultiplier);
|
||||
_worldPacket.WriteInt32(Info.RewardMoney);
|
||||
_worldPacket.WriteInt32(Info.RewardMoneyDifficulty);
|
||||
_worldPacket.WriteUInt32(Info.RewardMoneyDifficulty);
|
||||
_worldPacket.WriteFloat(Info.RewardMoneyMultiplier);
|
||||
_worldPacket.WriteInt32(Info.RewardBonusMoney);
|
||||
_worldPacket.WriteUInt32(Info.RewardBonusMoney);
|
||||
|
||||
foreach (uint id in Info.RewardDisplaySpell)
|
||||
_worldPacket.WriteInt32(id);
|
||||
_worldPacket.WriteUInt32(id);
|
||||
|
||||
_worldPacket.WriteInt32(Info.RewardSpell);
|
||||
_worldPacket.WriteInt32(Info.RewardHonor);
|
||||
_worldPacket.WriteUInt32(Info.RewardSpell);
|
||||
_worldPacket.WriteUInt32(Info.RewardHonor);
|
||||
_worldPacket.WriteFloat(Info.RewardKillHonor);
|
||||
_worldPacket.WriteInt32(Info.RewardArtifactXPDifficulty);
|
||||
_worldPacket.WriteFloat(Info.RewardArtifactXPMultiplier);
|
||||
_worldPacket.WriteInt32(Info.RewardArtifactCategoryID);
|
||||
_worldPacket.WriteInt32(Info.StartItem);
|
||||
_worldPacket.WriteUInt32(Info.StartItem);
|
||||
_worldPacket.WriteUInt32(Info.Flags);
|
||||
_worldPacket.WriteUInt32(Info.FlagsEx);
|
||||
_worldPacket.WriteUInt32(Info.FlagsEx2);
|
||||
|
||||
for (uint i = 0; i < SharedConst.QuestRewardItemCount; ++i)
|
||||
{
|
||||
_worldPacket.WriteInt32(Info.RewardItems[i]);
|
||||
_worldPacket.WriteInt32(Info.RewardAmount[i]);
|
||||
_worldPacket.WriteUInt32(Info.RewardItems[i]);
|
||||
_worldPacket.WriteUInt32(Info.RewardAmount[i]);
|
||||
_worldPacket.WriteInt32(Info.ItemDrop[i]);
|
||||
_worldPacket.WriteInt32(Info.ItemDropQuantity[i]);
|
||||
}
|
||||
|
||||
for (uint i = 0; i < SharedConst.QuestRewardChoicesCount; ++i)
|
||||
{
|
||||
_worldPacket.WriteInt32(Info.UnfilteredChoiceItems[i].ItemID);
|
||||
_worldPacket.WriteInt32(Info.UnfilteredChoiceItems[i].Quantity);
|
||||
_worldPacket.WriteInt32(Info.UnfilteredChoiceItems[i].DisplayID);
|
||||
_worldPacket.WriteUInt32(Info.UnfilteredChoiceItems[i].ItemID);
|
||||
_worldPacket.WriteUInt32(Info.UnfilteredChoiceItems[i].Quantity);
|
||||
_worldPacket.WriteUInt32(Info.UnfilteredChoiceItems[i].DisplayID);
|
||||
}
|
||||
|
||||
_worldPacket.WriteInt32(Info.POIContinent);
|
||||
_worldPacket.WriteUInt32(Info.POIContinent);
|
||||
_worldPacket.WriteFloat(Info.POIx);
|
||||
_worldPacket.WriteFloat(Info.POIy);
|
||||
_worldPacket.WriteInt32(Info.POIPriority);
|
||||
_worldPacket.WriteUInt32(Info.POIPriority);
|
||||
|
||||
_worldPacket.WriteInt32(Info.RewardTitle);
|
||||
_worldPacket.WriteUInt32(Info.RewardTitle);
|
||||
_worldPacket.WriteInt32(Info.RewardArenaPoints);
|
||||
_worldPacket.WriteInt32(Info.RewardSkillLineID);
|
||||
_worldPacket.WriteInt32(Info.RewardNumSkillUps);
|
||||
_worldPacket.WriteUInt32(Info.RewardSkillLineID);
|
||||
_worldPacket.WriteUInt32(Info.RewardNumSkillUps);
|
||||
|
||||
_worldPacket.WriteInt32(Info.PortraitGiver);
|
||||
_worldPacket.WriteInt32(Info.PortraitGiverMount);
|
||||
_worldPacket.WriteInt32(Info.PortraitTurnIn);
|
||||
_worldPacket.WriteUInt32(Info.PortraitGiver);
|
||||
_worldPacket.WriteUInt32(Info.PortraitGiverMount);
|
||||
_worldPacket.WriteUInt32(Info.PortraitTurnIn);
|
||||
|
||||
for (uint i = 0; i < SharedConst.QuestRewardReputationsCount; ++i)
|
||||
{
|
||||
_worldPacket.WriteInt32(Info.RewardFactionID[i]);
|
||||
_worldPacket.WriteUInt32(Info.RewardFactionID[i]);
|
||||
_worldPacket.WriteInt32(Info.RewardFactionValue[i]);
|
||||
_worldPacket.WriteInt32(Info.RewardFactionOverride[i]);
|
||||
_worldPacket.WriteInt32(Info.RewardFactionCapIn[i]);
|
||||
}
|
||||
|
||||
_worldPacket.WriteInt32(Info.RewardFactionFlags);
|
||||
_worldPacket.WriteUInt32(Info.RewardFactionFlags);
|
||||
|
||||
for (uint i = 0; i < SharedConst.QuestRewardCurrencyCount; ++i)
|
||||
{
|
||||
_worldPacket.WriteInt32(Info.RewardCurrencyID[i]);
|
||||
_worldPacket.WriteInt32(Info.RewardCurrencyQty[i]);
|
||||
_worldPacket.WriteUInt32(Info.RewardCurrencyID[i]);
|
||||
_worldPacket.WriteUInt32(Info.RewardCurrencyQty[i]);
|
||||
}
|
||||
|
||||
_worldPacket.WriteInt32(Info.AcceptedSoundKitID);
|
||||
_worldPacket.WriteInt32(Info.CompleteSoundKitID);
|
||||
_worldPacket.WriteUInt32(Info.AcceptedSoundKitID);
|
||||
_worldPacket.WriteUInt32(Info.CompleteSoundKitID);
|
||||
|
||||
_worldPacket.WriteInt32(Info.AreaGroupID);
|
||||
_worldPacket.WriteInt32(Info.TimeAllowed);
|
||||
_worldPacket.WriteUInt32(Info.AreaGroupID);
|
||||
_worldPacket.WriteUInt32(Info.TimeAllowed);
|
||||
|
||||
_worldPacket.WriteUInt32(Info.Objectives.Count);
|
||||
_worldPacket.WriteInt32(Info.Objectives.Count);
|
||||
_worldPacket.WriteInt64(Info.AllowableRaces);
|
||||
_worldPacket.WriteInt32(Info.TreasurePickerID);
|
||||
_worldPacket.WriteInt32(Info.Expansion);
|
||||
@@ -217,11 +217,11 @@ namespace Game.Network.Packets
|
||||
foreach (QuestObjective questObjective in Info.Objectives)
|
||||
{
|
||||
_worldPacket.WriteUInt32(questObjective.ID);
|
||||
_worldPacket.WriteUInt8(questObjective.Type);
|
||||
_worldPacket.WriteUInt8((byte)questObjective.Type);
|
||||
_worldPacket.WriteInt8(questObjective.StorageIndex);
|
||||
_worldPacket.WriteInt32(questObjective.ObjectID);
|
||||
_worldPacket.WriteInt32(questObjective.Amount);
|
||||
_worldPacket.WriteUInt32(questObjective.Flags);
|
||||
_worldPacket.WriteUInt32((uint)questObjective.Flags);
|
||||
_worldPacket.WriteUInt32(questObjective.Flags2);
|
||||
_worldPacket.WriteFloat(questObjective.ProgressBarWeight);
|
||||
|
||||
@@ -282,7 +282,7 @@ namespace Game.Network.Packets
|
||||
{
|
||||
_worldPacket.WriteUInt32(QuestID);
|
||||
_worldPacket.WriteInt32(ObjectID);
|
||||
_worldPacket.WriteUInt8(ObjectiveType);
|
||||
_worldPacket.WriteUInt8((byte)ObjectiveType);
|
||||
}
|
||||
|
||||
public uint QuestID;
|
||||
@@ -311,10 +311,10 @@ namespace Game.Network.Packets
|
||||
public override void Write()
|
||||
{
|
||||
QuestData.Write(_worldPacket);
|
||||
_worldPacket.WriteInt32(QuestPackageID);
|
||||
_worldPacket.WriteInt32(PortraitGiver);
|
||||
_worldPacket.WriteInt32(PortraitGiverMount);
|
||||
_worldPacket.WriteInt32(PortraitTurnIn);
|
||||
_worldPacket.WriteUInt32(QuestPackageID);
|
||||
_worldPacket.WriteUInt32(PortraitGiver);
|
||||
_worldPacket.WriteUInt32(PortraitGiverMount);
|
||||
_worldPacket.WriteUInt32(PortraitTurnIn);
|
||||
|
||||
_worldPacket.WriteBits(QuestTitle.GetByteCount(), 9);
|
||||
_worldPacket.WriteBits(RewardText.GetByteCount(), 12);
|
||||
@@ -416,17 +416,17 @@ namespace Game.Network.Packets
|
||||
{
|
||||
_worldPacket.WritePackedGuid(QuestGiverGUID);
|
||||
_worldPacket.WritePackedGuid(InformUnit);
|
||||
_worldPacket.WriteInt32(QuestID);
|
||||
_worldPacket.WriteUInt32(QuestID);
|
||||
_worldPacket.WriteInt32(QuestPackageID);
|
||||
_worldPacket.WriteInt32(PortraitGiver);
|
||||
_worldPacket.WriteUInt32(PortraitGiver);
|
||||
_worldPacket.WriteUInt32(PortraitGiverMount);
|
||||
_worldPacket.WriteInt32(PortraitTurnIn);
|
||||
_worldPacket.WriteUInt32(PortraitTurnIn);
|
||||
_worldPacket.WriteUInt32(QuestFlags[0]); // Flags
|
||||
_worldPacket.WriteUInt32(QuestFlags[1]); // FlagsEx
|
||||
_worldPacket.WriteInt32(SuggestedPartyMembers);
|
||||
_worldPacket.WriteUInt32(SuggestedPartyMembers);
|
||||
_worldPacket.WriteInt32(LearnSpells.Count);
|
||||
_worldPacket.WriteUInt32(DescEmotes.Count);
|
||||
_worldPacket.WriteUInt32(Objectives.Count);
|
||||
_worldPacket.WriteInt32(DescEmotes.Count);
|
||||
_worldPacket.WriteInt32(Objectives.Count);
|
||||
_worldPacket.WriteInt32(QuestStartItemID);
|
||||
|
||||
foreach (uint spell in LearnSpells)
|
||||
@@ -434,16 +434,16 @@ namespace Game.Network.Packets
|
||||
|
||||
foreach (QuestDescEmote emote in DescEmotes)
|
||||
{
|
||||
_worldPacket.WriteInt32(emote.Type);
|
||||
_worldPacket.WriteUInt32(emote.Type);
|
||||
_worldPacket.WriteUInt32(emote.Delay);
|
||||
}
|
||||
|
||||
foreach (QuestObjectiveSimple obj in Objectives)
|
||||
{
|
||||
_worldPacket.WriteInt32(obj.ID);
|
||||
_worldPacket.WriteUInt32(obj.ID);
|
||||
_worldPacket.WriteInt32(obj.ObjectID);
|
||||
_worldPacket.WriteInt32(obj.Amount);
|
||||
_worldPacket.WriteInt8(obj.Type);
|
||||
_worldPacket.WriteUInt8(obj.Type);
|
||||
}
|
||||
|
||||
_worldPacket.WriteBits(QuestTitle.GetByteCount(), 9);
|
||||
@@ -502,13 +502,13 @@ namespace Game.Network.Packets
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WritePackedGuid(QuestGiverGUID);
|
||||
_worldPacket.WriteInt32(QuestGiverCreatureID);
|
||||
_worldPacket.WriteInt32(QuestID);
|
||||
_worldPacket.WriteInt32(CompEmoteDelay);
|
||||
_worldPacket.WriteInt32(CompEmoteType);
|
||||
_worldPacket.WriteUInt32(QuestGiverCreatureID);
|
||||
_worldPacket.WriteUInt32(QuestID);
|
||||
_worldPacket.WriteUInt32(CompEmoteDelay);
|
||||
_worldPacket.WriteUInt32(CompEmoteType);
|
||||
_worldPacket.WriteUInt32(QuestFlags[0]);
|
||||
_worldPacket.WriteUInt32(QuestFlags[1]);
|
||||
_worldPacket.WriteInt32(SuggestPartyMembers);
|
||||
_worldPacket.WriteUInt32(SuggestPartyMembers);
|
||||
_worldPacket.WriteInt32(MoneyToGet);
|
||||
_worldPacket.WriteInt32(Collect.Count);
|
||||
_worldPacket.WriteInt32(Currency.Count);
|
||||
@@ -516,13 +516,13 @@ namespace Game.Network.Packets
|
||||
|
||||
foreach (QuestObjectiveCollect obj in Collect)
|
||||
{
|
||||
_worldPacket.WriteInt32(obj.ObjectID);
|
||||
_worldPacket.WriteUInt32(obj.ObjectID);
|
||||
_worldPacket.WriteInt32(obj.Amount);
|
||||
_worldPacket.WriteUInt32(obj.Flags);
|
||||
}
|
||||
foreach (QuestCurrency cur in Currency)
|
||||
{
|
||||
_worldPacket.WriteInt32(cur.CurrencyID);
|
||||
_worldPacket.WriteUInt32(cur.CurrencyID);
|
||||
_worldPacket.WriteInt32(cur.Amount);
|
||||
}
|
||||
|
||||
@@ -619,7 +619,7 @@ namespace Game.Network.Packets
|
||||
_worldPacket.WritePackedGuid(QuestGiverGUID);
|
||||
_worldPacket.WriteUInt32(GreetEmoteDelay);
|
||||
_worldPacket.WriteUInt32(GreetEmoteType);
|
||||
_worldPacket.WriteUInt32(QuestDataText.Count);
|
||||
_worldPacket.WriteInt32(QuestDataText.Count);
|
||||
_worldPacket.WriteBits(Greeting.GetByteCount(), 11);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
@@ -698,7 +698,7 @@ namespace Game.Network.Packets
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WritePackedGuid(SenderGUID);
|
||||
_worldPacket.WriteUInt8(Result);
|
||||
_worldPacket.WriteUInt8((byte)Result);
|
||||
}
|
||||
|
||||
public ObjectGuid SenderGUID;
|
||||
@@ -727,7 +727,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt32(Reason);
|
||||
_worldPacket.WriteUInt32((uint)Reason);
|
||||
_worldPacket.WriteInt32(ContributionRewardID);
|
||||
|
||||
_worldPacket.WriteBit(SendErrorMessage);
|
||||
@@ -762,7 +762,7 @@ namespace Game.Network.Packets
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt32(QuestID);
|
||||
_worldPacket.WriteUInt32(Reason);
|
||||
_worldPacket.WriteUInt32((uint)Reason);
|
||||
}
|
||||
|
||||
public uint QuestID;
|
||||
@@ -813,7 +813,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt32(WorldQuestUpdates.Count);
|
||||
_worldPacket.WriteInt32(WorldQuestUpdates.Count);
|
||||
|
||||
foreach (WorldQuestUpdateInfo worldQuestUpdate in WorldQuestUpdates)
|
||||
{
|
||||
@@ -835,7 +835,7 @@ namespace Game.Network.Packets
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteInt32(ChoiceID);
|
||||
_worldPacket.WriteUInt32(Responses.Count);
|
||||
_worldPacket.WriteInt32(Responses.Count);
|
||||
_worldPacket.WritePackedGuid(SenderGUID);
|
||||
_worldPacket.WriteInt32(UiTextureKitID);
|
||||
_worldPacket.WriteUInt32(SoundKitID);
|
||||
@@ -1031,7 +1031,7 @@ namespace Game.Network.Packets
|
||||
|
||||
data.WriteUInt32(SkillLineID);
|
||||
data.WriteUInt32(NumSkillUps);
|
||||
data.WriteInt32(TreasurePickerID);
|
||||
data.WriteUInt32(TreasurePickerID);
|
||||
|
||||
for (int i = 0; i < SharedConst.QuestRewardChoicesCount; ++i)
|
||||
{
|
||||
@@ -1095,8 +1095,8 @@ namespace Game.Network.Packets
|
||||
data.WriteInt32(Emotes.Count);
|
||||
foreach (QuestDescEmote emote in Emotes)
|
||||
{
|
||||
data.WriteInt32(emote.Type);
|
||||
data.WriteInt32(emote.Delay);
|
||||
data.WriteUInt32(emote.Type);
|
||||
data.WriteUInt32(emote.Delay);
|
||||
}
|
||||
|
||||
data.WriteBit(AutoLaunched);
|
||||
@@ -1218,10 +1218,10 @@ namespace Game.Network.Packets
|
||||
data.WriteUInt64(Money);
|
||||
data.WriteUInt32(Xp);
|
||||
|
||||
data.WriteUInt32(Items.Count);
|
||||
data.WriteUInt32(Currencies.Count);
|
||||
data.WriteUInt32(Factions.Count);
|
||||
data.WriteUInt32(ItemChoices.Count);
|
||||
data.WriteInt32(Items.Count);
|
||||
data.WriteInt32(Currencies.Count);
|
||||
data.WriteInt32(Factions.Count);
|
||||
data.WriteInt32(ItemChoices.Count);
|
||||
|
||||
foreach (PlayerChoiceResponseRewardEntry item in Items)
|
||||
item.Write(data);
|
||||
|
||||
@@ -63,7 +63,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket .WriteInt32(Reason);
|
||||
_worldPacket .WriteInt32((int)Reason);
|
||||
// Client uses this string only if Reason == ERR_REFER_A_FRIEND_NOT_IN_GROUP || Reason == ERR_REFER_A_FRIEND_SUMMON_OFFLINE_S
|
||||
// but always reads it from packet
|
||||
_worldPacket.WriteBits(Str.GetByteCount(), 6);
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace Game.Network.Packets
|
||||
{
|
||||
for (ushort i = 0; i < FactionCount; ++i)
|
||||
{
|
||||
_worldPacket.WriteUInt8(FactionFlags[i]);
|
||||
_worldPacket.WriteUInt8((byte)FactionFlags[i]);
|
||||
_worldPacket.WriteInt32(FactionStandings[i]);
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt32(Reactions.Count);
|
||||
_worldPacket.WriteInt32(Reactions.Count);
|
||||
foreach (ForcedReaction reaction in Reactions)
|
||||
reaction.Write(_worldPacket);
|
||||
}
|
||||
@@ -75,7 +75,7 @@ namespace Game.Network.Packets
|
||||
_worldPacket.WriteFloat(ReferAFriendBonus);
|
||||
_worldPacket.WriteFloat(BonusFromAchievementSystem);
|
||||
|
||||
_worldPacket.WriteUInt32(Faction.Count);
|
||||
_worldPacket.WriteInt32(Faction.Count);
|
||||
foreach (FactionStandingData factionStanding in Faction)
|
||||
factionStanding.Write(_worldPacket);
|
||||
|
||||
|
||||
@@ -33,10 +33,10 @@ namespace Game.Network.Packets
|
||||
_worldPacket.WriteUInt32(WaveCurrent);
|
||||
_worldPacket.WriteUInt32(WaveMax);
|
||||
_worldPacket.WriteUInt32(TimerDuration);
|
||||
_worldPacket.WriteUInt32(CriteriaProgress.Count);
|
||||
_worldPacket.WriteUInt32(BonusObjectives.Count);
|
||||
_worldPacket.WriteUInt32(PickedSteps.Count);
|
||||
_worldPacket.WriteUInt32(Spells.Count);
|
||||
_worldPacket.WriteInt32(CriteriaProgress.Count);
|
||||
_worldPacket.WriteInt32(BonusObjectives.Count);
|
||||
_worldPacket.WriteInt32(PickedSteps.Count);
|
||||
_worldPacket.WriteInt32(Spells.Count);
|
||||
|
||||
for (int i = 0; i < PickedSteps.Count; ++i)
|
||||
_worldPacket.WriteUInt32(PickedSteps[i]);
|
||||
@@ -131,12 +131,12 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt32(ScenarioPOIDataStats.Count);
|
||||
_worldPacket.WriteInt32(ScenarioPOIDataStats.Count);
|
||||
|
||||
foreach (ScenarioPOIData scenarioPOIData in ScenarioPOIDataStats)
|
||||
{
|
||||
_worldPacket.WriteInt32(scenarioPOIData.CriteriaTreeID);
|
||||
_worldPacket.WriteUInt32(scenarioPOIData.ScenarioPOIs.Count);
|
||||
_worldPacket.WriteInt32(scenarioPOIData.ScenarioPOIs.Count);
|
||||
|
||||
foreach (ScenarioPOI scenarioPOI in scenarioPOIData.ScenarioPOIs)
|
||||
{
|
||||
@@ -147,12 +147,12 @@ namespace Game.Network.Packets
|
||||
_worldPacket.WriteInt32(scenarioPOI.Flags);
|
||||
_worldPacket.WriteInt32(scenarioPOI.WorldEffectID);
|
||||
_worldPacket.WriteInt32(scenarioPOI.PlayerConditionID);
|
||||
_worldPacket.WriteUInt32(scenarioPOI.Points.Count);
|
||||
_worldPacket.WriteInt32(scenarioPOI.Points.Count);
|
||||
|
||||
foreach (var scenarioPOIBlobPoint in scenarioPOI.Points)
|
||||
{
|
||||
_worldPacket.WriteInt32(scenarioPOIBlobPoint.X);
|
||||
_worldPacket.WriteInt32(scenarioPOIBlobPoint.Y);
|
||||
_worldPacket.WriteInt32((int)scenarioPOIBlobPoint.X);
|
||||
_worldPacket.WriteInt32((int)scenarioPOIBlobPoint.Y);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt32(Flags);
|
||||
_worldPacket.WriteUInt32((uint)Flags);
|
||||
_worldPacket.WriteBits(Contacts.Count, 8);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
@@ -73,15 +73,16 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt8(FriendResult);
|
||||
_worldPacket.WriteUInt8((byte)FriendResult);
|
||||
_worldPacket.WritePackedGuid(Guid);
|
||||
_worldPacket.WritePackedGuid(WowAccountGuid);
|
||||
_worldPacket.WriteUInt32(VirtualRealmAddress);
|
||||
_worldPacket.WriteUInt8(Status);
|
||||
_worldPacket.WriteUInt8((byte)Status);
|
||||
_worldPacket.WriteUInt32(AreaID);
|
||||
_worldPacket.WriteUInt32(Level);
|
||||
_worldPacket.WriteUInt32(ClassID);
|
||||
_worldPacket.WriteUInt32((uint)ClassID);
|
||||
_worldPacket.WriteBits(Notes.GetByteCount(), 10);
|
||||
_worldPacket.WriteBit(Mobile);
|
||||
_worldPacket.FlushBits();
|
||||
_worldPacket.WriteString(Notes);
|
||||
}
|
||||
@@ -95,6 +96,7 @@ namespace Game.Network.Packets
|
||||
public uint Level;
|
||||
public uint AreaID;
|
||||
public FriendsResult FriendResult;
|
||||
public bool Mobile;
|
||||
}
|
||||
|
||||
public class AddFriend : ClientPacket
|
||||
@@ -186,12 +188,13 @@ namespace Game.Network.Packets
|
||||
data.WritePackedGuid(WowAccountGuid);
|
||||
data.WriteUInt32(VirtualRealmAddr);
|
||||
data.WriteUInt32(NativeRealmAddr);
|
||||
data.WriteUInt32(TypeFlags);
|
||||
data.WriteUInt8(Status);
|
||||
data.WriteUInt32((uint)TypeFlags);
|
||||
data.WriteUInt8((byte)Status);
|
||||
data.WriteUInt32(AreaID);
|
||||
data.WriteUInt32(Level);
|
||||
data.WriteUInt32(ClassID);
|
||||
data.WriteUInt32((uint)ClassID);
|
||||
data.WriteBits(Notes.GetByteCount(), 10);
|
||||
data.WriteBit(Mobile);
|
||||
data.FlushBits();
|
||||
data.WriteString(Notes);
|
||||
}
|
||||
@@ -205,7 +208,8 @@ namespace Game.Network.Packets
|
||||
FriendStatus Status;
|
||||
uint AreaID;
|
||||
uint Level;
|
||||
Class ClassID = Class.None;
|
||||
Class ClassID;
|
||||
bool Mobile;
|
||||
}
|
||||
|
||||
public struct QualifiedGUID
|
||||
|
||||
@@ -90,7 +90,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt32(CategoryCooldowns.Count);
|
||||
_worldPacket.WriteInt32(CategoryCooldowns.Count);
|
||||
|
||||
foreach (CategoryCooldownInfo cooldown in CategoryCooldowns)
|
||||
{
|
||||
@@ -119,8 +119,8 @@ namespace Game.Network.Packets
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteBit(InitialLogin);
|
||||
_worldPacket.WriteUInt32(KnownSpells.Count);
|
||||
_worldPacket.WriteUInt32(FavoriteSpells.Count);
|
||||
_worldPacket.WriteInt32(KnownSpells.Count);
|
||||
_worldPacket.WriteInt32(FavoriteSpells.Count);
|
||||
|
||||
foreach (var spellId in KnownSpells)
|
||||
_worldPacket.WriteUInt32(spellId);
|
||||
@@ -175,7 +175,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt32(Spells.Count);
|
||||
_worldPacket.WriteInt32(Spells.Count);
|
||||
foreach (var spell in Spells)
|
||||
_worldPacket.WriteUInt32(spell);
|
||||
}
|
||||
@@ -305,9 +305,9 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt32(SpellID.Count);
|
||||
_worldPacket.WriteUInt32(Superceded.Count);
|
||||
_worldPacket.WriteUInt32(FavoriteSpellID.Count);
|
||||
_worldPacket.WriteInt32(SpellID.Count);
|
||||
_worldPacket.WriteInt32(Superceded.Count);
|
||||
_worldPacket.WriteInt32(FavoriteSpellID.Count);
|
||||
|
||||
foreach (var spellId in SpellID)
|
||||
_worldPacket.WriteUInt32(spellId);
|
||||
@@ -330,8 +330,8 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt32(SpellID.Count);
|
||||
_worldPacket.WriteUInt32(FavoriteSpellID.Count);
|
||||
_worldPacket.WriteInt32(SpellID.Count);
|
||||
_worldPacket.WriteInt32(FavoriteSpellID.Count);
|
||||
|
||||
foreach (uint spell in SpellID)
|
||||
_worldPacket.WriteUInt32(spell);
|
||||
@@ -356,7 +356,7 @@ namespace Game.Network.Packets
|
||||
{
|
||||
_worldPacket.WritePackedGuid(CasterUnit);
|
||||
_worldPacket.WritePackedGuid(CastID);
|
||||
_worldPacket.WriteInt32(SpellID);
|
||||
_worldPacket.WriteUInt32(SpellID);
|
||||
_worldPacket.WriteUInt32(SpellXSpellVisualID);
|
||||
_worldPacket.WriteUInt16(Reason);
|
||||
}
|
||||
@@ -410,7 +410,7 @@ namespace Game.Network.Packets
|
||||
_worldPacket.WritePackedGuid(CastID);
|
||||
_worldPacket.WriteInt32(SpellID);
|
||||
_worldPacket.WriteInt32(SpellXSpellVisualID);
|
||||
_worldPacket.WriteInt32(Reason);
|
||||
_worldPacket.WriteInt32((int)Reason);
|
||||
_worldPacket.WriteInt32(FailedArg1);
|
||||
_worldPacket.WriteInt32(FailedArg2);
|
||||
}
|
||||
@@ -426,7 +426,7 @@ namespace Game.Network.Packets
|
||||
{
|
||||
_worldPacket.WritePackedGuid(CastID);
|
||||
_worldPacket.WriteInt32(SpellID);
|
||||
_worldPacket.WriteInt32(Reason);
|
||||
_worldPacket.WriteInt32((int)Reason);
|
||||
_worldPacket.WriteInt32(FailedArg1);
|
||||
_worldPacket.WriteInt32(FailedArg2);
|
||||
}
|
||||
@@ -438,7 +438,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt32(Modifiers.Count);
|
||||
_worldPacket.WriteInt32(Modifiers.Count);
|
||||
foreach (SpellModifierInfo spellMod in Modifiers)
|
||||
spellMod.Write(_worldPacket);
|
||||
}
|
||||
@@ -452,7 +452,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt32(SpellID.Count);
|
||||
_worldPacket.WriteInt32(SpellID.Count);
|
||||
foreach (uint spellId in SpellID)
|
||||
_worldPacket.WriteUInt32(spellId);
|
||||
|
||||
@@ -474,7 +474,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteInt32(SpellID);
|
||||
_worldPacket.WriteUInt32(SpellID);
|
||||
_worldPacket.WriteBit(IsPet);
|
||||
_worldPacket.FlushBits();
|
||||
}
|
||||
@@ -489,7 +489,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt32(SpellID.Count);
|
||||
_worldPacket.WriteInt32(SpellID.Count);
|
||||
if (!SpellID.Empty())
|
||||
SpellID.ForEach(p => _worldPacket.WriteUInt32(p));
|
||||
|
||||
@@ -542,8 +542,8 @@ namespace Game.Network.Packets
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WritePackedGuid(Caster);
|
||||
_worldPacket.WriteUInt8(Flags);
|
||||
_worldPacket.WriteUInt32(SpellCooldowns.Count);
|
||||
_worldPacket.WriteUInt8((byte)Flags);
|
||||
_worldPacket.WriteInt32(SpellCooldowns.Count);
|
||||
SpellCooldowns.ForEach(p => p.Write(_worldPacket));
|
||||
}
|
||||
|
||||
@@ -558,7 +558,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt32(Entries.Count);
|
||||
_worldPacket.WriteInt32(Entries.Count);
|
||||
Entries.ForEach(p => p.Write(_worldPacket));
|
||||
}
|
||||
|
||||
@@ -620,7 +620,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt32(Entries.Count);
|
||||
_worldPacket.WriteInt32(Entries.Count);
|
||||
Entries.ForEach(p => p.Write(_worldPacket));
|
||||
}
|
||||
|
||||
@@ -904,7 +904,7 @@ namespace Game.Network.Packets
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WritePackedGuid(UnitGUID);
|
||||
_worldPacket.WriteUInt32(DisplayID);
|
||||
_worldPacket.WriteInt32(DisplayID);
|
||||
_worldPacket.WriteUInt8(RaceID);
|
||||
_worldPacket.WriteUInt8(Gender);
|
||||
_worldPacket.WriteUInt8(ClassID);
|
||||
@@ -917,10 +917,10 @@ namespace Game.Network.Packets
|
||||
CustomDisplay.ForEach(id => _worldPacket.WriteUInt8(id));
|
||||
|
||||
_worldPacket.WritePackedGuid(GuildGUID);
|
||||
_worldPacket.WriteUInt32(ItemDisplayID.Count);
|
||||
_worldPacket.WriteInt32(ItemDisplayID.Count);
|
||||
|
||||
foreach (var itemDisplayId in ItemDisplayID)
|
||||
_worldPacket.WriteUInt32(itemDisplayId);
|
||||
_worldPacket.WriteInt32(itemDisplayId);
|
||||
}
|
||||
|
||||
public ObjectGuid UnitGUID;
|
||||
@@ -1188,14 +1188,14 @@ namespace Game.Network.Packets
|
||||
CreatureTemplate creatureTemplate = attacker.GetCreatureTemplate();
|
||||
|
||||
TuningType = ContentTuningType.CreatureToPlayerDamage;
|
||||
PlayerLevelDelta = (short)target.GetInt32Value(ActivePlayerFields.ScalingPlayerLevelDelta);
|
||||
PlayerLevelDelta = (short)target.m_activePlayerData.ScalingPlayerLevelDelta;
|
||||
PlayerItemLevel = (ushort)target.GetAverageItemLevel();
|
||||
ScalingHealthItemLevelCurveID = (ushort)target.GetUInt32Value(UnitFields.ScalingHealthItemLevelCurveId);
|
||||
ScalingHealthItemLevelCurveID = (ushort)target.m_unitData.ScalingHealthItemLevelCurveID;
|
||||
TargetLevel = (byte)target.getLevel();
|
||||
Expansion = (byte)creatureTemplate.RequiredExpansion;
|
||||
TargetMinScalingLevel = (byte)creatureTemplate.levelScaling.Value.MinLevel;
|
||||
TargetMaxScalingLevel = (byte)creatureTemplate.levelScaling.Value.MaxLevel;
|
||||
TargetScalingLevelDelta = (sbyte)attacker.GetInt32Value(UnitFields.ScalingLevelDelta);
|
||||
TargetScalingLevelDelta = (sbyte)attacker.m_unitData.ScalingLevelDelta;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1204,14 +1204,14 @@ namespace Game.Network.Packets
|
||||
CreatureTemplate creatureTemplate = target.GetCreatureTemplate();
|
||||
|
||||
TuningType = ContentTuningType.PlayerToCreatureDamage;
|
||||
PlayerLevelDelta = (short)attacker.GetInt32Value(ActivePlayerFields.ScalingPlayerLevelDelta);
|
||||
PlayerLevelDelta = (short)attacker.m_activePlayerData.ScalingPlayerLevelDelta;
|
||||
PlayerItemLevel = (ushort)attacker.GetAverageItemLevel();
|
||||
ScalingHealthItemLevelCurveID = (ushort)target.GetUInt32Value(UnitFields.ScalingHealthItemLevelCurveId);
|
||||
ScalingHealthItemLevelCurveID = (ushort)target.m_unitData.ScalingHealthItemLevelCurveID;
|
||||
TargetLevel = (byte)target.getLevel();
|
||||
Expansion = (byte)creatureTemplate.RequiredExpansion;
|
||||
TargetMinScalingLevel = (byte)creatureTemplate.levelScaling.Value.MinLevel;
|
||||
TargetMaxScalingLevel = (byte)creatureTemplate.levelScaling.Value.MaxLevel;
|
||||
TargetScalingLevelDelta = (sbyte)target.GetInt32Value(UnitFields.ScalingLevelDelta);
|
||||
TargetScalingLevelDelta = (sbyte)target.m_unitData.ScalingLevelDelta;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1227,7 +1227,7 @@ namespace Game.Network.Packets
|
||||
Expansion = (byte)creatureTemplate.RequiredExpansion;
|
||||
TargetMinScalingLevel = (byte)creatureTemplate.levelScaling.Value.MinLevel;
|
||||
TargetMaxScalingLevel = (byte)creatureTemplate.levelScaling.Value.MaxLevel;
|
||||
TargetScalingLevelDelta = (sbyte)accessor.GetInt32Value(UnitFields.ScalingLevelDelta);
|
||||
TargetScalingLevelDelta = (sbyte)accessor.m_unitData.ScalingLevelDelta;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1310,7 +1310,7 @@ namespace Game.Network.Packets
|
||||
data.WritePackedGuid(CastID);
|
||||
data.WriteInt32(SpellID);
|
||||
data.WriteInt32(SpellXSpellVisualID);
|
||||
data.WriteUInt8(Flags);
|
||||
data.WriteUInt8((byte)Flags);
|
||||
data.WriteUInt32(ActiveFlags);
|
||||
data.WriteUInt16(CastLevel);
|
||||
data.WriteUInt8(Applications);
|
||||
@@ -1330,10 +1330,10 @@ namespace Game.Network.Packets
|
||||
data.WritePackedGuid(CastUnit.Value);
|
||||
|
||||
if (Duration.HasValue)
|
||||
data.WriteUInt32(Duration.Value);
|
||||
data.WriteInt32(Duration.Value);
|
||||
|
||||
if (Remaining.HasValue)
|
||||
data.WriteUInt32(Remaining.Value);
|
||||
data.WriteInt32(Remaining.Value);
|
||||
|
||||
if (TimeMod.HasValue)
|
||||
data.WriteFloat(TimeMod.Value);
|
||||
@@ -1538,7 +1538,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteUInt8(Reason);
|
||||
data.WriteUInt8((byte)Reason);
|
||||
}
|
||||
|
||||
public SpellMissInfo Reason;
|
||||
@@ -1573,7 +1573,7 @@ namespace Game.Network.Packets
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteInt32(Cost);
|
||||
data.WriteInt8(Type);
|
||||
data.WriteInt8((sbyte)Type);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1583,7 +1583,7 @@ namespace Game.Network.Packets
|
||||
{
|
||||
data.WriteUInt8(Start);
|
||||
data.WriteUInt8(Count);
|
||||
data.WriteUInt32(Cooldowns.Count);
|
||||
data.WriteInt32(Cooldowns.Count);
|
||||
|
||||
foreach (byte cd in Cooldowns)
|
||||
data.WriteUInt8(cd);
|
||||
@@ -1654,8 +1654,8 @@ namespace Game.Network.Packets
|
||||
data.WritePackedGuid(OriginalCastID);
|
||||
data.WriteInt32(SpellID);
|
||||
data.WriteUInt32(SpellXSpellVisualID);
|
||||
data.WriteUInt32(CastFlags);
|
||||
data.WriteUInt32(CastFlagsEx);
|
||||
data.WriteUInt32((uint)CastFlags);
|
||||
data.WriteUInt32((uint)CastFlagsEx);
|
||||
data.WriteUInt32(CastTime);
|
||||
|
||||
MissileTrajectory.Write(data);
|
||||
@@ -1743,7 +1743,7 @@ namespace Game.Network.Packets
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteUInt8(ModIndex);
|
||||
data.WriteUInt32(ModifierData.Count);
|
||||
data.WriteInt32(ModifierData.Count);
|
||||
foreach (SpellModifierData modData in ModifierData)
|
||||
modData.Write(data);
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@ namespace Game.Network.Packets
|
||||
|
||||
if (RaceClassExpansionLevels.HasValue)
|
||||
{
|
||||
_worldPacket.WriteUInt32(RaceClassExpansionLevels.Value.Count);
|
||||
_worldPacket.WriteInt32(RaceClassExpansionLevels.Value.Count);
|
||||
foreach (var level in RaceClassExpansionLevels.Value)
|
||||
_worldPacket.WriteUInt8(level);
|
||||
}
|
||||
|
||||
@@ -31,13 +31,13 @@ namespace Game.Network.Packets
|
||||
{
|
||||
_worldPacket.WriteUInt8(Info.ActiveGroup);
|
||||
_worldPacket.WriteUInt32(Info.PrimarySpecialization);
|
||||
_worldPacket.WriteUInt32(Info.TalentGroups.Count);
|
||||
_worldPacket.WriteInt32(Info.TalentGroups.Count);
|
||||
|
||||
foreach (var talentGroupInfo in Info.TalentGroups)
|
||||
{
|
||||
_worldPacket.WriteUInt32(talentGroupInfo.SpecID);
|
||||
_worldPacket.WriteUInt32(talentGroupInfo.TalentIDs.Count);
|
||||
_worldPacket.WriteUInt32(talentGroupInfo.PvPTalentIDs.Count);
|
||||
_worldPacket.WriteInt32(talentGroupInfo.TalentIDs.Count);
|
||||
_worldPacket.WriteInt32(talentGroupInfo.PvPTalentIDs.Count);
|
||||
|
||||
foreach (var talentID in talentGroupInfo.TalentIDs)
|
||||
_worldPacket.WriteUInt16(talentID);
|
||||
@@ -84,7 +84,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteInt8(RespecType);
|
||||
_worldPacket.WriteInt8((sbyte)RespecType);
|
||||
_worldPacket.WriteUInt32(Cost);
|
||||
_worldPacket.WritePackedGuid(RespecMaster);
|
||||
}
|
||||
@@ -116,7 +116,7 @@ namespace Game.Network.Packets
|
||||
{
|
||||
_worldPacket.WriteBits(Reason, 4);
|
||||
_worldPacket.WriteInt32(SpellID);
|
||||
_worldPacket.WriteUInt32(Talents.Count);
|
||||
_worldPacket.WriteInt32(Talents.Count);
|
||||
|
||||
foreach (var talent in Talents)
|
||||
_worldPacket.WriteUInt16(talent);
|
||||
@@ -133,7 +133,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt32(Glyphs.Count);
|
||||
_worldPacket.WriteInt32(Glyphs.Count);
|
||||
foreach (GlyphBinding glyph in Glyphs)
|
||||
glyph.Write(_worldPacket);
|
||||
|
||||
@@ -167,7 +167,7 @@ namespace Game.Network.Packets
|
||||
{
|
||||
_worldPacket.WriteBits(Reason, 4);
|
||||
_worldPacket.WriteUInt32(SpellID);
|
||||
_worldPacket.WriteUInt32(Talents.Count);
|
||||
_worldPacket.WriteInt32(Talents.Count);
|
||||
|
||||
foreach (var pvpTalent in Talents)
|
||||
pvpTalent.Write(_worldPacket);
|
||||
|
||||
@@ -57,13 +57,13 @@ namespace Game.Network.Packets
|
||||
_worldPacket.WriteBit(WindowInfo.HasValue);
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
_worldPacket.WriteUInt32(CanLandNodes.Length);
|
||||
_worldPacket.WriteUInt32(CanUseNodes.Length);
|
||||
_worldPacket.WriteInt32(CanLandNodes.Length);
|
||||
_worldPacket.WriteInt32(CanUseNodes.Length);
|
||||
|
||||
if (WindowInfo.HasValue)
|
||||
{
|
||||
_worldPacket.WritePackedGuid(WindowInfo.Value.UnitGUID);
|
||||
_worldPacket.WriteUInt32(WindowInfo.Value.CurrentNode);
|
||||
_worldPacket.WriteInt32(WindowInfo.Value.CurrentNode);
|
||||
}
|
||||
|
||||
foreach (var node in CanLandNodes)
|
||||
|
||||
@@ -435,7 +435,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteUInt32(ComplaintType);
|
||||
_worldPacket.WriteUInt32((uint)ComplaintType);
|
||||
_worldPacket.WriteUInt8(Result);
|
||||
}
|
||||
|
||||
|
||||
@@ -38,9 +38,9 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket .WriteUInt32( UnkInt);
|
||||
_worldPacket .WriteUInt32( Result);
|
||||
_worldPacket .WriteUInt32(AuctionableTokenAuctionableList.Count);
|
||||
_worldPacket.WriteUInt32(UnkInt);
|
||||
_worldPacket.WriteUInt32((uint)Result);
|
||||
_worldPacket.WriteInt32(AuctionableTokenAuctionableList.Count);
|
||||
|
||||
foreach (AuctionableTokenAuctionable auctionableTokenAuctionable in AuctionableTokenAuctionableList)
|
||||
{
|
||||
@@ -86,7 +86,7 @@ namespace Game.Network.Packets
|
||||
{
|
||||
_worldPacket.WriteUInt64(CurrentMarketPrice);
|
||||
_worldPacket.WriteUInt32(UnkInt);
|
||||
_worldPacket.WriteUInt32(Result);
|
||||
_worldPacket.WriteUInt32((uint)Result);
|
||||
_worldPacket.WriteUInt32(AuctionDuration);
|
||||
}
|
||||
|
||||
|
||||
@@ -56,9 +56,9 @@ namespace Game.Network.Packets
|
||||
_worldPacket.FlushBits();
|
||||
|
||||
// all lists have to have the same size
|
||||
_worldPacket.WriteUInt32(Toys.Count);
|
||||
_worldPacket.WriteUInt32(Toys.Count);
|
||||
_worldPacket.WriteUInt32(Toys.Count);
|
||||
_worldPacket.WriteInt32(Toys.Count);
|
||||
_worldPacket.WriteInt32(Toys.Count);
|
||||
_worldPacket.WriteInt32(Toys.Count);
|
||||
|
||||
foreach (var pair in Toys)
|
||||
_worldPacket.WriteUInt32(pair.Key);
|
||||
|
||||
@@ -147,8 +147,8 @@ namespace Game.Network.Packets
|
||||
{
|
||||
case TradeStatus.Failed:
|
||||
_worldPacket.WriteBit(FailureForYou);
|
||||
_worldPacket.WriteInt32(BagResult);
|
||||
_worldPacket.WriteInt32(ItemID);
|
||||
_worldPacket.WriteInt32((int)BagResult);
|
||||
_worldPacket.WriteUInt32(ItemID);
|
||||
break;
|
||||
case TradeStatus.Initiated:
|
||||
_worldPacket.WriteUInt32(ID);
|
||||
@@ -159,7 +159,7 @@ namespace Game.Network.Packets
|
||||
break;
|
||||
case TradeStatus.WrongRealm:
|
||||
case TradeStatus.NotOnTaplist:
|
||||
_worldPacket.WriteInt8(TradeSlot);
|
||||
_worldPacket.WriteUInt8(TradeSlot);
|
||||
break;
|
||||
case TradeStatus.NotEnoughCurrency:
|
||||
case TradeStatus.CurrencyNotTradable:
|
||||
@@ -199,7 +199,7 @@ namespace Game.Network.Packets
|
||||
_worldPacket.WriteInt32(CurrencyType);
|
||||
_worldPacket.WriteInt32(CurrencyQuantity);
|
||||
_worldPacket.WriteInt32(ProposedEnchantment);
|
||||
_worldPacket.WriteUInt32(Items.Count);
|
||||
_worldPacket.WriteInt32(Items.Count);
|
||||
|
||||
Items.ForEach(item => item.Write(_worldPacket));
|
||||
}
|
||||
@@ -238,7 +238,7 @@ namespace Game.Network.Packets
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteUInt8(Slot);
|
||||
data.WriteUInt32(StackCount);
|
||||
data.WriteInt32(StackCount);
|
||||
data.WritePackedGuid(GiftCreator);
|
||||
Item.Write(data);
|
||||
data.WriteBit(Unwrapped.HasValue);
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace Game.Network.Packets
|
||||
{
|
||||
_worldPacket.WriteBit(IsFullUpdate);
|
||||
_worldPacket.WriteBit(IsSetFavorite);
|
||||
_worldPacket.WriteUInt32(FavoriteAppearances.Count);
|
||||
_worldPacket.WriteInt32(FavoriteAppearances.Count);
|
||||
|
||||
foreach (uint itemModifiedAppearanceId in FavoriteAppearances)
|
||||
_worldPacket.WriteUInt32(itemModifiedAppearanceId);
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace Game.Network.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
_worldPacket.WriteInt32(Result);
|
||||
_worldPacket.WriteInt32((int)Result);
|
||||
}
|
||||
|
||||
public VoidTransferError Result;
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace Game.Network.Packets
|
||||
{
|
||||
public enum WardenOpcodes
|
||||
{
|
||||
// Client->Server
|
||||
// Client.Server
|
||||
CMSG_ModuleMissing = 0,
|
||||
Cmsg_ModuleOk = 1,
|
||||
Cmsg_CheatChecksResult = 2,
|
||||
@@ -30,7 +30,7 @@ namespace Game.Network.Packets
|
||||
Cmsg_HashResult = 4,
|
||||
Cmsg_ModuleFailed = 5, // This Is Sent When Client Failed To Load Uploaded Module Due To Cache Fail
|
||||
|
||||
// Server->Client
|
||||
// Server.Client
|
||||
Smsg_ModuleUse = 0,
|
||||
Smsg_ModuleCache = 1,
|
||||
Smsg_CheatChecksRequest = 2,
|
||||
@@ -70,7 +70,7 @@ namespace Game.Network.Packets
|
||||
{
|
||||
public byte[] Write()
|
||||
{
|
||||
WriteUInt8(Command);
|
||||
WriteUInt8((byte)Command);
|
||||
WriteUInt16(DataSize);
|
||||
WriteBytes(Data, 500);
|
||||
|
||||
@@ -86,7 +86,7 @@ namespace Game.Network.Packets
|
||||
{
|
||||
public byte[] Write()
|
||||
{
|
||||
WriteUInt8(Command);
|
||||
WriteUInt8((byte)Command);
|
||||
WriteBytes(ModuleId, 16);
|
||||
WriteBytes(ModuleKey, 16);
|
||||
WriteUInt32(Size);
|
||||
@@ -104,7 +104,7 @@ namespace Game.Network.Packets
|
||||
{
|
||||
public byte[] Write()
|
||||
{
|
||||
WriteUInt8(Command);
|
||||
WriteUInt8((byte)Command);
|
||||
WriteBytes(Seed);
|
||||
|
||||
return GetData();
|
||||
@@ -118,7 +118,7 @@ namespace Game.Network.Packets
|
||||
{
|
||||
public byte[] Write()
|
||||
{
|
||||
WriteUInt8(Command1);
|
||||
WriteUInt8((byte)Command1);
|
||||
WriteUInt16(Size1);
|
||||
WriteUInt32(CheckSumm1);
|
||||
WriteUInt8(Unk1);
|
||||
@@ -128,7 +128,7 @@ namespace Game.Network.Packets
|
||||
foreach (var function in Function1)
|
||||
WriteUInt32(function);
|
||||
|
||||
WriteUInt8(Command2);
|
||||
WriteUInt8((byte)Command2);
|
||||
WriteUInt16(Size2);
|
||||
WriteUInt32(CheckSumm2);
|
||||
WriteUInt8(Unk3);
|
||||
@@ -137,7 +137,7 @@ namespace Game.Network.Packets
|
||||
WriteUInt32(Function2);
|
||||
WriteUInt8(Function2_set);
|
||||
|
||||
WriteUInt8(Command3);
|
||||
WriteUInt8((byte)Command3);
|
||||
WriteUInt16(Size3);
|
||||
WriteUInt32(CheckSumm3);
|
||||
WriteUInt8(Unk5);
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace Game.Network.Packets
|
||||
_worldPacket.WriteUInt32(AreaID);
|
||||
_worldPacket.WriteUInt32(SubareaID);
|
||||
|
||||
_worldPacket.WriteUInt32(Worldstates.Count);
|
||||
_worldPacket.WriteInt32(Worldstates.Count);
|
||||
foreach (WorldStateInfo wsi in Worldstates)
|
||||
{
|
||||
_worldPacket.WriteUInt32(wsi.VariableID);
|
||||
|
||||
@@ -29,21 +29,24 @@ namespace Game.Network
|
||||
{
|
||||
public class WorldSocket : SocketBase
|
||||
{
|
||||
static string ClientConnectionInitialize = "WORLD OF WARCRAFT CONNECTION - CLIENT TO SERVER";
|
||||
static string ServerConnectionInitialize = "WORLD OF WARCRAFT CONNECTION - SERVER TO CLIENT";
|
||||
static string ClientConnectionInitialize = "WORLD OF WARCRAFT CONNECTION - CLIENT TO SERVER - V2";
|
||||
static string ServerConnectionInitialize = "WORLD OF WARCRAFT CONNECTION - SERVER TO CLIENT - V2";
|
||||
|
||||
static byte[] AuthCheckSeed = { 0xC5, 0xC6, 0x98, 0x95, 0x76, 0x3F, 0x1D, 0xCD, 0xB6, 0xA1, 0x37, 0x28, 0xB3, 0x12, 0xFF, 0x8A };
|
||||
static byte[] SessionKeySeed = { 0x58, 0xCB, 0xCF, 0x40, 0xFE, 0x2E, 0xCE, 0xA6, 0x5A, 0x90, 0xB8, 0x01, 0x68, 0x6C, 0x28, 0x0B };
|
||||
static byte[] ContinuedSessionSeed = { 0x16, 0xAD, 0x0C, 0xD4, 0x46, 0xF9, 0x4F, 0xB2, 0xEF, 0x7D, 0xEA, 0x2A, 0x17, 0x66, 0x4D, 0x2F };
|
||||
static byte[] EncryptionKeySeed = { 0xE9, 0x75, 0x3C, 0x50, 0x90, 0x93, 0x61, 0xDA, 0x3B, 0x07, 0xEE, 0xFA, 0xFF, 0x9D, 0x41, 0xB8 };
|
||||
|
||||
static byte[] ClientTypeSeed_Wn64 = { 0xDD, 0x62, 0x65, 0x17, 0xCC, 0x6D, 0x31, 0x93, 0x2B, 0x47, 0x99, 0x34, 0xCC, 0xDC, 0x0A, 0xBF };
|
||||
static byte[] ClientTypeSeed_Wn64 = { 0x8A, 0x46, 0xF2, 0x36, 0x70, 0x30, 0x9F, 0x2A, 0xAE, 0x85, 0xC9, 0xA4, 0x72, 0x76, 0x38, 0x2B };
|
||||
static byte[] ClientTypeSeed_Mc64 = { 0x34, 0x1C, 0xFE, 0xFE, 0x3D, 0x72, 0xAC, 0xA9, 0xA4, 0x40, 0x7D, 0xC5, 0x35, 0xDE, 0xD6, 0x6A };
|
||||
|
||||
public WorldSocket(Socket socket) : base(socket)
|
||||
{
|
||||
_connectType = ConnectionType.Realm;
|
||||
_serverChallenge = new byte[0].GenerateRandomKey(16);
|
||||
worldCrypt = new WorldCrypt();
|
||||
_worldCrypt = new WorldCrypt();
|
||||
|
||||
_encryptKey = new byte[16];
|
||||
}
|
||||
|
||||
public override void Dispose()
|
||||
@@ -51,9 +54,6 @@ namespace Game.Network
|
||||
_worldSession = null;
|
||||
_queryProcessor = null;
|
||||
_serverChallenge = null;
|
||||
worldCrypt = null;
|
||||
_encryptSeed = null;
|
||||
_decryptSeed = null;
|
||||
_sessionKey = null;
|
||||
_compressionStream = null;
|
||||
|
||||
@@ -147,42 +147,51 @@ namespace Game.Network
|
||||
|
||||
while (transferredBytes > 5)
|
||||
{
|
||||
if (worldCrypt.IsInitialized)
|
||||
worldCrypt.Decrypt(GetReceiveBuffer(), 4);
|
||||
|
||||
int size;
|
||||
uint opcode;
|
||||
if (!ReadHeader(out opcode, out size))
|
||||
PacketHeader header;
|
||||
if (!ReadHeader(out header))
|
||||
{
|
||||
CloseSocket();
|
||||
return;
|
||||
}
|
||||
|
||||
var data = new byte[size];
|
||||
Buffer.BlockCopy(GetReceiveBuffer(), 6, data, 0, size);
|
||||
var data = new byte[header.Size];
|
||||
Buffer.BlockCopy(GetReceiveBuffer(), 16, data, 0, header.Size);
|
||||
|
||||
PacketLog.Write(data, opcode, GetRemoteIpAddress(), GetRemotePort(), _connectType, true);
|
||||
if (!ProcessPacket(new WorldPacket(data, opcode)))
|
||||
if (!_worldCrypt.Decrypt(ref data, header.Size, header.Tag))
|
||||
{
|
||||
Log.outError(LogFilter.Network, $"WorldSocket.ReadHandler(): client {GetRemoteIpAddress().ToString()} failed to decrypt packet (size: {header.Size})");
|
||||
return;
|
||||
}
|
||||
|
||||
WorldPacket worldPacket = new WorldPacket(data);
|
||||
if (worldPacket.GetOpcode() >= (int)ClientOpcodes.Max)
|
||||
{
|
||||
Log.outError(LogFilter.Network, $"WorldSocket.ReadHandler(): client {GetRemoteIpAddress().ToString()} sent wrong opcode (opcode: {worldPacket.GetOpcode()})");
|
||||
return;
|
||||
}
|
||||
|
||||
PacketLog.Write(data, worldPacket.GetOpcode(), GetRemoteIpAddress(), GetRemotePort(), _connectType, true);
|
||||
if (!ProcessPacket(worldPacket))
|
||||
{
|
||||
CloseSocket();
|
||||
return;
|
||||
}
|
||||
|
||||
transferredBytes -= size + 6;
|
||||
Buffer.BlockCopy(GetReceiveBuffer(), size + 6, GetReceiveBuffer(), 0, transferredBytes);
|
||||
transferredBytes -= header.Size + 16;
|
||||
Buffer.BlockCopy(GetReceiveBuffer(), header.Size + 16, GetReceiveBuffer(), 0, transferredBytes);
|
||||
}
|
||||
|
||||
AsyncRead();
|
||||
}
|
||||
|
||||
bool ReadHeader(out uint opcode, out int size)
|
||||
bool ReadHeader(out PacketHeader header)
|
||||
{
|
||||
size = BitConverter.ToInt32(GetReceiveBuffer(), 0) - 2;
|
||||
opcode = BitConverter.ToUInt16(GetReceiveBuffer(), 4);
|
||||
header = new PacketHeader();
|
||||
header.Read(GetReceiveBuffer());
|
||||
|
||||
if (size >= 0x10000 || (opcode >= (int)ClientOpcodes.Max + 1))
|
||||
if (!header.IsValidSize())
|
||||
{
|
||||
Log.outError(LogFilter.Network, "WorldSocket.ReadHeader(): client {0} sent malformed packet (size: {1}, cmd: {2})", GetRemoteIpAddress().ToString(), size, opcode);
|
||||
Log.outError(LogFilter.Network, "WorldSocket.ReadHeader(): client {0} sent malformed packet (size: {1})", GetRemoteIpAddress().ToString(), header.Size);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -278,16 +287,18 @@ namespace Game.Network
|
||||
ServerOpcodes opcode = packet.GetOpcode();
|
||||
PacketLog.Write(data, (uint)opcode, GetRemoteIpAddress(), GetRemotePort(), _connectType, false);
|
||||
|
||||
uint packetSize = (uint)data.Length;
|
||||
if (packetSize > 0x400 && worldCrypt.IsInitialized)
|
||||
{
|
||||
ByteBuffer buffer = new ByteBuffer();
|
||||
buffer.WriteUInt32(packetSize + 2);
|
||||
buffer.WriteUInt32(ZLib.adler32(ZLib.adler32(0x9827D8F1, BitConverter.GetBytes((ushort)opcode), 2), data, packetSize));
|
||||
ByteBuffer buffer = new ByteBuffer();
|
||||
|
||||
uint compressedSize = CompressPacket(data, opcode);
|
||||
buffer.WriteUInt32(ZLib.adler32(0x9827D8F1, data, compressedSize));
|
||||
buffer.WriteBytes(data, compressedSize);
|
||||
int packetSize = data.Length;
|
||||
if (packetSize > 0x400 && _worldCrypt.IsInitialized)
|
||||
{
|
||||
buffer.WriteInt32(packetSize + 2);
|
||||
buffer.WriteUInt32(ZLib.adler32(ZLib.adler32(0x9827D8F1, BitConverter.GetBytes((ushort)opcode), 2), data, (uint)packetSize));
|
||||
|
||||
byte[] compressedData;
|
||||
uint compressedSize = CompressPacket(data, opcode, out compressedData);
|
||||
buffer.WriteUInt32(ZLib.adler32(0x9827D8F1, compressedData, compressedSize));
|
||||
buffer.WriteBytes(compressedData, compressedSize);
|
||||
|
||||
packetSize = (ushort)(compressedSize + 12);
|
||||
opcode = ServerOpcodes.CompressedPacket;
|
||||
@@ -295,11 +306,22 @@ namespace Game.Network
|
||||
data = buffer.GetData();
|
||||
}
|
||||
|
||||
ServerPacketHeader header = new ServerPacketHeader(packetSize, opcode);
|
||||
if (worldCrypt.IsInitialized)
|
||||
worldCrypt.Encrypt(header.data, 4);
|
||||
buffer = new ByteBuffer();
|
||||
buffer.WriteUInt16((ushort)opcode);
|
||||
buffer.WriteBytes(data);
|
||||
packetSize += 2 /*opcode*/;
|
||||
|
||||
AsyncWrite(header.data.Combine(data));
|
||||
data = buffer.GetData();
|
||||
|
||||
PacketHeader header = new PacketHeader();
|
||||
header.Size = packetSize;
|
||||
_worldCrypt.Encrypt(ref data, header.Size, ref header.Tag);
|
||||
|
||||
ByteBuffer byteBuffer = new ByteBuffer();
|
||||
header.Write(byteBuffer);
|
||||
byteBuffer.WriteBytes(data);
|
||||
|
||||
AsyncWrite(byteBuffer.GetData());
|
||||
}
|
||||
|
||||
public void SetWorldSession(WorldSession session)
|
||||
@@ -307,16 +329,16 @@ namespace Game.Network
|
||||
_worldSession = session;
|
||||
}
|
||||
|
||||
public uint CompressPacket(byte[] data, ServerOpcodes opcode)
|
||||
public uint CompressPacket(byte[] data, ServerOpcodes opcode, out byte[] outData)
|
||||
{
|
||||
byte[] uncompressedData = BitConverter.GetBytes((ushort)opcode).Combine(data);
|
||||
|
||||
uint bufferSize = ZLib.deflateBound(_compressionStream, (uint)uncompressedData.Length);
|
||||
byte[] outPrt = new byte[bufferSize];
|
||||
uint bufferSize = ZLib.deflateBound(_compressionStream, (uint)data.Length);
|
||||
outData = new byte[bufferSize];
|
||||
|
||||
_compressionStream.next_out = 0;
|
||||
_compressionStream.avail_out = bufferSize;
|
||||
_compressionStream.out_buf = outPrt;
|
||||
_compressionStream.out_buf = outData;
|
||||
|
||||
_compressionStream.next_in = 0;
|
||||
_compressionStream.avail_in = (uint)uncompressedData.Length;
|
||||
@@ -329,9 +351,7 @@ namespace Game.Network
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint compressedSize = bufferSize - _compressionStream.avail_out;
|
||||
Buffer.BlockCopy(outPrt, 0, data, 0, (int)compressedSize);
|
||||
return compressedSize;
|
||||
return bufferSize - _compressionStream.avail_out;
|
||||
}
|
||||
|
||||
public override bool Update()
|
||||
@@ -346,12 +366,9 @@ namespace Game.Network
|
||||
|
||||
void HandleSendAuthSession()
|
||||
{
|
||||
_encryptSeed = new byte[16].GenerateRandomKey(16);
|
||||
_decryptSeed = new byte[16].GenerateRandomKey(16);
|
||||
|
||||
AuthChallenge challenge = new AuthChallenge();
|
||||
challenge.Challenge = _serverChallenge;
|
||||
challenge.DosChallenge = _encryptSeed.Combine(_decryptSeed);
|
||||
challenge.DosChallenge = new byte[32].GenerateRandomKey(32);
|
||||
challenge.DosZeroBits = 1;
|
||||
|
||||
SendPacket(challenge);
|
||||
@@ -421,6 +438,14 @@ namespace Game.Network
|
||||
var sessionKeyGenerator = new SessionKeyGenerator(sessionKeyHmac.Digest, 32);
|
||||
sessionKeyGenerator.Generate(_sessionKey, 40);
|
||||
|
||||
HmacSha256 encryptKeyGen = new HmacSha256(_sessionKey);
|
||||
encryptKeyGen.Process(authSession.LocalChallenge, authSession.LocalChallenge.Count);
|
||||
encryptKeyGen.Process(_serverChallenge, 16);
|
||||
encryptKeyGen.Finish(EncryptionKeySeed, 16);
|
||||
|
||||
// only first 16 bytes of the hmac are used
|
||||
Buffer.BlockCopy(encryptKeyGen.Digest, 0, _encryptKey, 0, 16);
|
||||
|
||||
// As we don't know if attempted login process by ip works, we update last_attempt_ip right away
|
||||
PreparedStatement stmt = DB.Login.GetPreparedStatement(LoginStatements.UPD_LAST_ATTEMPT_IP);
|
||||
stmt.AddValue(0, address);
|
||||
@@ -537,7 +562,7 @@ namespace Game.Network
|
||||
// RBAC must be loaded before adding session to check for skip queue permission
|
||||
_worldSession.GetRBACData().LoadFromDBCallback(result);
|
||||
|
||||
SendPacket(new EnableEncryption());
|
||||
SendPacket(new EnableEncryption(_encryptKey, true));
|
||||
}
|
||||
|
||||
void HandleAuthContinuedSession(AuthContinuedSession authSession)
|
||||
@@ -589,7 +614,15 @@ namespace Game.Network
|
||||
return;
|
||||
}
|
||||
|
||||
SendPacket(new EnableEncryption());
|
||||
HmacSha256 encryptKeyGen = new HmacSha256(_sessionKey);
|
||||
encryptKeyGen.Process(authSession.LocalChallenge, authSession.LocalChallenge.Length);
|
||||
encryptKeyGen.Process(_serverChallenge, 16);
|
||||
encryptKeyGen.Finish(EncryptionKeySeed, 16);
|
||||
|
||||
// only first 16 bytes of the hmac are used
|
||||
Buffer.BlockCopy(encryptKeyGen.Digest, 0, _encryptKey, 0, 16);
|
||||
|
||||
SendPacket(new EnableEncryption(_encryptKey, true));
|
||||
}
|
||||
|
||||
void HandleConnectToFailed(ConnectToFailed connectToFailed)
|
||||
@@ -633,16 +666,11 @@ namespace Game.Network
|
||||
|
||||
void HandleEnableEncryptionAck()
|
||||
{
|
||||
_worldCrypt.Initialize(_encryptKey);
|
||||
if (_connectType == ConnectionType.Realm)
|
||||
{
|
||||
worldCrypt.Initialize(_sessionKey);
|
||||
Global.WorldMgr.AddSession(_worldSession);
|
||||
}
|
||||
else
|
||||
{
|
||||
worldCrypt.Initialize(_sessionKey, _encryptSeed, _decryptSeed);
|
||||
Global.WorldMgr.AddInstanceSocket(this, _key);
|
||||
}
|
||||
}
|
||||
|
||||
public void SendAuthResponseError(BattlenetRpcErrorCode code)
|
||||
@@ -701,10 +729,9 @@ namespace Game.Network
|
||||
ulong _key;
|
||||
|
||||
byte[] _serverChallenge;
|
||||
WorldCrypt worldCrypt;
|
||||
byte[] _encryptSeed;
|
||||
byte[] _decryptSeed;
|
||||
WorldCrypt _worldCrypt;
|
||||
byte[] _sessionKey;
|
||||
byte[] _encryptKey;
|
||||
|
||||
long _LastPingTime;
|
||||
uint _OverSpeedPings;
|
||||
|
||||
Reference in New Issue
Block a user