forked from akanyan/mu3-mods
53 lines
1.8 KiB
C#
53 lines
1.8 KiB
C#
using MU3.DB;
|
|
using MU3.Game;
|
|
using MU3.User;
|
|
using MU3.Util;
|
|
using System;
|
|
|
|
namespace MU3;
|
|
class patch_BattleUI: BattleUI {
|
|
private UIRetireInfo _retireInfo;
|
|
private SessionInfo _sessionInfo;
|
|
public new void setRetireInfo(UserOption.eAbort abort) {
|
|
UIRetireInfo.Rank rank;
|
|
int num;
|
|
|
|
var pabort = (patch_UserOption.eAbort)abort;
|
|
switch(pabort) {
|
|
case patch_UserOption.eAbort.S:
|
|
rank = UIRetireInfo.Rank.S;
|
|
num = 1010000 - TechnicalRankID.S.getLower();
|
|
break;
|
|
case patch_UserOption.eAbort.SS:
|
|
rank = UIRetireInfo.Rank.SS;
|
|
num = 1010000 - TechnicalRankID.SS.getLower();
|
|
break;
|
|
case patch_UserOption.eAbort.SSS:
|
|
rank = UIRetireInfo.Rank.SSS;
|
|
num = 1010000 - TechnicalRankID.SSS.getLower();
|
|
break;
|
|
case patch_UserOption.eAbort.SSS1:
|
|
rank = UIRetireInfo.Rank.S;
|
|
num = 1010000 - TechnicalRankID.SSS1.getLower();
|
|
break;
|
|
case patch_UserOption.eAbort.PB:
|
|
UserManager userManager = Singleton<UserManager>.instance;
|
|
var userFumen = userManager.getUserFumen(_sessionInfo.musicData.id, _sessionInfo.musicLevel, create: false);
|
|
var previousPb = userFumen?.TechScoreMax ?? 0;
|
|
rank = UIRetireInfo.Rank.S;
|
|
num = 1010000 - Math.Max(previousPb, TechnicalRankID.AA.getLower());
|
|
break;
|
|
case patch_UserOption.eAbort.FB:
|
|
case patch_UserOption.eAbort.AA:
|
|
rank = UIRetireInfo.Rank.S;
|
|
num = 1010000 - TechnicalRankID.AA.getLower();
|
|
break;
|
|
default:
|
|
rank = UIRetireInfo.Rank.MAX;
|
|
num = 0;
|
|
break;
|
|
}
|
|
_retireInfo.setupRetireInfo(rank, num);
|
|
}
|
|
}
|