渔民小镇 1 rok pred
rodič
commit
ff6a5a0fef

+ 2 - 1
common/common-core/src/main/java/com/iohao/mmo/common/config/GameCode.java

@@ -33,7 +33,8 @@ public enum GameCode implements MsgExceptionInfo {
 
     /** 地图不存在 */
     MAP_NOT_EXIST(1, "地图不存在"),
-    UP_LEVEL_ERROR(2, "升级错误");
+    /** 升级错误,经验值不足 */
+    UP_LEVEL_ERROR(2, "升级错误,经验值不足");
 
     /** 消息码 */
     final int code;

+ 3 - 2
logic/level-logic/src/main/java/com/iohao/mmo/level/action/LevelAction.java

@@ -23,9 +23,9 @@ import com.iohao.game.action.skeleton.annotation.ActionMethod;
 import com.iohao.game.action.skeleton.core.CmdInfo;
 import com.iohao.game.action.skeleton.core.commumication.BroadcastContext;
 import com.iohao.game.action.skeleton.core.exception.ActionErrorEnum;
+import com.iohao.game.action.skeleton.core.flow.FlowContext;
 import com.iohao.game.bolt.broker.core.client.BrokerClientHelper;
 import com.iohao.mmo.common.config.GameCode;
-import com.iohao.mmo.common.core.flow.MyFlowContext;
 import com.iohao.mmo.level.cmd.LevelCmd;
 import com.iohao.mmo.level.entity.Level;
 import com.iohao.mmo.level.entity.PersonLevelConfig;
@@ -105,9 +105,10 @@ public class LevelAction {
      * 玩家手动点升级,升级后会恢复各种状态
      *
      * @param flowContext flowContext
+     * @return 等级信息
      */
     @ActionMethod(LevelCmd.personUpLevel)
-    public LevelMessage upLevelPerson(MyFlowContext flowContext) {
+    public LevelMessage upLevelPerson(FlowContext flowContext) {
         long userId = flowContext.getUserId();
 
         Level level = levelService.ofLevel(userId);