internal static void HandleLfgSpam(S_PARTY_MATCH_LINK x) { if (x.Message.IndexOf("WTB", 0, StringComparison.InvariantCultureIgnoreCase) != -1) return; if (x.Message.IndexOf("WTS", 0, StringComparison.InvariantCultureIgnoreCase) != -1) return; if (x.Message.IndexOf("WTT", 0, StringComparison.InvariantCultureIgnoreCase) != -1) return; ChatWindowManager.Instance.AddOrRefreshLfg(x); }
public void AddOrRefreshLfg(S_PARTY_MATCH_LINK x) { if (TryGetLfg(x.Id, x.Message, x.Name, out var lfg)) { lfg.Message = x.Message; lfg.Refresh(); } else { LFGs.Add(new LFG(x.Id, x.Name, x.Message, x.Raid)); } }
private void OnPartyMatchLink(S_PARTY_MATCH_LINK m) { Task.Run(() => { if (m.Message.IndexOf("WTB", 0, StringComparison.InvariantCultureIgnoreCase) != -1) { return; } if (m.Message.IndexOf("WTS", 0, StringComparison.InvariantCultureIgnoreCase) != -1) { return; } if (m.Message.IndexOf("WTT", 0, StringComparison.InvariantCultureIgnoreCase) != -1) { return; } AddOrRefreshLfg(m.ListingData); AddLfgMessage(m.Id, m.Name, m.Message); }); }