| public static implicit operator byte[](SpawnPlayerPacket packet) |
| { |
| var buffer = new byte[245+ packet.Strings.Length + 8]; |
| fixed (byte* ptr = buffer) |
| { |
| PacketBuilder.AppendHeader(ptr, buffer.Length, 10014); |
| *((uint*) (ptr + 4)) = packet.Lookface; |
| *((uint*) (ptr + 8)) = packet.Id; |
| *((uint*) (ptr + 12)) = packet.GuildId; |
| *((GuildRank*) (ptr + 16)) = packet.GuildRank; |
| *((uint*) (ptr + 18)) = packet.Unknown18; |
| *((ulong*) (ptr + 22)) = packet.Effect1; |
| *((ulong*) (ptr + 30)) = packet.Effect2; |
| //all up 2 |
| *((uint*)(ptr + 44)) = packet.HelmetType; |
| *((uint*)(ptr + 48)) = packet.GarmentType; |
| *((uint*) (ptr + 52)) = packet.ArmorType; |
| *((uint*) (ptr + 56)) = packet.WeaponLType; |
| *((uint*) (ptr + 60)) = packet.WeaponRType; |
| *((uint*) (ptr + 68)) = packet.AccessoryRType; |
| *((uint*) (ptr + 64)) = packet.AccessoryLType; |
| *((uint*)(ptr + 72)) = packet.MountType; |
| *((uint*)(ptr + 76)) = packet.MountArmor; |
| *((ushort*)(ptr + 86)) = packet.Life; |
| *((ushort*)(ptr + 82)) = packet.MobLevel; |
| *((ushort*)(ptr + 98)) = packet.Hair; |
| *((ushort*)(ptr + 94)) = packet.PositionX; |
| *((ushort*)(ptr + 96)) = packet.PositionY; |
| *(ptr + 100) = packet.Direction; |
| *(ptr + 101) = packet.Action; |
| *((ushort*) (ptr + 94)) = packet.Unknown86; |
| *((uint*) (ptr + 96)) = packet.Unknown88; |
| *(ptr + 108) = packet.Rebirth; |
| *((ushort*) (ptr + 109)) = packet.Level; |
| *((uint*)(ptr + 112)) = packet.Away; |
| *(ptr + 133) = (byte) packet.Nobility; |
| *((ushort*)(ptr + 137)) = packet.ArmorColor; |
| *((ushort*)(ptr + 139)) = packet.ShieldColor; |
| *((ushort*)(ptr + 141)) = packet.HelmetColor; |
| *((uint*)(ptr + 143)) = packet.QuizPoints; |
| *((byte*)(ptr + 147)) = packet.MountPlus; |
| *((uint*)(ptr + 153)) = packet.MountColor; |
| *((PlayerTitle*)(ptr + 181)) = packet.Title; |
| if (packet.Boss) |
| *((byte*)(ptr + 181)) = 1; |
| *((uint*)(ptr + 196)) = packet.HelmetArtifactType; |
| *((uint*)(ptr + 200)) = packet.ArmorArtifactType; |
| *((uint*)(ptr + 204)) = packet.WeaponLArtifactType; |
| *((uint*)(ptr + 208)) = packet.WeaponRArtifactType; |
| //*((uint*)(ptr + 212)) = packet.ActiveSubClass; |
| //*((byte*)(ptr + 221)) = packet.FirstRebornClass; |
| //*((byte*) (ptr + 223)) = packet.SecondRebornClass; |
| *((byte*)(ptr + 225)) = packet.Profession; |
| PacketBuilder.AppendNetStringPacker(ptr + 234, packet.Strings); |
| } |
| return buffer; |
| } |