internal void OnPlayerStateChange(GamePlayer player) { GamePlayer[] list; if (player.CurrentGameState == ePlayerGameState.FINISH && Data != null) { list = Data.GetAllPlayers(); } else { list = GetAllPlayers(); } GSPacketIn pkg = null; foreach (GamePlayer p in list) { if (pkg == null) { pkg = p.Out.SendGamePlayerChangedState(player); } else { p.Out.SendTCP(pkg); } } _processor.OnPlayerStateChanged(this, player); }