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

            data.PackageHash        = reader.ReadUInt32();
            data.EffectNameHash     = reader.ReadUInt32();
            data.Flags              = reader.ReadUInt16();
            data.TargetBoneNameHash = reader.ReadUInt32();
            data.BoneNameHash       = reader.ReadUInt32();
            int count = reader.ReadByte();

            for (int i = 0; i < count; i++)
            {
                data.FXCreateData.Add(reader.ReadFXCreateData());
            }
            return(data);
        }
Exemplo n.º 2
0
        public static void WriteFXCreateGroupData(this PacketWriter writer, FXCreateGroupData data)
        {
            writer.WriteUInt32(data.PackageHash);
            writer.WriteUInt32(data.EffectNameHash);
            writer.WriteUInt16(data.Flags);
            writer.WriteUInt32(data.TargetBoneNameHash);
            writer.WriteUInt32(data.BoneNameHash);
            int count = data.FXCreateData.Count;

            if (count > 0xFF)
            {
                throw new IOException("FXCreateData list too big > 255!");
            }
            writer.WriteByte((byte)count);
            foreach (var fx in data.FXCreateData)
            {
                writer.WriteFXCreateData(fx);
            }
        }