public BaseCraftWine(int itemID) : base(itemID) { m_Quality = WineQuality.Regular; m_Crafter = null; m_Variety = DefaultVariety; this.FillFactor = 4; }
public BaseCraftWine( int itemID ) : base(itemID) { m_Quality = WineQuality.Regular; m_Crafter = null; m_Variety = DefaultVariety; this.FillFactor = 4; }
public WineKeg( ) : base(0x1940) { this.Weight = 1.0; m_Held = 75; m_Quality = WineQuality.Regular; m_Crafter = null; m_Variety = DefaultVariety; m_BottleDuration = 7.0; m_AllowBottling = false; m_Start = DateTime.UtcNow; }
public WineKeg( ) : base(0x1940) { this.Weight = 1.0; m_Held = 75; m_Quality = WineQuality.Regular; m_Crafter = null; m_Variety = DefaultVariety; m_BottleDuration = 7.0; m_AllowBottling = false; m_Start = DateTime.Now; m_DateOfCreation = TimeSystem.Data.Year.ToString(); }
public override void Deserialize( GenericReader reader ) { base.Deserialize( reader ); int version = reader.ReadInt(); switch ( version ) { case 2: { SaveFlag flags = (SaveFlag)reader.ReadEncodedInt(); if ( GetSaveFlag( flags, SaveFlag.Crafter ) ) m_Crafter = reader.ReadMobile(); if ( GetSaveFlag( flags, SaveFlag.Quality ) ) m_Quality = (WineQuality)reader.ReadEncodedInt(); else m_Quality = WineQuality.Regular; if ( m_Quality == WineQuality.Low ) m_Quality = WineQuality.Regular; if ( GetSaveFlag( flags, SaveFlag.Variety ) ) m_Variety = (GrapeVariety)reader.ReadEncodedInt(); else m_Variety = DefaultVariety; if ( m_Variety == GrapeVariety.None ) m_Variety = DefaultVariety; goto case 1; } case 1: { m_Poisoner = reader.ReadMobile(); goto case 0; } case 0: { m_Poison = Poison.Deserialize( reader ); m_FillFactor = reader.ReadInt(); break; } } }
public override void Deserialize( GenericReader reader ) { base.Deserialize( reader ); int version = reader.ReadInt(); switch ( version ) { case 2: { m_Level = (SecureLevel)reader.ReadInt(); m_Start = reader.ReadDateTime(); m_BottleDuration = reader.ReadDouble(); m_AllowBottling = reader.ReadBool(); goto case 1; } case 1: { SaveFlag flags = (SaveFlag)reader.ReadEncodedInt(); if ( GetSaveFlag( flags, SaveFlag.Held ) ) m_Held = reader.ReadInt(); if ( GetSaveFlag( flags, SaveFlag.Crafter ) ) m_Crafter = reader.ReadMobile(); if ( GetSaveFlag( flags, SaveFlag.Quality ) ) m_Quality = (WineQuality)reader.ReadEncodedInt(); else m_Quality = WineQuality.Regular; if ( m_Quality == WineQuality.Low ) m_Quality = WineQuality.Regular; if ( GetSaveFlag( flags, SaveFlag.Variety ) ) m_Variety = (GrapeVariety)reader.ReadEncodedInt(); else m_Variety = DefaultVariety; if ( m_Variety == GrapeVariety.None ) m_Variety = DefaultVariety; break; } } }
public override void Deserialize( GenericReader reader ) { base.Deserialize( reader ); int version = reader.ReadInt(); switch ( version ) { case 2: { SaveFlag flags = (SaveFlag)reader.ReadEncodedInt(); if ( GetSaveFlag( flags, SaveFlag.Crafter ) ) m_Crafter = reader.ReadMobile(); if ( GetSaveFlag( flags, SaveFlag.Quality ) ) m_Quality = (WineQuality)reader.ReadEncodedInt(); else m_Quality = WineQuality.Regular; if ( m_Quality == WineQuality.Low ) m_Quality = WineQuality.Regular; if ( GetSaveFlag( flags, SaveFlag.Variety ) ) m_Variety = (GrapeVariety)reader.ReadEncodedInt(); else m_Variety = DefaultVariety; if ( m_Variety == GrapeVariety.None ) m_Variety = DefaultVariety; //break; goto case 1; } case 1: { m_Poisoner = reader.ReadMobile(); goto case 0; } case 0: { m_Poison = Poison.Deserialize( reader ); m_FillFactor = reader.ReadInt(); /* m_Crafter = reader.ReadMobile(); m_Quality = (WineQuality)reader.ReadInt(); if ( version >= 2 ) { m_Variety = (GrapeVariety)reader.ReadInt(); } else { WineGrapeInfo info; switch ( reader.ReadInt() ) { default: case 0: info = WineGrapeInfo.CabernetSauvignon; break; case 1: info = WineGrapeInfo.Chardonnay; break; case 2: info = WineGrapeInfo.CheninBlanc; break; case 3: info = WineGrapeInfo.Merlot; break; case 4: info = WineGrapeInfo.PinotNoir; break; case 5: info = WineGrapeInfo.Riesling; break; case 6: info = WineGrapeInfo.Sangiovese; break; case 7: info = WineGrapeInfo.SauvignonBlanc; break; case 8: info = WineGrapeInfo.Shiraz; break; case 9: info = WineGrapeInfo.Viognier; break; case 10: info = WineGrapeInfo.Zinfandel; break; } m_Variety = WinemakingResources.GetFromWineGrapeInfo( info ); } */ break; } } }
public override void Deserialize(GenericReader reader) { base.Deserialize(reader); int version = reader.ReadInt(); switch (version) { case 2: { m_Start = reader.ReadDateTime(); m_BottleDuration = reader.ReadDouble(); m_AllowBottling = reader.ReadBool(); goto case 1; } case 1: { SaveFlag flags = (SaveFlag)reader.ReadEncodedInt(); if (GetSaveFlag(flags, SaveFlag.Held)) { m_Held = reader.ReadInt(); } if (GetSaveFlag(flags, SaveFlag.Crafter)) { m_Crafter = reader.ReadMobile(); } if (GetSaveFlag(flags, SaveFlag.Quality)) { m_Quality = (WineQuality)reader.ReadEncodedInt(); } else { m_Quality = WineQuality.Regular; } if (m_Quality == WineQuality.Low) { m_Quality = WineQuality.Regular; } if (GetSaveFlag(flags, SaveFlag.Variety)) { m_Variety = (GrapeVariety)reader.ReadEncodedInt(); } else { m_Variety = DefaultVariety; } if (m_Variety == GrapeVariety.None) { m_Variety = DefaultVariety; } break; } } }
public override void Deserialize(GenericReader reader) { base.Deserialize(reader); int version = reader.ReadInt(); switch (version) { case 2: { SaveFlag flags = (SaveFlag)reader.ReadEncodedInt(); if (GetSaveFlag(flags, SaveFlag.Crafter)) { m_Crafter = reader.ReadMobile(); } if (GetSaveFlag(flags, SaveFlag.Quality)) { m_Quality = (WineQuality)reader.ReadEncodedInt(); } else { m_Quality = WineQuality.Regular; } if (m_Quality == WineQuality.Low) { m_Quality = WineQuality.Regular; } if (GetSaveFlag(flags, SaveFlag.Variety)) { m_Variety = (GrapeVariety)reader.ReadEncodedInt(); } else { m_Variety = DefaultVariety; } if (m_Variety == GrapeVariety.None) { m_Variety = DefaultVariety; } //break; goto case 1; } case 1: { m_Poisoner = reader.ReadMobile(); goto case 0; } case 0: { m_Poison = Poison.Deserialize(reader); m_FillFactor = reader.ReadInt(); /* * m_Crafter = reader.ReadMobile(); * m_Quality = (WineQuality)reader.ReadInt(); * * if ( version >= 2 ) * { * m_Variety = (GrapeVariety)reader.ReadInt(); * } * else * { * WineGrapeInfo info; * * switch ( reader.ReadInt() ) * { * default: * case 0: info = WineGrapeInfo.CabernetSauvignon; break; * case 1: info = WineGrapeInfo.Chardonnay; break; * case 2: info = WineGrapeInfo.CheninBlanc; break; * case 3: info = WineGrapeInfo.Merlot; break; * case 4: info = WineGrapeInfo.PinotNoir; break; * case 5: info = WineGrapeInfo.Riesling; break; * case 6: info = WineGrapeInfo.Sangiovese; break; * case 7: info = WineGrapeInfo.SauvignonBlanc; break; * case 8: info = WineGrapeInfo.Shiraz; break; * case 9: info = WineGrapeInfo.Viognier; break; * case 10: info = WineGrapeInfo.Zinfandel; break; * } * * m_Variety = WinemakingResources.GetFromWineGrapeInfo( info ); * } */ break; } } }
public override void Deserialize( GenericReader reader ) { base.Deserialize( reader ); int version = reader.ReadInt(); switch ( version ) { case 3: { m_DateOfCreation = reader.ReadString(); goto case 2; } case 2: { SaveFlag flags = (SaveFlag)reader.ReadEncodedInt(); if ( GetSaveFlag( flags, SaveFlag.Crafter ) ) m_Crafter = reader.ReadMobile(); if ( GetSaveFlag( flags, SaveFlag.Quality ) ) m_Quality = (WineQuality)reader.ReadEncodedInt(); else m_Quality = WineQuality.Regular; if ( m_Quality == WineQuality.Low ) m_Quality = WineQuality.Regular; if ( GetSaveFlag( flags, SaveFlag.Variety ) ) m_Variety = (GrapeVariety)reader.ReadEncodedInt(); else m_Variety = DefaultVariety; if ( m_Variety == GrapeVariety.None ) m_Variety = DefaultVariety; //break; goto case 1; } case 1: { m_Poisoner = reader.ReadMobile(); goto case 0; } case 0: { m_Poison = Poison.Deserialize( reader ); m_FillFactor = reader.ReadInt(); break; } } }