public override bool OnMoveOver(Mobile m) { if (Altar == null || m.AccessLevel > AccessLevel.GameMaster) { return(base.OnMoveOver(m)); } if (AccessList != null && AccessList.Contains(m)) { return(base.OnMoveOver(m)); } return(true); }
public void AddToAccessList(Mobile from) { if (!AccessList.Contains(from)) { AccessList.Add(from); } if (ShameAltar.AllowParties) { Party p = Party.Get(from); if (p != null) { foreach (PartyMemberInfo info in p.Members.Where(info => !AccessList.Contains(info.Mobile))) { AccessList.Add(info.Mobile); } } } //Timer.DelayCall(TimeSpan.FromMinutes(ShameAltar.CoolDown), ClearAccessList); }
private async void Refresh() { var roleViewModels = await _userService.GetRoles(); var roles = new List <RoleModel>(); foreach (var item in roleViewModels) { var role = new RoleModel { Id = item.Id, RoleName = item.Name, }; roles.Add(role); } foreach (var item in roles) { item.IsChecked = AccessList.Contains(item.Id); } DataSource = new ObservableCollection <RoleModel>(roles); }