Compare commits

...

58 Commits

Author SHA1 Message Date
dy
12e21ce0f1 cehua json 2024-01-04 14:25:12 +08:00
dy
0cde599ddd Merge branch 'master' into feature/json
# Conflicts:
#	src/json/clsl_com.json5
2024-01-04 14:24:42 +08:00
dy
eb73af1dd2 数据监测改为查半小时内在线用户 2024-01-03 22:40:24 +08:00
dy
1dd7bc2175 api pay 2024-01-03 22:10:35 +08:00
dy
ecc17a22a9 api 锁修改,一键接取悬赏 2024-01-03 21:57:12 +08:00
dy
826840455c api 锁修改 2024-01-03 20:19:58 +08:00
dy
60d0e04e33 fix 探险 gamelog 2024-01-03 19:36:28 +08:00
dy
6233a6672e Merge remote-tracking branch 'origin/bugfix' into bugfix 2024-01-03 19:28:34 +08:00
dy
afd856af30 fix 探险 2024-01-03 19:28:22 +08:00
xichaoyin
698c7bd3f6 fix:
修复讨伐海盗挑战boss胜利不扣除战斗次数bug
2024-01-03 18:42:36 +08:00
dy
7dd83e06ef watchdog.json 2024-01-03 17:35:08 +08:00
xichaoyin
20f0f41c22 fix:
王者荣耀发奖定时器容错修改
2024-01-03 15:47:02 +08:00
dy
6cc58ffd94 还原 2024-01-03 15:22:36 +08:00
dy
8d9ecf30b6 Merge remote-tracking branch 'origin/bugfix' into bugfix
# Conflicts:
#	src/api_s2c/event/leijichongzhi/ApiRec.ts
2024-01-03 14:46:30 +08:00
dy
ec85961633 累计充值轮次加校验 2024-01-03 14:45:51 +08:00
d490550abf 容错 2024-01-03 14:44:50 +08:00
38dca3a653 Merge branch 'bugfix' of http://git.legu.cc/qixin/HJ_Server into bugfix 2024-01-03 14:32:40 +08:00
7e589e23b3 容错 2024-01-03 14:31:47 +08:00
dy
22b577036f watchdog 2024-01-03 14:29:22 +08:00
6e9d65241e Merge branch 'bugfix' of http://git.legu.cc/qixin/HJ_Server into bugfix 2024-01-03 14:00:29 +08:00
43aeef2501 容错 2024-01-03 13:44:51 +08:00
dy
1a9f942297 还原 2024-01-03 11:38:06 +08:00
dy
8f0c24bc87 Merge branch 'feature/warning' into bugfix 2024-01-03 11:09:56 +08:00
dy
1fcedaff59 还原 2024-01-03 11:09:39 +08:00
dy
a1c7f2e4d0 监控init 2024-01-03 11:01:12 +08:00
78c306ce5e 数据监控 2024-01-03 10:58:09 +08:00
ad15cf73bf Merge branch 'bugfix' of http://git.legu.cc/qixin/HJ_Server into bugfix 2024-01-03 10:36:35 +08:00
3c380f1e55 数据监控 2024-01-03 10:36:17 +08:00
dy
953303d9a4 Merge branch 'master' into feature/warning 2024-01-03 10:18:20 +08:00
dy
c839d844ec Merge branch 'bugfix' into release 2024-01-02 20:42:33 +08:00
dy
ee99de169d Revert "fix 悬赏任务上限限制"
This reverts commit bfe48a54f4.
2024-01-02 20:42:23 +08:00
dy
4f5a1492a6 Merge remote-tracking branch 'origin/bugfix' into bugfix 2024-01-02 20:30:20 +08:00
dy
bfe48a54f4 fix 悬赏任务上限限制 2024-01-02 20:30:11 +08:00
5750b83dc6 Merge branch 'bugfix' of http://git.legu.cc/qixin/HJ_Server into bugfix 2024-01-02 20:26:16 +08:00
5a7d2b2d55 错误log 2024-01-02 20:26:04 +08:00
dy
ef60b3ba26 Merge branch 'bugfix' into release 2024-01-02 20:15:54 +08:00
dy
1006826bfe fix 悬赏任务上限限制 2024-01-02 20:15:34 +08:00
dy
049f1599bf Merge branch 'bugfix' into release 2024-01-02 20:09:32 +08:00
dy
46401b90ee fix 悬赏任务上限限制 2024-01-02 19:55:36 +08:00
ea1be8cff2 残余redis代码 2024-01-02 18:17:43 +08:00
4b30eaab04 Merge branch 'bugfix' of http://git.legu.cc/qixin/HJ_Server into bugfix 2024-01-02 17:38:18 +08:00
2425ca07d0 删除残余redis代码 2024-01-02 17:38:07 +08:00
dy
d2ddc62752 fix round 2024-01-02 15:49:24 +08:00
dy
3899b9157c Merge branch 'bugfix' into release 2024-01-02 11:11:03 +08:00
dy
76c96b7abb 暂时屏蔽矿洞延时 2024-01-02 11:10:27 +08:00
dy
2c625416a8 proto 2024-01-02 09:53:42 +08:00
dy
c927d3b7bc Merge branch 'fix/conglinshoulie' into release
# Conflicts:
#	src/public/rank/rank.ts
2024-01-02 09:53:11 +08:00
fc7c7ceaad Merge branch 'bugfix' of http://git.legu.cc/qixin/HJ_Server into bugfix 2024-01-02 09:45:51 +08:00
51a31e4b91 容错 2024-01-02 09:45:38 +08:00
xichaoyin
b45eec43f9 fix:
丛林猎手优化
2023-12-31 21:35:11 +08:00
xichaoyin
c8f9d0c7d7 fix:
修复定时器数据
2024-01-04 20:07:42 +08:00
xichaoyin
a82e9c560e fix:
从林狩猎open添加week
2024-01-03 10:04:27 +08:00
xichaoyin
2b5be18ea5 fix:
丛林猎手优化
2024-01-03 09:42:13 +08:00
xcy
381aeb1792 fix:
丛林猎手优化
2024-01-01 09:04:08 +08:00
dy
b466826d94 修复第一次打开没有round报错 2023-12-31 18:56:42 +08:00
xcy
0e93358e74 fix:
丛林猎手优化
2023-12-28 00:02:12 +08:00
xcy
e00e9c4dfc fix:
丛林狩猎优化
2023-12-27 16:42:46 +08:00
xcy
686f1fafc6 fix:
丛林猎手优化
2023-12-31 14:18:57 +08:00
69 changed files with 12998 additions and 3008 deletions

5
.vscode/extensions.json vendored Normal file
View File

@ -0,0 +1,5 @@
{
"recommendations": [
"ms-ceintl.vscode-language-pack-zh-hans"
]
}

4
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,4 @@
{
"editor.suggest.snippetsPreventQuickSuggestions": false,
"aiXcoder.showTrayIcon": true
}

View File

@ -1,16 +1,49 @@
import { ApiCall } from "tsrpc";
import { ReqFindEnemy, ResFindEnemy } from "../../cross/protocols/clsl/PtlFindEnemy";
import { formatNpcData } from '../../shared/fightControl/fightFun';
import { PublicShared } from "../../shared/public/public";
export default async function (call: ApiCall<ReqFindEnemy, ResFindEnemy>) {
let my = await G.mongodb.collection('clslCrossUser').findOne({ uid: call.req.uid });
let starConf = getStarConf(my.allStar);
let others = await G.mongodb.collection('clslCrossUser').find({ uid: { $nin: [call.req.uid] } }).toArray();
let enemy = others.random();
let p = PublicShared.randomNum(1, 1000);
let starConf = getStarConf(call.req.myStasr);
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({
allStar: enemy?.allStar || my.allStar,
info: enemy?.info || formatNpcData(starConf.npc)
allStar: enemy.allStar,
info: enemy.info || formatNpcData(starConf.npc)
});
}

View File

@ -4,7 +4,7 @@ import { FightFun } from '../../public/fight';
export default async function (call: ApiCall<ReqLog, ResLog>) {
if (call.req.result) {
// FightFun.saveLog(call.req.uid, 'clsl', call.req.result);
FightFun.saveLog(call.req.uid, 'clsl', call.req.result);
call.succ({});
} else {
call.succ({

View File

@ -1,10 +1,37 @@
import { ApiCall } from "tsrpc";
import { ReqRank, ResRank } from "../../cross/protocols/clsl/PtlRank";
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>) {
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 offset = call.req.offset || -1 // 预防未查询到的调用,按原逻辑查询全部,避免引起未知问题
let {min, max} = Rank.pageToMin(page, offset)
call.succ(await Rank.list.clslCross.getRankList(call.req.gud.uid, { min, max }));
let { min, max } = Rank.pageToMin(page, offset)
call.succ(await rank.getRankList(call.req.uid, { min, max }));
}

View File

@ -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});
}

View File

@ -1,23 +1,49 @@
import { ApiCall } from "tsrpc";
import { ReqUpLoad, ResUpLoad } from "../../cross/protocols/clsl/PtlUpLoad";
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>) {
let { allStar, uid, ...ops } = call.req;
let a = await G.mongodb.collection('clslCrossUser').findOneAndUpdate(
let a = (await G.mongodb.collection('clslCrossUser').findOneAndUpdate(
{ uid: uid },
{
$inc: { allStar: allStar || 0 },
$set: ops
},
{ upsert: true }
);
{ upsert: true, returnDocument: "after" }
)).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 (allStar != undefined && ops.info) {
Rank.list.clslCross.addNew({
player: a.value.info.player,
valArr: [(await G.mongodb.collection('clslCrossUser').findOne({ uid: uid })).allStar]
});
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]
});
}
}
}

View File

@ -32,7 +32,7 @@ export default async function (call: ApiCall<Reqdetails, Resdetails>) {
let _tmp = {
ranking: index,
participantId: elementUser.uid,
value: await (await PayFun.getPayDaysAllPayNum(elementUser.uid, element.stime, element.rtime)).toString()
value: await (await PayFun.getPayDaysAllPayNum(elementUser.uid, element.stime, element.etime)).toString()
}
accountingData.push(_tmp)
}

View File

@ -1,43 +1,91 @@
import {ApiCall} from "tsrpc";
import {FightFun} from '../../public/fight';
import {PlayerFun} from '../../public/player';
import {ReqFind, ResFind} from "../../shared/protocols/conglinshoulie/PtlFind";
import {PublicShared} from '../../shared/public/public';
import {addStar, clslDb} from './ApiOpen';
import { ApiCall } from "tsrpc";
import { FightFun } from '../../public/fight';
import { PlayerFun } from '../../public/player';
import { ReqFind, ResFind } from "../../shared/protocols/conglinshoulie/PtlFind";
import { PublicShared } from '../../shared/public/public';
import { addStar, clslDb } from './ApiOpen';
import { EmailFun } from "../../public/email";
export default async function (call: ApiCall<ReqFind, ResFind>) {
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 useNum = db?.useFightNum || 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);
let my = await call.conn.getDefaultFightData();
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);
// 战斗次数不足
if (useNum >= buyNum + G.gc.clsl_com.fightNum) {
return call.errorCode(-2);
}
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,
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);
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({
enemy: other,
result: result
});
call.succ({ enemy: other, result: result });
}

View File

