public async Task ClubAdminGradeChangeReq(GameSession session, ClubAdminGradeChangeReqMessage message) { var plr = session.Player; var club = plr.Club; if (club == null || club.Id <= 0 || plr.Club.Players[plr.Account.Id].Rank > ClubRank.Staff) { await session.SendAsync(new ServerResultAckMessage(ServerResult.CantReadClanInfo)); } using (var db = GameDatabase.Open()) { var clubrank = db.Find <ClubPlayerDto>(statement => statement .Where($"{nameof(ClubPlayerDto.PlayerId):C} = @{nameof(message.Unk)}") .WithParameters(new { message.Unk })).FirstOrDefault(); if (clubrank.Rank == 4) { await plr.Club.ChangeStaffStatus(message.Target, true); } else { await plr.Club.ChangeStaffStatus(message.Target, false); } await plr.SendAsync(new ClubAdminGradeChangeAckMessage(0, message.Target)); } }
public async Task ClubAdminGradeChangeReq(GameSession session, ClubAdminGradeChangeReqMessage message) { Logger.Information($"ClubAdminGradeChangeReqMessage => " + message.Unk); var plr = session.Player; if (plr.Club?.Id > 0) { if (plr.Club.Players[plr.Account.Id].Rank <= ClubRank.Staff) { } } await session.SendAsync(new ServerResultAckMessage(ServerResult.CantReadClanInfo)); }