fix:
丛林猎手优化
This commit is contained in:
parent
6be02bee61
commit
686f1fafc6
@ -1,16 +1,48 @@
|
|||||||
import { ApiCall } from "tsrpc";
|
import { ApiCall } from "tsrpc";
|
||||||
import { ReqFindEnemy, ResFindEnemy } from "../../cross/protocols/clsl/PtlFindEnemy";
|
import { ReqFindEnemy, ResFindEnemy } from "../../cross/protocols/clsl/PtlFindEnemy";
|
||||||
import { formatNpcData } from '../../shared/fightControl/fightFun';
|
import { formatNpcData } from '../../shared/fightControl/fightFun';
|
||||||
|
import { PublicShared } from "../../shared/public/public";
|
||||||
|
|
||||||
export default async function (call: ApiCall<ReqFindEnemy, ResFindEnemy>) {
|
export default async function (call: ApiCall<ReqFindEnemy, ResFindEnemy>) {
|
||||||
let my = await G.mongodb.collection('clslCrossUser').findOne({ uid: call.req.uid });
|
let p = PublicShared.randomNum(1, 1000);
|
||||||
let starConf = getStarConf(my.allStar);
|
let starConf = getStarConf(call.req.myStasr);
|
||||||
let others = await G.mongodb.collection('clslCrossUser').find({ uid: { $nin: [call.req.uid] } }).toArray();
|
|
||||||
let enemy = others.random();
|
let enemy: { allStar: number, info: any };
|
||||||
|
|
||||||
|
// 本次随机到npc概率判断
|
||||||
|
if (p <= starConf.pro * 1000) {
|
||||||
|
enemy = {
|
||||||
|
allStar: call.req.myStasr,
|
||||||
|
info: formatNpcData(starConf.npc)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// 在自定范围内随机一个对手
|
||||||
|
let others = await G.mongodb.collection("clslCrossUser").aggregate([
|
||||||
|
{
|
||||||
|
$match: [
|
||||||
|
{ allStar: { $gte: starConf.fighter[0], $lte: starConf.fighter[1] } }
|
||||||
|
],
|
||||||
|
$sample: { size: 1 }
|
||||||
|
}
|
||||||
|
|
||||||
|
]).toArray();
|
||||||
|
|
||||||
|
if (others.length <= 0) {
|
||||||
|
enemy = {
|
||||||
|
allStar: call.req.myStasr,
|
||||||
|
info: formatNpcData(starConf.npc)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
enemy = {
|
||||||
|
allStar: others[0].allStar,
|
||||||
|
info: others[0].info,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
call.succ({
|
call.succ({
|
||||||
allStar: enemy?.allStar || my.allStar,
|
allStar: enemy.allStar,
|
||||||
info: enemy?.info || formatNpcData(starConf.npc)
|
info: enemy.info || formatNpcData(starConf.npc)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ import { FightFun } from '../../public/fight';
|
|||||||
|
|
||||||
export default async function (call: ApiCall<ReqLog, ResLog>) {
|
export default async function (call: ApiCall<ReqLog, ResLog>) {
|
||||||
if (call.req.result) {
|
if (call.req.result) {
|
||||||
// FightFun.saveLog(call.req.uid, 'clsl', call.req.result);
|
FightFun.saveLog(call.req.uid, 'clsl', call.req.result);
|
||||||
call.succ({});
|
call.succ({});
|
||||||
} else {
|
} else {
|
||||||
call.succ({
|
call.succ({
|
||||||
|
@ -1,10 +1,35 @@
|
|||||||
import { ApiCall } from "tsrpc";
|
import { ApiCall } from "tsrpc";
|
||||||
import { ReqRank, ResRank } from "../../cross/protocols/clsl/PtlRank";
|
import { ReqRank, ResRank } from "../../cross/protocols/clsl/PtlRank";
|
||||||
import { Rank } from '../../public/rank/rank';
|
import { Rank } from '../../public/rank/rank';
|
||||||
|
import { PublicShared } from "../../shared/public/public";
|
||||||
|
import { RankClslCross } from "../../public/rank/rank_clsl";
|
||||||
|
|
||||||
export default async function (call: ApiCall<ReqRank, ResRank>) {
|
export default async function (call: ApiCall<ReqRank, ResRank>) {
|
||||||
|
let group_time = G.gc.clsl_com.divideTime;
|
||||||
|
let week_zero_time = PublicShared.getToWeekMondayZeroTime();
|
||||||
|
|
||||||
|
if (G.time < week_zero_time + group_time) {
|
||||||
|
call.succ({ rankList: [], myRank: { rank: -1, player: {}, valArr: [] } })
|
||||||
|
}
|
||||||
|
|
||||||
|
let a = await G.mongodb.collection('clslCrossUser').findOne({
|
||||||
|
uid: call.req.uid
|
||||||
|
});
|
||||||
|
|
||||||
|
if (!a){
|
||||||
|
call.succ({ rankList: [], myRank: { rank: -1, player: {}, valArr: [] } })
|
||||||
|
}
|
||||||
|
|
||||||
|
let rank: Rank;
|
||||||
|
if (Rank.list[`clslCross_${a.group}`]) {
|
||||||
|
rank = Rank.list[`clslCross_${a.group}`]
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
rank = new RankClslCross(a.group)
|
||||||
|
}
|
||||||
|
|
||||||
let page = call.req.page || 0
|
let page = call.req.page || 0
|
||||||
let offset = call.req.offset || -1 // 预防未查询到的调用,按原逻辑查询全部,避免引起未知问题
|
let offset = call.req.offset || -1 // 预防未查询到的调用,按原逻辑查询全部,避免引起未知问题
|
||||||
let {min, max} = Rank.pageToMin(page, offset)
|
let { min, max } = Rank.pageToMin(page, offset)
|
||||||
call.succ(await Rank.list.clslCross.getRankList(call.req.gud.uid, { min, max }));
|
call.succ(await rank.getRankList(call.req.uid, { min, max }));
|
||||||
}
|
}
|
@ -1,9 +0,0 @@
|
|||||||
import { ApiCall } from "tsrpc";
|
|
||||||
import { ReqRankUids, ResRankUids } from "../../cross/protocols/clsl/PtlRankUids";
|
|
||||||
import { Rank } from '../../public/rank/rank';
|
|
||||||
|
|
||||||
export default async function (call: ApiCall<ReqRankUids, ResRankUids>) {
|
|
||||||
// 返回排名的uids, 应用场景是定时器发送奖励,不分页。
|
|
||||||
let uids = await Rank.list.clslCross.getRankListIdKeyAll()
|
|
||||||
call.succ({uids});
|
|
||||||
}
|
|
@ -1,23 +1,41 @@
|
|||||||
import { ApiCall } from "tsrpc";
|
import { ApiCall } from "tsrpc";
|
||||||
import { ReqUpLoad, ResUpLoad } from "../../cross/protocols/clsl/PtlUpLoad";
|
import { ReqUpLoad, ResUpLoad } from "../../cross/protocols/clsl/PtlUpLoad";
|
||||||
import { Rank } from '../../public/rank/rank';
|
import { Rank } from '../../public/rank/rank';
|
||||||
|
import { PublicShared } from "../../shared/public/public";
|
||||||
|
import { RankClslCross } from "../../public/rank/rank_clsl";
|
||||||
|
|
||||||
export default async function (call: ApiCall<ReqUpLoad, ResUpLoad>) {
|
export default async function (call: ApiCall<ReqUpLoad, ResUpLoad>) {
|
||||||
let { allStar, uid, ...ops } = call.req;
|
let { allStar, uid, ...ops } = call.req;
|
||||||
|
|
||||||
let a = await G.mongodb.collection('clslCrossUser').findOneAndUpdate(
|
let a = (await G.mongodb.collection('clslCrossUser').findOneAndUpdate(
|
||||||
{ uid: uid },
|
{ uid: uid },
|
||||||
{
|
{
|
||||||
$inc: { allStar: allStar || 0 },
|
$inc: { allStar: allStar || 0 },
|
||||||
$set: ops
|
$set: ops
|
||||||
},
|
},
|
||||||
{ upsert: true }
|
{ upsert: true, returnDocument: "after" }
|
||||||
);
|
)).value;
|
||||||
|
|
||||||
if (allStar != undefined && ops.info) {
|
let week = PublicShared.getToWeek();
|
||||||
Rank.list.clslCross.addNew({
|
let group_time = G.gc.clsl_com.divideTime;
|
||||||
player: a.value.info.player,
|
let week_zero_time = PublicShared.getToWeekMondayZeroTime();
|
||||||
valArr: [(await G.mongodb.collection('clslCrossUser').findOne({ uid: uid })).allStar]
|
|
||||||
});
|
if (G.time > week_zero_time + group_time) {
|
||||||
|
if (!a.group){
|
||||||
|
|
||||||
|
}
|
||||||
|
if (allStar != undefined && ops.info) {
|
||||||
|
let rank;
|
||||||
|
if (Rank.list[`clslCross_${a.group}`]) {
|
||||||
|
rank = Rank.list[`clslCross_${a.group}`]
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
rank = new RankClslCross(a.group)
|
||||||
|
}
|
||||||
|
rank.addNew({
|
||||||
|
player: a.info.player,
|
||||||
|
valArr: [a.allStar, a.info.player.power]
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,43 +1,90 @@
|
|||||||
import {ApiCall} from "tsrpc";
|
import { ApiCall } from "tsrpc";
|
||||||
import {FightFun} from '../../public/fight';
|
import { FightFun } from '../../public/fight';
|
||||||
import {PlayerFun} from '../../public/player';
|
import { PlayerFun } from '../../public/player';
|
||||||
import {ReqFind, ResFind} from "../../shared/protocols/conglinshoulie/PtlFind";
|
import { ReqFind, ResFind } from "../../shared/protocols/conglinshoulie/PtlFind";
|
||||||
import {PublicShared} from '../../shared/public/public';
|
import { PublicShared } from '../../shared/public/public';
|
||||||
import {addStar, clslDb} from './ApiOpen';
|
import { addStar, clslDb } from './ApiOpen';
|
||||||
|
import { EmailFun } from "../../public/email";
|
||||||
|
|
||||||
export default async function (call: ApiCall<ReqFind, ResFind>) {
|
export default async function (call: ApiCall<ReqFind, ResFind>) {
|
||||||
let weekZeroTime = PublicShared.getToWeekMondayZeroTime();
|
let weekZeroTime = PublicShared.getToWeekMondayZeroTime();
|
||||||
if (G.time < weekZeroTime + G.gc.clsl_com.fightTime[0] || G.time > weekZeroTime + G.gc.clsl_com.fightTime[1]) return call.errorCode(-1);
|
|
||||||
|
|
||||||
let db = await clslDb().findOne({uid: call.uid, type: 'clsl'});
|
// 未到开启时间
|
||||||
|
if (G.time < weekZeroTime + G.gc.clsl_com.fightTime[0] || G.time > weekZeroTime + G.gc.clsl_com.fightTime[1]) {
|
||||||
|
return call.errorCode(-1)
|
||||||
|
};
|
||||||
|
|
||||||
|
// 获取自己的数据
|
||||||
|
let db = await clslDb().findOne({ uid: call.uid, type: 'clsl' });
|
||||||
|
|
||||||
let curStar = db?.allStar || 0;
|
let curStar = db?.allStar || 0;
|
||||||
let useNum = db?.useFightNum || 0;
|
let useNum = db?.useFightNum || 0;
|
||||||
let buyNum = db?.buyFightNum || 0;
|
let buyNum = db?.buyFightNum || 0;
|
||||||
let starConf = G.gc.clsl_dan[curStar] || Object.values(G.gc.clsl_dan).slice(-1)[0];
|
let danPrize = db?.danPrize || [];
|
||||||
|
let curMaxStar = db?.curMaxStar || 0;
|
||||||
|
|
||||||
if (useNum >= buyNum + G.gc.clsl_com.fightNum) return call.errorCode(-2);
|
// 战斗次数不足
|
||||||
|
if (useNum >= buyNum + G.gc.clsl_com.fightNum) {
|
||||||
let my = await call.conn.getDefaultFightData();
|
return call.errorCode(-2);
|
||||||
let other = (await G.clientCross.callApi('clsl/FindEnemy', {uid: call.uid})).res;
|
|
||||||
let result = FightFun.fight([my, other.info]);
|
|
||||||
|
|
||||||
if ((result.winSide != 0 && starConf.failCut) || result.winSide == 0) {
|
|
||||||
addStar(call, result.winSide == 0 ? 1 : -starConf.failCut, my);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
result.initData[0].star = curStar
|
// 自己战斗数据
|
||||||
result.initData[1].star = other.allStar
|
let my = await call.conn.getDefaultFightData();
|
||||||
|
|
||||||
result.winSide == 0 && clslDb().updateOne({uid: call.uid, type: 'clsl'}, {$inc: {fightWinNum: 1}});
|
// 获取一个对手
|
||||||
clslDb().updateOne({uid: call.uid, type: 'clsl'}, {$inc: {useFightNum: 1}});
|
let other = (await G.clientCross.callApi('clsl/FindEnemy', { uid: call.uid, myStasr: curStar })).res;
|
||||||
|
|
||||||
|
let result = FightFun.fight([my, other.info]);
|
||||||
|
|
||||||
|
let starConf = G.gc.clsl_dan[curStar] || Object.values(G.gc.clsl_dan).slice(-1)[0];
|
||||||
|
|
||||||
|
let updata = { $inc: { useFightNum: 1 } };
|
||||||
|
|
||||||
|
// 更新战斗胜利的次数
|
||||||
|
if (result.winSide == 0) {
|
||||||
|
updata.$inc["fightWinNum"] = 1;
|
||||||
|
|
||||||
|
// 首次达到某个段位
|
||||||
|
if (curStar + 1 > curMaxStar) {
|
||||||
|
curMaxStar += 1;
|
||||||
|
updata.$inc["curMaxStar"] = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 段位奖励邮件
|
||||||
|
let title = G.gc.clsl_com.email_dan.title;
|
||||||
|
let content = G.gc.clsl_com.email_dan.content;
|
||||||
|
G.gc.clsl_com.danPrize.forEach(conf => {
|
||||||
|
// 段位未达到 或者 奖励已经发放
|
||||||
|
if (conf.star > curMaxStar || danPrize.includes[conf.star]) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// 发放邮件
|
||||||
|
EmailFun.addEmail({
|
||||||
|
uid: call.uid,
|
||||||
|
type: 'system',
|
||||||
|
title: title,
|
||||||
|
content: content,
|
||||||
|
prize: conf.prize,
|
||||||
|
})
|
||||||
|
|
||||||
|
danPrize.push(conf.star);
|
||||||
|
updata["$set"] = { danPrize: danPrize };
|
||||||
|
})
|
||||||
|
|
||||||
|
// 输了掉星 或者 赢了加星 同时更新排行数据
|
||||||
|
addStar(call, result.winSide == 0 ? 1 : -starConf.failCut, my, updata);
|
||||||
|
|
||||||
|
result.initData[0].star = curStar;
|
||||||
|
result.initData[1].star = other.allStar;
|
||||||
|
|
||||||
|
// 发送战斗奖励
|
||||||
await PlayerFun.sendPrize(call, starConf.fightPrize);
|
await PlayerFun.sendPrize(call, starConf.fightPrize);
|
||||||
|
|
||||||
G.clientCross?.callApi('clsl/Log', {uid: call.uid, result: result});
|
// 记录战斗日志
|
||||||
G.clientCross?.callApi('clsl/Log', {uid: other.info.player.uid, result: result});
|
G.clientCross?.callApi('clsl/Log', { uid: call.uid, result: result });
|
||||||
|
G.clientCross?.callApi('clsl/Log', { uid: other.info.player.uid, result: result });
|
||||||
|
|
||||||
call.succ({
|
call.succ({ enemy: other, result: result });
|
||||||
enemy: other,
|
|
||||||
result: result
|
|
||||||
});
|
|
||||||
}
|
}
|
@ -9,8 +9,8 @@ export default async function (call: ApiCall<ReqOpen, ResOpen>) {
|
|||||||
let db = await clslDb().findOne({ uid: call.uid, type: 'clsl' });
|
let db = await clslDb().findOne({ uid: call.uid, type: 'clsl' });
|
||||||
let { _id, uid, type, ...ops } = db || {} as WithId<OptionalId<CollectionPlayerInfo<"clsl">>>;
|
let { _id, uid, type, ...ops } = db || {} as WithId<OptionalId<CollectionPlayerInfo<"clsl">>>;
|
||||||
|
|
||||||
|
// 刷新 挑战次数、购买挑战次数、胜利次数任务
|
||||||
if (!db || ops?.refreshTime < PublicShared.getToDayZeroTime()) {
|
if (!db || ops?.refreshTime < PublicShared.getToDayZeroTime()) {
|
||||||
|
|
||||||
let change: Partial<typeof ops> = {
|
let change: Partial<typeof ops> = {
|
||||||
refreshTime: G.time,
|
refreshTime: G.time,
|
||||||
useFightNum: 0,
|
useFightNum: 0,
|
||||||
@ -30,6 +30,8 @@ export default async function (call: ApiCall<ReqOpen, ResOpen>) {
|
|||||||
|
|
||||||
call.succ({
|
call.succ({
|
||||||
allStar: ops?.allStar || 0,
|
allStar: ops?.allStar || 0,
|
||||||
|
danPrize: ops?.danPrize || [],
|
||||||
|
curMaxStar: ops?.curMaxStar || 0,
|
||||||
buyFightNum: ops?.buyFightNum || 0,
|
buyFightNum: ops?.buyFightNum || 0,
|
||||||
useFightNum: ops?.useFightNum || 0,
|
useFightNum: ops?.useFightNum || 0,
|
||||||
fightWinNum: ops?.fightWinNum || 0,
|
fightWinNum: ops?.fightWinNum || 0,
|
||||||
@ -41,7 +43,15 @@ export function clslDb() {
|
|||||||
return G.mongodb.cPlayerInfo('clsl');
|
return G.mongodb.cPlayerInfo('clsl');
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function addStar(call: ApiCall, star: number, info?: joinFightData) {
|
export async function addStar(call: ApiCall, star: number, info?: joinFightData, update?: any) {
|
||||||
clslDb().updateOne({ uid: call.uid, type: 'clsl' }, { $inc: { allStar: star } }, { upsert: true });
|
update = update || {};
|
||||||
|
|
||||||
|
if (update.$inc) {
|
||||||
|
update.$inc["allStar"] = star
|
||||||
|
} else {
|
||||||
|
update["$inc"] = { allStar: star }
|
||||||
|
}
|
||||||
|
|
||||||
|
clslDb().updateOne({ uid: call.uid, type: 'clsl' }, update, { upsert: true });
|
||||||
G.clientCross.callApi('clsl/UpLoad', { uid: call.uid, allStar: star, info: info || await call.conn.getDefaultFightData() });
|
G.clientCross.callApi('clsl/UpLoad', { uid: call.uid, allStar: star, info: info || await call.conn.getDefaultFightData() });
|
||||||
}
|
}
|
@ -4,6 +4,7 @@ import { Rank } from '../../public/rank/rank';
|
|||||||
import { ReqOpen, ResOpen } from "../../shared/protocols/rank/PtlOpen";
|
import { ReqOpen, ResOpen } from "../../shared/protocols/rank/PtlOpen";
|
||||||
import { getToper50RankInfo } from "../hbzb/jfs/fun";
|
import { getToper50RankInfo } from "../hbzb/jfs/fun";
|
||||||
import { getZbsRankList } from "../hbzb/zbs/fun";
|
import { getZbsRankList } from "../hbzb/zbs/fun";
|
||||||
|
import { re } from "mathjs";
|
||||||
|
|
||||||
export default async function (call: ApiCall<ReqOpen, ResOpen>) {
|
export default async function (call: ApiCall<ReqOpen, ResOpen>) {
|
||||||
let obj = await rankOpenfun(call, call.req)
|
let obj = await rankOpenfun(call, call.req)
|
||||||
@ -24,7 +25,7 @@ export default async function (call: ApiCall<ReqOpen, ResOpen>) {
|
|||||||
export async function rankOpenfun(call, req: ReqOpen): Promise<ResOpen> {
|
export async function rankOpenfun(call, req: ReqOpen): Promise<ResOpen> {
|
||||||
let obj: ResOpen = {};
|
let obj: ResOpen = {};
|
||||||
// 数组,兼容旧的参数
|
// 数组,兼容旧的参数
|
||||||
if(req instanceof Array) {
|
if (req instanceof Array) {
|
||||||
var types = req
|
var types = req
|
||||||
var page = 0
|
var page = 0
|
||||||
var offset = 1
|
var offset = 1
|
||||||
@ -68,21 +69,23 @@ export async function rankOpenfun(call, req: ReqOpen): Promise<ResOpen> {
|
|||||||
case 'slzd4':
|
case 'slzd4':
|
||||||
case 'slzd5':
|
case 'slzd5':
|
||||||
case 'slzd6':
|
case 'slzd6':
|
||||||
obj[type] = await Rank.list[type].getRankList(call.conn.gud.ghId, {min, max});
|
obj[type] = await Rank.list[type].getRankList(call.conn.gud.ghId, { min, max });
|
||||||
break;
|
break;
|
||||||
case 'kbzz':
|
case 'kbzz':
|
||||||
let resCall = await G.clientCross.callApi('kbzz/Rank', { uid: call.uid, page, offset});
|
let resCall = await G.clientCross.callApi('kbzz/Rank', { uid: call.uid, page, offset });
|
||||||
if (!resCall.isSucc) {
|
if (!resCall.isSucc) {
|
||||||
return call.error('', { code: -2, message: globalThis.lng.rank_kbzz });
|
return call.error('', { code: -2, message: globalThis.lng.rank_kbzz });
|
||||||
}
|
}
|
||||||
obj[type] = resCall.res;
|
obj[type] = resCall.res;
|
||||||
break;
|
break;
|
||||||
case 'clslCross':
|
case 'clslCross':
|
||||||
//let resCallClsl = await G.clientCross.callApi('clsl/Rank', { gud: call.conn.gud, page, offset});
|
let res = await G.clientCross.callApi('clsl/Rank', {
|
||||||
//obj[type] = resCallClsl.res;
|
uid: call.uid, page: page, offset: offset
|
||||||
|
});
|
||||||
|
obj[type] = res.res;
|
||||||
break;
|
break;
|
||||||
case 'wzryCross':
|
case 'wzryCross':
|
||||||
let resCallWzry = await G.clientCross.callApi('wzry/Rank', { gud: call.conn.gud, page, offset});
|
let resCallWzry = await G.clientCross.callApi('wzry/Rank', { gud: call.conn.gud, page, offset });
|
||||||
obj[type] = resCallWzry.res;
|
obj[type] = resCallWzry.res;
|
||||||
break;
|
break;
|
||||||
case "hbzbLocal":
|
case "hbzbLocal":
|
||||||
@ -93,7 +96,7 @@ export async function rankOpenfun(call, req: ReqOpen): Promise<ResOpen> {
|
|||||||
obj[type] = await getZbsRankList(call.uid) as any;
|
obj[type] = await getZbsRankList(call.uid) as any;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
obj[type] = await Rank.list[type].getRankList(call.uid, {min, max});
|
obj[type] = await Rank.list[type].getRankList(call.uid, { min, max });
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@ import { joinFightData } from '../../../shared/fightControl/fightType';
|
|||||||
|
|
||||||
export type ReqFindEnemy = {
|
export type ReqFindEnemy = {
|
||||||
uid: string;
|
uid: string;
|
||||||
|
myStasr:number;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type ResFindEnemy = {
|
export type ResFindEnemy = {
|
||||||
|
@ -3,7 +3,7 @@ import { player } from '../../../shared/protocols/user/type';
|
|||||||
|
|
||||||
|
|
||||||
export type ReqRank = {
|
export type ReqRank = {
|
||||||
gud: player;
|
uid: string;
|
||||||
page?: number;
|
page?: number;
|
||||||
offset?: number;
|
offset?: number;
|
||||||
};
|
};
|
||||||
|
@ -1,9 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
export type ReqRankUids = {
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
export type ResRankUids = {
|
|
||||||
uids: string[];
|
|
||||||
};
|
|
@ -2,7 +2,6 @@ import { ServiceProto } from 'tsrpc-proto';
|
|||||||
import { ReqFindEnemy, ResFindEnemy } from './clsl/PtlFindEnemy';
|
import { ReqFindEnemy, ResFindEnemy } from './clsl/PtlFindEnemy';
|
||||||
import { ReqLog, ResLog } from './clsl/PtlLog';
|
import { ReqLog, ResLog } from './clsl/PtlLog';
|
||||||
import { ReqRank, ResRank } from './clsl/PtlRank';
|
import { ReqRank, ResRank } from './clsl/PtlRank';
|
||||||
import { ReqRankUids, ResRankUids } from './clsl/PtlRankUids';
|
|
||||||
import { ReqUpLoad, ResUpLoad } from './clsl/PtlUpLoad';
|
import { ReqUpLoad, ResUpLoad } from './clsl/PtlUpLoad';
|
||||||
import { ReqDelCrossEmail, ResDelCrossEmail } from './email/PtlDelCrossEmail';
|
import { ReqDelCrossEmail, ResDelCrossEmail } from './email/PtlDelCrossEmail';
|
||||||
import { ReqGetCrossEmail, ResGetCrossEmail } from './email/PtlGetCrossEmail';
|
import { ReqGetCrossEmail, ResGetCrossEmail } from './email/PtlGetCrossEmail';
|
||||||
@ -54,10 +53,6 @@ export interface ServiceType {
|
|||||||
req: ReqRank,
|
req: ReqRank,
|
||||||
res: ResRank
|
res: ResRank
|
||||||
},
|
},
|
||||||
"clsl/RankUids": {
|
|
||||||
req: ReqRankUids,
|
|
||||||
res: ResRankUids
|
|
||||||
},
|
|
||||||
"clsl/UpLoad": {
|
"clsl/UpLoad": {
|
||||||
req: ReqUpLoad,
|
req: ReqUpLoad,
|
||||||
res: ResUpLoad
|
res: ResUpLoad
|
||||||
@ -211,186 +206,181 @@ export const serviceProto: ServiceProto<ServiceType> = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 3,
|
"id": 3,
|
||||||
"name": "clsl/RankUids",
|
|
||||||
"type": "api"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": 4,
|
|
||||||
"name": "clsl/UpLoad",
|
"name": "clsl/UpLoad",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 5,
|
"id": 4,
|
||||||
"name": "email/DelCrossEmail",
|
"name": "email/DelCrossEmail",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 6,
|
"id": 5,
|
||||||
"name": "email/GetCrossEmail",
|
"name": "email/GetCrossEmail",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 7,
|
"id": 6,
|
||||||
"name": "hbzb/jfs/GetEnemy",
|
"name": "hbzb/jfs/GetEnemy",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 8,
|
"id": 7,
|
||||||
"name": "hbzb/jfs/GetLog",
|
"name": "hbzb/jfs/GetLog",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 9,
|
"id": 8,
|
||||||
"name": "hbzb/jfs/GetRankList",
|
"name": "hbzb/jfs/GetRankList",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 10,
|
"id": 9,
|
||||||
"name": "hbzb/jfs/GetUser",
|
"name": "hbzb/jfs/GetUser",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 11,
|
"id": 10,
|
||||||
"name": "hbzb/GetUser",
|
"name": "hbzb/GetUser",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 12,
|
"id": 11,
|
||||||
"name": "hbzb/UpdateHbzbCrossUser",
|
"name": "hbzb/UpdateHbzbCrossUser",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 13,
|
"id": 12,
|
||||||
"name": "hbzb/zbs/GetEnemy",
|
"name": "hbzb/zbs/GetEnemy",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 14,
|
"id": 13,
|
||||||
"name": "hbzb/zbs/GetLog",
|
"name": "hbzb/zbs/GetLog",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 15,
|
"id": 14,
|
||||||
"name": "hbzb/zbs/GetRankList",
|
"name": "hbzb/zbs/GetRankList",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 16,
|
"id": 15,
|
||||||
"name": "hbzb/zbs/GetStatus",
|
"name": "hbzb/zbs/GetStatus",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 17,
|
"id": 16,
|
||||||
"name": "hbzb/zbs/SendJjcTop",
|
"name": "hbzb/zbs/SendJjcTop",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 18,
|
"id": 17,
|
||||||
"name": "kbzz/Apply",
|
"name": "kbzz/Apply",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 19,
|
"id": 18,
|
||||||
"name": "kbzz/GetUser",
|
"name": "kbzz/GetUser",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 20,
|
"id": 19,
|
||||||
"name": "kbzz/GroupRank",
|
"name": "kbzz/GroupRank",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 21,
|
"id": 20,
|
||||||
"name": "kbzz/Rank",
|
"name": "kbzz/Rank",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 22,
|
"id": 21,
|
||||||
"name": "kbzz/Refresh",
|
"name": "kbzz/Refresh",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 23,
|
"id": 22,
|
||||||
"name": "kbzz/State",
|
"name": "kbzz/State",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 24,
|
"id": 23,
|
||||||
"name": "kbzz/UpUser",
|
"name": "kbzz/UpUser",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 25,
|
"id": 24,
|
||||||
"name": "msg_cross/CrossChat",
|
"name": "msg_cross/CrossChat",
|
||||||
"type": "msg"
|
"type": "msg"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 26,
|
"id": 25,
|
||||||
"name": "msg_cross/HbzbChangeRank",
|
"name": "msg_cross/HbzbChangeRank",
|
||||||
"type": "msg"
|
"type": "msg"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 27,
|
"id": 26,
|
||||||
"name": "msg_cross/HbzbJfsLog",
|
"name": "msg_cross/HbzbJfsLog",
|
||||||
"type": "msg"
|
"type": "msg"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 28,
|
"id": 27,
|
||||||
"name": "msg_cross/HbzbSendUser",
|
"name": "msg_cross/HbzbSendUser",
|
||||||
"type": "msg"
|
"type": "msg"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 29,
|
"id": 28,
|
||||||
"name": "msg_cross/HbzbZbsLog",
|
"name": "msg_cross/HbzbZbsLog",
|
||||||
"type": "msg"
|
"type": "msg"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 30,
|
"id": 29,
|
||||||
"name": "wzry/BaoMing",
|
"name": "wzry/BaoMing",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 31,
|
"id": 30,
|
||||||
"name": "wzry/catFightLog",
|
"name": "wzry/catFightLog",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 32,
|
"id": 31,
|
||||||
"name": "wzry/DldRefre",
|
"name": "wzry/DldRefre",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 33,
|
"id": 32,
|
||||||
"name": "wzry/getJingCai",
|
"name": "wzry/getJingCai",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 34,
|
"id": 33,
|
||||||
"name": "wzry/Rank",
|
"name": "wzry/Rank",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 35,
|
"id": 34,
|
||||||
"name": "wzry/SetWzFight",
|
"name": "wzry/SetWzFight",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 36,
|
"id": 35,
|
||||||
"name": "wzry/UpdateFight",
|
"name": "wzry/UpdateFight",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 37,
|
"id": 36,
|
||||||
"name": "wzry/WzFightData",
|
"name": "wzry/WzFightData",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 38,
|
"id": 37,
|
||||||
"name": "wzry/WzFightGroup",
|
"name": "wzry/WzFightGroup",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 39,
|
"id": 38,
|
||||||
"name": "wzry/Wzzd",
|
"name": "wzry/Wzzd",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
}
|
}
|
||||||
@ -405,6 +395,13 @@ export const serviceProto: ServiceProto<ServiceType> = {
|
|||||||
"type": {
|
"type": {
|
||||||
"type": "String"
|
"type": "String"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 1,
|
||||||
|
"name": "myStasr",
|
||||||
|
"type": {
|
||||||
|
"type": "Number"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -2753,10 +2750,9 @@ export const serviceProto: ServiceProto<ServiceType> = {
|
|||||||
"properties": [
|
"properties": [
|
||||||
{
|
{
|
||||||
"id": 0,
|
"id": 0,
|
||||||
"name": "gud",
|
"name": "uid",
|
||||||
"type": {
|
"type": {
|
||||||
"type": "Reference",
|
"type": "String"
|
||||||
"target": "../../shared/protocols/user/type/player"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -2777,14 +2773,6 @@ export const serviceProto: ServiceProto<ServiceType> = {
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"../../shared/protocols/user/type/player": {
|
|
||||||
"type": "IndexedAccess",
|
|
||||||
"index": "gud",
|
|
||||||
"objectType": {
|
|
||||||
"type": "Reference",
|
|
||||||
"target": "../../shared/protocols/user/PtlLogin/ResLogin"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"clsl/PtlRank/ResRank": {
|
"clsl/PtlRank/ResRank": {
|
||||||
"type": "IndexedAccess",
|
"type": "IndexedAccess",
|
||||||
"index": "",
|
"index": "",
|
||||||
@ -2897,24 +2885,6 @@ export const serviceProto: ServiceProto<ServiceType> = {
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"clsl/PtlRankUids/ReqRankUids": {
|
|
||||||
"type": "Interface"
|
|
||||||
},
|
|
||||||
"clsl/PtlRankUids/ResRankUids": {
|
|
||||||
"type": "Interface",
|
|
||||||
"properties": [
|
|
||||||
{
|
|
||||||
"id": 0,
|
|
||||||
"name": "uids",
|
|
||||||
"type": {
|
|
||||||
"type": "Array",
|
|
||||||
"elementType": {
|
|
||||||
"type": "String"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"clsl/PtlUpLoad/ReqUpLoad": {
|
"clsl/PtlUpLoad/ReqUpLoad": {
|
||||||
"type": "Partial",
|
"type": "Partial",
|
||||||
"target": {
|
"target": {
|
||||||
@ -3258,6 +3228,14 @@ export const serviceProto: ServiceProto<ServiceType> = {
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"../../shared/protocols/user/type/player": {
|
||||||
|
"type": "IndexedAccess",
|
||||||
|
"index": "gud",
|
||||||
|
"objectType": {
|
||||||
|
"type": "Reference",
|
||||||
|
"target": "../../shared/protocols/user/PtlLogin/ResLogin"
|
||||||
|
}
|
||||||
|
},
|
||||||
"hbzb/jfs/PtlGetEnemy/ResGetEnemy": {
|
"hbzb/jfs/PtlGetEnemy/ResGetEnemy": {
|
||||||
"type": "Interface",
|
"type": "Interface",
|
||||||
"properties": [
|
"properties": [
|
||||||
|
@ -1,18 +1,11 @@
|
|||||||
{
|
{
|
||||||
//赛区划分
|
//赛区划分按照周三23:50的时候王者玩家100个一组
|
||||||
divide: [
|
//赛区划分时间周三23:50
|
||||||
{ day: [1, 30], group: 0 },
|
divideTime: 258600,
|
||||||
{ day: [31, 60], group: 1 },
|
//挑战时间周一08:00——周六22:00
|
||||||
{ day: [61, 120], group: 2 },
|
|
||||||
{ day: [121, 210], group: 3 },
|
|
||||||
{ day: [211, 99999999], group: 4 },
|
|
||||||
],
|
|
||||||
//赛区划分时间
|
|
||||||
divideTime: 0,
|
|
||||||
//挑战时间
|
|
||||||
fightTime: [28800, 511200],
|
fightTime: [28800, 511200],
|
||||||
//发奖时间
|
//发奖时间周六22:05
|
||||||
prizeTime: 598200,
|
prizeTime: 511500,
|
||||||
//胜场奖励
|
//胜场奖励
|
||||||
fightWinPrize: [
|
fightWinPrize: [
|
||||||
{ total: 5, prize: [{ a: 'attr', t: 'clsl_sd', n: 1 },{ a: 'item', t: '37', n: 1 }], star: 1 },
|
{ total: 5, prize: [{ a: 'attr', t: 'clsl_sd', n: 1 },{ a: 'item', t: '37', n: 1 }], star: 1 },
|
||||||
@ -39,13 +32,13 @@
|
|||||||
],
|
],
|
||||||
//段位奖励
|
//段位奖励
|
||||||
danPrize: [
|
danPrize: [
|
||||||
{ star: [49, 49], prize: [{ a: 'item', t: '605', n:3 },{ a: 'item', t: '29', n:10 },{ a: 'item', t: '631', n:3 },{ a: 'item', t: '40', n:1 }] },
|
{ star: 49, prize: [{ a: 'item', t: '605', n:3 },{ a: 'item', t: '29', n:10 },{ a: 'item', t: '631', n:3 },{ a: 'item', t: '40', n:1 }] },
|
||||||
{ star: [39, 48], prize: [{ a: 'item', t: '605', n:2 },{ a: 'item', t: '29', n:5 },{ a: 'item', t: '631', n:2 }] },
|
{ star: 39, prize: [{ a: 'item', t: '605', n:2 },{ a: 'item', t: '29', n:5 },{ a: 'item', t: '631', n:2 }] },
|
||||||
{ star: [29, 38], prize: [{ a: 'item', t: '606', n:3 },{ a: 'item', t: '29', n:5 },{ a: 'item', t: '631', n:1 }] },
|
{ star: 29, prize: [{ a: 'item', t: '606', n:3 },{ a: 'item', t: '29', n:5 },{ a: 'item', t: '631', n:1 }] },
|
||||||
{ star: [21, 28], prize: [{ a: 'item', t: '606', n:2 },{ a: 'item', t: '29', n:5 },{ a: 'item', t: '39', n:1000 }] },
|
{ star: 21, prize: [{ a: 'item', t: '606', n:2 },{ a: 'item', t: '29', n:5 },{ a: 'item', t: '39', n:1000 }] },
|
||||||
{ star: [13, 20], prize: [{ a: 'item', t: '606', n:1 },{ a: 'item', t: '29', n:5 },{ a: 'item', t: '39', n:800 }] },
|
{ star: 13, prize: [{ a: 'item', t: '606', n:1 },{ a: 'item', t: '29', n:5 },{ a: 'item', t: '39', n:800 }] },
|
||||||
{ star: [7, 12], prize: [{ a: 'item', t: '29', n:10 },{ a: 'item', t: '29', n:5 },{ a: 'item', t: '39', n:600 }] },
|
{ star: 7, prize: [{ a: 'item', t: '29', n:10 },{ a: 'item', t: '29', n:5 },{ a: 'item', t: '39', n:600 }] },
|
||||||
{ star: [0, 6], prize: [{ a: 'item', t: '29', n:5 },{ a: 'item', t: '29', n:5 },{ a: 'item', t: '39', n:400 }] }
|
{ star: 0, prize: [{ a: 'item', t: '29', n:5 },{ a: 'item', t: '29', n:5 },{ a: 'item', t: '39', n:400 }] }
|
||||||
],
|
],
|
||||||
//王者排名邮件信息
|
//王者排名邮件信息
|
||||||
email_rank: {
|
email_rank: {
|
||||||
|
@ -18,6 +18,11 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"pro": 0.6,
|
||||||
|
"fighter": [
|
||||||
|
0,
|
||||||
|
6
|
||||||
|
],
|
||||||
"npc": 60001
|
"npc": 60001
|
||||||
},
|
},
|
||||||
"1": {
|
"1": {
|
||||||
@ -39,6 +44,11 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"pro": 0.6,
|
||||||
|
"fighter": [
|
||||||
|
0,
|
||||||
|
6
|
||||||
|
],
|
||||||
"npc": 60002
|
"npc": 60002
|
||||||
},
|
},
|
||||||
"2": {
|
"2": {
|
||||||
@ -60,6 +70,11 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"pro": 0.6,
|
||||||
|
"fighter": [
|
||||||
|
0,
|
||||||
|
6
|
||||||
|
],
|
||||||
"npc": 60003
|
"npc": 60003
|
||||||
},
|
},
|
||||||
"3": {
|
"3": {
|
||||||
@ -81,6 +96,11 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"pro": 0.6,
|
||||||
|
"fighter": [
|
||||||
|
0,
|
||||||
|
6
|
||||||
|
],
|
||||||
"npc": 60004
|
"npc": 60004
|
||||||
},
|
},
|
||||||
"4": {
|
"4": {
|
||||||
@ -102,6 +122,11 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"pro": 0.6,
|
||||||
|
"fighter": [
|
||||||
|
0,
|
||||||
|
6
|
||||||
|
],
|
||||||
"npc": 60005
|
"npc": 60005
|
||||||
},
|
},
|
||||||
"5": {
|
"5": {
|
||||||
@ -123,6 +148,11 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"pro": 0.6,
|
||||||
|
"fighter": [
|
||||||
|
0,
|
||||||
|
6
|
||||||
|
],
|
||||||
"npc": 60006
|
"npc": 60006
|
||||||
},
|
},
|
||||||
"6": {
|
"6": {
|
||||||
@ -144,6 +174,11 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"pro": 0.6,
|
||||||
|
"fighter": [
|
||||||
|
0,
|
||||||
|
6
|
||||||
|
],
|
||||||
"npc": 60007
|
"npc": 60007
|
||||||
},
|
},
|
||||||
"7": {
|
"7": {
|
||||||
@ -165,6 +200,11 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"pro": 0.6,
|
||||||
|
"fighter": [
|
||||||
|
7,
|
||||||
|
12
|
||||||
|
],
|
||||||
"npc": 60008
|
"npc": 60008
|
||||||
},
|
},
|
||||||
"8": {
|
"8": {
|
||||||
@ -186,6 +226,11 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"pro": 0.6,
|
||||||
|
"fighter": [
|
||||||
|
7,
|
||||||
|
12
|
||||||
|
],
|
||||||
"npc": 60009
|
"npc": 60009
|
||||||
},
|
},
|
||||||
"9": {
|
"9": {
|
||||||
@ -207,6 +252,11 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"pro": 0.6,
|
||||||
|
"fighter": [
|
||||||
|
7,
|
||||||
|
12
|
||||||
|
],
|
||||||
"npc": 60010
|
"npc": 60010
|
||||||
},
|
},
|
||||||
"10": {
|
"10": {
|
||||||
@ -228,6 +278,11 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"pro": 0.6,
|
||||||
|
"fighter": [
|
||||||
|
7,
|
||||||
|
12
|
||||||
|
],
|
||||||
"npc": 60011
|
"npc": 60011
|
||||||
},
|
},
|
||||||
"11": {
|
"11": {
|
||||||
@ -249,6 +304,11 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"pro": 0.6,
|
||||||
|
"fighter": [
|
||||||
|
7,
|
||||||
|
12
|
||||||
|
],
|
||||||
"npc": 60012
|
"npc": 60012
|
||||||
},
|
},
|
||||||
"12": {
|
"12": {
|
||||||
@ -270,6 +330,11 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"pro": 0.6,
|
||||||
|
"fighter": [
|
||||||
|
7,
|
||||||
|
12
|
||||||
|
],
|
||||||
"npc": 60013
|
"npc": 60013
|
||||||
},
|
},
|
||||||
"13": {
|
"13": {
|
||||||
@ -291,6 +356,11 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"pro": 0.3,
|
||||||
|
"fighter": [
|
||||||
|
13,
|
||||||
|
20
|
||||||
|
],
|
||||||
"npc": 60014
|
"npc": 60014
|
||||||
},
|
},
|
||||||
"14": {
|
"14": {
|
||||||
@ -312,6 +382,11 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"pro": 0.3,
|
||||||
|
"fighter": [
|
||||||
|
13,
|
||||||
|
20
|
||||||
|
],
|
||||||
"npc": 60015
|
"npc": 60015
|
||||||
},
|
},
|
||||||
"15": {
|
"15": {
|
||||||
@ -333,6 +408,11 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"pro": 0.3,
|
||||||
|
"fighter": [
|
||||||
|
13,
|
||||||
|
20
|
||||||
|
],
|
||||||
"npc": 60016
|
"npc": 60016
|
||||||
},
|
},
|
||||||
"16": {
|
"16": {
|
||||||
@ -354,6 +434,11 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"pro": 0.3,
|
||||||
|
"fighter": [
|
||||||
|
13,
|
||||||
|
20
|
||||||
|
],
|
||||||
"npc": 60017
|
"npc": 60017
|
||||||
},
|
},
|
||||||
"17": {
|
"17": {
|
||||||
@ -375,6 +460,11 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"pro": 0.3,
|
||||||
|
"fighter": [
|
||||||
|
13,
|
||||||
|
20
|
||||||
|
],
|
||||||
"npc": 60018
|
"npc": 60018
|
||||||
},
|
},
|
||||||
"18": {
|
"18": {
|
||||||
@ -396,6 +486,11 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"pro": 0.3,
|
||||||
|
"fighter": [
|
||||||
|
13,
|
||||||
|
20
|
||||||
|
],
|
||||||
"npc": 60019
|
"npc": 60019
|
||||||
},
|
},
|
||||||
"19": {
|
"19": {
|
||||||
@ -417,6 +512,11 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"pro": 0.3,
|
||||||
|
"fighter": [
|
||||||
|
13,
|
||||||
|
20
|
||||||
|
],
|
||||||
"npc": 60020
|
"npc": 60020
|
||||||
},
|
},
|
||||||
"20": {
|
"20": {
|
||||||
@ -438,6 +538,11 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"pro": 0.3,
|
||||||
|
"fighter": [
|
||||||
|
13,
|
||||||
|
20
|
||||||
|
],
|
||||||
"npc": 60021
|
"npc": 60021
|
||||||
},
|
},
|
||||||
"21": {
|
"21": {
|
||||||
@ -459,6 +564,11 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"pro": 0.3,
|
||||||
|
"fighter": [
|
||||||
|
21,
|
||||||
|
28
|
||||||
|
],
|
||||||
"npc": 60022
|
"npc": 60022
|
||||||
},
|
},
|
||||||
"22": {
|
"22": {
|
||||||
@ -480,6 +590,11 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"pro": 0.3,
|
||||||
|
"fighter": [
|
||||||
|
21,
|
||||||
|
28
|
||||||
|
],
|
||||||
"npc": 60023
|
"npc": 60023
|
||||||
},
|
},
|
||||||
"23": {
|
"23": {
|
||||||
@ -501,6 +616,11 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"pro": 0.3,
|
||||||
|
"fighter": [
|
||||||
|
21,
|
||||||
|
28
|
||||||
|
],
|
||||||
"npc": 60024
|
"npc": 60024
|
||||||
},
|
},
|
||||||
"24": {
|
"24": {
|
||||||
@ -522,6 +642,11 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"pro": 0.3,
|
||||||
|
"fighter": [
|
||||||
|
21,
|
||||||
|
28
|
||||||
|
],
|
||||||
"npc": 60025
|
"npc": 60025
|
||||||
},
|
},
|
||||||
"25": {
|
"25": {
|
||||||
@ -543,6 +668,11 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"pro": 0.3,
|
||||||
|
"fighter": [
|
||||||
|
21,
|
||||||
|
28
|
||||||
|
],
|
||||||
"npc": 60026
|
"npc": 60026
|
||||||
},
|
},
|
||||||
"26": {
|
"26": {
|
||||||
@ -564,6 +694,11 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"pro": 0.3,
|
||||||
|
"fighter": [
|
||||||
|
21,
|
||||||
|
28
|
||||||
|
],
|
||||||
"npc": 60027
|
"npc": 60027
|
||||||
},
|
},
|
||||||
"27": {
|
"27": {
|
||||||
@ -585,6 +720,11 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"pro": 0.3,
|
||||||
|
"fighter": [
|
||||||
|
21,
|
||||||
|
28
|
||||||
|
],
|
||||||
"npc": 60028
|
"npc": 60028
|
||||||
},
|
},
|
||||||
"28": {
|
"28": {
|
||||||
@ -606,6 +746,11 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"pro": 0.3,
|
||||||
|
"fighter": [
|
||||||
|
21,
|
||||||
|
28
|
||||||
|
],
|
||||||
"npc": 60029
|
"npc": 60029
|
||||||
},
|
},
|
||||||
"29": {
|
"29": {
|
||||||
@ -627,6 +772,11 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"pro": 0.15,
|
||||||
|
"fighter": [
|
||||||
|
29,
|
||||||
|
38
|
||||||
|
],
|
||||||
"npc": 60030
|
"npc": 60030
|
||||||
},
|
},
|
||||||
"30": {
|
"30": {
|
||||||
@ -648,6 +798,11 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"pro": 0.15,
|
||||||
|
"fighter": [
|
||||||
|
29,
|
||||||
|
38
|
||||||
|
],
|
||||||
"npc": 60031
|
"npc": 60031
|
||||||
},
|
},
|
||||||
"31": {
|
"31": {
|
||||||
@ -669,6 +824,11 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"pro": 0.15,
|
||||||
|
"fighter": [
|
||||||
|
29,
|
||||||
|
38
|
||||||
|
],
|
||||||
"npc": 60032
|
"npc": 60032
|
||||||
},
|
},
|
||||||
"32": {
|
"32": {
|
||||||
@ -690,6 +850,11 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"pro": 0.15,
|
||||||
|
"fighter": [
|
||||||
|
29,
|
||||||
|
38
|
||||||
|
],
|
||||||
"npc": 60033
|
"npc": 60033
|
||||||
},
|
},
|
||||||
"33": {
|
"33": {
|
||||||
@ -711,6 +876,11 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"pro": 0.15,
|
||||||
|
"fighter": [
|
||||||
|
29,
|
||||||
|
38
|
||||||
|
],
|
||||||
"npc": 60034
|
"npc": 60034
|
||||||
},
|
},
|
||||||
"34": {
|
"34": {
|
||||||
@ -732,6 +902,11 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"pro": 0.15,
|
||||||
|
"fighter": [
|
||||||
|
29,
|
||||||
|
38
|
||||||
|
],
|
||||||
"npc": 60035
|
"npc": 60035
|
||||||
},
|
},
|
||||||
"35": {
|
"35": {
|
||||||
@ -753,6 +928,11 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"pro": 0.15,
|
||||||
|
"fighter": [
|
||||||
|
29,
|
||||||
|
38
|
||||||
|
],
|
||||||
"npc": 60036
|
"npc": 60036
|
||||||
},
|
},
|
||||||
"36": {
|
"36": {
|
||||||
@ -774,6 +954,11 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"pro": 0.15,
|
||||||
|
"fighter": [
|
||||||
|
29,
|
||||||
|
38
|
||||||
|
],
|
||||||
"npc": 60037
|
"npc": 60037
|
||||||
},
|
},
|
||||||
"37": {
|
"37": {
|
||||||
@ -795,6 +980,11 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"pro": 0.15,
|
||||||
|
"fighter": [
|
||||||
|
29,
|
||||||
|
38
|
||||||
|
],
|
||||||
"npc": 60038
|
"npc": 60038
|
||||||
},
|
},
|
||||||
"38": {
|
"38": {
|
||||||
@ -816,6 +1006,11 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"pro": 0.15,
|
||||||
|
"fighter": [
|
||||||
|
29,
|
||||||
|
38
|
||||||
|
],
|
||||||
"npc": 60039
|
"npc": 60039
|
||||||
},
|
},
|
||||||
"39": {
|
"39": {
|
||||||
@ -837,6 +1032,11 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"pro": 0.15,
|
||||||
|
"fighter": [
|
||||||
|
39,
|
||||||
|
48
|
||||||
|
],
|
||||||
"npc": 60040
|
"npc": 60040
|
||||||
},
|
},
|
||||||
"40": {
|
"40": {
|
||||||
@ -858,6 +1058,11 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"pro": 0.15,
|
||||||
|
"fighter": [
|
||||||
|
39,
|
||||||
|
48
|
||||||
|
],
|
||||||
"npc": 60041
|
"npc": 60041
|
||||||
},
|
},
|
||||||
"41": {
|
"41": {
|
||||||
@ -879,6 +1084,11 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"pro": 0.15,
|
||||||
|
"fighter": [
|
||||||
|
39,
|
||||||
|
48
|
||||||
|
],
|
||||||
"npc": 60042
|
"npc": 60042
|
||||||
},
|
},
|
||||||
"42": {
|
"42": {
|
||||||
@ -900,6 +1110,11 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"pro": 0.15,
|
||||||
|
"fighter": [
|
||||||
|
39,
|
||||||
|
48
|
||||||
|
],
|
||||||
"npc": 60043
|
"npc": 60043
|
||||||
},
|
},
|
||||||
"43": {
|
"43": {
|
||||||
@ -921,6 +1136,11 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"pro": 0.15,
|
||||||
|
"fighter": [
|
||||||
|
39,
|
||||||
|
48
|
||||||
|
],
|
||||||
"npc": 60044
|
"npc": 60044
|
||||||
},
|
},
|
||||||
"44": {
|
"44": {
|
||||||
@ -942,6 +1162,11 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"pro": 0.15,
|
||||||
|
"fighter": [
|
||||||
|
39,
|
||||||
|
48
|
||||||
|
],
|
||||||
"npc": 60045
|
"npc": 60045
|
||||||
},
|
},
|
||||||
"45": {
|
"45": {
|
||||||
@ -963,6 +1188,11 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"pro": 0.15,
|
||||||
|
"fighter": [
|
||||||
|
39,
|
||||||
|
48
|
||||||
|
],
|
||||||
"npc": 60046
|
"npc": 60046
|
||||||
},
|
},
|
||||||
"46": {
|
"46": {
|
||||||
@ -984,6 +1214,11 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"pro": 0.15,
|
||||||
|
"fighter": [
|
||||||
|
39,
|
||||||
|
48
|
||||||
|
],
|
||||||
"npc": 60047
|
"npc": 60047
|
||||||
},
|
},
|
||||||
"47": {
|
"47": {
|
||||||
@ -1005,6 +1240,11 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"pro": 0.15,
|
||||||
|
"fighter": [
|
||||||
|
39,
|
||||||
|
48
|
||||||
|
],
|
||||||
"npc": 60048
|
"npc": 60048
|
||||||
},
|
},
|
||||||
"48": {
|
"48": {
|
||||||
@ -1026,6 +1266,11 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"pro": 0.15,
|
||||||
|
"fighter": [
|
||||||
|
39,
|
||||||
|
48
|
||||||
|
],
|
||||||
"npc": 60049
|
"npc": 60049
|
||||||
},
|
},
|
||||||
"49": {
|
"49": {
|
||||||
@ -1047,6 +1292,11 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"pro": 0,
|
||||||
|
"fighter": [
|
||||||
|
39,
|
||||||
|
49
|
||||||
|
],
|
||||||
"npc": 60050
|
"npc": 60050
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -103,7 +103,7 @@ type gc_choujiang = {
|
|||||||
type gc_chuanshuozhilu = { "hid": string, "time": number, "task": { "idx": number, "total": number, "type": string, "prize": { "a": string, "t": string, "n": number, [x: string]: any }[], "des": string, [x: string]: any }[], "box": { "total": number, "prize": { "a": string, "t": string, "n": number, [x: string]: any }[], [x: string]: any }, [x: string]: any }[]
|
type gc_chuanshuozhilu = { "hid": string, "time": number, "task": { "idx": number, "total": number, "type": string, "prize": { "a": string, "t": string, "n": number, [x: string]: any }[], "des": string, [x: string]: any }[], "box": { "total": number, "prize": { "a": string, "t": string, "n": number, [x: string]: any }[], [x: string]: any }, [x: string]: any }[]
|
||||||
|
|
||||||
type gc_clsl_com = {
|
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, 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_clsl_dan = k_v<{
|
type gc_clsl_dan = k_v<{
|
||||||
@ -122,7 +122,11 @@ type gc_clsl_dan = k_v<{
|
|||||||
/** 战斗奖励 */
|
/** 战斗奖励 */
|
||||||
'fightPrize': { "a": string, "t": string, "n": number, [x: string]: any }[]
|
'fightPrize': { "a": string, "t": string, "n": number, [x: string]: any }[]
|
||||||
/** 机器人 */
|
/** 机器人 */
|
||||||
'npc': number
|
'npc': number,
|
||||||
|
/** 随机机器人概率*/
|
||||||
|
'pro':number
|
||||||
|
/** 对手范围 */
|
||||||
|
'fighter':number[]
|
||||||
}>;
|
}>;
|
||||||
|
|
||||||
type gc_com = k_v<{
|
type gc_com = k_v<{
|
||||||
|
@ -7,3 +7,8 @@ export type CollectionCllsCrossUser = {
|
|||||||
allStar: number;
|
allStar: number;
|
||||||
info: joinFightData;
|
info: joinFightData;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export type CollectionCllsCrossGroup = {
|
||||||
|
week: string;
|
||||||
|
groups: { [group: string]: { st: number, et: number } };
|
||||||
|
}
|
@ -4,7 +4,7 @@ import {rankType} from '../shared/protocols/rank/PtlOpen';
|
|||||||
import {CollectionChatLog} from './collection_chatlog';
|
import {CollectionChatLog} from './collection_chatlog';
|
||||||
import {CollectionActionLog} from './collection_actionLog';
|
import {CollectionActionLog} from './collection_actionLog';
|
||||||
import {CollectionCardlog} from './collection_cardlog';
|
import {CollectionCardlog} from './collection_cardlog';
|
||||||
import {CollectionCllsCrossUser} from './collection_clsl';
|
import {CollectionCllsCrossGroup, CollectionCllsCrossUser} from './collection_clsl';
|
||||||
import {CollectionCrosskv} from './collection_crosskv';
|
import {CollectionCrosskv} from './collection_crosskv';
|
||||||
import {CollectionDayPay} from './collection_dayPay';
|
import {CollectionDayPay} from './collection_dayPay';
|
||||||
import {CollectionDxlt} from './collection_dxlt';
|
import {CollectionDxlt} from './collection_dxlt';
|
||||||
@ -115,7 +115,8 @@ export type MongodbCollections = {
|
|||||||
any: { type: string, data: any[]; };
|
any: { type: string, data: any[]; };
|
||||||
zhanling: CollectionZhanLing;
|
zhanling: CollectionZhanLing;
|
||||||
|
|
||||||
clslCrossUser: CollectionCllsCrossUser;
|
clslCrossGroup: CollectionCllsCrossGroup;
|
||||||
|
clslCrossUser: CollectionCllsCrossUser & { group: string };
|
||||||
lingzhulaixi: CollectionLingZhuLaiXi;
|
lingzhulaixi: CollectionLingZhuLaiXi;
|
||||||
wzry_user_cross: CollectionWzryCross;
|
wzry_user_cross: CollectionWzryCross;
|
||||||
wzry_fight: CollectionWzryCrossFight;
|
wzry_fight: CollectionWzryCrossFight;
|
||||||
|
@ -709,21 +709,21 @@ export const serviceProto: ServiceProto<ServiceType> = {
|
|||||||
"id": 13,
|
"id": 13,
|
||||||
"type": {
|
"type": {
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"literal": "kbzz"
|
"literal": "clslCross"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 14,
|
"id": 14,
|
||||||
"type": {
|
"type": {
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"literal": "xszm"
|
"literal": "kbzz"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 15,
|
"id": 15,
|
||||||
"type": {
|
"type": {
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"literal": "clslCross"
|
"literal": "xszm"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -130,7 +130,7 @@ export class FightFun {
|
|||||||
* @param result
|
* @param result
|
||||||
*/
|
*/
|
||||||
static async saveLog(uid: string, type: string, result: fightResult) {
|
static async saveLog(uid: string, type: string, result: fightResult) {
|
||||||
let writeList = ['ganhai', 'jjc', 'hbzbJfs', 'hbzbZbs', 'slzd']
|
let writeList = ['ganhai', 'jjc', 'hbzbJfs', 'hbzbZbs', 'slzd', 'clsl']
|
||||||
if (uid.indexOf('npc') != -1 || !writeList.includes(type)) return;
|
if (uid.indexOf('npc') != -1 || !writeList.includes(type)) return;
|
||||||
|
|
||||||
G.mongodb.collection('fightLog').insertOne({uid, type, ...result})
|
G.mongodb.collection('fightLog').insertOne({uid, type, ...result})
|
||||||
|
@ -108,8 +108,12 @@ export abstract class Rank {
|
|||||||
return this.getType();
|
return this.getType();
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor() {
|
constructor(param?: any) {
|
||||||
|
// 将param属性赋值给this
|
||||||
|
param && Object.assign(this, param);
|
||||||
Rank.list[this.getType() as string] = this;
|
Rank.list[this.getType() as string] = this;
|
||||||
|
|
||||||
|
// 初始化排行榜
|
||||||
this.cotr();
|
this.cotr();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -135,7 +139,7 @@ export abstract class Rank {
|
|||||||
|
|
||||||
//将db里的数据,写入到 rank:xxx:sort里
|
//将db里的数据,写入到 rank:xxx:sort里
|
||||||
//写入的单条数据为: {uid:score}
|
//写入的单条数据为: {uid:score}
|
||||||
this.db.find({ type: this.type }, {
|
this.db.find({ type: this.type }, {
|
||||||
projection: {
|
projection: {
|
||||||
"idKey": 1,
|
"idKey": 1,
|
||||||
"type": 1,
|
"type": 1,
|
||||||
@ -263,7 +267,7 @@ export abstract class Rank {
|
|||||||
}
|
}
|
||||||
return item;
|
return item;
|
||||||
})
|
})
|
||||||
if(ghid.length > 0){
|
if (ghid.length > 0) {
|
||||||
let ghinfo = await G.mongodb.collection("gonghui").find(
|
let ghinfo = await G.mongodb.collection("gonghui").find(
|
||||||
{ _id: { $in: ghid } }, { projection: { name: 1 } }
|
{ _id: { $in: ghid } }, { projection: { name: 1 } }
|
||||||
).toArray();
|
).toArray();
|
||||||
@ -400,10 +404,10 @@ export abstract class Rank {
|
|||||||
|
|
||||||
// 清空相关rank数据
|
// 清空相关rank数据
|
||||||
async clear() {
|
async clear() {
|
||||||
this.queue.enqueue(async () => {
|
// this.queue.enqueue(async () => {
|
||||||
// G.redis.rawDel(this.getRedisKey)
|
// G.redis.rawDel(this.getRedisKey)
|
||||||
G.redis.rawDel(this.getRedisKeySort);
|
G.redis.rawDel(this.getRedisKeySort);
|
||||||
await this.db.deleteMany({ type: this.type });
|
this.db.deleteMany({ type: this.type });
|
||||||
});
|
// });
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,58 +1,53 @@
|
|||||||
import { rankType } from '../../shared/protocols/rank/PtlOpen';
|
import { rankType } from '../../shared/protocols/rank/PtlOpen';
|
||||||
import { rankInfo } from '../../shared/protocols/type';
|
import { rankInfo } from '../../shared/protocols/type';
|
||||||
import { player } from '../../shared/protocols/user/type';
|
import { PublicShared } from '../../shared/public/public';
|
||||||
import { Rank } from './rank';
|
import { Rank } from './rank';
|
||||||
|
|
||||||
|
|
||||||
export class RankClslCross extends Rank {
|
export class RankClslCross extends Rank {
|
||||||
|
group: string;
|
||||||
countMaxNum = 99999;
|
|
||||||
minStar = Object.values(G.gc.clsl_dan)[Object.keys(G.gc.clsl_dan).length - 1].allStar;
|
minStar = Object.values(G.gc.clsl_dan)[Object.keys(G.gc.clsl_dan).length - 1].allStar;
|
||||||
getType(): rankType {
|
|
||||||
return 'clslCross';
|
constructor(group: string = 'group0') {
|
||||||
|
super({ group });
|
||||||
}
|
}
|
||||||
// compare(other: rankInfo, cur: rankInfo): boolean {
|
|
||||||
// return cur.valArr[0] > other.valArr[0];
|
|
||||||
// }
|
|
||||||
// compareSort(a: rankInfo, b: rankInfo): number {
|
|
||||||
// return b.valArr[0] - a.valArr[0];
|
|
||||||
// }
|
|
||||||
|
|
||||||
// // 积分, 排名依据
|
getType(): rankType { return `clslCross_${this.group}` as rankType }
|
||||||
// getValArr(info: rankInfo):number|string {
|
|
||||||
// return info?.valArr[0] || 0
|
|
||||||
// }
|
|
||||||
|
|
||||||
// async getRankList(uid: string, {gud, min, max}) {
|
getValArr(info: rankInfo): number | string {
|
||||||
// let rankList = await this.getRankListRange(min, max);
|
// 星级
|
||||||
// let rank = await this.getRankSortByOne(uid);
|
let star = info?.valArr[0] || 0;
|
||||||
// let score = await this.getRankScore(uid)
|
|
||||||
// return {
|
// 战力
|
||||||
// rankList: rankList,
|
let zhanli1 = info?.valArr[1] || 0;
|
||||||
// myRank: {
|
|
||||||
// rank: rank,
|
// 将星级作为整数部分,战力作为小数部分长度为10位 进行拼接
|
||||||
// player: gud,
|
let val = `${star}.${zhanli1.toString().padStart(10, '0')}`;
|
||||||
// valArr: [score]
|
|
||||||
// }
|
return Number(val)
|
||||||
// };
|
}
|
||||||
// }
|
|
||||||
|
|
||||||
async addNew(info: rankInfo) {
|
async addNew(info: rankInfo) {
|
||||||
this.queue.enqueue(async () => {
|
// 积分大于配置的最小参数,更新数据
|
||||||
// 积分大于配置的最小参数,更新数据
|
if (info.valArr[0] >= this.minStar) {
|
||||||
if (info.valArr[0] >= this.minStar) {
|
this.setRankData(info.player[this.findKey], info)
|
||||||
this.setRankData(info.player[this.findKey], info)
|
this.db.updateOne({ type: this.type, idKey: info.player[this.findKey] }, { $set: { data: info } }, { upsert: true });
|
||||||
this.db.updateOne({ type: this.type, idKey: info.player[this.findKey] }, { $set: { data: info } }, { upsert: true });
|
}
|
||||||
// rankList.sort(this.compareSort);
|
}
|
||||||
}
|
}
|
||||||
// 积分小于配置,且用户数据存在时,删除
|
|
||||||
else if (info.valArr[0] < this.minStar) {
|
/**
|
||||||
let rankInfo = await this.getRankData(info.player[this.findKey])
|
* 从林猎手 排行榜检测初始化
|
||||||
if(rankInfo?.player) {
|
*/
|
||||||
this.db.deleteOne({ type: this.type, idKey: info.player[this.findKey] });
|
export async function RankClslCrossInit() {
|
||||||
this.delRankData(info.player[this.findKey])
|
let week = PublicShared.getToWeek();
|
||||||
}
|
let group_time = G.gc.clsl_com.divideTime;
|
||||||
}
|
let week_zero_time = PublicShared.getToWeekMondayZeroTime();
|
||||||
});
|
|
||||||
|
if (G.time > week_zero_time + group_time) {
|
||||||
|
let groups = await G.mongodb.collection('clslCrossGroup').findOne({ week: week });
|
||||||
|
Object.keys(groups.groups).forEach(group => {
|
||||||
|
new RankClslCross(group);
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -13,9 +13,9 @@ export type schedulerType =
|
|||||||
| 'hbzb_cross_reset'
|
| 'hbzb_cross_reset'
|
||||||
| 'hbzb_zbs_ready'
|
| 'hbzb_zbs_ready'
|
||||||
| 'kbzz'
|
| 'kbzz'
|
||||||
| 'clsl_cross_ctor'
|
|
||||||
| 'clsl_local_ctor'
|
|
||||||
| 'clsl_prize'
|
| 'clsl_prize'
|
||||||
|
| 'clsl_cross_ctor'
|
||||||
|
| 'clsl_cross_group'
|
||||||
| 'wzry_autobaoming'
|
| 'wzry_autobaoming'
|
||||||
| 'wzry_dldstart'
|
| 'wzry_dldstart'
|
||||||
| 'wzry_dldjinji'
|
| 'wzry_dldjinji'
|
||||||
|
@ -1,12 +1,16 @@
|
|||||||
|
import { PublicShared } from '../../shared/public/public';
|
||||||
import { EmailFun } from '../email';
|
import { EmailFun } from '../email';
|
||||||
import { Rank } from '../rank/rank';
|
import { RankClslCross, RankClslCrossInit } from '../rank/rank_clsl';
|
||||||
import { Scheduler, schedulerType } from './scheduler';
|
import { Scheduler, schedulerType } from './scheduler';
|
||||||
|
|
||||||
|
/**
|
||||||
export class SchedulerClslCrossCtor extends Scheduler {
|
* 丛林猎手赛季重置
|
||||||
|
*/
|
||||||
|
export class SchedulerClslLocalCtor extends Scheduler {
|
||||||
id: schedulerType = 'clsl_cross_ctor';
|
id: schedulerType = 'clsl_cross_ctor';
|
||||||
time = G.gc.clsl_com.divideTime;
|
|
||||||
name = '丛林猎手赛季初始化';
|
time = 0;
|
||||||
|
name = '丛林猎手赛季重置';
|
||||||
type: 'day' | 'week' = 'week';
|
type: 'day' | 'week' = 'week';
|
||||||
|
|
||||||
async read() {
|
async read() {
|
||||||
@ -15,30 +19,101 @@ export class SchedulerClslCrossCtor extends Scheduler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async start() {
|
async start() {
|
||||||
|
let week = PublicShared.getToWeek(
|
||||||
|
PublicShared.getToWeekMondayZeroTime(G.time - 3600)
|
||||||
|
);
|
||||||
|
|
||||||
G.mongodb.collection('clslCrossUser').updateMany({}, { $set: { allStar: 0 } });
|
// 修改clslCrossUser表中的uid为del_uid_week 并且 设置ttltime为当前时间
|
||||||
Rank.list.clslCross.clear();
|
await G.mongodb.collection('clslCrossUser').updateMany(
|
||||||
|
{}, { $rename: { "uid": `del_uid_${week}` }, $set: { "ttltime": new Date() } }
|
||||||
|
);
|
||||||
|
|
||||||
|
// 获取分组信息 重置排行榜
|
||||||
|
let groups = await G.mongodb.collection('clslCrossGroup').findOne({ week });
|
||||||
|
Object.keys(groups.groups).forEach((group) => {
|
||||||
|
// 清理排行数据
|
||||||
|
new RankClslCross(group).clear();
|
||||||
|
})
|
||||||
|
|
||||||
await this.record();
|
await this.record();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 丛林猎手赛季划分
|
||||||
|
* 达到王者段位的所有玩家 按照创号时间从早到晚排序 每100个玩家划分一个区间
|
||||||
|
*/
|
||||||
|
export class SchedulerClslCrossCtor extends Scheduler {
|
||||||
|
id: schedulerType = 'clsl_cross_group';
|
||||||
|
time = G.gc.clsl_com.divideTime;
|
||||||
|
name = '丛林猎手赛季区间划分 周四00:00';
|
||||||
|
type: 'day' | 'week' = 'week';
|
||||||
|
star = Object.values(G.gc.clsl_dan).slice(-1)[0].allStar;
|
||||||
|
|
||||||
export class SchedulerClslLocalCtor extends SchedulerClslCrossCtor {
|
async read() {
|
||||||
id: schedulerType = 'clsl_local_ctor';
|
await this.ctorStartTime();
|
||||||
|
this.isReady = false;
|
||||||
|
}
|
||||||
|
|
||||||
async start() {
|
async start() {
|
||||||
|
let week = PublicShared.getToWeek();
|
||||||
|
let users = await G.mongodb.collection('clslCrossUser').find({}, {
|
||||||
|
projection: {
|
||||||
|
"uid": 1,
|
||||||
|
"allStar": 1,
|
||||||
|
"info.player.cTime": 1
|
||||||
|
}
|
||||||
|
}).toArray();
|
||||||
|
|
||||||
G.mongodb.cPlayerInfo('clsl').updateMany({ type: 'clsl' }, { $set: { allStar: 0 } });
|
// 筛选出所有王者分段 按照建号时间排序
|
||||||
|
let wzusers = users.filter(u => u.allStar >= this.star).sort((a, b) => a.info.player.cTime - b.info.player.cTime);
|
||||||
|
|
||||||
|
// 每100个玩家划分一个区间
|
||||||
|
let groups: { [group: string]: { st: number, et: number, users: string[] } } = {};
|
||||||
|
for (let i = 0; i < wzusers.length / 100; i++) {
|
||||||
|
groups['group' + i] = {
|
||||||
|
st: wzusers[i * 100].info.player.cTime,
|
||||||
|
et: wzusers[(i + 1) * 100 - 1].info.player.cTime,
|
||||||
|
users: wzusers.slice(i * 100, (i + 1) * 100).map(u => u.uid),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 剩余玩家
|
||||||
|
let remaining_users = [].concat(wzusers.slice((wzusers.length / 100) * 100)); // 王者剩余玩家
|
||||||
|
remaining_users = remaining_users.concat(users.filter(u => u.allStar < this.star)); // 非王者剩余玩家
|
||||||
|
for (let i = 0; i < remaining_users.length; i++) {
|
||||||
|
for (let group in groups) {
|
||||||
|
if (remaining_users[i].info.player.cTime >= groups[group].st && remaining_users[i].info.player.cTime <= groups[group].et) {
|
||||||
|
groups[group].users.push(remaining_users[i].uid);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 更新玩家分组id
|
||||||
|
for (let group in groups) {
|
||||||
|
await G.mongodb.collection('clslCrossUser').updateMany({ uid: { $in: groups[group].users } }, { $set: { group: group } });
|
||||||
|
}
|
||||||
|
|
||||||
|
// 记录分组
|
||||||
|
await G.mongodb.collection("clslCrossGroup").updateOne({ week: week }, { $set: { groups: groups } }, { upsert: true });
|
||||||
|
|
||||||
|
// 初始化丛林猎手排行榜
|
||||||
|
await RankClslCrossInit()
|
||||||
|
|
||||||
await this.record();
|
await this.record();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 丛林猎手赛季发奖
|
||||||
|
*/
|
||||||
export class SchedulerClslPrize extends Scheduler {
|
export class SchedulerClslPrize extends Scheduler {
|
||||||
id: schedulerType = 'clsl_prize';
|
id: schedulerType = 'clsl_prize';
|
||||||
time = G.gc.clsl_com.prizeTime;
|
|
||||||
name = '丛林猎手赛季发奖';
|
name = '丛林猎手赛季发奖';
|
||||||
type: 'day' | 'week' = 'week';
|
type: 'day' | 'week' = 'week';
|
||||||
|
time = G.gc.clsl_com.prizeTime;
|
||||||
|
star = Object.values(G.gc.clsl_dan).slice(-1)[0].allStar;
|
||||||
|
|
||||||
async read() {
|
async read() {
|
||||||
await this.ctorStartTime();
|
await this.ctorStartTime();
|
||||||
@ -46,41 +121,32 @@ export class SchedulerClslPrize extends Scheduler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async start() {
|
async start() {
|
||||||
|
// 排名奖励
|
||||||
|
let group2users: { [group: string]: string[] } = {};
|
||||||
|
(await G.mongodb.collection('clslCrossUser').find({ allStar: { $gte: this.star } }).toArray()).forEach(u => {
|
||||||
|
if (u.group in group2users) {
|
||||||
|
group2users[u.group].push(u.uid);
|
||||||
|
} else {
|
||||||
|
group2users[u.group] = [u.uid];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// 段位奖励
|
Object.values(group2users).forEach((uids, index) => {
|
||||||
let locals = await G.mongodb.cPlayerInfo('clsl').find({ type: 'clsl' }).toArray();
|
G.gc.clsl_com.rankPrize.forEach((conf) => {
|
||||||
G.gc.clsl_com.danPrize.forEach((conf) => {
|
let players = uids.slice(conf.rank[0] - 1, conf.rank[1]);
|
||||||
let sends = locals.filter(l => l.allStar >= conf.star[0]).map(s => s.uid);
|
players.forEach((uid, index) => {
|
||||||
// locals.remove(l => sends.includes(l.uid));
|
EmailFun.addEmail({
|
||||||
|
uid: uid,
|
||||||
sends.forEach(uid => {
|
type: 'system',
|
||||||
EmailFun.addEmail({
|
title: G.gc.clsl_com.email_rank.title,
|
||||||
uid: uid,
|
content: G.gc.clsl_com.email_rank.content,
|
||||||
type: 'system',
|
prize: conf.prize,
|
||||||
title: G.gc.clsl_com.email_dan.title,
|
contentInsertArr: [conf.rank[0] + index]
|
||||||
content: G.gc.clsl_com.email_dan.content,
|
}, true);
|
||||||
prize: conf.prize,
|
|
||||||
contentInsertArr: [conf.star]
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
|
||||||
// 排名奖励
|
|
||||||
let crossUids = (await G.clientCross.callApi('clsl/RankUids', {})).res.uids;
|
|
||||||
G.gc.clsl_com.rankPrize.forEach((conf) => {
|
|
||||||
let players = crossUids.slice(conf.rank[0] - 1, conf.rank[1]);
|
|
||||||
players.forEach((uid, index) => {
|
|
||||||
EmailFun.addEmail({
|
|
||||||
uid: uid,
|
|
||||||
type: 'system',
|
|
||||||
title: G.gc.clsl_com.email_rank.title,
|
|
||||||
content: G.gc.clsl_com.email_rank.content,
|
|
||||||
prize: conf.prize,
|
|
||||||
contentInsertArr: [conf.rank[0] + index]
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
await this.record();
|
await this.record();
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -17,4 +17,8 @@ export type ResOpen = {
|
|||||||
fightWinNum: number;
|
fightWinNum: number;
|
||||||
/**已领取的胜场奖励 */
|
/**已领取的胜场奖励 */
|
||||||
recWinPrize: number[];
|
recWinPrize: number[];
|
||||||
|
/**本期最高段位*/
|
||||||
|
curMaxStar: number;
|
||||||
|
/**段位奖励发放记录*/
|
||||||
|
danPrize: number[];
|
||||||
};
|
};
|
@ -13,9 +13,8 @@ export type ResOpen = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export type rankType = 'jjc' | 'tanxian' | 'zhanli' | 'qjzzd' | 'hbzbLocal' | 'hbzbCross' | 'hbzbZbsCross'
|
export type rankType = 'jjc' | 'tanxian' | 'zhanli' | 'qjzzd' | 'hbzbLocal' | 'hbzbCross' | 'hbzbZbsCross'
|
||||||
| 'slzd1' | 'slzd2' | 'slzd3' | 'slzd4' | 'slzd5' | 'slzd6'
|
| 'slzd1' | 'slzd2' | 'slzd3' | 'slzd4' | 'slzd5' | 'slzd6' | "clslCross"
|
||||||
| 'kbzz' | 'xszm' | 'clslCross'
|
| 'kbzz' | 'xszm' | 'zccg' | 'gbzl' | 'tujian' | 'wzryCross';
|
||||||
| 'zccg' | 'gbzl' | 'tujian' | 'wzryCross';
|
|
||||||
|
|
||||||
export type rankTypeObj = {
|
export type rankTypeObj = {
|
||||||
type?: rankType[],
|
type?: rankType[],
|
||||||
|
@ -7253,6 +7253,23 @@ export const serviceProto: ServiceProto<ServiceType> = {
|
|||||||
"type": "Number"
|
"type": "Number"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 5,
|
||||||
|
"name": "curMaxStar",
|
||||||
|
"type": {
|
||||||
|
"type": "Number"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 6,
|
||||||
|
"name": "danPrize",
|
||||||
|
"type": {
|
||||||
|
"type": "Array",
|
||||||
|
"elementType": {
|
||||||
|
"type": "Number"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -20073,21 +20090,21 @@ export const serviceProto: ServiceProto<ServiceType> = {
|
|||||||
"id": 13,
|
"id": 13,
|
||||||
"type": {
|
"type": {
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"literal": "kbzz"
|
"literal": "clslCross"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 14,
|
"id": 14,
|
||||||
"type": {
|
"type": {
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"literal": "xszm"
|
"literal": "kbzz"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 15,
|
"id": 15,
|
||||||
"type": {
|
"type": {
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"literal": "clslCross"
|
"literal": "xszm"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user