跨服服务器通信初版完成
parent
360a8c51e0
commit
4d9a185be5
|
|
@ -2,7 +2,8 @@ plugins {
|
|||
id 'java'
|
||||
}
|
||||
|
||||
group 'com.ljsd'
|
||||
group 'com.gamecommon'
|
||||
version '1.0.0-SNAPSHOT'
|
||||
|
||||
sourceCompatibility = 1.8
|
||||
|
||||
|
|
@ -19,4 +20,18 @@ dependencies {
|
|||
}
|
||||
jar {
|
||||
baseName = 'gamecommon'
|
||||
}
|
||||
//依赖编译,然后打包JAR
|
||||
task taskJar(type:Jar, dependsOn: compileJava) {
|
||||
from 'build/classes/main'
|
||||
destinationDir = file('build/libs')
|
||||
}
|
||||
//删除lib中的jar
|
||||
task clearJars(type:Delete){
|
||||
delete 'lib'
|
||||
}
|
||||
|
||||
task copyJars(type: Copy, dependsOn:clearJars) {
|
||||
from configurations.runtime
|
||||
into 'lib' // 目标位置
|
||||
}
|
||||
|
|
@ -19,28 +19,28 @@ import java.util.Map;
|
|||
public abstract class GlobalProtocolsManager {
|
||||
|
||||
public static final Logger LOGGER = LoggerFactory.getLogger(GlobalProtocolsManager.class);
|
||||
private static Map<Integer, _gtGBaseHandler> handlers = new HashMap<>();
|
||||
private static Map<Integer, gtGBaseHandler> handlers = new HashMap<>();
|
||||
|
||||
public static void initHandler(String pck) {
|
||||
public static void initHandler(String pck,ClassLoader classLoader) {
|
||||
List<Class<?>> handlers = new LinkedList<>();
|
||||
try {
|
||||
try {
|
||||
ClassLoaderHelper.findLocalClass(pck, _gtGBaseHandler.class, Thread.currentThread().getContextClassLoader(), handlers);
|
||||
ClassLoaderHelper.findLocalClass(pck, gtGBaseHandler.class, classLoader, handlers);
|
||||
} catch (RuntimeException e) {
|
||||
LOGGER.info("request unknow RuntimeException {} ", ErrorPrintUtil.getExceptionStackTraceFileLineAndMethod(e));
|
||||
}
|
||||
try {
|
||||
ClassLoaderHelper.findClassJar(pck, _gtGBaseHandler.class, Thread.currentThread().getContextClassLoader(), handlers);
|
||||
ClassLoaderHelper.findClassJar(pck, gtGBaseHandler.class,classLoader, handlers);
|
||||
} catch (RuntimeException e) {
|
||||
LOGGER.info("request unknow RuntimeException {} ", ErrorPrintUtil.getExceptionStackTraceFileLineAndMethod(e));
|
||||
}
|
||||
|
||||
handlers.forEach(hand ->
|
||||
{
|
||||
_gtGBaseHandler baseHandler = null;
|
||||
gtGBaseHandler baseHandler = null;
|
||||
|
||||
try {
|
||||
baseHandler = (_gtGBaseHandler) hand.newInstance();
|
||||
baseHandler = (gtGBaseHandler) hand.newInstance();
|
||||
} catch (Exception ex) {
|
||||
LOGGER.info("request unknow Exception {} ", ErrorPrintUtil.getExceptionStackTraceFileLineAndMethod(ex));
|
||||
}
|
||||
|
|
@ -65,7 +65,7 @@ public abstract class GlobalProtocolsManager {
|
|||
}
|
||||
|
||||
|
||||
private static void addHandler(_gtGBaseHandler handler) {
|
||||
private static void addHandler(gtGBaseHandler handler) {
|
||||
String simpleName = handler.getClass().getSimpleName();
|
||||
int index = simpleName.indexOf("Handler");
|
||||
if (index != -1) {
|
||||
|
|
@ -81,7 +81,7 @@ public abstract class GlobalProtocolsManager {
|
|||
}
|
||||
|
||||
|
||||
protected static Map<Integer, _gtGBaseHandler> getHandlers() {
|
||||
protected static Map<Integer, gtGBaseHandler> getHandlers() {
|
||||
return handlers;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,4 +41,14 @@ public class RpcMessage {
|
|||
public ByteBuffer getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "RpcMessage{" +
|
||||
"serverId=" + serverId +
|
||||
", uid=" + uid +
|
||||
", protpId=" + protpId +
|
||||
", message=" + message +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import com.google.protobuf.GeneratedMessage;
|
|||
import com.google.protobuf.Parser;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import rpc.protocols.MessageTypeProto;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.ParameterizedType;
|
||||
|
|
@ -14,12 +15,12 @@ import java.nio.ByteBuffer;
|
|||
* Author: zsx
|
||||
* CreateDate: 2020/11/18 21:12
|
||||
*/
|
||||
public abstract class _gtGBaseHandler<T extends GeneratedMessage> {
|
||||
public abstract class gtGBaseHandler<T extends GeneratedMessage> {
|
||||
|
||||
private Class<T> protoClazz;
|
||||
public static final Logger LOGGER = LoggerFactory.getLogger(_gtGBaseHandler.class);
|
||||
public static final Logger LOGGER = LoggerFactory.getLogger(gtGBaseHandler.class);
|
||||
|
||||
public _gtGBaseHandler() {
|
||||
public gtGBaseHandler() {
|
||||
getTClassIsNull();
|
||||
}
|
||||
|
||||
|
|
@ -30,7 +31,18 @@ public abstract class _gtGBaseHandler<T extends GeneratedMessage> {
|
|||
if(generatedMessage==null){
|
||||
return null;
|
||||
}
|
||||
return new RpcMessage(rpc.getServerId(), rpc.getProtpId(), ByteBuffer.wrap(generatedMessage.toByteArray()));
|
||||
return new RpcMessage(rpc.getServerId(), getProtoIdBySimpleName(generatedMessage.getClass().getSimpleName()), ByteBuffer.wrap(generatedMessage.toByteArray()));
|
||||
}
|
||||
|
||||
public static int getProtoIdBySimpleName(String name){
|
||||
try {
|
||||
MessageTypeProto.MessageType messageType = MessageTypeProto.MessageType.valueOf(name);
|
||||
return messageType.getNumber();
|
||||
}catch (IllegalArgumentException e){
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
|
|
@ -33814,6 +33814,26 @@ public final class CommonProto {
|
|||
* <code>optional int32 headFrame = 8;</code>
|
||||
*/
|
||||
int getHeadFrame();
|
||||
|
||||
// optional int32 serverId = 9;
|
||||
/**
|
||||
* <code>optional int32 serverId = 9;</code>
|
||||
*/
|
||||
boolean hasServerId();
|
||||
/**
|
||||
* <code>optional int32 serverId = 9;</code>
|
||||
*/
|
||||
int getServerId();
|
||||
|
||||
// optional int32 worshipTime = 10;
|
||||
/**
|
||||
* <code>optional int32 worshipTime = 10;</code>
|
||||
*/
|
||||
boolean hasWorshipTime();
|
||||
/**
|
||||
* <code>optional int32 worshipTime = 10;</code>
|
||||
*/
|
||||
int getWorshipTime();
|
||||
}
|
||||
/**
|
||||
* Protobuf type {@code rpc.protocols.ArenaPersonInfo}
|
||||
|
|
@ -33906,6 +33926,16 @@ public final class CommonProto {
|
|||
headFrame_ = input.readInt32();
|
||||
break;
|
||||
}
|
||||
case 72: {
|
||||
bitField0_ |= 0x00000100;
|
||||
serverId_ = input.readInt32();
|
||||
break;
|
||||
}
|
||||
case 80: {
|
||||
bitField0_ |= 0x00000200;
|
||||
worshipTime_ = input.readInt32();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
|
|
@ -34109,6 +34139,38 @@ public final class CommonProto {
|
|||
return headFrame_;
|
||||
}
|
||||
|
||||
// optional int32 serverId = 9;
|
||||
public static final int SERVERID_FIELD_NUMBER = 9;
|
||||
private int serverId_;
|
||||
/**
|
||||
* <code>optional int32 serverId = 9;</code>
|
||||
*/
|
||||
public boolean hasServerId() {
|
||||
return ((bitField0_ & 0x00000100) == 0x00000100);
|
||||
}
|
||||
/**
|
||||
* <code>optional int32 serverId = 9;</code>
|
||||
*/
|
||||
public int getServerId() {
|
||||
return serverId_;
|
||||
}
|
||||
|
||||
// optional int32 worshipTime = 10;
|
||||
public static final int WORSHIPTIME_FIELD_NUMBER = 10;
|
||||
private int worshipTime_;
|
||||
/**
|
||||
* <code>optional int32 worshipTime = 10;</code>
|
||||
*/
|
||||
public boolean hasWorshipTime() {
|
||||
return ((bitField0_ & 0x00000200) == 0x00000200);
|
||||
}
|
||||
/**
|
||||
* <code>optional int32 worshipTime = 10;</code>
|
||||
*/
|
||||
public int getWorshipTime() {
|
||||
return worshipTime_;
|
||||
}
|
||||
|
||||
private void initFields() {
|
||||
uid_ = 0;
|
||||
level_ = 0;
|
||||
|
|
@ -34118,6 +34180,8 @@ public final class CommonProto {
|
|||
rank_ = 0;
|
||||
totalForce_ = 0;
|
||||
headFrame_ = 0;
|
||||
serverId_ = 0;
|
||||
worshipTime_ = 0;
|
||||
}
|
||||
private byte memoizedIsInitialized = -1;
|
||||
public final boolean isInitialized() {
|
||||
|
|
@ -34155,6 +34219,12 @@ public final class CommonProto {
|
|||
if (((bitField0_ & 0x00000080) == 0x00000080)) {
|
||||
output.writeInt32(8, headFrame_);
|
||||
}
|
||||
if (((bitField0_ & 0x00000100) == 0x00000100)) {
|
||||
output.writeInt32(9, serverId_);
|
||||
}
|
||||
if (((bitField0_ & 0x00000200) == 0x00000200)) {
|
||||
output.writeInt32(10, worshipTime_);
|
||||
}
|
||||
getUnknownFields().writeTo(output);
|
||||
}
|
||||
|
||||
|
|
@ -34196,6 +34266,14 @@ public final class CommonProto {
|
|||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeInt32Size(8, headFrame_);
|
||||
}
|
||||
if (((bitField0_ & 0x00000100) == 0x00000100)) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeInt32Size(9, serverId_);
|
||||
}
|
||||
if (((bitField0_ & 0x00000200) == 0x00000200)) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeInt32Size(10, worshipTime_);
|
||||
}
|
||||
size += getUnknownFields().getSerializedSize();
|
||||
memoizedSerializedSize = size;
|
||||
return size;
|
||||
|
|
@ -34328,6 +34406,10 @@ public final class CommonProto {
|
|||
bitField0_ = (bitField0_ & ~0x00000040);
|
||||
headFrame_ = 0;
|
||||
bitField0_ = (bitField0_ & ~0x00000080);
|
||||
serverId_ = 0;
|
||||
bitField0_ = (bitField0_ & ~0x00000100);
|
||||
worshipTime_ = 0;
|
||||
bitField0_ = (bitField0_ & ~0x00000200);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
|
@ -34388,6 +34470,14 @@ public final class CommonProto {
|
|||
to_bitField0_ |= 0x00000080;
|
||||
}
|
||||
result.headFrame_ = headFrame_;
|
||||
if (((from_bitField0_ & 0x00000100) == 0x00000100)) {
|
||||
to_bitField0_ |= 0x00000100;
|
||||
}
|
||||
result.serverId_ = serverId_;
|
||||
if (((from_bitField0_ & 0x00000200) == 0x00000200)) {
|
||||
to_bitField0_ |= 0x00000200;
|
||||
}
|
||||
result.worshipTime_ = worshipTime_;
|
||||
result.bitField0_ = to_bitField0_;
|
||||
onBuilt();
|
||||
return result;
|
||||
|
|
@ -34430,6 +34520,12 @@ public final class CommonProto {
|
|||
if (other.hasHeadFrame()) {
|
||||
setHeadFrame(other.getHeadFrame());
|
||||
}
|
||||
if (other.hasServerId()) {
|
||||
setServerId(other.getServerId());
|
||||
}
|
||||
if (other.hasWorshipTime()) {
|
||||
setWorshipTime(other.getWorshipTime());
|
||||
}
|
||||
this.mergeUnknownFields(other.getUnknownFields());
|
||||
return this;
|
||||
}
|
||||
|
|
@ -34778,6 +34874,72 @@ public final class CommonProto {
|
|||
return this;
|
||||
}
|
||||
|
||||
// optional int32 serverId = 9;
|
||||
private int serverId_ ;
|
||||
/**
|
||||
* <code>optional int32 serverId = 9;</code>
|
||||
*/
|
||||
public boolean hasServerId() {
|
||||
return ((bitField0_ & 0x00000100) == 0x00000100);
|
||||
}
|
||||
/**
|
||||
* <code>optional int32 serverId = 9;</code>
|
||||
*/
|
||||
public int getServerId() {
|
||||
return serverId_;
|
||||
}
|
||||
/**
|
||||
* <code>optional int32 serverId = 9;</code>
|
||||
*/
|
||||
public Builder setServerId(int value) {
|
||||
bitField0_ |= 0x00000100;
|
||||
serverId_ = value;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>optional int32 serverId = 9;</code>
|
||||
*/
|
||||
public Builder clearServerId() {
|
||||
bitField0_ = (bitField0_ & ~0x00000100);
|
||||
serverId_ = 0;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
// optional int32 worshipTime = 10;
|
||||
private int worshipTime_ ;
|
||||
/**
|
||||
* <code>optional int32 worshipTime = 10;</code>
|
||||
*/
|
||||
public boolean hasWorshipTime() {
|
||||
return ((bitField0_ & 0x00000200) == 0x00000200);
|
||||
}
|
||||
/**
|
||||
* <code>optional int32 worshipTime = 10;</code>
|
||||
*/
|
||||
public int getWorshipTime() {
|
||||
return worshipTime_;
|
||||
}
|
||||
/**
|
||||
* <code>optional int32 worshipTime = 10;</code>
|
||||
*/
|
||||
public Builder setWorshipTime(int value) {
|
||||
bitField0_ |= 0x00000200;
|
||||
worshipTime_ = value;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>optional int32 worshipTime = 10;</code>
|
||||
*/
|
||||
public Builder clearWorshipTime() {
|
||||
bitField0_ = (bitField0_ & ~0x00000200);
|
||||
worshipTime_ = 0;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:rpc.protocols.ArenaPersonInfo)
|
||||
}
|
||||
|
||||
|
|
@ -36043,10 +36205,18 @@ public final class CommonProto {
|
|||
// optional int32 score = 3;
|
||||
/**
|
||||
* <code>optional int32 score = 3;</code>
|
||||
*
|
||||
* <pre>
|
||||
*跨服排名 -1
|
||||
* </pre>
|
||||
*/
|
||||
boolean hasScore();
|
||||
/**
|
||||
* <code>optional int32 score = 3;</code>
|
||||
*
|
||||
* <pre>
|
||||
*跨服排名 -1
|
||||
* </pre>
|
||||
*/
|
||||
int getScore();
|
||||
|
||||
|
|
@ -36287,12 +36457,20 @@ public final class CommonProto {
|
|||
private int score_;
|
||||
/**
|
||||
* <code>optional int32 score = 3;</code>
|
||||
*
|
||||
* <pre>
|
||||
*跨服排名 -1
|
||||
* </pre>
|
||||
*/
|
||||
public boolean hasScore() {
|
||||
return ((bitField0_ & 0x00000004) == 0x00000004);
|
||||
}
|
||||
/**
|
||||
* <code>optional int32 score = 3;</code>
|
||||
*
|
||||
* <pre>
|
||||
*跨服排名 -1
|
||||
* </pre>
|
||||
*/
|
||||
public int getScore() {
|
||||
return score_;
|
||||
|
|
@ -36788,18 +36966,30 @@ public final class CommonProto {
|
|||
private int score_ ;
|
||||
/**
|
||||
* <code>optional int32 score = 3;</code>
|
||||
*
|
||||
* <pre>
|
||||
*跨服排名 -1
|
||||
* </pre>
|
||||
*/
|
||||
public boolean hasScore() {
|
||||
return ((bitField0_ & 0x00000004) == 0x00000004);
|
||||
}
|
||||
/**
|
||||
* <code>optional int32 score = 3;</code>
|
||||
*
|
||||
* <pre>
|
||||
*跨服排名 -1
|
||||
* </pre>
|
||||
*/
|
||||
public int getScore() {
|
||||
return score_;
|
||||
}
|
||||
/**
|
||||
* <code>optional int32 score = 3;</code>
|
||||
*
|
||||
* <pre>
|
||||
*跨服排名 -1
|
||||
* </pre>
|
||||
*/
|
||||
public Builder setScore(int value) {
|
||||
bitField0_ |= 0x00000004;
|
||||
|
|
@ -36809,6 +36999,10 @@ public final class CommonProto {
|
|||
}
|
||||
/**
|
||||
* <code>optional int32 score = 3;</code>
|
||||
*
|
||||
* <pre>
|
||||
*跨服排名 -1
|
||||
* </pre>
|
||||
*/
|
||||
public Builder clearScore() {
|
||||
bitField0_ = (bitField0_ & ~0x00000004);
|
||||
|
|
@ -100082,198 +100276,199 @@ public final class CommonProto {
|
|||
"reallyOpen\030\004 \001(\005\032A\n\013MissionInfo\022\021\n\tmissi" +
|
||||
"onId\030\001 \002(\005\022\020\n\010progress\030\002 \002(\005\022\r\n\005state\030\003 " +
|
||||
"\002(\005\"=\n\nGmResponse\022!\n\004drop\030\001 \001(\0132\023.rpc.pr" +
|
||||
"otocols.Drop\022\014\n\004info\030\002 \001(\t\"\215\001\n\017ArenaPers" +
|
||||
"otocols.Drop\022\014\n\004info\030\002 \001(\t\"\264\001\n\017ArenaPers" +
|
||||
"onInfo\022\013\n\003uid\030\001 \001(\005\022\r\n\005level\030\002 \001(\005\022\014\n\004na" +
|
||||
"me\030\003 \001(\t\022\r\n\005score\030\004 \001(\005\022\014\n\004head\030\005 \001(\005\022\014\n" +
|
||||
"\004rank\030\006 \001(\005\022\022\n\ntotalForce\030\007 \001(\005\022\021\n\theadF" +
|
||||
"rame\030\010 \001(\005\"\027\n\004Team\022\017\n\007heroTid\030\001 \003(\005\"c\n\nA" +
|
||||
"renaEnemy\0222\n\npersonInfo\030\001 \001(\0132\036.rpc.prot" +
|
||||
"ocols.ArenaPersonInfo\022!\n\004team\030\002 \001(\0132\023.rp",
|
||||
"c.protocols.Team\"\205\001\n\tArenaInfo\022\020\n\010failNu" +
|
||||
"ms\030\001 \001(\005\022\023\n\013successNums\030\002 \001(\005\022\r\n\005score\030\003" +
|
||||
" \001(\005\022.\n\013arenaEnemys\030\004 \003(\0132\031.rpc.protocol" +
|
||||
"s.ArenaEnemy\022\022\n\nhadTakeBox\030\005 \003(\005\"\'\n\tStor" +
|
||||
"eItem\022\n\n\002id\030\001 \001(\005\022\016\n\006buyNum\030\002 \001(\005\"\201\001\n\tSt" +
|
||||
"oreInfo\022\n\n\002id\030\001 \001(\005\022\027\n\017lastRefreshTime\030\002" +
|
||||
" \001(\003\022\021\n\tstartTime\030\004 \001(\003\022\017\n\007endTime\030\005 \001(\003" +
|
||||
"\022+\n\tstoreItem\030\006 \003(\0132\030.rpc.protocols.Stor" +
|
||||
"eItem\"\221\001\n\017ArenaRecordInfo\022\n\n\002id\030\001 \001(\t\0222\n" +
|
||||
"\nattackInfo\030\002 \001(\0132\036.rpc.protocols.ArenaP",
|
||||
"ersonInfo\022\022\n\nattackTime\030\003 \001(\005\022\025\n\rmyScore" +
|
||||
"Change\030\004 \001(\005\022\023\n\013fightResult\030\005 \001(\005\"Z\n\016Fun" +
|
||||
"ctionOfTime\022\022\n\nfunctionId\030\001 \001(\005\022\021\n\tstart" +
|
||||
"Time\030\002 \001(\005\022\017\n\007endTime\030\003 \001(\005\022\020\n\010interval\030" +
|
||||
"\004 \001(\005\"~\n\025AdventureRankItemInfo\022\r\n\005level\030" +
|
||||
"\001 \001(\005\022\014\n\004name\030\002 \001(\t\022\014\n\004hurt\030\003 \001(\005\022\014\n\004hea" +
|
||||
"d\030\004 \001(\005\022\014\n\004rank\030\005 \001(\005\022\021\n\theadFrame\030\006 \001(\005" +
|
||||
"\022\013\n\003uid\030\007 \001(\005\"\313\001\n\021AdventureBossInfo\022\017\n\007a" +
|
||||
"renaId\030\001 \001(\005\022\017\n\007findUid\030\002 \001(\005\022\020\n\010findNam" +
|
||||
"e\030\003 \001(\t\022\016\n\006bossId\030\004 \001(\t\022\023\n\013bossGroupId\030\005",
|
||||
" \001(\005\022\016\n\006myHurt\030\006 \001(\005\022\021\n\tlevelTime\030\007 \001(\005\022" +
|
||||
"\017\n\007totalHp\030\010 \001(\005\022\025\n\rbossRemainlHp\030\t \001(\005\022" +
|
||||
"\022\n\narenaLevel\030\n \001(\005\"v\n\017UserMissionInfo\022\021" +
|
||||
"\n\tmissionId\030\001 \001(\005\022\020\n\010progress\030\002 \001(\005\022\r\n\005s" +
|
||||
"tate\030\003 \001(\005\022\014\n\004type\030\004 \001(\005\022\021\n\ttakeTimes\030\005 " +
|
||||
"\001(\005\022\016\n\006heroId\030\006 \003(\t\"8\n\013VipBaseInfo\022\020\n\010vi" +
|
||||
"pLevel\030\001 \001(\005\022\027\n\017hadTakeLevelBox\030\002 \001(\005\"\250\001" +
|
||||
"\n\006Friend\022\n\n\002id\030\001 \001(\005\022\014\n\004name\030\002 \001(\t\022\n\n\002lv" +
|
||||
"\030\003 \001(\005\022\023\n\013offLineTime\030\004 \001(\004\022\022\n\nhaveRewar" +
|
||||
"d\030\005 \001(\005\022\016\n\006isGive\030\006 \001(\005\022\021\n\tisApplyed\030\007 \001",
|
||||
"(\005\022\014\n\004head\030\014 \001(\005\022\r\n\005frame\030\r \001(\005\022\017\n\007soulV" +
|
||||
"al\030\016 \001(\005\"o\n\rGiftGoodsInfo\022\017\n\007goodsId\030\001 \001" +
|
||||
"(\005\022\020\n\010buyTimes\030\002 \001(\005\022\021\n\tstartTime\030\003 \001(\005\022" +
|
||||
"\017\n\007endTime\030\004 \001(\005\022\027\n\017dynamicBuyTimes\030\005 \001(" +
|
||||
"\005\"7\n\021GoodsTypeDuration\022\021\n\tgoodsType\030\001 \001(" +
|
||||
"\005\022\017\n\007endTime\030\002 \001(\005\"/\n\016TechnologyInfo\022\016\n\006" +
|
||||
"techId\030\001 \001(\005\022\r\n\005levle\030\002 \001(\005\"J\n\020SuddenlyB" +
|
||||
"ossInfo\022\022\n\nsuddBossId\030\006 \001(\005\022\017\n\007endTime\030\007" +
|
||||
" \001(\005\022\021\n\tfindMapId\030\010 \001(\005\"H\n\010ItemInfo\022\022\n\nt" +
|
||||
"emplateId\030\001 \001(\005\022\017\n\007overlap\030\002 \001(\005\022\027\n\017next",
|
||||
"RefreshTime\030\003 \001(\005\"H\n\010RankInfo\022\014\n\004rank\030\001 " +
|
||||
"\001(\005\022\016\n\006param1\030\002 \001(\003\022\016\n\006param2\030\003 \001(\005\022\016\n\006p" +
|
||||
"aram3\030\004 \001(\005\"\306\001\n\010UserRank\022\013\n\003uid\030\001 \001(\005\022\r\n" +
|
||||
"\005level\030\002 \001(\005\022\014\n\004head\030\003 \001(\005\022\020\n\010userName\030\004" +
|
||||
" \001(\t\022)\n\010rankInfo\030\005 \001(\0132\027.rpc.protocols.R" +
|
||||
"ankInfo\022\021\n\theadFrame\030\006 \001(\005\022\021\n\tguildName\030" +
|
||||
"\007 \001(\t\022\r\n\005force\030\010 \001(\005\022\021\n\tguildSign\030\t \001(\005\022" +
|
||||
"\013\n\003sex\030\n \001(\005\"\204\001\n\025ActorEffectBufferInfo\022\n" +
|
||||
"\n\002id\030\001 \001(\005\022\014\n\004type\030\002 \001(\005\022\021\n\tstartTime\030\003 " +
|
||||
"\001(\005\022\017\n\007endTime\030\004 \001(\005\022\016\n\006target\030\005 \001(\005\022\016\n\006",
|
||||
"caster\030\006 \001(\005\022\r\n\005value\030\007 \003(\005\"T\n\016BloodyHer" +
|
||||
"oInfo\022\016\n\006heroId\030\001 \001(\t\022\016\n\006heroHp\030\002 \001(\005\022\021\n" +
|
||||
"\theroMaxHp\030\003 \001(\005\022\017\n\007heroTid\030\004 \001(\005\"%\n\010Sce" +
|
||||
"neMsg\022\014\n\004time\030\001 \001(\005\022\013\n\003msg\030\002 \001(\t\"\'\n\nPosM" +
|
||||
"ineral\022\013\n\003pos\030\001 \001(\005\022\014\n\004nums\030\002 \001(\005\"\247\001\n\010Cr" +
|
||||
"eature\022\014\n\004path\030\001 \003(\005\022\r\n\005speed\030\002 \001(\005\022\r\n\005m" +
|
||||
"axHp\030\003 \001(\005\022\r\n\005curHp\030\004 \001(\005\022\017\n\007mineral\030\005 \001" +
|
||||
"(\005\022\014\n\004camp\030\006 \001(\005\022/\n\010heroInfo\030\007 \003(\0132\035.rpc" +
|
||||
".protocols.BloodyHeroInfo\022\020\n\010killNums\030\010 " +
|
||||
"\001(\005\"\202\001\n\nSceneActor\022\n\n\002id\030\001 \001(\005\022\016\n\006curPos",
|
||||
"\030\002 \001(\005\022\r\n\005state\030\003 \001(\005\022\014\n\004type\030\004 \001(\005\022)\n\010C" +
|
||||
"reature\030\006 \001(\0132\027.rpc.protocols.Creature\022\020" +
|
||||
"\n\010userName\030\007 \001(\t\"\367\001\n\tSceneInfo\022\016\n\006roomId" +
|
||||
"\030\001 \001(\005\022\r\n\005mapId\030\002 \001(\005\022-\n\nSceneActor\030\003 \003(" +
|
||||
"\0132\031.rpc.protocols.SceneActor\022C\n\025actorEff" +
|
||||
"ectBufferInfo\030\004 \003(\0132$.rpc.protocols.Acto" +
|
||||
"rEffectBufferInfo\022\024\n\014barrierPoint\030\005 \003(\005\022" +
|
||||
"-\n\nposMineral\030\006 \003(\0132\031.rpc.protocols.PosM" +
|
||||
"ineral\022\022\n\nremainTime\030\007 \001(\005\"F\n\027SceneGetFu" +
|
||||
"llMsgResponse\022+\n\tsceneInfo\030\001 \001(\0132\030.rpc.p",
|
||||
"rotocols.SceneInfo\"B\n\013blessReward\022\022\n\nloc" +
|
||||
"ationId\030\001 \001(\005\022\r\n\005state\030\002 \001(\005\022\020\n\010rewardId" +
|
||||
"\030\003 \001(\005\"5\n\022fiveResetTowerInfo\022\r\n\005tower\030\001 " +
|
||||
"\001(\005\022\020\n\010intoType\030\002 \001(\005\";\n\020FamilyContribut" +
|
||||
"e\022\013\n\003win\030\001 \001(\005\022\014\n\004draw\030\002 \001(\005\022\014\n\004fail\030\003 \001" +
|
||||
"(\005\"\211\002\n\016FamilyBaseInfo\022\n\n\002id\030\001 \001(\005\022\014\n\004nam" +
|
||||
"e\030\002 \001(\t\022\017\n\007annouce\030\003 \001(\t\022\r\n\005levle\030\004 \001(\005\022" +
|
||||
"\013\n\003exp\030\005 \001(\005\022\020\n\010totalNum\030\006 \001(\005\022\016\n\006maxNum" +
|
||||
"\030\007 \001(\005\022\020\n\010joinType\030\010 \001(\005\022\014\n\004icon\030\t \001(\005\022\021" +
|
||||
"\n\tlevelTime\030\n \001(\005\0224\n\013fightResult\030\013 \001(\0132\037",
|
||||
".rpc.protocols.FamilyContribute\022\027\n\017playe" +
|
||||
"rIntoLevel\030\014 \001(\005\022\014\n\004fete\030\r \001(\005\")\n\013endles" +
|
||||
"sHero\022\016\n\006heroId\030\001 \001(\t\022\n\n\002hp\030\002 \001(\005\"2\n\022End" +
|
||||
"lessRefreshInfo\022\016\n\006cellId\030\001 \001(\005\022\014\n\004time\030" +
|
||||
"\002 \001(\005\"u\n\014UseForceInfo\022\014\n\004name\030\001 \001(\t\022\014\n\004l" +
|
||||
"eve\030\002 \001(\005\022\r\n\005force\030\003 \001(\005\022\014\n\004rank\030\004 \001(\005\022\014" +
|
||||
"\n\004head\030\005 \001(\005\022\021\n\theadFrame\030\006 \001(\005\022\013\n\003uid\030\007" +
|
||||
" \001(\005\"H\n\013endlessSign\022\r\n\005mapId\030\001 \001(\005\022\016\n\006ce" +
|
||||
"llId\030\002 \001(\005\022\014\n\004info\030\003 \001(\t\022\014\n\004type\030\004 \001(\005\"g" +
|
||||
"\n\nExpertInfo\022\014\n\004name\030\001 \001(\t\022\r\n\005score\030\002 \001(",
|
||||
"\005\022\014\n\004rank\030\003 \001(\005\022\r\n\005level\030\004 \001(\005\022\014\n\004head\030\005" +
|
||||
" \001(\005\022\021\n\theadFrame\030\006 \001(\005\")\n\nSignInInfo\022\014\n" +
|
||||
"\004days\030\001 \001(\005\022\r\n\005state\030\002 \001(\005\"p\n\016TeamSimple" +
|
||||
"Info\022\016\n\006heroid\030\001 \001(\t\022\017\n\007heroTid\030\002 \001(\005\022\014\n" +
|
||||
"\004star\030\003 \001(\005\022\r\n\005level\030\004 \001(\005\022\020\n\010position\030\005" +
|
||||
" \001(\005\022\016\n\006skinId\030\006 \001(\005\"\231\001\n\017TeamOneTeamInfo" +
|
||||
"\022+\n\004team\030\001 \003(\0132\035.rpc.protocols.TeamSimpl" +
|
||||
"eInfo\0223\n\014PokemonInfos\030\002 \003(\0132\035.rpc.protoc" +
|
||||
"ols.TeamSimpleInfo\022\022\n\ntotalForce\030\003 \001(\005\022\020" +
|
||||
"\n\010remainHp\030\004 \003(\005\"\254\001\n\013TeamOneInfo\022\013\n\003uid\030",
|
||||
"\001 \001(\005\022\r\n\005level\030\002 \001(\005\022\014\n\004name\030\003 \001(\t\022\014\n\004he" +
|
||||
"ad\030\004 \001(\005\022\021\n\theadFrame\030\005 \001(\005\022\021\n\tguildName" +
|
||||
"\030\007 \001(\t\022,\n\004team\030\006 \001(\0132\036.rpc.protocols.Tea" +
|
||||
"mOneTeamInfo\022\021\n\tisApplyed\030\010 \001(\005\"y\n\017Monst" +
|
||||
"erRankInfo\022\014\n\004name\030\001 \001(\t\022\r\n\005score\030\002 \001(\005\022" +
|
||||
"\014\n\004rank\030\003 \001(\005\022\r\n\005level\030\004 \001(\005\022\014\n\004head\030\005 \001" +
|
||||
"(\005\022\021\n\theadFrame\030\006 \001(\005\022\013\n\003uid\030\007 \001(\005\"2\n\rHe" +
|
||||
"roBloodInfo\022\016\n\006heroId\030\001 \001(\t\022\021\n\tlostBlood" +
|
||||
"\030\002 \001(\005\"D\n\013EndlessInfo\022\r\n\005mapId\030\001 \001(\005\022\022\n\n" +
|
||||
"worldLevel\030\002 \001(\005\022\022\n\nbloodScore\030\003 \001(\005\"2\n\017",
|
||||
"PlayerBindPhone\022\020\n\010phoneNum\030\001 \001(\t\022\r\n\005sta" +
|
||||
"te\030\002 \001(\005\"3\n\014EndlessPoint\022\020\n\010location\030\001 \001" +
|
||||
"(\005\022\021\n\tmonsterId\030\002 \001(\005\"2\n\014StrongerInfo\022\020\n" +
|
||||
"\010curScore\030\001 \001(\005\022\020\n\010maxScore\030\002 \001(\005\"U\n\017Que" +
|
||||
"stionOptions\022\017\n\007content\030\001 \001(\t\022\014\n\004type\030\002 " +
|
||||
"\001(\005\022\017\n\007options\030\003 \003(\t\022\022\n\nanswerType\030\004 \001(\005" +
|
||||
"\"\212\001\n\017BloodPersonInfo\022\n\n\002id\030\001 \001(\005\022\014\n\004name" +
|
||||
"\030\002 \001(\t\022\021\n\theadFrame\030\003 \001(\005\022\014\n\004head\030\004 \001(\005\022" +
|
||||
"\020\n\010serverId\030\005 \001(\005\022\r\n\005level\030\006 \001(\005\022\014\n\004rank" +
|
||||
"\030\007 \001(\005\022\r\n\005score\030\010 \001(\005\"H\n\026LuckWheelReward",
|
||||
"PosInfo\022\013\n\003pos\030\001 \001(\005\022\016\n\006luckId\030\002 \001(\005\022\021\n\t" +
|
||||
"luckTimes\030\003 \001(\005\"_\n\013RefreshTask\022\014\n\004type\030\001" +
|
||||
" \001(\005\022-\n\005tasks\030\002 \003(\0132\036.rpc.protocols.User" +
|
||||
"MissionInfo\022\023\n\013refreshTime\030\003 \001(\005\"\221\001\n\021Mai" +
|
||||
"nLevelRankInfo\022\013\n\003uid\030\001 \001(\005\022\r\n\005level\030\002 \001" +
|
||||
"(\005\022\014\n\004name\030\003 \001(\t\022\017\n\007fightId\030\004 \001(\005\022\014\n\004hea" +
|
||||
"d\030\005 \001(\005\022\014\n\004rank\030\006 \001(\005\022\022\n\ntotalForce\030\007 \001(" +
|
||||
"\005\022\021\n\theadFrame\030\010 \001(\005\"B\n\017ChampionBetInfo\022" +
|
||||
"\n\n\002id\030\001 \001(\t\022\020\n\010redCoins\030\002 \001(\005\022\021\n\tblueCoi" +
|
||||
"ns\030\003 \001(\005\"\254\001\n\022ChampionBattleInfo\022*\n\006myInf",
|
||||
"o\030\001 \001(\0132\032.rpc.protocols.TeamOneInfo\022-\n\te" +
|
||||
"nemyInfo\030\002 \001(\0132\032.rpc.protocols.TeamOneIn" +
|
||||
"fo\022\016\n\006result\030\003 \001(\005\022+\n\tfightData\030\004 \001(\0132\030." +
|
||||
"rpc.protocols.FightData\"\335\001\n\026ChampionBatt" +
|
||||
"lePairInfo\022.\n\nattackInfo\030\001 \001(\0132\032.rpc.pro" +
|
||||
"tocols.TeamOneInfo\022+\n\007defInfo\030\002 \001(\0132\032.rp" +
|
||||
"c.protocols.TeamOneInfo\022\023\n\013fightResult\030\003" +
|
||||
" \001(\005\022\n\n\002id\030\004 \001(\t\022\022\n\nroundTImes\030\005 \001(\005\022\016\n\006" +
|
||||
"teamId\030\006 \001(\005\022\020\n\010position\030\007 \001(\005\022\017\n\007isGUes" +
|
||||
"s\030\010 \001(\005\"q\n\nRedPackage\022\020\n\010userName\030\001 \001(\t\022",
|
||||
"\r\n\005redId\030\002 \001(\005\022\r\n\005isGet\030\003 \001(\005\022\020\n\010getCoun" +
|
||||
"t\030\004 \001(\005\022\017\n\007redType\030\005 \001(\005\022\020\n\010sendTime\030\006 \001" +
|
||||
"(\005\"\211\001\n\014RedOneDetail\022\013\n\003uid\030\001 \001(\005\022\014\n\004head" +
|
||||
"\030\002 \001(\005\022\021\n\theadFrame\030\003 \001(\005\022\014\n\004name\030\004 \001(\t\022" +
|
||||
"\014\n\004time\030\005 \001(\005\022\r\n\005count\030\006 \001(\005\022\016\n\006itemId\030\007" +
|
||||
" \001(\005\022\020\n\010position\030\010 \001(\005\"l\n\030ExpeditionSimp" +
|
||||
"leBossInfo\022\017\n\007heroTid\030\001 \001(\005\022\014\n\004star\030\002 \001(" +
|
||||
"\005\022\r\n\005level\030\003 \001(\005\022\020\n\010remainHp\030\004 \001(\001\022\020\n\010po" +
|
||||
"sition\030\005 \001(\005\"\207\001\n\022ExpeditionTeamInfo\0225\n\004h" +
|
||||
"ero\030\001 \003(\0132\'.rpc.protocols.ExpeditionSimp",
|
||||
"leBossInfo\022\024\n\014PokemonInfos\030\002 \003(\005\022\022\n\ntota" +
|
||||
"lForce\030\003 \001(\005\022\020\n\010teamInfo\030\004 \001(\005\"\234\001\n\022Exped" +
|
||||
"itionNodeInfo\022\016\n\006sortId\030\001 \001(\005\022\013\n\003lay\030\002 \001" +
|
||||
"(\005\022\014\n\004type\030\003 \001(\005\0227\n\014bossTeaminfo\030\004 \001(\0132!" +
|
||||
".rpc.protocols.ExpeditionTeamInfo\022\r\n\005sta" +
|
||||
"te\030\005 \001(\005\022\023\n\013holyEquipID\030\006 \003(\005\"<\n\030Expedit" +
|
||||
"ionSimpleHeroInfo\022\016\n\006heroId\030\001 \001(\t\022\020\n\010rem" +
|
||||
"ainHp\030\002 \001(\001\"/\n\017ExpeditionEquip\022\n\n\002id\030\001 \001" +
|
||||
"(\t\022\020\n\010equiptId\030\002 \001(\005\"P\n\rMonthCardInfo\022\n\n" +
|
||||
"\002id\030\001 \001(\005\022\022\n\nendingTime\030\002 \001(\005\022\r\n\005state\030\003",
|
||||
" \001(\005\022\020\n\010totleAmt\030\004 \001(\001\"?\n\021CarGrapRecordI" +
|
||||
"tem\022\014\n\004time\030\001 \001(\005\022\013\n\003uid\030\002 \001(\005\022\017\n\007conten" +
|
||||
"t\030\003 \001(\t\">\n\rGuildHelpInfo\022\014\n\004type\030\001 \001(\005\022\013" +
|
||||
"\n\003num\030\002 \001(\005\022\022\n\nhadtakenum\030\003 \001(\005\"x\n\014Guild" +
|
||||
"HelpLog\022\021\n\thelperuid\030\001 \001(\005\022\021\n\ttargetuid\030" +
|
||||
"\002 \001(\005\022\022\n\nhelpername\030\003 \001(\t\022\022\n\ntargetname\030" +
|
||||
"\004 \001(\t\022\014\n\004type\030\005 \001(\005\022\014\n\004time\030\006 \001(\005\"\234\001\n\014Vi" +
|
||||
"ewHeroInfo\022!\n\004hero\030\001 \001(\0132\023.rpc.protocols" +
|
||||
".Hero\022#\n\005equip\030\002 \003(\0132\024.rpc.protocols.Equ" +
|
||||
"ip\0225\n\016SpecialEffects\030\003 \003(\0132\035.rpc.protoco",
|
||||
"ls.SpecialEffects\022\r\n\005force\030\004 \001(\005\"4\n\021Ever" +
|
||||
"yHeroHandBook\022\016\n\006heroId\030\001 \001(\005\022\017\n\007maxStar" +
|
||||
"\030\002 \001(\005\"=\n\rSituationInfo\022\n\n\002id\030\001 \001(\005\022\020\n\010o" +
|
||||
"verTime\030\002 \001(\005\022\016\n\006passId\030\003 \001(\005\"N\n\013Journey" +
|
||||
"Info\022\r\n\005mapId\030\001 \001(\005\022\017\n\007process\030\002 \001(\005\022\020\n\010" +
|
||||
"redPoint\030\003 \001(\005\022\r\n\005first\030\004 \001(\005\"\213\001\n\022Journe" +
|
||||
"yMonsterInfo\022\021\n\tmonsterId\030\001 \001(\005\022\024\n\014monst" +
|
||||
"erIndex\030\002 \001(\005\022\021\n\tmonsterHp\030\003 \001(\003\022\022\n\nrema" +
|
||||
"inTime\030\004 \001(\005\022\021\n\tattackNum\030\005 \001(\005\022\022\n\nrewar" +
|
||||
"dShow\030\006 \001(\005\"K\n\020JourneyGoodsInfo\022\017\n\007goods",
|
||||
"Id\030\001 \001(\005\022\022\n\ngoodsIndex\030\002 \001(\005\022\022\n\nremainTi" +
|
||||
"me\030\003 \001(\005\"S\n\013JourneyCell\022\016\n\006cellId\030\001 \001(\005\022" +
|
||||
"\017\n\007pointId\030\002 \001(\005\022\021\n\tcellIndex\030\003 \001(\005\022\020\n\010r" +
|
||||
"ewardId\030\004 \001(\005\",\n\010SkinInfo\022\016\n\006skinId\030\001 \001(" +
|
||||
"\005\022\020\n\010overTime\030\002 \001(\005B\002H\001"
|
||||
"rame\030\010 \001(\005\022\020\n\010serverId\030\t \001(\005\022\023\n\013worshipT" +
|
||||
"ime\030\n \001(\005\"\027\n\004Team\022\017\n\007heroTid\030\001 \003(\005\"c\n\nAr" +
|
||||
"enaEnemy\0222\n\npersonInfo\030\001 \001(\0132\036.rpc.proto",
|
||||
"cols.ArenaPersonInfo\022!\n\004team\030\002 \001(\0132\023.rpc" +
|
||||
".protocols.Team\"\205\001\n\tArenaInfo\022\020\n\010failNum" +
|
||||
"s\030\001 \001(\005\022\023\n\013successNums\030\002 \001(\005\022\r\n\005score\030\003 " +
|
||||
"\001(\005\022.\n\013arenaEnemys\030\004 \003(\0132\031.rpc.protocols" +
|
||||
".ArenaEnemy\022\022\n\nhadTakeBox\030\005 \003(\005\"\'\n\tStore" +
|
||||
"Item\022\n\n\002id\030\001 \001(\005\022\016\n\006buyNum\030\002 \001(\005\"\201\001\n\tSto" +
|
||||
"reInfo\022\n\n\002id\030\001 \001(\005\022\027\n\017lastRefreshTime\030\002 " +
|
||||
"\001(\003\022\021\n\tstartTime\030\004 \001(\003\022\017\n\007endTime\030\005 \001(\003\022" +
|
||||
"+\n\tstoreItem\030\006 \003(\0132\030.rpc.protocols.Store" +
|
||||
"Item\"\221\001\n\017ArenaRecordInfo\022\n\n\002id\030\001 \001(\t\0222\n\n",
|
||||
"attackInfo\030\002 \001(\0132\036.rpc.protocols.ArenaPe" +
|
||||
"rsonInfo\022\022\n\nattackTime\030\003 \001(\005\022\025\n\rmyScoreC" +
|
||||
"hange\030\004 \001(\005\022\023\n\013fightResult\030\005 \001(\005\"Z\n\016Func" +
|
||||
"tionOfTime\022\022\n\nfunctionId\030\001 \001(\005\022\021\n\tstartT" +
|
||||
"ime\030\002 \001(\005\022\017\n\007endTime\030\003 \001(\005\022\020\n\010interval\030\004" +
|
||||
" \001(\005\"~\n\025AdventureRankItemInfo\022\r\n\005level\030\001" +
|
||||
" \001(\005\022\014\n\004name\030\002 \001(\t\022\014\n\004hurt\030\003 \001(\005\022\014\n\004head" +
|
||||
"\030\004 \001(\005\022\014\n\004rank\030\005 \001(\005\022\021\n\theadFrame\030\006 \001(\005\022" +
|
||||
"\013\n\003uid\030\007 \001(\005\"\313\001\n\021AdventureBossInfo\022\017\n\007ar" +
|
||||
"enaId\030\001 \001(\005\022\017\n\007findUid\030\002 \001(\005\022\020\n\010findName",
|
||||
"\030\003 \001(\t\022\016\n\006bossId\030\004 \001(\t\022\023\n\013bossGroupId\030\005 " +
|
||||
"\001(\005\022\016\n\006myHurt\030\006 \001(\005\022\021\n\tlevelTime\030\007 \001(\005\022\017" +
|
||||
"\n\007totalHp\030\010 \001(\005\022\025\n\rbossRemainlHp\030\t \001(\005\022\022" +
|
||||
"\n\narenaLevel\030\n \001(\005\"v\n\017UserMissionInfo\022\021\n" +
|
||||
"\tmissionId\030\001 \001(\005\022\020\n\010progress\030\002 \001(\005\022\r\n\005st" +
|
||||
"ate\030\003 \001(\005\022\014\n\004type\030\004 \001(\005\022\021\n\ttakeTimes\030\005 \001" +
|
||||
"(\005\022\016\n\006heroId\030\006 \003(\t\"8\n\013VipBaseInfo\022\020\n\010vip" +
|
||||
"Level\030\001 \001(\005\022\027\n\017hadTakeLevelBox\030\002 \001(\005\"\250\001\n" +
|
||||
"\006Friend\022\n\n\002id\030\001 \001(\005\022\014\n\004name\030\002 \001(\t\022\n\n\002lv\030" +
|
||||
"\003 \001(\005\022\023\n\013offLineTime\030\004 \001(\004\022\022\n\nhaveReward",
|
||||
"\030\005 \001(\005\022\016\n\006isGive\030\006 \001(\005\022\021\n\tisApplyed\030\007 \001(" +
|
||||
"\005\022\014\n\004head\030\014 \001(\005\022\r\n\005frame\030\r \001(\005\022\017\n\007soulVa" +
|
||||
"l\030\016 \001(\005\"o\n\rGiftGoodsInfo\022\017\n\007goodsId\030\001 \001(" +
|
||||
"\005\022\020\n\010buyTimes\030\002 \001(\005\022\021\n\tstartTime\030\003 \001(\005\022\017" +
|
||||
"\n\007endTime\030\004 \001(\005\022\027\n\017dynamicBuyTimes\030\005 \001(\005" +
|
||||
"\"7\n\021GoodsTypeDuration\022\021\n\tgoodsType\030\001 \001(\005" +
|
||||
"\022\017\n\007endTime\030\002 \001(\005\"/\n\016TechnologyInfo\022\016\n\006t" +
|
||||
"echId\030\001 \001(\005\022\r\n\005levle\030\002 \001(\005\"J\n\020SuddenlyBo" +
|
||||
"ssInfo\022\022\n\nsuddBossId\030\006 \001(\005\022\017\n\007endTime\030\007 " +
|
||||
"\001(\005\022\021\n\tfindMapId\030\010 \001(\005\"H\n\010ItemInfo\022\022\n\nte",
|
||||
"mplateId\030\001 \001(\005\022\017\n\007overlap\030\002 \001(\005\022\027\n\017nextR" +
|
||||
"efreshTime\030\003 \001(\005\"H\n\010RankInfo\022\014\n\004rank\030\001 \001" +
|
||||
"(\005\022\016\n\006param1\030\002 \001(\003\022\016\n\006param2\030\003 \001(\005\022\016\n\006pa" +
|
||||
"ram3\030\004 \001(\005\"\306\001\n\010UserRank\022\013\n\003uid\030\001 \001(\005\022\r\n\005" +
|
||||
"level\030\002 \001(\005\022\014\n\004head\030\003 \001(\005\022\020\n\010userName\030\004 " +
|
||||
"\001(\t\022)\n\010rankInfo\030\005 \001(\0132\027.rpc.protocols.Ra" +
|
||||
"nkInfo\022\021\n\theadFrame\030\006 \001(\005\022\021\n\tguildName\030\007" +
|
||||
" \001(\t\022\r\n\005force\030\010 \001(\005\022\021\n\tguildSign\030\t \001(\005\022\013" +
|
||||
"\n\003sex\030\n \001(\005\"\204\001\n\025ActorEffectBufferInfo\022\n\n" +
|
||||
"\002id\030\001 \001(\005\022\014\n\004type\030\002 \001(\005\022\021\n\tstartTime\030\003 \001",
|
||||
"(\005\022\017\n\007endTime\030\004 \001(\005\022\016\n\006target\030\005 \001(\005\022\016\n\006c" +
|
||||
"aster\030\006 \001(\005\022\r\n\005value\030\007 \003(\005\"T\n\016BloodyHero" +
|
||||
"Info\022\016\n\006heroId\030\001 \001(\t\022\016\n\006heroHp\030\002 \001(\005\022\021\n\t" +
|
||||
"heroMaxHp\030\003 \001(\005\022\017\n\007heroTid\030\004 \001(\005\"%\n\010Scen" +
|
||||
"eMsg\022\014\n\004time\030\001 \001(\005\022\013\n\003msg\030\002 \001(\t\"\'\n\nPosMi" +
|
||||
"neral\022\013\n\003pos\030\001 \001(\005\022\014\n\004nums\030\002 \001(\005\"\247\001\n\010Cre" +
|
||||
"ature\022\014\n\004path\030\001 \003(\005\022\r\n\005speed\030\002 \001(\005\022\r\n\005ma" +
|
||||
"xHp\030\003 \001(\005\022\r\n\005curHp\030\004 \001(\005\022\017\n\007mineral\030\005 \001(" +
|
||||
"\005\022\014\n\004camp\030\006 \001(\005\022/\n\010heroInfo\030\007 \003(\0132\035.rpc." +
|
||||
"protocols.BloodyHeroInfo\022\020\n\010killNums\030\010 \001",
|
||||
"(\005\"\202\001\n\nSceneActor\022\n\n\002id\030\001 \001(\005\022\016\n\006curPos\030" +
|
||||
"\002 \001(\005\022\r\n\005state\030\003 \001(\005\022\014\n\004type\030\004 \001(\005\022)\n\010Cr" +
|
||||
"eature\030\006 \001(\0132\027.rpc.protocols.Creature\022\020\n" +
|
||||
"\010userName\030\007 \001(\t\"\367\001\n\tSceneInfo\022\016\n\006roomId\030" +
|
||||
"\001 \001(\005\022\r\n\005mapId\030\002 \001(\005\022-\n\nSceneActor\030\003 \003(\013" +
|
||||
"2\031.rpc.protocols.SceneActor\022C\n\025actorEffe" +
|
||||
"ctBufferInfo\030\004 \003(\0132$.rpc.protocols.Actor" +
|
||||
"EffectBufferInfo\022\024\n\014barrierPoint\030\005 \003(\005\022-" +
|
||||
"\n\nposMineral\030\006 \003(\0132\031.rpc.protocols.PosMi" +
|
||||
"neral\022\022\n\nremainTime\030\007 \001(\005\"F\n\027SceneGetFul",
|
||||
"lMsgResponse\022+\n\tsceneInfo\030\001 \001(\0132\030.rpc.pr" +
|
||||
"otocols.SceneInfo\"B\n\013blessReward\022\022\n\nloca" +
|
||||
"tionId\030\001 \001(\005\022\r\n\005state\030\002 \001(\005\022\020\n\010rewardId\030" +
|
||||
"\003 \001(\005\"5\n\022fiveResetTowerInfo\022\r\n\005tower\030\001 \001" +
|
||||
"(\005\022\020\n\010intoType\030\002 \001(\005\";\n\020FamilyContribute" +
|
||||
"\022\013\n\003win\030\001 \001(\005\022\014\n\004draw\030\002 \001(\005\022\014\n\004fail\030\003 \001(" +
|
||||
"\005\"\211\002\n\016FamilyBaseInfo\022\n\n\002id\030\001 \001(\005\022\014\n\004name" +
|
||||
"\030\002 \001(\t\022\017\n\007annouce\030\003 \001(\t\022\r\n\005levle\030\004 \001(\005\022\013" +
|
||||
"\n\003exp\030\005 \001(\005\022\020\n\010totalNum\030\006 \001(\005\022\016\n\006maxNum\030" +
|
||||
"\007 \001(\005\022\020\n\010joinType\030\010 \001(\005\022\014\n\004icon\030\t \001(\005\022\021\n",
|
||||
"\tlevelTime\030\n \001(\005\0224\n\013fightResult\030\013 \001(\0132\037." +
|
||||
"rpc.protocols.FamilyContribute\022\027\n\017player" +
|
||||
"IntoLevel\030\014 \001(\005\022\014\n\004fete\030\r \001(\005\")\n\013endless" +
|
||||
"Hero\022\016\n\006heroId\030\001 \001(\t\022\n\n\002hp\030\002 \001(\005\"2\n\022Endl" +
|
||||
"essRefreshInfo\022\016\n\006cellId\030\001 \001(\005\022\014\n\004time\030\002" +
|
||||
" \001(\005\"u\n\014UseForceInfo\022\014\n\004name\030\001 \001(\t\022\014\n\004le" +
|
||||
"ve\030\002 \001(\005\022\r\n\005force\030\003 \001(\005\022\014\n\004rank\030\004 \001(\005\022\014\n" +
|
||||
"\004head\030\005 \001(\005\022\021\n\theadFrame\030\006 \001(\005\022\013\n\003uid\030\007 " +
|
||||
"\001(\005\"H\n\013endlessSign\022\r\n\005mapId\030\001 \001(\005\022\016\n\006cel" +
|
||||
"lId\030\002 \001(\005\022\014\n\004info\030\003 \001(\t\022\014\n\004type\030\004 \001(\005\"g\n",
|
||||
"\nExpertInfo\022\014\n\004name\030\001 \001(\t\022\r\n\005score\030\002 \001(\005" +
|
||||
"\022\014\n\004rank\030\003 \001(\005\022\r\n\005level\030\004 \001(\005\022\014\n\004head\030\005 " +
|
||||
"\001(\005\022\021\n\theadFrame\030\006 \001(\005\")\n\nSignInInfo\022\014\n\004" +
|
||||
"days\030\001 \001(\005\022\r\n\005state\030\002 \001(\005\"p\n\016TeamSimpleI" +
|
||||
"nfo\022\016\n\006heroid\030\001 \001(\t\022\017\n\007heroTid\030\002 \001(\005\022\014\n\004" +
|
||||
"star\030\003 \001(\005\022\r\n\005level\030\004 \001(\005\022\020\n\010position\030\005 " +
|
||||
"\001(\005\022\016\n\006skinId\030\006 \001(\005\"\231\001\n\017TeamOneTeamInfo\022" +
|
||||
"+\n\004team\030\001 \003(\0132\035.rpc.protocols.TeamSimple" +
|
||||
"Info\0223\n\014PokemonInfos\030\002 \003(\0132\035.rpc.protoco" +
|
||||
"ls.TeamSimpleInfo\022\022\n\ntotalForce\030\003 \001(\005\022\020\n",
|
||||
"\010remainHp\030\004 \003(\005\"\254\001\n\013TeamOneInfo\022\013\n\003uid\030\001" +
|
||||
" \001(\005\022\r\n\005level\030\002 \001(\005\022\014\n\004name\030\003 \001(\t\022\014\n\004hea" +
|
||||
"d\030\004 \001(\005\022\021\n\theadFrame\030\005 \001(\005\022\021\n\tguildName\030" +
|
||||
"\007 \001(\t\022,\n\004team\030\006 \001(\0132\036.rpc.protocols.Team" +
|
||||
"OneTeamInfo\022\021\n\tisApplyed\030\010 \001(\005\"y\n\017Monste" +
|
||||
"rRankInfo\022\014\n\004name\030\001 \001(\t\022\r\n\005score\030\002 \001(\005\022\014" +
|
||||
"\n\004rank\030\003 \001(\005\022\r\n\005level\030\004 \001(\005\022\014\n\004head\030\005 \001(" +
|
||||
"\005\022\021\n\theadFrame\030\006 \001(\005\022\013\n\003uid\030\007 \001(\005\"2\n\rHer" +
|
||||
"oBloodInfo\022\016\n\006heroId\030\001 \001(\t\022\021\n\tlostBlood\030" +
|
||||
"\002 \001(\005\"D\n\013EndlessInfo\022\r\n\005mapId\030\001 \001(\005\022\022\n\nw",
|
||||
"orldLevel\030\002 \001(\005\022\022\n\nbloodScore\030\003 \001(\005\"2\n\017P" +
|
||||
"layerBindPhone\022\020\n\010phoneNum\030\001 \001(\t\022\r\n\005stat" +
|
||||
"e\030\002 \001(\005\"3\n\014EndlessPoint\022\020\n\010location\030\001 \001(" +
|
||||
"\005\022\021\n\tmonsterId\030\002 \001(\005\"2\n\014StrongerInfo\022\020\n\010" +
|
||||
"curScore\030\001 \001(\005\022\020\n\010maxScore\030\002 \001(\005\"U\n\017Ques" +
|
||||
"tionOptions\022\017\n\007content\030\001 \001(\t\022\014\n\004type\030\002 \001" +
|
||||
"(\005\022\017\n\007options\030\003 \003(\t\022\022\n\nanswerType\030\004 \001(\005\"" +
|
||||
"\212\001\n\017BloodPersonInfo\022\n\n\002id\030\001 \001(\005\022\014\n\004name\030" +
|
||||
"\002 \001(\t\022\021\n\theadFrame\030\003 \001(\005\022\014\n\004head\030\004 \001(\005\022\020" +
|
||||
"\n\010serverId\030\005 \001(\005\022\r\n\005level\030\006 \001(\005\022\014\n\004rank\030",
|
||||
"\007 \001(\005\022\r\n\005score\030\010 \001(\005\"H\n\026LuckWheelRewardP" +
|
||||
"osInfo\022\013\n\003pos\030\001 \001(\005\022\016\n\006luckId\030\002 \001(\005\022\021\n\tl" +
|
||||
"uckTimes\030\003 \001(\005\"_\n\013RefreshTask\022\014\n\004type\030\001 " +
|
||||
"\001(\005\022-\n\005tasks\030\002 \003(\0132\036.rpc.protocols.UserM" +
|
||||
"issionInfo\022\023\n\013refreshTime\030\003 \001(\005\"\221\001\n\021Main" +
|
||||
"LevelRankInfo\022\013\n\003uid\030\001 \001(\005\022\r\n\005level\030\002 \001(" +
|
||||
"\005\022\014\n\004name\030\003 \001(\t\022\017\n\007fightId\030\004 \001(\005\022\014\n\004head" +
|
||||
"\030\005 \001(\005\022\014\n\004rank\030\006 \001(\005\022\022\n\ntotalForce\030\007 \001(\005" +
|
||||
"\022\021\n\theadFrame\030\010 \001(\005\"B\n\017ChampionBetInfo\022\n" +
|
||||
"\n\002id\030\001 \001(\t\022\020\n\010redCoins\030\002 \001(\005\022\021\n\tblueCoin",
|
||||
"s\030\003 \001(\005\"\254\001\n\022ChampionBattleInfo\022*\n\006myInfo" +
|
||||
"\030\001 \001(\0132\032.rpc.protocols.TeamOneInfo\022-\n\ten" +
|
||||
"emyInfo\030\002 \001(\0132\032.rpc.protocols.TeamOneInf" +
|
||||
"o\022\016\n\006result\030\003 \001(\005\022+\n\tfightData\030\004 \001(\0132\030.r" +
|
||||
"pc.protocols.FightData\"\335\001\n\026ChampionBattl" +
|
||||
"ePairInfo\022.\n\nattackInfo\030\001 \001(\0132\032.rpc.prot" +
|
||||
"ocols.TeamOneInfo\022+\n\007defInfo\030\002 \001(\0132\032.rpc" +
|
||||
".protocols.TeamOneInfo\022\023\n\013fightResult\030\003 " +
|
||||
"\001(\005\022\n\n\002id\030\004 \001(\t\022\022\n\nroundTImes\030\005 \001(\005\022\016\n\006t" +
|
||||
"eamId\030\006 \001(\005\022\020\n\010position\030\007 \001(\005\022\017\n\007isGUess",
|
||||
"\030\010 \001(\005\"q\n\nRedPackage\022\020\n\010userName\030\001 \001(\t\022\r" +
|
||||
"\n\005redId\030\002 \001(\005\022\r\n\005isGet\030\003 \001(\005\022\020\n\010getCount" +
|
||||
"\030\004 \001(\005\022\017\n\007redType\030\005 \001(\005\022\020\n\010sendTime\030\006 \001(" +
|
||||
"\005\"\211\001\n\014RedOneDetail\022\013\n\003uid\030\001 \001(\005\022\014\n\004head\030" +
|
||||
"\002 \001(\005\022\021\n\theadFrame\030\003 \001(\005\022\014\n\004name\030\004 \001(\t\022\014" +
|
||||
"\n\004time\030\005 \001(\005\022\r\n\005count\030\006 \001(\005\022\016\n\006itemId\030\007 " +
|
||||
"\001(\005\022\020\n\010position\030\010 \001(\005\"l\n\030ExpeditionSimpl" +
|
||||
"eBossInfo\022\017\n\007heroTid\030\001 \001(\005\022\014\n\004star\030\002 \001(\005" +
|
||||
"\022\r\n\005level\030\003 \001(\005\022\020\n\010remainHp\030\004 \001(\001\022\020\n\010pos" +
|
||||
"ition\030\005 \001(\005\"\207\001\n\022ExpeditionTeamInfo\0225\n\004he",
|
||||
"ro\030\001 \003(\0132\'.rpc.protocols.ExpeditionSimpl" +
|
||||
"eBossInfo\022\024\n\014PokemonInfos\030\002 \003(\005\022\022\n\ntotal" +
|
||||
"Force\030\003 \001(\005\022\020\n\010teamInfo\030\004 \001(\005\"\234\001\n\022Expedi" +
|
||||
"tionNodeInfo\022\016\n\006sortId\030\001 \001(\005\022\013\n\003lay\030\002 \001(" +
|
||||
"\005\022\014\n\004type\030\003 \001(\005\0227\n\014bossTeaminfo\030\004 \001(\0132!." +
|
||||
"rpc.protocols.ExpeditionTeamInfo\022\r\n\005stat" +
|
||||
"e\030\005 \001(\005\022\023\n\013holyEquipID\030\006 \003(\005\"<\n\030Expediti" +
|
||||
"onSimpleHeroInfo\022\016\n\006heroId\030\001 \001(\t\022\020\n\010rema" +
|
||||
"inHp\030\002 \001(\001\"/\n\017ExpeditionEquip\022\n\n\002id\030\001 \001(" +
|
||||
"\t\022\020\n\010equiptId\030\002 \001(\005\"P\n\rMonthCardInfo\022\n\n\002",
|
||||
"id\030\001 \001(\005\022\022\n\nendingTime\030\002 \001(\005\022\r\n\005state\030\003 " +
|
||||
"\001(\005\022\020\n\010totleAmt\030\004 \001(\001\"?\n\021CarGrapRecordIt" +
|
||||
"em\022\014\n\004time\030\001 \001(\005\022\013\n\003uid\030\002 \001(\005\022\017\n\007content" +
|
||||
"\030\003 \001(\t\">\n\rGuildHelpInfo\022\014\n\004type\030\001 \001(\005\022\013\n" +
|
||||
"\003num\030\002 \001(\005\022\022\n\nhadtakenum\030\003 \001(\005\"x\n\014GuildH" +
|
||||
"elpLog\022\021\n\thelperuid\030\001 \001(\005\022\021\n\ttargetuid\030\002" +
|
||||
" \001(\005\022\022\n\nhelpername\030\003 \001(\t\022\022\n\ntargetname\030\004" +
|
||||
" \001(\t\022\014\n\004type\030\005 \001(\005\022\014\n\004time\030\006 \001(\005\"\234\001\n\014Vie" +
|
||||
"wHeroInfo\022!\n\004hero\030\001 \001(\0132\023.rpc.protocols." +
|
||||
"Hero\022#\n\005equip\030\002 \003(\0132\024.rpc.protocols.Equi",
|
||||
"p\0225\n\016SpecialEffects\030\003 \003(\0132\035.rpc.protocol" +
|
||||
"s.SpecialEffects\022\r\n\005force\030\004 \001(\005\"4\n\021Every" +
|
||||
"HeroHandBook\022\016\n\006heroId\030\001 \001(\005\022\017\n\007maxStar\030" +
|
||||
"\002 \001(\005\"=\n\rSituationInfo\022\n\n\002id\030\001 \001(\005\022\020\n\010ov" +
|
||||
"erTime\030\002 \001(\005\022\016\n\006passId\030\003 \001(\005\"N\n\013JourneyI" +
|
||||
"nfo\022\r\n\005mapId\030\001 \001(\005\022\017\n\007process\030\002 \001(\005\022\020\n\010r" +
|
||||
"edPoint\030\003 \001(\005\022\r\n\005first\030\004 \001(\005\"\213\001\n\022Journey" +
|
||||
"MonsterInfo\022\021\n\tmonsterId\030\001 \001(\005\022\024\n\014monste" +
|
||||
"rIndex\030\002 \001(\005\022\021\n\tmonsterHp\030\003 \001(\003\022\022\n\nremai" +
|
||||
"nTime\030\004 \001(\005\022\021\n\tattackNum\030\005 \001(\005\022\022\n\nreward",
|
||||
"Show\030\006 \001(\005\"K\n\020JourneyGoodsInfo\022\017\n\007goodsI" +
|
||||
"d\030\001 \001(\005\022\022\n\ngoodsIndex\030\002 \001(\005\022\022\n\nremainTim" +
|
||||
"e\030\003 \001(\005\"S\n\013JourneyCell\022\016\n\006cellId\030\001 \001(\005\022\017" +
|
||||
"\n\007pointId\030\002 \001(\005\022\021\n\tcellIndex\030\003 \001(\005\022\020\n\010re" +
|
||||
"wardId\030\004 \001(\005\",\n\010SkinInfo\022\016\n\006skinId\030\001 \001(\005" +
|
||||
"\022\020\n\010overTime\030\002 \001(\005B\002H\001"
|
||||
};
|
||||
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
|
||||
new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
|
||||
|
|
@ -100495,7 +100690,7 @@ public final class CommonProto {
|
|||
internal_static_rpc_protocols_ArenaPersonInfo_fieldAccessorTable = new
|
||||
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
|
||||
internal_static_rpc_protocols_ArenaPersonInfo_descriptor,
|
||||
new java.lang.String[] { "Uid", "Level", "Name", "Score", "Head", "Rank", "TotalForce", "HeadFrame", });
|
||||
new java.lang.String[] { "Uid", "Level", "Name", "Score", "Head", "Rank", "TotalForce", "HeadFrame", "ServerId", "WorshipTime", });
|
||||
internal_static_rpc_protocols_Team_descriptor =
|
||||
getDescriptor().getMessageTypes().get(35);
|
||||
internal_static_rpc_protocols_Team_fieldAccessorTable = new
|
||||
|
|
|
|||
|
|
@ -8,8 +8,10 @@ import com.global.thrift.pool.GlobalRpcService;
|
|||
import com.global.thrift.pool.RPCServerTask;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.context.ConfigurableApplicationContext;
|
||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
|
|
@ -23,6 +25,10 @@ import org.springframework.context.ConfigurableApplicationContext;
|
|||
* Author: zsx
|
||||
* CreateDate: 2020/11/17 17:36
|
||||
*/
|
||||
@Configuration
|
||||
@EnableAutoConfiguration
|
||||
@ComponentScan
|
||||
@EnableScheduling
|
||||
public class GlobalServerApplication {
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(GlobalServerApplication.class);
|
||||
public static CoreSettings bean;
|
||||
|
|
@ -34,7 +40,7 @@ public class GlobalServerApplication {
|
|||
ThreadManager threadManager = ThreadManager.getInstance();
|
||||
threadManager.init();
|
||||
|
||||
GlobalRpcService.initHandler("com.global.handler");
|
||||
GlobalRpcService.initHandler("com.global.handler",GlobalServerApplication.class.getClassLoader());
|
||||
|
||||
new RPCServerTask().start();
|
||||
RedisUtil.getInstence().init();
|
||||
|
|
|
|||
|
|
@ -16,6 +16,8 @@ public class CoreSettings {
|
|||
private int port;
|
||||
private int id;
|
||||
private int weight;
|
||||
private String worldip;
|
||||
private int worldport;
|
||||
|
||||
public String getIp() {
|
||||
return ip;
|
||||
|
|
@ -49,6 +51,22 @@ public class CoreSettings {
|
|||
this.port = port;
|
||||
}
|
||||
|
||||
public String getWorldip() {
|
||||
return worldip;
|
||||
}
|
||||
|
||||
public void setWorldip(String worldip) {
|
||||
this.worldip = worldip;
|
||||
}
|
||||
|
||||
public int getWorldport() {
|
||||
return worldport;
|
||||
}
|
||||
|
||||
public void setWorldport(int worldport) {
|
||||
this.worldport = worldport;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "CoreSettings{" +
|
||||
|
|
@ -56,6 +74,8 @@ public class CoreSettings {
|
|||
", port=" + port +
|
||||
", id=" + id +
|
||||
", weight=" + weight +
|
||||
", worldip='" + worldip + '\'' +
|
||||
", worldport=" + worldport +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,26 +1,28 @@
|
|||
package com.global.handler;
|
||||
|
||||
import com.global.GlobalServerApplication;
|
||||
import com.global.config.CoreSettings;
|
||||
import rpc.net.RpcMessage;
|
||||
import com.google.protobuf.GeneratedMessage;
|
||||
import rpc.global.GlobalProto;
|
||||
import rpc.net._gtGBaseHandler;
|
||||
import rpc.net.gtGBaseHandler;
|
||||
|
||||
/**
|
||||
* Description: des
|
||||
* Author: zsx
|
||||
* CreateDate: 2020/11/18 22:23
|
||||
*/
|
||||
public class GetWorldServerRequestHandler extends _gtGBaseHandler<GlobalProto.GetWorldServerRequest> {
|
||||
public class GetWorldServerRequestHandler extends gtGBaseHandler<GlobalProto.GetWorldServerRequest> {
|
||||
|
||||
@Override
|
||||
public GeneratedMessage processWithProto(RpcMessage rpcMessage, GlobalProto.GetWorldServerRequest proto) throws Exception {
|
||||
|
||||
//TODO 分组逻辑
|
||||
|
||||
|
||||
System.out.println("rpcMessage = " + rpcMessage.toString());
|
||||
//TODO 设置分组
|
||||
return GlobalProto.GetWorldServerResponse.newBuilder().setIp(GlobalServerApplication.bean.getIp()).setPort(GlobalServerApplication.bean.getIp()).setGroup(1).build();
|
||||
String ip = GlobalServerApplication.bean.getWorldip();
|
||||
int port = GlobalServerApplication.bean.getPort();
|
||||
return GlobalProto.GetWorldServerResponse.newBuilder().setIp("60.1.1.161").setPort("18080").setGroup(1).build();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import org.apache.thrift.TException;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import rpc.net.RpcMessage;
|
||||
import rpc.net._gtGBaseHandler;
|
||||
import rpc.net.gtGBaseHandler;
|
||||
import util.ErrorPrintUtil;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
|
|
@ -35,7 +35,7 @@ public class GlobalRpcService extends GlobalProtocolsManager implements RPCgTGRe
|
|||
|
||||
private InnerResult processMessage(RpcMessage message) throws Exception {
|
||||
|
||||
_gtGBaseHandler baseHandler = getHandlers().get(message.getProtpId());
|
||||
gtGBaseHandler baseHandler = getHandlers().get(message.getProtpId());
|
||||
if (baseHandler == null) {
|
||||
//检查一下 没有定义handler
|
||||
LOGGER.info("request unknow commond : " + message.getProtpId());
|
||||
|
|
|
|||
|
|
@ -1,41 +0,0 @@
|
|||
/**
|
||||
* Autogenerated by Thrift Compiler (0.9.2)
|
||||
*
|
||||
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
||||
* @generated
|
||||
*/
|
||||
package com.world.thrift.idl;
|
||||
|
||||
import org.apache.thrift.scheme.IScheme;
|
||||
import org.apache.thrift.scheme.SchemeFactory;
|
||||
import org.apache.thrift.scheme.StandardScheme;
|
||||
|
||||
import org.apache.thrift.scheme.TupleScheme;
|
||||
import org.apache.thrift.protocol.TTupleProtocol;
|
||||
import org.apache.thrift.protocol.TProtocolException;
|
||||
import org.apache.thrift.EncodingUtils;
|
||||
import org.apache.thrift.TException;
|
||||
import org.apache.thrift.async.AsyncMethodCallback;
|
||||
import org.apache.thrift.server.AbstractNonblockingServer.*;
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import java.util.EnumMap;
|
||||
import java.util.Set;
|
||||
import java.util.HashSet;
|
||||
import java.util.EnumSet;
|
||||
import java.util.Collections;
|
||||
import java.util.BitSet;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.util.Arrays;
|
||||
import javax.annotation.Generated;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
|
||||
@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2020-11-19")
|
||||
public class RPCgTwRequestIFace {
|
||||
|
||||
/**
|
||||
* Structs can also be exceptions, if they are nasty.
|
||||
|
|
@ -8,10 +8,13 @@ spring.redis.pool.max-idle=8
|
|||
spring.redis.pool.min-idle=0
|
||||
|
||||
#core
|
||||
services.core.ip=60.1.1.
|
||||
services.core.ip=60.1.1.161
|
||||
services.core.port=17080
|
||||
services.core.area=1000
|
||||
services.core.id=1
|
||||
services.core.weight=5
|
||||
#\u6539\u7528\u670D\u52A1\u53D1\u73B0
|
||||
services.core.worldip=60.1.1.161
|
||||
services.core.worldport=18080
|
||||
|
||||
logging.config = conf/logback-boot.xml
|
||||
|
|
@ -78,7 +78,7 @@ public class GameLogicService implements IService {
|
|||
//注册消息处理方法
|
||||
ProtocolsManager protocolsManager = ProtocolsManager.getInstance();
|
||||
protocolsManager.initHandler("com.ljsd.jieling.handler");
|
||||
GlobalidHelper.initHandler("com.ljsd.jieling.handler");
|
||||
GlobalidHelper.initHandler("com.ljsd.jieling.handler",GameApplication.class.getClassLoader());
|
||||
protocolsManager.initCheck();
|
||||
// 追加ProtocolsManager消息处理器 注解和非注解
|
||||
|
||||
|
|
|
|||
|
|
@ -4,17 +4,18 @@ import com.google.protobuf.GeneratedMessage;
|
|||
import com.ljsd.jieling.network.server.GlobalidHelper;
|
||||
import rpc.global.GlobalProto;
|
||||
import rpc.net.RpcMessage;
|
||||
import rpc.net._gtGBaseHandler;
|
||||
import rpc.net.gtGBaseHandler;
|
||||
|
||||
/**
|
||||
* Description: 获取分组信息
|
||||
* Author: zsx
|
||||
* CreateDate: 2020/11/19 10:26
|
||||
*/
|
||||
public class GetWorldServerResponseHandler extends _gtGBaseHandler<GlobalProto.GetWorldServerResponse> {
|
||||
public class GetWorldServerResponseHandler extends gtGBaseHandler<GlobalProto.GetWorldServerResponse> {
|
||||
|
||||
@Override
|
||||
public GeneratedMessage processWithProto(RpcMessage rpcMessage, GlobalProto.GetWorldServerResponse proto) throws Exception {
|
||||
|
||||
GlobalidHelper.setWorldInfo(new GlobalidHelper.WorldInfo(proto.getIp(),proto.getPort(),proto.getGroup()));
|
||||
return null;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import org.slf4j.LoggerFactory;
|
|||
import rpc.global.GlobalProto;
|
||||
import rpc.net.GlobalProtocolsManager;
|
||||
import rpc.net.RpcMessage;
|
||||
import rpc.net._gtGBaseHandler;
|
||||
import rpc.net.gtGBaseHandler;
|
||||
import rpc.protocols.MessageTypeProto;
|
||||
import rpc.thrift.ServiceKey;
|
||||
import util.StringUtil;
|
||||
|
|
@ -65,7 +65,7 @@ public class GlobalidHelper extends GlobalProtocolsManager {
|
|||
}
|
||||
|
||||
private static InnerResult processMessage(RpcMessage message) throws Exception {
|
||||
_gtGBaseHandler baseHandler = getHandlers().get(message.getProtpId());
|
||||
gtGBaseHandler baseHandler = getHandlers().get(message.getProtpId());
|
||||
if (baseHandler == null) {
|
||||
//检查一下 没有定义handler
|
||||
LOGGER.info("request unknow commond : " + message.getProtpId());
|
||||
|
|
|
|||
|
|
@ -1,20 +1,16 @@
|
|||
package com.ljsd.jieling.network.server;
|
||||
|
||||
import com.global.thrift.idl.InnerResult;
|
||||
import com.global.thrift.idl.RPCgTGRequestIFace;
|
||||
import com.google.protobuf.GeneratedMessage;
|
||||
import com.ljsd.GameApplication;
|
||||
import com.ljsd.jieling.config.json.CoreSettings;
|
||||
import com.ljsd.jieling.thrift.pool.ClientAdapterPo;
|
||||
import com.ljsd.jieling.util.ConfigurableApplicationContextManager;
|
||||
import com.ljsd.jieling.util.MessageUtil;
|
||||
import com.world.thrift.idl.InnerResult;
|
||||
import com.world.thrift.idl.RPCgTwRequestIFace;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import rpc.global.GlobalProto;
|
||||
import rpc.net.GlobalProtocolsManager;
|
||||
import rpc.net.RpcMessage;
|
||||
import rpc.net._gtGBaseHandler;
|
||||
import rpc.protocols.MessageTypeProto;
|
||||
import rpc.net.gtGBaseHandler;
|
||||
import rpc.thrift.ServiceKey;
|
||||
import util.StringUtil;
|
||||
|
||||
|
|
@ -39,10 +35,10 @@ public class WorldHelper extends GlobalProtocolsManager {
|
|||
return false;
|
||||
}
|
||||
String serviceKey = StringUtil.getServiceKey(ServiceKey.RPC_WORLD, worldInfo.getIp(),worldInfo.getPort());
|
||||
ClientAdapterPo<RPCgTGRequestIFace.Client> rPCClient = null;
|
||||
ClientAdapterPo<RPCgTwRequestIFace.Client> rPCClient = null;
|
||||
try {
|
||||
rPCClient = ClientAdapterPo.getClientAdapterPo(serviceKey);
|
||||
InnerResult innerResult = rPCClient.getClient().messageRequest(GameApplication.serverProperties.getId(),getProtoIdBySimpleName(message.getClass().getSimpleName()) , ByteBuffer.wrap(message.toByteArray()));
|
||||
InnerResult innerResult = rPCClient.getClient().messageRequest(GameApplication.serverProperties.getId(),uid,getProtoIdBySimpleName(message.getClass().getSimpleName()) , ByteBuffer.wrap(message.toByteArray()));
|
||||
processMessage( new RpcMessage(0,uid, innerResult.getProtpId(),ByteBuffer.wrap(innerResult.getMessage())));
|
||||
} catch (Exception e) {
|
||||
LOGGER.info("callback=>",e);
|
||||
|
|
@ -60,7 +56,7 @@ public class WorldHelper extends GlobalProtocolsManager {
|
|||
|
||||
//只做转发 返回值暂时没用
|
||||
private static InnerResult processMessage(RpcMessage message) throws Exception {
|
||||
_gtGBaseHandler baseHandler = getHandlers().get(message.getProtpId());
|
||||
gtGBaseHandler baseHandler = getHandlers().get(message.getProtpId());
|
||||
if (baseHandler == null) {
|
||||
//检查一下 没有定义handler 世界服回传的消息不拦截则透传
|
||||
MessageUtil.sendIndicationMessage(message.getUid(),message.getProtpId(),message.getMessage().array());
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ package com.ljsd.jieling.thrift.pool;
|
|||
import com.global.thrift.idl.RPCgTGRequestIFace;
|
||||
import com.ljsd.jieling.thrift.idl.RPCMatchRequestIFace;
|
||||
import com.ljsd.jieling.thrift.idl.RPCRequestIFace;
|
||||
import com.world.thrift.idl.RPCgTwRequestIFace;
|
||||
import org.apache.commons.pool2.impl.GenericKeyedObjectPool;
|
||||
import org.apache.thrift.protocol.TBinaryProtocol;
|
||||
import org.apache.thrift.protocol.TProtocol;
|
||||
|
|
@ -46,8 +47,8 @@ public class ClientAdapterPo<T>{
|
|||
return new RPCMatchRequestIFace.Client(protocol);
|
||||
} else if(key[0].equals(ServiceKey.RPC_GLOBAL)){
|
||||
return new RPCgTGRequestIFace.Client(protocol);
|
||||
}else if(key[0].equals(ServiceKey.RPC_GLOBAL)){
|
||||
return new RPCgTGRequestIFace.Client(protocol);
|
||||
}else if(key[0].equals(ServiceKey.RPC_WORLD)){
|
||||
return new RPCgTwRequestIFace.Client(protocol);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,6 +58,10 @@ public class ThriftFactory extends BaseKeyedPooledObjectFactory<String, TTranspo
|
|||
transport = new TSocket(host, port);
|
||||
}else if (key.equals(ServiceKey.GM_CANCLE_SCENE)){
|
||||
transport = new TSocket(host, port);
|
||||
}else if (key.equals(ServiceKey.RPC_GLOBAL)){
|
||||
transport = new TSocket(host, port);
|
||||
}else if (key.equals(ServiceKey.RPC_WORLD)){
|
||||
transport = new TSocket(host, port);
|
||||
}
|
||||
|
||||
if (transport!=null){
|
||||
|
|
@ -66,10 +70,10 @@ public class ThriftFactory extends BaseKeyedPooledObjectFactory<String, TTranspo
|
|||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
transport = null;
|
||||
LOGGER.error("connect failed, services is "+key);
|
||||
LOGGER.error("connect failed, services is{} host{} port{} ",key,host,port);
|
||||
}
|
||||
}else{
|
||||
LOGGER.error("connect failed, services is "+key);
|
||||
LOGGER.error("connect failed, services is{} host{} port{} ",key,host,port);
|
||||
}
|
||||
return transport;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,7 +33,6 @@ import org.springframework.context.ConfigurableApplicationContext;
|
|||
public class ThriftPoolUtils {
|
||||
|
||||
private static ThriftPoolUtils instance;
|
||||
private ConfigurableApplicationContext configurableApplicationContext;
|
||||
|
||||
GenericKeyedObjectPool<String, TTransport> pool = null;
|
||||
|
||||
|
|
|
|||
|
|
@ -5,14 +5,23 @@ import com.world.config.CoreSettings;
|
|||
import com.world.redis.RedisUtil;
|
||||
import com.world.thread.ThreadManager;
|
||||
import com.world.thrift.idl.pool.RPCServerTask;
|
||||
import com.world.thrift.idl.pool.WorldRpcService;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
|
||||
/**
|
||||
* Description: 提供跨服玩法
|
||||
* Author: zsx
|
||||
* CreateDate: 2020/11/19 11:48
|
||||
*/
|
||||
@Configuration
|
||||
@EnableAutoConfiguration
|
||||
@ComponentScan
|
||||
@EnableScheduling
|
||||
public class WorldServerApplication {
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(WorldServerApplication.class);
|
||||
public static CoreSettings bean;
|
||||
|
|
@ -23,9 +32,7 @@ public class WorldServerApplication {
|
|||
//线程池管理器
|
||||
ThreadManager threadManager = ThreadManager.getInstance();
|
||||
threadManager.init();
|
||||
|
||||
// .initHandler("com.world.handler");
|
||||
|
||||
WorldRpcService.initHandler("com.world.handler",WorldServerApplication.class.getClassLoader());
|
||||
new RPCServerTask().start();
|
||||
RedisUtil.getInstence().init();
|
||||
bean = ConfigurableApplicationContextManager.getBean(CoreSettings.class);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package com.world.config;
|
||||
|
||||
import com.global.WorldServerApplication;
|
||||
import com.world.WorldServerApplication;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.context.ConfigurableApplicationContext;
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import com.google.protobuf.GeneratedMessage;
|
|||
import com.world.WorldServerApplication;
|
||||
import rpc.global.GlobalProto;
|
||||
import rpc.net.RpcMessage;
|
||||
import rpc.net._gtGBaseHandler;
|
||||
import rpc.net.gtGBaseHandler;
|
||||
import rpc.world.WorldProto;
|
||||
|
||||
/**
|
||||
|
|
@ -12,7 +12,7 @@ import rpc.world.WorldProto;
|
|||
* Author: zsx
|
||||
* CreateDate: 2020/11/19 10:51
|
||||
*/
|
||||
public class GetWorldArenaInfoRequestHandler extends _gtGBaseHandler<WorldProto.GetWorldArenaInfoRequest> {
|
||||
public class GetWorldArenaInfoRequestHandler extends gtGBaseHandler<WorldProto.GetWorldArenaInfoRequest> {
|
||||
|
||||
@Override
|
||||
public GeneratedMessage processWithProto(RpcMessage rpcMessage, WorldProto.GetWorldArenaInfoRequest proto) throws Exception {
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import org.slf4j.Logger;
|
|||
import org.slf4j.LoggerFactory;
|
||||
import rpc.net.GlobalProtocolsManager;
|
||||
import rpc.net.RpcMessage;
|
||||
import rpc.net._gtGBaseHandler;
|
||||
import rpc.net.gtGBaseHandler;
|
||||
import util.ErrorPrintUtil;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
|
|
@ -24,6 +24,7 @@ public class WorldRpcService extends GlobalProtocolsManager implements RPCgTwReq
|
|||
@Override
|
||||
public InnerResult messageRequest(int serverId, int uid, int protpId, ByteBuffer message) throws TException {
|
||||
try {
|
||||
System.out.println("messageRequest serverId = " + serverId);
|
||||
return processMessage(new RpcMessage(serverId, protpId, message));
|
||||
} catch (Exception e) {
|
||||
LOGGER.error(ErrorPrintUtil.getExceptionStackTraceFileLineAndMethod(e));
|
||||
|
|
@ -33,7 +34,7 @@ public class WorldRpcService extends GlobalProtocolsManager implements RPCgTwReq
|
|||
|
||||
private InnerResult processMessage(RpcMessage message) throws Exception {
|
||||
|
||||
_gtGBaseHandler baseHandler = getHandlers().get(message.getProtpId());
|
||||
gtGBaseHandler baseHandler = getHandlers().get(message.getProtpId());
|
||||
if (baseHandler == null) {
|
||||
//检查一下 没有定义handler
|
||||
LOGGER.info("request unknow commond : " + message.getProtpId());
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ spring.redis.pool.max-idle=8
|
|||
spring.redis.pool.min-idle=0
|
||||
|
||||
#core
|
||||
services.core.ip=60.1.1.161.
|
||||
services.core.ip=60.1.1.161
|
||||
services.core.port=18080
|
||||
services.core.area=1000
|
||||
services.core.id=1
|
||||
|
|
|
|||
Loading…
Reference in New Issue