Пример #1
0
        internal void Update(SaveIO.SaveWriter writer)
        {
            writer.SeekTo(_dataPosition + 0x2C);
            writer.WriteByte(_team);

            writer.SeekTo(_dataPosition + 0x343);
            writer.WriteByte(_blind ? (byte)1 : (byte)0);
            writer.WriteByte(_deaf ? (byte)1 : (byte)0);
        }
Пример #2
0
        internal void Update(SaveIO.SaveWriter writer)
        {
            writer.SeekTo(_dataPosition + 2);
            writer.WriteInt16((short)_flags.Data);

            /*writer.SeekTo(_dataPosition + 0xA0);
             * writer.WriteUInt32(_actorIndex);*/

            writer.SeekTo(_dataPosition + 0xE7);
            writer.WriteByte(_team);
        }
Пример #3
0
        protected override void DoUpdate(SaveIO.SaveWriter writer, long start)
        {
            base.DoUpdate(writer, start);

            // Actor
            writer.Seek(start + 0x1BC, SeekOrigin.Begin);
            if (_actor != null)
            {
                writer.WriteUInt32(_actor.DatumIndex);
            }
            else
            {
                writer.WriteUInt32(0xFFFFFFFF);
            }

            // Unit flags
            writer.Seek(start + 0x1C4, SeekOrigin.Begin);
            writer.WriteInt32(_unitFlags.Data);

            // Team
            writer.Seek(start + 0x1C8, SeekOrigin.Begin);
            writer.WriteByte(_team);

            // Write weapon index info
            writer.Seek(start + 0x340, SeekOrigin.Begin);
            writer.WriteUInt16((ushort)(_weapons.Count + 2));
            writer.WriteSByte(_currentWeaponIndex);
            writer.Skip(1);

            writer.WriteUInt16((ushort)(_weapons.Count + 2));
            writer.WriteSByte(_backupWeaponIndex);
            writer.Skip(1);

            // Write the weapon list
            foreach (WeaponObject weapon in _weapons)
            {
                writer.WriteUInt32(weapon.ID);
            }

            // Write empty spots
            for (int i = _weapons.Count; i < 4; i++)
            {
                writer.WriteUInt32(0xFFFFFFFF);
            }
        }