From 074cfbd5bd820747affcb3e276681a411cdafc01 Mon Sep 17 00:00:00 2001 From: "DESKTOP-5RP3AKU\\Jisol" <2858626794@qq.com> Date: Tue, 21 Nov 2023 01:57:40 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AE=80=E5=8D=95=E7=9A=84PVP?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- JisolGameCocos/assets/script/App.ts | 8 +- .../assets/script/action/PVPAction.ts | 20 +- .../assets/script/battle/GBaseMode.ts | 10 +- .../script/battle/GBattleModeManager.ts | 23 +- .../assets/script/battle/modes/GOnHookMode.ts | 12 +- .../assets/script/battle/modes/GPVPMode.ts | 135 +- .../assets/script/consts/GAction.ts | 1 + .../assets/script/consts/GActionType.ts | 1 + .../script/ui/Consts/Game/ModeRender.ts | 7 +- .../assets/script/ui/Home/MainView.ts | 3 - JisolGameCocos/extensions/ngame | 2 +- JisolGameCocos/proto/GPVPMessage.proto | 9 +- .../cn/jisol/game/actions/GActionEnum.java | 1 + .../jisol/game/actions/onhook/GPVPAction.java | 46 +- .../game/GPlayerTacticalController.java | 5 +- .../java/cn/jisol/game/proto/GPVPMessage.java | 1610 +++++++++++++++-- .../cn/jisol/game/proto/GPVPMessage.proto | 9 +- .../ngame/proto/GPVPMessageOuterClass.java | 1474 +++++++++++++++ 18 files changed, 3218 insertions(+), 158 deletions(-) create mode 100644 JisolGameServer/Main/src/main/java/cn/jisol/ngame/proto/GPVPMessageOuterClass.java diff --git a/JisolGameCocos/assets/script/App.ts b/JisolGameCocos/assets/script/App.ts index 3bfe0c4a..5fc24330 100644 --- a/JisolGameCocos/assets/script/App.ts +++ b/JisolGameCocos/assets/script/App.ts @@ -26,10 +26,10 @@ import { JAPI, JAPIConfig } from "../../extensions/ngame/assets/ngame/util/JAPI" import { AppData } from "./AppData"; import AppAction from "./AppAction"; -// let APIPath = `http://localhost:8080` -// let WsPath = `ws://localhost:8080/websocket` -let APIPath = `http://192.168.0.123:8080` -let WsPath = `ws://192.168.0.123:8080/websocket` +let APIPath = `http://localhost:8080` +let WsPath = `ws://localhost:8080/websocket` +// let APIPath = `http://192.168.0.123:8080` +// let WsPath = `ws://192.168.0.123:8080/websocket` // let APIPath = `https://api.pet.jisol.cn` // let WsPath = `wss://api.pet.jisol.cn/websocket` diff --git a/JisolGameCocos/assets/script/action/PVPAction.ts b/JisolGameCocos/assets/script/action/PVPAction.ts index de5dfd77..2f9c73f9 100644 --- a/JisolGameCocos/assets/script/action/PVPAction.ts +++ b/JisolGameCocos/assets/script/action/PVPAction.ts @@ -6,8 +6,15 @@ import { GUI } from "../ui/UIConfig"; import BaseAction from "./BaseAction"; export interface GPVPStart{ - leftTactical:string; - rightTactical:string; + leftTactical:string; //左边玩家的阵法 + leftPets:{[key:number]:string}; //左边玩家的宠物 + rightTactical:string; //右边玩家的阵法 + rightPets:{[key:number]:string}; //左边玩家的宠物 +} + + +export interface GPVPText{ + text:string } export default class PVPAction extends BaseAction { @@ -16,6 +23,7 @@ export default class PVPAction extends BaseAction { app.socket.on(GAction.C_MODE_PVP_START_WAIT,this.onModePVPStartWait,this); app.socket.on(GAction.C_MODE_PVP_END_WAIT,this.onModePVPEndWait,this); app.socket.on(GAction.C_MODE_PVP_START,this.onModePVPStart,this,GActionType.GPVPStart); + app.socket.on(GAction.C_MODE_PVP_MESSAGE,this.onModePVPMessage,this,GActionType.GPVPText); } //PVP开始等待 @@ -33,7 +41,13 @@ export default class PVPAction extends BaseAction { //开始PVP onModePVPStart(info:GPVPStart){ console.log("开始PVP",info); - GBattleModeManager.getIns().Open(BattleMode.PVP,true); + GBattleModeManager.getIns().Open(BattleMode.PVP,true,info); + } + + //提示 + onModePVPMessage(info:GPVPText){ + console.log("提示PVP",info); + app.layer.Open(GUI.Tips,{text:info.text}) } } diff --git a/JisolGameCocos/assets/script/battle/GBaseMode.ts b/JisolGameCocos/assets/script/battle/GBaseMode.ts index dd5fa9e3..79ad5659 100644 --- a/JisolGameCocos/assets/script/battle/GBaseMode.ts +++ b/JisolGameCocos/assets/script/battle/GBaseMode.ts @@ -5,12 +5,15 @@ import { JNFrameInfo } from "../../../extensions/ngame/assets/ngame/sync/frame/J import { Node } from "cc"; import { Vec3 } from "cc"; import { Camera } from "cc"; +import GBattleModeManager from "./GBattleModeManager"; -export default class GBaseMode extends GObject { +export default class GBaseMode extends GObject { //场景相机 camera:Camera; + //模式数据 + data:DT; get scene():Node{ return this.node; @@ -33,6 +36,11 @@ export default class GBaseMode extends GObject { } } + //结束场景 + Close(){ + GBattleModeManager.getIns().Close(); + } + onSyncUpdate(dt: number,frame:JNFrameInfo, input?: T) { //重置 场景中的层级 diff --git a/JisolGameCocos/assets/script/battle/GBattleModeManager.ts b/JisolGameCocos/assets/script/battle/GBattleModeManager.ts index 275a3ba2..4146b2fd 100644 --- a/JisolGameCocos/assets/script/battle/GBattleModeManager.ts +++ b/JisolGameCocos/assets/script/battle/GBattleModeManager.ts @@ -46,6 +46,12 @@ export default class GBattleModeManager extends Singleton { //默认模式 default:BattleMode = BattleMode.OnHook; //默认无限模式 + //当前帧不切换模式 + frameNoSwitch:boolean = false; + + //模式数据 + data:any; + //初始化管理器 async onInit(info:GBattleModeInfo){ @@ -62,10 +68,12 @@ export default class GBattleModeManager extends Singleton { } //打开指定模式 - async Open(mode:BattleMode = null,isAuto:boolean = false){ + async Open(mode:BattleMode = null,isAuto:boolean = false,data:any = this.data){ + + this.data = data; if(!this.current && mode == null){ - await this.Open(this.default,true); + await this.Open(this.default,true,data); return; }else if(mode == null){ return; @@ -85,8 +93,7 @@ export default class GBattleModeManager extends Singleton { //主动调用场景销毁 app.sync.onReset(); this.current = null; - - await this.Open(); + this.frameNoSwitch = true; } @@ -108,6 +115,7 @@ export default class GBattleModeManager extends Singleton { if(!this.isInit || this.current == null) return; let mode = instantiate(this.modes[this.current]); mode.getComponent(GBaseMode).camera = this.camera; + mode.getComponent(GBaseMode).data = this.data; this.root.addChild(mode) } @@ -124,6 +132,13 @@ export default class GBattleModeManager extends Singleton { app.sync.update(dt); //自动推帧 this.onAutoFrame(dt); + + //如果当前模式是空则默认模式 + if(this.current == null && !this.frameNoSwitch){ + this.Open(); + } + this.frameNoSwitch = false; + } //自动推帧 diff --git a/JisolGameCocos/assets/script/battle/modes/GOnHookMode.ts b/JisolGameCocos/assets/script/battle/modes/GOnHookMode.ts index a1658111..d3ed2430 100644 --- a/JisolGameCocos/assets/script/battle/modes/GOnHookMode.ts +++ b/JisolGameCocos/assets/script/battle/modes/GOnHookMode.ts @@ -43,15 +43,13 @@ export enum GOnHookModePlayerEnum{ export interface GOnHookInfo{ //阵法 tactical: GTactical; - //宠物列表 - roles: TB.TbGRole[]; } /** * 挂机模式 无限出现小怪 (不是联机模式 该模式支持使用本地数据 和 API) */ @ccclass('GOnHookMode') -export default class GOnHookMode extends GBaseMode<{}>{ +export default class GOnHookMode extends GBaseMode<{},{}>{ @property(Prefab) rolePrefab: Prefab = null; @@ -139,8 +137,8 @@ export default class GOnHookMode extends GBaseMode<{}>{ this.map3.init(app.battleRes.maps[60001][2],1,app.battleRes.maps[60001][1].width * scale,1048 * scale); this.onUpdateMap(0); - this.playerInfo = { tactical: GTactical.getTactical().setOffset(this.playerPos), roles: GRoleUtil.getGRoles([]) }; - this.enemyInfo = { tactical: GTactical.getTactical(true).setOffset(this.enemyPos), roles: GRoleUtil.getGRoles([]) }; + this.playerInfo = { tactical: GTactical.getTactical().setOffset(this.playerPos) }; + this.enemyInfo = { tactical: GTactical.getTactical(true).setOffset(this.enemyPos) }; this.onUpdatePlayerPet(); @@ -379,8 +377,10 @@ export default class GOnHookMode extends GBaseMode<{}>{ //角色受击回调 onHitBack(role:GRoleDefault,hit:number){ + if(!role.get()) return; + //添加受击显示 - app.event.emit(ModeRenderEvent.HIT,role,hit); + app.event.emit(ModeRenderEvent.HIT,role.v2World.clone(),hit); } diff --git a/JisolGameCocos/assets/script/battle/modes/GPVPMode.ts b/JisolGameCocos/assets/script/battle/modes/GPVPMode.ts index 66f751a1..6878e9d5 100644 --- a/JisolGameCocos/assets/script/battle/modes/GPVPMode.ts +++ b/JisolGameCocos/assets/script/battle/modes/GPVPMode.ts @@ -8,6 +8,12 @@ import { GRoleUtil } from "../entity/GRole"; import GRoleDefault from "../base/role/GRoleDefault"; import { v3 } from "cc"; import { TB } from "../../../resources/config/data/schema"; +import JNFrameTime from "../../../../extensions/ngame/assets/ngame/sync/frame/game/time/JNFrameTime"; +import GBattleModeManager from "../GBattleModeManager"; +import { app, TD } from "../../App"; +import { ModeRenderEvent } from "../../ui/Consts/Game/ModeRender"; +import { GPVPStart } from "../../action/PVPAction"; +import { PlayerPetOV } from "../../consts/API"; const { ccclass, property } = _decorator; //PVP 角色 @@ -28,7 +34,7 @@ export interface GPVPModePlayerInfo{ * PVP 模式 */ @ccclass('GPVPMode') -export default class GPVPMode extends GBaseMode<{}>{ +export default class GPVPMode extends GBaseMode<{},GPVPStart>{ @property(Prefab) rolePrefab: Prefab = null; @@ -51,11 +57,48 @@ export default class GPVPMode extends GBaseMode<{}>{ //敌方位置 enemyPos: Vec2 = new Vec2(400,0); + //是否结束游戏 + isEndGame:boolean = false; + get scene():Node{ return this.objects; } onLoad(){ + + //整理GPVPStart数据 + //宠物Id列表 + let leftTactical:number[] = JSON.parse(this.data.leftTactical); + let rightTactical:number[] = JSON.parse(this.data.rightTactical); + + //宠物列表 + let leftTbs:TB.TbGRole[] = JSON.parse(this.data.leftTactical); + let rightTbs:TB.TbGRole[] = JSON.parse(this.data.rightTactical); + + //玩家宠物信息 + for (let index = 0; index < leftTactical.length; index++) { + const petId = leftTactical[index]; + if(petId != 0){ + let pet:PlayerPetOV = JSON.parse(this.data.leftPets[petId]); + leftTbs[index] = TD.TbGRole.get(pet.petTbId); + }else{ + leftTbs[index] = null; + } + } + for (let index = 0; index < rightTactical.length; index++) { + const petId = rightTactical[index]; + if(petId != 0){ + let pet:PlayerPetOV = JSON.parse(this.data.leftPets[petId]); + rightTbs[index] = TD.TbGRole.get(pet.petTbId); + }else{ + rightTbs[index] = null; + } + } + + + this.playerInfo = { tactical: GTactical.getTactical().setOffset(this.playerPos), roles: leftTbs }; + this.enemyInfo = { tactical: GTactical.getTactical(true).setOffset(this.enemyPos), roles: rightTbs }; + super.onLoad(); } @@ -68,13 +111,10 @@ export default class GPVPMode extends GBaseMode<{}>{ //初始化战斗 console.log("GPVPMode 模式初始化"); - - this.playerInfo = { tactical: GTactical.getTactical().setOffset(this.playerPos), roles: GRoleUtil.getGRoles([10004,10001,10004,10002,10003,10003]) }; - this.enemyInfo = { tactical: GTactical.getTactical(true).setOffset(this.enemyPos), roles: GRoleUtil.getGRoles([10002,10002,10001,10003,10004,10003]) }; - //生成玩家 - this.playerInfo.roles.forEach((info,index) => this.onGenRole(GPVPModePlayerEnum.PLAYER,index+1,info)) - this.enemyInfo.roles.forEach((info,index) => this.onGenRole(GPVPModePlayerEnum.ENEMY,index+1,info)) + //生成宠物 + this.playerInfo.roles.forEach((info,index) => info && this.onGenRole(GPVPModePlayerEnum.PLAYER,index+1,info)) + this.enemyInfo.roles.forEach((info,index) => info && this.onGenRole(GPVPModePlayerEnum.ENEMY,index+1,info)) } @@ -94,6 +134,11 @@ export default class GPVPMode extends GBaseMode<{}>{ return this.getEnumy(entity,type); } + //绑定受击回调 + entity.addHitCallback(this.onHitBack.bind(this)); + //绑定死亡回调 + entity.addKillBackEvent(this.onRoleKillBack.bind(this)) + this.addGObject(entity,tactical.getPosition(index)); this.getOnesRole(type).push(entity); @@ -111,6 +156,12 @@ export default class GPVPMode extends GBaseMode<{}>{ if(type == GPVPModePlayerEnum.ENEMY) return this.enemyRoles; } + //获取存活的宠物 + getOnesRoleAlive(type: GPVPModePlayerEnum):GRoleDefault[]{ + if(type == GPVPModePlayerEnum.PLAYER) return this.playerRoles.filter(role => !!role.get()); + if(type == GPVPModePlayerEnum.ENEMY) return this.enemyRoles.filter(role => !!role.get()); + } + //获取敌人 getEnumy(player:GRoleDefault,type:GPVPModePlayerEnum):GRoleDefault{ @@ -119,19 +170,65 @@ export default class GPVPMode extends GBaseMode<{}>{ if(type == GPVPModePlayerEnum.ENEMY) enumyOnes = GPVPModePlayerEnum.PLAYER //获取敌人 - let roles = this.getOnesRole(enumyOnes); + let roles = this.getOnesRoleAlive(enumyOnes); - //返回敌人 - //获取我在第几排 - let playerXY = player.tactical.getXY(player.tacticalIndex); - //通过排数获取最近的敌人 - let sort = roles.filter(role => !!role.get()).sort((enumy1,enumy2) => { - let enumy1XY = enumy1.tactical.getXY(enumy1.tacticalIndex); - let enumy2XY = enumy2.tactical.getXY(enumy2.tacticalIndex); - return Math.abs((playerXY.y * 1000) - (enumy1XY.y * 1000)) + Math.abs((playerXY.x - enumy1XY.x)) - - Math.abs((playerXY.y * 1000) - (enumy2XY.y * 1000)) + Math.abs((playerXY.x - enumy2XY.x)) - }); - return sort[0] + //通过距离获取最近的敌人 + if(roles[0]){ + let len = Math.abs(Vec2.distance(player.v2World,roles[0].v2World)); + let enumy = roles[0]; + for (let index = 0; index < roles.length; index++) { + const role = roles[index]; + let tLen; + if(tLen = Math.abs(Vec2.distance(player.v2World,role.v2World)) < len){ + enumy = role; + len = tLen; + } + + } + return enumy; + }else{ + return null; + } + + } + + //角色死亡回调 + onRoleKillBack(role:GRoleDefault){ + + //死亡销毁 + JNFrameTime.getInstance().setTimeout(() => { + if(role.isValid) + role.node.destroy() + },3000) + + this.onUpdateEndState(); + + } + + //刷新结束状态 + onUpdateEndState(){ + + //如果已经结束则返回 + if(this.isEndGame) return; + + //判断是否有队伍都死亡 + if(this.getOnesRoleAlive(GPVPModePlayerEnum.PLAYER).length == 0 || this.getOnesRoleAlive(GPVPModePlayerEnum.ENEMY).length == 0){ + this.isEndGame = true; + //结束游戏 + JNFrameTime.getInstance().setTimeout(() => { + this.Close(); + },3000) + } + + } + + //角色受击回调 + onHitBack(role:GRoleDefault,hit:number){ + + if(!role.get()) return; + + //添加受击显示 + app.event.emit(ModeRenderEvent.HIT,role.v2World.clone(),hit); } diff --git a/JisolGameCocos/assets/script/consts/GAction.ts b/JisolGameCocos/assets/script/consts/GAction.ts index 85e796a0..e3204609 100644 --- a/JisolGameCocos/assets/script/consts/GAction.ts +++ b/JisolGameCocos/assets/script/consts/GAction.ts @@ -15,5 +15,6 @@ export enum GAction { C_MODE_PVP_END = 3005, //PVP结束 C_MODE_PVP_START_WAIT = 3006, //开始等待PVP开始 C_MODE_PVP_END_WAIT = 3007, //结束等待PVP开始 + C_MODE_PVP_MESSAGE = 3008, //PVP 消息通知 } \ No newline at end of file diff --git a/JisolGameCocos/assets/script/consts/GActionType.ts b/JisolGameCocos/assets/script/consts/GActionType.ts index 03ec0196..27cfc855 100644 --- a/JisolGameCocos/assets/script/consts/GActionType.ts +++ b/JisolGameCocos/assets/script/consts/GActionType.ts @@ -13,5 +13,6 @@ export enum GActionType { /*************** 游戏模式 : PVP **************/ GPVPStart = "GPVPStart", //PVP 开始 + GPVPText = "GPVPText", //PVP 提示 } \ No newline at end of file diff --git a/JisolGameCocos/assets/script/ui/Consts/Game/ModeRender.ts b/JisolGameCocos/assets/script/ui/Consts/Game/ModeRender.ts index bc7e5612..958661d2 100644 --- a/JisolGameCocos/assets/script/ui/Consts/Game/ModeRender.ts +++ b/JisolGameCocos/assets/script/ui/Consts/Game/ModeRender.ts @@ -7,6 +7,7 @@ import { Prefab } from 'cc'; import { instantiate } from 'cc'; import { v3 } from 'cc'; import { ModeRenderHitText } from './ModeRenderHitText'; +import { Vec2 } from 'cc'; const { ccclass, property } = _decorator; export enum ModeRenderEvent{ @@ -34,11 +35,9 @@ export class ModeRender extends Component { } //受击 - onHit(role:GRoleDefault,hit:number){ + onHit(pos:Vec2,hit:number){ - if(!role.get()) return; - - let rolePos = GData.WorldCanvas.camera.worldToScreen(role.node.worldPosition); + let rolePos = GData.WorldCanvas.camera.worldToScreen(v3(pos.x,pos.y)); let hitNode = instantiate(this.hitPrefab); diff --git a/JisolGameCocos/assets/script/ui/Home/MainView.ts b/JisolGameCocos/assets/script/ui/Home/MainView.ts index ae282dd7..1aab2c58 100644 --- a/JisolGameCocos/assets/script/ui/Home/MainView.ts +++ b/JisolGameCocos/assets/script/ui/Home/MainView.ts @@ -16,9 +16,6 @@ export class MainView extends JNGLayerBase { onJNLoad(data?: any): void { - //打开默认模式 - GBattleModeManager.getIns().Open(); - //发送消息 ChatData.getIns().onSend({ message:`${PlayerData.getIns().data.playerId} 加入游戏` diff --git a/JisolGameCocos/extensions/ngame b/JisolGameCocos/extensions/ngame index ddba7560..275c3cf5 160000 --- a/JisolGameCocos/extensions/ngame +++ b/JisolGameCocos/extensions/ngame @@ -1 +1 @@ -Subproject commit ddba756071599f88801c2001235b59b152117740 +Subproject commit 275c3cf5d8f108a4ca9d6f22dabdd1d8b853c84c diff --git a/JisolGameCocos/proto/GPVPMessage.proto b/JisolGameCocos/proto/GPVPMessage.proto index 907b6e08..d309b115 100644 --- a/JisolGameCocos/proto/GPVPMessage.proto +++ b/JisolGameCocos/proto/GPVPMessage.proto @@ -6,7 +6,14 @@ option java_package = "cn.jisol.ngame.proto"; //PVP 开始 message GPVPStart { string leftTactical = 1; //左边的布阵 - string rightTactical = 2; //右边的布阵 + map leftPets = 2; //左边的宠物 key:宠物Id value 宠物配置Id + string rightTactical = 3; //右边的布阵 + map rightPets = 4; //右边的宠物 key:宠物Id value 宠物配置Id +} + +//PVP 消息提示 +message GPVPText { + string text = 1; //消息提示 } diff --git a/JisolGameServer/Main/src/main/java/cn/jisol/game/actions/GActionEnum.java b/JisolGameServer/Main/src/main/java/cn/jisol/game/actions/GActionEnum.java index 0a2aae04..9eac6e6a 100644 --- a/JisolGameServer/Main/src/main/java/cn/jisol/game/actions/GActionEnum.java +++ b/JisolGameServer/Main/src/main/java/cn/jisol/game/actions/GActionEnum.java @@ -16,5 +16,6 @@ public interface GActionEnum { int C_MODE_PVP_END = 3005; //PVP结束 int C_MODE_PVP_START_WAIT = 3006; //开始等待PVP开始 int C_MODE_PVP_END_WAIT = 3007; //结束等待PVP开始 + int C_MODE_PVP_MESSAGE = 3008; //PVP 消息通知 } diff --git a/JisolGameServer/Main/src/main/java/cn/jisol/game/actions/onhook/GPVPAction.java b/JisolGameServer/Main/src/main/java/cn/jisol/game/actions/onhook/GPVPAction.java index 5a87da99..cc41270b 100644 --- a/JisolGameServer/Main/src/main/java/cn/jisol/game/actions/onhook/GPVPAction.java +++ b/JisolGameServer/Main/src/main/java/cn/jisol/game/actions/onhook/GPVPAction.java @@ -1,6 +1,9 @@ package cn.jisol.game.actions.onhook; +import cn.hutool.json.JSON; +import cn.hutool.json.JSONUtil; import cn.jisol.game.actions.GActionEnum; +import cn.jisol.game.controller.game.GPlayerPetController; import cn.jisol.game.controller.game.GPlayerTacticalController; import cn.jisol.game.entity.game.PlayerTactical; import cn.jisol.game.network.client.GClient; @@ -89,18 +92,51 @@ public class GPVPAction { } //获取双方的阵型 - GPlayerTacticalController tactical = SpringBeanUtils.getBean(GPlayerTacticalController.class); + GPlayerTacticalController tacticalController = SpringBeanUtils.getBean(GPlayerTacticalController.class); + GPlayerPetController petController = SpringBeanUtils.getBean(GPlayerPetController.class); + + String leftTactical = tacticalController.getInfo(client1.player).data.getTacticalData(); + String rightTactical = tacticalController.getInfo(client2.player).data.getTacticalData(); + + + //如果有人阵法是默认 则 不开始 + if (leftTactical.equals(tacticalController.InitTactical) || rightTactical.equals(tacticalController.InitTactical)){ + if(leftTactical.equals(tacticalController.InitTactical)){ + client1.invoke(GActionEnum.C_MODE_PVP_END_WAIT); + client1.invoke(GActionEnum.C_MODE_PVP_MESSAGE, GPVPMessage.GPVPText.newBuilder().setText("你的阵法没有宠物~").build()); + }else{ + //加入回列表 + pool.addFirst(client1); + } + if(rightTactical.equals(tacticalController.InitTactical)){ + client2.invoke(GActionEnum.C_MODE_PVP_END_WAIT); + client2.invoke(GActionEnum.C_MODE_PVP_MESSAGE, GPVPMessage.GPVPText.newBuilder().setText("你的阵法没有宠物~").build()); + }else{ + //加入回列表 + pool.addFirst(client2); + } + return; + } //构建匹配信息 - GPVPMessage.GPVPStart info = GPVPMessage.GPVPStart.newBuilder() - .setLeftTactical(tactical.getInfo(client1.player).data.getTacticalData()) - .setRightTactical(tactical.getInfo(client2.player).data.getTacticalData()) - .build(); + GPVPMessage.GPVPStart.Builder builder = GPVPMessage.GPVPStart.newBuilder() + .setLeftTactical(leftTactical) + .setRightTactical(rightTactical); + //构建玩家宠物列表 + petController.getPetList(client1.player).data.forEach(pet -> { + builder.putLeftPets(pet.getPetId(), JSONUtil.toJsonStr(pet)); + }); + petController.getPetList(client2.player).data.forEach(pet -> { + builder.putLeftPets(pet.getPetId(), JSONUtil.toJsonStr(pet)); + }); + + //取消等待 client1.invoke(GActionEnum.C_MODE_PVP_END_WAIT); client2.invoke(GActionEnum.C_MODE_PVP_END_WAIT); + GPVPMessage.GPVPStart info = builder.build(); //PVP 开始 client1.invoke(GActionEnum.C_MODE_PVP_START, info); client2.invoke(GActionEnum.C_MODE_PVP_START, info); diff --git a/JisolGameServer/Main/src/main/java/cn/jisol/game/controller/game/GPlayerTacticalController.java b/JisolGameServer/Main/src/main/java/cn/jisol/game/controller/game/GPlayerTacticalController.java index 89c7e61e..e294f875 100644 --- a/JisolGameServer/Main/src/main/java/cn/jisol/game/controller/game/GPlayerTacticalController.java +++ b/JisolGameServer/Main/src/main/java/cn/jisol/game/controller/game/GPlayerTacticalController.java @@ -29,6 +29,9 @@ public class GPlayerTacticalController { @Autowired PlayerTacticalService playerTacticalService; + //默认阵法 + public final String InitTactical = "[0,0,0,0,0,0,0,0,0]"; + //获取玩家阵法 @ApiImplicitParams({}) @ApiOperation(value = "获取玩家阵法") @@ -49,7 +52,7 @@ public class GPlayerTacticalController { //如果没有阵法则默认一个阵法 if(Objects.isNull(info.getTacticalData())){ - info.setTacticalData("[0,0,0,0,0,0,0,0,0]"); + info.setTacticalData(InitTactical); } return NewsContext.onSuccess("获取成功",info); diff --git a/JisolGameServer/Main/src/main/java/cn/jisol/game/proto/GPVPMessage.java b/JisolGameServer/Main/src/main/java/cn/jisol/game/proto/GPVPMessage.java index 998b9b1b..62dd5f46 100644 --- a/JisolGameServer/Main/src/main/java/cn/jisol/game/proto/GPVPMessage.java +++ b/JisolGameServer/Main/src/main/java/cn/jisol/game/proto/GPVPMessage.java @@ -26,7 +26,7 @@ public final class GPVPMessage { * string leftTactical = 1; * @return The leftTactical. */ - java.lang.String getLeftTactical(); + String getLeftTactical(); /** *
      *左边的布阵
