public SocketGuild[] GetChoGuilds(char c) { SocketGuild[] guild; string cho = new KoreanChar(c).GetChoSung().GetChar().ToString(); if ("ㄱㄲㄴㄷㄸㄹ".Contains(cho)) { guild = Program.Guilds[0].Select(g => Program.client.GetGuild(g)).ToArray(); } else if ("ㅁㅂㅃㅅㅆ".Contains(cho)) { guild = Program.Guilds[1].Select(g => Program.client.GetGuild(g)).ToArray(); } else if ("ㅇㅈㅉ".Contains(cho)) { guild = Program.Guilds[2].Select(g => Program.client.GetGuild(g)).ToArray(); } else if ("ㅊㅋㅌㅍㅎ".Contains(cho)) { guild = Program.Guilds[3].Select(g => Program.client.GetGuild(g)).ToArray(); } else { guild = Program.Guilds[4].Select(g => Program.client.GetGuild(g)).ToArray(); } return(guild); }
public string GetName(string text) { string name = ""; foreach (char c in text) { if (alpha.Contains(c.ToString())) { name += c; continue; } KoreanChar kc = new KoreanChar(c); foreach (KoreanChar sung in new[] { kc.GetChoSung(), kc.GetJoongSung(), kc.GetJongSung() }) { string s = sung.GetChar().ToString(); if (kor.Contains(s)) { name += eng[Array.IndexOf(kor, s)]; } } } return(name); }
public SocketGuild GetChoGuild(char c) { SocketGuild[] guild; string cho = new KoreanChar(c).GetChoSung().GetChar().ToString(); if ("ㄱㄲㄴㄷㄸㄹ".Contains(cho)) { guild = Program.Guilds[0].Select(g => Program.client.GetGuild(g)).ToArray(); } else if ("ㅁㅂㅃㅅㅆ".Contains(cho)) { guild = Program.Guilds[1].Select(g => Program.client.GetGuild(g)).ToArray(); } else if ("ㅇㅈㅉ".Contains(cho)) { guild = Program.Guilds[2].Select(g => Program.client.GetGuild(g)).ToArray(); } else if ("ㅊㅋㅌㅍㅎ".Contains(cho)) { guild = Program.Guilds[3].Select(g => Program.client.GetGuild(g)).ToArray(); } else { guild = Program.Guilds[4].Select(g => Program.client.GetGuild(g)).ToArray(); } SocketGuild grr = null; foreach (SocketGuild gl in guild) { if (gl.Emotes.Count < 100) { grr = gl; break; } } return(grr); }