diff --git a/DataTables/Datas/活动/竞技场/竞技场排行榜奖励.xlsx b/DataTables/Datas/活动/竞技场/竞技场排行榜奖励.xlsx index c92def70..9c38ace3 100644 Binary files a/DataTables/Datas/活动/竞技场/竞技场排行榜奖励.xlsx and b/DataTables/Datas/活动/竞技场/竞技场排行榜奖励.xlsx differ diff --git a/DataTables/Datas/活动/竞技场/竞技场配置.xlsx b/DataTables/Datas/活动/竞技场/竞技场配置.xlsx new file mode 100644 index 00000000..93f4b4f2 Binary files /dev/null and b/DataTables/Datas/活动/竞技场/竞技场配置.xlsx differ diff --git a/DataTables/Datas/系统福利/每天挂机福利.xlsx b/DataTables/Datas/系统福利/每天挂机福利.xlsx new file mode 100644 index 00000000..e03baf10 Binary files /dev/null and b/DataTables/Datas/系统福利/每天挂机福利.xlsx differ diff --git a/DataTables/Datas/系统福利/每日签到.xlsx b/DataTables/Datas/系统福利/每日签到.xlsx new file mode 100644 index 00000000..2618de33 Binary files /dev/null and b/DataTables/Datas/系统福利/每日签到.xlsx differ diff --git a/JisolGameCocos/assets/script/App.ts b/JisolGameCocos/assets/script/App.ts index 7920a778..54d03da9 100644 --- a/JisolGameCocos/assets/script/App.ts +++ b/JisolGameCocos/assets/script/App.ts @@ -28,14 +28,14 @@ import AppAction from "./AppAction"; import { Asset } from "cc"; import { Component } from "cc"; -// let APIPath = `http://localhost:8080` -// let WsPath = `ws://localhost:8080/websocket` +let APIPath = `http://localhost:8080` +let WsPath = `ws://localhost:8080/websocket` // let APIPath = `http://192.168.1.23:8080` // let WsPath = `ws://192.168.1.23:8080/websocket` // let APIPath = `http://192.168.0.118:8080` // let WsPath = `ws://192.168.0.118:8080/websocket` -let APIPath = `https://api.pet.jisol.cn` -let WsPath = `wss://api.pet.jisol.cn/websocket` +// let APIPath = `https://api.pet.jisol.cn` +// let WsPath = `wss://api.pet.jisol.cn/websocket` //重写UI class JNGLayer extends JNLayer{ diff --git a/JisolGameCocos/assets/script/AppData.ts b/JisolGameCocos/assets/script/AppData.ts index 2d5a3ffa..6d9cebd4 100644 --- a/JisolGameCocos/assets/script/AppData.ts +++ b/JisolGameCocos/assets/script/AppData.ts @@ -2,6 +2,7 @@ import SystemBase from "../../extensions/ngame/assets/ngame/system/SystemBase"; import { app } from "./App"; import BaseData from "./data/BaseData"; import ChatData from "./data/ChatData"; +import DungeonData from "./data/DungeonData"; import GBattleData from "./data/GBattleData"; import GOnHookData from "./data/GOnHookData"; import GiftData from "./data/GiftData"; @@ -25,6 +26,7 @@ export class AppData extends SystemBase{ PlayerTacticalData.getIns(), //阵法 ResourceData.getIns(), //玩家资源 GOnHookData.getIns(), //无限模式信息类 (无限模式是游戏基础模式玩法 需要默认信息) + DungeonData.getIns(), //副本数据类 GBattleData.getIns(), //战斗数据(永远最后) ]; diff --git a/JisolGameCocos/assets/script/battle/modes/GDungeonMode.ts b/JisolGameCocos/assets/script/battle/modes/GDungeonMode.ts index d7f0851d..c9b3523d 100644 --- a/JisolGameCocos/assets/script/battle/modes/GDungeonMode.ts +++ b/JisolGameCocos/assets/script/battle/modes/GDungeonMode.ts @@ -11,6 +11,7 @@ import GAttributeData from "../base/values/GAttributeData"; import JNFrameTime from "../../../../extensions/ngame/assets/ngame/sync/frame/game/time/JNFrameTime"; import { GAPI } from "../../consts/GAPI"; import { Node } from "cc"; +import DungeonData from "../../data/DungeonData"; const { ccclass, property } = _decorator; export interface GDungeonModeData{ @@ -75,7 +76,7 @@ export default class GDungeonMode extends GNormalModeBase<{},GDungeonModeData>{ onBattleEnd(win:GNormalModePlayerEnum){ //结束游戏 JNFrameTime.getInstance().setTimeout(async () => { - await GAPI.GDungeonChallenge(this.data.dungeonId,this.data.dungeonItemId); + await DungeonData.getIns().challenge(this.data.dungeonId,this.data.dungeonItemId); this.Close(); },3000) } diff --git a/JisolGameCocos/assets/script/consts/GAPI.ts b/JisolGameCocos/assets/script/consts/GAPI.ts index 64cb7c14..91880017 100644 --- a/JisolGameCocos/assets/script/consts/GAPI.ts +++ b/JisolGameCocos/assets/script/consts/GAPI.ts @@ -16,6 +16,14 @@ export interface ModeOnHookOV{ } +export interface Dungeon{ + dungeonId:number; //副本唯一Id + playerId:number; //副本玩家Id + dungeonCfgId:number; //副本配置表Id + dungeonCfgItemId:number; //副本进度表Id +} + + export const GAPI = { /************** 无限模式接口 ********************/ @@ -35,7 +43,9 @@ export const GAPI = { GOnHookWinLevel : async () => RData(await app.api.post(`/game/mode/onHook/winLevel`),false) as ModeOnHookOV, /*************** 副本接口 ***********************/ + //获取副本信息 + GDungeonGetInfo : async () => RData(await app.api.get(`/game/mode/dungeon/info`)) as {[key:string]:Dungeon}, //消耗钥匙挑战副本 - GDungeonChallenge : async (dungeonId,dungeonItemId) => RData(await app.api.post(`/game/mode/dungeon/challenge/dungeon/${dungeonId}/${dungeonItemId}`),false) as void, + GDungeonChallenge : async (dungeonId,dungeonItemId) => RData(await app.api.post(`/game/mode/dungeon/challenge/dungeon/${dungeonId}/${dungeonItemId}`),false) as {[key:string]:Dungeon}, } \ No newline at end of file diff --git a/JisolGameCocos/assets/script/data/DungeonData.ts b/JisolGameCocos/assets/script/data/DungeonData.ts new file mode 100644 index 00000000..a9028e7c --- /dev/null +++ b/JisolGameCocos/assets/script/data/DungeonData.ts @@ -0,0 +1,43 @@ +import { TD } from "../App"; +import { Dungeon, GAPI } from "../consts/GAPI"; +import BaseData from "./BaseData"; + +export default class DungeonData extends BaseData{ + + info:{[key:string]:Dungeon}; + + async onInit() { + await this.UpdateInfo(); + } + + //获取信息 + async getInfo(){ + if(this.info){ + return this.info; + }else{ + return await this.UpdateInfo(); + } + } + + //更新信息 + async UpdateInfo(){ + return this.info = await GAPI.GDungeonGetInfo(); + } + + //获取指定Id的进度 + async getInfoProcess(id:number){ + return ((await this.getInfo())[`${id}`] as Dungeon).dungeonCfgItemId; + } + + //获取指定副本的最大关卡 + getMaxProcess(id:number){ + let datas = TD[`TbGSysDungeon${160001}`].getDataList(); + return datas[datas.length - 1].id; + } + + //挑战 + async challenge(dungeonId:number,dungeonItemId:number){ + this.info = await GAPI.GDungeonChallenge(dungeonId,dungeonItemId) + } + +} \ No newline at end of file diff --git a/JisolGameCocos/assets/script/data/DungeonData.ts.meta b/JisolGameCocos/assets/script/data/DungeonData.ts.meta new file mode 100644 index 00000000..e81f47fd --- /dev/null +++ b/JisolGameCocos/assets/script/data/DungeonData.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.23", + "importer": "typescript", + "imported": true, + "uuid": "cae80288-0426-4c67-a214-3f3191e51411", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/JisolGameCocos/assets/script/ui/Dungeon/DungeonShowItem.ts b/JisolGameCocos/assets/script/ui/Dungeon/DungeonShowItem.ts index 9f779aeb..61e661d5 100644 --- a/JisolGameCocos/assets/script/ui/Dungeon/DungeonShowItem.ts +++ b/JisolGameCocos/assets/script/ui/Dungeon/DungeonShowItem.ts @@ -7,6 +7,7 @@ import { app, TD } from '../../App'; import { GUI } from '../UIConfig'; import { PlayerResourceShow } from '../Consts/Resource/PlayerResourceShow'; import ResourceData from '../../data/ResourceData'; +import DungeonData from '../../data/DungeonData'; const { ccclass, property } = _decorator; @ccclass('DungeonShowItem') @@ -20,28 +21,28 @@ export class DungeonShowItem extends JNScrollViewItem { @property(PlayerResourceShow) resource:PlayerResourceShow; - onInit(){ + async onInit(){ this.resource.type = this.data.consume.id; this.resource.onUpdateView(); - this.onUpdateView(); + await this.onUpdateView(); } - onUpdateView(){ + async onUpdateView(){ - this.title.string = this.data.name; + this.title.string = `${this.data.name} (${await DungeonData.getIns().getInfoProcess(this.data.id)} / ${DungeonData.getIns().getMaxProcess(this.data.id)})`; } //点击副本 - onClickDungeon(){ + async onClickDungeon(){ if(ResourceData.getIns().getValue(this.data.consume.id) >= this.data.consume.value){ //打开副本 GBattleModeManager.getIns().Open(BattleMode[`${this.data.type}`],true,{ dungeonId:this.data.id, - dungeonItemId:TD[`${this.data.tigs}`].getDataList()[0].id, + dungeonItemId:await DungeonData.getIns().getInfoProcess(this.data.id), data:TD[`${this.data.tigs}`].getDataList()[0].data }); app.layer.Close(GUI.DungeonView); diff --git a/JisolGameServer/Main/src/main/java/cn/jisol/game/controller/game/mode/GDungeonController.java b/JisolGameServer/Main/src/main/java/cn/jisol/game/controller/game/mode/GDungeonController.java index 5d3f3cf7..c02348e0 100644 --- a/JisolGameServer/Main/src/main/java/cn/jisol/game/controller/game/mode/GDungeonController.java +++ b/JisolGameServer/Main/src/main/java/cn/jisol/game/controller/game/mode/GDungeonController.java @@ -41,7 +41,7 @@ public class GDungeonController { //获取副本信息 @ApiImplicitParams({}) @ApiOperation(value = "获取副本信息") - @PostMapping("/info") + @GetMapping("/info") public NewsContext> getInfos(@CurrentPlayer Player player){ //获取所有副本信息 diff --git a/JisolGameServer/Main/src/main/resources/application.yml b/JisolGameServer/Main/src/main/resources/application.yml index 0b5e7c94..2c27f0b9 100644 --- a/JisolGameServer/Main/src/main/resources/application.yml +++ b/JisolGameServer/Main/src/main/resources/application.yml @@ -4,8 +4,8 @@ spring: datasource: username: pet_jisol_cn password: sThsBwjfDcaw2wJR -# url: jdbc:mysql://kyu.jisol.cn:3306/pet_jisol_cn?useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=GMT%2B8&allowMultiQueries=true - url: jdbc:mysql://localhost:3306/pet_jisol_cn?useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=GMT%2B8&allowMultiQueries=true + url: jdbc:mysql://kyu.jisol.cn:3306/pet_jisol_cn?useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=GMT%2B8&allowMultiQueries=true +# url: jdbc:mysql://localhost:3306/pet_jisol_cn?useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=GMT%2B8&allowMultiQueries=true driver-class-name: com.mysql.cj.jdbc.Driver jackson: serialization: