From e1bcb8e739f5d121ae71ce73fd6c824c81c9000e Mon Sep 17 00:00:00 2001 From: duhui Date: Wed, 2 Jun 2021 14:25:11 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=B8=E8=BD=BD=E7=A7=B0=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ljsd/jieling/logic/player/PlayerLogic.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/serverlogic/src/main/java/com/ljsd/jieling/logic/player/PlayerLogic.java b/serverlogic/src/main/java/com/ljsd/jieling/logic/player/PlayerLogic.java index 9a149b5f0..6b2229587 100644 --- a/serverlogic/src/main/java/com/ljsd/jieling/logic/player/PlayerLogic.java +++ b/serverlogic/src/main/java/com/ljsd/jieling/logic/player/PlayerLogic.java @@ -476,7 +476,12 @@ public class PlayerLogic { user.getPlayerInfoManager().setHead(decorationId); break; 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){ throw new ErrorCodeException(ErrorCode.newDefineCode("无此称号")); } @@ -486,7 +491,7 @@ public class PlayerLogic { user.getPlayerInfoManager().setUserTitle(decorationId); break; case 3: - Long time3 = null; + Long time3; if(decorationId == 0){ time3 = 0L; }else{