public static void smethod_6(string ServerID) { Dictionary <string, playerS> dictionary; ArrayList list = new ArrayList(); lock ((dictionary = Players)) { foreach (playerS rs in Players.Values) { if (rs.ServerID == ServerID) { list.Add(rs); } } } foreach (playerS rs2 in list) { RxjhClass.SetUserIdONLINE(rs2.UserId); rs2.npcyd.Dispose(); lock ((dictionary = Players)) { Players.Remove(rs2.UserId); } } }
public static void smethod_2(string Userid) { playerS rs = smethod_3(Userid); if (rs != null) { RxjhClass.SetUserIdONLINE(rs.UserId); lock (Players) { Players.Remove(rs.UserId); } } }
public void npcyd_Elapsed(object sender, ElapsedEventArgs e) { if (this.conn == 1) { RxjhClass.SetUserIdONLINE(this.UserId); lock (World.Players) { World.Players.Remove(this.UserId); } } this.npcyd.Close(); this.npcyd.Dispose(); }