Exemplo n.º 1
0
        public static DeathDataPacket ReadDeathDataPacket(this PacketReader reader)
        {
            var data = new DeathDataPacket();

            data.KillerNetID   = reader.ReadNetID();
            data.DamageType    = reader.ReadDamageType();
            data.DamageSource  = reader.ReadDamageSource();
            data.DeathDuration = reader.ReadFloat();
            data.Bitfield      = reader.ReadByte();
            data.DieType       = reader.ReadByte();
            return(data);
        }
Exemplo n.º 2
0
 public static void WriteDeathDataPacket(this PacketWriter writer, DeathDataPacket data)
 {
     if (data == null)
     {
         data = new DeathDataPacket();
     }
     writer.WriteNetID(data.KillerNetID);
     writer.WriteDamageType(data.DamageType);
     writer.WriteDamageSource(data.DamageSource);
     writer.WriteFloat(data.DeathDuration);
     writer.WriteByte(data.Bitfield);
     writer.WriteByte(data.DieType);
 }