Merge remote-tracking branch 'origin/feature/weiwang' into release
This commit is contained in:
commit
3b3d61795e
17
src/api_s2c/weiwang/ApiOpen.ts
Normal file
17
src/api_s2c/weiwang/ApiOpen.ts
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
import { ApiCall } from "tsrpc";
|
||||||
|
import { ReqOpen, ResOpen } from "../../shared/protocols/weiwang/PtlOpen";
|
||||||
|
|
||||||
|
export default async function (call: ApiCall<ReqOpen, ResOpen>) {
|
||||||
|
let data = await G.mongodb.collection("weiwang").findOne({ uid: call.uid });
|
||||||
|
|
||||||
|
if (!data) {
|
||||||
|
// 初始化威望数据
|
||||||
|
data = (await G.mongodb.collection("weiwang").findOneAndUpdate(
|
||||||
|
{ uid: call.uid },
|
||||||
|
{ $set: { hp: 0, atk: 0, def: 0 } },
|
||||||
|
{ upsert: true, returnDocument: "after" }
|
||||||
|
)).value;
|
||||||
|
}
|
||||||
|
|
||||||
|
call.succ({ lv: { hp: data.hp, atk: data.atk, def: data.def } });
|
||||||
|
}
|
94
src/api_s2c/weiwang/ApiUpLv.ts
Normal file
94
src/api_s2c/weiwang/ApiUpLv.ts
Normal file
@ -0,0 +1,94 @@
|
|||||||
|
import { ApiCall } from "tsrpc";
|
||||||
|
import { ReqUpLv, ResUpLv } from "../../shared/protocols/weiwang/PtlUpLv";
|
||||||
|
import { PlayerFun } from "../../public/player";
|
||||||
|
|
||||||
|
|
||||||
|
export default async function (call: ApiCall<ReqUpLv, ResUpLv>) {
|
||||||
|
let data = await G.mongodb.collection("weiwang").findOne({ uid: call.uid });
|
||||||
|
|
||||||
|
if (!data) {
|
||||||
|
// 初始化威望数据
|
||||||
|
data = (await G.mongodb.collection("weiwang").findOneAndUpdate(
|
||||||
|
{ uid: call.uid },
|
||||||
|
{ $set: { hp: 0, atk: 0, def: 0 } },
|
||||||
|
{ upsert: true, returnDocument: "after" }
|
||||||
|
)).value;
|
||||||
|
}
|
||||||
|
|
||||||
|
let cur_lv = data[call.req.type];
|
||||||
|
let min_lv = Math.min(data.atk, data.def, data.hp);
|
||||||
|
|
||||||
|
let ids = Object.keys(G.gc.renown_level).sort(
|
||||||
|
(a, b) => Number(a) - Number(b)
|
||||||
|
);
|
||||||
|
|
||||||
|
let config;
|
||||||
|
for (let id of ids) {
|
||||||
|
config = G.gc.renown_level[id];
|
||||||
|
if (min_lv < config.maxlevel) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 超过档期威望的最大等级
|
||||||
|
if (cur_lv + call.req.lv > config.maxlevel) {
|
||||||
|
return call.error("", { code: -1, message: lng.weiwang_12 });
|
||||||
|
}
|
||||||
|
|
||||||
|
let need = [{ a: config.cost[0].a, t: config.cost[0].t, n: config.cost[0].n * call.req.lv }];
|
||||||
|
|
||||||
|
// 检测消耗是否足够
|
||||||
|
await PlayerFun.checkNeedIsMeet(call, need);
|
||||||
|
|
||||||
|
// 扣除消耗
|
||||||
|
await PlayerFun.cutNeed(call, need);
|
||||||
|
|
||||||
|
data[call.req.type] += call.req.lv;
|
||||||
|
|
||||||
|
// 重新计算buff
|
||||||
|
let buff = calc_weiwang_buff(data.atk, data.def, data.hp);
|
||||||
|
G.mongodb.collection("weiwang").updateOne({ uid: call.uid }, {
|
||||||
|
$set: { buff: buff },
|
||||||
|
$inc: { [call.req.type]: call.req.lv },
|
||||||
|
});
|
||||||
|
|
||||||
|
call.succ({ lv: { hp: data.hp, atk: data.atk, def: data.def } });
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计算当前威望buff
|
||||||
|
*/
|
||||||
|
function calc_weiwang_buff(atk: number, def: number, hp: number) {
|
||||||
|
let buff: k_v<number> = {
|
||||||
|
"hp": 0, "def": 0, "atk": 0
|
||||||
|
};
|
||||||
|
|
||||||
|
let ids = Object.keys(G.gc.renown_level).sort(
|
||||||
|
(a, b) => Number(a) - Number(b)
|
||||||
|
);
|
||||||
|
|
||||||
|
for (let i = 0; i < ids.length; i++) {
|
||||||
|
let curr = G.gc.renown_level[ids[i]];
|
||||||
|
if (i == 0) {
|
||||||
|
buff["hp"] += curr.hp * Math.min(curr.maxlevel, hp);
|
||||||
|
buff["atk"] += curr.atk * Math.min(curr.maxlevel, atk);
|
||||||
|
buff["def"] += curr.def * Math.min(curr.maxlevel, def);
|
||||||
|
} else {
|
||||||
|
let prev = G.gc.renown_level[ids[i - 1]];
|
||||||
|
|
||||||
|
if (hp > prev.maxlevel) {
|
||||||
|
buff["hp"] += curr.hp * Math.min(hp - prev.maxlevel, curr.maxlevel - prev.maxlevel);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (atk > prev.maxlevel) {
|
||||||
|
buff["atk"] += curr.atk * Math.min(atk - prev.maxlevel, curr.maxlevel - prev.maxlevel);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (def > prev.maxlevel) {
|
||||||
|
buff["def"] += curr.def * Math.min(def - prev.maxlevel, curr.maxlevel - prev.maxlevel);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return buff;
|
||||||
|
}
|
@ -1316,6 +1316,20 @@ export const serviceProto: ServiceProto<ServiceType> = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"optional": true
|
"optional": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 38,
|
||||||
|
"name": "weiwangbuff",
|
||||||
|
"type": {
|
||||||
|
"type": "Interface",
|
||||||
|
"indexSignature": {
|
||||||
|
"keyType": "String",
|
||||||
|
"type": {
|
||||||
|
"type": "Number"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"optional": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -51,7 +51,7 @@ declare module 'tsrpc' {
|
|||||||
/**API 锁 */
|
/**API 锁 */
|
||||||
apiLock: k_v<number>;
|
apiLock: k_v<number>;
|
||||||
/**获取默认上阵战斗数据 */
|
/**获取默认上阵战斗数据 */
|
||||||
getDefaultFightData(def?: k_v<string>): Promise<joinFightData>;
|
getDefaultFightData(def?: k_v<string>, ext_buff?: { [type: string]: k_v<number> }): Promise<joinFightData>;
|
||||||
/**刷新上阵英雄战力 */
|
/**刷新上阵英雄战力 */
|
||||||
refreshPower(): Promise<any>;
|
refreshPower(): Promise<any>;
|
||||||
/**玩家计算在线时长时间戳 */
|
/**玩家计算在线时长时间戳 */
|
||||||
@ -124,7 +124,7 @@ Object.defineProperties(BaseConnection.prototype, {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
BaseConnection.prototype.getDefaultFightData = async function (this: BaseConnection, def?: k_v<string>) {
|
BaseConnection.prototype.getDefaultFightData = async function (this: BaseConnection, def?: k_v<string>, ext_buff?: { [type: string]: k_v<number> }) {
|
||||||
let posObj = def || this.heroPos;
|
let posObj = def || this.heroPos;
|
||||||
let roles: k_v<roleDataType> = {};
|
let roles: k_v<roleDataType> = {};
|
||||||
|
|
||||||
@ -143,7 +143,11 @@ BaseConnection.prototype.getDefaultFightData = async function (this: BaseConnect
|
|||||||
roles[pos] = {
|
roles[pos] = {
|
||||||
...hero,
|
...hero,
|
||||||
attr: {
|
attr: {
|
||||||
...HeroShared.getHeroBasicAttr(hero, { ...this.otherBuff, allBuff: HeroShared.getAllBuff(heros) }, Number(pos))
|
...HeroShared.getHeroBasicAttr(hero, {
|
||||||
|
...ext_buff,
|
||||||
|
...this.otherBuff,
|
||||||
|
allBuff: HeroShared.getAllBuff(heros)
|
||||||
|
}, Number(pos))
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,13 @@
|
|||||||
"id": 1,
|
"id": 1,
|
||||||
"renownlevel": 1,
|
"renownlevel": 1,
|
||||||
"maxlevel": 250,
|
"maxlevel": 250,
|
||||||
"cost": 5,
|
"cost": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "weiwang",
|
||||||
|
"n": 5
|
||||||
|
}
|
||||||
|
],
|
||||||
"atk": 2,
|
"atk": 2,
|
||||||
"def": 1,
|
"def": 1,
|
||||||
"hp": 8
|
"hp": 8
|
||||||
@ -11,8 +17,14 @@
|
|||||||
"2": {
|
"2": {
|
||||||
"id": 2,
|
"id": 2,
|
||||||
"renownlevel": 2,
|
"renownlevel": 2,
|
||||||
"maxlevel": 500,
|
"maxlevel": 750,
|
||||||
"cost": 6,
|
"cost": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "weiwang",
|
||||||
|
"n": 6
|
||||||
|
}
|
||||||
|
],
|
||||||
"atk": 2,
|
"atk": 2,
|
||||||
"def": 1,
|
"def": 1,
|
||||||
"hp": 9
|
"hp": 9
|
||||||
@ -20,8 +32,14 @@
|
|||||||
"3": {
|
"3": {
|
||||||
"id": 3,
|
"id": 3,
|
||||||
"renownlevel": 3,
|
"renownlevel": 3,
|
||||||
"maxlevel": 750,
|
"maxlevel": 1500,
|
||||||
"cost": 7,
|
"cost": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "weiwang",
|
||||||
|
"n": 7
|
||||||
|
}
|
||||||
|
],
|
||||||
"atk": 2,
|
"atk": 2,
|
||||||
"def": 1,
|
"def": 1,
|
||||||
"hp": 10
|
"hp": 10
|
||||||
@ -29,8 +47,14 @@
|
|||||||
"4": {
|
"4": {
|
||||||
"id": 4,
|
"id": 4,
|
||||||
"renownlevel": 4,
|
"renownlevel": 4,
|
||||||
"maxlevel": 1000,
|
"maxlevel": 2500,
|
||||||
"cost": 9,
|
"cost": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "weiwang",
|
||||||
|
"n": 9
|
||||||
|
}
|
||||||
|
],
|
||||||
"atk": 4,
|
"atk": 4,
|
||||||
"def": 2,
|
"def": 2,
|
||||||
"hp": 11
|
"hp": 11
|
||||||
@ -38,8 +62,14 @@
|
|||||||
"5": {
|
"5": {
|
||||||
"id": 5,
|
"id": 5,
|
||||||
"renownlevel": 5,
|
"renownlevel": 5,
|
||||||
"maxlevel": 1250,
|
"maxlevel": 3750,
|
||||||
"cost": 11,
|
"cost": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "weiwang",
|
||||||
|
"n": 11
|
||||||
|
}
|
||||||
|
],
|
||||||
"atk": 4,
|
"atk": 4,
|
||||||
"def": 2,
|
"def": 2,
|
||||||
"hp": 12
|
"hp": 12
|
||||||
@ -47,8 +77,14 @@
|
|||||||
"6": {
|
"6": {
|
||||||
"id": 6,
|
"id": 6,
|
||||||
"renownlevel": 6,
|
"renownlevel": 6,
|
||||||
"maxlevel": 1500,
|
"maxlevel": 5250,
|
||||||
"cost": 13,
|
"cost": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "weiwang",
|
||||||
|
"n": 13
|
||||||
|
}
|
||||||
|
],
|
||||||
"atk": 4,
|
"atk": 4,
|
||||||
"def": 2,
|
"def": 2,
|
||||||
"hp": 13
|
"hp": 13
|
||||||
@ -56,8 +92,14 @@
|
|||||||
"7": {
|
"7": {
|
||||||
"id": 7,
|
"id": 7,
|
||||||
"renownlevel": 7,
|
"renownlevel": 7,
|
||||||
"maxlevel": 1750,
|
"maxlevel": 7000,
|
||||||
"cost": 15,
|
"cost": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "weiwang",
|
||||||
|
"n": 15
|
||||||
|
}
|
||||||
|
],
|
||||||
"atk": 6,
|
"atk": 6,
|
||||||
"def": 3,
|
"def": 3,
|
||||||
"hp": 14
|
"hp": 14
|
||||||
@ -65,8 +107,14 @@
|
|||||||
"8": {
|
"8": {
|
||||||
"id": 8,
|
"id": 8,
|
||||||
"renownlevel": 8,
|
"renownlevel": 8,
|
||||||
"maxlevel": 2000,
|
"maxlevel": 9000,
|
||||||
"cost": 17,
|
"cost": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "weiwang",
|
||||||
|
"n": 17
|
||||||
|
}
|
||||||
|
],
|
||||||
"atk": 6,
|
"atk": 6,
|
||||||
"def": 3,
|
"def": 3,
|
||||||
"hp": 15
|
"hp": 15
|
||||||
@ -74,8 +122,14 @@
|
|||||||
"9": {
|
"9": {
|
||||||
"id": 9,
|
"id": 9,
|
||||||
"renownlevel": 9,
|
"renownlevel": 9,
|
||||||
"maxlevel": 2500,
|
"maxlevel": 11500,
|
||||||
"cost": 19,
|
"cost": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "weiwang",
|
||||||
|
"n": 19
|
||||||
|
}
|
||||||
|
],
|
||||||
"atk": 6,
|
"atk": 6,
|
||||||
"def": 3,
|
"def": 3,
|
||||||
"hp": 16
|
"hp": 16
|
||||||
@ -83,8 +137,14 @@
|
|||||||
"10": {
|
"10": {
|
||||||
"id": 10,
|
"id": 10,
|
||||||
"renownlevel": 10,
|
"renownlevel": 10,
|
||||||
"maxlevel": 3000,
|
"maxlevel": 14500,
|
||||||
"cost": 21,
|
"cost": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "weiwang",
|
||||||
|
"n": 21
|
||||||
|
}
|
||||||
|
],
|
||||||
"atk": 8,
|
"atk": 8,
|
||||||
"def": 4,
|
"def": 4,
|
||||||
"hp": 17
|
"hp": 17
|
||||||
@ -92,8 +152,14 @@
|
|||||||
"11": {
|
"11": {
|
||||||
"id": 11,
|
"id": 11,
|
||||||
"renownlevel": 11,
|
"renownlevel": 11,
|
||||||
"maxlevel": 3500,
|
"maxlevel": 18000,
|
||||||
"cost": 23,
|
"cost": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "weiwang",
|
||||||
|
"n": 23
|
||||||
|
}
|
||||||
|
],
|
||||||
"atk": 8,
|
"atk": 8,
|
||||||
"def": 4,
|
"def": 4,
|
||||||
"hp": 18
|
"hp": 18
|
||||||
@ -101,8 +167,14 @@
|
|||||||
"12": {
|
"12": {
|
||||||
"id": 12,
|
"id": 12,
|
||||||
"renownlevel": 12,
|
"renownlevel": 12,
|
||||||
"maxlevel": 4000,
|
"maxlevel": 22000,
|
||||||
"cost": 25,
|
"cost": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "weiwang",
|
||||||
|
"n": 25
|
||||||
|
}
|
||||||
|
],
|
||||||
"atk": 8,
|
"atk": 8,
|
||||||
"def": 4,
|
"def": 4,
|
||||||
"hp": 19
|
"hp": 19
|
||||||
@ -110,8 +182,14 @@
|
|||||||
"13": {
|
"13": {
|
||||||
"id": 13,
|
"id": 13,
|
||||||
"renownlevel": 13,
|
"renownlevel": 13,
|
||||||
"maxlevel": 4500,
|
"maxlevel": 26500,
|
||||||
"cost": 27,
|
"cost": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "weiwang",
|
||||||
|
"n": 27
|
||||||
|
}
|
||||||
|
],
|
||||||
"atk": 10,
|
"atk": 10,
|
||||||
"def": 5,
|
"def": 5,
|
||||||
"hp": 20
|
"hp": 20
|
||||||
@ -119,8 +197,14 @@
|
|||||||
"14": {
|
"14": {
|
||||||
"id": 14,
|
"id": 14,
|
||||||
"renownlevel": 14,
|
"renownlevel": 14,
|
||||||
"maxlevel": 5000,
|
"maxlevel": 31500,
|
||||||
"cost": 30,
|
"cost": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "weiwang",
|
||||||
|
"n": 30
|
||||||
|
}
|
||||||
|
],
|
||||||
"atk": 10,
|
"atk": 10,
|
||||||
"def": 5,
|
"def": 5,
|
||||||
"hp": 21
|
"hp": 21
|
||||||
@ -128,8 +212,14 @@
|
|||||||
"15": {
|
"15": {
|
||||||
"id": 15,
|
"id": 15,
|
||||||
"renownlevel": 15,
|
"renownlevel": 15,
|
||||||
"maxlevel": 5000,
|
"maxlevel": 36500,
|
||||||
"cost": 33,
|
"cost": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "weiwang",
|
||||||
|
"n": 33
|
||||||
|
}
|
||||||
|
],
|
||||||
"atk": 10,
|
"atk": 10,
|
||||||
"def": 5,
|
"def": 5,
|
||||||
"hp": 21
|
"hp": 21
|
||||||
@ -137,8 +227,14 @@
|
|||||||
"16": {
|
"16": {
|
||||||
"id": 16,
|
"id": 16,
|
||||||
"renownlevel": 16,
|
"renownlevel": 16,
|
||||||
"maxlevel": 5000,
|
"maxlevel": 41500,
|
||||||
"cost": 36,
|
"cost": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "weiwang",
|
||||||
|
"n": 36
|
||||||
|
}
|
||||||
|
],
|
||||||
"atk": 12,
|
"atk": 12,
|
||||||
"def": 6,
|
"def": 6,
|
||||||
"hp": 22
|
"hp": 22
|
||||||
@ -146,8 +242,14 @@
|
|||||||
"17": {
|
"17": {
|
||||||
"id": 17,
|
"id": 17,
|
||||||
"renownlevel": 17,
|
"renownlevel": 17,
|
||||||
"maxlevel": 5000,
|
"maxlevel": 46500,
|
||||||
"cost": 39,
|
"cost": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "weiwang",
|
||||||
|
"n": 39
|
||||||
|
}
|
||||||
|
],
|
||||||
"atk": 12,
|
"atk": 12,
|
||||||
"def": 6,
|
"def": 6,
|
||||||
"hp": 22
|
"hp": 22
|
||||||
@ -155,8 +257,14 @@
|
|||||||
"18": {
|
"18": {
|
||||||
"id": 18,
|
"id": 18,
|
||||||
"renownlevel": 18,
|
"renownlevel": 18,
|
||||||
"maxlevel": 5000,
|
"maxlevel": 51500,
|
||||||
"cost": 42,
|
"cost": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "weiwang",
|
||||||
|
"n": 42
|
||||||
|
}
|
||||||
|
],
|
||||||
"atk": 12,
|
"atk": 12,
|
||||||
"def": 6,
|
"def": 6,
|
||||||
"hp": 22
|
"hp": 22
|
||||||
@ -164,8 +272,14 @@
|
|||||||
"19": {
|
"19": {
|
||||||
"id": 19,
|
"id": 19,
|
||||||
"renownlevel": 19,
|
"renownlevel": 19,
|
||||||
"maxlevel": 5000,
|
"maxlevel": 56500,
|
||||||
"cost": 45,
|
"cost": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "weiwang",
|
||||||
|
"n": 45
|
||||||
|
}
|
||||||
|
],
|
||||||
"atk": 14,
|
"atk": 14,
|
||||||
"def": 7,
|
"def": 7,
|
||||||
"hp": 23
|
"hp": 23
|
||||||
@ -173,8 +287,14 @@
|
|||||||
"20": {
|
"20": {
|
||||||
"id": 20,
|
"id": 20,
|
||||||
"renownlevel": 20,
|
"renownlevel": 20,
|
||||||
"maxlevel": 5000,
|
"maxlevel": 61500,
|
||||||
"cost": 48,
|
"cost": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "weiwang",
|
||||||
|
"n": 48
|
||||||
|
}
|
||||||
|
],
|
||||||
"atk": 14,
|
"atk": 14,
|
||||||
"def": 7,
|
"def": 7,
|
||||||
"hp": 23
|
"hp": 23
|
||||||
@ -182,8 +302,14 @@
|
|||||||
"21": {
|
"21": {
|
||||||
"id": 21,
|
"id": 21,
|
||||||
"renownlevel": 21,
|
"renownlevel": 21,
|
||||||
"maxlevel": 5000,
|
"maxlevel": 66500,
|
||||||
"cost": 51,
|
"cost": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "weiwang",
|
||||||
|
"n": 51
|
||||||
|
}
|
||||||
|
],
|
||||||
"atk": 14,
|
"atk": 14,
|
||||||
"def": 7,
|
"def": 7,
|
||||||
"hp": 23
|
"hp": 23
|
||||||
@ -191,8 +317,14 @@
|
|||||||
"22": {
|
"22": {
|
||||||
"id": 22,
|
"id": 22,
|
||||||
"renownlevel": 22,
|
"renownlevel": 22,
|
||||||
"maxlevel": 5000,
|
"maxlevel": 71500,
|
||||||
"cost": 54,
|
"cost": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "weiwang",
|
||||||
|
"n": 54
|
||||||
|
}
|
||||||
|
],
|
||||||
"atk": 14,
|
"atk": 14,
|
||||||
"def": 7,
|
"def": 7,
|
||||||
"hp": 23
|
"hp": 23
|
||||||
@ -200,8 +332,14 @@
|
|||||||
"23": {
|
"23": {
|
||||||
"id": 23,
|
"id": 23,
|
||||||
"renownlevel": 23,
|
"renownlevel": 23,
|
||||||
"maxlevel": 5000,
|
"maxlevel": 76500,
|
||||||
"cost": 57,
|
"cost": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "weiwang",
|
||||||
|
"n": 57
|
||||||
|
}
|
||||||
|
],
|
||||||
"atk": 16,
|
"atk": 16,
|
||||||
"def": 8,
|
"def": 8,
|
||||||
"hp": 24
|
"hp": 24
|
||||||
@ -209,8 +347,14 @@
|
|||||||
"24": {
|
"24": {
|
||||||
"id": 24,
|
"id": 24,
|
||||||
"renownlevel": 24,
|
"renownlevel": 24,
|
||||||
"maxlevel": 5000,
|
"maxlevel": 81500,
|
||||||
"cost": 60,
|
"cost": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "weiwang",
|
||||||
|
"n": 60
|
||||||
|
}
|
||||||
|
],
|
||||||
"atk": 16,
|
"atk": 16,
|
||||||
"def": 8,
|
"def": 8,
|
||||||
"hp": 24
|
"hp": 24
|
||||||
@ -218,8 +362,14 @@
|
|||||||
"25": {
|
"25": {
|
||||||
"id": 25,
|
"id": 25,
|
||||||
"renownlevel": 25,
|
"renownlevel": 25,
|
||||||
"maxlevel": 5000,
|
"maxlevel": 86500,
|
||||||
"cost": 63,
|
"cost": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "weiwang",
|
||||||
|
"n": 63
|
||||||
|
}
|
||||||
|
],
|
||||||
"atk": 16,
|
"atk": 16,
|
||||||
"def": 8,
|
"def": 8,
|
||||||
"hp": 24
|
"hp": 24
|
||||||
@ -227,8 +377,14 @@
|
|||||||
"26": {
|
"26": {
|
||||||
"id": 26,
|
"id": 26,
|
||||||
"renownlevel": 26,
|
"renownlevel": 26,
|
||||||
"maxlevel": 5000,
|
"maxlevel": 91500,
|
||||||
"cost": 66,
|
"cost": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "weiwang",
|
||||||
|
"n": 66
|
||||||
|
}
|
||||||
|
],
|
||||||
"atk": 16,
|
"atk": 16,
|
||||||
"def": 8,
|
"def": 8,
|
||||||
"hp": 24
|
"hp": 24
|
||||||
@ -236,8 +392,14 @@
|
|||||||
"27": {
|
"27": {
|
||||||
"id": 27,
|
"id": 27,
|
||||||
"renownlevel": 27,
|
"renownlevel": 27,
|
||||||
"maxlevel": 5000,
|
"maxlevel": 96500,
|
||||||
"cost": 69,
|
"cost": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "weiwang",
|
||||||
|
"n": 69
|
||||||
|
}
|
||||||
|
],
|
||||||
"atk": 16,
|
"atk": 16,
|
||||||
"def": 8,
|
"def": 8,
|
||||||
"hp": 24
|
"hp": 24
|
||||||
@ -245,8 +407,14 @@
|
|||||||
"28": {
|
"28": {
|
||||||
"id": 28,
|
"id": 28,
|
||||||
"renownlevel": 28,
|
"renownlevel": 28,
|
||||||
"maxlevel": 5000,
|
"maxlevel": 101500,
|
||||||
"cost": 72,
|
"cost": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "weiwang",
|
||||||
|
"n": 72
|
||||||
|
}
|
||||||
|
],
|
||||||
"atk": 18,
|
"atk": 18,
|
||||||
"def": 9,
|
"def": 9,
|
||||||
"hp": 25
|
"hp": 25
|
||||||
@ -254,8 +422,14 @@
|
|||||||
"29": {
|
"29": {
|
||||||
"id": 29,
|
"id": 29,
|
||||||
"renownlevel": 29,
|
"renownlevel": 29,
|
||||||
"maxlevel": 5000,
|
"maxlevel": 106500,
|
||||||
"cost": 75,
|
"cost": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "weiwang",
|
||||||
|
"n": 75
|
||||||
|
}
|
||||||
|
],
|
||||||
"atk": 18,
|
"atk": 18,
|
||||||
"def": 9,
|
"def": 9,
|
||||||
"hp": 25
|
"hp": 25
|
||||||
@ -263,8 +437,14 @@
|
|||||||
"30": {
|
"30": {
|
||||||
"id": 30,
|
"id": 30,
|
||||||
"renownlevel": 30,
|
"renownlevel": 30,
|
||||||
"maxlevel": 5000,
|
"maxlevel": 111500,
|
||||||
"cost": 78,
|
"cost": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "weiwang",
|
||||||
|
"n": 78
|
||||||
|
}
|
||||||
|
],
|
||||||
"atk": 18,
|
"atk": 18,
|
||||||
"def": 9,
|
"def": 9,
|
||||||
"hp": 25
|
"hp": 25
|
||||||
@ -272,8 +452,14 @@
|
|||||||
"31": {
|
"31": {
|
||||||
"id": 31,
|
"id": 31,
|
||||||
"renownlevel": 31,
|
"renownlevel": 31,
|
||||||
"maxlevel": 5000,
|
"maxlevel": 116500,
|
||||||
"cost": 81,
|
"cost": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "weiwang",
|
||||||
|
"n": 81
|
||||||
|
}
|
||||||
|
],
|
||||||
"atk": 18,
|
"atk": 18,
|
||||||
"def": 9,
|
"def": 9,
|
||||||
"hp": 25
|
"hp": 25
|
||||||
@ -281,8 +467,14 @@
|
|||||||
"32": {
|
"32": {
|
||||||
"id": 32,
|
"id": 32,
|
||||||
"renownlevel": 32,
|
"renownlevel": 32,
|
||||||
"maxlevel": 5000,
|
"maxlevel": 121500,
|
||||||
"cost": 84,
|
"cost": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "weiwang",
|
||||||
|
"n": 84
|
||||||
|
}
|
||||||
|
],
|
||||||
"atk": 18,
|
"atk": 18,
|
||||||
"def": 9,
|
"def": 9,
|
||||||
"hp": 25
|
"hp": 25
|
||||||
@ -290,8 +482,14 @@
|
|||||||
"33": {
|
"33": {
|
||||||
"id": 33,
|
"id": 33,
|
||||||
"renownlevel": 33,
|
"renownlevel": 33,
|
||||||
"maxlevel": 5000,
|
"maxlevel": 126500,
|
||||||
"cost": 87,
|
"cost": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "weiwang",
|
||||||
|
"n": 87
|
||||||
|
}
|
||||||
|
],
|
||||||
"atk": 18,
|
"atk": 18,
|
||||||
"def": 10,
|
"def": 10,
|
||||||
"hp": 25
|
"hp": 25
|
||||||
@ -299,8 +497,14 @@
|
|||||||
"34": {
|
"34": {
|
||||||
"id": 34,
|
"id": 34,
|
||||||
"renownlevel": 34,
|
"renownlevel": 34,
|
||||||
"maxlevel": 5000,
|
"maxlevel": 131500,
|
||||||
"cost": 90,
|
"cost": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "weiwang",
|
||||||
|
"n": 90
|
||||||
|
}
|
||||||
|
],
|
||||||
"atk": 18,
|
"atk": 18,
|
||||||
"def": 10,
|
"def": 10,
|
||||||
"hp": 25
|
"hp": 25
|
||||||
@ -308,8 +512,14 @@
|
|||||||
"35": {
|
"35": {
|
||||||
"id": 35,
|
"id": 35,
|
||||||
"renownlevel": 35,
|
"renownlevel": 35,
|
||||||
"maxlevel": 5000,
|
"maxlevel": 136500,
|
||||||
"cost": 93,
|
"cost": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "weiwang",
|
||||||
|
"n": 93
|
||||||
|
}
|
||||||
|
],
|
||||||
"atk": 18,
|
"atk": 18,
|
||||||
"def": 10,
|
"def": 10,
|
||||||
"hp": 25
|
"hp": 25
|
||||||
@ -317,8 +527,14 @@
|
|||||||
"36": {
|
"36": {
|
||||||
"id": 36,
|
"id": 36,
|
||||||
"renownlevel": 36,
|
"renownlevel": 36,
|
||||||
"maxlevel": 5000,
|
"maxlevel": 141500,
|
||||||
"cost": 97,
|
"cost": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "weiwang",
|
||||||
|
"n": 97
|
||||||
|
}
|
||||||
|
],
|
||||||
"atk": 18,
|
"atk": 18,
|
||||||
"def": 10,
|
"def": 10,
|
||||||
"hp": 25
|
"hp": 25
|
||||||
@ -326,8 +542,14 @@
|
|||||||
"37": {
|
"37": {
|
||||||
"id": 37,
|
"id": 37,
|
||||||
"renownlevel": 37,
|
"renownlevel": 37,
|
||||||
"maxlevel": 5000,
|
"maxlevel": 146500,
|
||||||
"cost": 101,
|
"cost": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "weiwang",
|
||||||
|
"n": 101
|
||||||
|
}
|
||||||
|
],
|
||||||
"atk": 18,
|
"atk": 18,
|
||||||
"def": 10,
|
"def": 10,
|
||||||
"hp": 25
|
"hp": 25
|
||||||
@ -335,8 +557,14 @@
|
|||||||
"38": {
|
"38": {
|
||||||
"id": 38,
|
"id": 38,
|
||||||
"renownlevel": 38,
|
"renownlevel": 38,
|
||||||
"maxlevel": 5000,
|
"maxlevel": 151500,
|
||||||
"cost": 105,
|
"cost": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "weiwang",
|
||||||
|
"n": 105
|
||||||
|
}
|
||||||
|
],
|
||||||
"atk": 18,
|
"atk": 18,
|
||||||
"def": 10,
|
"def": 10,
|
||||||
"hp": 25
|
"hp": 25
|
||||||
@ -344,8 +572,14 @@
|
|||||||
"39": {
|
"39": {
|
||||||
"id": 39,
|
"id": 39,
|
||||||
"renownlevel": 39,
|
"renownlevel": 39,
|
||||||
"maxlevel": 5000,
|
"maxlevel": 156500,
|
||||||
"cost": 109,
|
"cost": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "weiwang",
|
||||||
|
"n": 109
|
||||||
|
}
|
||||||
|
],
|
||||||
"atk": 18,
|
"atk": 18,
|
||||||
"def": 10,
|
"def": 10,
|
||||||
"hp": 25
|
"hp": 25
|
||||||
@ -353,8 +587,14 @@
|
|||||||
"40": {
|
"40": {
|
||||||
"id": 40,
|
"id": 40,
|
||||||
"renownlevel": 40,
|
"renownlevel": 40,
|
||||||
"maxlevel": 5000,
|
"maxlevel": 161500,
|
||||||
"cost": 113,
|
"cost": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "weiwang",
|
||||||
|
"n": 113
|
||||||
|
}
|
||||||
|
],
|
||||||
"atk": 18,
|
"atk": 18,
|
||||||
"def": 10,
|
"def": 10,
|
||||||
"hp": 25
|
"hp": 25
|
||||||
|
@ -106,6 +106,18 @@ type gc_clsl_com = {
|
|||||||
"divide": { "day": [number, number], "group": number, [x: string]: any }[], "divideTime": number, "fightTime": [number, number], "prizeTime": number, "fightWinPrize": { "total": number, "prize": { "a": string, "t": string, "n": number, [x: string]: any }[], "star": number, [x: string]: any }[], "fightNum": number, "vipBuyFightNum": [number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number], "buyFightNumNeed": { "a": string, "t": string, "n": number, [x: string]: any }[], "rankPrize": { "rank": [number, number], "prize": { "a": string, "t": string, "n": number, [x: string]: any }[], "title": string, [x: string]: any }[], "danPrize": { "star": number, "prize": { "a": string, "t": string, "n": number, [x: string]: any }[], [x: string]: any }[], "email_rank": { "title": string, "content": string, [x: string]: any }, "email_dan": { "title": string, "content": string, [x: string]: any }, [x: string]: any
|
"divide": { "day": [number, number], "group": number, [x: string]: any }[], "divideTime": number, "fightTime": [number, number], "prizeTime": number, "fightWinPrize": { "total": number, "prize": { "a": string, "t": string, "n": number, [x: string]: any }[], "star": number, [x: string]: any }[], "fightNum": number, "vipBuyFightNum": [number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number], "buyFightNumNeed": { "a": string, "t": string, "n": number, [x: string]: any }[], "rankPrize": { "rank": [number, number], "prize": { "a": string, "t": string, "n": number, [x: string]: any }[], "title": string, [x: string]: any }[], "danPrize": { "star": number, "prize": { "a": string, "t": string, "n": number, [x: string]: any }[], [x: string]: any }[], "email_rank": { "title": string, "content": string, [x: string]: any }, "email_dan": { "title": string, "content": string, [x: string]: any }, [x: string]: any
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type gc_renown_level = {
|
||||||
|
[id: string]: {
|
||||||
|
id: number,
|
||||||
|
renownlevel: number,
|
||||||
|
maxlevel: number,
|
||||||
|
cost: { "a": string, "t": string, "n": number, [x: string]: any }[],
|
||||||
|
atk: number,
|
||||||
|
def: number,
|
||||||
|
hp: number,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
type gc_clsl_dan = k_v<{
|
type gc_clsl_dan = k_v<{
|
||||||
/** 总星级 */
|
/** 总星级 */
|
||||||
'allStar': number
|
'allStar': number
|
||||||
@ -1946,7 +1958,7 @@ type gcType = {
|
|||||||
kfcb_prize: gc_kfcb_prize
|
kfcb_prize: gc_kfcb_prize
|
||||||
yuyuemail: gc_yuyuemail
|
yuyuemail: gc_yuyuemail
|
||||||
tuisonglibao: gc_push_gift
|
tuisonglibao: gc_push_gift
|
||||||
|
renown_level: gc_renown_level
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1957,4 +1969,3 @@ declare global {
|
|||||||
export function initGcType() {
|
export function initGcType() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -354,6 +354,8 @@ class Lng {
|
|||||||
nameyicunzai: "nameyicunzai";
|
nameyicunzai: "nameyicunzai";
|
||||||
ljlibaotips_8: "ljlibaotips_8";
|
ljlibaotips_8: "ljlibaotips_8";
|
||||||
|
|
||||||
|
weiwang_12: "weiwang_12";
|
||||||
|
|
||||||
"11111" = "globalThis.lng.chat_1"
|
"11111" = "globalThis.lng.chat_1"
|
||||||
// return call.error('', { code: -3, message: globalThis.lng.chat_2 });
|
// return call.error('', { code: -3, message: globalThis.lng.chat_2 });
|
||||||
}
|
}
|
9
src/module/collection_weiwang.ts
Normal file
9
src/module/collection_weiwang.ts
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
export type CollectionWeiwang = {
|
||||||
|
uid: string;
|
||||||
|
|
||||||
|
hp: number;
|
||||||
|
atk: number;
|
||||||
|
def: number;
|
||||||
|
|
||||||
|
buff: k_v<number>;
|
||||||
|
}
|
@ -60,6 +60,7 @@ import {CollectionRmbuse} from "./collection_rmbuse";
|
|||||||
import {CollectionFightLog} from "./collection_fightLog";
|
import {CollectionFightLog} from "./collection_fightLog";
|
||||||
import {CollectionShop} from "./collection_shop";
|
import {CollectionShop} from "./collection_shop";
|
||||||
import {CollectionPushGift} from "./collection_pushgift";
|
import {CollectionPushGift} from "./collection_pushgift";
|
||||||
|
import { CollectionWeiwang } from './collection_weiwang';
|
||||||
|
|
||||||
export type MongodbCollections = {
|
export type MongodbCollections = {
|
||||||
user: CollectionUser;
|
user: CollectionUser;
|
||||||
@ -136,4 +137,5 @@ export type MongodbCollections = {
|
|||||||
pushgift:CollectionPushGift
|
pushgift:CollectionPushGift
|
||||||
|
|
||||||
huodong_user: CollectionUser;
|
huodong_user: CollectionUser;
|
||||||
|
weiwang: CollectionWeiwang;
|
||||||
};
|
};
|
@ -2637,6 +2637,20 @@ export const serviceProto: ServiceProto<ServiceType> = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"optional": true
|
"optional": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 38,
|
||||||
|
"name": "weiwangbuff",
|
||||||
|
"type": {
|
||||||
|
"type": "Interface",
|
||||||
|
"indexSignature": {
|
||||||
|
"keyType": "String",
|
||||||
|
"type": {
|
||||||
|
"type": "Number"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"optional": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -101,8 +101,15 @@ export class FightFun {
|
|||||||
|
|
||||||
/**挑战npc */
|
/**挑战npc */
|
||||||
static async fightNpc(call: ApiCall, npcId: string | number, type: fightType, data?: joinFightData) {
|
static async fightNpc(call: ApiCall, npcId: string | number, type: fightType, data?: joinFightData) {
|
||||||
|
let ext_buff = {};
|
||||||
|
|
||||||
let my = data || await call.conn.getDefaultFightData();
|
if (["tanxian"].indexOf(type) != -1) {
|
||||||
|
// 威望buff
|
||||||
|
let weiwang = await G.mongodb.collection("weiwang").findOne({ uid: call.uid });
|
||||||
|
ext_buff["weiwangbuff"] = weiwang?.buff ? weiwang.buff : { "atk": 0, "def": 0, "hp": 0 };
|
||||||
|
}
|
||||||
|
|
||||||
|
let my = data || await call.conn.getDefaultFightData(undefined, ext_buff);
|
||||||
|
|
||||||
if (Object.keys(my.roles).length < 1) {
|
if (Object.keys(my.roles).length < 1) {
|
||||||
throw new TsrpcError('至少需要上阵一个英雄');
|
throw new TsrpcError('至少需要上阵一个英雄');
|
||||||
|
@ -330,10 +330,12 @@ import { ReqRenownBuy, ResRenownBuy } from './user/PtlRenownBuy';
|
|||||||
import { ReqRenownGetPrize, ResRenownGetPrize } from './user/PtlRenownGetPrize';
|
import { ReqRenownGetPrize, ResRenownGetPrize } from './user/PtlRenownGetPrize';
|
||||||
import { ReqRenownOpen, ResRenownOpen } from './user/PtlRenownOpen';
|
import { ReqRenownOpen, ResRenownOpen } from './user/PtlRenownOpen';
|
||||||
import { ReqTujian, ResTujian } from './user/PtlTujian';
|
import { ReqTujian, ResTujian } from './user/PtlTujian';
|
||||||
|
import { ReqOpen as ReqOpen_61, ResOpen as ResOpen_61 } from './weiwang/PtlOpen';
|
||||||
|
import { ReqUpLv, ResUpLv } from './weiwang/PtlUpLv';
|
||||||
import { ReqDecompose, ResDecompose } from './weixiuchang/PtlDecompose';
|
import { ReqDecompose, ResDecompose } from './weixiuchang/PtlDecompose';
|
||||||
import { ReqExchange as ReqExchange_1, ResExchange as ResExchange_1 } from './weixiuchang/PtlExchange';
|
import { ReqExchange as ReqExchange_1, ResExchange as ResExchange_1 } from './weixiuchang/PtlExchange';
|
||||||
import { ReqOpen as ReqOpen_61, ResOpen as ResOpen_61 } from './weixiuchang/PtlOpen';
|
import { ReqOpen as ReqOpen_62, ResOpen as ResOpen_62 } from './weixiuchang/PtlOpen';
|
||||||
import { ReqUpLv, ResUpLv } from './weixiuchang/PtlUpLv';
|
import { ReqUpLv as ReqUpLv_1, ResUpLv as ResUpLv_1 } from './weixiuchang/PtlUpLv';
|
||||||
import { ReqUpStar, ResUpStar } from './weixiuchang/PtlUpStar';
|
import { ReqUpStar, ResUpStar } from './weixiuchang/PtlUpStar';
|
||||||
import { ReqAutoBaoMing, ResAutoBaoMing } from './wzry/PtlAutoBaoMing';
|
import { ReqAutoBaoMing, ResAutoBaoMing } from './wzry/PtlAutoBaoMing';
|
||||||
import { ReqBaoMing, ResBaoMing } from './wzry/PtlBaoMing';
|
import { ReqBaoMing, ResBaoMing } from './wzry/PtlBaoMing';
|
||||||
@ -343,7 +345,7 @@ import { ReqDldFight, ResDldFight } from './wzry/PtlDldFight';
|
|||||||
import { ReqDldRefre, ResDldRefre } from './wzry/PtlDldRefre';
|
import { ReqDldRefre, ResDldRefre } from './wzry/PtlDldRefre';
|
||||||
import { ReqJingCai, ResJingCai } from './wzry/PtlJingCai';
|
import { ReqJingCai, ResJingCai } from './wzry/PtlJingCai';
|
||||||
import { ReqJingCaiOpen, ResJingCaiOpen } from './wzry/PtlJingCaiOpen';
|
import { ReqJingCaiOpen, ResJingCaiOpen } from './wzry/PtlJingCaiOpen';
|
||||||
import { ReqOpen as ReqOpen_62, ResOpen as ResOpen_62 } from './wzry/PtlOpen';
|
import { ReqOpen as ReqOpen_63, ResOpen as ResOpen_63 } from './wzry/PtlOpen';
|
||||||
import { ReqUpdateFight, ResUpdateFight } from './wzry/PtlUpdateFight';
|
import { ReqUpdateFight, ResUpdateFight } from './wzry/PtlUpdateFight';
|
||||||
import { ReqWzzd, ResWzzd } from './wzry/PtlWzzd';
|
import { ReqWzzd, ResWzzd } from './wzry/PtlWzzd';
|
||||||
import { ReqZuanShiOpen, ResZuanShiOpen } from './wzry/PtlZuanShiOpen';
|
import { ReqZuanShiOpen, ResZuanShiOpen } from './wzry/PtlZuanShiOpen';
|
||||||
@ -351,7 +353,7 @@ import { ReqAllGet, ResAllGet } from './xstask/PtlAllGet';
|
|||||||
import { ReqGet as ReqGet_3, ResGet as ResGet_3 } from './xstask/PtlGet';
|
import { ReqGet as ReqGet_3, ResGet as ResGet_3 } from './xstask/PtlGet';
|
||||||
import { ReqLvUp as ReqLvUp_4, ResLvUp as ResLvUp_4 } from './xstask/PtlLvUp';
|
import { ReqLvUp as ReqLvUp_4, ResLvUp as ResLvUp_4 } from './xstask/PtlLvUp';
|
||||||
import { ReqOnekeyReceive, ResOnekeyReceive } from './xstask/PtlOnekeyReceive';
|
import { ReqOnekeyReceive, ResOnekeyReceive } from './xstask/PtlOnekeyReceive';
|
||||||
import { ReqOpen as ReqOpen_63, ResOpen as ResOpen_63 } from './xstask/PtlOpen';
|
import { ReqOpen as ReqOpen_64, ResOpen as ResOpen_64 } from './xstask/PtlOpen';
|
||||||
import { ReqReceive as ReqReceive_10, ResReceive as ResReceive_10 } from './xstask/PtlReceive';
|
import { ReqReceive as ReqReceive_10, ResReceive as ResReceive_10 } from './xstask/PtlReceive';
|
||||||
import { ReqRefresh as ReqRefresh_8, ResRefresh as ResRefresh_8 } from './xstask/PtlRefresh';
|
import { ReqRefresh as ReqRefresh_8, ResRefresh as ResRefresh_8 } from './xstask/PtlRefresh';
|
||||||
import { ReqHandle, ResHandle } from './yongbingzhuzhan/PtlHandle';
|
import { ReqHandle, ResHandle } from './yongbingzhuzhan/PtlHandle';
|
||||||
@ -1569,6 +1571,14 @@ export interface ServiceType {
|
|||||||
req: ReqTujian,
|
req: ReqTujian,
|
||||||
res: ResTujian
|
res: ResTujian
|
||||||
},
|
},
|
||||||
|
"weiwang/Open": {
|
||||||
|
req: ReqOpen_61,
|
||||||
|
res: ResOpen_61
|
||||||
|
},
|
||||||
|
"weiwang/UpLv": {
|
||||||
|
req: ReqUpLv,
|
||||||
|
res: ResUpLv
|
||||||
|
},
|
||||||
"weixiuchang/Decompose": {
|
"weixiuchang/Decompose": {
|
||||||
req: ReqDecompose,
|
req: ReqDecompose,
|
||||||
res: ResDecompose
|
res: ResDecompose
|
||||||
@ -1578,12 +1588,12 @@ export interface ServiceType {
|
|||||||
res: ResExchange_1
|
res: ResExchange_1
|
||||||
},
|
},
|
||||||
"weixiuchang/Open": {
|
"weixiuchang/Open": {
|
||||||
req: ReqOpen_61,
|
req: ReqOpen_62,
|
||||||
res: ResOpen_61
|
res: ResOpen_62
|
||||||
},
|
},
|
||||||
"weixiuchang/UpLv": {
|
"weixiuchang/UpLv": {
|
||||||
req: ReqUpLv,
|
req: ReqUpLv_1,
|
||||||
res: ResUpLv
|
res: ResUpLv_1
|
||||||
},
|
},
|
||||||
"weixiuchang/UpStar": {
|
"weixiuchang/UpStar": {
|
||||||
req: ReqUpStar,
|
req: ReqUpStar,
|
||||||
@ -1622,8 +1632,8 @@ export interface ServiceType {
|
|||||||
res: ResJingCaiOpen
|
res: ResJingCaiOpen
|
||||||
},
|
},
|
||||||
"wzry/Open": {
|
"wzry/Open": {
|
||||||
req: ReqOpen_62,
|
req: ReqOpen_63,
|
||||||
res: ResOpen_62
|
res: ResOpen_63
|
||||||
},
|
},
|
||||||
"wzry/UpdateFight": {
|
"wzry/UpdateFight": {
|
||||||
req: ReqUpdateFight,
|
req: ReqUpdateFight,
|
||||||
@ -1654,8 +1664,8 @@ export interface ServiceType {
|
|||||||
res: ResOnekeyReceive
|
res: ResOnekeyReceive
|
||||||
},
|
},
|
||||||
"xstask/Open": {
|
"xstask/Open": {
|
||||||
req: ReqOpen_63,
|
req: ReqOpen_64,
|
||||||
res: ResOpen_63
|
res: ResOpen_64
|
||||||
},
|
},
|
||||||
"xstask/Receive": {
|
"xstask/Receive": {
|
||||||
req: ReqReceive_10,
|
req: ReqReceive_10,
|
||||||
@ -3488,141 +3498,151 @@ export const serviceProto: ServiceProto<ServiceType> = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 331,
|
"id": 331,
|
||||||
"name": "weixiuchang/Decompose",
|
"name": "weiwang/Open",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 332,
|
"id": 332,
|
||||||
"name": "weixiuchang/Exchange",
|
"name": "weiwang/UpLv",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 333,
|
"id": 333,
|
||||||
"name": "weixiuchang/Open",
|
"name": "weixiuchang/Decompose",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 334,
|
"id": 334,
|
||||||
"name": "weixiuchang/UpLv",
|
"name": "weixiuchang/Exchange",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 335,
|
"id": 335,
|
||||||
"name": "weixiuchang/UpStar",
|
"name": "weixiuchang/Open",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 336,
|
"id": 336,
|
||||||
"name": "wzry/AutoBaoMing",
|
"name": "weixiuchang/UpLv",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 337,
|
"id": 337,
|
||||||
"name": "wzry/BaoMing",
|
"name": "weixiuchang/UpStar",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 338,
|
"id": 338,
|
||||||
"name": "wzry/catFightLog",
|
"name": "wzry/AutoBaoMing",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 339,
|
"id": 339,
|
||||||
"name": "wzry/CatGroup",
|
"name": "wzry/BaoMing",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 340,
|
"id": 340,
|
||||||
"name": "wzry/DldFight",
|
"name": "wzry/catFightLog",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 341,
|
"id": 341,
|
||||||
"name": "wzry/DldRefre",
|
"name": "wzry/CatGroup",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 342,
|
"id": 342,
|
||||||
"name": "wzry/JingCai",
|
"name": "wzry/DldFight",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 343,
|
"id": 343,
|
||||||
"name": "wzry/JingCaiOpen",
|
"name": "wzry/DldRefre",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 344,
|
"id": 344,
|
||||||
"name": "wzry/Open",
|
"name": "wzry/JingCai",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 345,
|
"id": 345,
|
||||||
"name": "wzry/UpdateFight",
|
"name": "wzry/JingCaiOpen",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 346,
|
"id": 346,
|
||||||
"name": "wzry/Wzzd",
|
"name": "wzry/Open",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 347,
|
"id": 347,
|
||||||
"name": "wzry/ZuanShiOpen",
|
"name": "wzry/UpdateFight",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 348,
|
"id": 348,
|
||||||
"name": "xstask/AllGet",
|
"name": "wzry/Wzzd",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 349,
|
"id": 349,
|
||||||
"name": "xstask/Get",
|
"name": "wzry/ZuanShiOpen",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 350,
|
"id": 350,
|
||||||
"name": "xstask/LvUp",
|
"name": "xstask/AllGet",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 351,
|
"id": 351,
|
||||||
"name": "xstask/OnekeyReceive",
|
"name": "xstask/Get",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 352,
|
"id": 352,
|
||||||
"name": "xstask/Open",
|
"name": "xstask/LvUp",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 353,
|
"id": 353,
|
||||||
"name": "xstask/Receive",
|
"name": "xstask/OnekeyReceive",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 354,
|
"id": 354,
|
||||||
"name": "xstask/Refresh",
|
"name": "xstask/Open",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 355,
|
"id": 355,
|
||||||
"name": "yongbingzhuzhan/Handle",
|
"name": "xstask/Receive",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 356,
|
"id": 356,
|
||||||
"name": "zhanqianbushu/ChangePos",
|
"name": "xstask/Refresh",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 357,
|
"id": 357,
|
||||||
"name": "zhanqianbushu/Select",
|
"name": "yongbingzhuzhan/Handle",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 358,
|
"id": 358,
|
||||||
|
"name": "zhanqianbushu/ChangePos",
|
||||||
|
"type": "api"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 359,
|
||||||
|
"name": "zhanqianbushu/Select",
|
||||||
|
"type": "api"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 360,
|
||||||
"name": "zhanqianbushu/Up",
|
"name": "zhanqianbushu/Up",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
}
|
}
|
||||||
@ -4565,6 +4585,20 @@ export const serviceProto: ServiceProto<ServiceType> = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"optional": true
|
"optional": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 38,
|
||||||
|
"name": "weiwangbuff",
|
||||||
|
"type": {
|
||||||
|
"type": "Interface",
|
||||||
|
"indexSignature": {
|
||||||
|
"keyType": "String",
|
||||||
|
"type": {
|
||||||
|
"type": "Number"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"optional": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -5809,6 +5843,20 @@ export const serviceProto: ServiceProto<ServiceType> = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"optional": true
|
"optional": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 38,
|
||||||
|
"name": "weiwangbuff",
|
||||||
|
"type": {
|
||||||
|
"type": "Interface",
|
||||||
|
"indexSignature": {
|
||||||
|
"keyType": "String",
|
||||||
|
"type": {
|
||||||
|
"type": "Number"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"optional": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -22088,6 +22136,121 @@ export const serviceProto: ServiceProto<ServiceType> = {
|
|||||||
"user/PtlTujian/ResTujian": {
|
"user/PtlTujian/ResTujian": {
|
||||||
"type": "Interface"
|
"type": "Interface"
|
||||||
},
|
},
|
||||||
|
"weiwang/PtlOpen/ReqOpen": {
|
||||||
|
"type": "Interface"
|
||||||
|
},
|
||||||
|
"weiwang/PtlOpen/ResOpen": {
|
||||||
|
"type": "Interface",
|
||||||
|
"properties": [
|
||||||
|
{
|
||||||
|
"id": 0,
|
||||||
|
"name": "lv",
|
||||||
|
"type": {
|
||||||
|
"type": "Interface",
|
||||||
|
"properties": [
|
||||||
|
{
|
||||||
|
"id": 0,
|
||||||
|
"name": "hp",
|
||||||
|
"type": {
|
||||||
|
"type": "Number"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 1,
|
||||||
|
"name": "atk",
|
||||||
|
"type": {
|
||||||
|
"type": "Number"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 2,
|
||||||
|
"name": "def",
|
||||||
|
"type": {
|
||||||
|
"type": "Number"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"weiwang/PtlUpLv/ReqUpLv": {
|
||||||
|
"type": "Interface",
|
||||||
|
"properties": [
|
||||||
|
{
|
||||||
|
"id": 0,
|
||||||
|
"name": "lv",
|
||||||
|
"type": {
|
||||||
|
"type": "Number"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 1,
|
||||||
|
"name": "type",
|
||||||
|
"type": {
|
||||||
|
"type": "Union",
|
||||||
|
"members": [
|
||||||
|
{
|
||||||
|
"id": 0,
|
||||||
|
"type": {
|
||||||
|
"type": "Literal",
|
||||||
|
"literal": "hp"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 1,
|
||||||
|
"type": {
|
||||||
|
"type": "Literal",
|
||||||
|
"literal": "atk"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 2,
|
||||||
|
"type": {
|
||||||
|
"type": "Literal",
|
||||||
|
"literal": "def"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"weiwang/PtlUpLv/ResUpLv": {
|
||||||
|
"type": "Interface",
|
||||||
|
"properties": [
|
||||||
|
{
|
||||||
|
"id": 0,
|
||||||
|
"name": "lv",
|
||||||
|
"type": {
|
||||||
|
"type": "Interface",
|
||||||
|
"properties": [
|
||||||
|
{
|
||||||
|
"id": 0,
|
||||||
|
"name": "hp",
|
||||||
|
"type": {
|
||||||
|
"type": "Number"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 1,
|
||||||
|
"name": "atk",
|
||||||
|
"type": {
|
||||||
|
"type": "Number"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 2,
|
||||||
|
"name": "def",
|
||||||
|
"type": {
|
||||||
|
"type": "Number"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
"weixiuchang/PtlDecompose/ReqDecompose": {
|
"weixiuchang/PtlDecompose/ReqDecompose": {
|
||||||
"type": "Interface",
|
"type": "Interface",
|
||||||
"properties": [
|
"properties": [
|
||||||
@ -24281,6 +24444,20 @@ export const serviceProto: ServiceProto<ServiceType> = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"optional": true
|
"optional": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 38,
|
||||||
|
"name": "weiwangbuff",
|
||||||
|
"type": {
|
||||||
|
"type": "Interface",
|
||||||
|
"indexSignature": {
|
||||||
|
"keyType": "String",
|
||||||
|
"type": {
|
||||||
|
"type": "Number"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"optional": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -193,4 +193,6 @@ export type playerAppend = {
|
|||||||
chatFrames?: {
|
chatFrames?: {
|
||||||
[id: string]: number;
|
[id: string]: number;
|
||||||
};
|
};
|
||||||
|
/**威望额外属性*/
|
||||||
|
weiwangbuff?: { [k: string]: number };
|
||||||
};
|
};
|
11
src/shared/protocols/weiwang/PtlOpen.ts
Normal file
11
src/shared/protocols/weiwang/PtlOpen.ts
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
export interface ReqOpen {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ResOpen {
|
||||||
|
lv: {
|
||||||
|
hp: number
|
||||||
|
atk: number
|
||||||
|
def: number
|
||||||
|
}
|
||||||
|
}
|
12
src/shared/protocols/weiwang/PtlUpLv.ts
Normal file
12
src/shared/protocols/weiwang/PtlUpLv.ts
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
export interface ReqUpLv {
|
||||||
|
lv: number
|
||||||
|
type: "hp" | "atk" | "def"
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ResUpLv {
|
||||||
|
lv: {
|
||||||
|
hp: number
|
||||||
|
atk: number
|
||||||
|
def: number
|
||||||
|
}
|
||||||
|
}
|
@ -278,6 +278,11 @@ export class HeroShared {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 威望加成计算
|
||||||
|
if (otherBuff?.weiwangbuff) {
|
||||||
|
PublicShared.mergeProperty(buff, otherBuff?.weiwangbuff || {});
|
||||||
|
}
|
||||||
|
|
||||||
//最后进行加成属性计算
|
//最后进行加成属性计算
|
||||||
for (let k in buff) {
|
for (let k in buff) {
|
||||||
if (k.indexOf('pro') == -1) continue;
|
if (k.indexOf('pro') == -1) continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user