From 4fea6dd0302e14c81c3b91501cfa9e2160af09ca Mon Sep 17 00:00:00 2001 From: "DESKTOP-5RP3AKU\\Jisol" <2858626794@qq.com> Date: Mon, 27 Nov 2023 02:10:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=A0=E7=89=A9=E5=8D=87=E6=98=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DataTables/Datas/__tables__.xlsx | Bin 9981 -> 10189 bytes .../assets/resources/config/data/schema.ts | 56 +- .../{tbgrolecup.json => tbgroleuplevel.json} | 0 ...tar.json.meta => tbgroleuplevel.json.meta} | 2 +- .../{tbgrolecstar.json => tbgroleupstar.json} | 0 ...ecup.json.meta => tbgroleupstar.json.meta} | 2 +- .../prefab/ui/宠物/宠物升星页面.prefab | 655 +++++++++++++----- JisolGameCocos/assets/script/consts/API.ts | 4 +- .../assets/script/data/PlayerPetData.ts | 67 ++ .../assets/script/data/ResourceData.ts | 14 +- .../assets/script/ui/Pet/PetUpStarView.ts | 83 ++- JisolGameCocos/extensions/ngame | 2 +- .../{TbGRoleCUp.java => TbGRoleUpLevel.java} | 10 +- .../{TbGRoleCStar.java => TbGRoleUpStar.java} | 10 +- .../Main/src/main/java/cfg/Tables.java | 12 +- .../Main/src/main/java/cfg/TbGRoleCStar.java | 37 - .../Main/src/main/java/cfg/TbGRoleCUp.java | 37 - .../src/main/java/cfg/TbGRoleUpLevel.java | 37 + .../Main/src/main/java/cfg/TbGRoleUpStar.java | 37 + .../controller/game/GPlayerPetController.java | 33 +- .../game/vo/news/ov/ResourceUpdateOV.java | 9 +- .../{tbgrolecup.json => tbgroleuplevel.json} | 0 .../{tbgrolecstar.json => tbgroleupstar.json} | 0 23 files changed, 792 insertions(+), 315 deletions(-) rename JisolGameCocos/assets/resources/config/json/{tbgrolecup.json => tbgroleuplevel.json} (100%) rename JisolGameCocos/assets/resources/config/json/{tbgrolecstar.json.meta => tbgroleuplevel.json.meta} (72%) rename JisolGameCocos/assets/resources/config/json/{tbgrolecstar.json => tbgroleupstar.json} (100%) rename JisolGameCocos/assets/resources/config/json/{tbgrolecup.json.meta => tbgroleupstar.json.meta} (72%) rename JisolGameServer/Main/src/main/java/cfg/TB/{TbGRoleCUp.java => TbGRoleUpLevel.java} (83%) rename JisolGameServer/Main/src/main/java/cfg/TB/{TbGRoleCStar.java => TbGRoleUpStar.java} (79%) delete mode 100644 JisolGameServer/Main/src/main/java/cfg/TbGRoleCStar.java delete mode 100644 JisolGameServer/Main/src/main/java/cfg/TbGRoleCUp.java create mode 100644 JisolGameServer/Main/src/main/java/cfg/TbGRoleUpLevel.java create mode 100644 JisolGameServer/Main/src/main/java/cfg/TbGRoleUpStar.java rename JisolGameServer/Main/src/main/resources/json/{tbgrolecup.json => tbgroleuplevel.json} (100%) rename JisolGameServer/Main/src/main/resources/json/{tbgrolecstar.json => tbgroleupstar.json} (100%) diff --git a/DataTables/Datas/__tables__.xlsx b/DataTables/Datas/__tables__.xlsx index 60c1dcfc1a218d7ade810b2486676f6ae9cf7f6d..e696bca07a9b86e19cd618c9d2cac361fedfebf4 100644 GIT binary patch delta 5733 zcmZ8lbyyVM(k7)@fu$AcT)JJF1?duyl19m0DG7y@Mv&U28(cy{K!lZCI;6WBq#Fqd zKYsV#=YG%k%^!2lGw-}}&L3xH&NH{#1G<%o*myWWTI1EJ*yh-TZxAC?H2SKX$ZH&W zJYQB*79<@mFFc~~V$>jf7~dpR$yUa3bzLXdm3{ zEYAAHR5@MPI)B=n9Ch0?KA!V}{e=LNb-hz6{re1DY#&MSI! zYPi79VR6-C0|?zqiZkTndSLT$<+2PrOFjo*yzb4Tst+oW9ihXSG}I0JODw6nHpD@$ zoG)&_7C+v#o?5%HEgLLhjg%(&$-VmCD7-WilGt4a;vHO*;ikID(mv{3$&qO7{B^h8 znzWZZ`S@3#(A%0}`E_n0o|7+|aywTncI%Ri@1IUwCCm`SGa!BN6!BM^_LU8hO?Vt| zea{T3huurC!lj^Du*vn( z#?W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Level{ + private _dataMap: Map + private _dataList: TB.TbGRoleUpLevel[] constructor(_json_: any) { - this._dataMap = new Map() + this._dataMap = new Map() this._dataList = [] for(var _json2_ of _json_) { - let _v: TB.TbGRoleCUp - _v = new TB.TbGRoleCUp(_json2_) + let _v: TB.TbGRoleUpLevel + _v = new TB.TbGRoleUpLevel(_json2_) this._dataList.push(_v) this._dataMap.set(_v.grade, _v) } } - getDataMap(): Map { return this._dataMap; } - getDataList(): TB.TbGRoleCUp[] { return this._dataList; } + getDataMap(): Map { return this._dataMap; } + getDataList(): TB.TbGRoleUpLevel[] { return this._dataList; } - get(key: number): TB.TbGRoleCUp | undefined { return this._dataMap.get(key); } + get(key: number): TB.TbGRoleUpLevel | undefined { return this._dataMap.get(key); } resolve(tables:Tables) { @@ -749,24 +749,24 @@ export class TbGRoleCUp{ -export class TbGRoleCStar{ - private _dataMap: Map - private _dataList: TB.TbGRoleCStar[] +export class TbGRoleUpStar{ + private _dataMap: Map + private _dataList: TB.TbGRoleUpStar[] constructor(_json_: any) { - this._dataMap = new Map() + this._dataMap = new Map() this._dataList = [] for(var _json2_ of _json_) { - let _v: TB.TbGRoleCStar - _v = new TB.TbGRoleCStar(_json2_) + let _v: TB.TbGRoleUpStar + _v = new TB.TbGRoleUpStar(_json2_) this._dataList.push(_v) this._dataMap.set(_v.grade, _v) } } - getDataMap(): Map { return this._dataMap; } - getDataList(): TB.TbGRoleCStar[] { return this._dataList; } + getDataMap(): Map { return this._dataMap; } + getDataList(): TB.TbGRoleUpStar[] { return this._dataList; } - get(key: number): TB.TbGRoleCStar | undefined { return this._dataMap.get(key); } + get(key: number): TB.TbGRoleUpStar | undefined { return this._dataMap.get(key); } resolve(tables:Tables) { @@ -832,10 +832,10 @@ export class Tables { get TbGOnHookGlobal(): TbGOnHookGlobal { return this._TbGOnHookGlobal;} private _TbGResource: TbGResource get TbGResource(): TbGResource { return this._TbGResource;} - private _TbGRoleCUp: TbGRoleCUp - get TbGRoleCUp(): TbGRoleCUp { return this._TbGRoleCUp;} - private _TbGRoleCStar: TbGRoleCStar - get TbGRoleCStar(): TbGRoleCStar { return this._TbGRoleCStar;} + private _TbGRoleUpLevel: TbGRoleUpLevel + get TbGRoleUpLevel(): TbGRoleUpLevel { return this._TbGRoleUpLevel;} + private _TbGRoleUpStar: TbGRoleUpStar + get TbGRoleUpStar(): TbGRoleUpStar { return this._TbGRoleUpStar;} private _TbSServerInfo: TbSServerInfo get TbSServerInfo(): TbSServerInfo { return this._TbSServerInfo;} @@ -848,8 +848,8 @@ export class Tables { this._TbGMap = new TbGMap(loader('tbgmap')) this._TbGOnHookGlobal = new TbGOnHookGlobal(loader('tbgonhookglobal')) this._TbGResource = new TbGResource(loader('tbgresource')) - this._TbGRoleCUp = new TbGRoleCUp(loader('tbgrolecup')) - this._TbGRoleCStar = new TbGRoleCStar(loader('tbgrolecstar')) + this._TbGRoleUpLevel = new TbGRoleUpLevel(loader('tbgroleuplevel')) + this._TbGRoleUpStar = new TbGRoleUpStar(loader('tbgroleupstar')) this._TbSServerInfo = new TbSServerInfo(loader('tbsserverinfo')) this._TbGGlobal.resolve(this) @@ -860,8 +860,8 @@ export class Tables { this._TbGMap.resolve(this) this._TbGOnHookGlobal.resolve(this) this._TbGResource.resolve(this) - this._TbGRoleCUp.resolve(this) - this._TbGRoleCStar.resolve(this) + this._TbGRoleUpLevel.resolve(this) + this._TbGRoleUpStar.resolve(this) this._TbSServerInfo.resolve(this) } } diff --git a/JisolGameCocos/assets/resources/config/json/tbgrolecup.json b/JisolGameCocos/assets/resources/config/json/tbgroleuplevel.json similarity index 100% rename from JisolGameCocos/assets/resources/config/json/tbgrolecup.json rename to JisolGameCocos/assets/resources/config/json/tbgroleuplevel.json diff --git a/JisolGameCocos/assets/resources/config/json/tbgrolecstar.json.meta b/JisolGameCocos/assets/resources/config/json/tbgroleuplevel.json.meta similarity index 72% rename from JisolGameCocos/assets/resources/config/json/tbgrolecstar.json.meta rename to JisolGameCocos/assets/resources/config/json/tbgroleuplevel.json.meta index ab847f4a..10463c96 100644 --- a/JisolGameCocos/assets/resources/config/json/tbgrolecstar.json.meta +++ b/JisolGameCocos/assets/resources/config/json/tbgroleuplevel.json.meta @@ -2,7 +2,7 @@ "ver": "2.0.1", "importer": "json", "imported": true, - "uuid": "580aaa0b-8b26-4bc6-9abe-6984e9980679", + "uuid": "e973f307-a0ab-478d-85eb-36e1310007a7", "files": [ ".json" ], diff --git a/JisolGameCocos/assets/resources/config/json/tbgrolecstar.json b/JisolGameCocos/assets/resources/config/json/tbgroleupstar.json similarity index 100% rename from JisolGameCocos/assets/resources/config/json/tbgrolecstar.json rename to JisolGameCocos/assets/resources/config/json/tbgroleupstar.json diff --git a/JisolGameCocos/assets/resources/config/json/tbgrolecup.json.meta b/JisolGameCocos/assets/resources/config/json/tbgroleupstar.json.meta similarity index 72% rename from JisolGameCocos/assets/resources/config/json/tbgrolecup.json.meta rename to JisolGameCocos/assets/resources/config/json/tbgroleupstar.json.meta index 714cde23..18c53fde 100644 --- a/JisolGameCocos/assets/resources/config/json/tbgrolecup.json.meta +++ b/JisolGameCocos/assets/resources/config/json/tbgroleupstar.json.meta @@ -2,7 +2,7 @@ "ver": "2.0.1", "importer": "json", "imported": true, - "uuid": "dfe67d28-0f19-440b-ad19-7c1f70b3528b", + "uuid": "02f53704-5e9c-4b95-8ef4-822a6a47882c", "files": [ ".json" ], diff --git a/JisolGameCocos/assets/resources/prefab/ui/宠物/宠物升星页面.prefab b/JisolGameCocos/assets/resources/prefab/ui/宠物/宠物升星页面.prefab index 74659482..c6ea48bc 100644 --- a/JisolGameCocos/assets/resources/prefab/ui/宠物/宠物升星页面.prefab +++ b/JisolGameCocos/assets/resources/prefab/ui/宠物/宠物升星页面.prefab @@ -25,17 +25,17 @@ "_active": true, "_components": [ { - "__id__": 136 + "__id__": 150 }, { - "__id__": 138 + "__id__": 152 }, { - "__id__": 140 + "__id__": 154 } ], "_prefab": { - "__id__": 142 + "__id__": 156 }, "_lpos": { "__type__": "cc.Vec3", @@ -79,29 +79,29 @@ "__id__": 3 }, { - "__id__": 49 + "__id__": 63 }, { - "__id__": 93 + "__id__": 107 }, { - "__id__": 110 + "__id__": 124 } ], "_active": true, "_components": [ { - "__id__": 129 + "__id__": 143 }, { - "__id__": 131 + "__id__": 145 }, { - "__id__": 133 + "__id__": 147 } ], "_prefab": { - "__id__": 135 + "__id__": 149 }, "_lpos": { "__type__": "cc.Vec3", @@ -152,22 +152,25 @@ }, { "__id__": 34 + }, + { + "__id__": 48 } ], "_active": true, "_components": [ { - "__id__": 42 + "__id__": 56 }, { - "__id__": 44 + "__id__": 58 }, { - "__id__": 46 + "__id__": 60 } ], "_prefab": { - "__id__": 48 + "__id__": 62 }, "_lpos": { "__type__": "cc.Vec3", @@ -530,7 +533,7 @@ }, { "__type__": "cc.Node", - "_name": "ProgressBar", + "_name": "预览经验条", "_objFlags": 0, "__editorExtras__": {}, "_parent": { @@ -649,7 +652,312 @@ }, "_contentSize": { "__type__": "cc.Size", - "width": 150, + "width": 0, + "height": 15 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "04yn5gdT9H6prns8f4vtwT" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 21 + }, + "_enabled": true, + "__prefab": { + "__id__": 25 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 155, + "g": 155, + "b": 155, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "24a704da-2867-446d-8d1a-5e920c75e09d@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 1, + "_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": "15K5on3ZtM2I259jz/+Jfk" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "d2XY0P79pJm4Lb7uwM7V48", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 20 + }, + "_enabled": true, + "__prefab": { + "__id__": 28 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 300, + "height": 15 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "8emMnBU4BNTKGMmkrl1j68" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 20 + }, + "_enabled": true, + "__prefab": { + "__id__": 30 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "9fd900dd-221b-4f89-8f2c-fba34243c835@f9941", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 1, + "_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": "37deaMph1MKbayEDbE7t2P" + }, + { + "__type__": "54eabRpC7dM+4sLiGfqzWWw", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 20 + }, + "_enabled": true, + "__prefab": { + "__id__": 32 + }, + "_barSprite": { + "__id__": 24 + }, + "_mode": 0, + "_totalLength": 300, + "_progress": 0, + "_reverse": false, + "scaleTime": 4, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "5cKp3l3TpL0r+Ic0Q2WfsL" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "52IYN/Qg9Ee4V7+NOQ2KLP", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.Node", + "_name": "经验条", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 3 + }, + "_children": [ + { + "__id__": 35 + } + ], + "_active": true, + "_components": [ + { + "__id__": 41 + }, + { + "__id__": 43 + }, + { + "__id__": 45 + } + ], + "_prefab": { + "__id__": 47 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 68.52, + "y": -2.96, + "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.Node", + "_name": "Bar", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 34 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 36 + }, + { + "__id__": 38 + } + ], + "_prefab": { + "__id__": 40 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": -150, + "y": 0, + "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__": 35 + }, + "_enabled": true, + "__prefab": { + "__id__": 37 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, "height": 15 }, "_anchorPoint": { @@ -669,11 +977,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 21 + "__id__": 35 }, "_enabled": true, "__prefab": { - "__id__": 25 + "__id__": 39 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -727,11 +1035,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 20 + "__id__": 34 }, "_enabled": true, "__prefab": { - "__id__": 28 + "__id__": 42 }, "_contentSize": { "__type__": "cc.Size", @@ -755,11 +1063,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 20 + "__id__": 34 }, - "_enabled": true, + "_enabled": false, "__prefab": { - "__id__": 30 + "__id__": 44 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -795,29 +1103,30 @@ "fileId": "31S5WlPTZLfZ1l6g1cuWzA" }, { - "__type__": "cc.ProgressBar", + "__type__": "54eabRpC7dM+4sLiGfqzWWw", "_name": "", "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 20 + "__id__": 34 }, "_enabled": true, "__prefab": { - "__id__": 32 + "__id__": 46 }, "_barSprite": { - "__id__": 24 + "__id__": 38 }, "_mode": 0, "_totalLength": 300, - "_progress": 0.5, + "_progress": 0, "_reverse": false, + "scaleTime": 4, "_id": "" }, { "__type__": "cc.CompPrefabInfo", - "fileId": "bcRbGiZW5D/KadPYIUhJVb" + "fileId": "bdjL6Ut35JS6lQS7QzcUJp" }, { "__type__": "cc.PrefabInfo", @@ -844,17 +1153,17 @@ "_active": true, "_components": [ { - "__id__": 35 + "__id__": 49 }, { - "__id__": 37 + "__id__": 51 }, { - "__id__": 39 + "__id__": 53 } ], "_prefab": { - "__id__": 41 + "__id__": 55 }, "_lpos": { "__type__": "cc.Vec3", @@ -891,11 +1200,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 34 + "__id__": 48 }, "_enabled": true, "__prefab": { - "__id__": 36 + "__id__": 50 }, "_contentSize": { "__type__": "cc.Size", @@ -919,11 +1228,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 34 + "__id__": 48 }, "_enabled": true, "__prefab": { - "__id__": 38 + "__id__": 52 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -964,11 +1273,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 34 + "__id__": 48 }, "_enabled": true, "__prefab": { - "__id__": 40 + "__id__": 54 }, "_color": { "__type__": "cc.Color", @@ -1007,7 +1316,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 43 + "__id__": 57 }, "_contentSize": { "__type__": "cc.Size", @@ -1035,7 +1344,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 45 + "__id__": 59 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -1080,7 +1389,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 47 + "__id__": 61 }, "_alignFlags": 41, "_target": null, @@ -1129,29 +1438,29 @@ }, "_children": [ { - "__id__": 50 + "__id__": 64 }, { - "__id__": 68 + "__id__": 82 } ], "_active": true, "_components": [ { - "__id__": 86 + "__id__": 100 }, { - "__id__": 88 + "__id__": 102 }, { - "__id__": 90 + "__id__": 104 }, { - "__id__": 65 + "__id__": 79 } ], "_prefab": { - "__id__": 92 + "__id__": 106 }, "_lpos": { "__type__": "cc.Vec3", @@ -1188,30 +1497,30 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 49 + "__id__": 63 }, "_children": [ { - "__id__": 51 + "__id__": 65 } ], "_active": true, "_components": [ { - "__id__": 57 + "__id__": 71 }, { - "__id__": 59 + "__id__": 73 }, { - "__id__": 61 + "__id__": 75 }, { - "__id__": 63 + "__id__": 77 } ], "_prefab": { - "__id__": 85 + "__id__": 99 }, "_lpos": { "__type__": "cc.Vec3", @@ -1248,20 +1557,20 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 50 + "__id__": 64 }, "_children": [], "_active": true, "_components": [ { - "__id__": 52 + "__id__": 66 }, { - "__id__": 54 + "__id__": 68 } ], "_prefab": { - "__id__": 56 + "__id__": 70 }, "_lpos": { "__type__": "cc.Vec3", @@ -1298,11 +1607,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 51 + "__id__": 65 }, "_enabled": true, "__prefab": { - "__id__": 53 + "__id__": 67 }, "_contentSize": { "__type__": "cc.Size", @@ -1326,11 +1635,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 51 + "__id__": 65 }, "_enabled": true, "__prefab": { - "__id__": 55 + "__id__": 69 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -1384,11 +1693,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 50 + "__id__": 64 }, "_enabled": true, "__prefab": { - "__id__": 58 + "__id__": 72 }, "_contentSize": { "__type__": "cc.Size", @@ -1412,11 +1721,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 50 + "__id__": 64 }, "_enabled": true, "__prefab": { - "__id__": 60 + "__id__": 74 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -1457,11 +1766,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 50 + "__id__": 64 }, "_enabled": true, "__prefab": { - "__id__": 62 + "__id__": 76 }, "_alignFlags": 37, "_target": null, @@ -1493,17 +1802,17 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 50 + "__id__": 64 }, "_enabled": true, "__prefab": { - "__id__": 64 + "__id__": 78 }, "_scrollView": { - "__id__": 65 + "__id__": 79 }, "_handle": { - "__id__": 54 + "__id__": 68 }, "_direction": 1, "_enableAutoHide": false, @@ -1520,11 +1829,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 49 + "__id__": 63 }, "_enabled": true, "__prefab": { - "__id__": 66 + "__id__": 80 }, "bounceDuration": 0.23, "brake": 0.75, @@ -1535,11 +1844,11 @@ "cancelInnerEvents": true, "scrollEvents": [], "_content": { - "__id__": 67 + "__id__": 81 }, "_horizontalScrollBar": null, "_verticalScrollBar": { - "__id__": 63 + "__id__": 77 }, "itemPrefab": { "__uuid__": "fc8eb7b6-f756-49f4-9102-ac3cca3a20ae", @@ -1557,23 +1866,23 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 68 + "__id__": 82 }, "_children": [], "_active": true, "_components": [ { - "__id__": 78 + "__id__": 92 }, { - "__id__": 80 + "__id__": 94 }, { - "__id__": 82 + "__id__": 96 } ], "_prefab": { - "__id__": 84 + "__id__": 98 }, "_lpos": { "__type__": "cc.Vec3", @@ -1610,30 +1919,30 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 49 + "__id__": 63 }, "_children": [ { - "__id__": 67 + "__id__": 81 } ], "_active": true, "_components": [ { - "__id__": 69 + "__id__": 83 }, { - "__id__": 71 + "__id__": 85 }, { - "__id__": 73 + "__id__": 87 }, { - "__id__": 75 + "__id__": 89 } ], "_prefab": { - "__id__": 77 + "__id__": 91 }, "_lpos": { "__type__": "cc.Vec3", @@ -1670,11 +1979,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 68 + "__id__": 82 }, "_enabled": true, "__prefab": { - "__id__": 70 + "__id__": 84 }, "_contentSize": { "__type__": "cc.Size", @@ -1698,11 +2007,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 68 + "__id__": 82 }, "_enabled": true, "__prefab": { - "__id__": 72 + "__id__": 86 }, "_type": 0, "_inverted": false, @@ -1720,11 +2029,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 68 + "__id__": 82 }, "_enabled": true, "__prefab": { - "__id__": 74 + "__id__": 88 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -1766,11 +2075,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 68 + "__id__": 82 }, "_enabled": true, "__prefab": { - "__id__": 76 + "__id__": 90 }, "_alignFlags": 45, "_target": null, @@ -1815,11 +2124,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 67 + "__id__": 81 }, "_enabled": true, "__prefab": { - "__id__": 79 + "__id__": 93 }, "_contentSize": { "__type__": "cc.Size", @@ -1843,11 +2152,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 67 + "__id__": 81 }, "_enabled": true, "__prefab": { - "__id__": 81 + "__id__": 95 }, "_resizeMode": 1, "_layoutType": 3, @@ -1881,11 +2190,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 67 + "__id__": 81 }, "_enabled": true, "__prefab": { - "__id__": 83 + "__id__": 97 }, "_alignFlags": 40, "_target": null, @@ -1943,11 +2252,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 49 + "__id__": 63 }, "_enabled": true, "__prefab": { - "__id__": 87 + "__id__": 101 }, "_contentSize": { "__type__": "cc.Size", @@ -1971,11 +2280,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 49 + "__id__": 63 }, "_enabled": true, "__prefab": { - "__id__": 89 + "__id__": 103 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -2016,11 +2325,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 49 + "__id__": 63 }, "_enabled": true, "__prefab": { - "__id__": 91 + "__id__": 105 }, "_alignFlags": 45, "_target": null, @@ -2069,23 +2378,23 @@ }, "_children": [ { - "__id__": 94 + "__id__": 108 } ], "_active": true, "_components": [ { - "__id__": 102 + "__id__": 116 }, { - "__id__": 104 + "__id__": 118 }, { - "__id__": 106 + "__id__": 120 } ], "_prefab": { - "__id__": 109 + "__id__": 123 }, "_lpos": { "__type__": "cc.Vec3", @@ -2122,23 +2431,23 @@ "_objFlags": 512, "__editorExtras__": {}, "_parent": { - "__id__": 93 + "__id__": 107 }, "_children": [], "_active": true, "_components": [ { - "__id__": 95 + "__id__": 109 }, { - "__id__": 97 + "__id__": 111 }, { - "__id__": 99 + "__id__": 113 } ], "_prefab": { - "__id__": 101 + "__id__": 115 }, "_lpos": { "__type__": "cc.Vec3", @@ -2175,11 +2484,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 94 + "__id__": 108 }, "_enabled": true, "__prefab": { - "__id__": 96 + "__id__": 110 }, "_contentSize": { "__type__": "cc.Size", @@ -2203,11 +2512,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 94 + "__id__": 108 }, "_enabled": true, "__prefab": { - "__id__": 98 + "__id__": 112 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -2248,11 +2557,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 94 + "__id__": 108 }, "_enabled": true, "__prefab": { - "__id__": 100 + "__id__": 114 }, "_color": { "__type__": "cc.Color", @@ -2287,11 +2596,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 93 + "__id__": 107 }, "_enabled": true, "__prefab": { - "__id__": 103 + "__id__": 117 }, "_contentSize": { "__type__": "cc.Size", @@ -2315,11 +2624,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 93 + "__id__": 107 }, "_enabled": true, "__prefab": { - "__id__": 105 + "__id__": 119 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -2360,15 +2669,15 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 93 + "__id__": 107 }, "_enabled": true, "__prefab": { - "__id__": 107 + "__id__": 121 }, "clickEvents": [ { - "__id__": 108 + "__id__": 122 } ], "_interactable": true, @@ -2420,7 +2729,7 @@ "_duration": 0.1, "_zoomScale": 1.2, "_target": { - "__id__": 93 + "__id__": 107 }, "_id": "" }, @@ -2461,26 +2770,26 @@ }, "_children": [ { - "__id__": 111 + "__id__": 125 } ], "_active": true, "_components": [ { - "__id__": 119 + "__id__": 133 }, { - "__id__": 121 + "__id__": 135 }, { - "__id__": 123 + "__id__": 137 }, { - "__id__": 126 + "__id__": 140 } ], "_prefab": { - "__id__": 128 + "__id__": 142 }, "_lpos": { "__type__": "cc.Vec3", @@ -2517,23 +2826,23 @@ "_objFlags": 512, "__editorExtras__": {}, "_parent": { - "__id__": 110 + "__id__": 124 }, "_children": [], "_active": true, "_components": [ { - "__id__": 112 + "__id__": 126 }, { - "__id__": 114 + "__id__": 128 }, { - "__id__": 116 + "__id__": 130 } ], "_prefab": { - "__id__": 118 + "__id__": 132 }, "_lpos": { "__type__": "cc.Vec3", @@ -2570,11 +2879,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 111 + "__id__": 125 }, "_enabled": true, "__prefab": { - "__id__": 113 + "__id__": 127 }, "_contentSize": { "__type__": "cc.Size", @@ -2598,11 +2907,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 111 + "__id__": 125 }, "_enabled": true, "__prefab": { - "__id__": 115 + "__id__": 129 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -2643,11 +2952,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 111 + "__id__": 125 }, "_enabled": true, "__prefab": { - "__id__": 117 + "__id__": 131 }, "_color": { "__type__": "cc.Color", @@ -2682,11 +2991,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 110 + "__id__": 124 }, "_enabled": true, "__prefab": { - "__id__": 120 + "__id__": 134 }, "_contentSize": { "__type__": "cc.Size", @@ -2710,11 +3019,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 110 + "__id__": 124 }, "_enabled": true, "__prefab": { - "__id__": 122 + "__id__": 136 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -2755,15 +3064,15 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 110 + "__id__": 124 }, "_enabled": true, "__prefab": { - "__id__": 124 + "__id__": 138 }, "clickEvents": [ { - "__id__": 125 + "__id__": 139 } ], "_interactable": true, @@ -2815,7 +3124,7 @@ "_duration": 0.1, "_zoomScale": 1.2, "_target": { - "__id__": 110 + "__id__": 124 }, "_id": "" }, @@ -2839,11 +3148,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 110 + "__id__": 124 }, "_enabled": true, "__prefab": { - "__id__": 127 + "__id__": 141 }, "_alignFlags": 32, "_target": null, @@ -2892,7 +3201,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 130 + "__id__": 144 }, "_contentSize": { "__type__": "cc.Size", @@ -2920,7 +3229,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 132 + "__id__": 146 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -2965,7 +3274,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 134 + "__id__": 148 }, "_id": "" }, @@ -2996,7 +3305,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 137 + "__id__": 151 }, "_contentSize": { "__type__": "cc.Size", @@ -3024,7 +3333,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 139 + "__id__": 153 }, "_alignFlags": 45, "_target": null, @@ -3060,23 +3369,29 @@ }, "_enabled": true, "__prefab": { - "__id__": 141 + "__id__": 155 }, "mask": true, "maskOpcity": 80, "isClickMaskeClose": true, "views": { - "__id__": 65 + "__id__": 79 }, "petNameLabel": { "__id__": 7 }, "petStar": { - "__id__": 37 + "__id__": 51 }, "petStarExp": { "__id__": 15 }, + "petExpProgress": { + "__id__": 45 + }, + "viewPetExpProgress": { + "__id__": 31 + }, "_id": "" }, { diff --git a/JisolGameCocos/assets/script/consts/API.ts b/JisolGameCocos/assets/script/consts/API.ts index 34eefc6f..d1e21951 100644 --- a/JisolGameCocos/assets/script/consts/API.ts +++ b/JisolGameCocos/assets/script/consts/API.ts @@ -1,4 +1,5 @@ import { app } from "../App"; +import PlayerPetData from "../data/PlayerPetData"; import ResourceData from "../data/ResourceData"; import { GUI } from "../ui/UIConfig"; @@ -9,7 +10,8 @@ export const RData = (data:any,isTips:boolean = true) => { if(data.data['resources']){ //刷新资源 data.data['resources'].forEach(res => { - ResourceData.getIns().onUpdateOV(res.operation,res.resource); + ResourceData.getIns().onUpdateOV(res.operation,res.resource); //刷新资源 + PlayerPetData.getIns().onUpdateOV(res.operation,res.pet); //刷新宠物 }) } return data.data.data; diff --git a/JisolGameCocos/assets/script/data/PlayerPetData.ts b/JisolGameCocos/assets/script/data/PlayerPetData.ts index 0712a805..3eb6b0ec 100644 --- a/JisolGameCocos/assets/script/data/PlayerPetData.ts +++ b/JisolGameCocos/assets/script/data/PlayerPetData.ts @@ -1,6 +1,15 @@ +import { app } from "../App"; import { API, PlayerInfoOV, PlayerPetOV } from "../consts/API"; import BaseData from "./BaseData"; +import PlayerTacticalData from "./PlayerTacticalData"; +import { ResourceUpdateType } from "./ResourceData"; +export enum PlayerPetEvent{ + UPDATE = "PlayerPetEvent_UPDATE", //刷新宠物 + UPDATE_INFO = "PlayerPetEvent_UPDATE_INFO", //刷新宠物信息 + UPDATE_ADD = "PlayerPetEvent_UPDATE_ADD", //添加宠物 + UPDATE_MINUS = "PlayerPetEvent_UPDATE_MINUS", //减少宠物 +} //玩家宠物数据 export default class PlayerPetData extends BaseData{ @@ -20,6 +29,16 @@ export default class PlayerPetData extends BaseData{ return this.datas; } + //获取指定宠物 + getPetIdData(petTbId:number,datas:PlayerPetOV[] = this.datas):PlayerPetOV[]{ + return datas.filter(data => data.petTbId == petTbId); + } + + //获取未上阵的宠物 + getNoTacticalData():PlayerPetOV[]{ + return this.datas.filter(data => PlayerTacticalData.getIns().getTacticalInfo().indexOf(data.petId) < 0); + } + //更新玩家宠物 async UpdatePlayerPet(){ //获取全部宠物 @@ -43,6 +62,54 @@ export default class PlayerPetData extends BaseData{ this.datas.push(pet); } + //刷新返回宠物 + onUpdateOV(operation:number,resource:PlayerPetOV){ + + //如果没有刷新的宠物 则 返回 + if(!resource) return; + + if(operation == ResourceUpdateType.UPDATE){ + //更新资源 + //找到需要被刷新的宠物 然后刷新 找不到则添加 + let pet = this.datas.filter(pet => pet.petId == resource.petId)[0]; + if(pet){ + //更新数据 + Object.assign(pet,resource); + app.event.emit(PlayerPetEvent.UPDATE_INFO) + }else{ + operation = ResourceUpdateType.ADD; + this.onUpdateOV(operation,resource); + } + }else if(operation == ResourceUpdateType.ADD){ + //查询如果没有这个宠物则添加 负责 刷新 + let pet = this.datas.filter(pet => pet.petId != resource.petId)[0]; + if(!pet){ + //没有则添加 + this.datas.push(resource); + app.event.emit(PlayerPetEvent.UPDATE) + app.event.emit(PlayerPetEvent.UPDATE_ADD,pet) + }else{ + operation = ResourceUpdateType.UPDATE; + this.onUpdateOV(operation,resource); + } + }else if(operation == ResourceUpdateType.MINUS){ + + //删除的宠物 + let delPet; + //删除指定的宠物 + this.datas = this.datas.filter(pet => { + if(pet.petId == resource.petId){ + delPet = pet; + return false; + } + return true; + }); + app.event.emit(PlayerPetEvent.UPDATE) + delPet && app.event.emit(PlayerPetEvent.UPDATE_MINUS,delPet) + + } + + } } diff --git a/JisolGameCocos/assets/script/data/ResourceData.ts b/JisolGameCocos/assets/script/data/ResourceData.ts index bc2d6820..6e50cfc4 100644 --- a/JisolGameCocos/assets/script/data/ResourceData.ts +++ b/JisolGameCocos/assets/script/data/ResourceData.ts @@ -11,6 +11,13 @@ export enum ResourceType{ Gold = 90001, //金币 } +//资源刷新类型 +export enum ResourceUpdateType{ + UPDATE = 0, //刷新资源数量 + MINUS = 1, //减少资源数量 + ADD = 2, //添加资源数量 +} + //玩家资源数据 export default class ResourceData extends BaseData{ @@ -43,12 +50,15 @@ export default class ResourceData extends BaseData{ //刷新返回资源 onUpdateOV(operation:number,resource:ResourceOV){ - if(operation == 0){ + //如果没有刷新的资源 则 返回 + if(!resource) return; + + if(operation == ResourceUpdateType.UPDATE){ //更新资源 this.data[resource.resourceTbId] = resource.resourceValue; + app.event.emit(ResourceEvent.UPDATE) } - app.event.emit(ResourceEvent.UPDATE) } diff --git a/JisolGameCocos/assets/script/ui/Pet/PetUpStarView.ts b/JisolGameCocos/assets/script/ui/Pet/PetUpStarView.ts index 5379850a..50cd98bc 100644 --- a/JisolGameCocos/assets/script/ui/Pet/PetUpStarView.ts +++ b/JisolGameCocos/assets/script/ui/Pet/PetUpStarView.ts @@ -1,7 +1,7 @@ import { _decorator, Component, Node } from 'cc'; import JNLayerBase from '../../../../extensions/ngame/assets/ngame/ui/base/JNLayerBase'; import JNScrollView from '../../../../extensions/ngame/assets/ngame/util/components/scrollview/JNScrollView'; -import PlayerPetData from '../../data/PlayerPetData'; +import PlayerPetData, { PlayerPetEvent } from '../../data/PlayerPetData'; import { API, PlayerPetOV } from '../../consts/API'; import { PetOV, PlayerPetOVSelect } from '../VO/PetOV'; import { PetIconSelectScroll } from '../Consts/Pet/PetIconSelectScroll'; @@ -9,6 +9,8 @@ import { NodeEventType } from 'cc'; import { Label } from 'cc'; import { app, TD } from '../../App'; import { GUI } from '../UIConfig'; +import { ProgressBar } from 'cc'; +import JProgressBar from '../../../../extensions/ngame/assets/ngame/util/components/Progress/JProgressBar'; const { ccclass, property } = _decorator; @ccclass('PetUpStarView') @@ -23,9 +25,10 @@ export class PetUpStarView extends JNLayerBase { petStar:Label; //宠物星级 @property(Label) petStarExp:Label; //宠物星级经验 - - //宠物数据 - pets:PlayerPetOVSelect[] = []; + @property(JProgressBar) + petExpProgress:JProgressBar; //宠物经验条 + @property(JProgressBar) + viewPetExpProgress:JProgressBar; //预览宠物经验条 data:PlayerPetOV; @@ -35,6 +38,16 @@ export class PetUpStarView extends JNLayerBase { this.data = data; this.onUpdateView(); + //监听 + app.event.on(PlayerPetEvent.UPDATE_INFO,this.onUpdateInfo,this); //刷新宠物信息 + app.event.on(PlayerPetEvent.UPDATE_MINUS,this.onPetMinus,this); //减少宠物 + + } + + onJNClose(): void { + //取消监听 + app.event.off(PlayerPetEvent.UPDATE_INFO,this.onUpdateInfo,this); //刷新宠物信息 + app.event.off(PlayerPetEvent.UPDATE_MINUS,this.onPetMinus,this); //减少宠物 } @@ -43,9 +56,14 @@ export class PetUpStarView extends JNLayerBase { this.onUpdateInfo(); - //获取所有玩家宠物 - this.pets = PetOV.PlayerPetOVSelects(PlayerPetData.getIns().getData()); - this.views.refreshData(this.pets); + //当前需要升星的宠物并且未上阵 并且排除自己 + let pets = PetOV.PlayerPetOVSelects( + PlayerPetData.getIns().getPetIdData( + this.data.petTbId, //同一种宠物 + PlayerPetData.getIns().getNoTacticalData() //非上阵宠物 + ).filter(pet => pet.petId != this.data.petId) //排除自己 + ); + this.views.refreshData(pets); //向子节点添加点击事件 this.views.addItemEvent(NodeEventType.TOUCH_START,this.onClickItem.bind(this)); @@ -60,10 +78,21 @@ export class PetUpStarView extends JNLayerBase { //显示宠物名称 this.petNameLabel.string = TD.TbGRole.get(this.data.petTbId).roleName; this.petStar.string = `当前星级: ${this.data.petStar} 星`; - this.petStarExp.string = `升级所需经验 / ${this.data.petStarExp}`; + + let upStarExp = TD.TbGRoleUpStar.get(this.data.petStar + 1).merge; + this.petStarExp.string = `升级进度: ${upStarExp} / ${this.data.petStarExp}`; + this.petExpProgress.value = (this.data.petStarExp / upStarExp); } + //减少宠物 + onPetMinus(pet:PlayerPetOV){ + this.views.getItems().forEach(item => { + if(item.data.petId == pet.petId) + this.views.delData(item.data); + }); + } + //刷新选择 onUpdateSelect(){ @@ -73,31 +102,55 @@ export class PetUpStarView extends JNLayerBase { item.select.isSelect = data.isSelect; }) + this.onUpdatePreview(); + + } + + //更新预览进度条 + onUpdatePreview(){ + + //选择得到的经验 + let exp = this.views.getItems().filter(item => item.select.isSelect).length; + + let upStarExp; + let petStarExp = this.data.petStarExp + exp; + let petStar = this.data.petStar; + + while(petStarExp >= (upStarExp = TD.TbGRoleUpStar.get(petStar + 1).merge)){ + petStar++; + petStarExp = Math.floor(petStarExp - upStarExp); + } + + this.petStar.string = `当前星级: ${petStar} 星`; + this.petStarExp.string = `升级进度: ${upStarExp} / ${petStarExp}`; + //预览进度 + this.viewPetExpProgress.value = (petStarExp / upStarExp); + } //选择全部 onClickAll(){ + let pets = this.views.getData(); //如果全部选择则全部取消 - if(this.pets.filter(pet => pet.isSelect).length == this.pets.length){ - this.pets.forEach(pet => pet.isSelect = false); + if(pets.filter(pet => pet.isSelect).length == pets.length){ + pets.forEach(pet => pet.isSelect = false); }else{ - this.pets.forEach(pet => pet.isSelect = true); + pets.forEach(pet => pet.isSelect = true); } this.onUpdateSelect(); } //点击Item onClickItem(index:number){ - - this.pets[index].isSelect = !this.pets[index].isSelect; + let pets = this.views.getData(); + pets[index].isSelect = !pets[index].isSelect; this.onUpdateSelect(); - } //点击合成 async onClickUp(){ //获取被合成的Id - let pets = this.pets.filter(pet => pet.isSelect).map(pet => pet.petId); + let pets = this.views.getData().filter(pet => pet.isSelect).map(pet => pet.petId); if(pets.length <= 0){ app.layer.Open(GUI.Tips,{text:"请选择需要被合成的宠物"}); diff --git a/JisolGameCocos/extensions/ngame b/JisolGameCocos/extensions/ngame index 0ac0cc67..8c270e5f 160000 --- a/JisolGameCocos/extensions/ngame +++ b/JisolGameCocos/extensions/ngame @@ -1 +1 @@ -Subproject commit 0ac0cc67b0cd8bd70fa3c9ead11fee366a6d7d68 +Subproject commit 8c270e5f8d9df4b531c5c102a43c1a66c85e2e53 diff --git a/JisolGameServer/Main/src/main/java/cfg/TB/TbGRoleCUp.java b/JisolGameServer/Main/src/main/java/cfg/TB/TbGRoleUpLevel.java similarity index 83% rename from JisolGameServer/Main/src/main/java/cfg/TB/TbGRoleCUp.java rename to JisolGameServer/Main/src/main/java/cfg/TB/TbGRoleUpLevel.java index 82d0d9f7..df1241a9 100644 --- a/JisolGameServer/Main/src/main/java/cfg/TB/TbGRoleCUp.java +++ b/JisolGameServer/Main/src/main/java/cfg/TB/TbGRoleUpLevel.java @@ -14,14 +14,14 @@ import com.google.gson.JsonElement; import com.google.gson.JsonObject; -public final class TbGRoleCUp extends AbstractBean { - public TbGRoleCUp(JsonObject _buf) { +public final class TbGRoleUpLevel extends AbstractBean { + public TbGRoleUpLevel(JsonObject _buf) { grade = _buf.get("grade").getAsInt(); { com.google.gson.JsonArray _json0_ = _buf.get("materials").getAsJsonArray(); int __n0 = _json0_.size(); materials = new cfg.TbGEntity.Resource[__n0]; int __index0=0; for(JsonElement __e0 : _json0_) { cfg.TbGEntity.Resource __v0; __v0 = cfg.TbGEntity.Resource.deserialize(__e0.getAsJsonObject()); materials[__index0++] = __v0; } } } - public static TbGRoleCUp deserialize(JsonObject _buf) { - return new cfg.TB.TbGRoleCUp(_buf); + public static TbGRoleUpLevel deserialize(JsonObject _buf) { + return new cfg.TB.TbGRoleUpLevel(_buf); } /** @@ -33,7 +33,7 @@ public final class TbGRoleCUp extends AbstractBean { */ public final cfg.TbGEntity.Resource[] materials; - public static final int __ID__ = 1860940751; + public static final int __ID__ = -877225318; @Override public int getTypeId() { return __ID__; } diff --git a/JisolGameServer/Main/src/main/java/cfg/TB/TbGRoleCStar.java b/JisolGameServer/Main/src/main/java/cfg/TB/TbGRoleUpStar.java similarity index 79% rename from JisolGameServer/Main/src/main/java/cfg/TB/TbGRoleCStar.java rename to JisolGameServer/Main/src/main/java/cfg/TB/TbGRoleUpStar.java index b3f6ff02..bcbd2ab8 100644 --- a/JisolGameServer/Main/src/main/java/cfg/TB/TbGRoleCStar.java +++ b/JisolGameServer/Main/src/main/java/cfg/TB/TbGRoleUpStar.java @@ -14,14 +14,14 @@ import com.google.gson.JsonElement; import com.google.gson.JsonObject; -public final class TbGRoleCStar extends AbstractBean { - public TbGRoleCStar(JsonObject _buf) { +public final class TbGRoleUpStar extends AbstractBean { + public TbGRoleUpStar(JsonObject _buf) { grade = _buf.get("grade").getAsInt(); merge = _buf.get("merge").getAsInt(); } - public static TbGRoleCStar deserialize(JsonObject _buf) { - return new cfg.TB.TbGRoleCStar(_buf); + public static TbGRoleUpStar deserialize(JsonObject _buf) { + return new cfg.TB.TbGRoleUpStar(_buf); } /** @@ -33,7 +33,7 @@ public final class TbGRoleCStar extends AbstractBean { */ public final int merge; - public static final int __ID__ = 1657613958; + public static final int __ID__ = 387566716; @Override public int getTypeId() { return __ID__; } diff --git a/JisolGameServer/Main/src/main/java/cfg/Tables.java b/JisolGameServer/Main/src/main/java/cfg/Tables.java index bdf6fb68..e5e0bb64 100644 --- a/JisolGameServer/Main/src/main/java/cfg/Tables.java +++ b/JisolGameServer/Main/src/main/java/cfg/Tables.java @@ -35,10 +35,10 @@ public final class Tables public cfg.TbGOnHookGlobal getTbGOnHookGlobal() { return _tbgonhookglobal; } private final cfg.TbGResource _tbgresource; public cfg.TbGResource getTbGResource() { return _tbgresource; } - private final cfg.TbGRoleCUp _tbgrolecup; - public cfg.TbGRoleCUp getTbGRoleCUp() { return _tbgrolecup; } - private final cfg.TbGRoleCStar _tbgrolecstar; - public cfg.TbGRoleCStar getTbGRoleCStar() { return _tbgrolecstar; } + private final cfg.TbGRoleUpLevel _tbgroleuplevel; + public cfg.TbGRoleUpLevel getTbGRoleUpLevel() { return _tbgroleuplevel; } + private final cfg.TbGRoleUpStar _tbgroleupstar; + public cfg.TbGRoleUpStar getTbGRoleUpStar() { return _tbgroleupstar; } private final cfg.TbSServerInfo _tbsserverinfo; public cfg.TbSServerInfo getTbSServerInfo() { return _tbsserverinfo; } @@ -51,8 +51,8 @@ public final class Tables _tbgmap = new cfg.TbGMap(loader.load("tbgmap")); _tbgonhookglobal = new cfg.TbGOnHookGlobal(loader.load("tbgonhookglobal")); _tbgresource = new cfg.TbGResource(loader.load("tbgresource")); - _tbgrolecup = new cfg.TbGRoleCUp(loader.load("tbgrolecup")); - _tbgrolecstar = new cfg.TbGRoleCStar(loader.load("tbgrolecstar")); + _tbgroleuplevel = new cfg.TbGRoleUpLevel(loader.load("tbgroleuplevel")); + _tbgroleupstar = new cfg.TbGRoleUpStar(loader.load("tbgroleupstar")); _tbsserverinfo = new cfg.TbSServerInfo(loader.load("tbsserverinfo")); } } diff --git a/JisolGameServer/Main/src/main/java/cfg/TbGRoleCStar.java b/JisolGameServer/Main/src/main/java/cfg/TbGRoleCStar.java deleted file mode 100644 index b1e89aff..00000000 --- a/JisolGameServer/Main/src/main/java/cfg/TbGRoleCStar.java +++ /dev/null @@ -1,37 +0,0 @@ - -//------------------------------------------------------------------------------ -// -// 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 TbGRoleCStar { - private final java.util.HashMap _dataMap; - private final java.util.ArrayList _dataList; - - public TbGRoleCStar(JsonElement _buf) { - _dataMap = new java.util.HashMap(); - _dataList = new java.util.ArrayList(); - - for (com.google.gson.JsonElement _e_ : _buf.getAsJsonArray()) { - cfg.TB.TbGRoleCStar _v; - _v = cfg.TB.TbGRoleCStar.deserialize(_e_.getAsJsonObject()); - _dataList.add(_v); - _dataMap.put(_v.grade, _v); - } - } - - public java.util.HashMap getDataMap() { return _dataMap; } - public java.util.ArrayList getDataList() { return _dataList; } - - public cfg.TB.TbGRoleCStar get(int key) { return _dataMap.get(key); } - -} diff --git a/JisolGameServer/Main/src/main/java/cfg/TbGRoleCUp.java b/JisolGameServer/Main/src/main/java/cfg/TbGRoleCUp.java deleted file mode 100644 index 8b29753e..00000000 --- a/JisolGameServer/Main/src/main/java/cfg/TbGRoleCUp.java +++ /dev/null @@ -1,37 +0,0 @@ - -//------------------------------------------------------------------------------ -// -// 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 TbGRoleCUp { - private final java.util.HashMap _dataMap; - private final java.util.ArrayList _dataList; - - public TbGRoleCUp(JsonElement _buf) { - _dataMap = new java.util.HashMap(); - _dataList = new java.util.ArrayList(); - - for (com.google.gson.JsonElement _e_ : _buf.getAsJsonArray()) { - cfg.TB.TbGRoleCUp _v; - _v = cfg.TB.TbGRoleCUp.deserialize(_e_.getAsJsonObject()); - _dataList.add(_v); - _dataMap.put(_v.grade, _v); - } - } - - public java.util.HashMap getDataMap() { return _dataMap; } - public java.util.ArrayList getDataList() { return _dataList; } - - public cfg.TB.TbGRoleCUp get(int key) { return _dataMap.get(key); } - -} diff --git a/JisolGameServer/Main/src/main/java/cfg/TbGRoleUpLevel.java b/JisolGameServer/Main/src/main/java/cfg/TbGRoleUpLevel.java new file mode 100644 index 00000000..77206ded --- /dev/null +++ b/JisolGameServer/Main/src/main/java/cfg/TbGRoleUpLevel.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 TbGRoleUpLevel { + private final java.util.HashMap _dataMap; + private final java.util.ArrayList _dataList; + + public TbGRoleUpLevel(JsonElement _buf) { + _dataMap = new java.util.HashMap(); + _dataList = new java.util.ArrayList(); + + for (com.google.gson.JsonElement _e_ : _buf.getAsJsonArray()) { + cfg.TB.TbGRoleUpLevel _v; + _v = cfg.TB.TbGRoleUpLevel.deserialize(_e_.getAsJsonObject()); + _dataList.add(_v); + _dataMap.put(_v.grade, _v); + } + } + + public java.util.HashMap getDataMap() { return _dataMap; } + public java.util.ArrayList getDataList() { return _dataList; } + + public cfg.TB.TbGRoleUpLevel get(int key) { return _dataMap.get(key); } + +} diff --git a/JisolGameServer/Main/src/main/java/cfg/TbGRoleUpStar.java b/JisolGameServer/Main/src/main/java/cfg/TbGRoleUpStar.java new file mode 100644 index 00000000..15b98789 --- /dev/null +++ b/JisolGameServer/Main/src/main/java/cfg/TbGRoleUpStar.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 TbGRoleUpStar { + private final java.util.HashMap _dataMap; + private final java.util.ArrayList _dataList; + + public TbGRoleUpStar(JsonElement _buf) { + _dataMap = new java.util.HashMap(); + _dataList = new java.util.ArrayList(); + + for (com.google.gson.JsonElement _e_ : _buf.getAsJsonArray()) { + cfg.TB.TbGRoleUpStar _v; + _v = cfg.TB.TbGRoleUpStar.deserialize(_e_.getAsJsonObject()); + _dataList.add(_v); + _dataMap.put(_v.grade, _v); + } + } + + public java.util.HashMap getDataMap() { return _dataMap; } + public java.util.ArrayList getDataList() { return _dataList; } + + public cfg.TB.TbGRoleUpStar get(int key) { return _dataMap.get(key); } + +} diff --git a/JisolGameServer/Main/src/main/java/cn/jisol/game/controller/game/GPlayerPetController.java b/JisolGameServer/Main/src/main/java/cn/jisol/game/controller/game/GPlayerPetController.java index 6e5b3761..3c4c8e14 100644 --- a/JisolGameServer/Main/src/main/java/cn/jisol/game/controller/game/GPlayerPetController.java +++ b/JisolGameServer/Main/src/main/java/cn/jisol/game/controller/game/GPlayerPetController.java @@ -1,9 +1,12 @@ package cn.jisol.game.controller.game; import cn.jisol.game.controller.argsresolver.CurrentPlayer; +import cn.jisol.game.data.TD; import cn.jisol.game.entity.game.Player; import cn.jisol.game.entity.game.PlayerPet; import cn.jisol.game.service.PlayerPetService; +import cn.jisol.game.vo.news.NewsResource; +import cn.jisol.game.vo.news.ov.ResourceUpdateOV; import cn.jisol.game.vo.pet.PetUpStarOV; import cn.jisol.ngame.util.NewsContext; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; @@ -14,6 +17,8 @@ import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; +import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import java.util.Objects; @@ -47,11 +52,11 @@ public class GPlayerPetController { @ApiImplicitParams({}) @ApiOperation(value = "提升宠物星") @PostMapping("/up/star") - public NewsContext onUpStar(@RequestBody PetUpStarOV info,@CurrentPlayer Player player){ + public NewsResource onUpStar(@RequestBody PetUpStarOV info, @CurrentPlayer Player player){ //判断参数 if(info.getPets().size() <= 0 || Objects.isNull(info.getPetId())){ - return NewsContext.onFail("参数错误"); + return NewsResource.onFail("参数错误"); } //查询被合成的宠物列表 @@ -69,7 +74,7 @@ public class GPlayerPetController { ); if(info.getPets().size() != petCount){ - return NewsContext.onFail("合成宠物信息错误"); + return NewsResource.onFail("合成宠物信息错误"); } //查询被升级的宠物 @@ -77,19 +82,37 @@ public class GPlayerPetController { //判断宠物是否是自己的 if(!Objects.equals(pet.getPetPlayerId(), player.getPlayerId())){ - return NewsContext.onFail("宠物不是自己的"); + return NewsResource.onFail("宠物不是自己的"); } //升级星 pet.setPetStarExp(pet.getPetStarExp() + info.getPets().size()); + //判断是否可以升下一星 如果可以则 升 + int upStarExp; + while (pet.getPetStarExp() >= (upStarExp = TD.DATA.getTbGRoleUpStar().get(pet.getPetStar() + 1).merge)){ + //消耗经验 + pet.setPetStarExp(pet.getPetStarExp() - upStarExp); + //升星 + pet.setPetStar(pet.getPetStar() + 1); + } + //保存宠物信息 playerPetService.updateById(pet); //删除被合成的宠物 playerPetService.removeByIds(info.getPets()); - return NewsContext.onSuccess("升星成功",pet); + //整理刷新数据 + ArrayList resources = new ArrayList<>(); + //刷新宠物 + resources.add(ResourceUpdateOV.onPet(ResourceUpdateOV.ResourceUpdateType.UPDATE,pet)); + //删除被合成的宠物 + info.getPets().forEach(item -> { + resources.add(ResourceUpdateOV.onPet(ResourceUpdateOV.ResourceUpdateType.MINUS,PlayerPet.builder().petId(new Long(item)).build())); + }); + + return NewsResource.onSuccess("升星成功",null, resources.toArray(new ResourceUpdateOV[0])); } diff --git a/JisolGameServer/Main/src/main/java/cn/jisol/game/vo/news/ov/ResourceUpdateOV.java b/JisolGameServer/Main/src/main/java/cn/jisol/game/vo/news/ov/ResourceUpdateOV.java index e4543aca..e60f0c0c 100644 --- a/JisolGameServer/Main/src/main/java/cn/jisol/game/vo/news/ov/ResourceUpdateOV.java +++ b/JisolGameServer/Main/src/main/java/cn/jisol/game/vo/news/ov/ResourceUpdateOV.java @@ -1,5 +1,6 @@ package cn.jisol.game.vo.news.ov; +import cn.jisol.game.entity.game.PlayerPet; import cn.jisol.game.entity.game.Resource; import lombok.Builder; import lombok.Data; @@ -9,7 +10,8 @@ import lombok.Data; @Data public class ResourceUpdateOV { - Resource resource; + Resource resource; //资源 + PlayerPet pet; //宠物 //操作 int operation = 0; @@ -26,4 +28,9 @@ public class ResourceUpdateOV { return ResourceUpdateOV.builder().operation(ResourceUpdateType.UPDATE).resource(resource).build(); } + //返回宠物 + public static ResourceUpdateOV onPet(int type,PlayerPet pet){ + return ResourceUpdateOV.builder().operation(type).pet(pet).build(); + } + } diff --git a/JisolGameServer/Main/src/main/resources/json/tbgrolecup.json b/JisolGameServer/Main/src/main/resources/json/tbgroleuplevel.json similarity index 100% rename from JisolGameServer/Main/src/main/resources/json/tbgrolecup.json rename to JisolGameServer/Main/src/main/resources/json/tbgroleuplevel.json diff --git a/JisolGameServer/Main/src/main/resources/json/tbgrolecstar.json b/JisolGameServer/Main/src/main/resources/json/tbgroleupstar.json similarity index 100% rename from JisolGameServer/Main/src/main/resources/json/tbgrolecstar.json rename to JisolGameServer/Main/src/main/resources/json/tbgroleupstar.json