public void SaveToFile(ref FileStream file) { BinarySerializer.WriteUInt16(ref file, this.SkinColor); BinarySerializer.WriteUInt16(ref file, this.HairColor); BinarySerializer.WriteUInt16(ref file, this.JacketColor); BinarySerializer.WriteUInt16(ref file, this.PantsColor); BinarySerializer.WriteUInt16(ref file, this.HelmetColor); BinarySerializer.WriteUInt16(ref file, this.WeaponColor); BinarySerializer.WriteUInt16(ref file, this.ShieldColor); BinarySerializer.WriteUInt16(ref file, this.MotorcycleColor); BinarySerializer.WriteByte(ref file, this.Hair); BinarySerializer.WriteByte(ref file, this.Jacket); BinarySerializer.WriteByte(ref file, this.Pants); BinarySerializer.WriteByte(ref file, this.Helmet); BinarySerializer.WriteByte(ref file, this.Weapon); BinarySerializer.WriteByte(ref file, this.Shield); BinarySerializer.WriteByte(ref file, this.Motorcycle); }
public void SaveToFile(ref FileStream file) { //FrameID BinarySerializer.WriteUInt16(ref file, this.FrameID); //SpriteFilePosition BinarySerializer.WriteUInt32(ref file, this.SpriteFilePosition); //SpriteShadowFilePosition BinarySerializer.WriteUInt32(ref file, this.SpriteShadowFilePosition); //FirstSpriteID BinarySerializer.WriteUInt16(ref file, this.FirstSpriteID); //LastSpriteID BinarySerializer.WriteUInt16(ref file, this.LastSpriteID); //FirstShadowSpriteID BinarySerializer.WriteUInt16(ref file, this.FirstShadowSpriteID); //LastShadowSpriteID BinarySerializer.WriteUInt16(ref file, this.LastShadowSpriteID); }
public void SaveToFile(ref FileStream file) { //Name BinarySerializer.WriteString(ref file, Encoding.ASCII, this.Name); //SpriteTypes BinarySerializer.WriteInt32(ref file, this.SpriteTypes.Count); foreach (Int32 i in this.SpriteTypes) { BinarySerializer.WriteInt32(ref file, i); } //bMale BinarySerializer.WriteBool(ref file, this.bMale); //CreatureTribe BinarySerializer.WriteByte(ref file, (byte)this.CreatureTribe); //MoveTimes BinarySerializer.WriteByte(ref file, this.MoveTimes); //MoveRatio BinarySerializer.WriteByte(ref file, this.MoveRatio); //MoveTimesMotor BinarySerializer.WriteByte(ref file, this.MoveTimesMotor); //Height, Width BinarySerializer.WriteInt32(ref file, this.Height); BinarySerializer.WriteInt32(ref file, this.Width); //DeadHeight BinarySerializer.WriteInt32(ref file, this.DeadHeight); //DeadActionInfo BinarySerializer.WriteUInt16(ref file, this.DeadActionInfo); //ColorSet BinarySerializer.WriteInt32(ref file, this.ColorSet); //bFlyingCreature BinarySerializer.WriteBool(ref file, this.bFlyingCreature); //FlyingHeight BinarySerializer.WriteInt32(ref file, this.FlyingHeight); //bHeadCut BinarySerializer.WriteInt32(ref file, this.bHeadCut); //HPBarWidth BinarySerializer.WriteInt32(ref file, this.HPBarWidth); //ChangeColorSet BinarySerializer.WriteUInt16(ref file, this.ChangeColorSet); //ShadowCount BinarySerializer.WriteUInt16(ref file, this.ShadowCount); //EffectStatus BinarySerializer.WriteInt32(ref file, this.EffectStatus); //Level BinarySerializer.WriteInt32(ref file, this.Level); //ActionSound foreach (UInt16 i in this.ActionSound) { BinarySerializer.WriteUInt16(ref file, i); } //ActionCount foreach (Int32 i in this.ActionCount) { BinarySerializer.WriteInt32(ref file, i); } //ItemWearInfo if (this.ItemWearInfo == null) { BinarySerializer.WriteBool(ref file, false); } else { BinarySerializer.WriteBool(ref file, true); this.ItemWearInfo.SaveToFile(ref file); } //bFade BinarySerializer.WriteBool(ref file, this.bFade); //bFadeShadow BinarySerializer.WriteBool(ref file, this.bFadeShadow); //NewValue668 /*for (int i = 0; i < 8; i++) * BinarySerializer.WriteByte(ref file, this.NewValue668[i]);*/ }
public void SaveToFile(ref FileStream file) { //ID byte[] id = BitConverter.GetBytes(this.ID); file.Write(id, 0, id.Length); //Name BinarySerializer.WriteString(ref file, Encoding.ASCII, this.Name); //Property BinarySerializer.WriteByte(ref file, this.Property); //MusicID BinarySerializer.WriteUInt16(ref file, this.MusicID); //FileName BinarySerializer.WriteString(ref file, Encoding.ASCII, this.FileName); //InfoFileName BinarySerializer.WriteString(ref file, Encoding.ASCII, this.InfoFileName); //TeenFileName BinarySerializer.WriteString(ref file, Encoding.ASCII, this.TeenFileName); //SoundIDList BinarySerializer.WriteUInt32(ref file, (UInt32)this.SoundIDList.Count); for (int i = 0; i < this.SoundIDList.Count; i++) { BinarySerializer.WriteUInt16(ref file, this.SoundIDList[i]); } //Safety BinarySerializer.WriteBool(ref file, this.Safety); //CreatureColorSet BinarySerializer.WriteUInt16(ref file, this.CreatureColorSet); //MinimapSpriteID BinarySerializer.WriteUInt16(ref file, this.MinimapSpriteID); //HolyLand BinarySerializer.WriteBool(ref file, this.HolyLand); //ChatMaskByRace BinarySerializer.WriteBool(ref file, this.ChatMaskByRace); //CannotAttackInSafe BinarySerializer.WriteBool(ref file, this.CannotAttackInSafe); //CannotUseSpecialItem BinarySerializer.WriteBool(ref file, this.CannotUseSpecialItem); //CompetenceZone BinarySerializer.WriteBool(ref file, this.CompetenceZone); //PKType BinarySerializer.WriteByte(ref file, this.PKType); //WorldMapType BinarySerializer.WriteInt32(ref file, this.WorldMapType); if (this.WorldMapType == 0) { //PaymentType BinarySerializer.WriteInt32(ref file, this.PaymentType); //WorldMapPosition_X BinarySerializer.WriteInt32(ref file, this.WorldMapPosition_X); //WorldMapPosition_Y BinarySerializer.WriteInt32(ref file, this.WorldMapPosition_Y); //WorldMapPosition_Width BinarySerializer.WriteInt32(ref file, this.WorldMapPosition_Width); //WorldMapPosition_Height BinarySerializer.WriteInt32(ref file, this.WorldMapPosition_Height); //EncourageSlayerLevelMin BinarySerializer.WriteByte(ref file, EncourageSlayerLevelMin); //EncourageSlayerLevelMax BinarySerializer.WriteByte(ref file, EncourageSlayerLevelMax); //EncourageVampireLevelMin BinarySerializer.WriteByte(ref file, EncourageVampireLevelMin); //EncourageVampireLevelMax BinarySerializer.WriteByte(ref file, EncourageVampireLevelMax); //EncourageOustersLevelMin BinarySerializer.WriteByte(ref file, EncourageOustersLevelMin); //EncourageOustersLevelMax BinarySerializer.WriteByte(ref file, EncourageOustersLevelMax); //MiscDescription BinarySerializer.WriteString(ref file, Encoding.ASCII, this.MiscDescription); } //MapShapeList BinarySerializer.WriteByte(ref file, (byte)this.MapShapeList.Count); for (int i = 0; i < this.MapShapeList.Count; i++) { BinarySerializer.WriteString(ref file, Encoding.ASCII, this.MapShapeList[i]); } //NewValue668 /*BinarySerializer.WriteUInt32(ref file, (UInt32)this.NewValue668.Count); * * for (int i = 0; i < this.NewValue668.Count; i++) * { * BinarySerializer.WriteUInt32(ref file, this.NewValue668[i]); * }*/ }
public void SaveToFile(ref FileStream file) { //HName BinarySerializer.WriteString(ref file, Encoding.ASCII, this.HName); //EName BinarySerializer.WriteString(ref file, Encoding.ASCII, this.EName); //Description BinarySerializer.WriteString(ref file, Encoding.ASCII, this.Description); //FrameID's BinarySerializer.WriteUInt16(ref file, this.TileFrameID); BinarySerializer.WriteUInt16(ref file, this.InventoryFrameID); BinarySerializer.WriteUInt16(ref file, this.GearFrameID); BinarySerializer.WriteUInt16(ref file, this.DropFrameID); BinarySerializer.WriteUInt16(ref file, this.AddonMaleFrameID); BinarySerializer.WriteUInt16(ref file, this.AddonFemaleFrameID); BinarySerializer.WriteUInt16(ref file, this.UseFrameID); //SoundID's BinarySerializer.WriteUInt16(ref file, this.UseSoundID); BinarySerializer.WriteUInt16(ref file, this.TileSoundID); BinarySerializer.WriteUInt16(ref file, this.InventorySoundID); BinarySerializer.WriteUInt16(ref file, this.GearSoundID); //Grid Size BinarySerializer.WriteByte(ref file, this.GridWidth); BinarySerializer.WriteByte(ref file, this.GridHeight); //Price BinarySerializer.WriteUInt32(ref file, this.Price); //Weight BinarySerializer.WriteUInt16(ref file, this.Weight); //Values BinarySerializer.WriteInt32(ref file, this.Value1); BinarySerializer.WriteInt32(ref file, this.Value2); BinarySerializer.WriteInt32(ref file, this.Value3); BinarySerializer.WriteInt32(ref file, this.Value4); BinarySerializer.WriteInt32(ref file, this.Value5); BinarySerializer.WriteInt32(ref file, this.Value6); BinarySerializer.WriteInt32(ref file, this.Value7); //Requirements BinarySerializer.WriteByte(ref file, this.RequireSTR); BinarySerializer.WriteByte(ref file, this.RequireDEX); BinarySerializer.WriteByte(ref file, this.RequireINT); //RequireSUM BinarySerializer.WriteUInt16(ref file, this.RequireSUM); //RequireLevels BinarySerializer.WriteByte(ref file, this.RequireLevel); BinarySerializer.WriteByte(ref file, this.RequireAdvancementLevel); //Sex Restrictions BinarySerializer.WriteBool(ref file, this.bMaleOnly); BinarySerializer.WriteBool(ref file, this.bFemaleOnly); //UseActionInfo BinarySerializer.WriteUInt32(ref file, this.UseActionInfo); //Silver Max BinarySerializer.WriteInt32(ref file, this.SilverMax); //ToHit BinarySerializer.WriteInt32(ref file, this.ToHit); //Max Number BinarySerializer.WriteUInt32(ref file, this.MaxNumber); //Critical Hit BinarySerializer.WriteInt32(ref file, this.CriticalHit); //DefaultOptionsList BinarySerializer.WriteByte(ref file, (byte)this.DefaultOptionList.Count); foreach (byte b in this.DefaultOptionList) { BinarySerializer.WriteByte(ref file, b); } //ItemStyle BinarySerializer.WriteInt32(ref file, this.ItemStyle); //ElementalType BinarySerializer.WriteInt32(ref file, this.ElementalType); //Elemental BinarySerializer.WriteUInt16(ref file, this.Elemental); //Race BinarySerializer.WriteByte(ref file, this.Race); //DescriptionFrameID BinarySerializer.WriteUInt16(ref file, this.DescriptionFrameID); //ItemMoveControl BinarySerializer.WriteByte(ref file, this.ItemMoveControl); //ItemCanAdvance BinarySerializer.WriteByte(ref file, this.ItemCanAdvance); //DropItemNameTag BinarySerializer.WriteUInt32(ref file, this.DropItemNameTag); //NormalItemGrade BinarySerializer.WriteInt32(ref file, this.NormalItemGrade); //NewValue668 /*file.WriteByte((byte)this.NewValue668.Count); * foreach (byte b in NewValue668) * { * file.WriteByte(b); * }*/ }