获取是否跨服
parent
12a9fe7d7b
commit
44b3b2881f
|
|
@ -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<PlayerInfoProto.IsCrossRequert> {
|
||||
|
||||
@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();
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue