public void SetAnglerAttendance(bool isAttending) { if (isAttending) { NotAttending.Remove(App.User); Attending.Add(App.User); } else { Attending.Remove(App.User); NotAttending.Add(App.User); } }
/// <summary> /// Adds a player to the raid group. /// If the user is already in the raid group, their party size is updated. /// Will update attend size or remote size, not both /// </summary> /// <param name="player">Player to add.</param> /// <param name="attendSize">Number of accounts attending in person.</param> /// <param name="remoteSize">Number of accounts attending via remote.</param> public void AddPlayer(SocketGuildUser player, int attendSize, int remoteSize) { if (!Invited.ContainsKey(player)) { if (Attending.ContainsKey(player)) { if (remoteSize == Global.NO_ADD_VALUE) { Attending[player] = SetValue(attendSize, GetRemote(Attending[player])); } else if (attendSize == Global.NO_ADD_VALUE) { Attending[player] = SetValue(GetAttending(Attending[player]), remoteSize); } } else if (Ready.ContainsKey(player)) { if (remoteSize == Global.NO_ADD_VALUE) { Ready[player] = SetValue(attendSize, GetRemote(Ready[player])); } else if (attendSize == Global.NO_ADD_VALUE) { Ready[player] = SetValue(GetAttending(Ready[player]), remoteSize); } } else { int attend = (attendSize == Global.NO_ADD_VALUE) ? 0 : attendSize; int remote = (remoteSize == Global.NO_ADD_VALUE) ? 0 : remoteSize; int partySize = (remote << Global.REMOTE_SHIFT) | attend; if (partySize != 0) { Attending.Add(player, partySize); } } } }