diff --git a/serverlogic/src/main/java/com/ljsd/jieling/handler/GetCrossServerHandler.java b/serverlogic/src/main/java/com/ljsd/jieling/handler/GetCrossServerHandler.java new file mode 100644 index 000000000..755481b65 --- /dev/null +++ b/serverlogic/src/main/java/com/ljsd/jieling/handler/GetCrossServerHandler.java @@ -0,0 +1,28 @@ +package com.ljsd.jieling.handler; + +import com.google.protobuf.GeneratedMessage; +import com.ljsd.jieling.logic.GlobleSystemLogic; +import rpc.protocols.MessageTypeProto; +import rpc.protocols.PlayerInfoProto; + +/** + * @Author hj + * @Date 2021/7/28 16:36:26 + * @Description: 跨服信息 + * @Version 1.0 + */ +public class GetCrossServerHandler extends BaseHandler { + + @Override + public MessageTypeProto.MessageType getMessageCode() { + return MessageTypeProto.MessageType.GetCrossServerRequest; + } + + @Override + public GeneratedMessage processWithProto(int uid, PlayerInfoProto.IsCrossRequert proto) throws Exception { + int crossGroup = GlobleSystemLogic.getInstence().getCrossGroup(); + int result = crossGroup == -1 ? 0 : 1; + return PlayerInfoProto.IsCrossResponse.newBuilder().setIsCross(result).build(); + } + +}