@@ -40,23 +40,135 @@ public final class GPVPMessage {
 
     /**
      * 
-     *右边的布阵
+     *左边的宠物 key:宠物Id value 宠物配置Id
      * 
* - * string rightTactical = 2; - * @return The rightTactical. + * map<int64, string> leftPets = 2; */ - java.lang.String getRightTactical(); + int getLeftPetsCount(); + /** + *
+     *左边的宠物 key:宠物Id value 宠物配置Id
+     * 
+ * + * map<int64, string> leftPets = 2; + */ + boolean containsLeftPets( + long key); + /** + * Use {@link #getLeftPetsMap()} instead. + */ + @Deprecated + java.util.Map + getLeftPets(); + /** + *
+     *左边的宠物 key:宠物Id value 宠物配置Id
+     * 
+ * + * map<int64, string> leftPets = 2; + */ + java.util.Map + getLeftPetsMap(); + /** + *
+     *左边的宠物 key:宠物Id value 宠物配置Id
+     * 
+ * + * map<int64, string> leftPets = 2; + */ + + /* nullable */ +String getLeftPetsOrDefault( + long key, + /* nullable */ +String defaultValue); + /** + *
+     *左边的宠物 key:宠物Id value 宠物配置Id
+     * 
+ * + * map<int64, string> leftPets = 2; + */ + + String getLeftPetsOrThrow( + long key); + /** *
      *右边的布阵
      * 
* - * string rightTactical = 2; + * string rightTactical = 3; + * @return The rightTactical. + */ + String getRightTactical(); + /** + *
+     *右边的布阵
+     * 
+ * + * string rightTactical = 3; * @return The bytes for rightTactical. */ com.google.protobuf.ByteString getRightTacticalBytes(); + + /** + *
+     *右边的宠物 key:宠物Id value 宠物配置Id
+     * 
+ * + * map<int64, string> rightPets = 4; + */ + int getRightPetsCount(); + /** + *
+     *右边的宠物 key:宠物Id value 宠物配置Id
+     * 
+ * + * map<int64, string> rightPets = 4; + */ + boolean containsRightPets( + long key); + /** + * Use {@link #getRightPetsMap()} instead. + */ + @Deprecated + java.util.Map + getRightPets(); + /** + *
+     *右边的宠物 key:宠物Id value 宠物配置Id
+     * 
+ * + * map<int64, string> rightPets = 4; + */ + java.util.Map + getRightPetsMap(); + /** + *
+     *右边的宠物 key:宠物Id value 宠物配置Id
+     * 
+ * + * map<int64, string> rightPets = 4; + */ + + /* nullable */ +String getRightPetsOrDefault( + long key, + /* nullable */ +String defaultValue); + /** + *
+     *右边的宠物 key:宠物Id value 宠物配置Id
+     * 
+ * + * map<int64, string> rightPets = 4; + */ + + String getRightPetsOrThrow( + long key); } /** *
@@ -79,14 +191,14 @@ public final class GPVPMessage {
       rightTactical_ = "";
     }
 
-    @java.lang.Override
+    @Override
     @SuppressWarnings({"unused"})
-    protected java.lang.Object newInstance(
+    protected Object newInstance(
         UnusedPrivateParameter unused) {
       return new GPVPStart();
     }
 
-    @java.lang.Override
+    @Override
     public final com.google.protobuf.UnknownFieldSet
     getUnknownFields() {
       return this.unknownFields;
@@ -97,8 +209,9 @@ public final class GPVPMessage {
         throws com.google.protobuf.InvalidProtocolBufferException {
       this();
       if (extensionRegistry == null) {
-        throw new java.lang.NullPointerException();
+        throw new NullPointerException();
       }
+      int mutable_bitField0_ = 0;
       com.google.protobuf.UnknownFieldSet.Builder unknownFields =
           com.google.protobuf.UnknownFieldSet.newBuilder();
       try {
@@ -110,17 +223,43 @@ public final class GPVPMessage {
               done = true;
               break;
             case 10: {
-              java.lang.String s = input.readStringRequireUtf8();
+              String s = input.readStringRequireUtf8();
 
               leftTactical_ = s;
               break;
             }
             case 18: {
-              java.lang.String s = input.readStringRequireUtf8();
+              if (!((mutable_bitField0_ & 0x00000001) != 0)) {
+                leftPets_ = com.google.protobuf.MapField.newMapField(
+                    LeftPetsDefaultEntryHolder.defaultEntry);
+                mutable_bitField0_ |= 0x00000001;
+              }
+              com.google.protobuf.MapEntry
+              leftPets__ = input.readMessage(
+                  LeftPetsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
+              leftPets_.getMutableMap().put(
+                  leftPets__.getKey(), leftPets__.getValue());
+              break;
+            }
+            case 26: {
+              String s = input.readStringRequireUtf8();
 
               rightTactical_ = s;
               break;
             }
+            case 34: {
+              if (!((mutable_bitField0_ & 0x00000002) != 0)) {
+                rightPets_ = com.google.protobuf.MapField.newMapField(
+                    RightPetsDefaultEntryHolder.defaultEntry);
+                mutable_bitField0_ |= 0x00000002;
+              }
+              com.google.protobuf.MapEntry
+              rightPets__ = input.readMessage(
+                  RightPetsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
+              rightPets_.getMutableMap().put(
+                  rightPets__.getKey(), rightPets__.getValue());
+              break;
+            }
             default: {
               if (!parseUnknownField(
                   input, unknownFields, extensionRegistry, tag)) {
@@ -147,8 +286,22 @@ public final class GPVPMessage {
       return GPVPMessage.internal_static_GPVPStart_descriptor;
     }
 
-    @java.lang.Override
-    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+    @SuppressWarnings({"rawtypes"})
+    @Override
+    protected com.google.protobuf.MapField internalGetMapField(
+        int number) {
+      switch (number) {
+        case 2:
+          return internalGetLeftPets();
+        case 4:
+          return internalGetRightPets();
+        default:
+          throw new RuntimeException(
+              "Invalid map field number: " + number);
+      }
+    }
+    @Override
+    protected FieldAccessorTable
         internalGetFieldAccessorTable() {
       return GPVPMessage.internal_static_GPVPStart_fieldAccessorTable
           .ensureFieldAccessorsInitialized(
@@ -156,7 +309,7 @@ public final class GPVPMessage {
     }
 
     public static final int LEFTTACTICAL_FIELD_NUMBER = 1;
-    private volatile java.lang.Object leftTactical_;
+    private volatile Object leftTactical_;
     /**
      * 
      *左边的布阵
@@ -165,15 +318,15 @@ public final class GPVPMessage {
      * string leftTactical = 1;
      * @return The leftTactical.
      */
