mu3-mods/SortByInternalDifficulty/MU3.User/patch_UserDetail.cs

21 lines
727 B
C#

using MU3.Client;
using MU3.DB;
namespace MU3.User;
class patch_UserDetail: UserDetail {
public extern void orig_copyTo(UserData userDetail);
public new void copyTo(UserData userDetail) {
orig_copyTo(userDetail);
// Attempting to use a profile with InternalLevel sorting enabled
// causes unpatched clients to crash thanks to enormous incompetence
// of Sxga's interns. So, unfortunately, this value has to be discarded.
// See:
// * MusicSelectViewDataList._sort1 set
// * UserDetail.copyFrom()
if(userDetail.tabSetting == (int)patch_MusicSort1ID.InternalLevel) {
userDetail.tabSetting = (int)patch_MusicSort1ID.Level;
}
}
}