@ -9,8 +9,8 @@ export default async function (call: ApiCall<ReqOpen, ResOpen>) {
let db = await clslDb().findOne({ uid: call.uid, type: 'clsl' });
let { _id, uid, type, ...ops } = db || {} as WithId<OptionalId<CollectionPlayerInfo<"clsl">>>;
// 刷新 挑战次数、购买挑战次数、胜利次数任务
if (!db || ops?.refreshTime < PublicShared.getToDayZeroTime()) {
let change: Partial<typeof ops> = {
refreshTime: G.time,
useFightNum: 0,
@ -19,6 +19,13 @@ export default async function (call: ApiCall<ReqOpen, ResOpen>) {
buyFightNum: 0
};
// 隔周刷新星级
if (ops?.refreshTime < PublicShared.getToWeekMondayZeroTime()) {
change.allStar = 0;
change.danPrize = [];
change.curMaxStar = 0;
}
Object.assign(ops, change);
clslDb().updateOne({ uid: call.uid, type: 'clsl' }, { $set: change }, { upsert: true });
@ -29,7 +36,10 @@ export default async function (call: ApiCall<ReqOpen, ResOpen>) {
}
call.succ({
week: PublicShared.getWeek(G.time) || 7,
allStar: ops?.allStar || 0,
danPrize: ops?.danPrize || [],
curMaxStar: ops?.curMaxStar || 0,
buyFightNum: ops?.buyFightNum || 0,
useFightNum: ops?.useFightNum || 0,
fightWinNum: ops?.fightWinNum || 0,
@ -41,7 +51,15 @@ export function clslDb() {
return G.mongodb.cPlayerInfo('clsl');
}
export async function addStar(call: ApiCall, star: number, info?: joinFightData) {
clslDb().updateOne({ uid: call.uid, type: 'clsl' }, { $inc: { allStar: star } }, { upsert: true });
export async function addStar(call: ApiCall, star: number, info?: joinFightData, update?: any) {
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() });
}

View File

@ -19,20 +19,20 @@ export default async function (call: ApiCall<ReqOpen, ResOpen>) {
if (!db) {
await G.mongodb.cEvent(_dbType).updateOne(
{uid: call.uid, type: _dbType},
{$set: {sTime: sTime, recIndex: []}},
{$set: {sTime: sTime, recIndex: [], round: 0}},
{upsert: true}
);
}
db = await checkNextRound(call, db, _hdinfo.data.tasks)
db = await checkNextRound(call, db, _hdinfo)
let payNum = (await PayFun.getPayDaysAllPayNum(call.uid, _hdinfo.stime, _hdinfo.rtime)) * 10
payNum = payNum - (db.round || 0) * R.sort((a, b) => b.total - a.total)(_hdinfo.data.tasks)[0].total
payNum = payNum - (db?.round || 0) * R.sort((a, b) => b.total - a.total)(_hdinfo.data.tasks)[0].total
call.succ({
sTime: sTime,
recIndex: db?.recIndex || [],
payNum: payNum,
hdinfo: _hdinfo,
round: db.round || 0
round: db?.round || 0
});
}

View File

@ -20,7 +20,7 @@ export default async function (call: ApiCall<ReqRec, ResRec>) {
let db = await G.mongodb.cEvent(_dbType).findOne({uid: call.uid, type: _dbType});
if (db.recIndex.includes(call.req.index)) return call.error('', {code: -2});
let payNum = (await PayFun.getPayDaysAllPayNum(call.uid, _hdinfo.stime, _hdinfo.rtime)) * 10;
let payNum = (await PayFun.getPayDaysAllPayNum(call.uid, _hdinfo.stime, _hdinfo.etime)) * 10;
payNum = payNum - (db.round || 0) * R.sort((a, b) => b.total - a.total)(_hdinfo.data.tasks)[0].total
if (payNum < conf.total) return call.error('', {code: -3});
@ -31,7 +31,7 @@ export default async function (call: ApiCall<ReqRec, ResRec>) {
{$push: {recIndex: call.req.index}}
);
await checkNextRound(call, db, _hdinfo.data.tasks)
await checkNextRound(call, db, _hdinfo)
HongDianChange.sendChangeKey(call.uid, ['huodonghd'])
call.succ({
@ -39,9 +39,13 @@ export default async function (call: ApiCall<ReqRec, ResRec>) {
});
}
export async function checkNextRound(call: ApiCall, event, tasks) {
export async function checkNextRound(call: ApiCall, event, _hdinfo) {
if ((event?.recIndex?.length || 0) < _hdinfo.data.tasks.length) return event
let payNum = (await PayFun.getPayDaysAllPayNum(call.uid, _hdinfo.stime, _hdinfo.etime)) * 10
payNum = payNum - (event?.round || 0) * R.sort((a, b) => b.total - a.total)(_hdinfo.data.tasks)[0].total
if (payNum < 0) return event
let _dbType: `leijichongzhi${number}` = `leijichongzhi${call.req.hdid}`
if ((event?.recIndex?.length || 0) < tasks.length) return event
return (await G.mongodb.cEvent(_dbType).findOneAndUpdate(
{uid: call.uid, type: _dbType},
{$set: {recIndex: []}, $inc: {round: 1}}, {returnDocument: 'after'}

View File

@ -656,7 +656,7 @@ export class HuoDongHongDianFun {
let _con = hdCon.data.tasks;
let db = await G.mongodb.cEvent(_dbType).findOne({uid: call.uid, type: _dbType});
let _mydata = db || {sTime: PublicShared.getToDayZeroTime(G.time), recIndex: []};
let payNum = await PayFun.getPayDaysAllPayNum(call.uid, hdCon.stime, hdCon.rtime);
let payNum = await PayFun.getPayDaysAllPayNum(call.uid, hdCon.stime, hdCon.etime);
for (let index = 0; index < _con.length; index++) {
const element = _con[index];
if (_mydata.recIndex.includes(index)) continue;

View File

@ -4,6 +4,9 @@ import {PlayerFun} from "../../public/player";
import {ReqYanShi, ResYanShi} from "../../shared/protocols/kuangdong/PtlYanShi";
export default async function (call: ApiCall<ReqYanShi, ResYanShi>) {
return call.errorCode(1)
let hdid = call.req.hdid
let con = await KuangDongfun.getCon(hdid)

View File

@ -37,7 +37,7 @@ export default async function (call: ApiCall<ReqPkBoss, ResPkBoss>) {
let _bossMaxHp = _bossData.maxhp
let _bossDelHp = _bossData.delhp
/**格式化boss属性 */
let hpjc = Number(((_bossMaxHp - _bossDelHp) / _bossMaxHp).toFixed(2)) || 0.01 // 继承血量比
let hpjc = Number(((_bossMaxHp - _bossDelHp) / _bossMaxHp).toFixed(2)) || 0.01 // 继承血量比
let _bossFightId = _con.army // boss 战斗id
let _npcFightData = await LingZhuLaiXifun.getBossFightInof(_bossFightId, Number(hpjc))
// let _npcFightData = await LingZhuLaiXifun.getBossFightInof(25, Number(hpjc)) // 测试数据
@ -63,7 +63,6 @@ export default async function (call: ApiCall<ReqPkBoss, ResPkBoss>) {
{ type: 'lingzhulaixi' },
{ $set: G.mongodb.createTreeObj({ key: `maxdps.${call.req.bid}`, val: 0 }) }
)
} else {
// 超过回合,直接赋值输
result.winSide = 1
@ -93,11 +92,13 @@ export default async function (call: ApiCall<ReqPkBoss, ResPkBoss>) {
_mySetDat = {
maxdps: _myData.maxdps,
time: _myData.time,
num: _myData.num + 1
}
_bossData.delhp += result.totalDamage[0]
}
// 无论挑战成功失败都扣除战斗次数
_mySetDat["num"] = _myData.num + 1;
// 设置boss数据
await LingZhuLaiXifun.setBossData(_bossData.bid, _setData)
await LingZhuLaiXifun.setMyData(call, { $set: _mySetDat })

View File

@ -4,6 +4,7 @@ import { PlayerFun } from "../../public/player";
import { ReqSaoDang, ResSaoDang } from "../../shared/protocols/lingzhulaixi/PtlSaoDang";
import { PublicShared } from "../../shared/public/public";
import { HongDianChange } from "../hongdian/fun";
import {ActionLog} from "../../public/actionLog/actionLog";
export default async function (call: ApiCall<ReqSaoDang, ResSaoDang>) {
let _con = await LingZhuLaiXifun.getCon(call.req.bid)
@ -91,6 +92,8 @@ export default async function (call: ApiCall<ReqSaoDang, ResSaoDang>) {
prize = PublicShared.mergePrize(prize)
await PlayerFun.sendPrize(call, prize)
ActionLog.addDayLog(call.uid, { key: "lingzhulaixi/PkBoss", val: _num });
// 扣除挑战次数
_myData.num += _num

View File

@ -6,7 +6,8 @@ import { getToper50RankInfo } from "../hbzb/jfs/fun";
import { getZbsRankList } from "../hbzb/zbs/fun";
export default async function (call: ApiCall<ReqOpen, ResOpen>) {
let obj = await rankOpenfun(call, call.req)
console.log("==============>", call.req)
let obj = await rankOpenfun(call, call.req);
call.succ(obj);
}
@ -24,7 +25,7 @@ export default async function (call: ApiCall<ReqOpen, ResOpen>) {
export async function rankOpenfun(call, req: ReqOpen): Promise<ResOpen> {
let obj: ResOpen = {};
// 数组,兼容旧的参数
if(req instanceof Array) {
if (req instanceof Array) {
var types = req
var page = 0
var offset = 1
@ -39,7 +40,7 @@ export async function rankOpenfun(call, req: ReqOpen): Promise<ResOpen> {
const { min, max } = Rank.pageToMin(page, offset)
for (let type of types) {
switch (type) {
case 'jjc':
case 'jjc':
// 获取前50名ranklist数据
let rankList = await JJCFun.getRankList(min, max);
// 获取自己的排名
@ -68,21 +69,23 @@ export async function rankOpenfun(call, req: ReqOpen): Promise<ResOpen> {
case 'slzd4':
case 'slzd5':
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;
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) {
return call.error('', { code: -2, message: globalThis.lng.rank_kbzz });
}
obj[type] = resCall.res;
break;
case 'clslCross':
//let resCallClsl = await G.clientCross.callApi('clsl/Rank', { gud: call.conn.gud, page, offset});
//obj[type] = resCallClsl.res;
let res = await G.clientCross.callApi('clsl/Rank', {
uid: call.uid, page: page, offset: offset
});
obj[type] = res.res;
break;
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;
break;
case "hbzbLocal":
@ -93,7 +96,7 @@ export async function rankOpenfun(call, req: ReqOpen): Promise<ResOpen> {
obj[type] = await getZbsRankList(call.uid) as any;
break;
default:
obj[type] = await Rank.list[type].getRankList(call.uid, {min, max});
obj[type] = await Rank.list[type].getRankList(call.uid, { min, max });
break;
}
}

View File

@ -1,12 +1,12 @@
import { ApiCall } from "tsrpc";
import { PlayerFun } from '../../public/player';
import { TanXianFun } from '../../public/tanxian';
import { TeQuanFun } from "../../public/tequan";
import { ReqFastGuaJi, ResFastGuaJi } from "../../shared/protocols/tanxian/PtlFastGuaJi";
import { TanXianShared } from '../../shared/public/tanxian';
import { event_dldh_addPrize } from '../event/diaoluoduihuan/ApiOpen';
import { HongDianChange } from "../hongdian/fun";
import { getEventPrize } from './ApiEvent';
import {ApiCall} from "tsrpc";
import {PlayerFun} from '../../public/player';
import {TanXianFun} from '../../public/tanxian';
import {TeQuanFun} from "../../public/tequan";
import {ReqFastGuaJi, ResFastGuaJi} from "../../shared/protocols/tanxian/PtlFastGuaJi";
import {TanXianShared} from '../../shared/public/tanxian';
import {event_dldh_addPrize} from '../event/diaoluoduihuan/ApiOpen';
import {HongDianChange} from "../hongdian/fun";
import {getEventPrize} from './ApiEvent';
export default async function (call: ApiCall<ReqFastGuaJi, ResFastGuaJi>) {
@ -18,10 +18,14 @@ export default async function (call: ApiCall<ReqFastGuaJi, ResFastGuaJi>) {
let freeNum = G.gc.tanxian_com.fastGuaJiFreeNum + tqFree
// let notFree = data.useFastGuaJiNum >= freeNum && ((data?.zztqfreeNum || 0) >= tqFree && tqFree) && (data?.useFreeGuaJiNum || 0) <= freeNum
let notFree = (data?.useFreeGuaJiNum || 0) >= freeNum
let notFree = (data?.useFreeGuaJiNum || 0) >= freeNum
if (notFree) {
let num = G.gc.tanxian_com.fastGuaJiNeed[data.useFastGuaJiNum - freeNum ] || 0;
let need = [{ a: 'attr', t: 'rmbmoney', n: num ? num : G.gc.tanxian_com.fastGuaJiNeed[G.gc.tanxian_com.fastGuaJiNeed.length - 1] }];
let num = G.gc.tanxian_com.fastGuaJiNeed[data.useFastGuaJiNum - freeNum] || 0;
let need = [{
a: 'attr',
t: 'rmbmoney',
n: num ? num : G.gc.tanxian_com.fastGuaJiNeed[G.gc.tanxian_com.fastGuaJiNeed.length - 1]
}];
await PlayerFun.checkNeedIsMeet(call, need);
await PlayerFun.cutNeed(call, need);
}
@ -32,15 +36,15 @@ export default async function (call: ApiCall<ReqFastGuaJi, ResFastGuaJi>) {
let eventPrize = getEventPrize(call.conn.gud.lv, G.gc.tanxian_com.fastGuaJiTime, call.conn.gud.mapId, call.conn.gud.wxcLv?.lv);
let _p = [].concat(prize.prize, prize.dlz, eventPrize.prize);
// 过滤物品数量为0的道具。
_p = _p.filter(x => x.n > 0)
_p = _p.filter(x => x.n > 0)
// await event_dldh_addPrize(_p, call, G.gc.tanxian_com.fastGuaJiTime);
await PlayerFun.sendPrize(call, _p);
let setData = { useFastGuaJiNum: data.useFastGuaJiNum + 1, useFreeGuaJiNum: (data?.useFreeGuaJiNum || 0) + (notFree ? 0 : 1)}
if ((data?.zztqfreeNum || 0) < tqFree && tqFree) setData["zztqfreeNum"] = tqFree
TanXianFun.changeData(call, setData);
// (await call.conn.gonghui)?.addExp(20, call.uid);
// let setData = { useFastGuaJiNum: data.useFastGuaJiNum + 1, useFreeGuaJiNum: (data?.useFreeGuaJiNum || 0) + (notFree ? 0 : 1)}
let setData = {$inc: {useFastGuaJiNum: 1, useFreeGuaJiNum: (notFree ? 0 : 1)}}
// if ((data?.zztqfreeNum || 0) < tqFree && tqFree) setData["zztqfreeNum"] = tqFree
if ((data?.zztqfreeNum || 0) < tqFree && tqFree) setData["$set"] = {zztqfreeNum: tqFree}
await TanXianFun.changeDataNew(call, setData);
HongDianChange.sendChangeKey(call.uid, ['taskhd', 'huodonghd']);

View File

@ -1,9 +1,10 @@
import { ApiCall } from "tsrpc";
import { HeroFun } from '../../public/hero';
import { XstaskFun } from '../../public/xstask';
import { ReqOnekeyReceive, ResOnekeyReceive } from "../../shared/protocols/xstask/PtlOnekeyReceive";
import { HeroShared } from '../../shared/public/hero';
import { HongDianChange } from "../hongdian/fun";
import {ApiCall} from "tsrpc";
import { addGameLog } from "../../gameLog";
import {HeroFun} from '../../public/hero';
import {XstaskFun} from '../../public/xstask';
import {ReqOnekeyReceive, ResOnekeyReceive} from "../../shared/protocols/xstask/PtlOnekeyReceive";
import {HeroShared} from '../../shared/public/hero';
import {HongDianChange} from "../hongdian/fun";
export default async function (call: ApiCall<ReqOnekeyReceive, ResOnekeyReceive>) {
@ -13,6 +14,9 @@ export default async function (call: ApiCall<ReqOnekeyReceive, ResOnekeyReceive>
if (args.length < 1 || _ids.isDuplication() || heroIds.isDuplication()) return call.error(globalThis.lng.kbzz_1);
let event = await G.mongodb.cEvent('xstask').findOne({uid: call.uid, type: 'xstask'});
if (event?.receiveNum >= 8) return call.error(globalThis.lng.xstask_11);
//所有的任务
let taskList = await XstaskFun.getAllTask(call.uid);
//所有的任务id
@ -30,7 +34,9 @@ export default async function (call: ApiCall<ReqOnekeyReceive, ResOnekeyReceive>
if (heroList.length != heroIds.length) return call.error(globalThis.lng.xstask_6);
let change: ResOnekeyReceive = {};
let lockNum = event?.receiveNum || 0
for (let receive of args) {
if (lockNum >= 8) continue
let task = taskList.find(task => task._id == receive._id);
let taskConf = G.gc.xstask[task.taskId];
@ -40,7 +46,9 @@ export default async function (call: ApiCall<ReqOnekeyReceive, ResOnekeyReceive>
let star = heros.map(h => G.gc.hero[h.heroId].star).reduce((a, b) => a + b);
if (star < taskConf.needStar) return call.error(globalThis.lng.xstask_8);
change[receive._id] = { time: G.time, heros: receive.heroIds };
change[receive._id] = {time: G.time, heros: receive.heroIds};
XstaskFun.receiveNum(call.uid)
lockNum += 1
}
Object.entries(change).forEach(([k, v]) => {
@ -49,4 +57,6 @@ export default async function (call: ApiCall<ReqOnekeyReceive, ResOnekeyReceive>
HongDianChange.sendChangeKey(call.uid, ['xstaskhd', 'huodonghd']);
call.succ(change);
addGameLog(call.uid, "_onekeyReceive", {}, change)
}

View File

@ -1,9 +1,9 @@
import { ApiCall } from "tsrpc";
import { playerInfoType } from '../../module/collection_palyerInfo';
import { TeQuanFun } from '../../public/tequan';
import { XstaskFun } from '../../public/xstask';
import { ReqOpen, ResOpen } from "../../shared/protocols/xstask/PtlOpen";
import { PublicShared } from '../../shared/public/public';
import {ApiCall} from "tsrpc";
import {playerInfoType} from '../../module/collection_palyerInfo';
import {TeQuanFun} from '../../public/tequan';
import {XstaskFun} from '../../public/xstask';
import {ReqOpen, ResOpen} from "../../shared/protocols/xstask/PtlOpen";
import {PublicShared} from '../../shared/public/public';
export default async function (call: ApiCall<ReqOpen, ResOpen>) {
let needAddTask: number;
@ -19,7 +19,7 @@ export default async function (call: ApiCall<ReqOpen, ResOpen>) {
useFreeRefreshNum: 0
};
needAddTask = G.gc.xstaskcom.lv[changeInfo.lv].maxTaskNum;
XstaskFun.changeInfo(call.uid, { $set: { ...changeInfo } });
XstaskFun.changeInfo(call.uid, {$set: {...changeInfo}});
} else if (PublicShared.getToDayZeroTime() > taskInfo.lastRefreshTime) {
changeInfo = {
lastRefreshTime: G.time,
@ -32,14 +32,15 @@ export default async function (call: ApiCall<ReqOpen, ResOpen>) {
needAddTask = G.gc.xstaskcom.lv[taskInfo.lv].maxTaskNum - retainTask.length;
XstaskFun.changeInfo(call.uid, { $set: { ...changeInfo } });
XstaskFun.changeInfo(call.uid, {$set: {...changeInfo}});
XstaskFun.delTasks(call.uid, delTask.map(task => task._id));
XstaskFun.receiveNum(call.uid, true)
}
// needAddTask += await TeQuanFun.getXsTaskNum(call);
needAddTask && await XstaskFun.addTasks(call.uid, XstaskFun.randomTasks(taskInfo?.lv || changeInfo.lv, needAddTask));
let { _id, uid, type, ...info } = taskInfo || changeInfo as typeof taskInfo;
let {_id, uid, type, ...info} = taskInfo || changeInfo as typeof taskInfo;
call.succ({
...info,
taskList: await XstaskFun.getAllTask(call.uid),

View File

@ -1,13 +1,16 @@
import { ApiCall } from "tsrpc";
import { HeroFun } from '../../public/hero';
import { XstaskFun } from '../../public/xstask';
import { ReqReceive, ResReceive } from "../../shared/protocols/xstask/PtlReceive";
import { HongDianChange } from "../hongdian/fun";
import {ApiCall} from "tsrpc";
import {HeroFun} from '../../public/hero';
import {XstaskFun} from '../../public/xstask';
import {ReqReceive, ResReceive} from "../../shared/protocols/xstask/PtlReceive";
import {HongDianChange} from "../hongdian/fun";
export default async function (call: ApiCall<ReqReceive, ResReceive>) {
if (call.req.heroIds.length < 1) return call.error(globalThis.lng.xstask_9);
if (call.req.heroIds.isDuplication()) return call.error(globalThis.lng.xstask_10);
let event = await G.mongodb.cEvent('xstask').findOne({uid: call.uid, type: 'xstask'});
if (event?.receiveNum >= 8) return call.error(globalThis.lng.xstask_11);
let task = await XstaskFun.getTask(call.uid, call.req._id);
let taskConf = G.gc.xstask[task?.taskId];
if (!task) return call.error(globalThis.lng.xstask_1);
@ -28,6 +31,7 @@ export default async function (call: ApiCall<ReqReceive, ResReceive>) {
heros: call.req.heroIds
};
XstaskFun.receiveNum(call.uid)
XstaskFun.receiveTask(call.uid, call.req._id, change);
HongDianChange.sendChangeKey(call.uid, ['xstaskhd', 'huodonghd']);

View File

@ -12,6 +12,9 @@ export default async function (call: ApiCall<ReqRefresh, ResRefresh>) {
if (delNum < 1) return call.error(globalThis.lng.xstask_11);
let event = await G.mongodb.cEvent('xstask').findOne({uid: call.uid, type: 'xstask'});
if (event?.receiveNum >= 8) return call.error(globalThis.lng.xstask_11);
let change: ResRefresh = {};
let needDel = taskList.filter(task => task.receiveData == undefined || task.receiveData.rec == true);

View File

@ -3,6 +3,7 @@ import { joinFightData } from '../../../shared/fightControl/fightType';
export type ReqFindEnemy = {
uid: string;
myStasr:number;
};
export type ResFindEnemy = {

View File

@ -3,7 +3,7 @@ import { player } from '../../../shared/protocols/user/type';
export type ReqRank = {
gud: player;
uid: string;
page?: number;
offset?: number;
};

View File

@ -1,9 +0,0 @@
export type ReqRankUids = {
};
export type ResRankUids = {
uids: string[];
};

View File

@ -2,7 +2,6 @@ import { ServiceProto } from 'tsrpc-proto';
import { ReqFindEnemy, ResFindEnemy } from './clsl/PtlFindEnemy';
import { ReqLog, ResLog } from './clsl/PtlLog';
import { ReqRank, ResRank } from './clsl/PtlRank';
import { ReqRankUids, ResRankUids } from './clsl/PtlRankUids';
import { ReqUpLoad, ResUpLoad } from './clsl/PtlUpLoad';
import { ReqDelCrossEmail, ResDelCrossEmail } from './email/PtlDelCrossEmail';
import { ReqGetCrossEmail, ResGetCrossEmail } from './email/PtlGetCrossEmail';
@ -54,10 +53,6 @@ export interface ServiceType {
req: ReqRank,
res: ResRank
},
"clsl/RankUids": {
req: ReqRankUids,
res: ResRankUids
},
"clsl/UpLoad": {
req: ReqUpLoad,
res: ResUpLoad
@ -211,186 +206,181 @@ export const serviceProto: ServiceProto<ServiceType> = {
},
{
"id": 3,
"name": "clsl/RankUids",
"type": "api"
},
{
"id": 4,
"name": "clsl/UpLoad",
"type": "api"
},
{
"id": 5,
"id": 4,
"name": "email/DelCrossEmail",
"type": "api"
},
{
"id": 6,
"id": 5,
"name": "email/GetCrossEmail",
"type": "api"
},
{
"id": 7,
"id": 6,
"name": "hbzb/jfs/GetEnemy",
"type": "api"
},
{
"id": 8,
"id": 7,
"name": "hbzb/jfs/GetLog",
"type": "api"
},
{
"id": 9,
"id": 8,
"name": "hbzb/jfs/GetRankList",
"type": "api"
},
{
"id": 10,
"id": 9,
"name": "hbzb/jfs/GetUser",
"type": "api"
},
{
"id": 11,
"id": 10,
"name": "hbzb/GetUser",
"type": "api"
},
{
"id": 12,
"id": 11,
"name": "hbzb/UpdateHbzbCrossUser",
"type": "api"
},
{
"id": 13,
"id": 12,
"name": "hbzb/zbs/GetEnemy",
"type": "api"
},
{
"id": 14,
"id": 13,
"name": "hbzb/zbs/GetLog",
"type": "api"
},
{
"id": 15,
"id": 14,
"name": "hbzb/zbs/GetRankList",
"type": "api"
},
{
"id": 16,
"id": 15,
"name": "hbzb/zbs/GetStatus",
"type": "api"
},
{
"id": 17,
"id": 16,
"name": "hbzb/zbs/SendJjcTop",
"type": "api"
},
{
"id": 18,
"id": 17,
"name": "kbzz/Apply",
"type": "api"
},
{
"id": 19,
"id": 18,
"name": "kbzz/GetUser",
"type": "api"
},
{
"id": 20,
"id": 19,
"name": "kbzz/GroupRank",
"type": "api"
},
{
"id": 21,
"id": 20,
"name": "kbzz/Rank",
"type": "api"
},
{
"id": 22,
"id": 21,
"name": "kbzz/Refresh",
"type": "api"
},
{
"id": 23,
"id": 22,
"name": "kbzz/State",
"type": "api"
},
{
"id": 24,
"id": 23,
"name": "kbzz/UpUser",
"type": "api"
},
{
"id": 25,
"id": 24,
"name": "msg_cross/CrossChat",
"type": "msg"
},
{
"id": 26,
"id": 25,
"name": "msg_cross/HbzbChangeRank",
"type": "msg"
},
{
"id": 27,
"id": 26,
"name": "msg_cross/HbzbJfsLog",
"type": "msg"
},
{
"id": 28,
"id": 27,
"name": "msg_cross/HbzbSendUser",
"type": "msg"
},
{
"id": 29,
"id": 28,
"name": "msg_cross/HbzbZbsLog",
"type": "msg"
},
{
"id": 30,
"id": 29,
"name": "wzry/BaoMing",
"type": "api"
},
{
"id": 31,
"id": 30,
"name": "wzry/catFightLog",
"type": "api"
},
{
"id": 32,
"id": 31,
"name": "wzry/DldRefre",
"type": "api"
},
{
"id": 33,
"id": 32,
"name": "wzry/getJingCai",
"type": "api"
},
{
"id": 34,
"id": 33,
"name": "wzry/Rank",
"type": "api"
},
{
"id": 35,
"id": 34,
"name": "wzry/SetWzFight",
"type": "api"
},
{
"id": 36,
"id": 35,
"name": "wzry/UpdateFight",
"type": "api"
},
{
"id": 37,
"id": 36,
"name": "wzry/WzFightData",
"type": "api"
},
{
"id": 38,
"id": 37,
"name": "wzry/WzFightGroup",
"type": "api"
},
{
"id": 39,
"id": 38,
"name": "wzry/Wzzd",
"type": "api"
}
@ -405,6 +395,13 @@ export const serviceProto: ServiceProto<ServiceType> = {
"type": {
"type": "String"
}
},
{
"id": 1,
"name": "myStasr",
"type": {
"type": "Number"
}
}
]
},
@ -2753,10 +2750,9 @@ export const serviceProto: ServiceProto<ServiceType> = {
"properties": [
{
"id": 0,
"name": "gud",
"name": "uid",
"type": {
"type": "Reference",
"target": "../../shared/protocols/user/type/player"
"type": "String"
}
},
{
@ -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": {
"type": "IndexedAccess",
"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": {
"type": "Partial",
"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": {
"type": "Interface",
"properties": [

View File

@ -251,7 +251,7 @@ BaseConnection.prototype.refreshPower = async function (this: BaseConnection<Ser
this.sendMsg('msg_s2c/PlayerChange', dbUpdate);
let rankKfjs = RankKfjs(7)
rankKfjs.setDataAndCheck({
rankKfjs?.setDataAndCheck({
player: this.gud,
valArr: [power]
});
@ -333,7 +333,7 @@ ApiCall.prototype.addEventMsg = function (this: ApiCall) {
if (Object.keys(this.otherBuff).intersection(Object.keys(msg)).length > 0) this.conn.refreshPower();
break;
case 'msg_s2c/LshdChange':
this.conn.lshd[msgKey] && PublicShared.mergeProperty(this.conn.lshd[msgKey], msg);
this.conn?.lshd?.[msgKey] && PublicShared.mergeProperty(this.conn.lshd[msgKey], msg);
break;
}
};

View File

@ -0,0 +1,68 @@
import {patchInit} from "../patch";
// import {addGameLog, connGameLogDB} from "../gameLog";
import {MongoClient} from "mongodb";
class Path {
async fun1(a: any) {
let logDB = await connGameLogDB();
console.log(11111,'开始查询')
let ab = await logDB.collection('gameLog').aggregate([
{$match: {"type": "kuangdong/YanShi", "req.hdid": {$lte: 21}}},
{$group: {_id: "$uid", total: {$sum: 1}}}
]).toArray()
let auids = ab.map(i => ({
uid: i._id,
type: 'yanshiNum',
time: G.time,
num: i.total,
data: {
...i
}
}))
console.log(auids)
// @ts-ignore
G.crossmongodb.collection('fupanLog').insertMany(auids)
return auids
}
async run() {
await this.fun1(1);
}
}
async function connGameLogDB() {
console.log('connect gamelog mongodb ......');
let logDBUrl:string;
if(G.config.isG123){
logDBUrl = "mongodb://root:lffu2bD%5eGn2%5eE%2bE7@blacklagoon-mongo-log-primary.pro.g123-cpp.com:3717,blacklagoon-mongo-log-secondary.pro.g123-cpp.com:3717?replicaSet=mgset-351742307";
}else{
logDBUrl = "mongodb://root:lyMaple525458@10.0.1.20:27017/heijiao_gamelog?authSource=admin";
}
let client = await MongoClient.connect(logDBUrl,{
maxPoolSize:10,
maxIdleTimeMS: 5*60*1000
});
return client.db(`gameLog${G.config.serverId}`);
}
async function main() {
await patchInit()
let patch = new Path();
await patch.run();
console.log("逻辑执行完成,等待退出");
setTimeout(function () {
console.log('结束程序');
process.exit();
}, 3000);
}
main();

View File

@ -0,0 +1,59 @@
import {log} from "console";
import {patchFun, patchInit} from "../patch";
import {TanXianFun} from "../public/tanxian";
import {PublicShared} from "../shared/public/public";
import {addGameLog} from "../gameLog";
class Path {
async fun1(a: any) {
// 查询今天登录的用户
let today_login_users = await G.mongodb.collection("actionLog").find(
{"log.use_attr_rmbmoney": {$gte: 100000}},
{projection: {uid: 1, "log.use_attr_rmbmoney": 1}}
).toArray();
let uids = today_login_users.map(i => i.uid)
let users = await G.mongodb.collection("user").find({
uid: {$in: uids},
vip: {$lte: 6}
}, {projection: {uid: 1, vip: 1, lv: 1}}).toArray()
let auids = users.map(i => ({
uid: i.uid,
type: 'shuazuanshi',
time: G.time,
data: {
vip: i.vip,
lv: i.lv,
rmbmoney: today_login_users.find(v => v.uid == i.uid)?.log?.use_attr_rmbmoney
}
}))
console.log(auids)
// @ts-ignore
G.crossmongodb.collection('fupanLog').insertMany(auids)
return auids
}
async run() {
await this.fun1(1);
}
}
async function main() {
await patchInit()
let patch = new Path();
await patch.run();
console.log("逻辑执行完成,等待退出");
setTimeout(function () {
console.log('结束程序');
process.exit();
}, 3000);
}
main();

View File

@ -1,7 +1,8 @@
import { Db, MongoClient } from "mongodb";
import { Logger } from "tsrpc";
let logDB:Db;
let errorLogDB:Db;
export let logDB:Db;
export let errorLogDB:Db;
/**
* G123的测试服
@ -10,7 +11,7 @@ function isG123stg(){
return G.config.mongodbUrl.indexOf('.stg.')!=-1;
}
async function connGameLogDB() {
export async function connGameLogDB() {
console.log('connect gamelog mongodb ......');
let logDBUrl:string;
if(G.config.isG123){
@ -28,18 +29,34 @@ async function connGameLogDB() {
return logDB;
}
export let mylogger: Logger = {
debug(...args: any[]){
console.debug(...args);
},
log(...args: any[]){
console.log(...args);
},
warn(...args: any[]){
console.warn(...args);
},
error(...args: any[]){
addErrorLog( args );
console.error(...args);
}
}
process.on('uncaughtException',function(err:Error){
addErrorLog((err.stack).toString());
addErrorLog( (err?.stack || err)?.toString() );
})
process.on('unhandledRejection', function (err:Error, promise) {
addErrorLog((err.stack).toString());
addErrorLog( (err?.stack || err)?.toString() );
})
async function addErrorLog(errData:any){
try{
//g123测试版连接不上db不抓取
if(!errData)return;
if(isG123stg())return;
let log = {
serverId : G.config.serverId,
@ -56,6 +73,28 @@ async function addErrorLog(errData:any){
}
}
export async function addWatchDogLog(data:object[]){
try{
//g123测试版连接不上db不抓取
if(!data)return;
if(isG123stg())return;
let log = {
serverId : G.config.serverId,
pid : process.pid,
cTime : Math.floor(Date.now()/1000)
}
data.map(item=>{
Object.assign(item,log)
})
if(!errorLogDB){
await connGameLogDB();
}
errorLogDB.collection('nodeJsErrorLog').insertMany(data);
}catch(e){
console.error('addWatchDogLog',e);
}
}
/**
*
* @param uid uid

View File

@ -2,7 +2,7 @@
"jinbi": {
"id": "jinbi",
"name": "intr_attr_name_1",
"undefined": "美金",
"undefined": "通用货币,能购买大多数商品",
"colour": 3,
"icon": "icon_jinbi",
"sicon": "icon_jinbi",
@ -12,7 +12,7 @@
"rmbmoney": {
"id": "rmbmoney",
"name": "intr_attr_name_2",
"undefined": "钻石",
"undefined": "稀有货币,没有人可以抗拒它",
"colour": 5,
"icon": "icon_zuanshi",
"sicon": "icon_zuanshi",
@ -22,7 +22,7 @@
"nexp": {
"id": "nexp",
"name": "intr_attr_name_3",
"undefined": "主角经验",
"undefined": "用于提升主角等级",
"colour": 4,
"icon": "icon_zjjy",
"sicon": "icon_zjjy",
@ -32,7 +32,7 @@
"rongyu": {
"id": "rongyu",
"name": "intr_attr_name_4",
"undefined": "荣誉勋章",
"undefined": "荣誉的象征,可以在荣誉商店兑换道具",
"colour": 4,
"icon": "icon_rongyu",
"sicon": "icon_rongyu",
@ -42,7 +42,7 @@
"payExp": {
"id": "payExp",
"name": "intr_attr_name_5",
"undefined": "VIP经验",
"undefined": "稀有货币,没有人可以抗拒它",
"colour": 5,
"icon": "icon_gzjy",
"sicon": "icon_gzjy",
@ -52,7 +52,7 @@
"guijinshu": {
"id": "guijinshu",
"name": "intr_attr_name_6",
"undefined": "贵金属",
"undefined": "通过精炼饰品获得的稀有贵金属,可以在饰品商店兑换饰品",
"colour": 3,
"icon": "icon_xyjsh",
"sicon": "icon_xyjsh",
@ -62,7 +62,7 @@
"shilifrd": {
"id": "shilifrd",
"name": "intr_attr_name_11",
"undefined": "势力繁荣度",
"undefined": "势力繁荣度越高,势力等级越高",
"colour": 4,
"icon": "icon_slfrd",
"sicon": "icon_slfrd",
@ -72,7 +72,7 @@
"clsl_sd": {
"id": "clsl_sd",
"name": "intr_attr_name_12",
"undefined": "丛林狩猎胜点",
"undefined": "丛林狩猎的段位胜点,胜点数量足够后可进阶",
"colour": 5,
"icon": "icon_clsl_xx",
"sicon": "icon_clsl_xx",
@ -82,7 +82,7 @@
"nahanzhuwei": {
"id": "nahanzhuwei",
"name": "tlsd_guess_name_1",
"undefined": "呐喊助威",
"undefined": "参与竞猜后获得莱微碎片*1和美金*500000",
"colour": 5,
"icon": "icon_heroBox_11",
"sicon": "icon_heroBox_11",
@ -92,7 +92,7 @@
"aidebaobao": {
"id": "aidebaobao",
"name": "tlsd_guess_name_2",
"undefined": "爱的抱抱",
"undefined": "参与竞猜后获得莱微碎片*1,配件蓝图*1和美金*800000",
"colour": 5,
"icon": "icon_heroBox_11",
"sicon": "icon_heroBox_11",
@ -102,7 +102,7 @@
"woweishenkuang": {
"id": "woweishenkuang",
"name": "tlsd_guess_name_3",
"undefined": "我为神狂",
"undefined": "参与竞猜后获得莱微碎片*1,配件蓝图*3和美金*1000000",
"colour": 5,
"icon": "icon_heroBox_11",
"sicon": "icon_heroBox_11",
@ -112,7 +112,7 @@
"shengdanExp": {
"id": "shengdanExp",
"name": "intr_attr_name_13",
"undefined": "圣诞战令经验",
"undefined": "一年一度的圣诞庆典获得的圣诞欢乐值,可以提升庆典圣诞树奖励进度",
"colour": 5,
"icon": "icon_sdhd_item_1",
"sicon": "icon_sdhd_item_1",
@ -122,7 +122,7 @@
"shengdanBullet": {
"id": "shengdanBullet",
"name": "intr_attr_name_14",
"undefined": "圣诞打靶币",
"undefined": "圣诞活动获得的庆典喷漆,可以在“百发百中”兑换射击次数",
"colour": 5,
"icon": "icon_chegaipq",
"sicon": "icon_chegaipq",
@ -132,7 +132,7 @@
"jingxuanbi": {
"id": "jingxuanbi",
"name": "intr_attr_name_15",
"undefined": "每日精选兑换币",
"undefined": "只能在黑市使用的票券,可以在黑市里的每日精选兑换商店购买稀有道具",
"colour": 4,
"icon": "icon_hspj",
"sicon": "icon_hspj",
@ -142,7 +142,7 @@
"weiwang": {
"id": "weiwang",
"name": "intr_attr_name_16",
"undefined": "影响力",
"undefined": "影响力提升了周围同伴的信任,可以在影响力系统中提升属性值",
"colour": 4,
"icon": "icon_weiwang",
"sicon": "icon_weiwang",
@ -152,11 +152,31 @@
"yuandanyouxi": {
"id": "yuandanyouxi",
"name": "intr_attr_name_17",
"undefined": "元旦游戏币",
"undefined": "在新年活动中获得的庆典币,可以在机遇礼盒兑换游玩次数",
"colour": 5,
"icon": "icon_xnjb",
"sicon": "icon_xnjb",
"describe": "intr_attr_describe_17",
"advancedEffects": "ani_xiangzikuang"
},
"huangqijinbi": {
"id": "huangqijinbi",
"name": "intr_attr_name_18",
"undefined": "在黄旗酒馆活动中获得的庆典币,可以在黄旗招募中兑换招募次数",
"colour": 5,
"icon": "icon_hqjb",
"sicon": "icon_hqjb",
"describe": "intr_attr_describe_18",
"advancedEffects": "ani_xiangzikuang"
},
"huangqiduihuan": {
"id": "huangqiduihuan",
"name": "intr_attr_name_19",
"undefined": "在黄旗酒馆活动中获得的兑换票券,可以在神秘兑换中购买商品",
"colour": 5,
"icon": "icon_hqdhq",
"sicon": "icon_hqdhq",
"describe": "intr_attr_describe_19",
"advancedEffects": "ani_xiangzikuang"
}
}

View File

@ -2774,7 +2774,7 @@
"id": 4003,
"a": "item",
"t": 28,
"n": 1,
"n": 100,
"p": 6
},
{
@ -4505,82 +4505,12 @@
}
],
"10021": [
{
"id": 10021,
"a": "hero",
"t": 4001,
"n": 1,
"p": 20
},
{
"id": 10021,
"a": "hero",
"t": 4002,
"n": 1,
"p": 20
},
{
"id": 10021,
"a": "hero",
"t": 4003,
"n": 1,
"p": 20
},
{
"id": 10021,
"a": "hero",
"t": 4004,
"n": 1,
"p": 20
},
{
"id": 10021,
"a": "hero",
"t": 4005,
"n": 1,
"p": 20
},
{
"id": 10021,
"a": "hero",
"t": 4007,
"n": 1,
"p": 20
},
{
"id": 10021,
"a": "hero",
"t": 4009,
"n": 1,
"p": 20
},
{
"id": 10021,
"a": "hero",
"t": 4011,
"n": 1,
"p": 20
},
{
"id": 10021,
"a": "hero",
"t": 4012,
"n": 1,
"p": 20
},
{
"id": 10021,
"a": "hero",
"t": 4014,
"n": 1,
"p": 20
},
{
"id": 10021,
"a": "hero",
"t": 4015,
"n": 1,
"p": 20
}
],
"20001": [

View File

@ -1925,6 +1925,36 @@
"initiative": 1,
"location": 1
},
"186": {
"id": 186,
"triggerType": "openCond",
"typeId": "weiwang",
"Type": "finger",
"path": "Canvas/draw/uiRoot/uiView_mainMenu/mainMenu/btnLayout/zd",
"undefined": "点探险",
"initiative": 1,
"location": 2
},
"187": {
"id": 187,
"triggerType": "openCond",
"typeId": "weiwang",
"Type": "finger",
"path": "Canvas/draw/uiRoot/uiView_tanxian/tanxian/tx_map1/btn_ww",
"undefined": "点影响力按钮",
"initiative": 1,
"location": 1
},
"188": {
"id": 188,
"triggerType": "openCond",
"typeId": "weiwang",
"Type": "finger",
"path": "Canvas/draw/uiRoot/uiView_weiwang/weiwang/xia/shengji/btn_sj",
"undefined": "点升级按钮",
"initiative": 1,
"location": 1
},
"20001": {
"id": 20001,
"triggerType": "lose",

75
src/json/heroSkin.json Normal file
View File

@ -0,0 +1,75 @@
{
"1": {
"id": 1,
"heroId": 5001,
"name": "heroSkin_name_1",
"undefined": "传说·兔女郎",
"model": 50011,
"card": 50011,
"head": 50011,
"colour": 5
},
"2": {
"id": 2,
"heroId": 5002,
"name": "heroSkin_name_2",
"model": 50021,
"card": 50021,
"head": 50021,
"colour": 5
},
"3": {
"id": 3,
"heroId": 5003,
"name": "heroSkin_name_3",
"model": 50031,
"card": 50031,
"head": 50031,
"colour": 5
},
"4": {
"id": 4,
"heroId": 5004,
"name": "heroSkin_name_4",
"model": 50041,
"card": 50041,
"head": 50041,
"colour": 5
},
"5": {
"id": 5,
"heroId": 5005,
"name": "heroSkin_name_5",
"model": 50051,
"card": 50051,
"head": 50051,
"colour": 5
},
"6": {
"id": 6,
"heroId": 4002,
"name": "heroSkin_name_6",
"model": 40021,
"card": 40021,
"head": 40021,
"colour": 4
},
"7": {
"id": 7,
"heroId": 4006,
"name": "heroSkin_name_7",
"model": 40061,
"card": 40061,
"head": 40061,
"colour": 4
},
"8": {
"id": 8,
"heroId": 4007,
"name": "heroSkin_name_8",
"model": 40071,
"card": 40071,
"head": 40071,
"colour": 4
}
}

806
src/json/heroSkinLv.json Normal file
View File

@ -0,0 +1,806 @@
{
"4": {
"1": {
"colour": 4,
"lv": 1,
"need": [
{
"a": "attr",
"t": "rmbmoney",
"n": 10
},
{
"a": "attr",
"t": "jinbi",
"n": 8000
}
],
"buff": {
"atk": 30,
"baoshangpro": 0.008
}
},
"2": {
"colour": 4,
"lv": 2,
"need": [
{
"a": "attr",
"t": "rmbmoney",
"n": 10
},
{
"a": "attr",
"t": "jinbi",
"n": 8001
}
],
"buff": {
"atk": 30,
"baoshangpro": 0.009
}
},
"3": {
"colour": 4,
"lv": 3,
"need": [
{
"a": "attr",
"t": "rmbmoney",
"n": 10
},
{
"a": "attr",
"t": "jinbi",
"n": 8002
}
],
"buff": {
"atk": 30,
"baoshangpro": 0.01
}
},
"4": {
"colour": 4,
"lv": 4,
"need": [
{
"a": "attr",
"t": "rmbmoney",
"n": 10
},
{
"a": "attr",
"t": "jinbi",
"n": 8003
}
],
"buff": {
"atk": 30,
"baoshangpro": 0.011
}
},
"5": {
"colour": 4,
"lv": 5,
"need": [
{
"a": "attr",
"t": "rmbmoney",
"n": 10
},
{
"a": "attr",
"t": "jinbi",
"n": 8004
}
],
"buff": {
"atk": 30,
"baoshangpro": 0.012
}
},
"6": {
"colour": 4,
"lv": 6,
"need": [
{
"a": "attr",
"t": "rmbmoney",
"n": 10
},
{
"a": "attr",
"t": "jinbi",
"n": 8005
}
],
"buff": {
"atk": 30,
"baoshangpro": 0.013
}
},
"7": {
"colour": 4,
"lv": 7,
"need": [
{
"a": "attr",
"t": "rmbmoney",
"n": 10
},
{
"a": "attr",
"t": "jinbi",
"n": 8006
}
],
"buff": {
"atk": 30,
"baoshangpro": 0.014
}
},
"8": {
"colour": 4,
"lv": 8,
"need": [
{
"a": "attr",
"t": "rmbmoney",
"n": 10
},
{
"a": "attr",
"t": "jinbi",
"n": 8007
}
],
"buff": {
"atk": 30,
"baoshangpro": 0.015
}
},
"9": {
"colour": 4,
"lv": 9,
"need": [
{
"a": "attr",
"t": "rmbmoney",
"n": 10
},
{
"a": "attr",
"t": "jinbi",
"n": 8008
}
],
"buff": {
"atk": 30,
"baoshangpro": 0.016
}
},
"10": {
"colour": 4,
"lv": 10,
"need": [
{
"a": "attr",
"t": "rmbmoney",
"n": 10
},
{
"a": "attr",
"t": "jinbi",
"n": 8009
}
],
"buff": {
"atk": 30,
"baoshangpro": 0.017
}
},
"11": {
"colour": 4,
"lv": 11,
"need": [
{
"a": "attr",
"t": "rmbmoney",
"n": 10
},
{
"a": "attr",
"t": "jinbi",
"n": 8010
}
],
"buff": {
"atk": 30,
"baoshangpro": 0.018
}
},
"12": {
"colour": 4,
"lv": 12,
"need": [
{
"a": "attr",
"t": "rmbmoney",
"n": 10
},
{
"a": "attr",
"t": "jinbi",
"n": 8011
}
],
"buff": {
"atk": 30,
"baoshangpro": 0.019
}
},
"13": {
"colour": 4,
"lv": 13,
"need": [
{
"a": "attr",
"t": "rmbmoney",
"n": 10
},
{
"a": "attr",
"t": "jinbi",
"n": 8012
}
],
"buff": {
"atk": 30,
"baoshangpro": 0.02
}
},
"14": {
"colour": 4,
"lv": 14,
"need": [
{
"a": "attr",
"t": "rmbmoney",
"n": 10
},
{
"a": "attr",
"t": "jinbi",
"n": 8013
}
],
"buff": {
"atk": 30,
"baoshangpro": 0.021
}
},
"15": {
"colour": 4,
"lv": 15,
"need": [
{
"a": "attr",
"t": "rmbmoney",
"n": 10
},
{
"a": "attr",
"t": "jinbi",
"n": 8014
}
],
"buff": {
"atk": 30,
"baoshangpro": 0.022
}
},
"16": {
"colour": 4,
"lv": 16,
"need": [
{
"a": "attr",
"t": "rmbmoney",
"n": 10
},
{
"a": "attr",
"t": "jinbi",
"n": 8015
}
],
"buff": {
"atk": 30,
"baoshangpro": 0.023
}
},
"17": {
"colour": 4,
"lv": 17,
"need": [
{
"a": "attr",
"t": "rmbmoney",
"n": 10
},
{
"a": "attr",
"t": "jinbi",
"n": 8016
}
],
"buff": {
"atk": 30,
"baoshangpro": 0.024
}
},
"18": {
"colour": 4,
"lv": 18,
"need": [
{
"a": "attr",
"t": "rmbmoney",
"n": 10
},
{
"a": "attr",
"t": "jinbi",
"n": 8017
}
],
"buff": {
"atk": 30,
"baoshangpro": 0.025
}
},
"19": {
"colour": 4,
"lv": 19,
"need": [
{
"a": "attr",
"t": "rmbmoney",
"n": 10
},
{
"a": "attr",
"t": "jinbi",
"n": 8018
}
],
"buff": {
"atk": 30,
"baoshangpro": 0.026
}
},
"20": {
"colour": 4,
"lv": 20,
"need": [
{
"a": "attr",
"t": "rmbmoney",
"n": 10
},
{
"a": "attr",
"t": "jinbi",
"n": 8019
}
],
"buff": {
"atk": 30,
"baoshangpro": 0.027
}
}
},
"5": {
"1": {
"colour": 5,
"lv": 1,
"need": [
{
"a": "attr",
"t": "rmbmoney",
"n": 10
},
{
"a": "attr",
"t": "jinbi",
"n": 8000
}
],
"buff": {
"def": 30,
"maxdps": 20
}
},
"2": {
"colour": 5,
"lv": 2,
"need": [
{
"a": "attr",
"t": "rmbmoney",
"n": 10
},
{
"a": "attr",
"t": "jinbi",
"n": 8001
}
],
"buff": {
"def": 30,
"maxdps": 21
}
},
"3": {
"colour": 5,
"lv": 3,
"need": [
{
"a": "attr",
"t": "rmbmoney",
"n": 10
},
{
"a": "attr",
"t": "jinbi",
"n": 8002
}
],
"buff": {
"def": 30,
"maxdps": 22
}
},
"4": {
"colour": 5,
"lv": 4,
"need": [
{
"a": "attr",
"t": "rmbmoney",
"n": 10
},
{
"a": "attr",
"t": "jinbi",
"n": 8003
}
],
"buff": {
"def": 30,
"maxdps": 23
}
},
"5": {
"colour": 5,
"lv": 5,
"need": [
{
"a": "attr",
"t": "rmbmoney",
"n": 10
},
{
"a": "attr",
"t": "jinbi",
"n": 8004
}
],
"buff": {
"def": 30,
"maxdps": 24
}
},
"6": {
"colour": 5,
"lv": 6,
"need": [
{
"a": "attr",
"t": "rmbmoney",
"n": 10
},
{
"a": "attr",
"t": "jinbi",
"n": 8005
}
],
"buff": {
"def": 30,
"maxdps": 25
}
},
"7": {
"colour": 5,
"lv": 7,
"need": [
{
"a": "attr",
"t": "rmbmoney",
"n": 10
},
{
"a": "attr",
"t": "jinbi",
"n": 8006
}
],
"buff": {
"def": 30,
"maxdps": 26
}
},
"8": {
"colour": 5,
"lv": 8,
"need": [
{
"a": "attr",
"t": "rmbmoney",
"n": 10
},
{
"a": "attr",
"t": "jinbi",
"n": 8007
}
],
"buff": {
"def": 30,
"maxdps": 27
}
},
"9": {
"colour": 5,
"lv": 9,
"need": [
{
"a": "attr",
"t": "rmbmoney",
"n": 10
},
{
"a": "attr",
"t": "jinbi",
"n": 8008
}
],
"buff": {
"def": 30,
"maxdps": 28
}
},
"10": {
"colour": 5,
"lv": 10,
"need": [
{
"a": "attr",
"t": "rmbmoney",
"n": 10
},
{
"a": "attr",
"t": "jinbi",
"n": 8009
}
],
"buff": {
"def": 30,
"maxdps": 29
}
},
"11": {
"colour": 5,
"lv": 11,
"need": [
{
"a": "attr",
"t": "rmbmoney",
"n": 10
},
{
"a": "attr",
"t": "jinbi",
"n": 8010
}
],
"buff": {
"def": 30,
"maxdps": 30
}
},
"12": {
"colour": 5,
"lv": 12,
"need": [
{
"a": "attr",
"t": "rmbmoney",
"n": 10
},
{
"a": "attr",
"t": "jinbi",
"n": 8011
}
],
"buff": {
"def": 30,
"maxdps": 31
}
},
"13": {
"colour": 5,
"lv": 13,
"need": [
{
"a": "attr",
"t": "rmbmoney",
"n": 10
},
{
"a": "attr",
"t": "jinbi",
"n": 8012
}
],
"buff": {
"def": 30,
"maxdps": 32
}
},
"14": {
"colour": 5,
"lv": 14,
"need": [
{
"a": "attr",
"t": "rmbmoney",
"n": 10
},
{
"a": "attr",
"t": "jinbi",
"n": 8013
}
],
"buff": {
"def": 30,
"maxdps": 33
}
},
"15": {
"colour": 5,
"lv": 15,
"need": [
{
"a": "attr",
"t": "rmbmoney",
"n": 10
},
{
"a": "attr",
"t": "jinbi",
"n": 8014
}
],
"buff": {
"def": 30,
"maxdps": 34
}
},
"16": {
"colour": 5,
"lv": 16,
"need": [
{
"a": "attr",
"t": "rmbmoney",
"n": 10
},
{
"a": "attr",
"t": "jinbi",
"n": 8015
}
],
"buff": {
"def": 30,
"maxdps": 35
}
},
"17": {
"colour": 5,
"lv": 17,
"need": [
{
"a": "attr",
"t": "rmbmoney",
"n": 10
},
{
"a": "attr",
"t": "jinbi",
"n": 8016
}
],
"buff": {
"def": 30,
"maxdps": 36
}
},
"18": {
"colour": 5,
"lv": 18,
"need": [
{
"a": "attr",
"t": "rmbmoney",
"n": 10
},
{
"a": "attr",
"t": "jinbi",
"n": 8017
}
],
"buff": {
"def": 30,
"maxdps": 37
}
},
"19": {
"colour": 5,
"lv": 19,
"need": [
{
"a": "attr",
"t": "rmbmoney",
"n": 10
},
{
"a": "attr",
"t": "jinbi",
"n": 8018
}
],
"buff": {
"def": 30,
"maxdps": 38
}
},
"20": {
"colour": 5,
"lv": 20,
"need": [
{
"a": "attr",
"t": "rmbmoney",
"n": 10
},
{
"a": "attr",
"t": "jinbi",
"n": 8019
}
],
"buff": {
"def": 30,
"maxdps": 39
}
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -835,13 +835,13 @@
"name": "zc_btn_hs",
"undefined": "黑市",
"and": {
"lv": 15
"lv": 7
},
"or": {},
"time": 0,
"tips": "openCond_tips_96",
"display": {
"lv": 15
"lv": 7
}
},
"zc_btn_jg": {
@ -887,78 +887,78 @@
"name": "shouchong",
"undefined": "首充",
"and": {
"mapId": 8
"lv": 7
},
"or": {},
"time": 0,
"tips": "openCond_tips_64",
"display": {
"mapId": 8
"lv": 7
}
},
"kaifukuanghuan": {
"name": "kaifukuanghuan",
"undefined": "开服狂欢",
"and": {
"lv": 15
"lv": 10
},
"or": {},
"time": 0,
"tips": "openCond_tips_96",
"display": {
"lv": 15
"lv": 10
}
},
"cz_jijin": {
"name": "cz_jijin",
"undefined": "基金入口",
"and": {
"mapId": 20
"lv": 7
},
"or": {},
"time": 0,
"tips": "openCond_tips_64",
"display": {
"mapId": 20
"lv": 7
}
},
"jijin": {
"name": "jijin",
"undefined": "基金",
"and": {
"mapId": 20
"lv": 7
},
"or": {},
"time": 0,
"tips": "openCond_tips_64",
"display": {
"mapId": 20
"lv": 7
}
},
"jijin_gkjj": {
"name": "jijin_gkjj",
"undefined": "关卡基金",
"and": {
"mapId": 20
"lv": 7
},
"or": {},
"time": 0,
"tips": "openCond_tips_64",
"display": {
"mapId": 20
"lv": 7
}
},
"jijin_tbtxz": {
"name": "jijin_tbtxz",
"undefined": "特别通行证",
"and": {
"mapId": 20
"lv": 7
},
"or": {},
"time": 0,
"tips": "openCond_tips_64",
"display": {
"mapId": 20
"lv": 7
}
},
"jijin_tszl": {
@ -980,13 +980,13 @@
"name": "yuedujijin",
"undefined": "月度基金",
"and": {
"lv": 15
"lv": 7
},
"or": {},
"time": 0,
"tips": "openCond_tips_71",
"display": {
"lv": 15
"lv": 7
}
},
"zhanling": {
@ -1006,130 +1006,130 @@
"name": "dengludali",
"undefined": "登录大礼7日",
"and": {
"lv": 13
"lv": 10
},
"or": {},
"time": 0,
"tips": "openCond_tips_73",
"display": {
"lv": 13
"lv": 10
}
},
"yibaichou": {
"name": "yibaichou",
"undefined": "百抽活动",
"and": {
"lv": 7
"lv": 10
},
"or": {},
"time": 0,
"tips": "openCond_tips_74",
"display": {
"lv": 7
"lv": 10
}
},
"xinfupeiyang": {
"name": "xinfupeiyang",
"undefined": "心腹培养",
"and": {
"mapId": 20
"lv": 10
},
"or": {},
"time": 0,
"tips": "openCond_tips_75",
"display": {
"mapId": 20
"lv": 10
}
},
"huobanzhaomu": {
"name": "huobanzhaomu",
"undefined": "伙伴招募",
"and": {
"mapId": 50
"lv": 10
},
"or": {},
"time": 0,
"tips": "openCond_tips_76",
"display": {
"mapId": 50
"lv": 10
}
},
"xinshoulibao": {
"name": "xinshoulibao",
"undefined": "冲刺礼包",
"and": {
"lv": 21
"lv": 7
},
"or": {},
"time": 0,
"tips": "openCond_tips_77",
"display": {
"lv": 21
"lv": 7
}
},
"leijichongzhi": {
"name": "leijichongzhi",
"undefined": "累计充值",
"and": {
"mapId": 20
"lv": 10
},
"or": {},
"time": 0,
"tips": "openCond_tips_78",
"tips": "openCond_tips_96",
"display": {
"mapId": 20
"lv": 10
}
},
"diaoluoduihuan": {
"name": "diaoluoduihuan",
"undefined": "掉落兑换",
"and": {
"openTime": 8
"lv": 10
},
"or": {},
"time": 0,
"tips": "openCond_tips_79",
"display": {
"openTime": 8
"lv": 10
}
},
"rencaijihua": {
"name": "rencaijihua",
"undefined": "人才计划",
"and": {
"lv": 13
"lv": 10
},
"or": {},
"time": 0,
"tips": "openCond_tips_80",
"tips": "openCond_tips_96",
"display": {
"lv": 13
"lv": 10
}
},
"zc_img6": {
"name": "zc_img6",
"undefined": "每日签到",
"and": {
"lv": 13
"lv": 7
},
"or": {},
"time": 0,
"tips": "openCond_tips_81",
"display": {
"lv": 13
"lv": 7
}
},
"dianfengrongyao": {
"name": "dianfengrongyao",
"undefined": "巅峰荣耀",
"and": {
"lv": 20
"lv": 10
},
"or": {},
"time": 0,
"tips": "openCond_tips_82",
"display": {
"lv": 20
"lv": 10
}
},
"tuisonglibao": {
@ -1149,130 +1149,130 @@
"name": "hs_btn_tqlb",
"undefined": "特权礼包",
"and": {
"lv": 15
"lv": 7
},
"or": {},
"time": 0,
"tips": "openCond_tips_84",
"display": {
"lv": 15
"lv": 7
}
},
"hs_btn_ndj": {
"name": "hs_btn_ndj",
"undefined": "扭蛋机",
"and": {
"lv": 15
"lv": 7
},
"or": {},
"time": 0,
"tips": "openCond_tips_85",
"display": {
"lv": 15
"lv": 7
}
},
"hs_btn_yk": {
"name": "hs_btn_yk",
"undefined": "月卡",
"and": {
"lv": 15
"lv": 7
},
"or": {},
"time": 0,
"tips": "openCond_tips_86",
"display": {
"lv": 15
"lv": 7
}
},
"hs_btn_zsk": {
"name": "hs_btn_zsk",
"undefined": "终身卡",
"and": {
"lv": 15
"lv": 7
},
"or": {},
"time": 0,
"tips": "openCond_tips_87",
"display": {
"lv": 15
"lv": 7
}
},
"hs_btn_mrjx": {
"name": "hs_btn_mrjx",
"undefined": "每日精选",
"and": {
"lv": 15
"lv": 7
},
"or": {},
"time": 0,
"tips": "openCond_tips_88",
"display": {
"lv": 15
"lv": 7
}
},
"hs_btn_jthl": {
"name": "hs_btn_jthl",
"undefined": "积天豪礼",
"and": {
"lv": 15
"lv": 7
},
"or": {},
"time": 0,
"tips": "openCond_tips_89",
"display": {
"lv": 15
"lv": 7
}
},
"hs_btn_zlb": {
"name": "hs_btn_zlb",
"undefined": "周礼包",
"and": {
"lv": 15
"lv": 7
},
"or": {},
"time": 0,
"tips": "openCond_tips_90",
"display": {
"lv": 15
"lv": 7
}
},
"shangcheng": {
"name": "shangcheng",
"undefined": "商城",
"and": {
"mapId": 20
"lv": 7
},
"or": {},
"time": 0,
"tips": "openCond_tips_64",
"display": {
"mapId": 20
"lv": 7
}
},
"fuli": {
"name": "fuli",
"undefined": "福利",
"and": {
"lv": 13
"lv": 7
},
"or": {},
"time": 0,
"tips": "openCond_tips_92",
"display": {
"lv": 13
"lv": 7
}
},
"xianshihuodong": {
"name": "xianshihuodong",
"undefined": "限时活动",
"and": {
"lv": 15
"lv": 10
},
"or": {},
"time": 0,
"tips": "openCond_tips_93",
"display": {
"lv": 15
"lv": 10
}
},
"hb_btn_yjtz": {
@ -1285,111 +1285,111 @@
"time": 0,
"tips": "openCond_tips_94",
"display": {
"lv": 7
"lv": 30
}
},
"kaifujingsai": {
"name": "kaifujingsai",
"undefined": "开服竞赛",
"and": {
"lv": 20
"lv": 10
},
"or": {},
"time": 0,
"tips": "openCond_tips_95",
"tips": "openCond_tips_96",
"display": {
"lv": 20
"lv": 10
}
},
"zhoumolibao": {
"name": "zhoumolibao",
"undefined": "周末礼包",
"and": {
"lv": 15
"lv": 10
},
"or": {},
"time": 0,
"tips": "openCond_tips_96",
"display": {
"lv": 15
"lv": 10
}
},
"shengdanhuodong": {
"name": "shengdanhuodong",
"undefined": "圣诞活动",
"and": {
"lv": 15
"lv": 10
},
"or": {},
"time": 0,
"tips": "openCond_tips_96",
"display": {
"lv": 15
"lv": 10
}
},
"yuandanhuodong": {
"name": "yuandanhuodong",
"undefined": "元旦活动",
"and": {
"lv": 15
"lv": 10
},
"or": {},
"time": 0,
"tips": "openCond_tips_96",
"display": {
"lv": 15
"lv": 10
}
},
"czlibao": {
"name": "czlibao",
"undefined": "超值礼包破冰",
"and": {
"lv": 15
"lv": 10
},
"or": {},
"time": 0,
"tips": "openCond_tips_96",
"display": {
"lv": 15
"lv": 10
}
},
"xiaofeijingsai": {
"name": "xiaofeijingsai",
"undefined": "钻石消费竞赛",
"and": {
"lv": 15
"lv": 10
},
"or": {},
"time": 0,
"tips": "openCond_tips_96",
"display": {
"lv": 15
"lv": 10
}
},
"leigoulibao": {
"name": "leigoulibao",
"undefined": "累购礼包",
"and": {
"lv": 15
"lv": 10
},
"or": {},
"time": 0,
"tips": "openCond_tips_96",
"display": {
"lv": 15
"lv": 10
}
},
"weiwang": {
"name": "weiwang",
"undefined": "威望",
"and": {
"lv": 15
"mapId": 15
},
"or": {},
"time": 0,
"tips": "openCond_tips_96",
"display": {
"lv": 15
"mapId": 15
}
}
}

View File

@ -915,6 +915,37 @@
"front": {},
"currency": "CNY"
},
"lv10": {
"id": "lv10",
"money": 0.5,
"payExp": [
{
"a": "attr",
"t": "payExp",
"n": 5
}
],
"prize": [
{
"a": "attr",
"t": "rmbmoney",
"n": 100
},
{
"a": "hero",
"t": "4012",
"n": 1
}
],
"firstPayPrize": [],
"name": "pay_name_lv10",
"undefined": "等级豪礼等级10",
"time": -1,
"buys": 1,
"needVip": 0,
"front": {},
"currency": "CNY"
},
"lv15": {
"id": "lv15",
"money": 0.5,
@ -6673,5 +6704,205 @@
"needVip": 0,
"front": {},
"currency": "CNY"
},
"hqjg_libao_1": {
"id": "hqjg_libao_1",
"money": 0.5,
"payExp": [
{
"a": "attr",
"t": "payExp",
"n": 5
}
],
"prize": [],
"firstPayPrize": [],
"name": "pay_name_hqjg_libao_1",
"undefined": "黄旗酒馆_1",
"time": -1,
"buys": 0,
"needVip": 0,
"front": {},
"currency": "CNY"
},
"hqjg_libao_2": {
"id": "hqjg_libao_2",
"money": 1,
"payExp": [
{
"a": "attr",
"t": "payExp",
"n": 10
}
],
"prize": [],
"firstPayPrize": [],
"name": "pay_name_hqjg_libao_2",
"undefined": "黄旗酒馆_2",
"time": -1,
"buys": 0,
"needVip": 0,
"front": {},
"currency": "CNY"
},
"hqjg_libao_3": {
"id": "hqjg_libao_3",
"money": 6,
"payExp": [
{
"a": "attr",
"t": "payExp",
"n": 60
}
],
"prize": [],
"firstPayPrize": [],
"name": "pay_name_hqjg_libao_3",
"undefined": "黄旗酒馆_3",
"time": -1,
"buys": 0,
"needVip": 0,
"front": {},
"currency": "CNY"
},
"hqjg_libao_4": {
"id": "hqjg_libao_4",
"money": 18,
"payExp": [
{
"a": "attr",
"t": "payExp",
"n": 180
}
],
"prize": [],
"firstPayPrize": [],
"name": "pay_name_hqjg_libao_4",
"undefined": "黄旗酒馆_4",
"time": -1,
"buys": 0,
"needVip": 0,
"front": {},
"currency": "CNY"
},
"hqjg_libao_5": {
"id": "hqjg_libao_5",
"money": 30,
"payExp": [
{
"a": "attr",
"t": "payExp",
"n": 300
}
],
"prize": [],
"firstPayPrize": [],
"name": "pay_name_hqjg_libao_5",
"undefined": "黄旗酒馆_5",
"time": -1,
"buys": 0,
"needVip": 0,
"front": {},
"currency": "CNY"
},
"hqjg_libao_6": {
"id": "hqjg_libao_6",
"money": 68,
"payExp": [
{
"a": "attr",
"t": "payExp",
"n": 680
}
],
"prize": [],
"firstPayPrize": [],
"name": "pay_name_hqjg_libao_6",
"undefined": "黄旗酒馆_6",
"time": -1,
"buys": 0,
"needVip": 0,
"front": {},
"currency": "CNY"
},
"hqjg_libao_7": {
"id": "hqjg_libao_7",
"money": 128,
"payExp": [
{
"a": "attr",
"t": "payExp",
"n": 1280
}
],
"prize": [],
"firstPayPrize": [],
"name": "pay_name_hqjg_libao_7",
"undefined": "黄旗酒馆_7",
"time": -1,
"buys": 0,
"needVip": 0,
"front": {},
"currency": "CNY"
},
"hqjg_libao_8": {
"id": "hqjg_libao_8",
"money": 198,
"payExp": [
{
"a": "attr",
"t": "payExp",
"n": 1980
}
],
"prize": [],
"firstPayPrize": [],
"name": "pay_name_hqjg_libao_8",
"undefined": "黄旗酒馆_8",
"time": -1,
"buys": 0,
"needVip": 0,
"front": {},
"currency": "CNY"
},
"hqjg_libao_9": {
"id": "hqjg_libao_9",
"money": 328,
"payExp": [
{
"a": "attr",
"t": "payExp",
"n": 3280
}
],
"prize": [],
"firstPayPrize": [],
"name": "pay_name_hqjg_libao_9",
"undefined": "黄旗酒馆_9",
"time": -1,
"buys": 0,
"needVip": 0,
"front": {},
"currency": "CNY"
},
"hqjg_libao_10": {
"id": "hqjg_libao_10",
"money": 648,
"payExp": [
{
"a": "attr",
"t": "payExp",
"n": 6480
}
],
"prize": [],
"firstPayPrize": [],
"name": "pay_name_hqjg_libao_10",
"undefined": "黄旗酒馆_10",
"time": -1,
"buys": 0,
"needVip": 0,
"front": {},
"currency": "CNY"
}
}

View File

@ -2,12 +2,12 @@
"1": {
"id": 1,
"name": "playerChatFrame_name_1",
"undefined": "玩家初始默认聊天框",
"img": "lt_dhk1",
"cond": [
"lv",
1
],
"undefined": "进入游戏默认获得",
"intr": "playerChatFrame_des_1",
"sort": 1,
"buff": {
@ -19,12 +19,12 @@
"2": {
"id": 2,
"name": "playerChatFrame_name_2",
"undefined": "主角等级达到30级获得解锁后防御加成+1%",
"img": "lt_dhk3",
"cond": [
"lv",
30
],
"undefined": "角色等级达到30级获得",
"intr": "playerChatFrame_des_2",
"sort": 2,
"buff": {
@ -36,12 +36,12 @@
"3": {
"id": 3,
"name": "playerChatFrame_name_3",
"undefined": "主角等级达到50级获得解锁后防御加成+1%",
"img": "lt_dhk4",
"cond": [
"lv",
50
],
"undefined": "角色等级达到50级获得",
"intr": "playerChatFrame_des_3",
"sort": 3,
"buff": {
@ -53,12 +53,12 @@
"4": {
"id": 4,
"name": "playerChatFrame_name_4",
"undefined": "图鉴数量达到30个获得解锁后防御加成+1%",
"img": "lt_dhk5",
"cond": [
"tujianLv",
7
],
"undefined": "图鉴数量达到30个获得",
"intr": "playerChatFrame_des_4",
"sort": 5,
"buff": {
@ -70,12 +70,12 @@
"5": {
"id": 5,
"name": "playerChatFrame_name_5",
"undefined": "VIP5获得解锁后攻击加成+1%",
"img": "lt_dhk7",
"cond": [
"vip",
5
],
"undefined": "VIP5获得",
"intr": "playerChatFrame_des_5",
"sort": 4,
"buff": {
@ -87,12 +87,12 @@
"6": {
"id": 6,
"name": "playerChatFrame_name_6",
"undefined": "跨服势力战最高品质据点第一势力成员,解锁后攻击加成+1%、生命加成+1%限时7天",
"img": "lt_dhk11",
"cond": [
"time",
604800
],
"undefined": "跨服势力战最高品质据点第一势力成员",
"intr": "playerChatFrame_des_6",
"sort": 6,
"buff": {
@ -105,12 +105,12 @@
"7": {
"id": 7,
"name": "playerChatFrame_name_7",
"undefined": "名望等级达到七阶获得,解锁后防御加成+1%",
"img": "lt_dhk13",
"cond": [
"renown",
61
],
"undefined": "名望等级达到七阶获得",
"intr": "playerChatFrame_des_7",
"sort": 7,
"buff": {
@ -122,12 +122,12 @@
"8": {
"id": 8,
"name": "playerChatFrame_name_8",
"undefined": "圣诞庆典活动获得,解锁后防御加成+1%",
"img": "lt_dhk14",
"cond": [
"time",
-1
],
"undefined": "圣诞庆典获得",
"intr": "playerChatFrame_des_8",
"sort": 8,
"buff": {
@ -139,12 +139,12 @@
"9": {
"id": 9,
"name": "playerChatFrame_name_9",
"undefined": "新年庆典活动获得,解锁后防御加成+1%",
"img": "lt_dhk15",
"cond": [
"time",
-1
],
"undefined": "新年庆典获得",
"intr": "playerChatFrame_des_9",
"sort": 9,
"buff": {

View File

@ -3,6 +3,7 @@
"id": 1,
"type": 1,
"name": "playerModel_name_1",
"undefined": "主角初始默认的男形象",
"head": 10001,
"img": "zhu_10001",
"cond": [
@ -20,6 +21,7 @@
"id": 2,
"type": 1,
"name": "playerModel_name_2",
"undefined": "主角初始默认的女形象",
"head": 10002,
"img": "zhu_10002",
"cond": [
@ -37,6 +39,7 @@
"id": 3,
"type": 1,
"name": "playerModel_name_3",
"undefined": "圣诞庆典活动获得,解锁后防御加成+2%",
"head": 100011,
"img": 100011,
"cond": [
@ -56,6 +59,7 @@
"id": 4,
"type": 1,
"name": "playerModel_name_4",
"undefined": "圣诞庆典活动获得,解锁后攻击加成+2%",
"head": 100021,
"img": 100021,
"cond": [

View File

@ -3,360 +3,600 @@
"id": 1,
"renownlevel": 1,
"maxlevel": 250,
"cost": 5,
"atk": 2,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 2
}
],
"atk": 1.2,
"def": 1,
"hp": 8
"hp": 4
},
"2": {
"id": 2,
"renownlevel": 2,
"maxlevel": 500,
"cost": 6,
"atk": 2,
"maxlevel": 750,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 2
}
],
"atk": 1.2,
"def": 1,
"hp": 9
"hp": 4
},
"3": {
"id": 3,
"renownlevel": 3,
"maxlevel": 750,
"cost": 7,
"atk": 2,
"maxlevel": 1500,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 2
}
],
"atk": 1.2,
"def": 1,
"hp": 10
"hp": 4
},
"4": {
"id": 4,
"renownlevel": 4,
"maxlevel": 1000,
"cost": 9,
"atk": 4,
"def": 2,
"hp": 11
"maxlevel": 2500,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 2
}
],
"atk": 1.2,
"def": 1,
"hp": 4
},
"5": {
"id": 5,
"renownlevel": 5,
"maxlevel": 1250,
"cost": 11,
"atk": 4,
"def": 2,
"hp": 12
"maxlevel": 3750,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 2
}
],
"atk": 1.2,
"def": 1,
"hp": 4
},
"6": {
"id": 6,
"renownlevel": 6,
"maxlevel": 1500,
"cost": 13,
"atk": 4,
"def": 2,
"hp": 13
"maxlevel": 5250,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 2
}
],
"atk": 1.2,
"def": 1,
"hp": 4
},
"7": {
"id": 7,
"renownlevel": 7,
"maxlevel": 1750,
"cost": 15,
"atk": 6,
"def": 3,
"hp": 14
"maxlevel": 7000,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 2
}
],
"atk": 1.2,
"def": 1,
"hp": 4
},
"8": {
"id": 8,
"renownlevel": 8,
"maxlevel": 2000,
"cost": 17,
"atk": 6,
"def": 3,
"hp": 15
"maxlevel": 9000,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 2
}
],
"atk": 1.2,
"def": 1,
"hp": 4
},
"9": {
"id": 9,
"renownlevel": 9,
"maxlevel": 2500,
"cost": 19,
"atk": 6,
"def": 3,
"hp": 16
"maxlevel": 11500,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 2
}
],
"atk": 1.2,
"def": 1,
"hp": 4
},
"10": {
"id": 10,
"renownlevel": 10,
"maxlevel": 3000,
"cost": 21,
"atk": 8,
"def": 4,
"hp": 17
"maxlevel": 14500,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 2
}
],
"atk": 1.2,
"def": 1,
"hp": 4
},
"11": {
"id": 11,
"renownlevel": 11,
"maxlevel": 3500,
"cost": 23,
"atk": 8,
"def": 4,
"hp": 18
"maxlevel": 18000,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 2
}
],
"atk": 1.2,
"def": 1,
"hp": 5
},
"12": {
"id": 12,
"renownlevel": 12,
"maxlevel": 4000,
"cost": 25,
"atk": 8,
"def": 4,
"hp": 19
"maxlevel": 22000,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 2
}
],
"atk": 1.2,
"def": 1,
"hp": 5
},
"13": {
"id": 13,
"renownlevel": 13,
"maxlevel": 4500,
"cost": 27,
"atk": 10,
"def": 5,
"hp": 20
"maxlevel": 26500,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 2
}
],
"atk": 1.2,
"def": 1,
"hp": 5
},
"14": {
"id": 14,
"renownlevel": 14,
"maxlevel": 5000,
"cost": 30,
"atk": 10,
"def": 5,
"hp": 21
"maxlevel": 31500,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 2
}
],
"atk": 1.2,
"def": 1,
"hp": 5
},
"15": {
"id": 15,
"renownlevel": 15,
"maxlevel": 5000,
"cost": 33,
"atk": 10,
"def": 5,
"hp": 21
"maxlevel": 36500,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 2
}
],
"atk": 1.2,
"def": 1,
"hp": 5
},
"16": {
"id": 16,
"renownlevel": 16,
"maxlevel": 5000,
"cost": 36,
"atk": 12,
"def": 6,
"hp": 22
"maxlevel": 41500,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 5
}
],
"atk": 1.4,
"def": 1.2,
"hp": 6
},
"17": {
"id": 17,
"renownlevel": 17,
"maxlevel": 5000,
"cost": 39,
"atk": 12,
"def": 6,
"hp": 22
"maxlevel": 46500,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 9
}
],
"atk": 1.4,
"def": 1.2,
"hp": 6
},
"18": {
"id": 18,
"renownlevel": 18,
"maxlevel": 5000,
"cost": 42,
"atk": 12,
"def": 6,
"hp": 22
"maxlevel": 51500,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 13
}
],
"atk": 1.4,
"def": 1.2,
"hp": 6
},
"19": {
"id": 19,
"renownlevel": 19,
"maxlevel": 5000,
"cost": 45,
"atk": 14,
"def": 7,
"hp": 23
"maxlevel": 56500,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 17
}
],
"atk": 1.4,
"def": 1.2,
"hp": 6
},
"20": {
"id": 20,
"renownlevel": 20,
"maxlevel": 5000,
"cost": 48,
"atk": 14,
"def": 7,
"hp": 23
"maxlevel": 61500,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 21
}
],
"atk": 1.4,
"def": 1.2,
"hp": 6
},
"21": {
"id": 21,
"renownlevel": 21,
"maxlevel": 5000,
"cost": 51,
"atk": 14,
"def": 7,
"hp": 23
"maxlevel": 66500,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 23
}
],
"atk": 1.4,
"def": 1.2,
"hp": 7
},
"22": {
"id": 22,
"renownlevel": 22,
"maxlevel": 5000,
"cost": 54,
"atk": 14,
"def": 7,
"hp": 23
"maxlevel": 71500,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 25
}
],
"atk": 1.4,
"def": 1.2,
"hp": 7
},
"23": {
"id": 23,
"renownlevel": 23,
"maxlevel": 5000,
"cost": 57,
"atk": 16,
"def": 8,
"hp": 24
"maxlevel": 76500,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 27
}
],
"atk": 1.4,
"def": 1.2,
"hp": 7
},
"24": {
"id": 24,
"renownlevel": 24,
"maxlevel": 5000,
"cost": 60,
"atk": 16,
"def": 8,
"hp": 24
"maxlevel": 81500,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 29
}
],
"atk": 1.4,
"def": 1.2,
"hp": 7
},
"25": {
"id": 25,
"renownlevel": 25,
"maxlevel": 5000,
"cost": 63,
"atk": 16,
"def": 8,
"hp": 24
"maxlevel": 86500,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 30
}
],
"atk": 1.4,
"def": 1.2,
"hp": 7
},
"26": {
"id": 26,
"renownlevel": 26,
"maxlevel": 5000,
"cost": 66,
"atk": 16,
"def": 8,
"hp": 24
"maxlevel": 91500,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 32
}
],
"atk": 1.4,
"def": 1.2,
"hp": 8
},
"27": {
"id": 27,
"renownlevel": 27,
"maxlevel": 5000,
"cost": 69,
"atk": 16,
"def": 8,
"hp": 24
"maxlevel": 96500,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 34
}
],
"atk": 1.4,
"def": 1.2,
"hp": 8
},
"28": {
"id": 28,
"renownlevel": 28,
"maxlevel": 5000,
"cost": 72,
"atk": 18,
"def": 9,
"hp": 25
"maxlevel": 101500,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 36
}
],
"atk": 1.4,
"def": 1.2,
"hp": 8
},
"29": {
"id": 29,
"renownlevel": 29,
"maxlevel": 5000,
"cost": 75,
"atk": 18,
"def": 9,
"hp": 25
"maxlevel": 106500,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 38
}
],
"atk": 1.4,
"def": 1.2,
"hp": 8
},
"30": {
"id": 30,
"renownlevel": 30,
"maxlevel": 5000,
"cost": 78,
"atk": 18,
"def": 9,
"hp": 25
"maxlevel": 111500,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 40
}
],
"atk": 1.4,
"def": 1.2,
"hp": 8
},
"31": {
"id": 31,
"renownlevel": 31,
"maxlevel": 5000,
"cost": 81,
"atk": 18,
"def": 9,
"hp": 25
"maxlevel": 116500,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 42
}
],
"atk": 1.4,
"def": 1.2,
"hp": 8
},
"32": {
"id": 32,
"renownlevel": 32,
"maxlevel": 5000,
"cost": 84,
"atk": 18,
"def": 9,
"hp": 25
"maxlevel": 121500,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 44
}
],
"atk": 1.4,
"def": 1.2,
"hp": 8
},
"33": {
"id": 33,
"renownlevel": 33,
"maxlevel": 5000,
"cost": 87,
"atk": 18,
"def": 10,
"hp": 25
"maxlevel": 126500,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 46
}
],
"atk": 1.4,
"def": 1.2,
"hp": 8
},
"34": {
"id": 34,
"renownlevel": 34,
"maxlevel": 5000,
"cost": 90,
"atk": 18,
"def": 10,
"hp": 25
"maxlevel": 131500,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 48
}
],
"atk": 1.4,
"def": 1.2,
"hp": 8
},
"35": {
"id": 35,
"renownlevel": 35,
"maxlevel": 5000,
"cost": 93,
"atk": 18,
"def": 10,
"hp": 25
"maxlevel": 136500,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 50
}
],
"atk": 1.4,
"def": 1.2,
"hp": 8
},
"36": {
"id": 36,
"renownlevel": 36,
"maxlevel": 5000,
"cost": 97,
"atk": 18,
"def": 10,
"hp": 25
"maxlevel": 141500,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 52
}
],
"atk": 1.4,
"def": 1.2,
"hp": 8
},
"37": {
"id": 37,
"renownlevel": 37,
"maxlevel": 5000,
"cost": 101,
"atk": 18,
"def": 10,
"hp": 25
"maxlevel": 146500,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 54
}
],
"atk": 1.4,
"def": 1.2,
"hp": 8
},
"38": {
"id": 38,
"renownlevel": 38,
"maxlevel": 5000,
"cost": 105,
"atk": 18,
"def": 10,
"hp": 25
"maxlevel": 151500,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 56
}
],
"atk": 1.4,
"def": 1.2,
"hp": 8
},
"39": {
"id": 39,
"renownlevel": 39,
"maxlevel": 5000,
"cost": 109,
"atk": 18,
"def": 10,
"hp": 25
"maxlevel": 156500,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 58
}
],
"atk": 1.4,
"def": 1.2,
"hp": 8
},
"40": {
"id": 40,
"renownlevel": 40,
"maxlevel": 5000,
"cost": 113,
"atk": 18,
"def": 10,
"hp": 25
"maxlevel": 161500,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 60
}
],
"atk": 1.4,
"def": 1.2,
"hp": 8
}
}

File diff suppressed because it is too large Load Diff

View File

@ -388,10 +388,10 @@
"type": 5,
"typeName": "tuisonglibao_name_1",
"num": [
15
10
],
"payId": [
"lv15"
"lv10"
],
"time": 10800,
"displayCD": 10800,

View File

@ -14,9 +14,10 @@
"n": 10000
}
],
"p": 3,
"p": 5,
"intr": "intr_xuanshangrenwu_intr_1",
"img": "icon_jinbi"
"img": "icon_jinbi",
"appearNum": 0
},
"2": {
"id": 2,
@ -33,9 +34,10 @@
"n": 80
}
],
"p": 4,
"p": 3,
"intr": "intr_xuanshangrenwu_intr_2",
"img": "icon_jinbi"
"img": "icon_jinbi",
"appearNum": 0
},
"3": {
"id": 3,
@ -54,7 +56,8 @@
],
"p": 5,
"intr": "intr_xuanshangrenwu_intr_3",
"img": "icon_jinbi"
"img": "icon_jinbi",
"appearNum": 0
},
"4": {
"id": 4,
@ -71,9 +74,10 @@
"n": 30
}
],
"p": 6,
"p": 1,
"intr": "intr_xuanshangrenwu_intr_4",
"img": "icon_jinbi"
"img": "icon_jinbi",
"appearNum": 3
},
"5": {
"id": 5,
@ -90,9 +94,10 @@
"n": 20000
}
],
"p": 7,
"p": 3,
"intr": "intr_xuanshangrenwu_intr_5",
"img": "icon_jinbi"
"img": "icon_jinbi",
"appearNum": 0
},
"6": {
"id": 6,
@ -109,9 +114,10 @@
"n": 60
}
],
"p": 8,
"p": 5,
"intr": "intr_xuanshangrenwu_intr_4",
"img": "icon_jinbi"
"img": "icon_jinbi",
"appearNum": 3
},
"7": {
"id": 7,
@ -128,9 +134,10 @@
"n": 20000
}
],
"p": 9,
"p": 3,
"intr": "intr_xuanshangrenwu_intr_5",
"img": "icon_jinbi"
"img": "icon_jinbi",
"appearNum": 0
},
"8": {
"id": 8,
@ -147,9 +154,10 @@
"n": 40000
}
],
"p": 10,
"p": 5,
"intr": "intr_xuanshangrenwu_intr_6",
"img": "icon_jinbi"
"img": "icon_jinbi",
"appearNum": 0
},
"9": {
"id": 9,
@ -166,9 +174,10 @@
"n": 110
}
],
"p": 11,
"p": 1,
"intr": "intr_xuanshangrenwu_intr_7",
"img": "icon_jinbi"
"img": "icon_jinbi",
"appearNum": 0
},
"10": {
"id": 10,
@ -185,9 +194,10 @@
"n": 30000
}
],
"p": 12,
"p": 3,
"intr": "intr_xuanshangrenwu_intr_8",
"img": "icon_jinbi"
"img": "icon_jinbi",
"appearNum": 0
},
"11": {
"id": 11,
@ -204,9 +214,10 @@
"n": 30000
}
],
"p": 13,
"p": 5,
"intr": "intr_xuanshangrenwu_intr_6",
"img": "icon_jinbi"
"img": "icon_jinbi",
"appearNum": 0
},
"12": {
"id": 12,
@ -223,9 +234,10 @@
"n": 140
}
],
"p": 14,
"p": 3,
"intr": "intr_xuanshangrenwu_intr_7",
"img": "icon_jinbi"
"img": "icon_jinbi",
"appearNum": 0
},
"13": {
"id": 13,
@ -242,9 +254,10 @@
"n": 60000
}
],
"p": 15,
"p": 3,
"intr": "intr_xuanshangrenwu_intr_8",
"img": "icon_jinbi"
"img": "icon_jinbi",
"appearNum": 0
},
"14": {
"id": 14,
@ -261,9 +274,10 @@
"n": 40000
}
],
"p": 16,
"p": 5,
"intr": "intr_xuanshangrenwu_intr_9",
"img": "icon_jinbi"
"img": "icon_jinbi",
"appearNum": 0
},
"15": {
"id": 15,
@ -280,9 +294,10 @@
"n": 90
}
],
"p": 17,
"p": 2,
"intr": "intr_xuanshangrenwu_intr_10",
"img": "icon_jinbi"
"img": "icon_jinbi",
"appearNum": 3
},
"16": {
"id": 16,
@ -299,9 +314,10 @@
"n": 40000
}
],
"p": 18,
"p": 4,
"intr": "intr_xuanshangrenwu_intr_8",
"img": "icon_jinbi"
"img": "icon_jinbi",
"appearNum": 0
},
"17": {
"id": 17,
@ -318,9 +334,10 @@
"n": 50000
}
],
"p": 19,
"p": 5,
"intr": "intr_xuanshangrenwu_intr_9",
"img": "icon_jinbi"
"img": "icon_jinbi",
"appearNum": 0
},
"18": {
"id": 18,
@ -337,9 +354,10 @@
"n": 120
}
],
"p": 20,
"p": 1,
"intr": "intr_xuanshangrenwu_intr_10",
"img": "icon_jinbi"
"img": "icon_jinbi",
"appearNum": 3
},
"19": {
"id": 19,
@ -356,9 +374,10 @@
"n": 80000
}
],
"p": 21,
"p": 4,
"intr": "intr_xuanshangrenwu_intr_11",
"img": "icon_jinbi"
"img": "icon_jinbi",
"appearNum": 0
},
"20": {
"id": 20,
@ -375,9 +394,10 @@
"n": 170
}
],
"p": 22,
"p": 4,
"intr": "intr_xuanshangrenwu_intr_12",
"img": "icon_jinbi"
"img": "icon_jinbi",
"appearNum": 0
},
"21": {
"id": 21,
@ -394,9 +414,10 @@
"n": 100000
}
],
"p": 23,
"p": 3,
"intr": "intr_xuanshangrenwu_intr_11",
"img": "icon_jinbi"
"img": "icon_jinbi",
"appearNum": 0
},
"22": {
"id": 22,
@ -413,9 +434,10 @@
"n": 200
}
],
"p": 24,
"p": 2,
"intr": "intr_xuanshangrenwu_intr_12",
"img": "icon_jinbi"
"img": "icon_jinbi",
"appearNum": 0
},
"23": {
"id": 23,
@ -432,9 +454,10 @@
"n": 150
}
],
"p": 25,
"p": 1,
"intr": "intr_xuanshangrenwu_intr_13",
"img": "icon_jinbi"
"img": "icon_jinbi",
"appearNum": 3
},
"24": {
"id": 24,
@ -451,9 +474,10 @@
"n": 50000
}
],
"p": 26,
"p": 5,
"intr": "intr_xuanshangrenwu_intr_14",
"img": "icon_jinbi"
"img": "icon_jinbi",
"appearNum": 0
},
"25": {
"id": 25,
@ -470,9 +494,10 @@
"n": 60000
}
],
"p": 27,
"p": 2,
"intr": "intr_xuanshangrenwu_intr_15",
"img": "icon_jinbi"
"img": "icon_jinbi",
"appearNum": 0
},
"26": {
"id": 26,
@ -489,9 +514,10 @@
"n": 60000
}
],
"p": 28,
"p": 5,
"intr": "intr_xuanshangrenwu_intr_14",
"img": "icon_jinbi"
"img": "icon_jinbi",
"appearNum": 0
},
"27": {
"id": 27,
@ -508,9 +534,10 @@
"n": 75000
}
],
"p": 29,
"p": 5,
"intr": "intr_xuanshangrenwu_intr_15",
"img": "icon_jinbi"
"img": "icon_jinbi",
"appearNum": 0
},
"28": {
"id": 28,
@ -527,9 +554,10 @@
"n": 180
}
],
"p": 30,
"p": 1,
"intr": "intr_xuanshangrenwu_intr_16",
"img": "icon_jinbi"
"img": "icon_jinbi",
"appearNum": 3
},
"29": {
"id": 29,
@ -546,9 +574,10 @@
"n": 230
}
],
"p": 31,
"p": 2,
"intr": "intr_xuanshangrenwu_intr_17",
"img": "icon_jinbi"
"img": "icon_jinbi",
"appearNum": 0
},
"30": {
"id": 30,
@ -565,8 +594,9 @@
"n": 120000
}
],
"p": 32,
"p": 4,
"intr": "intr_xuanshangrenwu_intr_18",
"img": "icon_jinbi"
"img": "icon_jinbi",
"appearNum": 0
}
}

View File

@ -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_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<{
@ -122,7 +122,11 @@ type gc_clsl_dan = k_v<{
/** 战斗奖励 */
'fightPrize': { "a": string, "t": string, "n": number, [x: string]: any }[]
/** 机器人 */
'npc': number
'npc': number,
/** 随机机器人概率*/
'pro':number
/** 对手范围 */
'fighter':number[]
}>;
type gc_com = k_v<{

View File

@ -6,4 +6,9 @@ export type CollectionCllsCrossUser = {
area: number;
allStar: number;
info: joinFightData;
};
};
export type CollectionCllsCrossGroup = {
week: string;
groups: { [group: string]: { st: number, et: number } };
}

View File

@ -58,6 +58,10 @@ export type eventType = {
payForDiamond: {
[time: number]: number
}
xstask: {
refreshTime: number,
receiveNum: number
}
} & {
[k: `${number}jijin`]: ResOpenYuedujijin;

View File

@ -4,7 +4,7 @@ import {rankType} from '../shared/protocols/rank/PtlOpen';
import {CollectionChatLog} from './collection_chatlog';
import {CollectionActionLog} from './collection_actionLog';
import {CollectionCardlog} from './collection_cardlog';
import {CollectionCllsCrossUser} from './collection_clsl';
import {CollectionCllsCrossGroup, CollectionCllsCrossUser} from './collection_clsl';
import {CollectionCrosskv} from './collection_crosskv';
import {CollectionDayPay} from './collection_dayPay';
import {CollectionDxlt} from './collection_dxlt';
@ -115,7 +115,8 @@ export type MongodbCollections = {
any: { type: string, data: any[]; };
zhanling: CollectionZhanLing;
clslCrossUser: CollectionCllsCrossUser;
clslCrossGroup: CollectionCllsCrossGroup;
clslCrossUser: CollectionCllsCrossUser & { group: string };
lingzhulaixi: CollectionLingZhuLaiXi;
wzry_user_cross: CollectionWzryCross;
wzry_fight: CollectionWzryCrossFight;

View File

@ -709,21 +709,21 @@ export const serviceProto: ServiceProto<ServiceType> = {
"id": 13,
"type": {
"type": "Literal",
"literal": "kbzz"
"literal": "clslCross"
}
},
{
"id": 14,
"type": {
"type": "Literal",
"literal": "xszm"
"literal": "kbzz"
}
},
{
"id": 15,
"type": {
"type": "Literal",
"literal": "clslCross"
"literal": "xszm"
}
},
{

93
src/oss/watchdog.json Normal file
View File

@ -0,0 +1,93 @@
[
{
"key":"jiuba/Lottery",
"limit":300,
"tips":"酒馆抽取次数达到300次"
},
{
"key":"got_jinbi",
"limit":2000000000,
"tips":"jinbi获取达到20亿"
},
{
"key":"got_rmbmoney",
"limit":30000,
"tips":"钻石获取达到3万"
},
{
"key":"use_attr_rmbmoney",
"limit":100000,
"tips":"钻石消耗达到10万"
},
{
"key":"tanxian/FastGuaJi",
"limit":40,
"tips":"快速探险达到40次"
},
{
"key":"xstask/Receive/Num",
"limit":8,
"tips":"接取悬赏任务超过8个"
},
{
"key":"dixiaqianzhuang/Qf",
"limit":500,
"tips":"地下钱庄使用次数超过500次"
},
{
"key":"peijiancangku/Jump",
"limit":500,
"tips":"指定高级仓库超过50次"
},
{
"key":"meirishilian/Fight",
"limit":30,
"tips":"物资缴获挑战和扫荡累计超过30次"
},
{
"key":"pata/SaoDang",
"limit":5,
"tips":"黑暗塔扫荡次数超过5次"
},
{
"key":"lingzhulaixi/PkBoss",
"limit":15,
"tips":"讨伐海盗挑战次数超过15次"
},
{
"key":"gonghui/FbFight",
"limit":5,
"tips":"势力战斗boss超过5次"
},
{
"key":"shop/Buy/2",
"limit":50,
"tips":"势力商店购买超过50次"
},
{
"key":"shop/Buy/1",
"limit":20,
"tips":"杂货商店购买超过20次"
},
{
"key":"shop/Buy/10",
"limit":20,
"tips":"荣誉商店购买超过20次"
},
{
"key":"shop/Buy/4",
"limit":10,
"tips":"饰品商店购买超过10次"
},
{
"key":"shop/Buy/11",
"limit":5,
"tips":"功绩商店购买超过5次"
},
{
"key":"shop/Buy/3",
"limit":5,
"tips":"战争商店购买超过5次"
}
]

View File

@ -230,7 +230,7 @@ export class EmailFun {
})).insertedId.toHexString();
sendEmail._id = _id;
G.server.broadcastMsg('msg_s2c/Email', sendEmail);
G.server?.broadcastMsg('msg_s2c/Email', sendEmail);
return _id;
}

View File

@ -130,7 +130,7 @@ export class FightFun {
* @param result
*/
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;
G.mongodb.collection('fightLog').insertOne({uid, type, ...result})

View File

@ -13,7 +13,7 @@ import {getConf as zmlbGetConf} from '../api_s2c/event/zhoumolibao/ApiOpen';
import {Christmasfun} from "../api_s2c/event/christmas/fun";
async function checkPayIsActive(payId: string, logs: payLog[], payArgs) {
let conf: any = await this.getConf(payId, payArgs);
let conf: any = await PayFun.getConf(payId, payArgs);
if (!conf) return false;
let lastLog = logs.last();

View File

@ -18,6 +18,7 @@ import {getItemByItemId, getItemNum} from './item';
import {getGud, setGud} from './gud';
import {addGameLog} from "../gameLog";
import {PushGiftFun} from "./pushgift";
import { ActionLog } from './actionLog/actionLog';
export type call = {
@ -178,6 +179,12 @@ export class PlayerFun {
G.emit("Class_task_156", 'Class_task_156', call, -atn.n, 0);
}
}
if( (atn.t == 'rmbmoney' || atn.t == 'jinbi') && atn.n > 0 ){
//统计今日获取的金币和钻石
ActionLog.addDayLog(call.conn.uid, { key: 'got_'+atn.t, val: atn.n });
}
// 增加vip经验的任务监听
if (atn.t == "payExp" && atn.n > 0) {
G.emit("Class_task_157", 'Class_task_157', call, atn.n, 0);
@ -401,7 +408,6 @@ export class PlayerFun {
*/
static async cutEquip(call: call, _idArr: string[]) {
for (let _id of _idArr) {
G.redis.del('equip', call.uid, _id);
G.mongodb.collection('equip').deleteOne({uid: call.uid, _id: new ObjectId(_id)});
call.addEventMsg('msg_s2c/EquipChange', _id, {num: 0});
@ -472,7 +478,6 @@ export class PlayerFun {
static async cutHero(call: call, _idArr: string[]) {
for (let _id of _idArr) {
await HeroFun.delHero(call, _id);
G.redis.del('hero', call.uid, _id);
G.mongodb.collection('hero').deleteOne({uid: call.uid, _id: new ObjectId(_id)});
call.addEventMsg('msg_s2c/HeroChange', _id, {num: 0});
addGameLog(call.uid, "_cutHero", {}, {_id: _id})

View File

@ -108,8 +108,12 @@ export abstract class Rank {
return this.getType();
}
constructor() {
constructor(param?: any) {
// 将param属性赋值给this
param && Object.assign(this, param);
Rank.list[this.getType() as string] = this;
// 初始化排行榜
this.cotr();
}
@ -135,7 +139,7 @@ export abstract class Rank {
//将db里的数据写入到 rank:xxx:sort里
//写入的单条数据为: {uid:score}
// 首先清理redis中sort数据 在从数据库中初始化
await G.ioredis.del(this.getRedisKeySort);
@ -253,61 +257,57 @@ export abstract class Rank {
if (uids && uids.length > 0) {
let res = await this.db.find({ idKey: { $in: uids }, type: this.getType() }).toArray()
switch (this.getType()) {
case "slzd1":
case "slzd2":
case "slzd3":
case "slzd4":
case "slzd5":
case "slzd6":
let ghid = [];
res = res.map(item => {
if (!item.data?.player?.ghid || item.data.utime + 60 < G.time) {
ghid.push(G.mongodb.conversionId(item.idKey));
}
return item;
})
if (ghid.length > 0) {
let ghinfo = await G.mongodb.collection("gonghui").find(
{ _id: { $in: ghid } }, { projection: { name: 1 } }
).toArray();
ghinfo.forEach(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 (this.type.indexOf("slzd") != -1) {
let ghid = [];
res = res.map(item => {
if (!item.data?.player?.ghid || item.data.utime + 60 < G.time) {
ghid.push(G.mongodb.conversionId(item.idKey));
}
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 } }
return item;
})
if (ghid.length > 0) {
let ghinfo = await G.mongodb.collection("gonghui").find(
{ _id: { $in: ghid } }, { projection: { name: 1 } }
).toArray();
newUserArr.forEach(item => {
// 每次遍历查找?
let index = res.findIndex(x => x.idKey == item.uid);
res[index].data.player = item;
this.db.updateOne({ idKey: item.uid, type: this.getType() }, { $set: { "data.player": item } });
// 跟新redis score
// this.setRankData(item.uid, res[index].data as any);
ghinfo.forEach(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 } });
})
}
} else if (this.type.indexOf('clslCross') != -1) {
// 丛林猎手 跨服排行榜 不需要更新
} else {
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();
newUserArr.forEach(item => {
// 每次遍历查找?
let index = res.findIndex(x => x.idKey == item.uid);
res[index].data.player = item;
this.db.updateOne({ idKey: item.uid, type: this.getType() }, { $set: { "data.player": item } });
// 跟新redis score
// this.setRankData(item.uid, res[index].data as any);
})
}
// 按照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 []
}
@ -405,10 +405,10 @@ export abstract class Rank {
// 清空相关rank数据
async clear() {
this.queue.enqueue(async () => {
// G.redis.rawDel(this.getRedisKey)
G.redis.rawDel(this.getRedisKeySort);
await this.db.deleteMany({ type: this.type });
});
// this.queue.enqueue(async () => {
// G.redis.rawDel(this.getRedisKey)
G.redis.rawDel(this.getRedisKeySort);
this.db.deleteMany({ type: this.type });
// });
}
}

View File

@ -1,58 +1,58 @@
import { rankType } from '../../shared/protocols/rank/PtlOpen';
import { rankInfo } from '../../shared/protocols/type';
import { player } from '../../shared/protocols/user/type';
import { PublicShared } from '../../shared/public/public';
import { Rank } from './rank';
export class RankClslCross extends Rank {
countMaxNum = 99999;
group: string;
minStar = Object.values(G.gc.clsl_dan)[Object.keys(G.gc.clsl_dan).length - 1].allStar;
getType(): rankType {
return 'clslCross';
}
// 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]
// }
// };
// }
constructor(group: string = 'group0') {
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
}
async addNew(info: rankInfo) {
this.queue.enqueue(async () => {
// 积分大于配置的最小参数,更新数据
if (info.valArr[0] >= this.minStar) {
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) {
this.db.deleteOne({ type: this.type, idKey: info.player[this.findKey] });
this.delRankData(info.player[this.findKey])
}
}
});
// 积分大于配置的最小参数,更新数据
if (info.valArr[0] >= this.minStar) {
this.setRankData(info.player[this.findKey], info)
this.db.updateOne({ type: this.type, idKey: info.player[this.findKey] }, { $set: { data: info } }, { upsert: true });
}
}
}
/**
*
*/
export async function RankClslCrossInit() {
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);
})
}
}

View File

@ -13,9 +13,9 @@ export type schedulerType =
| 'hbzb_cross_reset'
| 'hbzb_zbs_ready'
| 'kbzz'
| 'clsl_cross_ctor'
| 'clsl_local_ctor'
| 'clsl_prize'
| 'clsl_cross_ctor'
| 'clsl_cross_group'
| 'wzry_autobaoming'
| 'wzry_dldstart'
| 'wzry_dldjinji'
@ -38,6 +38,7 @@ export type schedulerType =
| 'hbzb_zbs_group'
| 'wzry_zuanshi16to8'
| "cross_email_pull"
| "watch_dog"
| "xiaofeijingsai_local_ctor";
export class SchedulerManage {

View File

@ -1,12 +1,16 @@
import { EmailFun } from '../email';
import { Rank } from '../rank/rank';
import { Scheduler, schedulerType } from './scheduler';
import {PublicShared} from '../../shared/public/public';
import {EmailFun} from '../email';
import {RankClslCross} from '../rank/rank_clsl';
import {Scheduler, schedulerType} from './scheduler';
export class SchedulerClslCrossCtor extends Scheduler {
/**
*
*/
export class SchedulerClslLocalCtor extends Scheduler {
id: schedulerType = 'clsl_cross_ctor';
time = G.gc.clsl_com.divideTime;
name = '丛林猎手赛季初始化';
time = 0;
name = '丛林猎手赛季重置';
type: 'day' | 'week' = 'week';
async read() {
@ -15,30 +19,139 @@ export class SchedulerClslCrossCtor extends Scheduler {
}
async start() {
let week = PublicShared.getToWeek(
PublicShared.getToWeekMondayZeroTime(G.time - 3600)
);
G.mongodb.collection('clslCrossUser').updateMany({}, { $set: { allStar: 0 } });
Rank.list.clslCross.clear();
// 修改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();
}
}
export class SchedulerClslLocalCtor extends SchedulerClslCrossCtor {
id: schedulerType = 'clsl_local_ctor';
/**
*
* 100
*/
export class SchedulerClslCrossCtor extends Scheduler {
id: schedulerType = 'clsl_cross_group';
num: number = 2;
type: 'day' | 'week' = 'week';
time = G.gc.clsl_com.divideTime;
name = '丛林猎手赛季区间划分 周四00:00';
star = Object.values(G.gc.clsl_dan).slice(-1)[0].allStar;
async read() {
await this.ctorStartTime();
this.isReady = false;
}
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.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[] } } = {};
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();
}
}
/**
*
*/
export class SchedulerClslPrize extends Scheduler {
id: schedulerType = 'clsl_prize';
time = G.gc.clsl_com.prizeTime;
name = '丛林猎手赛季发奖';
type: 'day' | 'week' = 'week';
time = G.gc.clsl_com.prizeTime;
star = Object.values(G.gc.clsl_dan).slice(-1)[0].allStar;
async read() {
await this.ctorStartTime();
@ -46,41 +159,32 @@ export class SchedulerClslPrize extends Scheduler {
}
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];
}
});
// 段位奖励
let locals = await G.mongodb.cPlayerInfo('clsl').find({ type: 'clsl' }).toArray();
G.gc.clsl_com.danPrize.forEach((conf) => {
let sends = locals.filter(l => l.allStar >= conf.star[0]).map(s => s.uid);
// locals.remove(l => sends.includes(l.uid));
sends.forEach(uid => {
EmailFun.addEmail({
uid: uid,
type: 'system',
title: G.gc.clsl_com.email_dan.title,
content: G.gc.clsl_com.email_dan.content,
prize: conf.prize,
contentInsertArr: [conf.star]
Object.values(group2users).forEach((uids, index) => {
G.gc.clsl_com.rankPrize.forEach((conf) => {
let players = uids.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]
}, true);
});
});
})
// 排名奖励
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();
}
}

View File

@ -0,0 +1,105 @@
import {resolve} from "path";
import {PublicShared} from "../../shared/public/public";
import {Scheduler, schedulerType} from "./scheduler";
import {existsSync, readFileSync} from "fs";
import {addWatchDogLog, errorLogDB} from "../../gameLog";
export class WatchDog extends Scheduler {
id: schedulerType = "watch_dog";
time = 420; // 监控频率每x秒一次
name = "数据看门狗"
type = ""
async read() {
await this.ctorStartTime();
this.isReady = false;
this.startTime = this.nextTime;
}
async start() {
let confFile = resolve(__dirname, '../../oss/watchdog.json');
if (!existsSync(confFile)) {
//配置文件不存在
await this.ctorStartTime()
return;
}
let conf;
try {
conf = await JSON.parse(readFileSync(confFile, 'utf-8'));
} catch (e) {
//配置文件不是json
await this.ctorStartTime()
return;
}
//获取今天0点之后在线的玩家
let users = await G.mongodb.collection("user").find({
lv: {$gt: 10},
newonlinetime: {$gte: G.time - 1800, $lte: G.time + 30}
}, {
projection: {
uid: 1,
name: 1,
lv: 1,
vip: 1,
sid: 1
}
}).toArray();
if (!users.length) {
//没有符合的玩家
await this.ctorStartTime()
return;
}
let uids = users.map(i => i.uid);
let uinfo = {};
users.map(i => uinfo[i.uid] = i);
let actionLogs = await G.mongodb.collection("actionLog").find({
type: 'day',
uid: {$in: uids},
}, {
projection: {
uid: 1,
log: 1
}
}).toArray();
let warns = [];
for (let j = 0; j < conf.length; j++) {
for (let i = 0; i < actionLogs.length; i++) {
let key = conf[j].key;
let myval = actionLogs[i]?.log?.[key] || 0
let uid = actionLogs[i].uid
if (myval > conf[j].limit) {
//触发了警报
warns.push({
type: 'watchDog',
uid: uid,
name: uinfo[uid]?.name,
lv: uinfo[uid]?.lv,
vip: uinfo[uid]?.vip,
key: key,
value: myval,
tips: conf[j].tips
})
}
}
}
if (warns.length > 0) {
addWatchDogLog(warns);
}
await this.ctorStartTime()
}
get nextTime(): number {
return G.time + this.time;
}
async ctorStartTime() {
this.isStart = false;
this.startTime = this.nextTime;
}
}

View File

@ -113,7 +113,7 @@ export class SchedulerWzryDlDjinji extends SchedulerWzryAutoBaoMing {
}
let _userList = []
//0号位 -1的这一条表示晋级奖励
let prize = G.gc.wangzherongyao.wangzhe.jiangli.dld[0].p
let prize = G.gc.wangzherongyao.wangzhe.jiangli.dld[0]?.p || []
for (let index = 0; index < _zuanshiUser.length; index++) {
const element = _zuanshiUser[index];
@ -306,7 +306,7 @@ export class SchedulerWzryZuanshiSendPrize extends SchedulerWzryAutoBaoMing {
_u.push(element.uid)
if (element.data.player.uid.indexOf('npc_') != -1) continue
if (element?.isprize?.[this.typeprzie]) continue
let prize = _prizeCon[this.idx[element.deep]].p
let prize = _prizeCon[this.idx[element.deep]]?.p || [];
//注意这里的调用addEmail时cross参数用的是true
//因为这个定时器是在跨服上执行的,邮件先临时放到跨服

View File

@ -1,16 +1,31 @@
import {ApiCall} from 'tsrpc';
import {ResOpen} from '../shared/protocols/tanxian/PtlOpen';
import {TeQuanFun} from './tequan';
import {addGameLog} from "../gameLog";
type dataChange = Partial<ResOpen>;
export class TanXianFun {
/**修改探险数据 */
/**
*
*
* changeDataNew和此方法一样
*/
static async changeData(call: ApiCall, change: dataChange) {
G.mongodb.collection('tanxian').updateOne({uid: call.uid}, {$set: {...change}});
let data = await this.getData(call);
Object.assign(data, change);
G.ioredis.setex(`tanxian:${call.uid}`, 600, JSON.stringify(data));
let {_id, uid, ...data} = (await G.mongodb.collection('tanxian').findOneAndUpdate({uid: call.uid}, {$set: {...change}}, {returnDocument: 'after'})).value;
G.ioredis.setex(`tanxian:${uid}`, 600, JSON.stringify(data));
}
/**
*
* inc去叠加用户限制的次数
* @param call
* @param change
*/
static async changeDataNew(call: ApiCall, change) {
let {_id, uid, ...data} = (await G.mongodb.collection('tanxian').findOneAndUpdate({uid: call.uid}, change, {returnDocument: 'after'})).value;
G.ioredis.setex(`tanxian:${uid}`, 600, JSON.stringify(data));
addGameLog(call.uid, "_fastguajiChange", {}, data)
}
/**获取探险数据 */

View File

@ -40,7 +40,7 @@ export class WangZheRongYaofun {
/**获取报名人数 */
static async getBaoMingNum() {
let zkey: string = PublicShared.getToWeek();
let _num = G.mongodb.collection('playerInfo', 'wzry').countDocuments({ isbm: 1 });
let _num = G.mongodb.collection('playerInfo', 'wzry').countDocuments({ type:'wzry', isbm: 1 });
return _num;
}

View File

@ -1,25 +1,31 @@
import { OptionalId, UpdateFilter } from 'mongodb';
import { ApiCall } from 'tsrpc';
import { playerInfoType } from '../module/collection_palyerInfo';
import { CollectionXstask } from '../module/collection_xstask';
import { PublicShared } from '../shared/public/public';
import {OptionalId, UpdateFilter} from 'mongodb';
import {ApiCall} from 'tsrpc';
import {playerInfoType} from '../module/collection_palyerInfo';
import {CollectionXstask} from '../module/collection_xstask';
import {PublicShared} from '../shared/public/public';
import {ActionLog} from "./actionLog/actionLog";
export class XstaskFun {
/**所有玩家的悬赏任务缓存 */
static uidTask: k_v<CollectionXstask[]> = {};
/**获取单个悬赏任务 */
static async getTask(uid: string, _id: string) {
return this.uidTask[uid]?.find(task => task._id == _id) || await G.mongodb.collection('xstask').findOne({ uid: uid, _id: G.mongodb.conversionId(_id) });
return this.uidTask[uid]?.find(task => task._id == _id) || await G.mongodb.collection('xstask').findOne({
uid: uid,
_id: G.mongodb.conversionId(_id)
});
}
/**获取所有悬赏任务 */
static async getAllTask(uid: string) {
let taskList = this.uidTask[uid];
if (!taskList) {
taskList = this.uidTask[uid] = (await G.mongodb.collection('xstask').find({ uid: uid }).toArray()).map(task => G.mongodb.conversionIdObj(task));
};
taskList = this.uidTask[uid] = (await G.mongodb.collection('xstask').find({uid: uid}).toArray()).map(task => G.mongodb.conversionIdObj(task));
}
;
return taskList;
}
@ -27,16 +33,22 @@ export class XstaskFun {
/**完成任务标记 */
static async finishTask(uid: string, _id: string) {
// 修改数据库
G.mongodb.collection('xstask').updateOne({ uid: uid, _id: G.mongodb.conversionId(_id) }, { $set: { 'receiveData.rec': true } });
G.mongodb.collection('xstask').updateOne({
uid: uid,
_id: G.mongodb.conversionId(_id)
}, {$set: {'receiveData.rec': true}});
// 修改缓存
let index = this.uidTask[uid]?.findIndex(task => task._id == _id);
this.uidTask[uid][index].receiveData.rec = true
return
return
}
/**更新任务单个 */
static async updateTask(uid: string, _id: string, taskId: string) {
G.mongodb.collection('xstask').updateOne({ uid: uid, _id: G.mongodb.conversionId(_id) }, { $unset: { receiveData: 1 }, $set: {taskId: taskId} });
G.mongodb.collection('xstask').updateOne({
uid: uid,
_id: G.mongodb.conversionId(_id)
}, {$unset: {receiveData: 1}, $set: {taskId: taskId}});
let index = this.uidTask[uid]?.findIndex(task => task._id == _id);
delete this.uidTask[uid][index].receiveData;
this.uidTask[uid][index].taskId = taskId;
@ -48,13 +60,15 @@ export class XstaskFun {
let task = this.uidTask[uid]?.find(task => task._id == _id);
task && this.uidTask[uid].removeOne(task);
G.mongodb.collection('xstask').deleteOne({ uid: uid, _id: G.mongodb.conversionId(_id) });
G.mongodb.collection('xstask').deleteOne({uid: uid, _id: G.mongodb.conversionId(_id)});
}
/**删除多个悬赏任务 */
static async delTasks(uid: string, _id: string[]) {
for (let id of _id) await this.delTask(uid, id);
}
/**添加多个悬赏任务 */
static async addTasks(uid: string, taskArr: { taskId: string; }[]) {
@ -76,12 +90,17 @@ export class XstaskFun {
return this.uidTask[uid];
}
/**派遣任务任务 */
static async receiveTask(uid: string, _id: string, d: CollectionXstask['receiveData']) {
let cache = this.uidTask[uid]?.find(task => task._id == _id);
if (cache) cache.receiveData = d;
G.mongodb.collection('xstask').updateOne({ uid: uid, _id: G.mongodb.conversionId(_id) }, { $set: { receiveData: d } });
G.mongodb.collection('xstask').updateOne({
uid: uid,
_id: G.mongodb.conversionId(_id)
}, {$set: {receiveData: d}});
}
/**获取所有已被派遣的英雄 */
static async getAllReceiveHero(uid: string) {
let heroIds: string[] = [];
@ -91,19 +110,22 @@ export class XstaskFun {
return heroIds;
}
/**获取悬赏任务记录信息 */
static async getInfo(uid: string) {
return await G.mongodb.collection('playerInfo', 'xstask').findOne({ uid: uid, type: 'xstask' });
return await G.mongodb.collection('playerInfo', 'xstask').findOne({uid: uid, type: 'xstask'});
}
/**修改悬赏任务记录信息 */
static async changeInfo(uid: string, change: Pick<UpdateFilter<OptionalId<playerInfoType['xstask']>>, '$inc' | '$set'>) {
G.mongodb.collection('playerInfo', 'xstask').updateOne(
{ uid: uid, type: 'xstask' },
{uid: uid, type: 'xstask'},
change,
{ upsert: true }
{upsert: true}
);
}
/**随机任务 */
static randomTasks(lv: number, num: number) {
let tasks = Object.values(G.gc.xstask).filter(task => G.gc.xstaskcom.lv[lv].taskColor.includes(task.colour)).sort(function () {
@ -136,4 +158,19 @@ export class XstaskFun {
}
return _res;
}
/**
* 8
*/
static async receiveNum(uid: string, refresh = false) {
if (refresh) {
G.mongodb.cEvent('xstask').updateOne({uid: uid, type: 'xstask'},
{$set: {refreshTime: G.time, receiveNum: 0}}, {upsert: true});
} else {
ActionLog.addDayLog(uid, { key: "xstask/Receive/Num", val: 1 });
G.mongodb.cEvent('xstask').updateOne({uid: uid, type: 'xstask'},
{$inc: {receiveNum: 1}}, {upsert: true});
}
}
}

View File

@ -406,7 +406,15 @@ const crossIndexs: Partial<{ [k in keyof MongodbCollections]: IndexDescription[]
],
clslCrossUser: [
{
key: {uid: 1}, unique: true
key: { uid: 1 },
},
{
key: { ttltime: 1 }, expireAfterSeconds: 7 * 24 * 3600
}
],
clslCrossGroup: [
{
key: { week: 1 },
}
],
rankList: [

View File

@ -2,7 +2,7 @@ import { GanHaiRed } from './api_s2c/ganhai/ApiOpen';
import { FriendManage } from './public/friend/manage';
import { GHManage } from './public/gonghui/manage';
import { JJCFun } from './public/jjc';
import { RankClslCross } from './public/rank/rank_clsl';
import { RankClslCross, RankClslCrossInit } from './public/rank/rank_clsl';
//import { RankHbzbJfsCross, RankHbzbJfsLocal, RankHbzbZbsCross } from './public/rank/rank_hbzb_jfs';
import { RankKbzz } from './public/rank/rank_kbzz';
import { RankPower } from './public/rank/rank_power';
@ -29,6 +29,7 @@ import { SchedulerManage } from './public/scheduler/scheduler';
import {CrossEmailPull} from "./public/scheduler/scheduler_cross_email_pull";
import {Scheduler_xfjs_Local_Ctor} from "./public/scheduler/scheduler_xiaofeijingsai";
import { RankKfjs_1, RankKfjs_2, RankKfjs_3, RankKfjs_4, RankKfjs_5, RankKfjs_6, RankKfjs_7 } from './public/rank/rank_kfjs';
import { WatchDog } from './public/scheduler/scheduler_watchdog';
export async function startAfter() {
//事件监听和定时器初始化
@ -93,6 +94,7 @@ export async function startAfter() {
// new SchedulerWzrycrossEmail();
new CrossEmailPull().init()
new WatchDog().init();
});
new SchedulerNewDayLocalCtor().init();
@ -104,18 +106,19 @@ export async function startAfter() {
});
} else if (G.argv.serverType == 'cross') {
RankKbzz.init();
new RankClslCross();
// new RankHbzbJfsCross().loadAllPlayer();
// new RankHbzbZbsCross();
RankClslCrossInit();
new RankWzryCross();
new SchedulerKbzzGroup().init();
new Scheduler_hbzb_zbs_cross_clear().init();
//new Scheduler_hbzb_corss_reset();
new Scheduler_hbzb_zbs_cross_group().init();
new SchedulerClslPrize().init();
new SchedulerClslCrossCtor().init();
new SchedulerClslLocalCtor ().init();
new Scheduler_hbzb_zbs_cross_clear().init();
new Scheduler_hbzb_zbs_cross_group().init();
new SchedulerWzryDlDstart().init();
new SchedulerWzryDlDjinji().init();
new SchedulerWzryZuanshiOne().init();

View File

@ -13,6 +13,7 @@ import {player} from './shared/protocols/user/type';
import {unQueueByConn} from './api_s2c/user/ApiLogin';
import {clusterPublish, setUidProcessId} from './clusterUtils';
import {clearGud, getGud} from './public/gud';
import {mylogger} from './gameLog';
export async function createWs() {
@ -25,7 +26,8 @@ export async function createWs() {
json: true,
//API超时时间5分钟为登陆排队做准备
apiTimeout: 300000,
logLevel: G.argv.logModel as LogLevel
logLevel: G.argv.logModel as LogLevel,
logger: mylogger
});
setCrossWs(G.serverCross);
await G.serverCross.autoImplementApi(resolve(__dirname, 'api_cross'), true);
@ -37,6 +39,7 @@ export async function createWs() {
wss: getWssFile(),
//API超时时间5分钟为登陆排队做准备只针对游服
apiTimeout: 300000,
logger: mylogger
});
setWs(G.server);
await G.server.autoImplementApi(resolve(__dirname, 'api_s2c'), true);
@ -136,14 +139,14 @@ function setWs(server: WsServer<ServiceType>) {
//处理API锁极限情况下只锁10s防止死锁
//在下方postApiReturnFlow里会解锁
if (call.conn.apiLock[call.service.name] && new Date().getTime() - call.conn.apiLock[call.service.name] < 10000) {
call.error('', {code: -100, message: '', time: 0});
if (call.conn.apiLock[call.service.name] && call.conn.apiLock[call.service.name] > new Date().getTime()) {
call.error('', {code: -100, message: '', apilock: 1});
return null;
}
//API锁定
//API锁定到什么时候
if (!writeList.includes(call.service.name)) {
call.conn.apiLock[call.service.name] = new Date().getTime();
call.conn.apiLock[call.service.name] = new Date().getTime() + 10000;
}
//API耗时统计
call.conn.requstApiTime[call.service.name] = new Date().getTime();
@ -193,7 +196,17 @@ function setWs(server: WsServer<ServiceType>) {
}
//API解锁
delete node.call.conn.apiLock[node.call.service.name];
let now = new Date().getTime();
if (node.return.isSucc) {
if (!writeList.includes(node.call.service.name)){
node.call.conn.apiLock[node.call.service.name] = now + 200;
}
} else {
if (!node.return.err.apilock) {
delete node.call.conn.apiLock[node.call.service.name];
}
}
return node;
});

View File

@ -17,4 +17,10 @@ export type ResOpen = {
fightWinNum: number;
/**已领取的胜场奖励 */
recWinPrize: number[];
/**本期最高段位*/
curMaxStar: number;
/**段位奖励发放记录*/
danPrize: number[];
week?:number; // 返回给客户端用
};

View File

@ -13,9 +13,8 @@ export type ResOpen = {
};
export type rankType = 'jjc' | 'tanxian' | 'zhanli' | 'qjzzd' | 'hbzbLocal' | 'hbzbCross' | 'hbzbZbsCross'
| 'slzd1' | 'slzd2' | 'slzd3' | 'slzd4' | 'slzd5' | 'slzd6'
| 'kbzz' | 'xszm' | 'clslCross'
| 'zccg' | 'gbzl' | 'tujian' | 'wzryCross';
| 'slzd1' | 'slzd2' | 'slzd3' | 'slzd4' | 'slzd5' | 'slzd6' | "clslCross"
| 'kbzz' | 'xszm' | 'zccg' | 'gbzl' | 'tujian' | 'wzryCross';
export type rankTypeObj = {
type?: rankType[],

View File

@ -7253,6 +7253,31 @@ export const serviceProto: ServiceProto<ServiceType> = {
"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
}
]
},
@ -20080,21 +20105,21 @@ export const serviceProto: ServiceProto<ServiceType> = {
"id": 13,
"type": {
"type": "Literal",
"literal": "kbzz"
"literal": "clslCross"
}
},
{
"id": 14,
"type": {
"type": "Literal",
"literal": "xszm"
"literal": "kbzz"
}
},
{
"id": 15,
"type": {
"type": "Literal",
"literal": "clslCross"
"literal": "xszm"
}
},
{