Compare commits
No commits in common. "2c625416a8acdb0355f0ddb39b1faa643e6ebf9f" and "428033b26fab22b18242ada1645959db7e2f9ced" have entirely different histories.
2c625416a8
...
428033b26f
@ -1,49 +1,16 @@
|
|||||||
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 p = PublicShared.randomNum(1, 1000);
|
let my = await G.mongodb.collection('clslCrossUser').findOne({ uid: call.req.uid });
|
||||||
let starConf = getStarConf(call.req.myStasr);
|
let starConf = getStarConf(my.allStar);
|
||||||
|
let others = await G.mongodb.collection('clslCrossUser').find({ uid: { $nin: [call.req.uid] } }).toArray();
|
||||||
let enemy: { allStar: number, info: any };
|
let enemy = others.random();
|
||||||
|
|
||||||
// 本次随机到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,
|
allStar: enemy?.allStar || my.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,37 +1,10 @@
|
|||||||
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: [] } })
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
let a = await G.mongodb.collection('clslCrossUser').findOne({
|
|
||||||
uid: call.req.uid
|
|
||||||
});
|
|
||||||
|
|
||||||
if (!a || !a.group){
|
|
||||||
call.succ({ rankList: [], myRank: { rank: -1, player: {}, valArr: [] } })
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
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.getRankList(call.req.uid, { min, max }));
|
call.succ(await Rank.list.clslCross.getRankList(call.req.gud.uid, { min, max }));
|
||||||
}
|
}
|
9
src/api_cross/clsl/ApiRankUids.ts
Normal file
9
src/api_cross/clsl/ApiRankUids.ts
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
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,49 +1,23 @@
|
|||||||
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, returnDocument: "after" }
|
{ upsert: true }
|
||||||
)).value;
|
);
|
||||||
|
|
||||||
// 周四 并且没有分组 更新玩家分组
|
|
||||||
if ((PublicShared.getWeek(G.time) || 7) >= 4 && !a.group) {
|
|
||||||
// 查询分组数据
|
|
||||||
let week = PublicShared.getToWeek();
|
|
||||||
let group = await G.mongodb.collection('clslCrossGroup').findOne({ week: week });
|
|
||||||
for (let groupid in group.groups) {
|
|
||||||
let groupinfo = group.groups[groupid];
|
|
||||||
if (a.info.player.cTime >= groupinfo.st && a.info.player.cTime < groupinfo.et) {
|
|
||||||
a.group = groupid;
|
|
||||||
G.mongodb.collection('clslCrossUser').updateOne({ uid: uid }, { $set: { group: a.group } });
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (a.group) { // 分完组之后就可以更新排行榜了
|
if (allStar != undefined && ops.info) {
|
||||||
if (allStar != undefined && ops.info) {
|
Rank.list.clslCross.addNew({
|
||||||
let rank;
|
player: a.value.info.player,
|
||||||
if (Rank.list[`clslCross_${a.group}`]) {
|
valArr: [(await G.mongodb.collection('clslCrossUser').findOne({ uid: uid })).allStar]
|
||||||
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,91 +1,43 @@
|
|||||||
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 danPrize = db?.danPrize || [];
|
|
||||||
let curMaxStar = db?.curMaxStar || 0;
|
|
||||||
|
|
||||||
// 战斗次数不足
|
|
||||||
if (useNum >= buyNum + G.gc.clsl_com.fightNum) {
|
|
||||||
return call.errorCode(-2);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 自己战斗数据
|
|
||||||
let my = await call.conn.getDefaultFightData();
|
|
||||||
|
|
||||||
// 获取一个对手
|
|
||||||
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 starConf = G.gc.clsl_dan[curStar] || Object.values(G.gc.clsl_dan).slice(-1)[0];
|
||||||
|
|
||||||
let updata = { $inc: { useFightNum: 1 } };
|
if (useNum >= buyNum + G.gc.clsl_com.fightNum) return call.errorCode(-2);
|
||||||
|
|
||||||
// 更新战斗胜利的次数
|
let my = await call.conn.getDefaultFightData();
|
||||||
if (result.winSide == 0) {
|
let other = (await G.clientCross.callApi('clsl/FindEnemy', {uid: call.uid})).res;
|
||||||
updata.$inc["fightWinNum"] = 1;
|
let result = FightFun.fight([my, other.info]);
|
||||||
|
|
||||||
// 首次达到某个段位
|
if ((result.winSide != 0 && starConf.failCut) || result.winSide == 0) {
|
||||||
if (curStar + 1 > curMaxStar) {
|
addStar(call, result.winSide == 0 ? 1 : -starConf.failCut, my);
|
||||||
curMaxStar += 1;
|
|
||||||
updata.$inc["curMaxStar"] = 1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 段位奖励邮件
|
result.initData[0].star = curStar
|
||||||
let title = G.gc.clsl_com.email_dan.title;
|
result.initData[1].star = other.allStar
|
||||||
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
|
|
||||||
}
|
|
||||||
|
|
||||||
// 发放邮件
|
result.winSide == 0 && clslDb().updateOne({uid: call.uid, type: 'clsl'}, {$inc: {fightWinNum: 1}});
|
||||||
EmailFun.addEmail({
|
clslDb().updateOne({uid: call.uid, type: 'clsl'}, {$inc: {useFightNum: 1}});
|
||||||
uid: call.uid,
|
|
||||||
type: 'system',
|
|
||||||
title: title,
|
|
||||||
content: content,
|
|
||||||
prize: conf.prize,
|
|
||||||
contentInsertArr:[conf.title]
|
|
||||||
})
|
|
||||||
|
|
||||||
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: call.uid, result: result });
|
G.clientCross?.callApi('clsl/Log', {uid: other.info.player.uid, result: result});
|
||||||
G.clientCross?.callApi('clsl/Log', { uid: other.info.player.uid, result: result });
|
|
||||||
|
|
||||||
call.succ({ enemy: other, result: result });
|
call.succ({
|
||||||
|
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,
|
||||||
@ -19,13 +19,6 @@ export default async function (call: ApiCall<ReqOpen, ResOpen>) {
|
|||||||
buyFightNum: 0
|
buyFightNum: 0
|
||||||
};
|
};
|
||||||
|
|
||||||
// 隔周刷新星级
|
|
||||||
if (ops?.refreshTime < PublicShared.getToWeekMondayZeroTime()) {
|
|
||||||
change.allStar = 0;
|
|
||||||
change.danPrize = [];
|
|
||||||
change.curMaxStar = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
Object.assign(ops, change);
|
Object.assign(ops, change);
|
||||||
|
|
||||||
clslDb().updateOne({ uid: call.uid, type: 'clsl' }, { $set: change }, { upsert: true });
|
clslDb().updateOne({ uid: call.uid, type: 'clsl' }, { $set: change }, { upsert: true });
|
||||||
@ -36,10 +29,7 @@ export default async function (call: ApiCall<ReqOpen, ResOpen>) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
call.succ({
|
call.succ({
|
||||||
week: PublicShared.getWeek(G.time) || 7,
|
|
||||||
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,
|
||||||
@ -51,15 +41,7 @@ export function clslDb() {
|
|||||||
return G.mongodb.cPlayerInfo('clsl');
|
return G.mongodb.cPlayerInfo('clsl');
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function addStar(call: ApiCall, star: number, info?: joinFightData, update?: any) {
|
export async function addStar(call: ApiCall, star: number, info?: joinFightData) {
|
||||||
update = update || {};
|
clslDb().updateOne({ uid: call.uid, type: 'clsl' }, { $inc: { allStar: star } }, { upsert: true });
|
||||||
|
|
||||||
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() });
|
||||||
}
|
}
|
@ -19,7 +19,7 @@ export default async function (call: ApiCall<ReqOpen, ResOpen>) {
|
|||||||
if (!db) {
|
if (!db) {
|
||||||
await G.mongodb.cEvent(_dbType).updateOne(
|
await G.mongodb.cEvent(_dbType).updateOne(
|
||||||
{uid: call.uid, type: _dbType},
|
{uid: call.uid, type: _dbType},
|
||||||
{$set: {sTime: sTime, recIndex: [], round: 0}},
|
{$set: {sTime: sTime, recIndex: []}},
|
||||||
{upsert: true}
|
{upsert: true}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -33,6 +33,6 @@ export default async function (call: ApiCall<ReqOpen, ResOpen>) {
|
|||||||
recIndex: db?.recIndex || [],
|
recIndex: db?.recIndex || [],
|
||||||
payNum: payNum,
|
payNum: payNum,
|
||||||
hdinfo: _hdinfo,
|
hdinfo: _hdinfo,
|
||||||
round: db?.round || 0
|
round: db.round || 0
|
||||||
});
|
});
|
||||||
}
|
}
|
@ -6,8 +6,7 @@ import { getToper50RankInfo } from "../hbzb/jfs/fun";
|
|||||||
import { getZbsRankList } from "../hbzb/zbs/fun";
|
import { getZbsRankList } from "../hbzb/zbs/fun";
|
||||||
|
|
||||||
export default async function (call: ApiCall<ReqOpen, ResOpen>) {
|
export default async function (call: ApiCall<ReqOpen, ResOpen>) {
|
||||||
console.log("==============>", call.req)
|
let obj = await rankOpenfun(call, call.req)
|
||||||
let obj = await rankOpenfun(call, call.req);
|
|
||||||
call.succ(obj);
|
call.succ(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -25,7 +24,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
|
||||||
@ -40,7 +39,7 @@ export async function rankOpenfun(call, req: ReqOpen): Promise<ResOpen> {
|
|||||||
const { min, max } = Rank.pageToMin(page, offset)
|
const { min, max } = Rank.pageToMin(page, offset)
|
||||||
for (let type of types) {
|
for (let type of types) {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 'jjc':
|
case 'jjc':
|
||||||
// 获取前50名ranklist数据
|
// 获取前50名ranklist数据
|
||||||
let rankList = await JJCFun.getRankList(min, max);
|
let rankList = await JJCFun.getRankList(min, max);
|
||||||
// 获取自己的排名
|
// 获取自己的排名
|
||||||
@ -69,23 +68,21 @@ 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 res = await G.clientCross.callApi('clsl/Rank', {
|
//let resCallClsl = await G.clientCross.callApi('clsl/Rank', { gud: call.conn.gud, page, offset});
|
||||||
uid: call.uid, page: page, offset: offset
|
//obj[type] = resCallClsl.res;
|
||||||
});
|
|
||||||
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":
|
||||||
@ -96,7 +93,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,7 +3,6 @@ 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 = {
|
||||||
uid: string;
|
gud: player;
|
||||||
page?: number;
|
page?: number;
|
||||||
offset?: number;
|
offset?: number;
|
||||||
};
|
};
|
||||||
|
9
src/cross/protocols/clsl/PtlRankUids.ts
Normal file
9
src/cross/protocols/clsl/PtlRankUids.ts
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
|
||||||
|
|
||||||
|
export type ReqRankUids = {
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
export type ResRankUids = {
|
||||||
|
uids: string[];
|
||||||
|
};
|
@ -2,6 +2,7 @@ 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';
|
||||||
@ -53,6 +54,10 @@ 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
|
||||||
@ -206,181 +211,186 @@ export const serviceProto: ServiceProto<ServiceType> = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 3,
|
"id": 3,
|
||||||
"name": "clsl/UpLoad",
|
"name": "clsl/RankUids",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 4,
|
"id": 4,
|
||||||
"name": "email/DelCrossEmail",
|
"name": "clsl/UpLoad",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 5,
|
"id": 5,
|
||||||
"name": "email/GetCrossEmail",
|
"name": "email/DelCrossEmail",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 6,
|
"id": 6,
|
||||||
"name": "hbzb/jfs/GetEnemy",
|
"name": "email/GetCrossEmail",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 7,
|
"id": 7,
|
||||||
"name": "hbzb/jfs/GetLog",
|
"name": "hbzb/jfs/GetEnemy",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 8,
|
"id": 8,
|
||||||
"name": "hbzb/jfs/GetRankList",
|
"name": "hbzb/jfs/GetLog",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 9,
|
"id": 9,
|
||||||
"name": "hbzb/jfs/GetUser",
|
"name": "hbzb/jfs/GetRankList",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 10,
|
"id": 10,
|
||||||
"name": "hbzb/GetUser",
|
"name": "hbzb/jfs/GetUser",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 11,
|
"id": 11,
|
||||||
"name": "hbzb/UpdateHbzbCrossUser",
|
"name": "hbzb/GetUser",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 12,
|
"id": 12,
|
||||||
"name": "hbzb/zbs/GetEnemy",
|
"name": "hbzb/UpdateHbzbCrossUser",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 13,
|
"id": 13,
|
||||||
"name": "hbzb/zbs/GetLog",
|
"name": "hbzb/zbs/GetEnemy",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 14,
|
"id": 14,
|
||||||
"name": "hbzb/zbs/GetRankList",
|
"name": "hbzb/zbs/GetLog",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 15,
|
"id": 15,
|
||||||
"name": "hbzb/zbs/GetStatus",
|
"name": "hbzb/zbs/GetRankList",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 16,
|
"id": 16,
|
||||||
"name": "hbzb/zbs/SendJjcTop",
|
"name": "hbzb/zbs/GetStatus",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 17,
|
"id": 17,
|
||||||
"name": "kbzz/Apply",
|
"name": "hbzb/zbs/SendJjcTop",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 18,
|
"id": 18,
|
||||||
"name": "kbzz/GetUser",
|
"name": "kbzz/Apply",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 19,
|
"id": 19,
|
||||||
"name": "kbzz/GroupRank",
|
"name": "kbzz/GetUser",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 20,
|
"id": 20,
|
||||||
"name": "kbzz/Rank",
|
"name": "kbzz/GroupRank",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 21,
|
"id": 21,
|
||||||
"name": "kbzz/Refresh",
|
"name": "kbzz/Rank",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 22,
|
"id": 22,
|
||||||
"name": "kbzz/State",
|
"name": "kbzz/Refresh",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 23,
|
"id": 23,
|
||||||
"name": "kbzz/UpUser",
|
"name": "kbzz/State",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 24,
|
"id": 24,
|
||||||
|
"name": "kbzz/UpUser",
|
||||||
|
"type": "api"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 25,
|
||||||
"name": "msg_cross/CrossChat",
|
"name": "msg_cross/CrossChat",
|
||||||
"type": "msg"
|
"type": "msg"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 25,
|
"id": 26,
|
||||||
"name": "msg_cross/HbzbChangeRank",
|
"name": "msg_cross/HbzbChangeRank",
|
||||||
"type": "msg"
|
"type": "msg"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 26,
|
"id": 27,
|
||||||
"name": "msg_cross/HbzbJfsLog",
|
"name": "msg_cross/HbzbJfsLog",
|
||||||
"type": "msg"
|
"type": "msg"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 27,
|
"id": 28,
|
||||||
"name": "msg_cross/HbzbSendUser",
|
"name": "msg_cross/HbzbSendUser",
|
||||||
"type": "msg"
|
"type": "msg"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 28,
|
"id": 29,
|
||||||
"name": "msg_cross/HbzbZbsLog",
|
"name": "msg_cross/HbzbZbsLog",
|
||||||
"type": "msg"
|
"type": "msg"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 29,
|
"id": 30,
|
||||||
"name": "wzry/BaoMing",
|
"name": "wzry/BaoMing",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 30,
|
"id": 31,
|
||||||
"name": "wzry/catFightLog",
|
"name": "wzry/catFightLog",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 31,
|
"id": 32,
|
||||||
"name": "wzry/DldRefre",
|
"name": "wzry/DldRefre",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 32,
|
"id": 33,
|
||||||
"name": "wzry/getJingCai",
|
"name": "wzry/getJingCai",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 33,
|
"id": 34,
|
||||||
"name": "wzry/Rank",
|
"name": "wzry/Rank",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 34,
|
"id": 35,
|
||||||
"name": "wzry/SetWzFight",
|
"name": "wzry/SetWzFight",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 35,
|
"id": 36,
|
||||||
"name": "wzry/UpdateFight",
|
"name": "wzry/UpdateFight",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 36,
|
"id": 37,
|
||||||
"name": "wzry/WzFightData",
|
"name": "wzry/WzFightData",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 37,
|
"id": 38,
|
||||||
"name": "wzry/WzFightGroup",
|
"name": "wzry/WzFightGroup",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 38,
|
"id": 39,
|
||||||
"name": "wzry/Wzzd",
|
"name": "wzry/Wzzd",
|
||||||
"type": "api"
|
"type": "api"
|
||||||
}
|
}
|
||||||
@ -395,13 +405,6 @@ export const serviceProto: ServiceProto<ServiceType> = {
|
|||||||
"type": {
|
"type": {
|
||||||
"type": "String"
|
"type": "String"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": 1,
|
|
||||||
"name": "myStasr",
|
|
||||||
"type": {
|
|
||||||
"type": "Number"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -2750,9 +2753,10 @@ export const serviceProto: ServiceProto<ServiceType> = {
|
|||||||
"properties": [
|
"properties": [
|
||||||
{
|
{
|
||||||
"id": 0,
|
"id": 0,
|
||||||
"name": "uid",
|
"name": "gud",
|
||||||
"type": {
|
"type": {
|
||||||
"type": "String"
|
"type": "Reference",
|
||||||
|
"target": "../../shared/protocols/user/type/player"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -2773,6 +2777,14 @@ 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": "",
|
||||||
@ -2885,6 +2897,24 @@ 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": {
|
||||||
@ -3228,14 +3258,6 @@ 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": [
|
||||||
|
@ -30,17 +30,16 @@ async function connGameLogDB() {
|
|||||||
|
|
||||||
|
|
||||||
process.on('uncaughtException',function(err:Error){
|
process.on('uncaughtException',function(err:Error){
|
||||||
addErrorLog((err?.stack)?.toString());
|
addErrorLog((err.stack).toString());
|
||||||
})
|
})
|
||||||
|
|
||||||
process.on('unhandledRejection', function (err:Error, promise) {
|
process.on('unhandledRejection', function (err:Error, promise) {
|
||||||
addErrorLog((err?.stack)?.toString());
|
addErrorLog((err.stack).toString());
|
||||||
})
|
})
|
||||||
|
|
||||||
async function addErrorLog(errData:any){
|
async function addErrorLog(errData:any){
|
||||||
try{
|
try{
|
||||||
//g123测试版连接不上db,不抓取
|
//g123测试版连接不上db,不抓取
|
||||||
if(!errData)return;
|
|
||||||
if(isG123stg())return;
|
if(isG123stg())return;
|
||||||
let log = {
|
let log = {
|
||||||
serverId : G.config.serverId,
|
serverId : G.config.serverId,
|
||||||
|
@ -1,11 +1,18 @@
|
|||||||
{
|
{
|
||||||
//赛区划分按照周三23:50的时候王者玩家100个一组
|
//赛区划分
|
||||||
//赛区划分时间周三23:50
|
divide: [
|
||||||
divideTime: 258600,
|
{ day: [1, 30], group: 0 },
|
||||||
//挑战时间周一08:00——周六22:00
|
{ day: [31, 60], group: 1 },
|
||||||
|
{ 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: 511500,
|
prizeTime: 598200,
|
||||||
//胜场奖励
|
//胜场奖励
|
||||||
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 },
|
||||||
@ -32,13 +39,13 @@
|
|||||||
],
|
],
|
||||||
//段位奖励
|
//段位奖励
|
||||||
danPrize: [
|
danPrize: [
|
||||||
{ star: 49, title: "clsl_7", 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, 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, title: "clsl_6", prize: [{ a: 'item', t: '605', n:2 },{ a: 'item', t: '29', n:5 },{ a: 'item', t: '631', n:2 }] },
|
{ star: [39, 48], prize: [{ a: 'item', t: '605', n:2 },{ a: 'item', t: '29', n:5 },{ a: 'item', t: '631', n:2 }] },
|
||||||
{ star: 29, title: "clsl_5", prize: [{ a: 'item', t: '606', n:3 },{ a: 'item', t: '29', n:5 },{ a: 'item', t: '631', n:1 }] },
|
{ star: [29, 38], prize: [{ a: 'item', t: '606', n:3 },{ a: 'item', t: '29', n:5 },{ a: 'item', t: '631', n:1 }] },
|
||||||
{ star: 21, title: "clsl_4", prize: [{ a: 'item', t: '606', n:2 },{ a: 'item', t: '29', n:5 },{ a: 'item', t: '39', n:1000 }] },
|
{ star: [21, 28], prize: [{ a: 'item', t: '606', n:2 },{ a: 'item', t: '29', n:5 },{ a: 'item', t: '39', n:1000 }] },
|
||||||
{ star: 13, title: "clsl_3", prize: [{ a: 'item', t: '606', n:1 },{ a: 'item', t: '29', n:5 },{ a: 'item', t: '39', n:800 }] },
|
{ star: [13, 20], prize: [{ a: 'item', t: '606', n:1 },{ a: 'item', t: '29', n:5 },{ a: 'item', t: '39', n:800 }] },
|
||||||
{ star: 7, title: "clsl_2", prize: [{ a: 'item', t: '29', n:10 },{ a: 'item', t: '29', n:5 },{ a: 'item', t: '39', n:600 }] },
|
{ star: [7, 12], prize: [{ a: 'item', t: '29', n:10 },{ a: 'item', t: '29', n:5 },{ a: 'item', t: '39', n:600 }] },
|
||||||
{ star: 0, title: "clsl_1", prize: [{ a: 'item', t: '29', n:5 },{ a: 'item', t: '29', n:5 },{ a: 'item', t: '39', n:400 }] }
|
{ star: [0, 6], prize: [{ a: 'item', t: '29', n:5 },{ a: 'item', t: '29', n:5 },{ a: 'item', t: '39', n:400 }] }
|
||||||
],
|
],
|
||||||
//王者排名邮件信息
|
//王者排名邮件信息
|
||||||
email_rank: {
|
email_rank: {
|
||||||
|
@ -18,11 +18,6 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"pro": 0.6,
|
|
||||||
"fighter": [
|
|
||||||
0,
|
|
||||||
6
|
|
||||||
],
|
|
||||||
"npc": 60001
|
"npc": 60001
|
||||||
},
|
},
|
||||||
"1": {
|
"1": {
|
||||||
@ -44,11 +39,6 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"pro": 0.6,
|
|
||||||
"fighter": [
|
|
||||||
0,
|
|
||||||
6
|
|
||||||
],
|
|
||||||
"npc": 60002
|
"npc": 60002
|
||||||
},
|
},
|
||||||
"2": {
|
"2": {
|
||||||
@ -70,11 +60,6 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"pro": 0.6,
|
|
||||||
"fighter": [
|
|
||||||
0,
|
|
||||||
6
|
|
||||||
],
|
|
||||||
"npc": 60003
|
"npc": 60003
|
||||||
},
|
},
|
||||||
"3": {
|
"3": {
|
||||||
@ -96,11 +81,6 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"pro": 0.6,
|
|
||||||
"fighter": [
|
|
||||||
0,
|
|
||||||
6
|
|
||||||
],
|
|
||||||
"npc": 60004
|
"npc": 60004
|
||||||
},
|
},
|
||||||
"4": {
|
"4": {
|
||||||
@ -122,11 +102,6 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"pro": 0.6,
|
|
||||||
"fighter": [
|
|
||||||
0,
|
|
||||||
6
|
|
||||||
],
|
|
||||||
"npc": 60005
|
"npc": 60005
|
||||||
},
|
},
|
||||||
"5": {
|
"5": {
|
||||||
@ -148,11 +123,6 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"pro": 0.6,
|
|
||||||
"fighter": [
|
|
||||||
0,
|
|
||||||
6
|
|
||||||
],
|
|
||||||
"npc": 60006
|
"npc": 60006
|
||||||
},
|
},
|
||||||
"6": {
|
"6": {
|
||||||
@ -174,11 +144,6 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"pro": 0.6,
|
|
||||||
"fighter": [
|
|
||||||
0,
|
|
||||||
6
|
|
||||||
],
|
|
||||||
"npc": 60007
|
"npc": 60007
|
||||||
},
|
},
|
||||||
"7": {
|
"7": {
|
||||||
@ -200,11 +165,6 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"pro": 0.6,
|
|
||||||
"fighter": [
|
|
||||||
7,
|
|
||||||
12
|
|
||||||
],
|
|
||||||
"npc": 60008
|
"npc": 60008
|
||||||
},
|
},
|
||||||
"8": {
|
"8": {
|
||||||
@ -226,11 +186,6 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"pro": 0.6,
|
|
||||||
"fighter": [
|
|
||||||
7,
|
|
||||||
12
|
|
||||||
],
|
|
||||||
"npc": 60009
|
"npc": 60009
|
||||||
},
|
},
|
||||||
"9": {
|
"9": {
|
||||||
@ -252,11 +207,6 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"pro": 0.6,
|
|
||||||
"fighter": [
|
|
||||||
7,
|
|
||||||
12
|
|
||||||
],
|
|
||||||
"npc": 60010
|
"npc": 60010
|
||||||
},
|
},
|
||||||
"10": {
|
"10": {
|
||||||
@ -278,11 +228,6 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"pro": 0.6,
|
|
||||||
"fighter": [
|
|
||||||
7,
|
|
||||||
12
|
|
||||||
],
|
|
||||||
"npc": 60011
|
"npc": 60011
|
||||||
},
|
},
|
||||||
"11": {
|
"11": {
|
||||||
@ -304,11 +249,6 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"pro": 0.6,
|
|
||||||
"fighter": [
|
|
||||||
7,
|
|
||||||
12
|
|
||||||
],
|
|
||||||
"npc": 60012
|
"npc": 60012
|
||||||
},
|
},
|
||||||
"12": {
|
"12": {
|
||||||
@ -330,11 +270,6 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"pro": 0.6,
|
|
||||||
"fighter": [
|
|
||||||
7,
|
|
||||||
12
|
|
||||||
],
|
|
||||||
"npc": 60013
|
"npc": 60013
|
||||||
},
|
},
|
||||||
"13": {
|
"13": {
|
||||||
@ -356,11 +291,6 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"pro": 0.3,
|
|
||||||
"fighter": [
|
|
||||||
13,
|
|
||||||
20
|
|
||||||
],
|
|
||||||
"npc": 60014
|
"npc": 60014
|
||||||
},
|
},
|
||||||
"14": {
|
"14": {
|
||||||
@ -382,11 +312,6 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"pro": 0.3,
|
|
||||||
"fighter": [
|
|
||||||
13,
|
|
||||||
20
|
|
||||||
],
|
|
||||||
"npc": 60015
|
"npc": 60015
|
||||||
},
|
},
|
||||||
"15": {
|
"15": {
|
||||||
@ -408,11 +333,6 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"pro": 0.3,
|
|
||||||
"fighter": [
|
|
||||||
13,
|
|
||||||
20
|
|
||||||
],
|
|
||||||
"npc": 60016
|
"npc": 60016
|
||||||
},
|
},
|
||||||
"16": {
|
"16": {
|
||||||
@ -434,11 +354,6 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"pro": 0.3,
|
|
||||||
"fighter": [
|
|
||||||
13,
|
|
||||||
20
|
|
||||||
],
|
|
||||||
"npc": 60017
|
"npc": 60017
|
||||||
},
|
},
|
||||||
"17": {
|
"17": {
|
||||||
@ -460,11 +375,6 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"pro": 0.3,
|
|
||||||
"fighter": [
|
|
||||||
13,
|
|
||||||
20
|
|
||||||
],
|
|
||||||
"npc": 60018
|
"npc": 60018
|
||||||
},
|
},
|
||||||
"18": {
|
"18": {
|
||||||
@ -486,11 +396,6 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"pro": 0.3,
|
|
||||||
"fighter": [
|
|
||||||
13,
|
|
||||||
20
|
|
||||||
],
|
|
||||||
"npc": 60019
|
"npc": 60019
|
||||||
},
|
},
|
||||||
"19": {
|
"19": {
|
||||||
@ -512,11 +417,6 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"pro": 0.3,
|
|
||||||
"fighter": [
|
|
||||||
13,
|
|
||||||
20
|
|
||||||
],
|
|
||||||
"npc": 60020
|
"npc": 60020
|
||||||
},
|
},
|
||||||
"20": {
|
"20": {
|
||||||
@ -538,11 +438,6 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"pro": 0.3,
|
|
||||||
"fighter": [
|
|
||||||
13,
|
|
||||||
20
|
|
||||||
],
|
|
||||||
"npc": 60021
|
"npc": 60021
|
||||||
},
|
},
|
||||||
"21": {
|
"21": {
|
||||||
@ -564,11 +459,6 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"pro": 0.3,
|
|
||||||
"fighter": [
|
|
||||||
21,
|
|
||||||
28
|
|
||||||
],
|
|
||||||
"npc": 60022
|
"npc": 60022
|
||||||
},
|
},
|
||||||
"22": {
|
"22": {
|
||||||
@ -590,11 +480,6 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"pro": 0.3,
|
|
||||||
"fighter": [
|
|
||||||
21,
|
|
||||||
28
|
|
||||||
],
|
|
||||||
"npc": 60023
|
"npc": 60023
|
||||||
},
|
},
|
||||||
"23": {
|
"23": {
|
||||||
@ -616,11 +501,6 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"pro": 0.3,
|
|
||||||
"fighter": [
|
|
||||||
21,
|
|
||||||
28
|
|
||||||
],
|
|
||||||
"npc": 60024
|
"npc": 60024
|
||||||
},
|
},
|
||||||
"24": {
|
"24": {
|
||||||
@ -642,11 +522,6 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"pro": 0.3,
|
|
||||||
"fighter": [
|
|
||||||
21,
|
|
||||||
28
|
|
||||||
],
|
|
||||||
"npc": 60025
|
"npc": 60025
|
||||||
},
|
},
|
||||||
"25": {
|
"25": {
|
||||||
@ -668,11 +543,6 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"pro": 0.3,
|
|
||||||
"fighter": [
|
|
||||||
21,
|
|
||||||
28
|
|
||||||
],
|
|
||||||
"npc": 60026
|
"npc": 60026
|
||||||
},
|
},
|
||||||
"26": {
|
"26": {
|
||||||
@ -694,11 +564,6 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"pro": 0.3,
|
|
||||||
"fighter": [
|
|
||||||
21,
|
|
||||||
28
|
|
||||||
],
|
|
||||||
"npc": 60027
|
"npc": 60027
|
||||||
},
|
},
|
||||||
"27": {
|
"27": {
|
||||||
@ -720,11 +585,6 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"pro": 0.3,
|
|
||||||
"fighter": [
|
|
||||||
21,
|
|
||||||
28
|
|
||||||
],
|
|
||||||
"npc": 60028
|
"npc": 60028
|
||||||
},
|
},
|
||||||
"28": {
|
"28": {
|
||||||
@ -746,11 +606,6 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"pro": 0.3,
|
|
||||||
"fighter": [
|
|
||||||
21,
|
|
||||||
28
|
|
||||||
],
|
|
||||||
"npc": 60029
|
"npc": 60029
|
||||||
},
|
},
|
||||||
"29": {
|
"29": {
|
||||||
@ -772,11 +627,6 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"pro": 0.15,
|
|
||||||
"fighter": [
|
|
||||||
29,
|
|
||||||
38
|
|
||||||
],
|
|
||||||
"npc": 60030
|
"npc": 60030
|
||||||
},
|
},
|
||||||
"30": {
|
"30": {
|
||||||
@ -798,11 +648,6 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"pro": 0.15,
|
|
||||||
"fighter": [
|
|
||||||
29,
|
|
||||||
38
|
|
||||||
],
|
|
||||||
"npc": 60031
|
"npc": 60031
|
||||||
},
|
},
|
||||||
"31": {
|
"31": {
|
||||||
@ -824,11 +669,6 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"pro": 0.15,
|
|
||||||
"fighter": [
|
|
||||||
29,
|
|
||||||
38
|
|
||||||
],
|
|
||||||
"npc": 60032
|
"npc": 60032
|
||||||
},
|
},
|
||||||
"32": {
|
"32": {
|
||||||
@ -850,11 +690,6 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"pro": 0.15,
|
|
||||||
"fighter": [
|
|
||||||
29,
|
|
||||||
38
|
|
||||||
],
|
|
||||||
"npc": 60033
|
"npc": 60033
|
||||||
},
|
},
|
||||||
"33": {
|
"33": {
|
||||||
@ -876,11 +711,6 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"pro": 0.15,
|
|
||||||
"fighter": [
|
|
||||||
29,
|
|
||||||
38
|
|
||||||
],
|
|
||||||
"npc": 60034
|
"npc": 60034
|
||||||
},
|
},
|
||||||
"34": {
|
"34": {
|
||||||
@ -902,11 +732,6 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"pro": 0.15,
|
|
||||||
"fighter": [
|
|
||||||
29,
|
|
||||||
38
|
|
||||||
],
|
|
||||||
"npc": 60035
|
"npc": 60035
|
||||||
},
|
},
|
||||||
"35": {
|
"35": {
|
||||||
@ -928,11 +753,6 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"pro": 0.15,
|
|
||||||
"fighter": [
|
|
||||||
29,
|
|
||||||
38
|
|
||||||
],
|
|
||||||
"npc": 60036
|
"npc": 60036
|
||||||
},
|
},
|
||||||
"36": {
|
"36": {
|
||||||
@ -954,11 +774,6 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"pro": 0.15,
|
|
||||||
"fighter": [
|
|
||||||
29,
|
|
||||||
38
|
|
||||||
],
|
|
||||||
"npc": 60037
|
"npc": 60037
|
||||||
},
|
},
|
||||||
"37": {
|
"37": {
|
||||||
@ -980,11 +795,6 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"pro": 0.15,
|
|
||||||
"fighter": [
|
|
||||||
29,
|
|
||||||
38
|
|
||||||
],
|
|
||||||
"npc": 60038
|
"npc": 60038
|
||||||
},
|
},
|
||||||
"38": {
|
"38": {
|
||||||
@ -1006,11 +816,6 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"pro": 0.15,
|
|
||||||
"fighter": [
|
|
||||||
29,
|
|
||||||
38
|
|
||||||
],
|
|
||||||
"npc": 60039
|
"npc": 60039
|
||||||
},
|
},
|
||||||
"39": {
|
"39": {
|
||||||
@ -1032,11 +837,6 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"pro": 0.15,
|
|
||||||
"fighter": [
|
|
||||||
39,
|
|
||||||
48
|
|
||||||
],
|
|
||||||
"npc": 60040
|
"npc": 60040
|
||||||
},
|
},
|
||||||
"40": {
|
"40": {
|
||||||
@ -1058,11 +858,6 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"pro": 0.15,
|
|
||||||
"fighter": [
|
|
||||||
39,
|
|
||||||
48
|
|
||||||
],
|
|
||||||
"npc": 60041
|
"npc": 60041
|
||||||
},
|
},
|
||||||
"41": {
|
"41": {
|
||||||
@ -1084,11 +879,6 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"pro": 0.15,
|
|
||||||
"fighter": [
|
|
||||||
39,
|
|
||||||
48
|
|
||||||
],
|
|
||||||
"npc": 60042
|
"npc": 60042
|
||||||
},
|
},
|
||||||
"42": {
|
"42": {
|
||||||
@ -1110,11 +900,6 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"pro": 0.15,
|
|
||||||
"fighter": [
|
|
||||||
39,
|
|
||||||
48
|
|
||||||
],
|
|
||||||
"npc": 60043
|
"npc": 60043
|
||||||
},
|
},
|
||||||
"43": {
|
"43": {
|
||||||
@ -1136,11 +921,6 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"pro": 0.15,
|
|
||||||
"fighter": [
|
|
||||||
39,
|
|
||||||
48
|
|
||||||
],
|
|
||||||
"npc": 60044
|
"npc": 60044
|
||||||
},
|
},
|
||||||
"44": {
|
"44": {
|
||||||
@ -1162,11 +942,6 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"pro": 0.15,
|
|
||||||
"fighter": [
|
|
||||||
39,
|
|
||||||
48
|
|
||||||
],
|
|
||||||
"npc": 60045
|
"npc": 60045
|
||||||
},
|
},
|
||||||
"45": {
|
"45": {
|
||||||
@ -1188,11 +963,6 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"pro": 0.15,
|
|
||||||
"fighter": [
|
|
||||||
39,
|
|
||||||
48
|
|
||||||
],
|
|
||||||
"npc": 60046
|
"npc": 60046
|
||||||
},
|
},
|
||||||
"46": {
|
"46": {
|
||||||
@ -1214,11 +984,6 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"pro": 0.15,
|
|
||||||
"fighter": [
|
|
||||||
39,
|
|
||||||
48
|
|
||||||
],
|
|
||||||
"npc": 60047
|
"npc": 60047
|
||||||
},
|
},
|
||||||
"47": {
|
"47": {
|
||||||
@ -1240,11 +1005,6 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"pro": 0.15,
|
|
||||||
"fighter": [
|
|
||||||
39,
|
|
||||||
48
|
|
||||||
],
|
|
||||||
"npc": 60048
|
"npc": 60048
|
||||||
},
|
},
|
||||||
"48": {
|
"48": {
|
||||||
@ -1266,11 +1026,6 @@
|
|||||||
"n": 100
|
"n": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"pro": 0.15,
|
|
||||||
"fighter": [
|
|
||||||
39,
|
|
||||||
48
|
|
||||||
],
|
|
||||||
"npc": 60049
|
"npc": 60049
|
||||||
},
|
},
|
||||||
"49": {
|
"49": {
|
||||||
@ -1292,11 +1047,6 @@
|
|||||||
"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, "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, 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,11 +122,7 @@ 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<{
|
||||||
|
@ -6,9 +6,4 @@ export type CollectionCllsCrossUser = {
|
|||||||
area: number;
|
area: number;
|
||||||
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 {CollectionCllsCrossGroup, CollectionCllsCrossUser} from './collection_clsl';
|
import {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,8 +115,7 @@ export type MongodbCollections = {
|
|||||||
any: { type: string, data: any[]; };
|
any: { type: string, data: any[]; };
|
||||||
zhanling: CollectionZhanLing;
|
zhanling: CollectionZhanLing;
|
||||||
|
|
||||||
clslCrossGroup: CollectionCllsCrossGroup;
|
clslCrossUser: CollectionCllsCrossUser;
|
||||||
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": "clslCross"
|
"literal": "kbzz"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 14,
|
"id": 14,
|
||||||
"type": {
|
"type": {
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"literal": "kbzz"
|
"literal": "xszm"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 15,
|
"id": 15,
|
||||||
"type": {
|
"type": {
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"literal": "xszm"
|
"literal": "clslCross"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -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', 'clsl']
|
let writeList = ['ganhai', 'jjc', 'hbzbJfs', 'hbzbZbs', 'slzd']
|
||||||
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,12 +108,8 @@ export abstract class Rank {
|
|||||||
return this.getType();
|
return this.getType();
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor(param?: any) {
|
constructor() {
|
||||||
// 将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();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -139,7 +135,7 @@ export abstract class Rank {
|
|||||||
|
|
||||||
//将db里的数据,写入到 rank:xxx:sort里
|
//将db里的数据,写入到 rank:xxx:sort里
|
||||||
//写入的单条数据为: {uid:score}
|
//写入的单条数据为: {uid:score}
|
||||||
|
|
||||||
// 首先清理redis中sort数据 在从数据库中初始化
|
// 首先清理redis中sort数据 在从数据库中初始化
|
||||||
await G.ioredis.del(this.getRedisKeySort);
|
await G.ioredis.del(this.getRedisKeySort);
|
||||||
|
|
||||||
@ -257,57 +253,61 @@ export abstract class Rank {
|
|||||||
if (uids && uids.length > 0) {
|
if (uids && uids.length > 0) {
|
||||||
let res = await this.db.find({ idKey: { $in: uids }, type: this.getType() }).toArray()
|
let res = await this.db.find({ idKey: { $in: uids }, type: this.getType() }).toArray()
|
||||||
|
|
||||||
if (this.type.indexOf("slzd") != -1) {
|
switch (this.getType()) {
|
||||||
let ghid = [];
|
case "slzd1":
|
||||||
res = res.map(item => {
|
case "slzd2":
|
||||||
if (!item.data?.player?.ghid || item.data.utime + 60 < G.time) {
|
case "slzd3":
|
||||||
ghid.push(G.mongodb.conversionId(item.idKey));
|
case "slzd4":
|
||||||
}
|
case "slzd5":
|
||||||
return item;
|
case "slzd6":
|
||||||
})
|
let ghid = [];
|
||||||
if (ghid.length > 0) {
|
res = res.map(item => {
|
||||||
let ghinfo = await G.mongodb.collection("gonghui").find(
|
if (!item.data?.player?.ghid || item.data.utime + 60 < G.time) {
|
||||||
{ _id: { $in: ghid } }, { projection: { name: 1 } }
|
ghid.push(G.mongodb.conversionId(item.idKey));
|
||||||
).toArray();
|
}
|
||||||
ghinfo.forEach(item => {
|
return item;
|
||||||
let index = res.findIndex(x => x.idKey == item._id.toHexString());
|
|
||||||
res[index].data.player = {
|
|
||||||
ghName: item.name,
|
|
||||||
ghId: item._id.toHexString(),
|
|
||||||
};
|
|
||||||
this.db.updateOne({ idKey: item._id.toHexString(), type: this.getType() }, { $set: { "data.player": res[index].data.player } });
|
|
||||||
})
|
})
|
||||||
}
|
if (ghid.length > 0) {
|
||||||
} else if (this.type.indexOf('clslCross') != -1) {
|
let ghinfo = await G.mongodb.collection("gonghui").find(
|
||||||
// 丛林猎手 跨服排行榜 不需要更新
|
{ _id: { $in: ghid } }, { projection: { name: 1 } }
|
||||||
} else {
|
).toArray();
|
||||||
let updateUids = [];
|
ghinfo.forEach(item => {
|
||||||
res = res.map(item => {
|
let index = res.findIndex(x => x.idKey == item._id.toHexString());
|
||||||
// 没有player 或者 player 过期
|
res[index].data.player = {
|
||||||
if (!item.data?.player || item.data.utime + 60 < G.time) {
|
ghName: item.name,
|
||||||
updateUids.push(item.idKey);
|
ghId: item._id.toHexString(),
|
||||||
|
};
|
||||||
|
this.db.updateOne({ idKey: item._id.toHexString(), type: this.getType() }, { $set: { "data.player": res[index].data.player } });
|
||||||
|
})
|
||||||
}
|
}
|
||||||
return item;
|
break;
|
||||||
});
|
default: // 排行数据更新逻辑 默认更新playerInfo
|
||||||
|
let updateUids = [];
|
||||||
|
res = res.map(item => {
|
||||||
|
// 没有player 或者 player 过期
|
||||||
|
if (!item.data?.player || item.data.utime + 60 < G.time) {
|
||||||
|
updateUids.push(item.idKey);
|
||||||
|
}
|
||||||
|
return item;
|
||||||
|
});
|
||||||
|
let newUserArr = await G.mongodb.collection('user').find(
|
||||||
|
{ uid: { $in: updateUids } }, { projection: { _id: 0 } }
|
||||||
|
).toArray();
|
||||||
|
|
||||||
let newUserArr = await G.mongodb.collection('user').find(
|
newUserArr.forEach(item => {
|
||||||
{ uid: { $in: updateUids } }, { projection: { _id: 0 } }
|
// 每次遍历查找?
|
||||||
).toArray();
|
let index = res.findIndex(x => x.idKey == item.uid);
|
||||||
|
|
||||||
newUserArr.forEach(item => {
|
res[index].data.player = item;
|
||||||
// 每次遍历查找?
|
this.db.updateOne({ idKey: item.uid, type: this.getType() }, { $set: { "data.player": item } });
|
||||||
let index = res.findIndex(x => x.idKey == item.uid);
|
|
||||||
|
|
||||||
res[index].data.player = item;
|
// 跟新redis score
|
||||||
this.db.updateOne({ idKey: item.uid, type: this.getType() }, { $set: { "data.player": item } });
|
// this.setRankData(item.uid, res[index].data as any);
|
||||||
|
})
|
||||||
// 跟新redis score
|
|
||||||
// this.setRankData(item.uid, res[index].data as any);
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 按照redis uids 排序顺序排序
|
// 按照redis uids 排序顺序排序
|
||||||
return res.sort((a, b) => uids.indexOf(a.idKey) - uids.indexOf(b.idKey)).map(ele => ele.data);
|
return res.sort((a,b)=>uids.indexOf(a.idKey)-uids.indexOf(b.idKey)).map(ele => ele.data);
|
||||||
}
|
}
|
||||||
return []
|
return []
|
||||||
}
|
}
|
||||||
@ -405,10 +405,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);
|
||||||
this.db.deleteMany({ type: this.type });
|
await this.db.deleteMany({ type: this.type });
|
||||||
// });
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,58 +1,58 @@
|
|||||||
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 { PublicShared } from '../../shared/public/public';
|
import { player } from '../../shared/protocols/user/type';
|
||||||
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 {
|
||||||
constructor(group: string = 'group0') {
|
return 'clslCross';
|
||||||
super({ group });
|
|
||||||
}
|
|
||||||
|
|
||||||
getType(): rankType { return `clslCross_${this.group}` as rankType }
|
|
||||||
|
|
||||||
getValArr(info: rankInfo): number | string {
|
|
||||||
// 星级
|
|
||||||
let star = info?.valArr[0] || 0;
|
|
||||||
|
|
||||||
// 战力
|
|
||||||
let zhanli1 = info?.valArr[1] || 0;
|
|
||||||
|
|
||||||
// 将星级作为整数部分,战力作为小数部分长度为10位 进行拼接
|
|
||||||
let val = `${star}.${zhanli1.toString().padStart(10, '0')}`;
|
|
||||||
|
|
||||||
return Number(val)
|
|
||||||
}
|
|
||||||
|
|
||||||
async getRankData(uid: string) {
|
|
||||||
let data: rankInfo;
|
|
||||||
return (await this.db.findOne({ "idKey": uid, "type": this.getType() }))?.data
|
|
||||||
}
|
}
|
||||||
|
// 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];
|
||||||
|
// }
|
||||||
|
|
||||||
|
// // 积分, 排名依据
|
||||||
|
// getValArr(info: rankInfo):number|string {
|
||||||
|
// return info?.valArr[0] || 0
|
||||||
|
// }
|
||||||
|
|
||||||
|
// async getRankList(uid: string, {gud, min, max}) {
|
||||||
|
// let rankList = await this.getRankListRange(min, max);
|
||||||
|
// let rank = await this.getRankSortByOne(uid);
|
||||||
|
// let score = await this.getRankScore(uid)
|
||||||
|
// return {
|
||||||
|
// rankList: rankList,
|
||||||
|
// myRank: {
|
||||||
|
// rank: rank,
|
||||||
|
// player: gud,
|
||||||
|
// valArr: [score]
|
||||||
|
// }
|
||||||
|
// };
|
||||||
|
// }
|
||||||
|
|
||||||
async addNew(info: rankInfo) {
|
async addNew(info: rankInfo) {
|
||||||
// 积分大于配置的最小参数,更新数据
|
this.queue.enqueue(async () => {
|
||||||
if (info.valArr[0] >= this.minStar) {
|
// 积分大于配置的最小参数,更新数据
|
||||||
this.setRankData(info.player[this.findKey], info)
|
if (info.valArr[0] >= this.minStar) {
|
||||||
this.db.updateOne({ type: this.type, idKey: info.player[this.findKey] }, { $set: { data: info } }, { upsert: true });
|
this.setRankData(info.player[this.findKey], info)
|
||||||
}
|
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) {
|
||||||
export async function RankClslCrossInit() {
|
this.db.deleteOne({ type: this.type, idKey: info.player[this.findKey] });
|
||||||
let week = PublicShared.getToWeek();
|
this.delRankData(info.player[this.findKey])
|
||||||
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_prize'
|
|
||||||
| 'clsl_cross_ctor'
|
| 'clsl_cross_ctor'
|
||||||
| 'clsl_cross_group'
|
| 'clsl_local_ctor'
|
||||||
|
| 'clsl_prize'
|
||||||
| 'wzry_autobaoming'
|
| 'wzry_autobaoming'
|
||||||
| 'wzry_dldstart'
|
| 'wzry_dldstart'
|
||||||
| 'wzry_dldjinji'
|
| 'wzry_dldjinji'
|
||||||
|
@ -1,60 +1,13 @@
|
|||||||
import {PublicShared} from '../../shared/public/public';
|
import { EmailFun } from '../email';
|
||||||
import {EmailFun} from '../email';
|
import { Rank } from '../rank/rank';
|
||||||
import {RankClslCross} from '../rank/rank_clsl';
|
import { Scheduler, schedulerType } from './scheduler';
|
||||||
import {Scheduler, schedulerType} from './scheduler';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 丛林猎手赛季重置
|
|
||||||
*/
|
|
||||||
export class SchedulerClslLocalCtor extends Scheduler {
|
|
||||||
id: schedulerType = 'clsl_cross_ctor';
|
|
||||||
|
|
||||||
time = 0;
|
|
||||||
name = '丛林猎手赛季重置';
|
|
||||||
type: 'day' | 'week' = 'week';
|
|
||||||
|
|
||||||
async read() {
|
|
||||||
await this.ctorStartTime();
|
|
||||||
this.isReady = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
async start() {
|
|
||||||
let week = PublicShared.getToWeek(
|
|
||||||
PublicShared.getToWeekMondayZeroTime(G.time - 3600)
|
|
||||||
);
|
|
||||||
|
|
||||||
// 修改clslCrossUser表中的uid为del_uid_week 并且 设置ttltime为当前时间
|
|
||||||
await G.mongodb.collection('clslCrossUser').updateMany(
|
|
||||||
{
|
|
||||||
ttltime: {$exists: false}
|
|
||||||
}, {$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();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 丛林猎手赛季划分
|
|
||||||
* 达到王者段位的所有玩家 按照创号时间从早到晚排序 每100个玩家划分一个区间
|
|
||||||
*/
|
|
||||||
export class SchedulerClslCrossCtor extends Scheduler {
|
export class SchedulerClslCrossCtor extends Scheduler {
|
||||||
id: schedulerType = 'clsl_cross_group';
|
id: schedulerType = 'clsl_cross_ctor';
|
||||||
|
|
||||||
num: number = 2;
|
|
||||||
|
|
||||||
type: 'day' | 'week' = 'week';
|
|
||||||
time = G.gc.clsl_com.divideTime;
|
time = G.gc.clsl_com.divideTime;
|
||||||
name = '丛林猎手赛季区间划分 周四00:00';
|
name = '丛林猎手赛季初始化';
|
||||||
|
type: 'day' | 'week' = 'week';
|
||||||
star = Object.values(G.gc.clsl_dan).slice(-1)[0].allStar;
|
|
||||||
|
|
||||||
async read() {
|
async read() {
|
||||||
await this.ctorStartTime();
|
await this.ctorStartTime();
|
||||||
@ -62,96 +15,30 @@ export class SchedulerClslCrossCtor extends Scheduler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async start() {
|
async start() {
|
||||||
let week = PublicShared.getToWeek();
|
|
||||||
let users = await G.mongodb.collection('clslCrossUser').find({
|
|
||||||
ttltime: {$exists: false}
|
|
||||||
}, {
|
|
||||||
projection: {
|
|
||||||
"uid": 1,
|
|
||||||
"allStar": 1,
|
|
||||||
"info.player.cTime": 1
|
|
||||||
}
|
|
||||||
}).toArray();
|
|
||||||
|
|
||||||
// 筛选出所有王者分段 按照建号时间排序
|
G.mongodb.collection('clslCrossUser').updateMany({}, { $set: { allStar: 0 } });
|
||||||
let wzusers = users.filter(u => u.allStar >= this.star).sort((a, b) => a.info.player.cTime - b.info.player.cTime);
|
Rank.list.clslCross.clear();
|
||||||
|
|
||||||
// 每100个玩家划分一个区间
|
|
||||||
let groups: { [group: string]: { st: number, et: number, users: string[] } } = {};
|
|
||||||
let group_num = wzusers.length / this.num;
|
|
||||||
|
|
||||||
// 非王者玩家
|
|
||||||
let remaining_users = users.filter(u => u.allStar < this.star);
|
|
||||||
if (group_num >= 1) {
|
|
||||||
let tt = parseInt(group_num + '')
|
|
||||||
for (let i = 1; i <= tt; i++) {
|
|
||||||
groups['group' + i] = {
|
|
||||||
et: wzusers[i * this.num - 1].info.player.cTime,
|
|
||||||
st: wzusers[(i - 1) * this.num].info.player.cTime,
|
|
||||||
users: wzusers.slice((i - 1) * this.num, i * this.num).map(u => u.uid),
|
|
||||||
}
|
|
||||||
if (i == 1) {
|
|
||||||
groups['group1'].st = 0
|
|
||||||
}
|
|
||||||
if (i == tt) {
|
|
||||||
groups['group' + i].et = G.time + 7 * 14 * 3600;
|
|
||||||
groups['group' + i].users = wzusers.slice((i - 1) * this.num).map(u => u.uid);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
;
|
|
||||||
} else {
|
|
||||||
groups['group0'] = {
|
|
||||||
st: 0,
|
|
||||||
et: G.time + 7 * 14 * 3600,
|
|
||||||
users: wzusers.map(u => u.uid),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 剩余玩家
|
|
||||||
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});
|
|
||||||
|
|
||||||
// 初始化丛林猎手排行榜
|
|
||||||
G.mongodb.collection('clslCrossUser').find({
|
|
||||||
allStar: {$gte: this.star}, ttltime: {$exists: false}
|
|
||||||
}).toArray().then(users => {
|
|
||||||
users.forEach(u => {
|
|
||||||
new RankClslCross(u.group).addNew({
|
|
||||||
valArr: [u.allStar, u.info.player.power],
|
|
||||||
player: u.info.player,
|
|
||||||
roles: u.info.roles,
|
|
||||||
})
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
await this.record();
|
await this.record();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export class SchedulerClslLocalCtor extends SchedulerClslCrossCtor {
|
||||||
|
id: schedulerType = 'clsl_local_ctor';
|
||||||
|
|
||||||
|
async start() {
|
||||||
|
|
||||||
|
G.mongodb.cPlayerInfo('clsl').updateMany({ type: 'clsl' }, { $set: { allStar: 0 } });
|
||||||
|
|
||||||
|
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();
|
||||||
@ -159,32 +46,41 @@ 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) => {
|
// 段位奖励
|
||||||
G.gc.clsl_com.rankPrize.forEach((conf) => {
|
let locals = await G.mongodb.cPlayerInfo('clsl').find({ type: 'clsl' }).toArray();
|
||||||
let players = uids.slice(conf.rank[0] - 1, conf.rank[1]);
|
G.gc.clsl_com.danPrize.forEach((conf) => {
|
||||||
players.forEach((uid, index) => {
|
let sends = locals.filter(l => l.allStar >= conf.star[0]).map(s => s.uid);
|
||||||
EmailFun.addEmail({
|
// locals.remove(l => sends.includes(l.uid));
|
||||||
uid: uid,
|
|
||||||
type: 'system',
|
sends.forEach(uid => {
|
||||||
title: G.gc.clsl_com.email_rank.title,
|
EmailFun.addEmail({
|
||||||
content: G.gc.clsl_com.email_rank.content,
|
uid: uid,
|
||||||
prize: conf.prize,
|
type: 'system',
|
||||||
contentInsertArr: [conf.rank[0] + index]
|
title: G.gc.clsl_com.email_dan.title,
|
||||||
}, true);
|
content: G.gc.clsl_com.email_dan.content,
|
||||||
|
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();
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -406,15 +406,7 @@ const crossIndexs: Partial<{ [k in keyof MongodbCollections]: IndexDescription[]
|
|||||||
],
|
],
|
||||||
clslCrossUser: [
|
clslCrossUser: [
|
||||||
{
|
{
|
||||||
key: { uid: 1 },
|
key: {uid: 1}, unique: true
|
||||||
},
|
|
||||||
{
|
|
||||||
key: { ttltime: 1 }, expireAfterSeconds: 7 * 24 * 3600
|
|
||||||
}
|
|
||||||
],
|
|
||||||
clslCrossGroup: [
|
|
||||||
{
|
|
||||||
key: { week: 1 },
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
rankList: [
|
rankList: [
|
||||||
|
@ -2,7 +2,7 @@ import { GanHaiRed } from './api_s2c/ganhai/ApiOpen';
|
|||||||
import { FriendManage } from './public/friend/manage';
|
import { FriendManage } from './public/friend/manage';
|
||||||
import { GHManage } from './public/gonghui/manage';
|
import { GHManage } from './public/gonghui/manage';
|
||||||
import { JJCFun } from './public/jjc';
|
import { JJCFun } from './public/jjc';
|
||||||
import { RankClslCross, RankClslCrossInit } from './public/rank/rank_clsl';
|
import { RankClslCross } from './public/rank/rank_clsl';
|
||||||
//import { RankHbzbJfsCross, RankHbzbJfsLocal, RankHbzbZbsCross } from './public/rank/rank_hbzb_jfs';
|
//import { RankHbzbJfsCross, RankHbzbJfsLocal, RankHbzbZbsCross } from './public/rank/rank_hbzb_jfs';
|
||||||
import { RankKbzz } from './public/rank/rank_kbzz';
|
import { RankKbzz } from './public/rank/rank_kbzz';
|
||||||
import { RankPower } from './public/rank/rank_power';
|
import { RankPower } from './public/rank/rank_power';
|
||||||
@ -104,19 +104,18 @@ export async function startAfter() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
} else if (G.argv.serverType == 'cross') {
|
} else if (G.argv.serverType == 'cross') {
|
||||||
|
|
||||||
RankKbzz.init();
|
RankKbzz.init();
|
||||||
RankClslCrossInit();
|
new RankClslCross();
|
||||||
|
// new RankHbzbJfsCross().loadAllPlayer();
|
||||||
|
// new RankHbzbZbsCross();
|
||||||
new RankWzryCross();
|
new RankWzryCross();
|
||||||
|
|
||||||
new SchedulerKbzzGroup().init();
|
new SchedulerKbzzGroup().init();
|
||||||
|
|
||||||
new SchedulerClslPrize().init();
|
|
||||||
new SchedulerClslCrossCtor().init();
|
|
||||||
new SchedulerClslLocalCtor ().init();
|
|
||||||
|
|
||||||
new Scheduler_hbzb_zbs_cross_clear().init();
|
new Scheduler_hbzb_zbs_cross_clear().init();
|
||||||
|
//new Scheduler_hbzb_corss_reset();
|
||||||
new Scheduler_hbzb_zbs_cross_group().init();
|
new Scheduler_hbzb_zbs_cross_group().init();
|
||||||
|
new SchedulerClslCrossCtor().init();
|
||||||
new SchedulerWzryDlDstart().init();
|
new SchedulerWzryDlDstart().init();
|
||||||
new SchedulerWzryDlDjinji().init();
|
new SchedulerWzryDlDjinji().init();
|
||||||
new SchedulerWzryZuanshiOne().init();
|
new SchedulerWzryZuanshiOne().init();
|
||||||
|
@ -17,10 +17,4 @@ export type ResOpen = {
|
|||||||
fightWinNum: number;
|
fightWinNum: number;
|
||||||
/**已领取的胜场奖励 */
|
/**已领取的胜场奖励 */
|
||||||
recWinPrize: number[];
|
recWinPrize: number[];
|
||||||
/**本期最高段位*/
|
|
||||||
curMaxStar: number;
|
|
||||||
/**段位奖励发放记录*/
|
|
||||||
danPrize: number[];
|
|
||||||
|
|
||||||
week?:number; // 返回给客户端用
|
|
||||||
};
|
};
|
@ -13,8 +13,9 @@ 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' | "clslCross"
|
| 'slzd1' | 'slzd2' | 'slzd3' | 'slzd4' | 'slzd5' | 'slzd6'
|
||||||
| 'kbzz' | 'xszm' | 'zccg' | 'gbzl' | 'tujian' | 'wzryCross';
|
| 'kbzz' | 'xszm' | 'clslCross'
|
||||||
|
| 'zccg' | 'gbzl' | 'tujian' | 'wzryCross';
|
||||||
|
|
||||||
export type rankTypeObj = {
|
export type rankTypeObj = {
|
||||||
type?: rankType[],
|
type?: rankType[],
|
||||||
|
@ -7253,31 +7253,6 @@ 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"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": 7,
|
|
||||||
"name": "week",
|
|
||||||
"type": {
|
|
||||||
"type": "Number"
|
|
||||||
},
|
|
||||||
"optional": true
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -20105,21 +20080,21 @@ export const serviceProto: ServiceProto<ServiceType> = {
|
|||||||
"id": 13,
|
"id": 13,
|
||||||
"type": {
|
"type": {
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"literal": "clslCross"
|
"literal": "kbzz"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 14,
|
"id": 14,
|
||||||
"type": {
|
"type": {
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"literal": "kbzz"
|
"literal": "xszm"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 15,
|
"id": 15,
|
||||||
"type": {
|
"type": {
|
||||||
"type": "Literal",
|
"type": "Literal",
|
||||||
"literal": "xszm"
|
"literal": "clslCross"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user