public override void Deserialize(GenericReader reader) { base.Deserialize(reader); int version = reader.ReadInt(); int length = reader.ReadInt(); m_Tiles = new MahjongTile[length]; for (int i = 0; i < length; i++) { m_Tiles[i] = new MahjongTile(this, reader); } m_DealerIndicator = new MahjongDealerIndicator(this, reader); m_WallBreakIndicator = new MahjongWallBreakIndicator(this, reader); m_Dices = new MahjongDices(this, reader); m_Players = new MahjongPlayers(this, reader); m_ShowScores = reader.ReadBool(); m_SpectatorVision = reader.ReadBool(); m_LastReset = DateTime.Now; }
public MahjongGame() : base(0xFAA) { Weight = 5.0; BuildWalls(); m_DealerIndicator = new MahjongDealerIndicator(this, new Point2D(300, 300), MahjongPieceDirection.Up, MahjongWind.North); m_WallBreakIndicator = new MahjongWallBreakIndicator(this, new Point2D(335, 335)); m_Dices = new MahjongDices(this); m_Players = new MahjongPlayers(this, MaxPlayers, BaseScore); m_LastReset = DateTime.Now; }
public MahjongGame() : base( 0xFAA ) { Weight = 5.0; BuildWalls(); m_DealerIndicator = new MahjongDealerIndicator( this, new Point2D( 300, 300 ), MahjongPieceDirection.Up, MahjongWind.North ); m_WallBreakIndicator = new MahjongWallBreakIndicator( this, new Point2D( 335, 335 ) ); m_Dices = new MahjongDices( this ); m_Players = new MahjongPlayers( this, MaxPlayers, BaseScore ); m_LastReset = DateTime.Now; m_Level = SecureLevel.CoOwners; }
public MahjongGame() : base(0xFAA) { Weight = 5.0; BuildWalls(); DealerIndicator = new MahjongDealerIndicator(this, new Point2D(300, 300), MahjongPieceDirection.Up, MahjongWind.North); WallBreakIndicator = new MahjongWallBreakIndicator(this, new Point2D(335, 335)); Dices = new MahjongDices(this); Players = new MahjongPlayers(this, MaxPlayers, BaseScore); m_LastReset = Core.Now; Level = SecureLevel.CoOwners; }
public override void Deserialize(GenericReader reader) { base.Deserialize(reader); int version = reader.ReadInt(); switch (version) { case 1: { m_Level = (SecureLevel)reader.ReadInt(); goto case 0; } case 0: { if (version < 1) { m_Level = SecureLevel.CoOwners; } int length = reader.ReadInt(); m_Tiles = new MahjongTile[length]; for (int i = 0; i < length; i++) { m_Tiles[i] = new MahjongTile(this, reader); } m_DealerIndicator = new MahjongDealerIndicator(this, reader); m_WallBreakIndicator = new MahjongWallBreakIndicator(this, reader); m_Dices = new MahjongDices(this, reader); m_Players = new MahjongPlayers(this, reader); m_ShowScores = reader.ReadBool(); m_SpectatorVision = reader.ReadBool(); m_LastReset = DateTime.Now; break; } } }
public void ResetGame(Mobile from) { if (DateTime.Now - m_LastReset < TimeSpan.FromSeconds(5.0)) { return; } m_LastReset = DateTime.Now; if (from != null) { m_Players.SendLocalizedMessage(1062771, from.Name); // ~1_name~ has reset the game. } m_Players.SendRelievePacket(true, true); BuildWalls(); m_DealerIndicator = new MahjongDealerIndicator(this, new Point2D(300, 300), MahjongPieceDirection.Up, MahjongWind.North); m_WallBreakIndicator = new MahjongWallBreakIndicator(this, new Point2D(335, 335)); m_Players = new MahjongPlayers(this, MaxPlayers, BaseScore); }
public override void Deserialize( GenericReader reader ) { base.Deserialize( reader ); int version = reader.ReadInt(); switch ( version ) { case 1: { m_Level = (SecureLevel)reader.ReadInt(); goto case 0; } case 0: { if ( version < 1 ) m_Level = SecureLevel.CoOwners; int length = reader.ReadInt(); m_Tiles = new MahjongTile[length]; for ( int i = 0; i < length; i++ ) m_Tiles[i] = new MahjongTile( this, reader ); m_DealerIndicator = new MahjongDealerIndicator( this, reader ); m_WallBreakIndicator = new MahjongWallBreakIndicator( this, reader ); m_Dices = new MahjongDices( this, reader ); m_Players = new MahjongPlayers( this, reader ); m_ShowScores = reader.ReadBool(); m_SpectatorVision = reader.ReadBool(); m_LastReset = DateTime.UtcNow; break; } } }
public void ResetGame( Mobile from ) { if ( DateTime.UtcNow - m_LastReset < TimeSpan.FromSeconds( 5.0 ) ) return; m_LastReset = DateTime.UtcNow; if ( from != null ) m_Players.SendLocalizedMessage( 1062771, from.Name ); // ~1_name~ has reset the game. m_Players.SendRelievePacket( true, true ); BuildWalls(); m_DealerIndicator = new MahjongDealerIndicator( this, new Point2D( 300, 300 ), MahjongPieceDirection.Up, MahjongWind.North ); m_WallBreakIndicator = new MahjongWallBreakIndicator( this, new Point2D( 335, 335 ) ); m_Players = new MahjongPlayers( this, MaxPlayers, BaseScore ); }
public override void Deserialize( GenericReader reader ) { base.Deserialize( reader ); int version = reader.ReadInt(); int length = reader.ReadInt(); m_Tiles = new MahjongTile[length]; for ( int i = 0; i < length; i++ ) { m_Tiles[i] = new MahjongTile( this, reader ); } m_DealerIndicator = new MahjongDealerIndicator( this, reader ); m_WallBreakIndicator = new MahjongWallBreakIndicator( this, reader ); m_Dices = new MahjongDices( this, reader ); m_Players = new MahjongPlayers( this, reader ); m_ShowScores = reader.ReadBool(); m_SpectatorVision = reader.ReadBool(); m_LastReset = DateTime.Now; }