From 62b72bdcfc2497489e53ad4f84cd1aa37b1fae70 Mon Sep 17 00:00:00 2001 From: "DESKTOP-5RP3AKU\\Jisol" <2858626794@qq.com> Date: Fri, 17 Nov 2023 02:57:46 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=9F=E6=88=90=E9=87=8E=E6=80=AA=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DataTables/Datas/__tables__.xlsx | Bin 9683 -> 9757 bytes .../Datas/战斗/模式/OnHook模式的全局表.xlsx | Bin 0 -> 9673 bytes .../assets/resources/config/data/schema.ts | 69 + .../config/json/tbgonhookglobal.json | 7 + .../config/json/tbgonhookglobal.json.meta | 11 + .../resources/prefab/ui/主页/MainView.prefab | 536 ++++-- .../assets/script/battle/modes/GOnHookMode.ts | 57 +- .../assets/script/consts/GAction.ts | 9 +- .../assets/script/consts/GActionType.ts | 5 + .../assets/script/data/PlayerTacticalData.ts | 5 +- .../ui/Consts/Tactical/PlayerTacticalItem.ts | 6 + .../ui/Consts/Tactical/PlayerTacticalView.ts | 20 +- JisolGameCocos/extensions/ngame | 2 +- JisolGameCocos/proto/GOnHookMessage.proto | 14 + JisolGameServer/JNGame | 2 +- .../Main/src/main/java/cfg/TB/TbGMap.java | 6 + .../src/main/java/cfg/TB/TbGOnHookGlobal.java | 55 + .../Main/src/main/java/cfg/Tables.java | 3 + .../src/main/java/cfg/TbGOnHookGlobal.java | 37 + .../cn/jisol/game/actions/GActionEnum.java | 5 + .../game/actions/onhook/GOnHookAction.java | 66 + .../game/mode/GOnHookController.java | 13 + .../java/cn/jisol/game/data/GlobalIds.java | 4 + .../java/cn/jisol/game/network/WebSocket.java | 2 +- .../cn/jisol/game/network/client/GClient.java | 2 + .../cn/jisol/game/proto/GOnHookMessage.java | 1679 +++++++++++++++++ .../cn/jisol/game/proto/GOnHookMessage.proto | 14 + .../Main/src/main/resources/json/tbgmap.json | 7 +- .../main/resources/json/tbgonhookglobal.json | 7 + 29 files changed, 2451 insertions(+), 192 deletions(-) create mode 100644 DataTables/Datas/战斗/模式/OnHook模式的全局表.xlsx create mode 100644 JisolGameCocos/assets/resources/config/json/tbgonhookglobal.json create mode 100644 JisolGameCocos/assets/resources/config/json/tbgonhookglobal.json.meta create mode 100644 JisolGameCocos/proto/GOnHookMessage.proto create mode 100644 JisolGameServer/Main/src/main/java/cfg/TB/TbGOnHookGlobal.java create mode 100644 JisolGameServer/Main/src/main/java/cfg/TbGOnHookGlobal.java create mode 100644 JisolGameServer/Main/src/main/java/cn/jisol/game/actions/onhook/GOnHookAction.java create mode 100644 JisolGameServer/Main/src/main/java/cn/jisol/game/controller/game/mode/GOnHookController.java create mode 100644 JisolGameServer/Main/src/main/java/cn/jisol/game/proto/GOnHookMessage.java create mode 100644 JisolGameServer/Main/src/main/java/cn/jisol/game/proto/GOnHookMessage.proto create mode 100644 JisolGameServer/Main/src/main/resources/json/tbgonhookglobal.json diff --git a/DataTables/Datas/__tables__.xlsx b/DataTables/Datas/__tables__.xlsx index 598afad8cb007ec5333b5bbf22091aa5668a9ed1..760bad25c5e5775f62ca28c908e01d823aa9a93a 100644 GIT binary patch delta 2459 zcmV;M31s%uOPx%xlmP_{->;NWlbHc5e=lUxeG+CQVl-rg z+_iTfoNwLwjdE-7KQZzt_30?1r|cwTVYElw0n*O<@IR#AP)h>@lO7`)vm*nP0SX@b z*v;_+006)ZlfeWaf8COsI1q*JQ?(u|a+wfpy9+jqCFQ*%^i zD5oV}yFYO4zTdokvuY@Ns?Qj62P%~H+C6h#Eq%XE&$vLfe@81^LgYwUfjInRC%>*3 zMwv(|azC8SuKfa$(v=mK>{n{gO- zH-x#W(=?6Oe^j-XmYs`HgMu3$^Y~J8S|o@gce4@%zA%5Y$_R9^Mei_tT)Q8FiS+Sx=#I|oWR zdB#$`3$9>ceHYWV-(gOFm~{NTH?S28=?il*d_7;`%0S~CZ{t8 zcaay0swvH(1bjLLffXLQPJv#;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$FhErGmV63G5hqZiNrfG;3=sL0b`LlD?3H6vZ0dMpv+m{!^W__s~T! z^l^UQ_qSEc<_q_7vd5=FCam~Mb9r2&1?t;>{$kBNp@*XcGqE3Cv{f@!KneKuN($>a zLSBhq)wR*-QS4t|T_7)06VlZTyHuSt?~>r!CCy|1CpmGK1J^z$@?-Gye;q+oxr1x( zZsE^=($i&^1oO}(h46?@hZE?jP_x`}->f)mJa{Gm96YV?t8?^B>*gA_4|2E+Lm-)d zwc?M18fIBQ>&s@g3SIzN)+uhLiqKRfQ$=Jd(y3x@DsHEW*i>w%iVIV5H&tAkiuu?LrgWK4`nHWI} zS*n9>w?^WKQ@b^SBQe7*yy;zTp?P#`@l1^1$V|i5LAP5Y(IN(C!?P|&V%n`f(CMQ_ zjSu8c%n!5@UP1QYbLImWu1{-B>Rz&1wZdxOF$ss${@)S45eOVTWHhTT|0O6n=Nc|Ii6D-~}5%MMv5);*31`g81AC?Y3mtB&EAy%1j@s zf-M(m2Z17j0}Kw8OSy=E4e)2oCh3!Z!QB>N+@$oO%{kw<=ljk{P8#S=DbP0pl1SFn zpwRAb6MR68Xi-^>2ZcBNFCRP=d*OkRZ;*Cj7U%iVLX~}AnzV_N$!JfjPY6PN2!{Bo#eC5#V3-jT*|w>$0Ue=RXk?K zPY$i+iMstiXVW;T1M{@CsbiAgGmUR#W63<-qUGpy zHB%({la|&N>c6@)$2+BB_VSS)!({pG5O?*WTGNPcyV$eORrv;zo6@ z?7W?SBZZuOv`)_EX_+A~+J2vYbzC#-sU3TJ>Wa}ktZTT7@md+L9`c6ROfqM5Vbh9~ zNJAN6)if(jjP$$6|7dg}lxFf!$;R&LQ+D2mSJtTSyAsf=z^>xJq008<7000;O0000000031AOHXWsgvv_ LD+ab900000XE9j- diff --git a/DataTables/Datas/战斗/模式/OnHook模式的全局表.xlsx b/DataTables/Datas/战斗/模式/OnHook模式的全局表.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..b7b983604cf74199b308e48db1f7ebefad252c3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Global[] + constructor(_json_: any) { + this._dataMap = new Map() + this._dataList = [] + for(var _json2_ of _json_) { + let _v: TB.TbGOnHookGlobal + _v = new TB.TbGOnHookGlobal(_json2_) + this._dataList.push(_v) + this._dataMap.set(_v.id, _v) + } + } + + getDataMap(): Map { return this._dataMap; } + getDataList(): TB.TbGOnHookGlobal[] { return this._dataList; } + + get(key: number): TB.TbGOnHookGlobal | undefined { return this._dataMap.get(key); } + + resolve(tables:Tables) + { + for(let data of this._dataList) + { + data.resolve(tables) + } + } + +} + + + + type JsonLoader = (file: string) => any export class Tables { @@ -485,6 +550,8 @@ export class Tables { get TbGRoleSkill(): TbGRoleSkill { return this._TbGRoleSkill;} private _TbGMap: TbGMap get TbGMap(): TbGMap { return this._TbGMap;} + private _TbGOnHookGlobal: TbGOnHookGlobal + get TbGOnHookGlobal(): TbGOnHookGlobal { return this._TbGOnHookGlobal;} constructor(loader: JsonLoader) { this._TbGGlobal = new TbGGlobal(loader('tbgglobal')) @@ -493,6 +560,7 @@ export class Tables { this._TbGRoleBattleRes = new TbGRoleBattleRes(loader('tbgrolebattleres')) this._TbGRoleSkill = new TbGRoleSkill(loader('tbgroleskill')) this._TbGMap = new TbGMap(loader('tbgmap')) + this._TbGOnHookGlobal = new TbGOnHookGlobal(loader('tbgonhookglobal')) this._TbGGlobal.resolve(this) this._TbGRole.resolve(this) @@ -500,5 +568,6 @@ export class Tables { this._TbGRoleBattleRes.resolve(this) this._TbGRoleSkill.resolve(this) this._TbGMap.resolve(this) + this._TbGOnHookGlobal.resolve(this) } } diff --git a/JisolGameCocos/assets/resources/config/json/tbgonhookglobal.json b/JisolGameCocos/assets/resources/config/json/tbgonhookglobal.json new file mode 100644 index 00000000..c85d7765 --- /dev/null +++ b/JisolGameCocos/assets/resources/config/json/tbgonhookglobal.json @@ -0,0 +1,7 @@ +[ + { + "id": 80001, + "args": "100", + "tig": "预先生成的野外宠物数量" + } +] \ No newline at end of file diff --git a/JisolGameCocos/assets/resources/config/json/tbgonhookglobal.json.meta b/JisolGameCocos/assets/resources/config/json/tbgonhookglobal.json.meta new file mode 100644 index 00000000..505b6699 --- /dev/null +++ b/JisolGameCocos/assets/resources/config/json/tbgonhookglobal.json.meta @@ -0,0 +1,11 @@ +{ + "ver": "2.0.1", + "importer": "json", + "imported": true, + "uuid": "0ccb44c9-b7bc-4fc6-b7d2-8a4335f806a5", + "files": [ + ".json" + ], + "subMetas": {}, + "userData": {} +} diff --git a/JisolGameCocos/assets/resources/prefab/ui/主页/MainView.prefab b/JisolGameCocos/assets/resources/prefab/ui/主页/MainView.prefab index d847ca24..0370b0f2 100644 --- a/JisolGameCocos/assets/resources/prefab/ui/主页/MainView.prefab +++ b/JisolGameCocos/assets/resources/prefab/ui/主页/MainView.prefab @@ -28,29 +28,29 @@ "__id__": 38 }, { - "__id__": 98 + "__id__": 106 }, { - "__id__": 117 + "__id__": 125 }, { - "__id__": 132 + "__id__": 140 } ], "_active": true, "_components": [ { - "__id__": 147 + "__id__": 155 }, { - "__id__": 149 + "__id__": 157 }, { - "__id__": 151 + "__id__": 159 } ], "_prefab": { - "__id__": 153 + "__id__": 161 }, "_lpos": { "__type__": "cc.Vec3", @@ -883,23 +883,26 @@ "__id__": 39 }, { - "__id__": 53 + "__id__": 47 + }, + { + "__id__": 61 } ], "_active": true, "_components": [ { - "__id__": 91 + "__id__": 99 }, { - "__id__": 93 + "__id__": 101 }, { - "__id__": 95 + "__id__": 103 } ], "_prefab": { - "__id__": 97 + "__id__": 105 }, "_lpos": { "__type__": "cc.Vec3", @@ -930,6 +933,181 @@ }, "_id": "" }, + { + "__type__": "cc.Node", + "_name": "野怪列表", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 38 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 40 + }, + { + "__id__": 42 + }, + { + "__id__": 44 + } + ], + "_prefab": { + "__id__": 46 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 223.109, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 33554432, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 39 + }, + "_enabled": true, + "__prefab": { + "__id__": 41 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 720, + "height": 120 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "0ccMb6aEJJmKtQPc0NQqC7" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 39 + }, + "_enabled": true, + "__prefab": { + "__id__": 43 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 190, + "g": 190, + "b": 190, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "7d8f9b89-4fd1-4c9f-a3ab-38ec7cded7ca@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 0, + "_fillType": 0, + "_sizeMode": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_useGrayscale": false, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "19pPQvdvdMCJ7w/Z+yYIek" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 39 + }, + "_enabled": true, + "__prefab": { + "__id__": 45 + }, + "_alignFlags": 40, + "_target": null, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_horizontalCenter": 0, + "_verticalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 100, + "_originalHeight": 0, + "_alignMode": 2, + "_lockFlags": 0, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "41TovpTmVCz4oCICCj50W/" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "cfqtEvOKpHO7NzoHh8DAIM", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, { "__type__": "cc.Node", "_name": "阵法", @@ -940,25 +1118,25 @@ }, "_children": [ { - "__id__": 40 + "__id__": 48 } ], "_active": true, "_components": [ { - "__id__": 48 + "__id__": 56 }, { - "__id__": 50 + "__id__": 58 } ], "_prefab": { - "__id__": 52 + "__id__": 60 }, "_lpos": { "__type__": "cc.Vec3", - "x": 0, - "y": 74.983, + "x": -94.905, + "y": -59.881, "z": 0 }, "_lrot": { @@ -988,17 +1166,17 @@ "__type__": "cc.Node", "_objFlags": 0, "_parent": { - "__id__": 39 + "__id__": 47 }, "_prefab": { - "__id__": 41 + "__id__": 49 }, "__editorExtras__": {} }, { "__type__": "cc.PrefabInfo", "root": { - "__id__": 40 + "__id__": 48 }, "asset": { "__uuid__": "9d7eeadb-58f6-4c42-aaed-bc402f272c84", @@ -1006,7 +1184,7 @@ }, "fileId": "a8T0NC/KpNY7MMbRkPRuwY", "instance": { - "__id__": 42 + "__id__": 50 }, "targetOverrides": null }, @@ -1020,16 +1198,16 @@ "mountedComponents": [], "propertyOverrides": [ { - "__id__": 43 + "__id__": 51 }, { - "__id__": 45 + "__id__": 53 }, { - "__id__": 46 + "__id__": 54 }, { - "__id__": 47 + "__id__": 55 } ], "removedComponents": [] @@ -1037,7 +1215,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 44 + "__id__": 52 }, "propertyPath": [ "_name" @@ -1053,7 +1231,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 44 + "__id__": 52 }, "propertyPath": [ "_lpos" @@ -1068,7 +1246,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 44 + "__id__": 52 }, "propertyPath": [ "_lrot" @@ -1084,7 +1262,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 44 + "__id__": 52 }, "propertyPath": [ "_euler" @@ -1102,15 +1280,15 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 39 + "__id__": 47 }, "_enabled": true, "__prefab": { - "__id__": 49 + "__id__": 57 }, "_contentSize": { "__type__": "cc.Size", - "width": 550, + "width": 500, "height": 420 }, "_anchorPoint": { @@ -1130,11 +1308,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 39 + "__id__": 47 }, - "_enabled": true, + "_enabled": false, "__prefab": { - "__id__": 51 + "__id__": 59 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -1192,28 +1370,28 @@ }, "_children": [ { - "__id__": 54 + "__id__": 62 }, { - "__id__": 70 + "__id__": 78 } ], "_active": true, "_components": [ { - "__id__": 86 + "__id__": 94 }, { - "__id__": 88 + "__id__": 96 } ], "_prefab": { - "__id__": 90 + "__id__": 98 }, "_lpos": { "__type__": "cc.Vec3", - "x": 0, - "y": -216.02, + "x": 249.748, + "y": -62.84, "z": 0 }, "_lrot": { @@ -1245,32 +1423,32 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 53 + "__id__": 61 }, "_children": [ { - "__id__": 55 + "__id__": 63 } ], "_active": true, "_components": [ { - "__id__": 63 + "__id__": 71 }, { - "__id__": 65 + "__id__": 73 }, { - "__id__": 67 + "__id__": 75 } ], "_prefab": { - "__id__": 69 + "__id__": 77 }, "_lpos": { "__type__": "cc.Vec3", - "x": -150, - "y": 0, + "x": 0, + "y": 105, "z": 0 }, "_lrot": { @@ -1302,23 +1480,23 @@ "_objFlags": 512, "__editorExtras__": {}, "_parent": { - "__id__": 54 + "__id__": 62 }, "_children": [], "_active": true, "_components": [ { - "__id__": 56 + "__id__": 64 }, { - "__id__": 58 + "__id__": 66 }, { - "__id__": 60 + "__id__": 68 } ], "_prefab": { - "__id__": 62 + "__id__": 70 }, "_lpos": { "__type__": "cc.Vec3", @@ -1355,11 +1533,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 55 + "__id__": 63 }, "_enabled": true, "__prefab": { - "__id__": 57 + "__id__": 65 }, "_contentSize": { "__type__": "cc.Size", @@ -1383,11 +1561,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 55 + "__id__": 63 }, "_enabled": true, "__prefab": { - "__id__": 59 + "__id__": 67 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -1428,11 +1606,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 55 + "__id__": 63 }, "_enabled": true, "__prefab": { - "__id__": 61 + "__id__": 69 }, "_color": { "__type__": "cc.Color", @@ -1467,11 +1645,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 54 + "__id__": 62 }, "_enabled": true, "__prefab": { - "__id__": 64 + "__id__": 72 }, "_contentSize": { "__type__": "cc.Size", @@ -1495,11 +1673,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 54 + "__id__": 62 }, "_enabled": true, "__prefab": { - "__id__": 66 + "__id__": 74 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -1540,11 +1718,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 54 + "__id__": 62 }, "_enabled": true, "__prefab": { - "__id__": 68 + "__id__": 76 }, "clickEvents": [], "_interactable": true, @@ -1596,7 +1774,7 @@ "_duration": 0.1, "_zoomScale": 1.2, "_target": { - "__id__": 54 + "__id__": 62 }, "_id": "" }, @@ -1623,32 +1801,32 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 53 + "__id__": 61 }, "_children": [ { - "__id__": 71 + "__id__": 79 } ], "_active": true, "_components": [ { - "__id__": 79 + "__id__": 87 }, { - "__id__": 81 + "__id__": 89 }, { - "__id__": 83 + "__id__": 91 } ], "_prefab": { - "__id__": 85 + "__id__": 93 }, "_lpos": { "__type__": "cc.Vec3", - "x": 150, - "y": 0, + "x": 0, + "y": -105, "z": 0 }, "_lrot": { @@ -1680,23 +1858,23 @@ "_objFlags": 512, "__editorExtras__": {}, "_parent": { - "__id__": 70 + "__id__": 78 }, "_children": [], "_active": true, "_components": [ { - "__id__": 72 + "__id__": 80 }, { - "__id__": 74 + "__id__": 82 }, { - "__id__": 76 + "__id__": 84 } ], "_prefab": { - "__id__": 78 + "__id__": 86 }, "_lpos": { "__type__": "cc.Vec3", @@ -1733,11 +1911,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 71 + "__id__": 79 }, "_enabled": true, "__prefab": { - "__id__": 73 + "__id__": 81 }, "_contentSize": { "__type__": "cc.Size", @@ -1761,11 +1939,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 71 + "__id__": 79 }, "_enabled": true, "__prefab": { - "__id__": 75 + "__id__": 83 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -1806,11 +1984,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 71 + "__id__": 79 }, "_enabled": true, "__prefab": { - "__id__": 77 + "__id__": 85 }, "_color": { "__type__": "cc.Color", @@ -1845,11 +2023,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 70 + "__id__": 78 }, "_enabled": true, "__prefab": { - "__id__": 80 + "__id__": 88 }, "_contentSize": { "__type__": "cc.Size", @@ -1873,11 +2051,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 70 + "__id__": 78 }, "_enabled": true, "__prefab": { - "__id__": 82 + "__id__": 90 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -1918,11 +2096,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 70 + "__id__": 78 }, "_enabled": true, "__prefab": { - "__id__": 84 + "__id__": 92 }, "clickEvents": [], "_interactable": true, @@ -1974,7 +2152,7 @@ "_duration": 0.1, "_zoomScale": 1.2, "_target": { - "__id__": 70 + "__id__": 78 }, "_id": "" }, @@ -2001,16 +2179,16 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 53 + "__id__": 61 }, "_enabled": true, "__prefab": { - "__id__": 87 + "__id__": 95 }, "_contentSize": { "__type__": "cc.Size", - "width": 450, - "height": 100 + "width": 150, + "height": 340 }, "_anchorPoint": { "__type__": "cc.Vec2", @@ -2029,14 +2207,14 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 53 + "__id__": 61 }, "_enabled": true, "__prefab": { - "__id__": 89 + "__id__": 97 }, "_resizeMode": 1, - "_layoutType": 1, + "_layoutType": 2, "_cellSize": { "__type__": "cc.Size", "width": 40, @@ -2048,7 +2226,7 @@ "_paddingTop": 0, "_paddingBottom": 0, "_spacingX": 150, - "_spacingY": 0, + "_spacingY": 80, "_verticalDirection": 1, "_horizontalDirection": 0, "_constraint": 0, @@ -2070,8 +2248,6 @@ "__id__": 0 }, "fileId": "a7k4jJN+9E4o9tingaVO93", - "instance": null, - "targetOverrides": null, "nestedPrefabInstanceRoots": null }, { @@ -2084,7 +2260,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 92 + "__id__": 100 }, "_contentSize": { "__type__": "cc.Size", @@ -2112,7 +2288,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 94 + "__id__": 102 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -2157,7 +2333,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 96 + "__id__": 104 }, "_alignFlags": 44, "_target": null, @@ -2206,26 +2382,26 @@ }, "_children": [ { - "__id__": 99 + "__id__": 107 } ], "_active": true, "_components": [ { - "__id__": 107 + "__id__": 115 }, { - "__id__": 109 + "__id__": 117 }, { - "__id__": 111 + "__id__": 119 }, { - "__id__": 113 + "__id__": 121 } ], "_prefab": { - "__id__": 116 + "__id__": 124 }, "_lpos": { "__type__": "cc.Vec3", @@ -2262,23 +2438,23 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 98 + "__id__": 106 }, "_children": [], "_active": true, "_components": [ { - "__id__": 100 + "__id__": 108 }, { - "__id__": 102 + "__id__": 110 }, { - "__id__": 104 + "__id__": 112 } ], "_prefab": { - "__id__": 106 + "__id__": 114 }, "_lpos": { "__type__": "cc.Vec3", @@ -2315,11 +2491,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 99 + "__id__": 107 }, "_enabled": true, "__prefab": { - "__id__": 101 + "__id__": 109 }, "_contentSize": { "__type__": "cc.Size", @@ -2343,11 +2519,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 99 + "__id__": 107 }, "_enabled": true, "__prefab": { - "__id__": 103 + "__id__": 111 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -2388,11 +2564,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 99 + "__id__": 107 }, "_enabled": true, "__prefab": { - "__id__": 105 + "__id__": 113 }, "_color": { "__type__": "cc.Color", @@ -2427,11 +2603,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 98 + "__id__": 106 }, "_enabled": true, "__prefab": { - "__id__": 108 + "__id__": 116 }, "_contentSize": { "__type__": "cc.Size", @@ -2455,11 +2631,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 98 + "__id__": 106 }, "_enabled": true, "__prefab": { - "__id__": 110 + "__id__": 118 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -2500,11 +2676,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 98 + "__id__": 106 }, "_enabled": true, "__prefab": { - "__id__": 112 + "__id__": 120 }, "_alignFlags": 44, "_target": null, @@ -2536,15 +2712,15 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 98 + "__id__": 106 }, "_enabled": true, "__prefab": { - "__id__": 114 + "__id__": 122 }, "clickEvents": [ { - "__id__": 115 + "__id__": 123 } ], "_interactable": true, @@ -2623,23 +2799,23 @@ }, "_children": [ { - "__id__": 118 + "__id__": 126 } ], "_active": true, "_components": [ { - "__id__": 124 + "__id__": 132 }, { - "__id__": 126 + "__id__": 134 }, { - "__id__": 128 + "__id__": 136 } ], "_prefab": { - "__id__": 131 + "__id__": 139 }, "_lpos": { "__type__": "cc.Vec3", @@ -2676,20 +2852,20 @@ "_objFlags": 512, "__editorExtras__": {}, "_parent": { - "__id__": 117 + "__id__": 125 }, "_children": [], "_active": true, "_components": [ { - "__id__": 119 + "__id__": 127 }, { - "__id__": 121 + "__id__": 129 } ], "_prefab": { - "__id__": 123 + "__id__": 131 }, "_lpos": { "__type__": "cc.Vec3", @@ -2726,11 +2902,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 118 + "__id__": 126 }, "_enabled": true, "__prefab": { - "__id__": 120 + "__id__": 128 }, "_contentSize": { "__type__": "cc.Size", @@ -2754,11 +2930,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 118 + "__id__": 126 }, "_enabled": true, "__prefab": { - "__id__": 122 + "__id__": 130 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -2812,11 +2988,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 117 + "__id__": 125 }, "_enabled": true, "__prefab": { - "__id__": 125 + "__id__": 133 }, "_contentSize": { "__type__": "cc.Size", @@ -2840,11 +3016,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 117 + "__id__": 125 }, "_enabled": true, "__prefab": { - "__id__": 127 + "__id__": 135 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -2885,15 +3061,15 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 117 + "__id__": 125 }, "_enabled": true, "__prefab": { - "__id__": 129 + "__id__": 137 }, "clickEvents": [ { - "__id__": 130 + "__id__": 138 } ], "_interactable": true, @@ -2945,7 +3121,7 @@ "_duration": 0.1, "_zoomScale": 1.2, "_target": { - "__id__": 117 + "__id__": 125 }, "_id": "" }, @@ -2986,23 +3162,23 @@ }, "_children": [ { - "__id__": 133 + "__id__": 141 } ], "_active": true, "_components": [ { - "__id__": 139 + "__id__": 147 }, { - "__id__": 141 + "__id__": 149 }, { - "__id__": 143 + "__id__": 151 } ], "_prefab": { - "__id__": 146 + "__id__": 154 }, "_lpos": { "__type__": "cc.Vec3", @@ -3039,20 +3215,20 @@ "_objFlags": 512, "__editorExtras__": {}, "_parent": { - "__id__": 132 + "__id__": 140 }, "_children": [], "_active": true, "_components": [ { - "__id__": 134 + "__id__": 142 }, { - "__id__": 136 + "__id__": 144 } ], "_prefab": { - "__id__": 138 + "__id__": 146 }, "_lpos": { "__type__": "cc.Vec3", @@ -3089,11 +3265,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 133 + "__id__": 141 }, "_enabled": true, "__prefab": { - "__id__": 135 + "__id__": 143 }, "_contentSize": { "__type__": "cc.Size", @@ -3117,11 +3293,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 133 + "__id__": 141 }, "_enabled": true, "__prefab": { - "__id__": 137 + "__id__": 145 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -3175,11 +3351,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 132 + "__id__": 140 }, "_enabled": true, "__prefab": { - "__id__": 140 + "__id__": 148 }, "_contentSize": { "__type__": "cc.Size", @@ -3203,11 +3379,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 132 + "__id__": 140 }, "_enabled": true, "__prefab": { - "__id__": 142 + "__id__": 150 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -3248,15 +3424,15 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 132 + "__id__": 140 }, "_enabled": true, "__prefab": { - "__id__": 144 + "__id__": 152 }, "clickEvents": [ { - "__id__": 145 + "__id__": 153 } ], "_interactable": true, @@ -3308,7 +3484,7 @@ "_duration": 0.1, "_zoomScale": 1.2, "_target": { - "__id__": 132 + "__id__": 140 }, "_id": "" }, @@ -3349,7 +3525,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 148 + "__id__": 156 }, "_contentSize": { "__type__": "cc.Size", @@ -3377,7 +3553,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 150 + "__id__": 158 }, "_alignFlags": 45, "_target": null, @@ -3413,7 +3589,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 152 + "__id__": 160 }, "mask": false, "maskOpcity": 80, @@ -3440,7 +3616,7 @@ "targetOverrides": null, "nestedPrefabInstanceRoots": [ { - "__id__": 40 + "__id__": 48 } ] } diff --git a/JisolGameCocos/assets/script/battle/modes/GOnHookMode.ts b/JisolGameCocos/assets/script/battle/modes/GOnHookMode.ts index 57ebfc61..c82ab8c6 100644 --- a/JisolGameCocos/assets/script/battle/modes/GOnHookMode.ts +++ b/JisolGameCocos/assets/script/battle/modes/GOnHookMode.ts @@ -20,6 +20,8 @@ import PlayerTacticalData, { PlayerTacticalEvent } from "../../data/PlayerTactic import GRoleOnHookExpand from "../base/role/expand/OnHook/GRoleOnHookExpand"; import PlayerPetData from "../../data/PlayerPetData"; import { GUI } from "../../ui/UIConfig"; +import { GAction } from "../../consts/GAction"; +import { GActionType } from "../../consts/GActionType"; const { ccclass, property } = _decorator; //挂机模式状态 @@ -43,6 +45,16 @@ export interface GOnHookInfo{ roles: TB.TbGRole[]; } +//野怪 +interface GOnHookPet{ + key:string; //野怪唯一Id + petTbId:number; //野怪配置表Id +} +//野怪列表 +interface GOnHookPets{ + pets:GOnHookPet[]; +} + /** * 挂机模式 无限出现小怪 (不是联机模式 该模式支持使用本地数据) */ @@ -103,6 +115,21 @@ export default class GOnHookMode extends GBaseMode<{}>{ //是否允许攻击 isAllowAttack:boolean = false; + //野怪列表 + _wildlifes:GOnHookPets; + get wildlifes(){ + //如果没有野怪了 则 向服务器生成 + if(!this._wildlifes || !(this._wildlifes.pets.length)){ + //生成 + this.onSpawnWildlife(); + return null; + } + return this._wildlifes; + } + set wildlifes(data:GOnHookPets){ + this._wildlifes = data; + } + //添加监听事件 addEvent(){ app.event.on(PlayerTacticalEvent.UPDATE_TACTICAL,this.onUpdatePlayerPet,this); @@ -135,14 +162,22 @@ 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([10004,10004,10004,10004,10003,10003]) }; - this.enemyInfo = { tactical: GTactical.getTactical(true).setOffset(this.enemyPos), roles: GRoleUtil.getGRoles([10002]) }; + this.playerInfo = { tactical: GTactical.getTactical().setOffset(this.playerPos), roles: GRoleUtil.getGRoles([]) }; + this.enemyInfo = { tactical: GTactical.getTactical(true).setOffset(this.enemyPos), roles: GRoleUtil.getGRoles([]) }; this.onUpdatePlayerPet(); //添加监听 this.addEvent(); + // //模拟请求生成宠物 + // app.socket.SendBack(GAction.MODE_ON_HOOK_SPAWN_PET,{ + // type:GActionType.GOnHookPets, + // fun:(info:GOnHookPets) => { + // console.log("接受到野怪列表",info) + // } + // }) + //生成玩家 // this.playerInfo.roles.forEach((info,index) => this.onGenRole(GOnHookModePlayerEnum.PLAYER,index + 1,info)) @@ -151,6 +186,17 @@ export default class GOnHookMode extends GBaseMode<{}>{ } + //生成野怪 + onSpawnWildlife(){ + //获取服务器野怪 + app.socket.SendBack(GAction.MODE_ON_HOOK_SPAWN_PET,{ + type:GActionType.GOnHookPets, + fun:(info:GOnHookPets) => { + this.wildlifes = info; + } + }) + } + //更新玩家宠物 onUpdatePlayerPet(){ //获取玩家阵容 @@ -318,7 +364,12 @@ export default class GOnHookMode extends GBaseMode<{}>{ //生成敌人 onResetGenerateEnemy(){ this.enemyRoles = []; - this.enemyInfo.roles.forEach((info,index) => this.onGenRole(GOnHookModePlayerEnum.ENEMY,index + 1,info)) + if(!this.wildlifes) return; + + //获取敌人 + let wildlife = this.wildlifes.pets.shift(); + this.onGenRole(GOnHookModePlayerEnum.ENEMY,2,GRoleUtil.getGRole(wildlife.petTbId)); + // this.enemyInfo.roles.forEach((info,index) => this.onGenRole(GOnHookModePlayerEnum.ENEMY,index + 1,info)); } //角色死亡回调 diff --git a/JisolGameCocos/assets/script/consts/GAction.ts b/JisolGameCocos/assets/script/consts/GAction.ts index 944f522f..19e45c8d 100644 --- a/JisolGameCocos/assets/script/consts/GAction.ts +++ b/JisolGameCocos/assets/script/consts/GAction.ts @@ -2,8 +2,15 @@ export enum GAction { TOKEN_EXPIRED = 1001, //Token过期 - //聊天 + /*************** 聊天 **************/ CHAT_MESSAGE = 2001, //发送聊天消息 CHAT_RECEIVE_MESSAGE = 2002, //接受聊天消息 + + /*************** 游戏模式 : 无尽模式(OnHook) **************/ + MODE_ON_HOOK_SPAWN_PET = 3001, //生成宠物 + MODE_ON_HOOK_CAPTURE_PET = 3002, //捕捉宠物 + MODE_ON_HOOK_SELL_PET = 3003, //卖出宠物 + + } \ No newline at end of file diff --git a/JisolGameCocos/assets/script/consts/GActionType.ts b/JisolGameCocos/assets/script/consts/GActionType.ts index a181e1fd..25861da6 100644 --- a/JisolGameCocos/assets/script/consts/GActionType.ts +++ b/JisolGameCocos/assets/script/consts/GActionType.ts @@ -6,4 +6,9 @@ export enum GActionType { GUIChatMessage = "GUIChatMessage",//聊天信息 + + /*************** 游戏模式 : 无尽模式(OnHook) **************/ + GOnHookPet = "GOnHookPet", //野怪 + GOnHookPets = "GOnHookPets", //野怪列表 + } \ No newline at end of file diff --git a/JisolGameCocos/assets/script/data/PlayerTacticalData.ts b/JisolGameCocos/assets/script/data/PlayerTacticalData.ts index d1b9a27b..5a015656 100644 --- a/JisolGameCocos/assets/script/data/PlayerTacticalData.ts +++ b/JisolGameCocos/assets/script/data/PlayerTacticalData.ts @@ -44,11 +44,14 @@ export default class PlayerTacticalData extends BaseData{ } //更新上阵 - async UpdateTactical(roles:number[]){ + async UpdateTactical(roles:number[]):Promise{ + //如果阵法一样则不更新 + if(this.info.tacticalData == JSON.stringify(roles)) return false; this.info.roles = roles; this.info.tacticalData = JSON.stringify(this.info.roles); //上传到服务器 并且保存 this.onSaveTacticalInfo(await API.SetPlayerTactical(this.info)); + return true; } //修改指定位置的上阵 上阵下标,上阵的宠物Id diff --git a/JisolGameCocos/assets/script/ui/Consts/Tactical/PlayerTacticalItem.ts b/JisolGameCocos/assets/script/ui/Consts/Tactical/PlayerTacticalItem.ts index db4dc5f1..9ffddc03 100644 --- a/JisolGameCocos/assets/script/ui/Consts/Tactical/PlayerTacticalItem.ts +++ b/JisolGameCocos/assets/script/ui/Consts/Tactical/PlayerTacticalItem.ts @@ -117,6 +117,12 @@ export class PlayerTacticalItem extends Component { fun(this,e); }); } + + addMoveEndEvent(fun:Function){ + this.drag.addMoveEndEvent((e) => { + fun(this,e); + }); + } } diff --git a/JisolGameCocos/assets/script/ui/Consts/Tactical/PlayerTacticalView.ts b/JisolGameCocos/assets/script/ui/Consts/Tactical/PlayerTacticalView.ts index 9a7fa8f1..4f51ff45 100644 --- a/JisolGameCocos/assets/script/ui/Consts/Tactical/PlayerTacticalView.ts +++ b/JisolGameCocos/assets/script/ui/Consts/Tactical/PlayerTacticalView.ts @@ -1,10 +1,11 @@ import { _decorator, Component, Node } from 'cc'; import { PlayerTacticalItem } from './PlayerTacticalItem'; import { app } from '../../../App'; -import { PlayerTacticalEvent } from '../../../data/PlayerTacticalData'; +import PlayerTacticalData, { PlayerTacticalEvent } from '../../../data/PlayerTacticalData'; import JNodeDrag from '../../../../../extensions/ngame/assets/ngame/util/components/JNodeDrag'; import { EventTouch } from 'cc'; import { UITransform } from 'cc'; +import { GUI } from '../../UIConfig'; const { ccclass, property } = _decorator; /** @@ -23,7 +24,10 @@ export class PlayerTacticalView extends Component { this.items = this.node.getComponentsInChildren(PlayerTacticalItem); this.items.forEach((item,index) => { item.onInit(index); //初始化阵法下标 + //添加移动事件 item.addMoveEvent(this.onMoveItem.bind(this)); + //添加移动结束事件 + item.addMoveEndEvent(this.onMoveEndItem.bind(this)); }); this.onUpdateView(); @@ -53,6 +57,20 @@ export class PlayerTacticalView extends Component { } + //子节点移动结束 + async onMoveEndItem(){ + + //移动结束则保存阵法 + let pets:number[] = PlayerTacticalData.getIns().getInitTacticalInfo(); + this.items.forEach(item => { + pets[item.index] = item.petId || 0; + }) + if(await PlayerTacticalData.getIns().UpdateTactical(pets)){ + app.layer.Open(GUI.Tips,{text:"保存阵法成功"}); + } + + } + protected onDestroy(): void { this.offEvent(); } diff --git a/JisolGameCocos/extensions/ngame b/JisolGameCocos/extensions/ngame index 01a31870..ea12e2c1 160000 --- a/JisolGameCocos/extensions/ngame +++ b/JisolGameCocos/extensions/ngame @@ -1 +1 @@ -Subproject commit 01a31870c404967092e5c87fc91650bae868bbad +Subproject commit ea12e2c1097c07ed71baf59504455038e3b0b856 diff --git a/JisolGameCocos/proto/GOnHookMessage.proto b/JisolGameCocos/proto/GOnHookMessage.proto new file mode 100644 index 00000000..5f972cda --- /dev/null +++ b/JisolGameCocos/proto/GOnHookMessage.proto @@ -0,0 +1,14 @@ +syntax = "proto3"; + +option java_package = "cn.jisol.ngame.proto"; + +//生成宠物类 +message GOnHookPet { + string key = 1; //生成宠物的key + int32 petTbId = 2; //生成宠物的配置表Id +} + +//生成的宠物类列表 +message GOnHookPets { + repeated GOnHookPet pets = 1; //宠物列表 +} diff --git a/JisolGameServer/JNGame b/JisolGameServer/JNGame index fe5330b6..a57971ec 160000 --- a/JisolGameServer/JNGame +++ b/JisolGameServer/JNGame @@ -1 +1 @@ -Subproject commit fe5330b622e0fb50a12808bc832eeb79202c4eb3 +Subproject commit a57971eceadfcc80e06934e75a7dee7469fb10a1 diff --git a/JisolGameServer/Main/src/main/java/cfg/TB/TbGMap.java b/JisolGameServer/Main/src/main/java/cfg/TB/TbGMap.java index 17ae9e25..5658ac2d 100644 --- a/JisolGameServer/Main/src/main/java/cfg/TB/TbGMap.java +++ b/JisolGameServer/Main/src/main/java/cfg/TB/TbGMap.java @@ -24,6 +24,7 @@ public final class TbGMap extends AbstractBean { map1OffsetY = _buf.get("map1OffsetY").getAsInt(); map2OffsetY = _buf.get("map2OffsetY").getAsInt(); map3OffsetY = _buf.get("map3OffsetY").getAsInt(); + scale = _buf.get("scale").getAsFloat(); } public static TbGMap deserialize(JsonObject _buf) { @@ -62,6 +63,10 @@ public final class TbGMap extends AbstractBean { * 地图2(后) 偏移量Y */ public final int map3OffsetY; + /** + * 地图缩放 + */ + public final float scale; public static final int __ID__ = -2067912029; @@ -79,6 +84,7 @@ public final class TbGMap extends AbstractBean { + "(format_field_name __code_style field.name):" + map1OffsetY + "," + "(format_field_name __code_style field.name):" + map2OffsetY + "," + "(format_field_name __code_style field.name):" + map3OffsetY + "," + + "(format_field_name __code_style field.name):" + scale + "," + "}"; } } diff --git a/JisolGameServer/Main/src/main/java/cfg/TB/TbGOnHookGlobal.java b/JisolGameServer/Main/src/main/java/cfg/TB/TbGOnHookGlobal.java new file mode 100644 index 00000000..eb2f830a --- /dev/null +++ b/JisolGameServer/Main/src/main/java/cfg/TB/TbGOnHookGlobal.java @@ -0,0 +1,55 @@ + +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +package cfg.TB; + +import luban.*; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; + + +public final class TbGOnHookGlobal extends AbstractBean { + public TbGOnHookGlobal(JsonObject _buf) { + id = _buf.get("id").getAsInt(); + args = _buf.get("args").getAsString(); + tig = _buf.get("tig").getAsString(); + } + + public static TbGOnHookGlobal deserialize(JsonObject _buf) { + return new cfg.TB.TbGOnHookGlobal(_buf); + } + + /** + * id + */ + public final int id; + /** + * 全局表参数 + */ + public final String args; + /** + * 描述 + */ + public final String tig; + + public static final int __ID__ = -340649858; + + @Override + public int getTypeId() { return __ID__; } + + @Override + public String toString() { + return "{ " + + "(format_field_name __code_style field.name):" + id + "," + + "(format_field_name __code_style field.name):" + args + "," + + "(format_field_name __code_style field.name):" + tig + "," + + "}"; + } +} + diff --git a/JisolGameServer/Main/src/main/java/cfg/Tables.java b/JisolGameServer/Main/src/main/java/cfg/Tables.java index 2f82636c..1e480a79 100644 --- a/JisolGameServer/Main/src/main/java/cfg/Tables.java +++ b/JisolGameServer/Main/src/main/java/cfg/Tables.java @@ -31,6 +31,8 @@ public final class Tables public cfg.TbGRoleSkill getTbGRoleSkill() { return _tbgroleskill; } private final cfg.TbGMap _tbgmap; public cfg.TbGMap getTbGMap() { return _tbgmap; } + private final cfg.TbGOnHookGlobal _tbgonhookglobal; + public cfg.TbGOnHookGlobal getTbGOnHookGlobal() { return _tbgonhookglobal; } public Tables(IJsonLoader loader) throws java.io.IOException { _tbgglobal = new cfg.TbGGlobal(loader.load("tbgglobal")); @@ -39,6 +41,7 @@ public final class Tables _tbgrolebattleres = new cfg.TbGRoleBattleRes(loader.load("tbgrolebattleres")); _tbgroleskill = new cfg.TbGRoleSkill(loader.load("tbgroleskill")); _tbgmap = new cfg.TbGMap(loader.load("tbgmap")); + _tbgonhookglobal = new cfg.TbGOnHookGlobal(loader.load("tbgonhookglobal")); } } diff --git a/JisolGameServer/Main/src/main/java/cfg/TbGOnHookGlobal.java b/JisolGameServer/Main/src/main/java/cfg/TbGOnHookGlobal.java new file mode 100644 index 00000000..efad1290 --- /dev/null +++ b/JisolGameServer/Main/src/main/java/cfg/TbGOnHookGlobal.java @@ -0,0 +1,37 @@ + +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +package cfg; + +import luban.*; +import com.google.gson.JsonElement; + + +public final class TbGOnHookGlobal { + private final java.util.HashMap _dataMap; + private final java.util.ArrayList _dataList; + + public TbGOnHookGlobal(JsonElement _buf) { + _dataMap = new java.util.HashMap(); + _dataList = new java.util.ArrayList(); + + for (com.google.gson.JsonElement _e_ : _buf.getAsJsonArray()) { + cfg.TB.TbGOnHookGlobal _v; + _v = cfg.TB.TbGOnHookGlobal.deserialize(_e_.getAsJsonObject()); + _dataList.add(_v); + _dataMap.put(_v.id, _v); + } + } + + public java.util.HashMap getDataMap() { return _dataMap; } + public java.util.ArrayList getDataList() { return _dataList; } + + public cfg.TB.TbGOnHookGlobal get(int key) { return _dataMap.get(key); } + +} 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 24ce5fb4..e2a4fae2 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 @@ -8,4 +8,9 @@ public interface GActionEnum { int CHAT_MESSAGE = 2001; //发送聊天消息 int CHAT_RECEIVE_MESSAGE = 2002; //接受聊天消息 + /*************** 游戏模式 : 无尽模式(OnHook) **************/ + int MODE_ON_HOOK_SPAWN_PET = 3001; //生成宠物 + int MODE_ON_HOOK_CAPTURE_PET = 3002; //捕捉宠物 + int MODE_ON_HOOK_SELL_PET = 3003; //卖出宠物 + } diff --git a/JisolGameServer/Main/src/main/java/cn/jisol/game/actions/onhook/GOnHookAction.java b/JisolGameServer/Main/src/main/java/cn/jisol/game/actions/onhook/GOnHookAction.java new file mode 100644 index 00000000..00291b60 --- /dev/null +++ b/JisolGameServer/Main/src/main/java/cn/jisol/game/actions/onhook/GOnHookAction.java @@ -0,0 +1,66 @@ +package cn.jisol.game.actions.onhook; + +import cfg.TB.TbGRole; +import cn.hutool.core.lang.UUID; +import cn.hutool.core.util.IdUtil; +import cn.hutool.core.util.RandomUtil; +import cn.jisol.game.actions.GActionEnum; +import cn.jisol.game.data.GlobalIds; +import cn.jisol.game.data.TD; +import cn.jisol.game.network.client.GClient; +import cn.jisol.game.proto.GOnHookMessage; +import cn.jisol.ngame.actions.core.NAction; +import cn.jisol.ngame.actions.core.NActionMethod; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.concurrent.ConcurrentHashMap; + +//无尽模式 +@NAction +public class GOnHookAction { + + //生成的宠物列表 + public static Map> PETS = new HashMap<>(); + + //生成宠物 返回生成好的列表 + @NActionMethod(GActionEnum.MODE_ON_HOOK_SPAWN_PET) + public static GOnHookMessage.GOnHookPets onSpawnPet(GClient client){ + + //获取玩家生成的宠物 + Map pets = PETS.get(client.player.getPlayerId()); + + //如果没有则生成类 + if(Objects.isNull(pets)){ + PETS.put(client.player.getPlayerId(),pets = new HashMap<>()); + } + + //获取可生成的最大数量 + int max = Integer.parseInt(TD.DATA.getTbGOnHookGlobal().get(GlobalIds.MODE_ON_HOOK_SPAWN_NUM).args); + + //获取配置表全部宠物 + ArrayList tdPets = TD.DATA.getTbGRole().getDataList(); + + //如果小于最大数量则生成 + while (pets.size() < max){ + + //目前随机生成宠物 + GOnHookMessage.GOnHookPet hookPet = GOnHookMessage.GOnHookPet.newBuilder() + //生成唯一Id + .setKey(RandomUtil.randomString(8)) + //随机取配置表宠物中的宠物 + .setPetTbId(tdPets.get(RandomUtil.randomInt(0, tdPets.size() - 1)).id) + .build(); + + //添加到宠物列表中 + pets.put(hookPet.getKey(),hookPet); + + } + + //返回生成好的宠物 + return GOnHookMessage.GOnHookPets.newBuilder().addAllPets(pets.values()).build(); + } + +} diff --git a/JisolGameServer/Main/src/main/java/cn/jisol/game/controller/game/mode/GOnHookController.java b/JisolGameServer/Main/src/main/java/cn/jisol/game/controller/game/mode/GOnHookController.java new file mode 100644 index 00000000..a76c6ef9 --- /dev/null +++ b/JisolGameServer/Main/src/main/java/cn/jisol/game/controller/game/mode/GOnHookController.java @@ -0,0 +1,13 @@ +package cn.jisol.game.controller.game.mode; + +import io.swagger.annotations.Api; +import org.springframework.web.bind.annotation.*; + +@Api(value = "JNGameDemo - API", tags = {"无尽模式 - API"}) +@RestController +@RequestMapping("/game/mode/onhook") +@ResponseBody +public class GOnHookController { + + +} diff --git a/JisolGameServer/Main/src/main/java/cn/jisol/game/data/GlobalIds.java b/JisolGameServer/Main/src/main/java/cn/jisol/game/data/GlobalIds.java index 045eb53d..1f053615 100644 --- a/JisolGameServer/Main/src/main/java/cn/jisol/game/data/GlobalIds.java +++ b/JisolGameServer/Main/src/main/java/cn/jisol/game/data/GlobalIds.java @@ -5,4 +5,8 @@ public interface GlobalIds { //选择宠物配置表Id int SELECT_PET_ID = 70001; + + //OnHook模式 宠物生成数量 + int MODE_ON_HOOK_SPAWN_NUM = 80001; + } diff --git a/JisolGameServer/Main/src/main/java/cn/jisol/game/network/WebSocket.java b/JisolGameServer/Main/src/main/java/cn/jisol/game/network/WebSocket.java index 834fe100..25514302 100644 --- a/JisolGameServer/Main/src/main/java/cn/jisol/game/network/WebSocket.java +++ b/JisolGameServer/Main/src/main/java/cn/jisol/game/network/WebSocket.java @@ -55,7 +55,7 @@ public class WebSocket { @OnMessage public void onMessage(Session session, InputStream inputStream){ GClient client = CLIENTS.get(session.getId()); - JNetwork.onMessage(inputStream,client,CLIENTS,client.user,client.player); + JNetwork.onMessage(inputStream,client,client,CLIENTS,client.user,client.player); } @OnClose diff --git a/JisolGameServer/Main/src/main/java/cn/jisol/game/network/client/GClient.java b/JisolGameServer/Main/src/main/java/cn/jisol/game/network/client/GClient.java index 67457008..fb26952a 100644 --- a/JisolGameServer/Main/src/main/java/cn/jisol/game/network/client/GClient.java +++ b/JisolGameServer/Main/src/main/java/cn/jisol/game/network/client/GClient.java @@ -13,8 +13,10 @@ public class GClient extends QueueNClient { public Session session; + //账号 public User user; + //游戏玩家 public Player player; public GClient(String token,Session session){ diff --git a/JisolGameServer/Main/src/main/java/cn/jisol/game/proto/GOnHookMessage.java b/JisolGameServer/Main/src/main/java/cn/jisol/game/proto/GOnHookMessage.java new file mode 100644 index 00000000..fa17f147 --- /dev/null +++ b/JisolGameServer/Main/src/main/java/cn/jisol/game/proto/GOnHookMessage.java @@ -0,0 +1,1679 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: GOnHookMessage.proto + +package cn.jisol.game.proto; + +public final class GOnHookMessage { + private GOnHookMessage() {} + 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 GOnHookPetOrBuilder extends + // @@protoc_insertion_point(interface_extends:GOnHookPet) + com.google.protobuf.MessageOrBuilder { + + /** + *

+     *生成宠物的key
+     * 
+ * + * string key = 1; + * @return The key. + */ + String getKey(); + /** + *
+     *生成宠物的key
+     * 
+ * + * string key = 1; + * @return The bytes for key. + */ + com.google.protobuf.ByteString + getKeyBytes(); + + /** + *
+     *生成宠物的配置表Id
+     * 
+ * + * int32 petTbId = 2; + * @return The petTbId. + */ + int getPetTbId(); + } + /** + *
+   *生成宠物类
+   * 
+ * + * Protobuf type {@code GOnHookPet} + */ + public static final class GOnHookPet extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:GOnHookPet) + GOnHookPetOrBuilder { + private static final long serialVersionUID = 0L; + // Use GOnHookPet.newBuilder() to construct. + private GOnHookPet(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GOnHookPet() { + key_ = ""; + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new GOnHookPet(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GOnHookPet( + 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(); + + key_ = s; + break; + } + case 16: { + + petTbId_ = input.readInt32(); + 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 GOnHookMessage.internal_static_GOnHookPet_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return GOnHookMessage.internal_static_GOnHookPet_fieldAccessorTable + .ensureFieldAccessorsInitialized( + GOnHookMessage.GOnHookPet.class, GOnHookMessage.GOnHookPet.Builder.class); + } + + public static final int KEY_FIELD_NUMBER = 1; + private volatile Object key_; + /** + *
+     *生成宠物的key
+     * 
+ * + * string key = 1; + * @return The key. + */ + @Override + public String getKey() { + Object ref = key_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + key_ = s; + return s; + } + } + /** + *
+     *生成宠物的key
+     * 
+ * + * string key = 1; + * @return The bytes for key. + */ + @Override + public com.google.protobuf.ByteString + getKeyBytes() { + Object ref = key_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PETTBID_FIELD_NUMBER = 2; + private int petTbId_; + /** + *
+     *生成宠物的配置表Id
+     * 
+ * + * int32 petTbId = 2; + * @return The petTbId. + */ + @Override + public int getPetTbId() { + return petTbId_; + } + + 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(key_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, key_); + } + if (petTbId_ != 0) { + output.writeInt32(2, petTbId_); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, key_); + } + if (petTbId_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, petTbId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof GOnHookMessage.GOnHookPet)) { + return super.equals(obj); + } + GOnHookMessage.GOnHookPet other = (GOnHookMessage.GOnHookPet) obj; + + if (!getKey() + .equals(other.getKey())) return false; + if (getPetTbId() + != other.getPetTbId()) 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) + KEY_FIELD_NUMBER; + hash = (53 * hash) + getKey().hashCode(); + hash = (37 * hash) + PETTBID_FIELD_NUMBER; + hash = (53 * hash) + getPetTbId(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static GOnHookMessage.GOnHookPet parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static GOnHookMessage.GOnHookPet parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static GOnHookMessage.GOnHookPet parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static GOnHookMessage.GOnHookPet parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static GOnHookMessage.GOnHookPet parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static GOnHookMessage.GOnHookPet parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static GOnHookMessage.GOnHookPet parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static GOnHookMessage.GOnHookPet 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 GOnHookMessage.GOnHookPet parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static GOnHookMessage.GOnHookPet 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 GOnHookMessage.GOnHookPet parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static GOnHookMessage.GOnHookPet 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(GOnHookMessage.GOnHookPet 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; + } + /** + *
+     *生成宠物类
+     * 
+ * + * Protobuf type {@code GOnHookPet} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:GOnHookPet) + GOnHookMessage.GOnHookPetOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return GOnHookMessage.internal_static_GOnHookPet_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return GOnHookMessage.internal_static_GOnHookPet_fieldAccessorTable + .ensureFieldAccessorsInitialized( + GOnHookMessage.GOnHookPet.class, GOnHookMessage.GOnHookPet.Builder.class); + } + + // Construct using cn.jisol.ngame.proto.GOnHookMessage.GOnHookPet.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(); + key_ = ""; + + petTbId_ = 0; + + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return GOnHookMessage.internal_static_GOnHookPet_descriptor; + } + + @Override + public GOnHookMessage.GOnHookPet getDefaultInstanceForType() { + return GOnHookMessage.GOnHookPet.getDefaultInstance(); + } + + @Override + public GOnHookMessage.GOnHookPet build() { + GOnHookMessage.GOnHookPet result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public GOnHookMessage.GOnHookPet buildPartial() { + GOnHookMessage.GOnHookPet result = new GOnHookMessage.GOnHookPet(this); + result.key_ = key_; + result.petTbId_ = petTbId_; + 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 GOnHookMessage.GOnHookPet) { + return mergeFrom((GOnHookMessage.GOnHookPet)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(GOnHookMessage.GOnHookPet other) { + if (other == GOnHookMessage.GOnHookPet.getDefaultInstance()) return this; + if (!other.getKey().isEmpty()) { + key_ = other.key_; + onChanged(); + } + if (other.getPetTbId() != 0) { + setPetTbId(other.getPetTbId()); + } + 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 { + GOnHookMessage.GOnHookPet parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (GOnHookMessage.GOnHookPet) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private Object key_ = ""; + /** + *
+       *生成宠物的key
+       * 
+ * + * string key = 1; + * @return The key. + */ + public String getKey() { + Object ref = key_; + if (!(ref instanceof String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + key_ = s; + return s; + } else { + return (String) ref; + } + } + /** + *
+       *生成宠物的key
+       * 
+ * + * string key = 1; + * @return The bytes for key. + */ + public com.google.protobuf.ByteString + getKeyBytes() { + Object ref = key_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       *生成宠物的key
+       * 
+ * + * string key = 1; + * @param value The key to set. + * @return This builder for chaining. + */ + public Builder setKey( + String value) { + if (value == null) { + throw new NullPointerException(); + } + + key_ = value; + onChanged(); + return this; + } + /** + *
+       *生成宠物的key
+       * 
+ * + * string key = 1; + * @return This builder for chaining. + */ + public Builder clearKey() { + + key_ = getDefaultInstance().getKey(); + onChanged(); + return this; + } + /** + *
+       *生成宠物的key
+       * 
+ * + * string key = 1; + * @param value The bytes for key to set. + * @return This builder for chaining. + */ + public Builder setKeyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + key_ = value; + onChanged(); + return this; + } + + private int petTbId_ ; + /** + *
+       *生成宠物的配置表Id
+       * 
+ * + * int32 petTbId = 2; + * @return The petTbId. + */ + @Override + public int getPetTbId() { + return petTbId_; + } + /** + *
+       *生成宠物的配置表Id
+       * 
+ * + * int32 petTbId = 2; + * @param value The petTbId to set. + * @return This builder for chaining. + */ + public Builder setPetTbId(int value) { + + petTbId_ = value; + onChanged(); + return this; + } + /** + *
+       *生成宠物的配置表Id
+       * 
+ * + * int32 petTbId = 2; + * @return This builder for chaining. + */ + public Builder clearPetTbId() { + + petTbId_ = 0; + 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:GOnHookPet) + } + + // @@protoc_insertion_point(class_scope:GOnHookPet) + private static final GOnHookMessage.GOnHookPet DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new GOnHookMessage.GOnHookPet(); + } + + public static GOnHookMessage.GOnHookPet getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public GOnHookPet parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GOnHookPet(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public GOnHookMessage.GOnHookPet getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GOnHookPetsOrBuilder extends + // @@protoc_insertion_point(interface_extends:GOnHookPets) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *宠物列表
+     * 
+ * + * repeated .GOnHookPet pets = 1; + */ + java.util.List + getPetsList(); + /** + *
+     *宠物列表
+     * 
+ * + * repeated .GOnHookPet pets = 1; + */ + GOnHookMessage.GOnHookPet getPets(int index); + /** + *
+     *宠物列表
+     * 
+ * + * repeated .GOnHookPet pets = 1; + */ + int getPetsCount(); + /** + *
+     *宠物列表
+     * 
+ * + * repeated .GOnHookPet pets = 1; + */ + java.util.List + getPetsOrBuilderList(); + /** + *
+     *宠物列表
+     * 
+ * + * repeated .GOnHookPet pets = 1; + */ + GOnHookMessage.GOnHookPetOrBuilder getPetsOrBuilder( + int index); + } + /** + *
+   *生成的宠物类列表
+   * 
+ * + * Protobuf type {@code GOnHookPets} + */ + public static final class GOnHookPets extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:GOnHookPets) + GOnHookPetsOrBuilder { + private static final long serialVersionUID = 0L; + // Use GOnHookPets.newBuilder() to construct. + private GOnHookPets(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GOnHookPets() { + pets_ = java.util.Collections.emptyList(); + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new GOnHookPets(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GOnHookPets( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + int mutable_bitField0_ = 0; + 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: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + pets_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + pets_.add( + input.readMessage(GOnHookMessage.GOnHookPet.parser(), extensionRegistry)); + 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 { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + pets_ = java.util.Collections.unmodifiableList(pets_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return GOnHookMessage.internal_static_GOnHookPets_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return GOnHookMessage.internal_static_GOnHookPets_fieldAccessorTable + .ensureFieldAccessorsInitialized( + GOnHookMessage.GOnHookPets.class, GOnHookMessage.GOnHookPets.Builder.class); + } + + public static final int PETS_FIELD_NUMBER = 1; + private java.util.List pets_; + /** + *
+     *宠物列表
+     * 
+ * + * repeated .GOnHookPet pets = 1; + */ + @Override + public java.util.List getPetsList() { + return pets_; + } + /** + *
+     *宠物列表
+     * 
+ * + * repeated .GOnHookPet pets = 1; + */ + @Override + public java.util.List + getPetsOrBuilderList() { + return pets_; + } + /** + *
+     *宠物列表
+     * 
+ * + * repeated .GOnHookPet pets = 1; + */ + @Override + public int getPetsCount() { + return pets_.size(); + } + /** + *
+     *宠物列表
+     * 
+ * + * repeated .GOnHookPet pets = 1; + */ + @Override + public GOnHookMessage.GOnHookPet getPets(int index) { + return pets_.get(index); + } + /** + *
+     *宠物列表
+     * 
+ * + * repeated .GOnHookPet pets = 1; + */ + @Override + public GOnHookMessage.GOnHookPetOrBuilder getPetsOrBuilder( + int index) { + return pets_.get(index); + } + + 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 { + for (int i = 0; i < pets_.size(); i++) { + output.writeMessage(1, pets_.get(i)); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < pets_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, pets_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof GOnHookMessage.GOnHookPets)) { + return super.equals(obj); + } + GOnHookMessage.GOnHookPets other = (GOnHookMessage.GOnHookPets) obj; + + if (!getPetsList() + .equals(other.getPetsList())) 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(); + if (getPetsCount() > 0) { + hash = (37 * hash) + PETS_FIELD_NUMBER; + hash = (53 * hash) + getPetsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static GOnHookMessage.GOnHookPets parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static GOnHookMessage.GOnHookPets parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static GOnHookMessage.GOnHookPets parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static GOnHookMessage.GOnHookPets parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static GOnHookMessage.GOnHookPets parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static GOnHookMessage.GOnHookPets parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static GOnHookMessage.GOnHookPets parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static GOnHookMessage.GOnHookPets 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 GOnHookMessage.GOnHookPets parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static GOnHookMessage.GOnHookPets 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 GOnHookMessage.GOnHookPets parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static GOnHookMessage.GOnHookPets 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(GOnHookMessage.GOnHookPets 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; + } + /** + *
+     *生成的宠物类列表
+     * 
+ * + * Protobuf type {@code GOnHookPets} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:GOnHookPets) + GOnHookMessage.GOnHookPetsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return GOnHookMessage.internal_static_GOnHookPets_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return GOnHookMessage.internal_static_GOnHookPets_fieldAccessorTable + .ensureFieldAccessorsInitialized( + GOnHookMessage.GOnHookPets.class, GOnHookMessage.GOnHookPets.Builder.class); + } + + // Construct using cn.jisol.ngame.proto.GOnHookMessage.GOnHookPets.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getPetsFieldBuilder(); + } + } + @Override + public Builder clear() { + super.clear(); + if (petsBuilder_ == null) { + pets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + petsBuilder_.clear(); + } + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return GOnHookMessage.internal_static_GOnHookPets_descriptor; + } + + @Override + public GOnHookMessage.GOnHookPets getDefaultInstanceForType() { + return GOnHookMessage.GOnHookPets.getDefaultInstance(); + } + + @Override + public GOnHookMessage.GOnHookPets build() { + GOnHookMessage.GOnHookPets result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public GOnHookMessage.GOnHookPets buildPartial() { + GOnHookMessage.GOnHookPets result = new GOnHookMessage.GOnHookPets(this); + int from_bitField0_ = bitField0_; + if (petsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + pets_ = java.util.Collections.unmodifiableList(pets_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.pets_ = pets_; + } else { + result.pets_ = petsBuilder_.build(); + } + 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 GOnHookMessage.GOnHookPets) { + return mergeFrom((GOnHookMessage.GOnHookPets)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(GOnHookMessage.GOnHookPets other) { + if (other == GOnHookMessage.GOnHookPets.getDefaultInstance()) return this; + if (petsBuilder_ == null) { + if (!other.pets_.isEmpty()) { + if (pets_.isEmpty()) { + pets_ = other.pets_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePetsIsMutable(); + pets_.addAll(other.pets_); + } + onChanged(); + } + } else { + if (!other.pets_.isEmpty()) { + if (petsBuilder_.isEmpty()) { + petsBuilder_.dispose(); + petsBuilder_ = null; + pets_ = other.pets_; + bitField0_ = (bitField0_ & ~0x00000001); + petsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getPetsFieldBuilder() : null; + } else { + petsBuilder_.addAllMessages(other.pets_); + } + } + } + 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 { + GOnHookMessage.GOnHookPets parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (GOnHookMessage.GOnHookPets) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List pets_ = + java.util.Collections.emptyList(); + private void ensurePetsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + pets_ = new java.util.ArrayList(pets_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + GOnHookPet, GOnHookPet.Builder, GOnHookPetOrBuilder> petsBuilder_; + + /** + *
+       *宠物列表
+       * 
+ * + * repeated .GOnHookPet pets = 1; + */ + public java.util.List getPetsList() { + if (petsBuilder_ == null) { + return java.util.Collections.unmodifiableList(pets_); + } else { + return petsBuilder_.getMessageList(); + } + } + /** + *
+       *宠物列表
+       * 
+ * + * repeated .GOnHookPet pets = 1; + */ + public int getPetsCount() { + if (petsBuilder_ == null) { + return pets_.size(); + } else { + return petsBuilder_.getCount(); + } + } + /** + *
+       *宠物列表
+       * 
+ * + * repeated .GOnHookPet pets = 1; + */ + public GOnHookMessage.GOnHookPet getPets(int index) { + if (petsBuilder_ == null) { + return pets_.get(index); + } else { + return petsBuilder_.getMessage(index); + } + } + /** + *
+       *宠物列表
+       * 
+ * + * repeated .GOnHookPet pets = 1; + */ + public Builder setPets( + int index, GOnHookMessage.GOnHookPet value) { + if (petsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePetsIsMutable(); + pets_.set(index, value); + onChanged(); + } else { + petsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       *宠物列表
+       * 
+ * + * repeated .GOnHookPet pets = 1; + */ + public Builder setPets( + int index, GOnHookMessage.GOnHookPet.Builder builderForValue) { + if (petsBuilder_ == null) { + ensurePetsIsMutable(); + pets_.set(index, builderForValue.build()); + onChanged(); + } else { + petsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       *宠物列表
+       * 
+ * + * repeated .GOnHookPet pets = 1; + */ + public Builder addPets(GOnHookMessage.GOnHookPet value) { + if (petsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePetsIsMutable(); + pets_.add(value); + onChanged(); + } else { + petsBuilder_.addMessage(value); + } + return this; + } + /** + *
+       *宠物列表
+       * 
+ * + * repeated .GOnHookPet pets = 1; + */ + public Builder addPets( + int index, GOnHookMessage.GOnHookPet value) { + if (petsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePetsIsMutable(); + pets_.add(index, value); + onChanged(); + } else { + petsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       *宠物列表
+       * 
+ * + * repeated .GOnHookPet pets = 1; + */ + public Builder addPets( + GOnHookMessage.GOnHookPet.Builder builderForValue) { + if (petsBuilder_ == null) { + ensurePetsIsMutable(); + pets_.add(builderForValue.build()); + onChanged(); + } else { + petsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       *宠物列表
+       * 
+ * + * repeated .GOnHookPet pets = 1; + */ + public Builder addPets( + int index, GOnHookMessage.GOnHookPet.Builder builderForValue) { + if (petsBuilder_ == null) { + ensurePetsIsMutable(); + pets_.add(index, builderForValue.build()); + onChanged(); + } else { + petsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       *宠物列表
+       * 
+ * + * repeated .GOnHookPet pets = 1; + */ + public Builder addAllPets( + Iterable values) { + if (petsBuilder_ == null) { + ensurePetsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, pets_); + onChanged(); + } else { + petsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       *宠物列表
+       * 
+ * + * repeated .GOnHookPet pets = 1; + */ + public Builder clearPets() { + if (petsBuilder_ == null) { + pets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + petsBuilder_.clear(); + } + return this; + } + /** + *
+       *宠物列表
+       * 
+ * + * repeated .GOnHookPet pets = 1; + */ + public Builder removePets(int index) { + if (petsBuilder_ == null) { + ensurePetsIsMutable(); + pets_.remove(index); + onChanged(); + } else { + petsBuilder_.remove(index); + } + return this; + } + /** + *
+       *宠物列表
+       * 
+ * + * repeated .GOnHookPet pets = 1; + */ + public GOnHookMessage.GOnHookPet.Builder getPetsBuilder( + int index) { + return getPetsFieldBuilder().getBuilder(index); + } + /** + *
+       *宠物列表
+       * 
+ * + * repeated .GOnHookPet pets = 1; + */ + public GOnHookMessage.GOnHookPetOrBuilder getPetsOrBuilder( + int index) { + if (petsBuilder_ == null) { + return pets_.get(index); } else { + return petsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       *宠物列表
+       * 
+ * + * repeated .GOnHookPet pets = 1; + */ + public java.util.List + getPetsOrBuilderList() { + if (petsBuilder_ != null) { + return petsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(pets_); + } + } + /** + *
+       *宠物列表
+       * 
+ * + * repeated .GOnHookPet pets = 1; + */ + public GOnHookMessage.GOnHookPet.Builder addPetsBuilder() { + return getPetsFieldBuilder().addBuilder( + GOnHookMessage.GOnHookPet.getDefaultInstance()); + } + /** + *
+       *宠物列表
+       * 
+ * + * repeated .GOnHookPet pets = 1; + */ + public GOnHookMessage.GOnHookPet.Builder addPetsBuilder( + int index) { + return getPetsFieldBuilder().addBuilder( + index, GOnHookMessage.GOnHookPet.getDefaultInstance()); + } + /** + *
+       *宠物列表
+       * 
+ * + * repeated .GOnHookPet pets = 1; + */ + public java.util.List + getPetsBuilderList() { + return getPetsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + GOnHookPet, GOnHookPet.Builder, GOnHookPetOrBuilder> + getPetsFieldBuilder() { + if (petsBuilder_ == null) { + petsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + GOnHookPet, GOnHookPet.Builder, GOnHookPetOrBuilder>( + pets_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + pets_ = null; + } + return petsBuilder_; + } + @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:GOnHookPets) + } + + // @@protoc_insertion_point(class_scope:GOnHookPets) + private static final GOnHookMessage.GOnHookPets DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new GOnHookMessage.GOnHookPets(); + } + + public static GOnHookMessage.GOnHookPets getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @Override + public GOnHookPets parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GOnHookPets(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public GOnHookMessage.GOnHookPets getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_GOnHookPet_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_GOnHookPet_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_GOnHookPets_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_GOnHookPets_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + String[] descriptorData = { + "\n\024GOnHookMessage.proto\"*\n\nGOnHookPet\022\013\n\003" + + "key\030\001 \001(\t\022\017\n\007petTbId\030\002 \001(\005\"(\n\013GOnHookPet" + + "s\022\031\n\004pets\030\001 \003(\0132\013.GOnHookPetB\026\n\024cn.jisol" + + ".ngame.protob\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_GOnHookPet_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_GOnHookPet_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_GOnHookPet_descriptor, + new String[] { "Key", "PetTbId", }); + internal_static_GOnHookPets_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_GOnHookPets_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_GOnHookPets_descriptor, + new String[] { "Pets", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/JisolGameServer/Main/src/main/java/cn/jisol/game/proto/GOnHookMessage.proto b/JisolGameServer/Main/src/main/java/cn/jisol/game/proto/GOnHookMessage.proto new file mode 100644 index 00000000..5f972cda --- /dev/null +++ b/JisolGameServer/Main/src/main/java/cn/jisol/game/proto/GOnHookMessage.proto @@ -0,0 +1,14 @@ +syntax = "proto3"; + +option java_package = "cn.jisol.ngame.proto"; + +//生成宠物类 +message GOnHookPet { + string key = 1; //生成宠物的key + int32 petTbId = 2; //生成宠物的配置表Id +} + +//生成的宠物类列表 +message GOnHookPets { + repeated GOnHookPet pets = 1; //宠物列表 +} diff --git a/JisolGameServer/Main/src/main/resources/json/tbgmap.json b/JisolGameServer/Main/src/main/resources/json/tbgmap.json index bc23d3ff..3caec599 100644 --- a/JisolGameServer/Main/src/main/resources/json/tbgmap.json +++ b/JisolGameServer/Main/src/main/resources/json/tbgmap.json @@ -5,8 +5,9 @@ "map1": "map/MAP6/MAP6_1/spriteFrame", "map2": "map/MAP6/MAP6_2/spriteFrame", "map3": "map/MAP6/MAP6_3/spriteFrame", - "map1OffsetY": 100, - "map2OffsetY": 400, - "map3OffsetY": 400 + "map1OffsetY": 80, + "map2OffsetY": 520, + "map3OffsetY": 520, + "scale": 1.5 } ] \ No newline at end of file diff --git a/JisolGameServer/Main/src/main/resources/json/tbgonhookglobal.json b/JisolGameServer/Main/src/main/resources/json/tbgonhookglobal.json new file mode 100644 index 00000000..c85d7765 --- /dev/null +++ b/JisolGameServer/Main/src/main/resources/json/tbgonhookglobal.json @@ -0,0 +1,7 @@ +[ + { + "id": 80001, + "args": "100", + "tig": "预先生成的野外宠物数量" + } +] \ No newline at end of file