public override void Deserialize(GenericReader reader) { base.Deserialize(reader); int version = reader.ReadInt(); switch (version) { case 1: { SaveFlag flags = (SaveFlag)reader.ReadInt(); if (GetSaveFlag(flags, SaveFlag.Quality)) { m_Quality = (FurnitureQuality)reader.ReadInt(); } else { m_Quality = FurnitureQuality.Regular; } if (GetSaveFlag(flags, SaveFlag.Crafter)) { m_Crafter = reader.ReadMobile(); } if (GetSaveFlag(flags, SaveFlag.Resource)) { m_Resource = (CraftResource)reader.ReadInt(); } else { m_Resource = CraftResource.Log; } if (GetSaveFlag(flags, SaveFlag.PlayerConstructed)) { m_PlayerConstructed = true; } break; } case 0: { m_Quality = (FurnitureQuality)reader.ReadInt(); m_Crafter = reader.ReadMobile(); break; } } }
public BaseFurniture( int itemID ) : base( itemID ) { m_Quality = FurnitureQuality.Regular; }
public override void Deserialize( GenericReader reader ) { base.Deserialize( reader ); int version = reader.ReadInt(); switch ( version ) { case 1: { SaveFlag flags = (SaveFlag)reader.ReadInt(); if ( GetSaveFlag( flags, SaveFlag.Quality ) ) m_Quality = (FurnitureQuality)reader.ReadInt(); else m_Quality = FurnitureQuality.Regular; if ( GetSaveFlag( flags, SaveFlag.Crafter ) ) m_Crafter = reader.ReadMobile(); if ( GetSaveFlag( flags, SaveFlag.Resource ) ) m_Resource = (CraftResource)reader.ReadInt(); else m_Resource = CraftResource.Log; if ( GetSaveFlag( flags, SaveFlag.PlayerConstructed ) ) m_PlayerConstructed = true; break; } case 0: { m_Quality = (FurnitureQuality)reader.ReadInt(); m_Crafter = reader.ReadMobile(); break; } } }
public BaseFurniture(int itemID) : base(itemID) { m_Quality = FurnitureQuality.Regular; }