卸载称号

back_recharge
duhui 2021-06-02 14:25:11 +08:00
parent b879921365
commit e1bcb8e739
1 changed files with 7 additions and 2 deletions

View File

@ -476,7 +476,12 @@ public class PlayerLogic {
user.getPlayerInfoManager().setHead(decorationId); user.getPlayerInfoManager().setHead(decorationId);
break; break;
case 2: case 2:
Long time2 = user.getPlayerInfoManager().getUserTitleValidTime().get(decorationId); Long time2;
if (decorationId == 0){
time2 = 0L;
}else {
time2 = user.getPlayerInfoManager().getUserTitleValidTime().get(decorationId);
}
if (time2 == null){ if (time2 == null){
throw new ErrorCodeException(ErrorCode.newDefineCode("无此称号")); throw new ErrorCodeException(ErrorCode.newDefineCode("无此称号"));
} }
@ -486,7 +491,7 @@ public class PlayerLogic {
user.getPlayerInfoManager().setUserTitle(decorationId); user.getPlayerInfoManager().setUserTitle(decorationId);
break; break;
case 3: case 3:
Long time3 = null; Long time3;
if(decorationId == 0){ if(decorationId == 0){
time3 = 0L; time3 = 0L;
}else{ }else{