void Test() { for (int i = 0; i < 35; i++) { UserAdmin info = new UserAdmin(i, "palyer" + i, 0); if (i == 0) { info.AddPrivileges(AdminMask.AdminRole); } ServerAdministrator.UserAdminList.Add(info); } }
public static void BuildLock(int playerId) { UserAdmin ua = UserAdminList.Find(iter => iter.Id == playerId); if (null == ua) { return; } ua.AddPrivileges(AdminMask.BuildLock); OnPrivilegesChanged(ua); // if (null != GameGui_N.Instance) // GameGui_N.Instance.mPersonnelManageGui.OnPersonnelInfoChange(); }
public static void AddAssistant(int playerId) { UserAdmin ua = UserAdminList.Find(iter => iter.Id == playerId); if (null == ua) { return; } ua.RemovePrivileges(AdminMask.BlackRole); ua.AddPrivileges(AdminMask.AssistRole); OnPrivilegesChanged(ua); // if (null != GameGui_N.Instance) // GameGui_N.Instance.mPersonnelManageGui.OnPersonnelInfoChange(); }