-    @java.lang.Override
-    public java.lang.String getLeftTactical() {
-      java.lang.Object ref = leftTactical_;
-      if (ref instanceof java.lang.String) {
-        return (java.lang.String) ref;
+    @Override
+    public String getLeftTactical() {
+      Object ref = leftTactical_;
+      if (ref instanceof String) {
+        return (String) ref;
       } else {
         com.google.protobuf.ByteString bs = 
             (com.google.protobuf.ByteString) ref;
-        java.lang.String s = bs.toStringUtf8();
+        String s = bs.toStringUtf8();
         leftTactical_ = s;
         return s;
       }
@@ -186,14 +339,14 @@ public final class GPVPMessage {
      * string leftTactical = 1;
      * @return The bytes for leftTactical.
      */
-    @java.lang.Override
+    @Override
     public com.google.protobuf.ByteString
         getLeftTacticalBytes() {
-      java.lang.Object ref = leftTactical_;
-      if (ref instanceof java.lang.String) {
+      Object ref = leftTactical_;
+      if (ref instanceof String) {
         com.google.protobuf.ByteString b = 
             com.google.protobuf.ByteString.copyFromUtf8(
-                (java.lang.String) ref);
+                (String) ref);
         leftTactical_ = b;
         return b;
       } else {
@@ -201,25 +354,122 @@ public final class GPVPMessage {
       }
     }
 
-    public static final int RIGHTTACTICAL_FIELD_NUMBER = 2;
-    private volatile java.lang.Object rightTactical_;
+    public static final int LEFTPETS_FIELD_NUMBER = 2;
+    private static final class LeftPetsDefaultEntryHolder {
+      static final com.google.protobuf.MapEntry<
+          Long, String> defaultEntry =
+              com.google.protobuf.MapEntry
+              .newDefaultInstance(
+                  GPVPMessage.internal_static_GPVPStart_LeftPetsEntry_descriptor,
+                  com.google.protobuf.WireFormat.FieldType.INT64,
+                  0L,
+                  com.google.protobuf.WireFormat.FieldType.STRING,
+                  "");
+    }
+    private com.google.protobuf.MapField<
+        Long, String> leftPets_;
+    private com.google.protobuf.MapField
+    internalGetLeftPets() {
+      if (leftPets_ == null) {
+        return com.google.protobuf.MapField.emptyMapField(
+            LeftPetsDefaultEntryHolder.defaultEntry);
+      }
+      return leftPets_;
+    }
+
+    public int getLeftPetsCount() {
+      return internalGetLeftPets().getMap().size();
+    }
+    /**
+     * 
+     *左边的宠物 key:宠物Id value 宠物配置Id
+     * 
+ * + * map<int64, string> leftPets = 2; + */ + + @Override + public boolean containsLeftPets( + long key) { + + return internalGetLeftPets().getMap().containsKey(key); + } + /** + * Use {@link #getLeftPetsMap()} instead. + */ + @Override + @Deprecated + public java.util.Map getLeftPets() { + return getLeftPetsMap(); + } + /** + *
+     *左边的宠物 key:宠物Id value 宠物配置Id
+     * 
+ * + * map<int64, string> leftPets = 2; + */ + @Override + + public java.util.Map getLeftPetsMap() { + return internalGetLeftPets().getMap(); + } + /** + *
+     *左边的宠物 key:宠物Id value 宠物配置Id
+     * 
+ * + * map<int64, string> leftPets = 2; + */ + @Override + + public String getLeftPetsOrDefault( + long key, + String defaultValue) { + + java.util.Map map = + internalGetLeftPets().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     *左边的宠物 key:宠物Id value 宠物配置Id
+     * 
+ * + * map<int64, string> leftPets = 2; + */ + @Override + + public String getLeftPetsOrThrow( + long key) { + + java.util.Map map = + internalGetLeftPets().getMap(); + if (!map.containsKey(key)) { + throw new IllegalArgumentException(); + } + return map.get(key); + } + + public static final int RIGHTTACTICAL_FIELD_NUMBER = 3; + private volatile Object rightTactical_; /** *
      *右边的布阵
      * 
* - * string rightTactical = 2; + * string rightTactical = 3; * @return The rightTactical. */ - @java.lang.Override - public java.lang.String getRightTactical() { - java.lang.Object ref = rightTactical_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; + @Override + public String getRightTactical() { + Object ref = rightTactical_; + if (ref instanceof String) { + return (String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); + String s = bs.toStringUtf8(); rightTactical_ = s; return s; } @@ -229,17 +479,17 @@ public final class GPVPMessage { *右边的布阵 *
* - * string rightTactical = 2; + * string rightTactical = 3; * @return The bytes for rightTactical. */ - @java.lang.Override + @Override public com.google.protobuf.ByteString getRightTacticalBytes() { - java.lang.Object ref = rightTactical_; - if (ref instanceof java.lang.String) { + Object ref = rightTactical_; + if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + (String) ref); rightTactical_ = b; return b; } else { @@ -247,8 +497,105 @@ public final class GPVPMessage { } } + public static final int RIGHTPETS_FIELD_NUMBER = 4; + private static final class RightPetsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + Long, String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + GPVPMessage.internal_static_GPVPStart_RightPetsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.INT64, + 0L, + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + private com.google.protobuf.MapField< + Long, String> rightPets_; + private com.google.protobuf.MapField + internalGetRightPets() { + if (rightPets_ == null) { + return com.google.protobuf.MapField.emptyMapField( + RightPetsDefaultEntryHolder.defaultEntry); + } + return rightPets_; + } + + public int getRightPetsCount() { + return internalGetRightPets().getMap().size(); + } + /** + *
+     *右边的宠物 key:宠物Id value 宠物配置Id
+     * 
+ * + * map<int64, string> rightPets = 4; + */ + + @Override + public boolean containsRightPets( + long key) { + + return internalGetRightPets().getMap().containsKey(key); + } + /** + * Use {@link #getRightPetsMap()} instead. + */ + @Override + @Deprecated + public java.util.Map getRightPets() { + return getRightPetsMap(); + } + /** + *
+     *右边的宠物 key:宠物Id value 宠物配置Id
+     * 
+ * + * map<int64, string> rightPets = 4; + */ + @Override + + public java.util.Map getRightPetsMap() { + return internalGetRightPets().getMap(); + } + /** + *
+     *右边的宠物 key:宠物Id value 宠物配置Id
+     * 
+ * + * map<int64, string> rightPets = 4; + */ + @Override + + public String getRightPetsOrDefault( + long key, + String defaultValue) { + + java.util.Map map = + internalGetRightPets().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     *右边的宠物 key:宠物Id value 宠物配置Id
+     * 
+ * + * map<int64, string> rightPets = 4; + */ + @Override + + public String getRightPetsOrThrow( + long key) { + + java.util.Map map = + internalGetRightPets().getMap(); + if (!map.containsKey(key)) { + throw new IllegalArgumentException(); + } + return map.get(key); + } + private byte memoizedIsInitialized = -1; - @java.lang.Override + @Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; @@ -258,19 +605,31 @@ public final class GPVPMessage { return true; } - @java.lang.Override + @Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(leftTactical_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, leftTactical_); } + com.google.protobuf.GeneratedMessageV3 + .serializeLongMapTo( + output, + internalGetLeftPets(), + LeftPetsDefaultEntryHolder.defaultEntry, + 2); if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rightTactical_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, rightTactical_); + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, rightTactical_); } + com.google.protobuf.GeneratedMessageV3 + .serializeLongMapTo( + output, + internalGetRightPets(), + RightPetsDefaultEntryHolder.defaultEntry, + 4); unknownFields.writeTo(output); } - @java.lang.Override + @Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; @@ -279,16 +638,36 @@ public final class GPVPMessage { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(leftTactical_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, leftTactical_); } + for (java.util.Map.Entry entry + : internalGetLeftPets().getMap().entrySet()) { + com.google.protobuf.MapEntry + leftPets__ = LeftPetsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, leftPets__); + } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rightTactical_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, rightTactical_); + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, rightTactical_); + } + for (java.util.Map.Entry entry + : internalGetRightPets().getMap().entrySet()) { + com.google.protobuf.MapEntry + rightPets__ = RightPetsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, rightPets__); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { + @Override + public boolean equals(final Object obj) { if (obj == this) { return true; } @@ -299,13 +678,17 @@ public final class GPVPMessage { if (!getLeftTactical() .equals(other.getLeftTactical())) return false; + if (!internalGetLeftPets().equals( + other.internalGetLeftPets())) return false; if (!getRightTactical() .equals(other.getRightTactical())) return false; + if (!internalGetRightPets().equals( + other.internalGetRightPets())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } - @java.lang.Override + @Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; @@ -314,8 +697,16 @@ public final class GPVPMessage { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + LEFTTACTICAL_FIELD_NUMBER; hash = (53 * hash) + getLeftTactical().hashCode(); + if (!internalGetLeftPets().getMap().isEmpty()) { + hash = (37 * hash) + LEFTPETS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLeftPets().hashCode(); + } hash = (37 * hash) + RIGHTTACTICAL_FIELD_NUMBER; hash = (53 * hash) + getRightTactical().hashCode(); + if (!internalGetRightPets().getMap().isEmpty()) { + hash = (37 * hash) + RIGHTPETS_FIELD_NUMBER; + hash = (53 * hash) + internalGetRightPets().hashCode(); + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -391,7 +782,7 @@ public final class GPVPMessage { .parseWithIOException(PARSER, input, extensionRegistry); } - @java.lang.Override + @Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); @@ -399,15 +790,15 @@ public final class GPVPMessage { public static Builder newBuilder(GPVPMessage.GPVPStart prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - @java.lang.Override + @Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } - @java.lang.Override + @Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -427,21 +818,47 @@ public final class GPVPMessage { return GPVPMessage.internal_static_GPVPStart_descriptor; } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 2: + return internalGetLeftPets(); + case 4: + return internalGetRightPets(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 2: + return internalGetMutableLeftPets(); + case 4: + return internalGetMutableRightPets(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @Override + protected FieldAccessorTable internalGetFieldAccessorTable() { return GPVPMessage.internal_static_GPVPStart_fieldAccessorTable .ensureFieldAccessorsInitialized( GPVPMessage.GPVPStart.class, GPVPMessage.GPVPStart.Builder.class); } - // Construct using cn.jisol.game.proto.GPVPMessage.GPVPStart.newBuilder() + // Construct using cn.jisol.ngame.proto.GPVPMessage.GPVPStart.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -450,28 +867,30 @@ public final class GPVPMessage { .alwaysUseFieldBuilders) { } } - @java.lang.Override + @Override public Builder clear() { super.clear(); leftTactical_ = ""; + internalGetMutableLeftPets().clear(); rightTactical_ = ""; + internalGetMutableRightPets().clear(); return this; } - @java.lang.Override + @Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return GPVPMessage.internal_static_GPVPStart_descriptor; } - @java.lang.Override + @Override public GPVPMessage.GPVPStart getDefaultInstanceForType() { return GPVPMessage.GPVPStart.getDefaultInstance(); } - @java.lang.Override + @Override public GPVPMessage.GPVPStart build() { GPVPMessage.GPVPStart result = buildPartial(); if (!result.isInitialized()) { @@ -480,48 +899,53 @@ public final class GPVPMessage { return result; } - @java.lang.Override + @Override public GPVPMessage.GPVPStart buildPartial() { GPVPMessage.GPVPStart result = new GPVPMessage.GPVPStart(this); + int from_bitField0_ = bitField0_; result.leftTactical_ = leftTactical_; + result.leftPets_ = internalGetLeftPets(); + result.leftPets_.makeImmutable(); result.rightTactical_ = rightTactical_; + result.rightPets_ = internalGetRightPets(); + result.rightPets_.makeImmutable(); onBuilt(); return result; } - @java.lang.Override + @Override public Builder clone() { return super.clone(); } - @java.lang.Override + @Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { + Object value) { return super.setField(field, value); } - @java.lang.Override + @Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } - @java.lang.Override + @Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } - @java.lang.Override + @Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { + int index, Object value) { return super.setRepeatedField(field, index, value); } - @java.lang.Override + @Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { + Object value) { return super.addRepeatedField(field, value); } - @java.lang.Override + @Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof GPVPMessage.GPVPStart) { return mergeFrom((GPVPMessage.GPVPStart)other); @@ -537,21 +961,25 @@ public final class GPVPMessage { leftTactical_ = other.leftTactical_; onChanged(); } + internalGetMutableLeftPets().mergeFrom( + other.internalGetLeftPets()); if (!other.getRightTactical().isEmpty()) { rightTactical_ = other.rightTactical_; onChanged(); } + internalGetMutableRightPets().mergeFrom( + other.internalGetRightPets()); this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } - @java.lang.Override + @Override public final boolean isInitialized() { return true; } - @java.lang.Override + @Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -569,8 +997,9 @@ public final class GPVPMessage { } return this; } + private int bitField0_; - private java.lang.Object leftTactical_ = ""; + private Object leftTactical_ = ""; /** *
        *左边的布阵
@@ -579,16 +1008,16 @@ public final class GPVPMessage {
        * string leftTactical = 1;
        * @return The leftTactical.
        */
-      public java.lang.String getLeftTactical() {
-        java.lang.Object ref = leftTactical_;
-        if (!(ref instanceof java.lang.String)) {
+      public String getLeftTactical() {
+        Object ref = leftTactical_;
+        if (!(ref instanceof String)) {
           com.google.protobuf.ByteString bs =
               (com.google.protobuf.ByteString) ref;
-          java.lang.String s = bs.toStringUtf8();
+          String s = bs.toStringUtf8();
           leftTactical_ = s;
           return s;
         } else {
-          return (java.lang.String) ref;
+          return (String) ref;
         }
       }
       /**
@@ -601,11 +1030,11 @@ public final class GPVPMessage {
        */
       public com.google.protobuf.ByteString
           getLeftTacticalBytes() {
-        java.lang.Object ref = leftTactical_;
+        Object ref = leftTactical_;
         if (ref instanceof String) {
           com.google.protobuf.ByteString b = 
               com.google.protobuf.ByteString.copyFromUtf8(
-                  (java.lang.String) ref);
+                  (String) ref);
           leftTactical_ = b;
           return b;
         } else {
@@ -622,7 +1051,7 @@ public final class GPVPMessage {
        * @return This builder for chaining.
        */
       public Builder setLeftTactical(
-          java.lang.String value) {
+          String value) {
         if (value == null) {
     throw new NullPointerException();
   }
@@ -666,25 +1095,184 @@ public final class GPVPMessage {
         return this;
       }
 
-      private java.lang.Object rightTactical_ = "";
+      private com.google.protobuf.MapField<
+          Long, String> leftPets_;
+      private com.google.protobuf.MapField
+      internalGetLeftPets() {
+        if (leftPets_ == null) {
+          return com.google.protobuf.MapField.emptyMapField(
+              LeftPetsDefaultEntryHolder.defaultEntry);
+        }
+        return leftPets_;
+      }
+      private com.google.protobuf.MapField
+      internalGetMutableLeftPets() {
+        onChanged();;
+        if (leftPets_ == null) {
+          leftPets_ = com.google.protobuf.MapField.newMapField(
+              LeftPetsDefaultEntryHolder.defaultEntry);
+        }
+        if (!leftPets_.isMutable()) {
+          leftPets_ = leftPets_.copy();
+        }
+        return leftPets_;
+      }
+
+      public int getLeftPetsCount() {
+        return internalGetLeftPets().getMap().size();
+      }
+      /**
+       * 
+       *左边的宠物 key:宠物Id value 宠物配置Id
+       * 
+ * + * map<int64, string> leftPets = 2; + */ + + @Override + public boolean containsLeftPets( + long key) { + + return internalGetLeftPets().getMap().containsKey(key); + } + /** + * Use {@link #getLeftPetsMap()} instead. + */ + @Override + @Deprecated + public java.util.Map getLeftPets() { + return getLeftPetsMap(); + } + /** + *
+       *左边的宠物 key:宠物Id value 宠物配置Id
+       * 
+ * + * map<int64, string> leftPets = 2; + */ + @Override + + public java.util.Map getLeftPetsMap() { + return internalGetLeftPets().getMap(); + } + /** + *
+       *左边的宠物 key:宠物Id value 宠物配置Id
+       * 
+ * + * map<int64, string> leftPets = 2; + */ + @Override + + public String getLeftPetsOrDefault( + long key, + String defaultValue) { + + java.util.Map map = + internalGetLeftPets().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+       *左边的宠物 key:宠物Id value 宠物配置Id
+       * 
+ * + * map<int64, string> leftPets = 2; + */ + @Override + + public String getLeftPetsOrThrow( + long key) { + + java.util.Map map = + internalGetLeftPets().getMap(); + if (!map.containsKey(key)) { + throw new IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLeftPets() { + internalGetMutableLeftPets().getMutableMap() + .clear(); + return this; + } + /** + *
+       *左边的宠物 key:宠物Id value 宠物配置Id
+       * 
+ * + * map<int64, string> leftPets = 2; + */ + + public Builder removeLeftPets( + long key) { + + internalGetMutableLeftPets().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @Deprecated + public java.util.Map + getMutableLeftPets() { + return internalGetMutableLeftPets().getMutableMap(); + } + /** + *
+       *左边的宠物 key:宠物Id value 宠物配置Id
+       * 
+ * + * map<int64, string> leftPets = 2; + */ + public Builder putLeftPets( + long key, + String value) { + + if (value == null) { + throw new NullPointerException("map value"); +} + + internalGetMutableLeftPets().getMutableMap() + .put(key, value); + return this; + } + /** + *
+       *左边的宠物 key:宠物Id value 宠物配置Id
+       * 
+ * + * map<int64, string> leftPets = 2; + */ + + public Builder putAllLeftPets( + java.util.Map values) { + internalGetMutableLeftPets().getMutableMap() + .putAll(values); + return this; + } + + private Object rightTactical_ = ""; /** *
        *右边的布阵
        * 
* - * string rightTactical = 2; + * string rightTactical = 3; * @return The rightTactical. */ - public java.lang.String getRightTactical() { - java.lang.Object ref = rightTactical_; - if (!(ref instanceof java.lang.String)) { + public String getRightTactical() { + Object ref = rightTactical_; + if (!(ref instanceof String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); + String s = bs.toStringUtf8(); rightTactical_ = s; return s; } else { - return (java.lang.String) ref; + return (String) ref; } } /** @@ -692,16 +1280,16 @@ public final class GPVPMessage { *右边的布阵 *
* - * string rightTactical = 2; + * string rightTactical = 3; * @return The bytes for rightTactical. */ public com.google.protobuf.ByteString getRightTacticalBytes() { - java.lang.Object ref = rightTactical_; + Object ref = rightTactical_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + (String) ref); rightTactical_ = b; return b; } else { @@ -713,12 +1301,12 @@ public final class GPVPMessage { *右边的布阵 *
* - * string rightTactical = 2; + * string rightTactical = 3; * @param value The rightTactical to set. * @return This builder for chaining. */ public Builder setRightTactical( - java.lang.String value) { + String value) { if (value == null) { throw new NullPointerException(); } @@ -732,7 +1320,7 @@ public final class GPVPMessage { *右边的布阵 *
* - * string rightTactical = 2; + * string rightTactical = 3; * @return This builder for chaining. */ public Builder clearRightTactical() { @@ -746,7 +1334,7 @@ public final class GPVPMessage { *右边的布阵 * * - * string rightTactical = 2; + * string rightTactical = 3; * @param value The bytes for rightTactical to set. * @return This builder for chaining. */ @@ -761,13 +1349,172 @@ public final class GPVPMessage { onChanged(); return this; } - @java.lang.Override + + private com.google.protobuf.MapField< + Long, String> rightPets_; + private com.google.protobuf.MapField + internalGetRightPets() { + if (rightPets_ == null) { + return com.google.protobuf.MapField.emptyMapField( + RightPetsDefaultEntryHolder.defaultEntry); + } + return rightPets_; + } + private com.google.protobuf.MapField + internalGetMutableRightPets() { + onChanged();; + if (rightPets_ == null) { + rightPets_ = com.google.protobuf.MapField.newMapField( + RightPetsDefaultEntryHolder.defaultEntry); + } + if (!rightPets_.isMutable()) { + rightPets_ = rightPets_.copy(); + } + return rightPets_; + } + + public int getRightPetsCount() { + return internalGetRightPets().getMap().size(); + } + /** + *
+       *右边的宠物 key:宠物Id value 宠物配置Id
+       * 
+ * + * map<int64, string> rightPets = 4; + */ + + @Override + public boolean containsRightPets( + long key) { + + return internalGetRightPets().getMap().containsKey(key); + } + /** + * Use {@link #getRightPetsMap()} instead. + */ + @Override + @Deprecated + public java.util.Map getRightPets() { + return getRightPetsMap(); + } + /** + *
+       *右边的宠物 key:宠物Id value 宠物配置Id
+       * 
+ * + * map<int64, string> rightPets = 4; + */ + @Override + + public java.util.Map getRightPetsMap() { + return internalGetRightPets().getMap(); + } + /** + *
+       *右边的宠物 key:宠物Id value 宠物配置Id
+       * 
+ * + * map<int64, string> rightPets = 4; + */ + @Override + + public String getRightPetsOrDefault( + long key, + String defaultValue) { + + java.util.Map map = + internalGetRightPets().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+       *右边的宠物 key:宠物Id value 宠物配置Id
+       * 
+ * + * map<int64, string> rightPets = 4; + */ + @Override + + public String getRightPetsOrThrow( + long key) { + + java.util.Map map = + internalGetRightPets().getMap(); + if (!map.containsKey(key)) { + throw new IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearRightPets() { + internalGetMutableRightPets().getMutableMap() + .clear(); + return this; + } + /** + *
+       *右边的宠物 key:宠物Id value 宠物配置Id
+       * 
+ * + * map<int64, string> rightPets = 4; + */ + + public Builder removeRightPets( + long key) { + + internalGetMutableRightPets().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @Deprecated + public java.util.Map + getMutableRightPets() { + return internalGetMutableRightPets().getMutableMap(); + } + /** + *
+       *右边的宠物 key:宠物Id value 宠物配置Id
+       * 
+ * + * map<int64, string> rightPets = 4; + */ + public Builder putRightPets( + long key, + String value) { + + if (value == null) { + throw new NullPointerException("map value"); +} + + internalGetMutableRightPets().getMutableMap() + .put(key, value); + return this; + } + /** + *
+       *右边的宠物 key:宠物Id value 宠物配置Id
+       * 
+ * + * map<int64, string> rightPets = 4; + */ + + public Builder putAllRightPets( + java.util.Map values) { + internalGetMutableRightPets().getMutableMap() + .putAll(values); + return this; + } + @Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } - @java.lang.Override + @Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); @@ -789,7 +1536,7 @@ public final class GPVPMessage { private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override + @Override public GPVPStart parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -802,23 +1549,652 @@ public final class GPVPMessage { return PARSER; } - @java.lang.Override + @Override public com.google.protobuf.Parser getParserForType() { return PARSER; } - @java.lang.Override + @Override public GPVPMessage.GPVPStart getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } + public interface GPVPTextOrBuilder extends + // @@protoc_insertion_point(interface_extends:GPVPText) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *消息提示
+     * 
+ * + * string text = 1; + * @return The text. + */ + String getText(); + /** + *
+     *消息提示
+     * 
+ * + * string text = 1; + * @return The bytes for text. + */ + com.google.protobuf.ByteString + getTextBytes(); + } + /** + *
+   *PVP 消息提示
+   * 
+ * + * Protobuf type {@code GPVPText} + */ + public static final class GPVPText extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:GPVPText) + GPVPTextOrBuilder { + private static final long serialVersionUID = 0L; + // Use GPVPText.newBuilder() to construct. + private GPVPText(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GPVPText() { + text_ = ""; + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new GPVPText(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GPVPText( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + String s = input.readStringRequireUtf8(); + + text_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return GPVPMessage.internal_static_GPVPText_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return GPVPMessage.internal_static_GPVPText_fieldAccessorTable + .ensureFieldAccessorsInitialized( + GPVPMessage.GPVPText.class, GPVPMessage.GPVPText.Builder.class); + } + + public static final int TEXT_FIELD_NUMBER = 1; + private volatile Object text_; + /** + *
+     *消息提示
+     * 
+ * + * string text = 1; + * @return The text. + */ + @Override + public String getText() { + Object ref = text_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + text_ = s; + return s; + } + } + /** + *
+     *消息提示
+     * 
+ * + * string text = 1; + * @return The bytes for text. + */ + @Override + public com.google.protobuf.ByteString + getTextBytes() { + Object ref = text_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (String) ref); + text_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, text_); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, text_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof GPVPMessage.GPVPText)) { + return super.equals(obj); + } + GPVPMessage.GPVPText other = (GPVPMessage.GPVPText) obj; + + if (!getText() + .equals(other.getText())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TEXT_FIELD_NUMBER; + hash = (53 * hash) + getText().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static GPVPMessage.GPVPText parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static GPVPMessage.GPVPText parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static GPVPMessage.GPVPText parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static GPVPMessage.GPVPText parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static GPVPMessage.GPVPText parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static GPVPMessage.GPVPText parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static GPVPMessage.GPVPText parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static GPVPMessage.GPVPText parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static GPVPMessage.GPVPText parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static GPVPMessage.GPVPText parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static GPVPMessage.GPVPText parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static GPVPMessage.GPVPText parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(GPVPMessage.GPVPText prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     *PVP 消息提示
+     * 
+ * + * Protobuf type {@code GPVPText} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:GPVPText) + GPVPMessage.GPVPTextOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return GPVPMessage.internal_static_GPVPText_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return GPVPMessage.internal_static_GPVPText_fieldAccessorTable + .ensureFieldAccessorsInitialized( + GPVPMessage.GPVPText.class, GPVPMessage.GPVPText.Builder.class); + } + + // Construct using cn.jisol.ngame.proto.GPVPMessage.GPVPText.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @Override + public Builder clear() { + super.clear(); + text_ = ""; + + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return GPVPMessage.internal_static_GPVPText_descriptor; + } + + @Override + public GPVPMessage.GPVPText getDefaultInstanceForType() { + return GPVPMessage.GPVPText.getDefaultInstance(); + } + + @Override + public GPVPMessage.GPVPText build() { + GPVPMessage.GPVPText result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public GPVPMessage.GPVPText buildPartial() { + GPVPMessage.GPVPText result = new GPVPMessage.GPVPText(this); + result.text_ = text_; + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof GPVPMessage.GPVPText) { + return mergeFrom((GPVPMessage.GPVPText)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(GPVPMessage.GPVPText other) { + if (other == GPVPMessage.GPVPText.getDefaultInstance()) return this; + if (!other.getText().isEmpty()) { + text_ = other.text_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + GPVPMessage.GPVPText parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (GPVPMessage.GPVPText) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private Object text_ = ""; + /** + *
+       *消息提示
+       * 
+ * + * string text = 1; + * @return The text. + */ + public String getText() { + Object ref = text_; + if (!(ref instanceof String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + text_ = s; + return s; + } else { + return (String) ref; + } + } + /** + *
+       *消息提示
+       * 
+ * + * string text = 1; + * @return The bytes for text. + */ + public com.google.protobuf.ByteString + getTextBytes() { + Object ref = text_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (String) ref); + text_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *消息提示
+       * 
+ * + * string text = 1; + * @param value The text to set. + * @return This builder for chaining. + */ + public Builder setText( + String value) { + if (value == null) { + throw new NullPointerException(); + } + + text_ = value; + onChanged(); + return this; + } + /** + *
+       *消息提示
+       * 
+ * + * string text = 1; + * @return This builder for chaining. + */ + public Builder clearText() { + + text_ = getDefaultInstance().getText(); + onChanged(); + return this; + } + /** + *
+       *消息提示
+       * 
+ * + * string text = 1; + * @param value The bytes for text to set. + * @return This builder for chaining. + */ + public Builder setTextBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + text_ = value; + onChanged(); + return this; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:GPVPText) + } + + // @@protoc_insertion_point(class_scope:GPVPText) + private static final GPVPMessage.GPVPText DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new GPVPMessage.GPVPText(); + } + + public static GPVPMessage.GPVPText getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public GPVPText parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GPVPText(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public GPVPMessage.GPVPText getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_GPVPStart_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_GPVPStart_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_GPVPStart_LeftPetsEntry_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_GPVPStart_LeftPetsEntry_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_GPVPStart_RightPetsEntry_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_GPVPStart_RightPetsEntry_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_GPVPText_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_GPVPText_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { @@ -827,10 +2203,16 @@ public final class GPVPMessage { private static com.google.protobuf.Descriptors.FileDescriptor descriptor; static { - java.lang.String[] descriptorData = { - "\n\021GPVPMessage.proto\"8\n\tGPVPStart\022\024\n\014left" + - "Tactical\030\001 \001(\t\022\025\n\rrightTactical\030\002 \001(\tB\026\n" + - "\024cn.jisol.ngame.protob\006proto3" + String[] descriptorData = { + "\n\021GPVPMessage.proto\"\365\001\n\tGPVPStart\022\024\n\014lef" + + "tTactical\030\001 \001(\t\022*\n\010leftPets\030\002 \003(\0132\030.GPVP" + + "Start.LeftPetsEntry\022\025\n\rrightTactical\030\003 \001" + + "(\t\022,\n\trightPets\030\004 \003(\0132\031.GPVPStart.RightP" + + "etsEntry\032/\n\rLeftPetsEntry\022\013\n\003key\030\001 \001(\003\022\r" + + "\n\005value\030\002 \001(\t:\0028\001\0320\n\016RightPetsEntry\022\013\n\003k" + + "ey\030\001 \001(\003\022\r\n\005value\030\002 \001(\t:\0028\001\"\030\n\010GPVPText\022" + + "\014\n\004text\030\001 \001(\tB\026\n\024cn.jisol.ngame.protob\006p" + + "roto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -841,7 +2223,25 @@ public final class GPVPMessage { internal_static_GPVPStart_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_GPVPStart_descriptor, - new java.lang.String[] { "LeftTactical", "RightTactical", }); + new String[] { "LeftTactical", "LeftPets", "RightTactical", "RightPets", }); + internal_static_GPVPStart_LeftPetsEntry_descriptor = + internal_static_GPVPStart_descriptor.getNestedTypes().get(0); + internal_static_GPVPStart_LeftPetsEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_GPVPStart_LeftPetsEntry_descriptor, + new String[] { "Key", "Value", }); + internal_static_GPVPStart_RightPetsEntry_descriptor = + internal_static_GPVPStart_descriptor.getNestedTypes().get(1); + internal_static_GPVPStart_RightPetsEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_GPVPStart_RightPetsEntry_descriptor, + new String[] { "Key", "Value", }); + internal_static_GPVPText_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_GPVPText_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_GPVPText_descriptor, + new String[] { "Text", }); } // @@protoc_insertion_point(outer_class_scope) diff --git a/JisolGameServer/Main/src/main/java/cn/jisol/game/proto/GPVPMessage.proto b/JisolGameServer/Main/src/main/java/cn/jisol/game/proto/GPVPMessage.proto index 907b6e08..d309b115 100644 --- a/JisolGameServer/Main/src/main/java/cn/jisol/game/proto/GPVPMessage.proto +++ b/JisolGameServer/Main/src/main/java/cn/jisol/game/proto/GPVPMessage.proto @@ -6,7 +6,14 @@ option java_package = "cn.jisol.ngame.proto"; //PVP 开始 message GPVPStart { string leftTactical = 1; //左边的布阵 - string rightTactical = 2; //右边的布阵 + map leftPets = 2; //左边的宠物 key:宠物Id value 宠物配置Id + string rightTactical = 3; //右边的布阵 + map rightPets = 4; //右边的宠物 key:宠物Id value 宠物配置Id +} + +//PVP 消息提示 +message GPVPText { + string text = 1; //消息提示 } diff --git a/JisolGameServer/Main/src/main/java/cn/jisol/ngame/proto/GPVPMessageOuterClass.java b/JisolGameServer/Main/src/main/java/cn/jisol/ngame/proto/GPVPMessageOuterClass.java new file mode 100644 index 00000000..d980a89b --- /dev/null +++ b/JisolGameServer/Main/src/main/java/cn/jisol/ngame/proto/GPVPMessageOuterClass.java @@ -0,0 +1,1474 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: GPVPMessage.proto + +package cn.jisol.ngame.proto; + +public final class GPVPMessageOuterClass { + private GPVPMessageOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface GPVPStartOrBuilder extends + // @@protoc_insertion_point(interface_extends:GPVPStart) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *左边的布阵
+     * 
+ * + * string leftTactical = 1; + * @return The leftTactical. + */ + java.lang.String getLeftTactical(); + /** + *
+     *左边的布阵
+     * 
+ * + * string leftTactical = 1; + * @return The bytes for leftTactical. + */ + com.google.protobuf.ByteString + getLeftTacticalBytes(); + + /** + *
+     *右边的布阵
+     * 
+ * + * string rightTactical = 2; + * @return The rightTactical. + */ + java.lang.String getRightTactical(); + /** + *
+     *右边的布阵
+     * 
+ * + * string rightTactical = 2; + * @return The bytes for rightTactical. + */ + com.google.protobuf.ByteString + getRightTacticalBytes(); + } + /** + *
+   *PVP 开始
+   * 
+ * + * Protobuf type {@code GPVPStart} + */ + public static final class GPVPStart extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:GPVPStart) + GPVPStartOrBuilder { + private static final long serialVersionUID = 0L; + // Use GPVPStart.newBuilder() to construct. + private GPVPStart(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GPVPStart() { + leftTactical_ = ""; + rightTactical_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GPVPStart(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GPVPStart( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + leftTactical_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + rightTactical_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cn.jisol.ngame.proto.GPVPMessageOuterClass.internal_static_GPVPStart_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cn.jisol.ngame.proto.GPVPMessageOuterClass.internal_static_GPVPStart_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPStart.class, cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPStart.Builder.class); + } + + public static final int LEFTTACTICAL_FIELD_NUMBER = 1; + private volatile java.lang.Object leftTactical_; + /** + *
+     *左边的布阵
+     * 
+ * + * string leftTactical = 1; + * @return The leftTactical. + */ + @java.lang.Override + public java.lang.String getLeftTactical() { + java.lang.Object ref = leftTactical_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + leftTactical_ = s; + return s; + } + } + /** + *
+     *左边的布阵
+     * 
+ * + * string leftTactical = 1; + * @return The bytes for leftTactical. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLeftTacticalBytes() { + java.lang.Object ref = leftTactical_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + leftTactical_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RIGHTTACTICAL_FIELD_NUMBER = 2; + private volatile java.lang.Object rightTactical_; + /** + *
+     *右边的布阵
+     * 
+ * + * string rightTactical = 2; + * @return The rightTactical. + */ + @java.lang.Override + public java.lang.String getRightTactical() { + java.lang.Object ref = rightTactical_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + rightTactical_ = s; + return s; + } + } + /** + *
+     *右边的布阵
+     * 
+ * + * string rightTactical = 2; + * @return The bytes for rightTactical. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRightTacticalBytes() { + java.lang.Object ref = rightTactical_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + rightTactical_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(leftTactical_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, leftTactical_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rightTactical_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, rightTactical_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(leftTactical_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, leftTactical_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rightTactical_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, rightTactical_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPStart)) { + return super.equals(obj); + } + cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPStart other = (cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPStart) obj; + + if (!getLeftTactical() + .equals(other.getLeftTactical())) return false; + if (!getRightTactical() + .equals(other.getRightTactical())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + LEFTTACTICAL_FIELD_NUMBER; + hash = (53 * hash) + getLeftTactical().hashCode(); + hash = (37 * hash) + RIGHTTACTICAL_FIELD_NUMBER; + hash = (53 * hash) + getRightTactical().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPStart parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPStart parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPStart parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPStart parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPStart parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPStart parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPStart parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPStart parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPStart parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPStart parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPStart parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPStart parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPStart prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     *PVP 开始
+     * 
+ * + * Protobuf type {@code GPVPStart} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:GPVPStart) + cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPStartOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cn.jisol.ngame.proto.GPVPMessageOuterClass.internal_static_GPVPStart_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cn.jisol.ngame.proto.GPVPMessageOuterClass.internal_static_GPVPStart_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPStart.class, cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPStart.Builder.class); + } + + // Construct using cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPStart.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + leftTactical_ = ""; + + rightTactical_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cn.jisol.ngame.proto.GPVPMessageOuterClass.internal_static_GPVPStart_descriptor; + } + + @java.lang.Override + public cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPStart getDefaultInstanceForType() { + return cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPStart.getDefaultInstance(); + } + + @java.lang.Override + public cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPStart build() { + cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPStart result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPStart buildPartial() { + cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPStart result = new cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPStart(this); + result.leftTactical_ = leftTactical_; + result.rightTactical_ = rightTactical_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPStart) { + return mergeFrom((cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPStart)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPStart other) { + if (other == cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPStart.getDefaultInstance()) return this; + if (!other.getLeftTactical().isEmpty()) { + leftTactical_ = other.leftTactical_; + onChanged(); + } + if (!other.getRightTactical().isEmpty()) { + rightTactical_ = other.rightTactical_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPStart parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPStart) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object leftTactical_ = ""; + /** + *
+       *左边的布阵
+       * 
+ * + * string leftTactical = 1; + * @return The leftTactical. + */ + public java.lang.String getLeftTactical() { + java.lang.Object ref = leftTactical_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + leftTactical_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *左边的布阵
+       * 
+ * + * string leftTactical = 1; + * @return The bytes for leftTactical. + */ + public com.google.protobuf.ByteString + getLeftTacticalBytes() { + java.lang.Object ref = leftTactical_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + leftTactical_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *左边的布阵
+       * 
+ * + * string leftTactical = 1; + * @param value The leftTactical to set. + * @return This builder for chaining. + */ + public Builder setLeftTactical( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + leftTactical_ = value; + onChanged(); + return this; + } + /** + *
+       *左边的布阵
+       * 
+ * + * string leftTactical = 1; + * @return This builder for chaining. + */ + public Builder clearLeftTactical() { + + leftTactical_ = getDefaultInstance().getLeftTactical(); + onChanged(); + return this; + } + /** + *
+       *左边的布阵
+       * 
+ * + * string leftTactical = 1; + * @param value The bytes for leftTactical to set. + * @return This builder for chaining. + */ + public Builder setLeftTacticalBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + leftTactical_ = value; + onChanged(); + return this; + } + + private java.lang.Object rightTactical_ = ""; + /** + *
+       *右边的布阵
+       * 
+ * + * string rightTactical = 2; + * @return The rightTactical. + */ + public java.lang.String getRightTactical() { + java.lang.Object ref = rightTactical_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + rightTactical_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *右边的布阵
+       * 
+ * + * string rightTactical = 2; + * @return The bytes for rightTactical. + */ + public com.google.protobuf.ByteString + getRightTacticalBytes() { + java.lang.Object ref = rightTactical_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + rightTactical_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *右边的布阵
+       * 
+ * + * string rightTactical = 2; + * @param value The rightTactical to set. + * @return This builder for chaining. + */ + public Builder setRightTactical( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + rightTactical_ = value; + onChanged(); + return this; + } + /** + *
+       *右边的布阵
+       * 
+ * + * string rightTactical = 2; + * @return This builder for chaining. + */ + public Builder clearRightTactical() { + + rightTactical_ = getDefaultInstance().getRightTactical(); + onChanged(); + return this; + } + /** + *
+       *右边的布阵
+       * 
+ * + * string rightTactical = 2; + * @param value The bytes for rightTactical to set. + * @return This builder for chaining. + */ + public Builder setRightTacticalBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + rightTactical_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:GPVPStart) + } + + // @@protoc_insertion_point(class_scope:GPVPStart) + private static final cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPStart DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPStart(); + } + + public static cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPStart getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GPVPStart parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GPVPStart(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPStart getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GPVPMessageOrBuilder extends + // @@protoc_insertion_point(interface_extends:GPVPMessage) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *消息提示
+     * 
+ * + * string text = 1; + * @return The text. + */ + java.lang.String getText(); + /** + *
+     *消息提示
+     * 
+ * + * string text = 1; + * @return The bytes for text. + */ + com.google.protobuf.ByteString + getTextBytes(); + } + /** + *
+   *PVP 消息提示
+   * 
+ * + * Protobuf type {@code GPVPMessage} + */ + public static final class GPVPMessage extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:GPVPMessage) + GPVPMessageOrBuilder { + private static final long serialVersionUID = 0L; + // Use GPVPMessage.newBuilder() to construct. + private GPVPMessage(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GPVPMessage() { + text_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GPVPMessage(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GPVPMessage( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + text_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cn.jisol.ngame.proto.GPVPMessageOuterClass.internal_static_GPVPMessage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cn.jisol.ngame.proto.GPVPMessageOuterClass.internal_static_GPVPMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPMessage.class, cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPMessage.Builder.class); + } + + public static final int TEXT_FIELD_NUMBER = 1; + private volatile java.lang.Object text_; + /** + *
+     *消息提示
+     * 
+ * + * string text = 1; + * @return The text. + */ + @java.lang.Override + public java.lang.String getText() { + java.lang.Object ref = text_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + text_ = s; + return s; + } + } + /** + *
+     *消息提示
+     * 
+ * + * string text = 1; + * @return The bytes for text. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTextBytes() { + java.lang.Object ref = text_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + text_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, text_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, text_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPMessage)) { + return super.equals(obj); + } + cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPMessage other = (cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPMessage) obj; + + if (!getText() + .equals(other.getText())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TEXT_FIELD_NUMBER; + hash = (53 * hash) + getText().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPMessage parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPMessage parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPMessage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPMessage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPMessage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPMessage parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPMessage parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPMessage parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPMessage parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPMessage parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPMessage parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPMessage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPMessage prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     *PVP 消息提示
+     * 
+ * + * Protobuf type {@code GPVPMessage} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:GPVPMessage) + cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPMessageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cn.jisol.ngame.proto.GPVPMessageOuterClass.internal_static_GPVPMessage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cn.jisol.ngame.proto.GPVPMessageOuterClass.internal_static_GPVPMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPMessage.class, cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPMessage.Builder.class); + } + + // Construct using cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPMessage.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + text_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cn.jisol.ngame.proto.GPVPMessageOuterClass.internal_static_GPVPMessage_descriptor; + } + + @java.lang.Override + public cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPMessage getDefaultInstanceForType() { + return cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPMessage.getDefaultInstance(); + } + + @java.lang.Override + public cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPMessage build() { + cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPMessage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPMessage buildPartial() { + cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPMessage result = new cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPMessage(this); + result.text_ = text_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPMessage) { + return mergeFrom((cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPMessage)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPMessage other) { + if (other == cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPMessage.getDefaultInstance()) return this; + if (!other.getText().isEmpty()) { + text_ = other.text_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPMessage parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPMessage) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object text_ = ""; + /** + *
+       *消息提示
+       * 
+ * + * string text = 1; + * @return The text. + */ + public java.lang.String getText() { + java.lang.Object ref = text_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + text_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       *消息提示
+       * 
+ * + * string text = 1; + * @return The bytes for text. + */ + public com.google.protobuf.ByteString + getTextBytes() { + java.lang.Object ref = text_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + text_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *消息提示
+       * 
+ * + * string text = 1; + * @param value The text to set. + * @return This builder for chaining. + */ + public Builder setText( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + text_ = value; + onChanged(); + return this; + } + /** + *
+       *消息提示
+       * 
+ * + * string text = 1; + * @return This builder for chaining. + */ + public Builder clearText() { + + text_ = getDefaultInstance().getText(); + onChanged(); + return this; + } + /** + *
+       *消息提示
+       * 
+ * + * string text = 1; + * @param value The bytes for text to set. + * @return This builder for chaining. + */ + public Builder setTextBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + text_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:GPVPMessage) + } + + // @@protoc_insertion_point(class_scope:GPVPMessage) + private static final cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPMessage DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPMessage(); + } + + public static cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPMessage getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GPVPMessage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GPVPMessage(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cn.jisol.ngame.proto.GPVPMessageOuterClass.GPVPMessage getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_GPVPStart_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_GPVPStart_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_GPVPMessage_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_GPVPMessage_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\021GPVPMessage.proto\"8\n\tGPVPStart\022\024\n\014left" + + "Tactical\030\001 \001(\t\022\025\n\rrightTactical\030\002 \001(\t\"\033\n" + + "\013GPVPMessage\022\014\n\004text\030\001 \001(\tB\026\n\024cn.jisol.n" + + "game.protob\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_GPVPStart_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_GPVPStart_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_GPVPStart_descriptor, + new java.lang.String[] { "LeftTactical", "RightTactical", }); + internal_static_GPVPMessage_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_GPVPMessage_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_GPVPMessage_descriptor, + new java.lang.String[] { "Text", }); + } + + // @@protoc_insertion_point(outer_class_scope) +}