Compare commits
7 Commits
Author | SHA1 | Date | |
---|---|---|---|
c3f94cc304 | |||
![]() |
149de2b908 | ||
![]() |
5d3508aa40 | ||
![]() |
0f3ad155ac | ||
![]() |
1ec21d71e0 | ||
![]() |
ce3fd79126 | ||
![]() |
ffd8d50463 |
@ -17,7 +17,7 @@ export default async function (call: ApiCall<ReqGetUser, ResGetUser>) {
|
||||
arr.map(i=>{
|
||||
res[i.uid] = {
|
||||
data: i.data,
|
||||
jifen:i?.jifen||0,
|
||||
jifen:i.jifen,
|
||||
};
|
||||
});
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
import { ApiCall } from "tsrpc";
|
||||
import { HeroFun } from '../public/hero';
|
||||
import { PlayerFun } from '../public/player';
|
||||
import { defaultUserAppend, UserFun } from '../public/user';
|
||||
import { ReqBingo, ResBingo } from "../shared/protocols/PtlBingo";
|
||||
import { ReqEmail } from "../monopoly/protocols/PtlEmail";
|
||||
import { EmailFun } from "../public/email";
|
||||
import {ApiCall} from "tsrpc";
|
||||
import {HeroFun} from '../public/hero';
|
||||
import {PlayerFun} from '../public/player';
|
||||
import {defaultUserAppend, UserFun} from '../public/user';
|
||||
import {ReqBingo, ResBingo} from "../shared/protocols/PtlBingo";
|
||||
import {ReqEmail} from "../monopoly/protocols/PtlEmail";
|
||||
import {EmailFun} from "../public/email";
|
||||
|
||||
export default async function (call: ApiCall<ReqBingo, ResBingo>) {
|
||||
// TODO
|
||||
@ -72,37 +72,37 @@ export default async function (call: ApiCall<ReqBingo, ResBingo>) {
|
||||
|
||||
if (!G.gc.item[shell[1]]) return call.error(`道具id不存在:${shell[1]}`);
|
||||
if (isNaN(parseInt(shell[2]))) return call.error(`请输入正确的数量`);
|
||||
await PlayerFun.addItem(call, [{ a: 'item', t: shell[1], n: parseInt(shell[2]) }]);
|
||||
await PlayerFun.addItem(call, [{a: 'item', t: shell[1], n: parseInt(shell[2])}]);
|
||||
|
||||
} else if (shell[0] == 'hero') {
|
||||
|
||||
if (!G.gc.hero[shell[1]]) return call.error(`英雄id不存在:${shell[1]}`);
|
||||
if (isNaN(parseInt(shell[2]))) return call.error(`请输入正确的数量`);
|
||||
await PlayerFun.addHero(call, [{ a: 'item', t: shell[1], n: parseInt(shell[2]) }]);
|
||||
await PlayerFun.addHero(call, [{a: 'item', t: shell[1], n: parseInt(shell[2])}]);
|
||||
|
||||
} else if (shell[0] == 'equip') {
|
||||
|
||||
if (!G.gc.equip[shell[1]]) return call.error(`装备id不存在:${shell[1]}`);
|
||||
if (isNaN(parseInt(shell[2]))) return call.error(`请输入正确的数量`);
|
||||
await PlayerFun.addEquip(call, [{ a: 'equip', t: shell[1], n: parseInt(shell[2]) }]);
|
||||
await PlayerFun.addEquip(call, [{a: 'equip', t: shell[1], n: parseInt(shell[2])}]);
|
||||
|
||||
} else if (shell[0] == 'shiwu') {
|
||||
|
||||
if (!G.gc.shiwu[shell[1]]) return call.error(`饰物id不存在:${shell[1]}`);
|
||||
if (isNaN(parseInt(shell[2]))) return call.error(`请输入正确的数量`);
|
||||
if (isNaN(parseInt(shell[3]))) return call.error(`请输入正确的品质`);
|
||||
await PlayerFun.addShiwu(call, [{ a: 'shiwu', t: shell[1], n: parseInt(shell[2]), colour: parseInt(shell[3]) }]);
|
||||
await PlayerFun.addShiwu(call, [{a: 'shiwu', t: shell[1], n: parseInt(shell[2]), colour: parseInt(shell[3])}]);
|
||||
|
||||
} else if (shell[0] == 'peijian') {
|
||||
|
||||
if (!G.gc.peijian[shell[1]]) return call.error(`配件id不存在:${shell[1]}`);
|
||||
if (isNaN(parseInt(shell[2]))) return call.error(`请输入正确的数量`);
|
||||
await PlayerFun.addPeijian(call, [{ a: 'peijian', t: shell[1], n: parseInt(shell[2]) }]);
|
||||
await PlayerFun.addPeijian(call, [{a: 'peijian', t: shell[1], n: parseInt(shell[2])}]);
|
||||
|
||||
} else if (shell[0] == 'attr') {
|
||||
if (G.gc.attr[shell[1]] == undefined) return call.error(`道具id不存在:${shell[1]}`);
|
||||
if (isNaN(parseInt(shell[2]))) return call.error(`请输入正确的数量`);
|
||||
await PlayerFun.addAttr(call, [{ a: 'attr', t: shell[1], n: parseInt(shell[2]) }]);
|
||||
await PlayerFun.addAttr(call, [{a: 'attr', t: shell[1], n: parseInt(shell[2])}]);
|
||||
|
||||
} else if (shell.length == 2) {
|
||||
|
||||
@ -141,9 +141,6 @@ export default async function (call: ApiCall<ReqBingo, ResBingo>) {
|
||||
}
|
||||
if (shell[3]) emailMsg.prize = JSON.parse(shell[3])
|
||||
EmailFun.addEmail(emailMsg);
|
||||
} else if (shell[0] == "heroskin") {
|
||||
await PlayerFun.sendPrize(call, [{ a: "heroskin", "t": shell[1], n: 1 }]);
|
||||
}
|
||||
|
||||
call.succ('succ');
|
||||
}
|
@ -12,38 +12,11 @@ export default async function (call: ApiCall<ReqOpen, ResOpen>) {
|
||||
// 无此活动
|
||||
return call.error('', { code: -1, message: globalThis.lng.huodong_open_1 })
|
||||
}
|
||||
|
||||
let db = await G.mongodb.cEvent(`chuanshuozhilu${call.req.hdid}`).findOne({ uid: call.uid, type: `chuanshuozhilu${call.req.hdid}` });
|
||||
let _info = db?.info || {}
|
||||
// 如果初始没有数据,就判断玩家是否有活动对应的影响,生成一下初始化数据
|
||||
if (!db) {
|
||||
|
||||
let _dbType: `chuanshuozhilu${number}` = `chuanshuozhilu${call.req.hdid}`
|
||||
const hid = _hdinfo.data.hid
|
||||
let heros = await G.mongodb.collection("hero").find({uid: call.uid, heroId: hid})
|
||||
.sort({ "zhanli": -1 }).limit(1).toArray();
|
||||
|
||||
if (heros) {
|
||||
let hero = heros[0]
|
||||
const lv = hero.lv || 0
|
||||
const jieji = hero.jieji || 0
|
||||
let setInfo = {"lv": lv, "jieji": jieji}
|
||||
await G.mongodb.cEvent(_dbType).updateOne(
|
||||
{ uid: call.uid, type: _dbType },
|
||||
{ $set: G.mongodb.createTreeObj({ key: `info.${hid}`, val: setInfo})},
|
||||
{ upsert: true}
|
||||
)
|
||||
if (!cache[call.uid]) cache[call.uid] = {hid:{}};
|
||||
if (!cache[call.uid][hid]) cache[call.uid][hid] = setInfo;
|
||||
_info[hid] = setInfo
|
||||
|
||||
G.server.sendMsgByUid(call.uid, 'msg_s2c/HongDianChange', ['huodonghd']);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
call.succ({
|
||||
info: _info,
|
||||
info: db?.info || {},
|
||||
hdinfo: _hdinfo
|
||||
});
|
||||
}
|
||||
|
@ -1,42 +0,0 @@
|
||||
import HQJGFun from "./fun";
|
||||
import { ApiCall } from "tsrpc";
|
||||
import { PlayerFun } from "../../../public/player";
|
||||
import { ReqDuiHuan, ResDuiHuan } from "../../../shared/protocols/event/huangqijiuguan/PtlDuiHuan";
|
||||
|
||||
|
||||
|
||||
export default async function (call: ApiCall<ReqDuiHuan, ResDuiHuan>) {
|
||||
let hd = await HQJGFun.HdInfo(call, call.req.hdid);
|
||||
if (!hd || Object.keys(hd).length <= 0) {
|
||||
// 无此活动
|
||||
return call.error('', { code: -1, message: globalThis.lng.huodong_open_1 })
|
||||
}
|
||||
|
||||
let need = [];
|
||||
let prize = [];
|
||||
let mydata = await HQJGFun.getMydata(call, hd);
|
||||
for (let id in call.req.dh) {
|
||||
let con = hd.data.duihuan.filter(x => x.id == Number(id))[0];
|
||||
|
||||
if ((mydata.duihuan[id] || 0) + call.req.dh[id] > con.buyNum) {
|
||||
return call.error("", { code: -2, message: globalThis.lng.hqjgtips_28 })
|
||||
}
|
||||
|
||||
for (let i = 0; i < call.req.dh[id]; i++) {
|
||||
need.push(...con.need);
|
||||
prize.push(...con.prize);
|
||||
}
|
||||
|
||||
mydata.duihuan[id] = (mydata.duihuan[id] || 0) + call.req.dh[id];
|
||||
}
|
||||
|
||||
// 检查消耗
|
||||
await PlayerFun.checkNeedIsMeet(call, need);
|
||||
await PlayerFun.cutNeed(call, need);
|
||||
// 发送奖励
|
||||
await PlayerFun.sendPrize(call, prize);
|
||||
// 记录兑换次数
|
||||
await HQJGFun.setMyData(call.uid, hd.hdid, { duihuan: mydata.duihuan });
|
||||
|
||||
call.succ({ prize: prize, data: mydata })
|
||||
}
|
@ -1,42 +0,0 @@
|
||||
import { ApiCall } from "tsrpc";
|
||||
import { ReqFight, ResFight } from "../../../shared/protocols/event/huangqijiuguan/PtlFight";
|
||||
import { HuoDongFun } from "../../../public/huodongfun";
|
||||
import HQJGFun from "./fun";
|
||||
import { fightResult } from "../../../shared/fightControl/fightType";
|
||||
import { FightFun } from "../../../public/fight";
|
||||
|
||||
export default async function (call: ApiCall<ReqFight, ResFight>) {
|
||||
let hd = await HQJGFun.HdInfo(call, call.req.hdid);
|
||||
|
||||
if (!hd) {
|
||||
// 无此活动
|
||||
return call.error('', { code: -1, message: globalThis.lng.huodong_open_1 })
|
||||
}
|
||||
|
||||
// 个人活动信息
|
||||
let mydata = await HQJGFun.getMydata(call, hd);
|
||||
|
||||
// 开始战斗
|
||||
let result: fightResult = await FightFun.fightNpc(call, hd.data.boss.npcId, 'hqjg');
|
||||
|
||||
let up = false;
|
||||
let today = HQJGFun.today(hd);
|
||||
// 历史最大伤害
|
||||
if (result.totalDamage[0] > mydata.bossres.maxdps) {
|
||||
up = true;
|
||||
mydata.bossres.maxdps = result.totalDamage[0];
|
||||
}
|
||||
|
||||
// 今日最大伤害
|
||||
if (result.totalDamage[0] > (mydata.bossres.todaydps[today] || 0)) {
|
||||
up = true;
|
||||
mydata.bossres.todaydps[today] = result.totalDamage[0];
|
||||
}
|
||||
|
||||
// 更新伤害数据
|
||||
up && await HQJGFun.setMyData(call.uid, call.req.hdid, { bossres: mydata.bossres });
|
||||
|
||||
call.succ({ data: mydata, result: result });
|
||||
|
||||
G.server.sendMsgByUid(call.uid, "msg_s2c/HongDianChange", ["huodonghd"])
|
||||
}
|
@ -1,45 +0,0 @@
|
||||
import { ApiCall } from "tsrpc";
|
||||
import { ReqGiftRec, ResGiftRec } from "../../../shared/protocols/event/huangqijiuguan/PtlGiftRec";
|
||||
import HQJGFun from "./fun";
|
||||
import { PlayerFun } from "../../../public/player";
|
||||
|
||||
export default async function (call: ApiCall<ReqGiftRec, ResGiftRec>) {
|
||||
let hd = await HQJGFun.HdInfo(call, call.req.hdid);
|
||||
if (!hd || Object.keys(hd).length <= 0) {
|
||||
// 无此活动
|
||||
return call.error('', { code: -1, message: globalThis.lng.huodong_open_1 })
|
||||
}
|
||||
|
||||
let gift = hd.data.gift.filter(i => i.id == call.req.giftid)[0];
|
||||
if (!gift || !gift.free) {
|
||||
return call.error('', { code: -1, message: globalThis.lng.huodong_open_1 })
|
||||
}
|
||||
|
||||
let mydata = await HQJGFun.getMydata(call, hd);
|
||||
if ((mydata.giftbuy[call.req.giftid] || { num: 0 }).num + 1 > gift.buynum) {
|
||||
return call.error("", { code: -2, message: globalThis.lng.hqjgtips_28 })
|
||||
}
|
||||
|
||||
let prize: atn[] = [].concat(gift.prize);
|
||||
if (!mydata.giftbuy[call.req.giftid]) {
|
||||
mydata.giftbuy[call.req.giftid] = { num: 0, select: [] };
|
||||
}
|
||||
|
||||
if (gift.dlz) {
|
||||
for (let i = 0; i < gift.dlz.length; i++) {
|
||||
if (!mydata.giftbuy[call.req.giftid].select[i]) {
|
||||
let ids = Object.keys(gift.dlz[i])
|
||||
prize.push(gift.dlz[i][ids[0]]);
|
||||
mydata.giftbuy[call.req.giftid].select[i] = Number(ids[0]);
|
||||
} else {
|
||||
prize.push(gift.dlz[i][mydata.giftbuy[call.req.giftid].select[i]]);
|
||||
}
|
||||
}
|
||||
}
|
||||
mydata.giftbuy[call.req.giftid].num++;
|
||||
await HQJGFun.setMyData(call.uid, call.req.hdid, { giftbuy: mydata.giftbuy });
|
||||
|
||||
await PlayerFun.sendPrize(call, prize);
|
||||
call.succ({ data: mydata, prize: prize })
|
||||
G.server.sendMsgByUid(call.uid, "msg_s2c/HongDianChange", ["huodonghd"])
|
||||
}
|
@ -1,35 +0,0 @@
|
||||
import { ApiCall } from "tsrpc";
|
||||
import { ReqGiftSelect, ResGiftSelect } from "../../../shared/protocols/event/huangqijiuguan/PtlGiftSelect";
|
||||
import HQJGFun from "./fun";
|
||||
|
||||
export default async function (call: ApiCall<ReqGiftSelect, ResGiftSelect>) {
|
||||
let hd = await HQJGFun.HdInfo(call, call.req.hdid);
|
||||
if (!hd || Object.keys(hd).length <= 0) {
|
||||
// 无此活动
|
||||
return call.error('', { code: -1, message: globalThis.lng.huodong_open_1 })
|
||||
}
|
||||
|
||||
let gift = hd.data.gift.filter(i => i.id == call.req.giftid)[0];
|
||||
if (!gift || !gift.dlz) {
|
||||
return call.error('', { code: -1, message: globalThis.lng.huodong_open_1 })
|
||||
}
|
||||
|
||||
for (let i = 0; i < call.req.seletc.length; i++) {
|
||||
if (!gift.dlz[i] || !gift.dlz[i][call.req.seletc[i]]) {
|
||||
return call.error('', { code: -1, message: globalThis.lng.huodong_open_1 })
|
||||
}
|
||||
}
|
||||
|
||||
let mydata = await HQJGFun.getMydata(call, hd);
|
||||
if (!mydata.giftbuy[call.req.giftid]) {
|
||||
mydata.giftbuy[call.req.giftid] = {
|
||||
num: 0, select: call.req.seletc
|
||||
}
|
||||
} else {
|
||||
mydata.giftbuy[call.req.giftid].select = call.req.seletc;
|
||||
}
|
||||
|
||||
await HQJGFun.setMyData(call.uid, call.req.hdid, { giftbuy: mydata.giftbuy });
|
||||
|
||||
call.succ({ data: mydata });
|
||||
}
|
@ -1,15 +0,0 @@
|
||||
import HQJGFun from "./fun";
|
||||
import { ApiCall } from "tsrpc";
|
||||
import { ReqOpen, ResOpen } from "../../../shared/protocols/event/huangqijiuguan/PtlOpen";
|
||||
|
||||
export default async (call: ApiCall<ReqOpen, ResOpen>) => {
|
||||
let hd = await HQJGFun.HdInfo(call, call.req.hdid);
|
||||
if (!hd || Object.keys(hd).length <= 0) {
|
||||
// 无此活动
|
||||
return call.error('', { code: -1, message: globalThis.lng.huodong_open_1 })
|
||||
}
|
||||
|
||||
let mydata = await HQJGFun.getMydata(call, hd);
|
||||
|
||||
call.succ({ data: mydata })
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
import { ApiCall } from "tsrpc";
|
||||
import { ReqRankList, ResRankList } from "../../../shared/protocols/event/huangqijiuguan/PtlRankList";
|
||||
import HQJGFun from "./fun";
|
||||
|
||||
export default async function (call: ApiCall<ReqRankList, ResRankList>) {
|
||||
HQJGFun.getRankList(call.req.hdid).then(data => call.succ({ rankList: data }));
|
||||
}
|
@ -1,48 +0,0 @@
|
||||
import { ApiCall } from "tsrpc";
|
||||
import HQJGFun, { Data } from "./fun";
|
||||
import { ReqRecDpsPrize, ResRecDpsPrize } from "../../../shared/protocols/event/huangqijiuguan/PtlRecDpsPrize";
|
||||
import { PlayerFun } from "../../../public/player";
|
||||
|
||||
export default async function (call: ApiCall<ReqRecDpsPrize, ResRecDpsPrize>) {
|
||||
let hd = await HQJGFun.HdInfo(call, call.req.hdid);
|
||||
|
||||
if (!hd) {
|
||||
// 无此活动
|
||||
return call.error('', { code: -1, message: globalThis.lng.huodong_open_1 })
|
||||
}
|
||||
|
||||
let data = hd.data as Data
|
||||
|
||||
// 个人活动信息
|
||||
let mydata = await HQJGFun.getMydata(call, hd);
|
||||
|
||||
// 领取伤害奖励
|
||||
let prize = [];
|
||||
for (let rec of call.req.recid) {
|
||||
let con = data.bossTask.filter(x => x.id == rec)[0];
|
||||
|
||||
if (mydata.bossres.recdpstask.includes(con.id)) {
|
||||
continue
|
||||
}
|
||||
|
||||
if (con.need > (mydata.bossres.maxdps || 0)) {
|
||||
continue
|
||||
}
|
||||
|
||||
mydata.bossres.recdpstask.push(con.id);
|
||||
prize = prize.concat(con.prize);
|
||||
}
|
||||
|
||||
if (prize.length <= 0) {
|
||||
call.error("", { code: -2, message: lng.hqjgtips_27 });
|
||||
} else {
|
||||
// 发送奖励
|
||||
await PlayerFun.sendPrize(call, prize);
|
||||
// 设置领奖记录
|
||||
await HQJGFun.setMyData(call.uid, call.req.hdid, { bossres: mydata.bossres });
|
||||
}
|
||||
|
||||
call.succ({ data: mydata, prize: prize })
|
||||
|
||||
G.server.sendMsgByUid(call.uid, "msg_s2c/HongDianChange", ["huodonghd"])
|
||||
}
|
@ -1,54 +0,0 @@
|
||||
import HQJGFun from "./fun";
|
||||
import { ApiCall } from "tsrpc";
|
||||
import { ReqTaskRec, ResTaskRec } from "../../../shared/protocols/event/huangqijiuguan/PtlTaskRec";
|
||||
import { PlayerFun } from "../../../public/player";
|
||||
|
||||
export default async function (call: ApiCall<ReqTaskRec, ResTaskRec>) {
|
||||
let hd = await HQJGFun.HdInfo(call, call.req.hdid);
|
||||
if (!hd || Object.keys(hd).length <= 0) {
|
||||
// 无此活动
|
||||
return call.error('', { code: -1, message: globalThis.lng.huodong_open_1 })
|
||||
}
|
||||
|
||||
let today = HQJGFun.today(hd);
|
||||
if (today < call.req.day) {
|
||||
// 未到领取时间
|
||||
return call.error('', { code: -1, message: globalThis.lng.hqjgtips_29 })
|
||||
}
|
||||
|
||||
let prize = [];
|
||||
let taskday = `day${call.req.day}`
|
||||
let mydata = await HQJGFun.getMydata(call, hd);
|
||||
|
||||
for (let id of call.req.taskid) {
|
||||
let con = hd.data.task[taskday][id];
|
||||
|
||||
if (!con) {
|
||||
continue
|
||||
}
|
||||
|
||||
if (mydata.task.rec[taskday] && mydata.task.rec[taskday].includes(id)) {
|
||||
continue
|
||||
}
|
||||
|
||||
if (!mydata.task.val[taskday] || (mydata.task.val[taskday][id] || 0) < con.pval) {
|
||||
continue
|
||||
}
|
||||
|
||||
prize = prize.concat(con.prize);
|
||||
mydata.task.rec[taskday] = (mydata.task.rec[taskday] || []).concat(id);
|
||||
}
|
||||
|
||||
if (prize.length <= 0) {
|
||||
return call.error('', { code: -3, message: lng.hqjgtips_28 });
|
||||
}
|
||||
|
||||
// 发送奖励
|
||||
await PlayerFun.sendPrize(call, prize);
|
||||
// 设置领取记录
|
||||
await HQJGFun.setMyData(call.uid, call.req.hdid, {task: mydata.task});
|
||||
|
||||
call.succ({ data: mydata, prize: prize });
|
||||
|
||||
G.server.sendMsgByUid(call.uid, "msg_s2c/HongDianChange", ["huodonghd"])
|
||||
}
|
@ -1,54 +0,0 @@
|
||||
import { ApiCall } from "tsrpc";
|
||||
import { ReqZhaoMu, ResZhaoMu } from "../../../shared/protocols/event/huangqijiuguan/PtlZhaoMu";
|
||||
import HQJGFun from "./fun";
|
||||
import { PlayerFun } from "../../../public/player";
|
||||
import { PublicShared } from "../../../shared/public/public";
|
||||
import { ActionLog } from "../../../public/actionLog/actionLog";
|
||||
|
||||
export default async function (call: ApiCall<ReqZhaoMu, ResZhaoMu>) {
|
||||
let hd = await HQJGFun.HdInfo(call, call.req.hdid);
|
||||
if (!hd || Object.keys(hd).length <= 0) {
|
||||
// 无此活动
|
||||
return call.error('', { code: -1, message: globalThis.lng.huodong_open_1 })
|
||||
}
|
||||
|
||||
let need = [{ a: hd.data.huobi.a, t: hd.data.huobi.t, n: hd.data.huobi.n * call.req.num }];
|
||||
|
||||
// 检测消耗
|
||||
await PlayerFun.checkNeedIsMeet(call, need);
|
||||
|
||||
let prize = [];
|
||||
let mydata = await HQJGFun.getMydata(call, hd);
|
||||
|
||||
for (let n = 1; n <= call.req.num; n++) {
|
||||
let num = mydata.zhaomu.num + n;
|
||||
let baodi = hd.data.baodi.filter(x => x.num == num);
|
||||
if (baodi.length > 0) {
|
||||
// 触发保底
|
||||
prize = prize.concat(baodi[0].prize);
|
||||
} else {
|
||||
// 常规掉落
|
||||
let temp = PublicShared.randomDropAny<{
|
||||
a: string, t: string, n: number, p: number
|
||||
}>(
|
||||
hd.data.chouka.filter(x => x.cishu <= num)
|
||||
);
|
||||
prize.push({ a: temp.a, t: temp.t, n: temp.n });
|
||||
}
|
||||
}
|
||||
|
||||
mydata.zhaomu.num += call.req.num;
|
||||
|
||||
// 扣除消耗
|
||||
await PlayerFun.cutNeed(call, need);
|
||||
// 发送奖励
|
||||
await PlayerFun.sendPrize(call, prize);
|
||||
// 设置抽卡数据
|
||||
await HQJGFun.setMyData(call.uid, call.req.hdid, { zhaomu: mydata.zhaomu });
|
||||
|
||||
call.succ({ data: mydata, prize: prize })
|
||||
|
||||
G.emit("Class_task_159", 'Class_task_159', call, 1, 0);
|
||||
|
||||
ActionLog.addDayLog(call.uid, { key: "huangqijiuguan/ZhaoMu", val: call.req.num });
|
||||
}
|
@ -1,44 +0,0 @@
|
||||
import { ApiCall } from "tsrpc";
|
||||
import { ReqZhaoMuPrizeRec, ResZhaoMuPrizeRec } from "../../../shared/protocols/event/huangqijiuguan/PtlZhaoMuPrizeRec";
|
||||
import HQJGFun from "./fun";
|
||||
import { PlayerFun } from "../../../public/player";
|
||||
|
||||
export default async function (call: ApiCall<ReqZhaoMuPrizeRec, ResZhaoMuPrizeRec>) {
|
||||
let hd = await HQJGFun.HdInfo(call, call.req.hdid);
|
||||
if (!hd || Object.keys(hd).length <= 0) {
|
||||
// 无此活动
|
||||
return call.error('', { code: -1, message: globalThis.lng.huodong_open_1 })
|
||||
}
|
||||
|
||||
let prize = [];
|
||||
let mydata = await HQJGFun.getMydata(call, hd);
|
||||
|
||||
for (let rec of call.req.recid) {
|
||||
let con = hd.data.choukajiangli[rec.idx];
|
||||
|
||||
if (con.num > mydata.zhaomu.num || mydata.zhaomu.prize.includes(rec.idx)) {
|
||||
continue
|
||||
}
|
||||
|
||||
if (con.dlz) {
|
||||
prize.push(con.dlz[0][rec.sec]);
|
||||
} else {
|
||||
prize = prize.concat(con.prize);
|
||||
}
|
||||
|
||||
mydata.zhaomu.prize.push(rec.idx);
|
||||
}
|
||||
|
||||
if (prize.length <= 0) {
|
||||
return call.error('', { code: -2, message: globalThis.lng.hqjgtips_28 })
|
||||
}
|
||||
|
||||
// 发送奖励
|
||||
await PlayerFun.sendPrize(call, prize);
|
||||
// 设置领取数据
|
||||
await HQJGFun.setMyData(call.uid, call.req.hdid, { zhaomu: mydata.zhaomu });
|
||||
|
||||
call.succ({ prize: prize, data: mydata })
|
||||
|
||||
G.server.sendMsgByUid(call.uid, "msg_s2c/HongDianChange", ["huodonghd"])
|
||||
}
|
@ -1,510 +0,0 @@
|
||||
import { ApiCall } from "tsrpc"
|
||||
import { ReqAddHuoDong } from "../../../monopoly/protocols/PtlAddHuoDong"
|
||||
import { HuoDongFun } from "../../../public/huodongfun"
|
||||
import { PublicShared } from "../../../shared/public/public"
|
||||
import { EmailFun } from "../../../public/email"
|
||||
import { playerInfo } from "../../../shared/protocols/user/PtlLogin"
|
||||
import { PlayerFun } from "../../../public/player"
|
||||
import { TaskFun } from "../../../public/task"
|
||||
|
||||
// hddata.data
|
||||
export interface Data {
|
||||
show: 1
|
||||
task: {
|
||||
[k: `day${number}`]: {
|
||||
[k: string]: { pval: number, stype: number, cond: string[], tiaozhuan: number, prize: atn[], des: string }
|
||||
}
|
||||
}
|
||||
|
||||
huobi: atn // 抽卡货币
|
||||
boss: {
|
||||
img: string
|
||||
npcId: number
|
||||
}
|
||||
|
||||
// boss排行邮件
|
||||
bossRank_des: string
|
||||
bossRank_title: string
|
||||
|
||||
// boss挑战等级奖励邮
|
||||
bossLvReward_des: string
|
||||
bossLvReward_title: string
|
||||
|
||||
chouka: { a: string, t: string, n: number, p: number, gailv: number, cishu: number }[]
|
||||
|
||||
choukajiangli: { num: number, prize?: any[], dlz: { [k: string]: atn } }[]
|
||||
|
||||
baodi: { num: number, prize: any[] }[]
|
||||
|
||||
gift: { id: number, free: boolean, payId: string, buynum: number, prize: atn[], dlz?: { [k: string]: atn }[] }[]
|
||||
|
||||
duihuan: { id: number, need: atn[], prize: atn[], buyNum: number }[]
|
||||
|
||||
bossLvReward: { lv: number, need: number, prize: atn[] }[]
|
||||
|
||||
bossTask: { id: number, need: number, prize: atn[] }[]
|
||||
|
||||
bossRank: { id: string, rank: [number, number], prize: atn[] }
|
||||
|
||||
zhuanhuan: { start: atn, end: atn }[]
|
||||
end_mail_title: string
|
||||
end_mail_des: string
|
||||
}
|
||||
|
||||
export interface PlayerData {
|
||||
// 招募数据
|
||||
zhaomu: {
|
||||
// 招募次数
|
||||
num: number
|
||||
// 次数奖励领取记录
|
||||
prize: number[]
|
||||
};
|
||||
|
||||
// 任务计数
|
||||
task: {
|
||||
rec: { [k: `day${number}`]: number[] }
|
||||
val: { [k: `day${number}`]: { [id: string]: number } }
|
||||
},
|
||||
|
||||
// 礼包购买记录
|
||||
giftbuy: { [id: string]: { num: number, select: number[] } }
|
||||
|
||||
// 兑换次数记录
|
||||
duihuan: { [id: string]: number }
|
||||
|
||||
// boss挑战数据
|
||||
bossres: {
|
||||
// 历史最大伤害
|
||||
maxdps: number
|
||||
// 今日最大伤害
|
||||
todaydps: {
|
||||
[k: string]: number
|
||||
}
|
||||
// 今日奖励领取记录
|
||||
recdpstask: number[]
|
||||
}
|
||||
}
|
||||
|
||||
export default class HQJGFun {
|
||||
static get htype() {
|
||||
return 15
|
||||
};
|
||||
|
||||
static rankkey(hdid: number) {
|
||||
return `rank:huangqijiuguan_${hdid}`
|
||||
}
|
||||
|
||||
/** 默认数据 */
|
||||
static get defaultData() {
|
||||
return {
|
||||
zhaomu: {
|
||||
num: 0,
|
||||
prize: []
|
||||
},
|
||||
task: {
|
||||
val: {},
|
||||
rec: {}
|
||||
},
|
||||
giftbuy: {},
|
||||
duihuan: {},
|
||||
bossres: {
|
||||
maxdps: 0,
|
||||
zhanli: 0,
|
||||
todaydps: {},
|
||||
recdpstask: []
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
static today(hdinfo: ReqAddHuoDong) {
|
||||
/**
|
||||
* 获取活动开启到第几天 从1开始
|
||||
*/
|
||||
return PublicShared.getDiff(hdinfo.stime, G.time)
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取排行榜
|
||||
*/
|
||||
static async getRankList(hdid: number) {
|
||||
let uids = await G.mongodb.collection("event").find(
|
||||
{ type: this.dataType(hdid), "bossres.maxdps": { $gt: 0 } },
|
||||
{
|
||||
sort: { "bossres.maxdps": -1, "bossres.zhanli": -1 },
|
||||
projection: { uid: 1, bossres: 1 }
|
||||
}
|
||||
).limit(50).toArray();
|
||||
|
||||
let userinfo = await G.mongodb.collection('user').find(
|
||||
{ uid: { $in: uids.map(v => v.uid) } },
|
||||
).toArray();
|
||||
|
||||
let res = [];
|
||||
for (let rank = 1; rank <= uids.length; rank++) {
|
||||
let uid = uids[rank - 1].uid;
|
||||
let user = userinfo.find(v => v.uid == uid);
|
||||
if (user) {
|
||||
res.push({ rank, ...user, valArr: [uids[rank - 1].bossres.maxdps] });
|
||||
}
|
||||
}
|
||||
|
||||
return res
|
||||
}
|
||||
|
||||
/** 数据类型 */
|
||||
static dataType(hdid: number) {
|
||||
return `huangqijiuguan_${hdid}` as `huangqijiuguan_${number}`
|
||||
}
|
||||
|
||||
/** 获取活动数据 */
|
||||
static async HdInfo(call: ApiCall, hdid?: number): Promise<ReqAddHuoDong & { data: Data }> {
|
||||
if (!hdid) {
|
||||
let hdlist = await HuoDongFun.gethdList(
|
||||
call, this.htype
|
||||
);
|
||||
return hdlist.length > 0 ? hdlist[0] : null
|
||||
} else {
|
||||
return await HuoDongFun.getHdidInfo(call, hdid) as any as ReqAddHuoDong & { data: Data }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/** 获取我的数据 */
|
||||
static async getMydata(call: ApiCall, hd?: ReqAddHuoDong) {
|
||||
if (!hd) {
|
||||
hd = await HQJGFun.HdInfo(call);
|
||||
}
|
||||
let data = await G.mongodb.cEvent(this.dataType(hd.hdid)).findOne({
|
||||
uid: call.uid, type: this.dataType(hd.hdid)
|
||||
}, { projection: { _id: 0 } });
|
||||
|
||||
if (!data) {
|
||||
data = (await G.mongodb.cEvent(this.dataType(hd.hdid)).findOneAndUpdate({
|
||||
uid: call.uid, type: this.dataType(hd.hdid)
|
||||
}, {
|
||||
$set: this.defaultData
|
||||
}, { upsert: true, returnDocument: 'after', projection: { _id: 0 } })).value;
|
||||
}
|
||||
|
||||
let today = this.today(hd);
|
||||
if (!data.task.val[`day${today}`]) {
|
||||
data.task.val[`day${today}`] = {};
|
||||
let tasks = hd.data.task[`day${today}`];
|
||||
for (let taskid in tasks) {
|
||||
let taskcon = tasks[taskid];
|
||||
data.task.val[`day${today}`][taskid] = await TaskFun.getTaskNval(call, taskcon);
|
||||
}
|
||||
await G.mongodb.collection('event').updateOne(
|
||||
{ uid: call.uid, type: this.dataType(hd.hdid) },
|
||||
{ $set: { [`task.val.day${today}`]: data.task.val[`day${today}`] } }
|
||||
);
|
||||
}
|
||||
|
||||
return data
|
||||
}
|
||||
|
||||
/** 设置我的数据 */
|
||||
static async setMyData(uid: string, hdid: number, update: { [k in keyof Partial<PlayerData>]: PlayerData[k] }) {
|
||||
let res = await G.mongodb.cEvent(this.dataType(hdid)).updateOne(
|
||||
{ uid: uid, type: this.dataType(hdid) }, { $set: update }, { upsert: true }
|
||||
);
|
||||
|
||||
if (res.upsertedCount == 1) {
|
||||
console.log("===>", uid, hdid, update);
|
||||
await G.mongodb.cEvent(this.dataType(hdid)).updateOne(
|
||||
{ uid: uid, type: this.dataType(hdid) }, { $set: Object.assign(this.defaultData, update) }
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 每日伤害等级奖励结算
|
||||
*/
|
||||
static async dayDpsLvPrize(time: number) {
|
||||
console.log(
|
||||
"黄旗酒馆 每日伤害等级奖励结算 开始执行。。。"
|
||||
)
|
||||
// 取stime小于当前时间的最后一条数据
|
||||
let hdinfo = await G.mongodb.collection("hdinfo").find({
|
||||
htype: this.htype, stime: { $lte: time }
|
||||
}, { sort: { stime: -1 } }).limit(1).toArray();
|
||||
|
||||
// 没有活动数
|
||||
if (hdinfo.length <= 0) {
|
||||
return
|
||||
}
|
||||
|
||||
let hd = hdinfo[0];
|
||||
let hdid = hdinfo[0].hdid;
|
||||
// 活动结束
|
||||
if (hd.etime < G.time - 300) {
|
||||
return
|
||||
}
|
||||
|
||||
let today = PublicShared.getDiff(hd.stime, G.time - 300);
|
||||
G.mongodb.collection("event").find({ type: `huangqijiuguan_${hdid}` }).toArray().then(datas => {
|
||||
let hddata = hd.data as Data;
|
||||
for (let i = 0; i < datas.length; i++) {
|
||||
let data = datas[i];
|
||||
|
||||
let lvprize: { lv: number; need?: number; prize?: atn[] };
|
||||
let dps = data.bossres.todaydps[today] || 0;
|
||||
for (let lvinfo of hddata.bossLvReward) {
|
||||
if (dps < lvinfo.need) {
|
||||
continue;
|
||||
}
|
||||
if (!lvprize || lvprize.lv < lvinfo.lv) {
|
||||
lvprize = lvinfo;
|
||||
}
|
||||
}
|
||||
|
||||
if (!lvprize) continue
|
||||
let title = hddata.bossLvReward_title;
|
||||
let content = hddata.bossLvReward_des;
|
||||
EmailFun.addEmail({
|
||||
uid: data.uid,
|
||||
title: title,
|
||||
type: "system",
|
||||
content: content,
|
||||
prize: lvprize.prize,
|
||||
contentInsertArr: [lvprize.lv],
|
||||
})
|
||||
}
|
||||
console.log(
|
||||
"黄旗酒馆 每日伤害等级奖励结算 执行完成!!!"
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 最大伤害排行奖励结算
|
||||
*/
|
||||
static async endDpsRankPrize(time: number) {
|
||||
console.log(
|
||||
"黄旗酒馆 最大伤害排行奖励结算 开始执行。。。"
|
||||
)
|
||||
let today = PublicShared.getToDayZeroTime(time + 300);
|
||||
let yesterday = PublicShared.getToDayZeroTime(time - 300);
|
||||
|
||||
// 查询昨天23:59:00或者今天00:00:00结束的活动
|
||||
let hdinfo = await G.mongodb.collection("hdinfo").find({
|
||||
htype: this.htype, rtime: { $gt: yesterday, $lte: today }
|
||||
}).toArray();
|
||||
|
||||
// 没有活动数 或者发奖标识已设置
|
||||
if (hdinfo.length <= 0 || hdinfo[0].data.sendrank) {
|
||||
return
|
||||
}
|
||||
|
||||
let hd = hdinfo[0];
|
||||
let hdid = hdinfo[0].hdid;
|
||||
let hddata = hdinfo[0].data as Data;
|
||||
if (hd.data.sendrank) {
|
||||
return
|
||||
}
|
||||
|
||||
let uids = await G.mongodb.collection("event").find(
|
||||
{ type: this.dataType(hdid) },
|
||||
{
|
||||
sort: { "bossres.maxdps": -1, "bossres.zhanli": -1 },
|
||||
projection: { uid: 1, bossres: 1 }
|
||||
}
|
||||
).toArray();
|
||||
|
||||
for (let rank = 1; rank <= uids.length; rank++) {
|
||||
let con = hd.data.bossRank.filter(
|
||||
(x: { rank: number[] }) => rank >= x.rank[0] && rank <= x.rank[1]
|
||||
)[0];
|
||||
if (!con) continue;
|
||||
// 发送排名奖励
|
||||
await EmailFun.addEmail({
|
||||
uid: uids[rank - 1].uid,
|
||||
title: hd.data.bossRank_title,
|
||||
type: "system",
|
||||
content: hd.data.bossRank_des,
|
||||
prize: con.prize,
|
||||
contentInsertArr: [rank],
|
||||
})
|
||||
}
|
||||
// 标记已发送
|
||||
await G.mongodb.collection("hdinfo").updateOne(
|
||||
{ hdid: hdid }, { $set: { "data.sendrank": true } }
|
||||
);
|
||||
// 货币兑换
|
||||
G.mongodb.collection("user").find().toArray().then(async (users) => {
|
||||
for (let i = 0; i < users.length; i++) {
|
||||
let prize = [];
|
||||
let change = {};
|
||||
let user = users[i];
|
||||
for (let con of hddata.zhuanhuan) {
|
||||
let num = user[con.start.t];
|
||||
if (num < con.start.n) {
|
||||
continue
|
||||
}
|
||||
change[con.start.t] = 0;
|
||||
prize.push({
|
||||
a: con.end.a, t: con.end.t, n: con.end.n * (num / con.start.n),
|
||||
})
|
||||
}
|
||||
if (prize.length <= 0) continue
|
||||
// 扣除消耗
|
||||
await PlayerFun.changeAttr(user.uid, change);
|
||||
G.server?.sendMsgByUid(user.uid, "msg_s2c/PlayerChange", change);
|
||||
// 发送奖励邮件
|
||||
await EmailFun.addEmail({
|
||||
uid: user.uid,
|
||||
type: "system",
|
||||
prize: prize,
|
||||
title: hddata.end_mail_title,
|
||||
content: hddata.end_mail_des,
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
console.log(
|
||||
"黄旗酒馆 最大伤害排行奖励结算 执行结束!!!"
|
||||
)
|
||||
}
|
||||
|
||||
/**设置任务 */
|
||||
static async setTaskVal(call: ApiCall, stype: number, val: number, chkCall: Function, chkval: number = 0, isinc: number = 0, alchangeVal: Function, arg) {
|
||||
// 活动过期,不计数
|
||||
let hd = await this.HdInfo(call)
|
||||
if (!hd) return
|
||||
|
||||
let today = this.today(hd);
|
||||
let tasks = hd.data.task[`day${today}`];
|
||||
|
||||
if (!tasks) return
|
||||
|
||||
let mydata = await this.getMydata(call, hd);
|
||||
|
||||
let isset = 0;
|
||||
if (!mydata.task.val[`day${today}`]) {
|
||||
isset = 1;
|
||||
mydata.task.val[`day${today}`] = {}
|
||||
for (let taskid in tasks) {
|
||||
let taskcon = tasks[taskid];
|
||||
mydata.task.val[`day${today}`][taskid] = await TaskFun.getTaskNval(call, taskcon);
|
||||
}
|
||||
}
|
||||
|
||||
for (let taskid of Object.keys(tasks)) {
|
||||
let taskCon = tasks[taskid];
|
||||
if (taskCon.stype != stype) continue
|
||||
|
||||
// 不符合任务要求
|
||||
if (!(await chkCall(taskCon["cond"], chkval, arg))) continue
|
||||
|
||||
// 根据需求改写
|
||||
val = await alchangeVal(call, taskCon, val, arg)
|
||||
|
||||
isset = 1
|
||||
if (isinc != 1) { // 累加
|
||||
mydata.task.val[`day${today}`][taskid] = val;
|
||||
} else {
|
||||
mydata.task.val[`day${today}`][taskid] = (mydata.task.val[`day${today}`][taskid] || 0) + val;
|
||||
}
|
||||
}
|
||||
|
||||
// 设置任务
|
||||
if (isset == 1) {
|
||||
await G.mongodb.collection('event').updateOne({ uid: call.uid, type: this.dataType(hd.hdid) }, {
|
||||
$set: {
|
||||
[`task.val.day${today}`]: mydata.task.val[`day${today}`]
|
||||
}
|
||||
})
|
||||
|
||||
if ((await this.getHongDian(call, hd, mydata)).show) {
|
||||
G.server.sendMsgByUid(call.uid, "msg_s2c/HongDianChange", ["huodonghd"])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static async buy(player: playerInfo, payId: string, payArgs: any, call: ApiCall) {
|
||||
let hd = await this.HdInfo(call);
|
||||
|
||||
if (!hd) { // 活动不存在
|
||||
return
|
||||
}
|
||||
|
||||
// 判断购买次数
|
||||
let gift = hd.data.gift.filter(x => x.payId == payId)[0];
|
||||
if (!gift) {
|
||||
return
|
||||
}
|
||||
|
||||
let mydata = await this.getMydata(call, hd);
|
||||
if (!mydata.giftbuy[gift.id]) {
|
||||
mydata.giftbuy[gift.id] = { num: 0, select: [] };
|
||||
}
|
||||
|
||||
let prize: atn[] = [];
|
||||
if (mydata.giftbuy[gift.id].num + 1 > gift.buynum) {
|
||||
let pay = G.gc.pay[payId];
|
||||
prize.push({ a: "attr", t: "rmbmoney", n: pay.payExp[0].n })
|
||||
} else {
|
||||
prize = gift.prize;
|
||||
for (let i = 0; i < gift.dlz.length; i++) {
|
||||
if (!mydata.giftbuy[gift.id].select[i]) {
|
||||
let ids = Object.keys(gift.dlz[i])
|
||||
prize.push(gift.dlz[i][ids[0]]);
|
||||
mydata.giftbuy[gift.id].select[i] = Number(ids[0]);
|
||||
} else {
|
||||
prize.push(gift.dlz[i][mydata.giftbuy[gift.id].select[i]]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mydata.giftbuy[gift.id].num++;
|
||||
// 发送奖励
|
||||
await PlayerFun.sendPrize(call, prize, true);
|
||||
await this.setMyData(call.uid, hd.hdid, { giftbuy: mydata.giftbuy });
|
||||
}
|
||||
|
||||
static async getHongDian(call: ApiCall, hd: ReqAddHuoDong, mydata?: PlayerData) {
|
||||
let hdid = hd.hdid;
|
||||
let hddata = hd.data as Data;
|
||||
|
||||
mydata = mydata || await this.getMydata(call, hd);
|
||||
// 当黄旗招募存在可领取的可选奖励时
|
||||
for (let i = 0; i < hddata.choukajiangli.length; i++) {
|
||||
let ele = hddata.choukajiangli[i];
|
||||
if (mydata.zhaomu.num >= ele.num && !mydata.zhaomu.prize.includes(i)) {
|
||||
return { show: true }
|
||||
}
|
||||
}
|
||||
|
||||
let today = this.today(hd);
|
||||
// 当今日没有进行boss挑战时
|
||||
if (!mydata.bossres.todaydps[today]) {
|
||||
return { show: true }
|
||||
}
|
||||
|
||||
// 当每日任务界面存在可领取的任务奖励时
|
||||
for (let day = 1; day <= today; day++) {
|
||||
for (let taskid in hddata.task[`day${day}`]) {
|
||||
let task = hddata.task[`day${day}`][taskid];
|
||||
if (mydata.task.val[`day${day}`]?.[taskid] >= task.pval && !(mydata.task.rec?.[`day${day}`] || []).includes(Number(taskid))) {
|
||||
return { show: true }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 当干部挑战界面存在可领取的挑战任务奖励时
|
||||
for (let mb of hddata.bossTask) {
|
||||
if (mb.need <= mydata.bossres.maxdps && !mydata.bossres.recdpstask.includes(mb.id)) {
|
||||
return { show: true }
|
||||
}
|
||||
}
|
||||
|
||||
// 当存在可以领取的免费礼包时
|
||||
for (let gift of hddata.gift) {
|
||||
if (gift.free && (mydata.giftbuy[gift.id]?.num || 0) < gift.buynum) {
|
||||
return { show: true }
|
||||
}
|
||||
}
|
||||
|
||||
return { show: false }
|
||||
}
|
||||
}
|
@ -35,7 +35,6 @@ export default async function (call: ApiCall<ReqRec, ResRec>) {
|
||||
_mydata.lunci += 1
|
||||
_setData["taskval"] = _mydata.taskval
|
||||
_setData["lunci"] = _mydata.lunci
|
||||
_setData["finishid"] = _mydata.finishid
|
||||
}
|
||||
|
||||
// 设置任务改变数据
|
||||
|
@ -16,8 +16,8 @@ export default async function (call: ApiCall<ReqRec, ResRec>) {
|
||||
if (call.req.index > day) return call.errorCode(-3);
|
||||
if (rec.includes(call.req.index)) return call.errorCode(-4);
|
||||
|
||||
// 从异步改成同步
|
||||
await G.mongodb.cEvent(type).updateOne({uid: call.uid, type: type}, {$push: {rec: call.req.index}}, {upsert: true});
|
||||
|
||||
G.mongodb.cEvent(type).updateOne({uid: call.uid, type: type}, {$push: {rec: call.req.index}}, {upsert: true});
|
||||
|
||||
|
||||
await PlayerFun.sendPrize(call, [].concat(conf.prize[call.req.index]));
|
||||
|
@ -24,10 +24,7 @@ export default async function (call: ApiCall<ReqOpen, ResOpen>) {
|
||||
await PayFun.delPayLog(
|
||||
call.uid, { payId: G.gc.zhanling.payId, val: [] }
|
||||
);
|
||||
// 战令重置的时候需要删除所有的任务进度,但是每天的任务进度不做处理,因为每天会自然重置,怕玩家会刷
|
||||
// ZhanLingTasks.clearLog(call.uid, 'day');
|
||||
ZhanLingTasks.clearLog(call.uid, 'week');
|
||||
ZhanLingTasks.clearLog(call.uid, 'round');
|
||||
|
||||
data = (await G.mongodb.cEvent('zhanling').findOneAndUpdate({
|
||||
uid: call.uid,
|
||||
type: 'zhanling'
|
||||
|
@ -51,24 +51,16 @@ export default async function (call: ApiCall<ReqGetList, ResGetList>) {
|
||||
async function checkDataAndFix(call: ApiCall, list: ResGetList['list']) {
|
||||
try {
|
||||
// 修复配件数据
|
||||
//hero数据里,所有英雄穿戴中的配件的 _id(objectId)
|
||||
// let peijianids = [];
|
||||
// Object.values(list).map(hero => {
|
||||
// hero.peijian && Object.values(hero.peijian).map(
|
||||
// i => peijianids.push(G.mongodb.conversionId(PeijianShared.fmt(i)._id))
|
||||
// )
|
||||
// });
|
||||
let peijianids = [];
|
||||
Object.values(list).map(hero => {
|
||||
hero.peijian && Object.values(hero.peijian).map(
|
||||
i => peijianids.push(G.mongodb.conversionId(PeijianShared.fmt(i)._id))
|
||||
)
|
||||
});
|
||||
|
||||
//通过上述的_id,去配件表查询所有配件
|
||||
// let wearedPeiJian = (await G.mongodb.collection("peijian").find(
|
||||
// {uid: call.uid, _id: {$in: peijianids}}, {projection: {_id: 1, wearId:1}}
|
||||
// ).toArray());
|
||||
|
||||
// //peijians = 所有从db里查到的peijian的 _id字符串数据集合
|
||||
// let peijians = wearedPeiJian.map(temp => {
|
||||
// let idstr = G.mongodb.conversionId(temp._id)
|
||||
// return idstr;
|
||||
// });
|
||||
let peijians = (await G.mongodb.collection("peijian").find(
|
||||
{uid: call.uid, _id: {$in: peijianids}}, {projection: {_id: 1}}
|
||||
).toArray()).map(temp => G.mongodb.conversionId(temp._id));
|
||||
|
||||
let shiwuIds = R.flatten(R.values(list).map(hero => R.values(hero.shiwu).map(i => G.mongodb.conversionId(i._id))))
|
||||
|
||||
@ -76,19 +68,15 @@ async function checkDataAndFix(call: ApiCall, list: ResGetList['list']) {
|
||||
{uid: call.uid, _id: {$in: shiwuIds}}, {projection: {_id: 1}}
|
||||
).toArray()).map(i => G.mongodb.conversionId(i._id));
|
||||
|
||||
//let peijianChanges = {};
|
||||
let peijianChanges = {};
|
||||
let shiwuChanges = {};
|
||||
Object.values(list).map(hero => {
|
||||
// for (let pos in hero.peijian) {
|
||||
// //hero该位置记录的穿戴中的配件_id
|
||||
// let _pid = PeijianShared.fmt(hero.peijian[pos])._id;
|
||||
|
||||
// if (!peijians.includes(_pid) || peijianWearTo?.[_pid] != hero._id ) {
|
||||
// //这个配件,实际在peijian表里不存在 或 配件表里该配件并不是在这个英雄身上
|
||||
// hero.peijian[pos] = "";
|
||||
// peijianChanges[hero._id] = hero.peijian;
|
||||
// }
|
||||
// }
|
||||
for (let pos in hero.peijian) {
|
||||
if (!peijians.includes(PeijianShared.fmt(hero.peijian[pos])._id)) {
|
||||
hero.peijian[pos] = "";
|
||||
peijianChanges[hero._id] = hero.peijian;
|
||||
}
|
||||
}
|
||||
for (let pos in hero.shiwu) {
|
||||
if (!shiwus.includes(hero.shiwu[pos]._id)) {
|
||||
hero.shiwu = R.omit([pos], hero.shiwu)
|
||||
@ -97,12 +85,12 @@ async function checkDataAndFix(call: ApiCall, list: ResGetList['list']) {
|
||||
}
|
||||
})
|
||||
|
||||
// for (let oid in peijianChanges) {
|
||||
// // 修复数据
|
||||
// G.mongodb.collection("hero").updateOne(
|
||||
// G.mongodb.conversionIdObj({_id: oid}), {$set: {peijian: peijianChanges[oid]}}
|
||||
// )
|
||||
// }
|
||||
for (let oid in peijianChanges) {
|
||||
// 修复数据
|
||||
G.mongodb.collection("hero").updateOne(
|
||||
G.mongodb.conversionIdObj({_id: oid}), {$set: {peijian: peijianChanges[oid]}}
|
||||
)
|
||||
}
|
||||
|
||||
for (let oid in shiwuChanges) {
|
||||
// 修复数据
|
||||
|
@ -1,20 +0,0 @@
|
||||
import { ApiCall } from "tsrpc";
|
||||
import { ReqTakeOff, ResTakeOff } from "../../shared/protocols/heroskin/PtlTakeOff";
|
||||
import { HeroFun } from "../../public/hero";
|
||||
|
||||
export default async function (call: ApiCall<ReqTakeOff, ResTakeOff>) {
|
||||
let hero = await HeroFun.getHero(call, call.req.heroOid);
|
||||
if (!hero) { // 英雄不存在
|
||||
call.error(lng.hero_1);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!hero.skin) { // 没有穿戴皮肤
|
||||
call.error(lng.hero_22);
|
||||
return;
|
||||
}
|
||||
|
||||
await HeroFun.changeHeroAttr(call, hero, { skin: "" });
|
||||
|
||||
call.succ({});
|
||||
}
|
@ -1,38 +0,0 @@
|
||||
import { ApiCall } from "tsrpc";
|
||||
import { PlayerFun } from "../../public/player";
|
||||
import { ReqUplv, ResUplv } from "../../shared/protocols/heroskin/PtlUplv";
|
||||
import HeroSkinFun from "../../public/heroskin";
|
||||
|
||||
|
||||
export default async function (call: ApiCall<ReqUplv, ResUplv>) {
|
||||
let skin = HeroSkinFun.getHeroSkin(call);
|
||||
if (!skin[call.req.skid]) {// 皮肤未获得
|
||||
call.error(lng.hero_20);
|
||||
}
|
||||
|
||||
let cur_lv = skin[call.req.skid];
|
||||
let skinconf = G.gc.heroSkin[call.req.skid];
|
||||
|
||||
let need = [];
|
||||
for (let i = 0; i < call.req.lv; i++) {
|
||||
need = need.concat(
|
||||
G.gc.heroSkinLv[skinconf.colour][cur_lv + i].need
|
||||
)
|
||||
let conf = G.gc.heroSkin[call.req.skid];
|
||||
need.push({ a: "item", "t": conf.heroId, "n": G.gc.heroSkinLv[skinconf.colour][cur_lv + i].suipian });
|
||||
}
|
||||
|
||||
// 检测消耗
|
||||
await PlayerFun.checkNeedIsMeet(call, need);
|
||||
|
||||
// 扣除消耗
|
||||
await PlayerFun.cutNeed(call, need);
|
||||
|
||||
// 更新等级
|
||||
skin[call.req.skid] = cur_lv + call.req.lv;
|
||||
|
||||
// 更新skinlv
|
||||
await HeroSkinFun.updateHeroSkinLv(call, { [call.req.skid]: cur_lv + call.req.lv });
|
||||
|
||||
call.succ({});
|
||||
}
|
@ -1,28 +0,0 @@
|
||||
import { ApiCall } from "tsrpc";
|
||||
import { HeroFun } from "../../public/hero";
|
||||
import { ReqWear, ResWear } from "../../shared/protocols/heroskin/PtlWear";
|
||||
import HeroSkinFun from "../../public/heroskin";
|
||||
|
||||
export default async function (call: ApiCall<ReqWear, ResWear>) {
|
||||
let hero = await HeroFun.getHero(call, call.req.heroOid);
|
||||
if (!hero) { // 英雄不存在
|
||||
call.error(lng.hero_1);
|
||||
return;
|
||||
}
|
||||
|
||||
let skin = HeroSkinFun.getHeroSkin(call);
|
||||
if (!skin || !skin[call.req.skid]) { // 皮肤不存在
|
||||
call.error(lng.hero_20);
|
||||
return;
|
||||
}
|
||||
|
||||
let skinconf = G.gc.heroSkin[call.req.skid];
|
||||
if (skinconf.heroId != hero.heroId) { // 皮肤不属于该英雄
|
||||
call.error(lng.hero_21);
|
||||
return;
|
||||
}
|
||||
|
||||
await HeroFun.changeHeroAttr(call, hero, { skin: call.req.skid });
|
||||
|
||||
call.succ({});
|
||||
}
|
@ -21,7 +21,6 @@ import kfjsFun from "../../public/kaifujingsai";
|
||||
import {RankKfjs} from "../../public/rank/rank_kfjs";
|
||||
import {ShopFun} from "../../public/shop";
|
||||
import {Christmasfun} from '../event/christmas/fun';
|
||||
import HQJGFun from '../event/huangqijiuguan/fun';
|
||||
|
||||
export class HongDianFun {
|
||||
/**黑榜争霸红点 */
|
||||
@ -353,10 +352,6 @@ export class HuoDongHongDianFun {
|
||||
// 检测 htype 10 元旦活动红点
|
||||
ishd = await this.yuandan(call, element)
|
||||
}
|
||||
if (element.htype == 15) {
|
||||
// 检测 htype 15 黄芪酒馆活动红点
|
||||
ishd = await HQJGFun.getHongDian(call, element)
|
||||
}
|
||||
|
||||
// 此活动有红点
|
||||
if (ishd.show) {
|
||||
|
@ -30,6 +30,6 @@ export default async function (call: ApiCall<ReqOpen, ResOpen>) {
|
||||
});
|
||||
|
||||
UserFun.activeHeadFrame(call.uid, 'jjc_rank', data["rank"] + 1);
|
||||
//JJCFun.checkUpdatePlayer()
|
||||
JJCFun.checkUpdatePlayer()
|
||||
|
||||
}
|
@ -5,7 +5,7 @@ import {ReqYanShi, ResYanShi} from "../../shared/protocols/kuangdong/PtlYanShi";
|
||||
|
||||
export default async function (call: ApiCall<ReqYanShi, ResYanShi>) {
|
||||
|
||||
//return call.errorCode(1)
|
||||
return call.errorCode(1)
|
||||
|
||||
let hdid = call.req.hdid
|
||||
let con = await KuangDongfun.getCon(hdid)
|
||||
|
@ -1,38 +1,12 @@
|
||||
import {ApiCall} from "tsrpc";
|
||||
import { connGameLogDB } from "../../gameLog";
|
||||
import {PeiJian, ReqGetList, ResGetList} from "../../shared/protocols/peijian/PtlGetList";
|
||||
import { PeijianShared } from "../../shared/public/peijian";
|
||||
import {ReqGetList, ResGetList} from "../../shared/protocols/peijian/PtlGetList";
|
||||
|
||||
export default async function (call: ApiCall<ReqGetList, ResGetList>) {
|
||||
let _maxLv = 0
|
||||
let color = {}
|
||||
let peijianCon = G.gc.peijian
|
||||
|
||||
//所有上阵的英雄_id
|
||||
let heroIds = R.values(call.conn.gud.heroPos)
|
||||
//将所有未上阵的英雄的配件卸下
|
||||
if(heroIds.length>0){
|
||||
let _ids = heroIds.map(_id => G.mongodb.conversionId(_id));
|
||||
await G.mongodb.collection("hero").updateMany({uid: call.conn.uid},{
|
||||
$set:{
|
||||
peijian:{}
|
||||
}
|
||||
});
|
||||
}
|
||||
//如果配件穿戴在了未上阵的hero身上,则执行卸下操作
|
||||
await G.mongodb.collection('peijian').updateMany({uid: call.conn.uid, wearId: {$nin: heroIds}}, {$set: {wearId: ''}})
|
||||
|
||||
|
||||
let heroPeiJian = {};
|
||||
let dbList = (await G.mongodb.collection('peijian').find({uid: call.uid}).toArray()).map(p => {
|
||||
|
||||
if(p.wearId){
|
||||
if(!heroPeiJian[ p.wearId ]){
|
||||
heroPeiJian[ p.wearId ] = {};
|
||||
}
|
||||
heroPeiJian[ p.wearId ][ Object.keys(heroPeiJian[ p.wearId ]).length + 1 ] = PeijianShared.fmt( p as any )
|
||||
}
|
||||
|
||||
let np = G.mongodb.conversionIdObj(p);
|
||||
let {uid, ...ops} = np;
|
||||
|
||||
@ -42,25 +16,17 @@ export default async function (call: ApiCall<ReqGetList, ResGetList>) {
|
||||
return ops;
|
||||
});
|
||||
|
||||
//对hero的peijian字段进行修正
|
||||
if(Object.keys(heroPeiJian).length > 0){
|
||||
for(let heroid in heroPeiJian){
|
||||
await G.mongodb.collection("hero").updateOne({
|
||||
uid : call.conn.uid,
|
||||
_id : G.mongodb.conversionId(heroid)
|
||||
},{
|
||||
$set:{
|
||||
peijian : heroPeiJian[heroid]
|
||||
}
|
||||
});
|
||||
}
|
||||
// 修复配件穿戴在不存在的英雄身上
|
||||
let heroIds = R.values(call.conn.gud.heroPos)
|
||||
let fixIds = dbList.filter(i => i.wearId && !heroIds.includes(i.wearId)).map(i => G.mongodb.conversionId(i._id))
|
||||
if (fixIds.length) {
|
||||
await G.mongodb.collection('peijian').updateMany({_id: {$in: fixIds}}, {$set: {wearId: ''}})
|
||||
}
|
||||
|
||||
// 记录玩家最大等级,颜色相关数据 注册任务用
|
||||
await G.mongodb.collection('playerInfo', 'usertasklog').updateOne({uid: call.conn.uid, type: 'usertasklog'},
|
||||
{$set: {maxpeijianlv: _maxLv, peijiancolor: color}}, {upsert: true})
|
||||
|
||||
|
||||
let list = Object.fromEntries(dbList.map(p => [G.formatRedisKey(p._id), p]));
|
||||
G.redis.set('peijian', call.uid, list);
|
||||
|
||||
|
@ -41,17 +41,14 @@ export default async function (call: ApiCall<ReqOpen, ResOpen>) {
|
||||
},
|
||||
{ upsert: true }
|
||||
);
|
||||
} else if (data.fightNum < G.gc.slzd.maxFightNum && G.time - data.replyCd > G.gc.slzd.replyCd) {
|
||||
let addNum = Math.floor((G.time - data.replyCd) / G.gc.slzd.replyCd);
|
||||
let maxAddNum = G.gc.slzd.maxFightNum - data.fightNum;
|
||||
data.fightNum += addNum > maxAddNum ? maxAddNum : addNum;
|
||||
data.replyCd = G.time;
|
||||
G.mongodb.collection('slzdUser').updateOne({ uid: call.uid }, { $set: { 'data.fightNum': data.fightNum, 'data.replyCd': data.replyCd } });
|
||||
}
|
||||
|
||||
//不需要回复次数
|
||||
// else if (data.fightNum < G.gc.slzd.maxFightNum && G.time - data.replyCd > G.gc.slzd.replyCd) {
|
||||
// let addNum = Math.floor((G.time - data.replyCd) / G.gc.slzd.replyCd);
|
||||
// let maxAddNum = G.gc.slzd.maxFightNum - data.fightNum;
|
||||
// data.fightNum += addNum > maxAddNum ? maxAddNum : addNum;
|
||||
// data.replyCd = G.time;
|
||||
// G.mongodb.collection('slzdUser').updateOne({ uid: call.uid }, { $set: { 'data.fightNum': data.fightNum, 'data.replyCd': data.replyCd } });
|
||||
// }
|
||||
|
||||
let { refreshTime, ...ops } = data;
|
||||
call.succ({
|
||||
...ops,
|
||||
|
@ -20,8 +20,7 @@ export default async function (call: ApiCall<ReqChangeInfo, ResChangeInfo>) {
|
||||
vip: call.conn.gud.vip,
|
||||
lsyx: call.conn.lshd.hero,
|
||||
model: call.conn.gud.model,
|
||||
active: active,
|
||||
heroskin: call.conn.gud.heroskin
|
||||
active: active
|
||||
});
|
||||
|
||||
if (!isMeet && call.req.type != 'headFrame' && call.req.type != 'chatFrame') return call.error(globalThis.lng.user_1);
|
||||
|
@ -1330,20 +1330,6 @@ export const serviceProto: ServiceProto<ServiceType> = {
|
||||
}
|
||||
},
|
||||
"optional": true
|
||||
},
|
||||
{
|
||||
"id": 39,
|
||||
"name": "heroskin",
|
||||
"type": {
|
||||
"type": "Interface",
|
||||
"indexSignature": {
|
||||
"keyType": "String",
|
||||
"type": {
|
||||
"type": "Number"
|
||||
}
|
||||
}
|
||||
},
|
||||
"optional": true
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -1735,27 +1721,6 @@ export const serviceProto: ServiceProto<ServiceType> = {
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
"name": "skin",
|
||||
"type": {
|
||||
"type": "Union",
|
||||
"members": [
|
||||
{
|
||||
"id": 0,
|
||||
"type": {
|
||||
"type": "String"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 1,
|
||||
"type": {
|
||||
"type": "Number"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -11,7 +11,6 @@ export class Encrypt {
|
||||
if (buf instanceof Uint8Array) {
|
||||
return decryptUint8Array(buf);
|
||||
}
|
||||
|
||||
return buf;
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
import 'tsrpc';
|
||||
import { ApiCall, BaseConnection, ConnectionStatus, WsServer } from 'tsrpc';
|
||||
import { Wjjl } from './module/collection_wjjl';
|
||||
@ -133,7 +132,7 @@ BaseConnection.prototype.getDefaultFightData = async function (this: BaseConnect
|
||||
posObj = this.gud.matrixPos[this.gud.selectMatrix];
|
||||
}
|
||||
|
||||
let heros = await HeroFun.getHeros(this, Object.values(posObj).filter(_id => _id != ''));
|
||||
let heros = await HeroFun.getHeros(this, Object.values(posObj).filter(_id => _id != '') as string[]);
|
||||
|
||||
Object.entries(posObj).forEach(obj => {
|
||||
let pos = obj[0];
|
||||
|
@ -1,119 +0,0 @@
|
||||
import { patchFun, patchInit } from "../patch";
|
||||
import { PublicShared } from "../shared/public/public";
|
||||
import { JJCFun } from "../public/jjc";
|
||||
|
||||
function getRankPrize(rank: number, conf?: typeof G.gc.jjc_ph['']) {
|
||||
if (!conf) {
|
||||
conf = Object.values(G.gc.jjc_ph).filter(v => rank >= v.ph[0] && rank <= v.ph[1])[0];
|
||||
}
|
||||
if (conf) {
|
||||
return [...conf.prize, { a: 'item', t: '11', n: typeof conf.rongyuprize == 'number' ? conf.rongyuprize : PublicShared.eval(conf.rongyuprize, { a: rank }) }];
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
class Path {
|
||||
|
||||
async addEmail(email, isCross = false) {
|
||||
let { prize, uid, ...e } = email;
|
||||
let lng = await G.redis.rawGet(`user:lng:${uid}`);
|
||||
let sendEmail = {
|
||||
_id: null,
|
||||
uid: uid,
|
||||
type: e.type,
|
||||
title: e.lngTitle ? (e.lngTitle[lng] || e.lngTitle['ja']) : e.title,
|
||||
content: e.lngContent ? (e.lngContent[lng] || e.lngContent['ja']) : e.content,
|
||||
createTime: e.createTime || G.time,
|
||||
contentInsertArr: e.contentInsertArr || []
|
||||
} as any;
|
||||
|
||||
/**跨服邮件给sid标识*/
|
||||
// if (isCross) {
|
||||
// sendEmail.sid = uid.split('_')[0];
|
||||
// }
|
||||
if ((prize === null || prize === void 0 ? void 0 : prize.length) > 0) {
|
||||
sendEmail.prizeData = {
|
||||
prize: email.prize,
|
||||
isGet: false
|
||||
};
|
||||
}
|
||||
if (email.g123log && Object.keys(email.g123log).length > 0)
|
||||
sendEmail.g123log = email.g123log;
|
||||
|
||||
if (email.lngTitle) {
|
||||
sendEmail.lngTitle = email.lngTitle;
|
||||
sendEmail.lngContent = email.lngContent;
|
||||
}
|
||||
//太亏了!换其他清理机制,getAllEmail是性能消耗大户
|
||||
//todo.. 换其他清理机制
|
||||
// if (!isCross) {
|
||||
// let emailList = await this.getAllEmail(uid);
|
||||
// if (emailList.length >= 50) {
|
||||
// emailList.sort((a, b) => {
|
||||
// let noPrizeA = a.prizeData == undefined ? 0 : 1;
|
||||
// let noPrizeB = b.prizeData == undefined ? 0 : 1;
|
||||
// let getA = a.prizeData?.isGet == true ? 0 : 1;
|
||||
// let getB = b.prizeData?.isGet == true ? 0 : 1;
|
||||
// if (noPrizeA != noPrizeB) {
|
||||
// return noPrizeA - noPrizeB;
|
||||
// } else if (getA != getB) {
|
||||
// return getA - getB;
|
||||
// }
|
||||
// return a.createTime - b.createTime;
|
||||
// });
|
||||
// this.removeEmail(uid, emailList[0]._id);
|
||||
// G.server.sendMsgByUid(uid, 'msg_s2c/EmailDel', emailList[0]._id);
|
||||
// }
|
||||
// }
|
||||
//@ts-ignore
|
||||
await G.mongodb.collection('email').insertOne({
|
||||
ttl: new Date(), ...G.mongodb.conversionIdObj(sendEmail)
|
||||
})
|
||||
}
|
||||
|
||||
async sendEmail(uid: string, rank: number, prize: atn[]) {
|
||||
|
||||
if (uid.indexOf('npc_') != -1) return;
|
||||
|
||||
await this.addEmail({
|
||||
uid: uid,
|
||||
type: 'system',
|
||||
title: G.gc.jjc_com.email.titel,
|
||||
content: G.gc.jjc_com.email.content,
|
||||
prize: prize,
|
||||
contentInsertArr: [rank]
|
||||
});
|
||||
}
|
||||
async fun1(a: any) {
|
||||
for (let conf of Object.values(G.gc.jjc_ph)) {
|
||||
let players = await JJCFun.getRankListUid(conf.ph[0] - 1, conf.ph[1]);
|
||||
|
||||
for (let index = 0; index < players.length; index++) {
|
||||
let uid = players[index];
|
||||
await this.sendEmail(uid, conf.ph[0] + index, getRankPrize(conf.ph[0] + index, conf));
|
||||
console.log("sendEmail", uid, conf.ph[0] + index)
|
||||
}
|
||||
}
|
||||
|
||||
return "sucess!!!"
|
||||
}
|
||||
|
||||
|
||||
|
||||
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();
|
@ -1,684 +0,0 @@
|
||||
import { patchFun, patchInit } from "../patch";
|
||||
|
||||
class Path {
|
||||
|
||||
async fun1(a: any) {
|
||||
const con = {
|
||||
"16_6575db20f6ef8b7da5c8f1fd": {
|
||||
"item": {
|
||||
"1": 55400000,
|
||||
"12": 10600,
|
||||
"2": 223000,
|
||||
"6": 690
|
||||
},
|
||||
"attr": {
|
||||
"rmbmoney": 30500,
|
||||
"jinbi": 2850000000
|
||||
}
|
||||
},
|
||||
"15_6575a14b2f930bd5e51ccde9": {
|
||||
"item": {
|
||||
"1": 137200000,
|
||||
"12": 16600,
|
||||
"2": 273700,
|
||||
"6": 1735
|
||||
},
|
||||
"attr": {
|
||||
"rmbmoney": 35200,
|
||||
"jinbi": 3420000000
|
||||
}
|
||||
},
|
||||
"10_6573c51480a92f081d78e1d9": {
|
||||
"item": {
|
||||
"1": 35600000,
|
||||
"12": 13000,
|
||||
"2": 67800,
|
||||
"6": 1180
|
||||
},
|
||||
"attr": {
|
||||
"rmbmoney": 12400,
|
||||
"jinbi": 630000000
|
||||
}
|
||||
},
|
||||
"10_6573ecd9a884822d24482a1a": {
|
||||
"item": {
|
||||
"1": 103200000,
|
||||
"18": 9490,
|
||||
"12": 28000,
|
||||
"2": 421600,
|
||||
"6": 1300
|
||||
},
|
||||
"attr": {
|
||||
"rmbmoney": 53400,
|
||||
"jinbi": 5210000000
|
||||
}
|
||||
},
|
||||
"11_657412487fe3541fe7241a60": {
|
||||
"item": {
|
||||
"1": 35000000,
|
||||
"12": 99300,
|
||||
"2": 110900,
|
||||
"6": 460
|
||||
},
|
||||
"attr": {
|
||||
"rmbmoney": 19200,
|
||||
"jinbi": 1830000000
|
||||
}
|
||||
},
|
||||
"11_657436eb3bc021c4e335f356": {
|
||||
"item": {
|
||||
"1": 197200000,
|
||||
"12": 243700,
|
||||
"2": 597200,
|
||||
"6": 2475
|
||||
},
|
||||
"attr": {
|
||||
"rmbmoney": 97400,
|
||||
"jinbi": 9930000000
|
||||
}
|
||||
},
|
||||
"11_657428e87fe3541fe7245b75": {
|
||||
"item": {
|
||||
"1": 71200000,
|
||||
"12": 64300,
|
||||
"2": 219300,
|
||||
"6": 910
|
||||
},
|
||||
"attr": {
|
||||
"rmbmoney": 37300,
|
||||
"jinbi": 3630000000
|
||||
}
|
||||
},
|
||||
"10_6573aeb2602e0a72e8279b54": {
|
||||
"item": {
|
||||
"1": 17800000,
|
||||
"12": 22300,
|
||||
"2": 58100,
|
||||
"6": 240
|
||||
},
|
||||
"attr": {
|
||||
"rmbmoney": 10500,
|
||||
"jinbi": 940000000
|
||||
}
|
||||
},
|
||||
"11_657447453bc021c4e3362403": {
|
||||
"item": {
|
||||
"1": 322000000,
|
||||
"18": 31290,
|
||||
"12": 134800,
|
||||
"2": 1297200,
|
||||
"6": 4035
|
||||
},
|
||||
"attr": {
|
||||
"rmbmoney": 162900,
|
||||
"jinbi": 16160000000
|
||||
}
|
||||
},
|
||||
"11_657405957b27be6c2f4cac11": {
|
||||
"item": {
|
||||
"1": 18600000,
|
||||
"18": 1050,
|
||||
"12": 74500,
|
||||
"2": 79900,
|
||||
"6": 245
|
||||
},
|
||||
"attr": {
|
||||
"rmbmoney": 12000,
|
||||
"jinbi": 980000000
|
||||
}
|
||||
},
|
||||
"14_6575004f7aecd430eb86fbb5": {
|
||||
"item": {
|
||||
"1": 44000000,
|
||||
"18": 3440,
|
||||
"12": 104800,
|
||||
"2": 182600,
|
||||
"6": 545
|
||||
},
|
||||
"attr": {
|
||||
"rmbmoney": 25300,
|
||||
"jinbi": 2270000000
|
||||
}
|
||||
},
|
||||
"16_6575d6ac2e4ba33a00a04cbc": {
|
||||
"item": {
|
||||
"1": 36600000,
|
||||
"12": 13000,
|
||||
"2": 108200,
|
||||
"6": 470
|
||||
},
|
||||
"attr": {
|
||||
"rmbmoney": 19100,
|
||||
"jinbi": 1870000000
|
||||
}
|
||||
},
|
||||
"12_6574823b27bd4264da470583": {
|
||||
"item": {
|
||||
"1": 8800000,
|
||||
"12": 123000,
|
||||
"2": 37500,
|
||||
"6": 115
|
||||
},
|
||||
"attr": {
|
||||
"rmbmoney": 7300,
|
||||
"jinbi": 530000000
|
||||
}
|
||||
},
|
||||
"16_6575b61caff1b610d8bc6c96": {
|
||||
"item": {
|
||||
"24": 6,
|
||||
"10": 200,
|
||||
"12": 55000,
|
||||
"600": 20,
|
||||
"18": 1400,
|
||||
"1": 16200000,
|
||||
"2": 64900,
|
||||
"6": 180,
|
||||
"9": 3500
|
||||
},
|
||||
"attr": {
|
||||
"rmbmoney": 14400,
|
||||
"jinbi": 840000000
|
||||
}
|
||||
},
|
||||
"14_6574f2e66c7af0fe3713b718": {
|
||||
"item": {
|
||||
"1": 48800000,
|
||||
"12": 12700,
|
||||
"2": 90900,
|
||||
"6": 655
|
||||
},
|
||||
"attr": {
|
||||
"rmbmoney": 12400,
|
||||
"jinbi": 1100000000
|
||||
}
|
||||
},
|
||||
"11_65740da4deb68620911e96ef": {
|
||||
"item": {
|
||||
"1": 64200000,
|
||||
"18": 5580,
|
||||
"12": 28300,
|
||||
"2": 265400,
|
||||
"6": 820
|
||||
},
|
||||
"attr": {
|
||||
"rmbmoney": 33800,
|
||||
"jinbi": 3270000000
|
||||
}
|
||||
},
|
||||
"15_657594c3a7981612a8ea7e0e": {
|
||||
"item": {
|
||||
"1": 96800000,
|
||||
"18": 8870,
|
||||
"12": 3700,
|
||||
"2": 397200,
|
||||
"6": 1230
|
||||
},
|
||||
"attr": {
|
||||
"rmbmoney": 50400,
|
||||
"jinbi": 4920000000
|
||||
}
|
||||
},
|
||||
"11_657434f8290f4393568f16fe": {
|
||||
"item": {
|
||||
"1": 129000000,
|
||||
"12": 198300,
|
||||
"2": 392100,
|
||||
"6": 1630
|
||||
},
|
||||
"attr": {
|
||||
"jinbi": 6500000000
|
||||
}
|
||||
},
|
||||
"14_657512ee7aecd430eb872b5d": {
|
||||
"item": {
|
||||
"1": 121800000,
|
||||
"12": 36400,
|
||||
"2": 363400,
|
||||
"6": 1530
|
||||
},
|
||||
"attr": {
|
||||
"rmbmoney": 31500,
|
||||
"jinbi": 6150000000
|
||||
}
|
||||
},
|
||||
"11_657454089beef4c060edab88": {
|
||||
"item": {
|
||||
"1": 96600000,
|
||||
"18": 8660,
|
||||
"12": 149200,
|
||||
"2": 392900,
|
||||
"6": 1215
|
||||
},
|
||||
"attr": {
|
||||
"rmbmoney": 49800,
|
||||
"jinbi": 4890000000
|
||||
}
|
||||
},
|
||||
"10_6573e8aa80a92f081d7930b4": {
|
||||
"item": {
|
||||
"1": 242400000,
|
||||
"18": 16210,
|
||||
"12": 84100,
|
||||
"2": 978800,
|
||||
"6": 3040
|
||||
},
|
||||
"attr": {
|
||||
"rmbmoney": 123100,
|
||||
"jinbi": 12180000000
|
||||
}
|
||||
},
|
||||
"11_6573fd7a08e89e5a6859446e": {
|
||||
"item": {
|
||||
"1": 178200000,
|
||||
"18": 16230,
|
||||
"12": 10900,
|
||||
"2": 717000,
|
||||
"6": 2225
|
||||
},
|
||||
"attr": {
|
||||
"rmbmoney": 92000,
|
||||
"jinbi": 8990000000
|
||||
}
|
||||
},
|
||||
"11_65744fe2d0256beb85eed193": {
|
||||
"item": {
|
||||
"1": 262800000,
|
||||
"18": 25540,
|
||||
"12": 55800,
|
||||
"2": 1057600,
|
||||
"6": 3275
|
||||
},
|
||||
"attr": {
|
||||
"rmbmoney": 134000,
|
||||
"jinbi": 13190000000
|
||||
}
|
||||
},
|
||||
"11_657440e7ee44bd9935bbbd7c": {
|
||||
"item": {
|
||||
"1": 83000000,
|
||||
"18": 7160,
|
||||
"12": 250900,
|
||||
"2": 341800,
|
||||
"6": 1055
|
||||
},
|
||||
"attr": {
|
||||
"rmbmoney": 43300,
|
||||
"jinbi": 4220000000
|
||||
}
|
||||
},
|
||||
"11_657420932dd070117eb15e92": {
|
||||
"item": {
|
||||
"1": 307400000,
|
||||
"18": 29210,
|
||||
"12": 50200,
|
||||
"2": 1239200,
|
||||
"6": 3880
|
||||
},
|
||||
"attr": {
|
||||
"jinbi": 15470000000
|
||||
}
|
||||
},
|
||||
"14_65750da36439ef15582d6e6d": {
|
||||
"item": {
|
||||
"1": 105000000,
|
||||
"12": 93900,
|
||||
"2": 361000,
|
||||
"6": 1335
|
||||
},
|
||||
"attr": {
|
||||
"rmbmoney": 54100,
|
||||
"jinbi": 5310000000
|
||||
}
|
||||
},
|
||||
"12_6574762427bd4264da46ce63": {
|
||||
"item": {
|
||||
"1": 44400000,
|
||||
"18": 3390,
|
||||
"12": 15900,
|
||||
"2": 185000,
|
||||
"6": 555
|
||||
},
|
||||
"attr": {
|
||||
"rmbmoney": 25000,
|
||||
"jinbi": 2290000000
|
||||
}
|
||||
},
|
||||
"16_6575e1625685671e63fe001f": {
|
||||
"item": {
|
||||
"1": 12600000,
|
||||
"2": 51400,
|
||||
"6": 155
|
||||
},
|
||||
"attr": {
|
||||
"rmbmoney": 9200,
|
||||
"jinbi": 710000000
|
||||
}
|
||||
},
|
||||
"10_6573e236a884822d244816a0": {
|
||||
"item": {
|
||||
"1": 76200000,
|
||||
"18": 6760,
|
||||
"12": 79600,
|
||||
"2": 310200,
|
||||
"6": 945
|
||||
},
|
||||
"attr": {
|
||||
"rmbmoney": 40700,
|
||||
"jinbi": 3870000000
|
||||
}
|
||||
},
|
||||
"10_6573a17268053554fe606611": {
|
||||
"item": {
|
||||
"1": 109200000,
|
||||
"18": 9410,
|
||||
"12": 58000,
|
||||
"2": 428000,
|
||||
"6": 2365
|
||||
},
|
||||
"attr": {
|
||||
"rmbmoney": 55000,
|
||||
"jinbi": 5240000000
|
||||
}
|
||||
},
|
||||
"15_657595a3a7981612a8ea8009": {
|
||||
"item": {
|
||||
"1": 19200000,
|
||||
"18": 830,
|
||||
"12": 74800,
|
||||
"2": 84100,
|
||||
"6": 1115
|
||||
},
|
||||
"attr": {
|
||||
"rmbmoney": 11300,
|
||||
"jinbi": 990000000
|
||||
}
|
||||
},
|
||||
"11_657438a83bc021c4e335f86e": {
|
||||
"item": {
|
||||
"1": 71200000,
|
||||
"18": 6300,
|
||||
"12": 55600,
|
||||
"2": 292500,
|
||||
"6": 905
|
||||
},
|
||||
"attr": {
|
||||
"rmbmoney": 37200,
|
||||
"jinbi": 3600000000
|
||||
}
|
||||
},
|
||||
"10_6573e0395fe4caaf29a9b83c": {
|
||||
"item": {
|
||||
"1": 9000000,
|
||||
"12": 184000,
|
||||
"2": 45800,
|
||||
"6": 135
|
||||
},
|
||||
"attr": {
|
||||
"rmbmoney": 6400,
|
||||
"jinbi": 530000000
|
||||
}
|
||||
},
|
||||
"10_6573e596dc05fa03150d7db1": {
|
||||
"item": {
|
||||
"1": 12800000,
|
||||
"18": 410,
|
||||
"12": 15400,
|
||||
"2": 60000,
|
||||
"6": 175
|
||||
},
|
||||
"attr": {
|
||||
"rmbmoney": 8200,
|
||||
"jinbi": 690000000
|
||||
}
|
||||
},
|
||||
"14_65752c79c85dd4cf1a874893": {
|
||||
"item": {
|
||||
"1": 14200000,
|
||||
"12": 33700,
|
||||
"2": 64500,
|
||||
"6": 185
|
||||
},
|
||||
"attr": {
|
||||
"rmbmoney": 8900,
|
||||
"jinbi": 790000000
|
||||
}
|
||||
},
|
||||
"12_657455ed6b804f4a6d4b53a2": {
|
||||
"item": {
|
||||
"1": 160800000,
|
||||
"18": 14900,
|
||||
"12": 4800,
|
||||
"2": 650900,
|
||||
"6": 2025
|
||||
},
|
||||
"attr": {
|
||||
"rmbmoney": 82000,
|
||||
"jinbi": 8080000000
|
||||
}
|
||||
},
|
||||
"12_657481316ad7b8861da8a914": {
|
||||
"item": {
|
||||
"1": 5600000,
|
||||
"18": 450,
|
||||
"12": 34600,
|
||||
"2": 25500,
|
||||
"6": 65
|
||||
},
|
||||
"attr": {
|
||||
"rmbmoney": 7800,
|
||||
"jinbi": 300000000
|
||||
}
|
||||
},
|
||||
"4_6571c11bb0b5337a4d3a63a0": {
|
||||
"item": {
|
||||
"24": 7,
|
||||
"10": 400,
|
||||
"12": 15600,
|
||||
"600": 50,
|
||||
"18": 190,
|
||||
"1": 5200000,
|
||||
"2": 16300,
|
||||
"6": 10,
|
||||
"9": 8500
|
||||
},
|
||||
"attr": {
|
||||
"rmbmoney": 8800,
|
||||
"jinbi": 310000000
|
||||
}
|
||||
},
|
||||
"10_6573714bc7069a58e96ba077": {
|
||||
"item": {
|
||||
"1": 14400000,
|
||||
"18": 610,
|
||||
"12": 11800,
|
||||
"2": 66400,
|
||||
"6": 190
|
||||
},
|
||||
"attr": {
|
||||
"rmbmoney": 9000,
|
||||
"jinbi": 770000000
|
||||
}
|
||||
},
|
||||
"11_65744ba29beef4c060ed803c": {
|
||||
"item": {
|
||||
"1": 331800000,
|
||||
"12": 14800,
|
||||
"2": 1001400,
|
||||
"6": 4155
|
||||
},
|
||||
"attr": {
|
||||
"rmbmoney": 167500,
|
||||
"jinbi": 16670000000
|
||||
}
|
||||
},
|
||||
"16_6575d57c5685671e63fdb6ee": {
|
||||
"item": {
|
||||
"1": 13600000,
|
||||
"12": 42700,
|
||||
"2": 44500,
|
||||
"6": 420
|
||||
},
|
||||
"attr": {
|
||||
"rmbmoney": 7000,
|
||||
"jinbi": 430000000
|
||||
}
|
||||
},
|
||||
"11_65743bb09beef4c060ed46e7": {
|
||||
"item": {
|
||||
"10": 300,
|
||||
"12": 8100,
|
||||
"600": 30,
|
||||
"18": 920,
|
||||
"1": 18400000,
|
||||
"2": 69600,
|
||||
"6": 170,
|
||||
"9": 4500
|
||||
},
|
||||
"attr": {
|
||||
"rmbmoney": 13700,
|
||||
"jinbi": 950000000
|
||||
}
|
||||
},
|
||||
"10_6573bb4b68053554fe60940c": {
|
||||
"item": {
|
||||
"1": 19400000,
|
||||
"18": 1080,
|
||||
"12": 63000,
|
||||
"2": 83100,
|
||||
"6": 235
|
||||
},
|
||||
"attr": {
|
||||
"rmbmoney": 12300,
|
||||
"jinbi": 1010000000
|
||||
}
|
||||
},
|
||||
"16_6575d97df2211cd2ff29ba12": {
|
||||
"item": {
|
||||
"1": 3400000,
|
||||
"12": 11100,
|
||||
"2": 16700,
|
||||
"6": 50
|
||||
},
|
||||
"attr": {
|
||||
"rmbmoney": 5000,
|
||||
"jinbi": 250000000
|
||||
}
|
||||
},
|
||||
"11_657434c6d0256beb85ee6fae": {
|
||||
"item": {
|
||||
"1": 80600000,
|
||||
"18": 7360,
|
||||
"12": 232000,
|
||||
"2": 332200,
|
||||
"6": 1025
|
||||
},
|
||||
"attr": {
|
||||
"rmbmoney": 42100,
|
||||
"jinbi": 4090000000
|
||||
}
|
||||
},
|
||||
"16_6575b6d0f6ef8b7da5c84bf0": {
|
||||
"item": {
|
||||
"1": 70600000,
|
||||
"12": 29700,
|
||||
"2": 218200,
|
||||
"6": 900
|
||||
},
|
||||
"attr": {
|
||||
"rmbmoney": 36000,
|
||||
"jinbi": 3610000000
|
||||
}
|
||||
},
|
||||
"10_6587fbf00c11d852663c5bbb": {
|
||||
"item": {
|
||||
"1": 26800000,
|
||||
"18": 1940,
|
||||
"12": 168000,
|
||||
"2": 118300,
|
||||
"6": 350
|
||||
},
|
||||
"attr": {
|
||||
"rmbmoney": 15300,
|
||||
"jinbi": 1410000000
|
||||
}
|
||||
},
|
||||
"10_657397c2f31ed0c046ef3730": {
|
||||
"item": {
|
||||
"1": 220800000,
|
||||
"18": 1900,
|
||||
"12": 8800,
|
||||
"2": 701400,
|
||||
"6": 2780
|
||||
},
|
||||
"attr": {
|
||||
"rmbmoney": 112100,
|
||||
"jinbi": 11100000000
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const uids = Object.keys(con);
|
||||
let _users = await G.mongodb.find('user', { uid: { $in: uids } })
|
||||
for (let i = 0; i < _users.length; i++) {
|
||||
let user = _users[i]
|
||||
const uid = user.uid
|
||||
const _delattr = con[uid]["attr"]
|
||||
const _delitem = con[uid]["item"]
|
||||
let _setUserData = {}
|
||||
let _dellog = { "attr": {}, "item": {} }
|
||||
for (let t in _delattr) {
|
||||
if (t == "rmbmoney") {
|
||||
let v = user.rmbmoney - _delattr[t]
|
||||
if (v < 0) { v = 0 }
|
||||
_setUserData[t] = v
|
||||
_dellog["attr"][t] = { "old": user.rmbmoney, "new": v }
|
||||
}
|
||||
else if (t == "jinbi") {
|
||||
let v = user.jinbi - _delattr[t]
|
||||
if (v < 0) { v = 0 }
|
||||
_setUserData[t] = v
|
||||
_dellog["attr"][t] = { "old": user.jinbi, "new": v }
|
||||
}
|
||||
}
|
||||
|
||||
const itemIds = Object.keys(_delitem);
|
||||
// 删除item
|
||||
let _itemlist = await G.mongodb.collection('item').find({ "uid": uid, "itemId": { "$in": itemIds } }).toArray();
|
||||
for (let i = 0; i < _itemlist.length; i++) {
|
||||
const _item = _itemlist[i]
|
||||
const _itemid = _item.itemId
|
||||
const del = _delitem[_itemid] || 0
|
||||
let v = _item.num - del
|
||||
if (v < 0) { v = 0 }
|
||||
let _setItemData = {}
|
||||
_setItemData["num"] = v
|
||||
_dellog["item"][_itemid] = { "old": _item.num, "new": v }
|
||||
await G.mongodb.collection('item').updateOne({ "uid": uid, "itemId": _itemid }, { "$set": _setItemData });
|
||||
}
|
||||
await G.mongodb.collection('user').updateOne({ "uid": uid }, { "$set": _setUserData });
|
||||
// 输出日志
|
||||
console.log(uid, ":", _dellog);
|
||||
}
|
||||
|
||||
return "sucess!!!"
|
||||
}
|
||||
|
||||
|
||||
|
||||
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();
|
@ -1,117 +0,0 @@
|
||||
import { ReqEmail } from "../monopoly/protocols/PtlEmail";
|
||||
import { patchInit } from "../patch";
|
||||
import { MsgEmail } from "../shared/protocols/msg_s2c/MsgEmail";
|
||||
import { PublicShared } from "../shared/public/public";
|
||||
|
||||
|
||||
class Path {
|
||||
|
||||
async addEmail(email: ReqEmail & { createTime?: number; }) {
|
||||
let { prize, uid, ...e } = email;
|
||||
let lng = await G.redis.rawGet(`user:lng:${uid}`)
|
||||
|
||||
let sendEmail: MsgEmail = {
|
||||
_id: null,
|
||||
uid: uid,
|
||||
type: e.type,
|
||||
title: e.lngTitle ? (e.lngTitle[lng] || e.lngTitle['ja']) : e.title,
|
||||
content: e.lngContent ? (e.lngContent[lng] || e.lngContent['ja']) : e.content,
|
||||
createTime: e.createTime || G.time,
|
||||
contentInsertArr: e.contentInsertArr || []
|
||||
};
|
||||
|
||||
if (prize?.length > 0) {
|
||||
sendEmail.prizeData = {
|
||||
prize: email.prize,
|
||||
isGet: false
|
||||
};
|
||||
}
|
||||
|
||||
if (email.g123log && Object.keys(email.g123log).length > 0) sendEmail.g123log = email.g123log;
|
||||
|
||||
if (email.lngTitle) {
|
||||
sendEmail.lngTitle = email.lngTitle
|
||||
sendEmail.lngContent = email.lngContent
|
||||
}
|
||||
|
||||
await G.mongodb.collection('email').insertOne({
|
||||
ttl: new Date(), ...G.mongodb.conversionIdObj(sendEmail)
|
||||
});
|
||||
}
|
||||
|
||||
async fun1(a: any) {
|
||||
let taskType = 2;
|
||||
let users = await G.mongodb.collection('user').find({ loginTime: { $gte: 1704643200 } }).toArray();
|
||||
for (let i = 0; i < users.length; i++) {
|
||||
let user = users[i];
|
||||
let unFinishTask = (await G.mongodb.collection('task').find({
|
||||
uid: user.uid, type: taskType, finish: 0
|
||||
}, { projection: { taskid: 1 } }).toArray()).map(i => i.taskid);
|
||||
|
||||
if (unFinishTask.length >= 2) {
|
||||
let deltask = unFinishTask.sort().slice(1);
|
||||
await G.mongodb.collection("task").deleteOne({
|
||||
uid: user.uid, taskid: { $in: deltask }
|
||||
});
|
||||
console.log(`删除玩家${user.uid}任务:${deltask}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 补发玩家终身卡奖励
|
||||
*/
|
||||
async fun2(a: any) {
|
||||
let logs = await G.mongodb.collection("payLogNew").find(
|
||||
{ key: "zhongshenka", del_time: { $exists: false } }, { projection: { _id: 0, } }
|
||||
).toArray();
|
||||
|
||||
if (logs.length == 0) {
|
||||
console.log("没有终身卡数据,不发放终身卡");
|
||||
return
|
||||
}
|
||||
|
||||
let wzt = PublicShared.getToWeekMondayZeroTime();
|
||||
let con = G.gc.payEmail.zhongshenka.filter(e => e.day == 7)[0];
|
||||
for (let i = 0; i < logs.length; i++) {
|
||||
|
||||
// 查询玩家邮件
|
||||
let emails = await G.mongodb.collection('email').find({
|
||||
uid: logs[i].uid, title: con.title, createTime: { $gte: wzt }
|
||||
}).toArray();
|
||||
|
||||
|
||||
if (emails.length == 0) {
|
||||
// 发送邮件
|
||||
this.addEmail({
|
||||
uid: logs[i].uid,
|
||||
type: "system",
|
||||
title: con.title,
|
||||
content: con.content,
|
||||
contentInsertArr: [],
|
||||
createTime: G.time,
|
||||
prize: con.prize,
|
||||
})
|
||||
console.log("发放终身卡", logs[i].uid);
|
||||
} else {
|
||||
console.log("本周已发送过 不发放终身卡", logs[i].uid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async run() {
|
||||
await this.fun1(1);
|
||||
await this.fun2(1);
|
||||
}
|
||||
}
|
||||
|
||||
async function main() {
|
||||
await patchInit()
|
||||
let patch = new Path();
|
||||
await patch.run();
|
||||
console.log("逻辑执行完成,等待退出");
|
||||
setTimeout(function () {
|
||||
console.log('结束程序');
|
||||
process.exit();
|
||||
}, 3000);
|
||||
}
|
||||
main();
|
@ -1,61 +0,0 @@
|
||||
import {ReqEmail} from "../monopoly/protocols/PtlEmail";
|
||||
import {patchInit} from "../patch";
|
||||
import {MsgEmail} from "../shared/protocols/msg_s2c/MsgEmail";
|
||||
import {PublicShared} from "../shared/public/public";
|
||||
|
||||
|
||||
class Path {
|
||||
async fun1(a: any) {
|
||||
let taskType = 2;
|
||||
let users = await G.mongodb.collection('user').find({}, {
|
||||
projection: {uid: 1}
|
||||
}).toArray();
|
||||
// let users = await G.mongodb.collection('user').find({ loginTime: { $gte: 1704643200 } }).toArray();
|
||||
for (let i = 0; i < users.length; i++) {
|
||||
let user = users[i];
|
||||
|
||||
console.log(`处理玩家${user.uid}数据`);
|
||||
let task = Object.assign({}, ...(await G.mongodb.collection('task').find({
|
||||
uid: user.uid, type: taskType
|
||||
}, {projection: {taskid: 1, finish: 1}}).toArray()).map(i => {
|
||||
return {[i.taskid]: i.finish}
|
||||
}))
|
||||
|
||||
let deltask = [];
|
||||
let sortTask = Object.keys(task).sort();
|
||||
|
||||
for (let taskid of sortTask) {
|
||||
if (task[taskid] == 1) continue;
|
||||
let con = G.gc.task[taskType][taskid];
|
||||
if (task[con.followtask]) {
|
||||
let i = sortTask.indexOf(taskid);
|
||||
deltask.push(...sortTask.slice(i + 1).map(i => Number(i)));
|
||||
}
|
||||
}
|
||||
|
||||
if (deltask.length > 0) {
|
||||
await G.mongodb.collection("task").deleteMany(
|
||||
{uid: user.uid, taskid: {$in: deltask}}
|
||||
)
|
||||
console.log(`删除玩家${user.uid}任务:${deltask}`)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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();
|
@ -1,68 +0,0 @@
|
||||
import { ReqEmail } from "../monopoly/protocols/PtlEmail";
|
||||
import { patchInit } from "../patch";
|
||||
import { MsgEmail } from "../shared/protocols/msg_s2c/MsgEmail";
|
||||
import { PublicShared } from "../shared/public/public";
|
||||
|
||||
|
||||
class Path {
|
||||
async fun1(a: any) {
|
||||
let uids = [
|
||||
"4_6571ab682b3f80154e724f2a",
|
||||
"16_6575e1625685671e63fe001f",
|
||||
"13_6574ad08e7cc32b4bd1334e8",
|
||||
"13_65749bc319cab1affec349fb",
|
||||
];
|
||||
|
||||
// 删除玩家背包中的头像框
|
||||
let items = await G.mongodb.collection("item").find({ uid: { $nin: uids }, itemId: { $in: ["47", "48"] } }).toArray();
|
||||
for (let item of items) {
|
||||
console.log(`删除玩家${item.uid}的头像框道具${item.itemId}`);
|
||||
await G.mongodb.collection("item").updateOne({ _id: item._id }, { $set: { uid: `patch_del_${item.uid}` } });
|
||||
}
|
||||
|
||||
// 删除玩家存在的头像框
|
||||
let users = await G.mongodb.collection("user").find({
|
||||
uid: { $nin: uids }, $or: [
|
||||
{ ["headFrame.id"]: "8" },
|
||||
{ ["headFrame.id"]: "14" },
|
||||
{ ["headFrames.8"]: { $exists: true } },
|
||||
{ ["headFrames.14"]: { $exists: true } },
|
||||
]
|
||||
}).toArray();
|
||||
for (let user of users) {
|
||||
let change = { $set: {}, $unset: {} };
|
||||
if (user.headFrame?.id == "8" || user.headFrame?.id == "14") {
|
||||
change.$set = { headFrame: { id: "1", time: -1 } };
|
||||
}
|
||||
|
||||
if (user.headFrames["8"] != undefined) {
|
||||
change.$unset["headFrames.8"] = 1;
|
||||
}
|
||||
|
||||
if (user.headFrames["14"] != undefined) {
|
||||
change.$unset["headFrames.14"] = 1;
|
||||
}
|
||||
if (Object.keys(change.$set).length > 0 || Object.keys(change.$unset).length > 0) {
|
||||
console.log(`处理玩家${user.uid}数据:${JSON.stringify(change)}`);
|
||||
await G.mongodb.collection("user").updateOne({ _id: user._id }, change);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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();
|
@ -1,80 +0,0 @@
|
||||
import { patchFun, patchInit } from "../patch";
|
||||
|
||||
class Path {
|
||||
|
||||
async huodong2(a: any) {
|
||||
const con ={
|
||||
2000:[
|
||||
{ payId: '', num: 1, prize: [{a: 'item', t: '49', n: 20}, {a: 'attr', t: 'rmbmoney', n: 200}], free: true },
|
||||
{ payId: 'duihuan_1_1', prize: [{a: 'item', t: '49', n: 50}, {a: 'attr', t: 'rmbmoney', n: 600}], free: false },
|
||||
{ payId: 'duihuan_1_2', prize: [{a: 'item', t: '49', n: 100}, {a: 'attr', t: 'rmbmoney', n: 1360}], free: false },
|
||||
{ payId: 'duihuan_1_3', prize: [{a: 'item', t: '49', n: 200}, {a: 'attr', t: 'rmbmoney', n: 2560}], free: false },
|
||||
{ payId: 'duihuan_1_4', prize: [{a: 'item', t: '49', n: 600}, {a: 'attr', t: 'rmbmoney', n: 6560}], free: false },
|
||||
{ payId: 'duihuan_1_5', prize: [{a: 'item', t: '49', n: 1200}, {a: 'attr', t: 'rmbmoney', n: 12960}], free: false },
|
||||
],
|
||||
2001: [
|
||||
{ payId: '', num: 1, prize: [{a: 'item', t: '49', n: 20}, {a: 'attr', t: 'rmbmoney', n: 200}], free: true },
|
||||
{ payId: 'duihuan_3_1', prize: [{a: 'item', t: '49', n: 50}, {a: 'attr', t: 'rmbmoney', n: 600}], free: false },
|
||||
{ payId: 'duihuan_3_2', prize: [{a: 'item', t: '49', n: 100}, {a: 'attr', t: 'rmbmoney', n: 1360}], free: false },
|
||||
{ payId: 'duihuan_3_3', prize: [{a: 'item', t: '49', n: 200}, {a: 'attr', t: 'rmbmoney', n: 2560}], free: false },
|
||||
{ payId: 'duihuan_3_4', prize: [{a: 'item', t: '49', n: 600}, {a: 'attr', t: 'rmbmoney', n: 6560}], free: false },
|
||||
{ payId: 'duihuan_3_5', prize: [{a: 'item', t: '49', n: 1200}, {a: 'attr', t: 'rmbmoney', n: 12960}], free: false },
|
||||
],
|
||||
2002: [
|
||||
{ payId: '', num: 1, prize: [{a: 'item', t: '50', n: 20}, {a: 'attr', t: 'rmbmoney', n: 200}], free: true },
|
||||
{ payId: 'duihuan_2_1', prize: [{a: 'item', t: '50', n: 50}, {a: 'attr', t: 'rmbmoney', n: 600}], free: false },
|
||||
{ payId: 'duihuan_2_2', prize: [{a: 'item', t: '50', n: 100}, {a: 'attr', t: 'rmbmoney', n: 1360}], free: false },
|
||||
{ payId: 'duihuan_2_3', prize: [{a: 'item', t: '50', n: 200}, {a: 'attr', t: 'rmbmoney', n: 2560}], free: false },
|
||||
{ payId: 'duihuan_2_4', prize: [{a: 'item', t: '50', n: 600}, {a: 'attr', t: 'rmbmoney', n: 6560}], free: false },
|
||||
{ payId: 'duihuan_2_5', prize: [{a: 'item', t: '50', n: 1200}, {a: 'attr', t: 'rmbmoney', n: 12960}], free: false },
|
||||
],
|
||||
2003: [
|
||||
{ payId: '', num: 1, prize: [{a: 'item', t: '50', n: 20}, {a: 'attr', t: 'rmbmoney', n: 200}], free: true },
|
||||
{ payId: 'duihuan_4_1', prize: [{a: 'item', t: '50', n: 50}, {a: 'attr', t: 'rmbmoney', n: 600}], free: false },
|
||||
{ payId: 'duihuan_4_2', prize: [{a: 'item', t: '50', n: 100}, {a: 'attr', t: 'rmbmoney', n: 1360}], free: false },
|
||||
{ payId: 'duihuan_4_3', prize: [{a: 'item', t: '50', n: 200}, {a: 'attr', t: 'rmbmoney', n: 2560}], free: false },
|
||||
{ payId: 'duihuan_4_4', prize: [{a: 'item', t: '50', n: 600}, {a: 'attr', t: 'rmbmoney', n: 6560}], free: false },
|
||||
{ payId: 'duihuan_4_5', prize: [{a: 'item', t: '50', n: 1200}, {a: 'attr', t: 'rmbmoney', n: 12960}], free: false },
|
||||
],
|
||||
}
|
||||
|
||||
const hdids = [2000,2001,2002,2003]
|
||||
const hdinfos = await G.mongodb.find('hdinfo', { hdid: { $in: hdids } })
|
||||
for (let i = 0; i < hdinfos.length; i++) {
|
||||
let hdinfo = hdinfos[i]
|
||||
hdinfo.data.event.gift = con[hdinfo.hdid]
|
||||
console.log(hdinfo.hdid,hdinfo.data.event.gift)
|
||||
await G.mongodb.collection('hdinfo').updateOne({ "hdid": hdinfo.hdid}, { "$set": {"data": hdinfo.data}});
|
||||
console.log(hdinfo.hdid,"finish")
|
||||
}
|
||||
return "sucess!!!"
|
||||
}
|
||||
|
||||
async headFrame(a: any) {
|
||||
const users = await G.mongodb.find('user', {"headFrames.25": {"$exists": 1}})
|
||||
for (let i = 0; i < users.length; i++) {
|
||||
let user = users[i]
|
||||
user.headFrames["25"] = -1
|
||||
await G.mongodb.collection('user').updateOne({ "uid": user.uid}, { "$set": {"headFrames": user.headFrames} });
|
||||
console.log(user.uid, user.headFrames)
|
||||
}
|
||||
return "sucess!!!"
|
||||
}
|
||||
|
||||
async run() {
|
||||
await this.huodong2(1);
|
||||
await this.headFrame(1);
|
||||
}
|
||||
}
|
||||
|
||||
async function main() {
|
||||
await patchInit()
|
||||
let patch = new Path();
|
||||
await patch.run();
|
||||
console.log("逻辑执行完成,等待退出");
|
||||
setTimeout(function () {
|
||||
console.log('结束程序');
|
||||
process.exit();
|
||||
}, 3000);
|
||||
}
|
||||
main();
|
@ -15,15 +15,13 @@ import { ZhanLingTasks } from './public/zhanling';
|
||||
import { player } from './shared/protocols/user/type';
|
||||
import { PublicShared } from './shared/public/public';
|
||||
import { setGud } from './public/gud';
|
||||
import { checkResetBuyLog } from "./api_s2c/event/zhoumolibao/ApiOpen";
|
||||
import { PushGiftFun } from "./public/pushgift";
|
||||
import { LeiChongLiBaoBuyGift } from "./api_s2c/event/leichonglibao/ApiReceive";
|
||||
import {checkResetBuyLog} from "./api_s2c/event/zhoumolibao/ApiOpen";
|
||||
import {Christmasfun} from "./api_s2c/event/christmas/fun";
|
||||
import {PushGiftFun} from "./public/pushgift";
|
||||
import {LeiChongLiBaoBuyGift} from "./api_s2c/event/leichonglibao/ApiReceive";
|
||||
import { HongDianChange } from './api_s2c/hongdian/fun';
|
||||
import HQJGFun from './api_s2c/event/huangqijiuguan/fun';
|
||||
|
||||
export type gEventType = {
|
||||
/**新的一天 */
|
||||
NEW_DAY: (time: number) => void;
|
||||
/**玩家断开连接 */
|
||||
PLAYER_DISCONNECT: (uid: string) => void;
|
||||
/**玩家修改名字 */
|
||||
@ -154,8 +152,6 @@ export type gEventType = {
|
||||
Class_task_157: (eventname, call, val, chkVal) => void;
|
||||
/**今日参与{1}次抓娃娃小游戏 */
|
||||
Class_task_158: (eventname, call, val, chkVal) => void;
|
||||
/**黄旗酒馆累计抽卡X次*/
|
||||
Class_task_159: (eventname, call, val, chkVal) => void;
|
||||
};
|
||||
|
||||
export function addListener() {
|
||||
@ -169,7 +165,7 @@ export function addListener() {
|
||||
XstaskFun.uidTask[uid] = null;
|
||||
delete XstaskFun.uidTask[uid];
|
||||
}
|
||||
setGud(uid, { logoutTime: G.time });
|
||||
setGud(uid,{ logoutTime: G.time });
|
||||
G.mongodb.collection('user').updateOne({ uid: uid }, { $set: { logoutTime: G.time } });
|
||||
});
|
||||
|
||||
@ -181,7 +177,7 @@ export function addListener() {
|
||||
}
|
||||
});
|
||||
|
||||
G.on('PLAYER_PAY', async (player, payId, payArgs, call) => {
|
||||
G.on('PLAYER_PAY', async (player, payId, payArgs,call) => {
|
||||
let conf: any = await PayFun.getConf(payId, payArgs);
|
||||
ActionLog.addDayLog(player.uid, { key: 'pay', val: conf.payExp[0].n });
|
||||
ActionLog.addRetainLog(player.uid, { key: 'pay', val: conf.payExp[0].n });
|
||||
@ -265,9 +261,4 @@ export function addListener() {
|
||||
let call = PayFun.getCall(gud);
|
||||
G.emit("Class_task_134", 'Class_task_134', call, 1, 0, items);
|
||||
});
|
||||
|
||||
// 黄旗酒馆
|
||||
G.on("NEW_DAY", HQJGFun.dayDpsLvPrize.bind(HQJGFun));
|
||||
G.on("NEW_DAY", HQJGFun.endDpsRankPrize.bind(HQJGFun));
|
||||
G.on("PLAYER_PAY", HQJGFun.buy.bind(HQJGFun));
|
||||
}
|
@ -10,7 +10,6 @@
|
||||
//累计x个密宝可领取一次奖励
|
||||
getPrizeByMiBaoNum: 6,
|
||||
//每天重置后回退的层数
|
||||
//这个值没用刺鸟那边写了公式不用这个值了
|
||||
dayResetBackLayer: 6,
|
||||
//每周重置后回退的层数
|
||||
weekResetBackLayer: 0,
|
||||
|
@ -7181,27 +7181,6 @@
|
||||
"rarity": 4
|
||||
}
|
||||
},
|
||||
"item^50012": {
|
||||
"itemId": "item^50012",
|
||||
"name": "花漫大地",
|
||||
"i18nKey": "playerheadFrame_name_26",
|
||||
"detailI18nKey": "intr_item_describe_50012",
|
||||
"iconUrl": "https://ik.imagekit.io/g123/production-ctw-box/game-box/preview/6ffd84658d75d5247f7f01b2f00ae3e6beda7163237c025ff8f0a58c.png",
|
||||
"value": 0,
|
||||
"typeId": "item",
|
||||
"typeName": "道具",
|
||||
"isStoreSupported": true,
|
||||
"isAiSupported": true,
|
||||
"attributes": {
|
||||
"storeDisplayPrice": null,
|
||||
"storeCategory": "",
|
||||
"setQuantity": 1,
|
||||
"purchaseLimit": 0,
|
||||
"sellMinCp": 100,
|
||||
"sellMaxCp": 500,
|
||||
"rarity": 5
|
||||
}
|
||||
},
|
||||
"item^50101": {
|
||||
"itemId": "item^50101",
|
||||
"name": "冰天雪地",
|
||||
@ -7496,69 +7475,6 @@
|
||||
"rarity": 5
|
||||
}
|
||||
},
|
||||
"item^80001": {
|
||||
"itemId": "item^80001",
|
||||
"name": "白色朗姆酒",
|
||||
"i18nKey": "intr_item_name_80001",
|
||||
"detailI18nKey": "intr_item_describe_80001",
|
||||
"iconUrl": "https://ik.imagekit.io/g123/production-ctw-box/game-box/preview/6ffd84658d75d5247f7f01b2f00ae3e6beda7163237c025ff8f0a58c.png",
|
||||
"value": 0,
|
||||
"typeId": "item",
|
||||
"typeName": "道具",
|
||||
"isStoreSupported": true,
|
||||
"isAiSupported": true,
|
||||
"attributes": {
|
||||
"storeDisplayPrice": null,
|
||||
"storeCategory": "",
|
||||
"setQuantity": 1,
|
||||
"purchaseLimit": 0,
|
||||
"sellMinCp": 100,
|
||||
"sellMaxCp": 500,
|
||||
"rarity": 4
|
||||
}
|
||||
},
|
||||
"item^80002": {
|
||||
"itemId": "item^80002",
|
||||
"name": "金色朗姆酒",
|
||||
"i18nKey": "intr_item_name_80002",
|
||||
"detailI18nKey": "intr_item_describe_80002",
|
||||
"iconUrl": "https://ik.imagekit.io/g123/production-ctw-box/game-box/preview/6ffd84658d75d5247f7f01b2f00ae3e6beda7163237c025ff8f0a58c.png",
|
||||
"value": 0,
|
||||
"typeId": "item",
|
||||
"typeName": "道具",
|
||||
"isStoreSupported": true,
|
||||
"isAiSupported": true,
|
||||
"attributes": {
|
||||
"storeDisplayPrice": null,
|
||||
"storeCategory": "",
|
||||
"setQuantity": 1,
|
||||
"purchaseLimit": 0,
|
||||
"sellMinCp": 100,
|
||||
"sellMaxCp": 500,
|
||||
"rarity": 5
|
||||
}
|
||||
},
|
||||
"item^80003": {
|
||||
"itemId": "item^80003",
|
||||
"name": "黑色朗姆酒",
|
||||
"i18nKey": "intr_item_name_80003",
|
||||
"detailI18nKey": "intr_item_describe_80003",
|
||||
"iconUrl": "https://ik.imagekit.io/g123/production-ctw-box/game-box/preview/6ffd84658d75d5247f7f01b2f00ae3e6beda7163237c025ff8f0a58c.png",
|
||||
"value": 0,
|
||||
"typeId": "item",
|
||||
"typeName": "道具",
|
||||
"isStoreSupported": true,
|
||||
"isAiSupported": true,
|
||||
"attributes": {
|
||||
"storeDisplayPrice": null,
|
||||
"storeCategory": "",
|
||||
"setQuantity": 1,
|
||||
"purchaseLimit": 0,
|
||||
"sellMinCp": 100,
|
||||
"sellMaxCp": 500,
|
||||
"rarity": 6
|
||||
}
|
||||
},
|
||||
"equip^1001": {
|
||||
"itemId": "equip^1001",
|
||||
"name": "棉布头盔",
|
||||
@ -10918,67 +10834,5 @@
|
||||
"sellMaxCp": 500,
|
||||
"rarity": 5
|
||||
}
|
||||
},
|
||||
"attr^huangqijinbi": {
|
||||
"itemId": "attr^huangqijinbi",
|
||||
"name": "黄旗金币",
|
||||
"i18nKey": "intr_attr_name_18",
|
||||
"detailI18nKey": "intr_attr_describe_18",
|
||||
"iconUrl": "https://ik.imagekit.io/g123/production-ctw-box/game-box/preview/6ffd84658d75d5247f7f01b2f00ae3e6beda7163237c025ff8f0a58c.png",
|
||||
"value": 240,
|
||||
"typeId": "attr",
|
||||
"typeName": "货币",
|
||||
"isStoreSupported": true,
|
||||
"isAiSupported": true,
|
||||
"attributes": {
|
||||
"storeDisplayPrice": null,
|
||||
"storeCategory": "",
|
||||
"setQuantity": 1,
|
||||
"purchaseLimit": 0,
|
||||
"sellMinCp": 100,
|
||||
"sellMaxCp": 500,
|
||||
"rarity": 5
|
||||
}
|
||||
},
|
||||
"attr^huangqiduihuan": {
|
||||
"itemId": "attr^huangqiduihuan",
|
||||
"name": "黄旗票券",
|
||||
"i18nKey": "intr_attr_name_19",
|
||||
"detailI18nKey": "intr_attr_describe_19",
|
||||
"iconUrl": "https://ik.imagekit.io/g123/production-ctw-box/game-box/preview/6ffd84658d75d5247f7f01b2f00ae3e6beda7163237c025ff8f0a58c.png",
|
||||
"value": 20,
|
||||
"typeId": "attr",
|
||||
"typeName": "货币",
|
||||
"isStoreSupported": true,
|
||||
"isAiSupported": true,
|
||||
"attributes": {
|
||||
"storeDisplayPrice": null,
|
||||
"storeCategory": "",
|
||||
"setQuantity": 1,
|
||||
"purchaseLimit": 0,
|
||||
"sellMinCp": 100,
|
||||
"sellMaxCp": 500,
|
||||
"rarity": 5
|
||||
}
|
||||
},
|
||||
"heroskin^50011": {
|
||||
"itemId": "heroskin^50011",
|
||||
"name": "兔女郎",
|
||||
"i18nKey": "heroSkin_name_1",
|
||||
"iconUrl": "https://ik.imagekit.io/g123/production-ctw-box/game-box/preview/6ffd84658d75d5247f7f01b2f00ae3e6beda7163237c025ff8f0a58c.png",
|
||||
"value": 20000,
|
||||
"typeId": "heroskin",
|
||||
"typeName": "干部皮肤",
|
||||
"isStoreSupported": true,
|
||||
"isAiSupported": true,
|
||||
"attributes": {
|
||||
"storeDisplayPrice": null,
|
||||
"storeCategory": "",
|
||||
"setQuantity": 1,
|
||||
"purchaseLimit": 0,
|
||||
"sellMinCp": 100,
|
||||
"sellMaxCp": 500,
|
||||
"rarity": 5
|
||||
}
|
||||
}
|
||||
}
|
@ -3,176 +3,187 @@
|
||||
"id": 40021,
|
||||
"heroId": 4002,
|
||||
"name": "heroSkin_name_6",
|
||||
"des": "heroSkin_des_6",
|
||||
"undefined": "龙行天下",
|
||||
"model": 40021,
|
||||
"card": 40021,
|
||||
"head": 40021,
|
||||
"battle": 40021,
|
||||
"colour": 5,
|
||||
"icon": 40021,
|
||||
"colour": 4,
|
||||
"zhuanhuan": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "80002",
|
||||
"n": 200
|
||||
"t": "icon_pifucailiao_cheng",
|
||||
"n": 10
|
||||
}
|
||||
],
|
||||
"display": 0,
|
||||
"advancedEffects": "ani_xiangzikuang"
|
||||
]
|
||||
},
|
||||
"40061": {
|
||||
"id": 40061,
|
||||
"heroId": 4006,
|
||||
"name": "heroSkin_name_7",
|
||||
"des": "heroSkin_des_7",
|
||||
"undefined": "假面魅姬",
|
||||
"model": 40061,
|
||||
"card": 40061,
|
||||
"head": 40061,
|
||||
"battle": 40061,
|
||||
"colour": 5,
|
||||
"icon": 40061,
|
||||
"colour": 4,
|
||||
"zhuanhuan": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "80002",
|
||||
"n": 200
|
||||
"t": "icon_pifucailiao_cheng",
|
||||
"n": 10
|
||||
}
|
||||
],
|
||||
"display": 0,
|
||||
"advancedEffects": "ani_xiangzikuang"
|
||||
]
|
||||
},
|
||||
"40071": {
|
||||
"id": 40071,
|
||||
"heroId": 4007,
|
||||
"name": "heroSkin_name_8",
|
||||
"des": "heroSkin_des_8",
|
||||
"undefined": "樱花之舞",
|
||||
"model": 40071,
|
||||
"card": 40071,
|
||||
"head": 40071,
|
||||
"battle": 40071,
|
||||
"colour": 5,
|
||||
"icon": 40071,
|
||||
"colour": 4,
|
||||
"zhuanhuan": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "80002",
|
||||
"n": 200
|
||||
"t": "icon_pifucailiao_cheng",
|
||||
"n": 10
|
||||
}
|
||||
],
|
||||
"display": 0,
|
||||
"advancedEffects": "ani_xiangzikuang"
|
||||
]
|
||||
},
|
||||
"50011": {
|
||||
"id": 50011,
|
||||
"heroId": 5001,
|
||||
"name": "heroSkin_name_1",
|
||||
"des": "heroSkin_des_1",
|
||||
"undefined": "兔女郎",
|
||||
"model": 50011,
|
||||
"card": 50011,
|
||||
"head": 50011,
|
||||
"battle": 50011,
|
||||
"colour": 6,
|
||||
"icon": 50011,
|
||||
"colour": 5,
|
||||
"zhuanhuan": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "80003",
|
||||
"n": 200
|
||||
"t": "icon_pifucailiao_hong",
|
||||
"n": 10
|
||||
}
|
||||
],
|
||||
"display": 1,
|
||||
"advancedEffects": "ani_xiangzihong"
|
||||
]
|
||||
},
|
||||
"50012": {
|
||||
"id": 50012,
|
||||
"heroId": 5001,
|
||||
"name": "heroSkin_name_8",
|
||||
"undefined": "樱花之舞",
|
||||
"model": 40071,
|
||||
"card": 40071,
|
||||
"head": 40071,
|
||||
"colour": 4,
|
||||
"zhuanhuan": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "icon_pifucailiao_cheng",
|
||||
"n": 10
|
||||
}
|
||||
]
|
||||
},
|
||||
"50013": {
|
||||
"id": 50013,
|
||||
"heroId": 5001,
|
||||
"name": "heroSkin_name_8",
|
||||
"undefined": "樱花之舞",
|
||||
"model": 40071,
|
||||
"card": 40071,
|
||||
"head": 40071,
|
||||
"colour": 4,
|
||||
"zhuanhuan": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "icon_pifucailiao_cheng",
|
||||
"n": 10
|
||||
}
|
||||
]
|
||||
},
|
||||
"50014": {
|
||||
"id": 50014,
|
||||
"heroId": 5001,
|
||||
"name": "heroSkin_name_8",
|
||||
"undefined": "樱花之舞",
|
||||
"model": 40071,
|
||||
"card": 40071,
|
||||
"head": 40071,
|
||||
"colour": 4,
|
||||
"zhuanhuan": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "icon_pifucailiao_cheng",
|
||||
"n": 10
|
||||
}
|
||||
]
|
||||
},
|
||||
"50021": {
|
||||
"id": 50021,
|
||||
"heroId": 5002,
|
||||
"name": "heroSkin_name_2",
|
||||
"des": "heroSkin_des_2",
|
||||
"undefined": "大尉之风",
|
||||
"model": 50021,
|
||||
"card": 50021,
|
||||
"head": 50021,
|
||||
"battle": 50021,
|
||||
"colour": 6,
|
||||
"icon": 50021,
|
||||
"colour": 5,
|
||||
"zhuanhuan": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "80003",
|
||||
"n": 200
|
||||
"t": "icon_pifucailiao_hong",
|
||||
"n": 10
|
||||
}
|
||||
],
|
||||
"display": 0,
|
||||
"advancedEffects": "ani_xiangzihong"
|
||||
]
|
||||
},
|
||||
"50031": {
|
||||
"id": 50031,
|
||||
"heroId": 5003,
|
||||
"name": "heroSkin_name_3",
|
||||
"des": "heroSkin_des_3",
|
||||
"undefined": "西装暴徒",
|
||||
"model": 50031,
|
||||
"card": 50031,
|
||||
"head": 50031,
|
||||
"battle": 50031,
|
||||
"colour": 6,
|
||||
"icon": 50031,
|
||||
"colour": 5,
|
||||
"zhuanhuan": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "80003",
|
||||
"n": 200
|
||||
"t": "icon_pifucailiao_hong",
|
||||
"n": 10
|
||||
}
|
||||
],
|
||||
"display": 0,
|
||||
"advancedEffects": "ani_xiangzihong"
|
||||
]
|
||||
},
|
||||
"50041": {
|
||||
"id": 50041,
|
||||
"heroId": 5004,
|
||||
"name": "heroSkin_name_4",
|
||||
"des": "heroSkin_des_4",
|
||||
"undefined": "浪客剑心",
|
||||
"model": 50041,
|
||||
"card": 50041,
|
||||
"head": 50041,
|
||||
"battle": 50041,
|
||||
"colour": 6,
|
||||
"icon": 50041,
|
||||
"colour": 5,
|
||||
"zhuanhuan": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "80003",
|
||||
"n": 200
|
||||
"t": "icon_pifucailiao_hong",
|
||||
"n": 10
|
||||
}
|
||||
],
|
||||
"display": 0,
|
||||
"advancedEffects": "ani_xiangzihong"
|
||||
]
|
||||
},
|
||||
"50051": {
|
||||
"id": 50051,
|
||||
"heroId": 5005,
|
||||
"name": "heroSkin_name_5",
|
||||
"des": "heroSkin_des_5",
|
||||
"undefined": "猎犬出动",
|
||||
"model": 50051,
|
||||
"card": 50051,
|
||||
"head": 50051,
|
||||
"battle": 50051,
|
||||
"colour": 6,
|
||||
"icon": 50051,
|
||||
"colour": 5,
|
||||
"zhuanhuan": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "80003",
|
||||
"n": 200
|
||||
"t": "icon_pifucailiao_hong",
|
||||
"n": 10
|
||||
}
|
||||
],
|
||||
"display": 0,
|
||||
"advancedEffects": "ani_xiangzihong"
|
||||
]
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -9811,7 +9811,7 @@
|
||||
"undpspro": 0.06,
|
||||
"speed": 20,
|
||||
"hp": 33800,
|
||||
"pvpdpsdrop": 0.3,
|
||||
"pvpdpspro": 0.3,
|
||||
"atkpro": 1.4,
|
||||
"defpro": 1.4,
|
||||
"hppro": 1.4,
|
||||
@ -9848,7 +9848,7 @@
|
||||
"undpspro": 0.06,
|
||||
"speed": 20,
|
||||
"hp": 33800,
|
||||
"pvpdpsdrop": 0.3,
|
||||
"pvpdpspro": 0.3,
|
||||
"atkpro": 1.8,
|
||||
"defpro": 1.8,
|
||||
"hppro": 1.8,
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -2114,7 +2114,7 @@
|
||||
"638": {
|
||||
"id": 638,
|
||||
"name": "intr_item_name_638",
|
||||
"undefined": "使用后可随机获得以下碎片",
|
||||
"undefined": "使用后可以随机获得巴拉莱卡、罗贝尔特中的10个碎片",
|
||||
"type": 2,
|
||||
"sort": 1,
|
||||
"colour": 5,
|
||||
@ -4016,7 +4016,7 @@
|
||||
"undefined": "使用后解锁头像框“圣诞氛围”,解锁后防御加成+1%,解锁后生命加成+1%",
|
||||
"type": 7,
|
||||
"sort": 1,
|
||||
"colour": 5,
|
||||
"colour": 4,
|
||||
"way": [],
|
||||
"go": "",
|
||||
"icon": "txk_028",
|
||||
@ -4027,7 +4027,7 @@
|
||||
"usePrize": [],
|
||||
"selecPrize": [],
|
||||
"payId": "",
|
||||
"advancedEffects": "ani_xiangzikuang"
|
||||
"advancedEffects": ""
|
||||
},
|
||||
"50010": {
|
||||
"id": 50010,
|
||||
@ -4035,7 +4035,7 @@
|
||||
"undefined": "使用后解锁头像框“披星戴月”,解锁后伤害加成+1%(限时7天)",
|
||||
"type": 7,
|
||||
"sort": 1,
|
||||
"colour": 5,
|
||||
"colour": 4,
|
||||
"way": [],
|
||||
"go": "",
|
||||
"icon": "txk_025",
|
||||
@ -4046,7 +4046,7 @@
|
||||
"usePrize": [],
|
||||
"selecPrize": [],
|
||||
"payId": "",
|
||||
"advancedEffects": "ani_xiangzikuang"
|
||||
"advancedEffects": ""
|
||||
},
|
||||
"50011": {
|
||||
"id": 50011,
|
||||
@ -4054,7 +4054,7 @@
|
||||
"undefined": "使用后解锁头像框“新春安宁”,解锁后生命加成+1%",
|
||||
"type": 7,
|
||||
"sort": 1,
|
||||
"colour": 5,
|
||||
"colour": 4,
|
||||
"way": [],
|
||||
"go": "",
|
||||
"icon": "txk_029",
|
||||
@ -4065,26 +4065,7 @@
|
||||
"usePrize": [],
|
||||
"selecPrize": [],
|
||||
"payId": "",
|
||||
"advancedEffects": "ani_xiangzikuang"
|
||||
},
|
||||
"50012": {
|
||||
"id": 50012,
|
||||
"name": "playerheadFrame_name_26",
|
||||
"undefined": "使用后解锁头像框“花漫大地”,解锁后生命加成+1%",
|
||||
"type": 7,
|
||||
"sort": 1,
|
||||
"colour": 5,
|
||||
"way": [],
|
||||
"go": "",
|
||||
"icon": "txk_007",
|
||||
"sicon": "txk_007",
|
||||
"describe": "intr_item_describe_50012",
|
||||
"diaoluo": 26,
|
||||
"useNeed": [],
|
||||
"usePrize": [],
|
||||
"selecPrize": [],
|
||||
"payId": "",
|
||||
"advancedEffects": "ani_xiangzikuang"
|
||||
"advancedEffects": ""
|
||||
},
|
||||
"50101": {
|
||||
"id": 50101,
|
||||
|
@ -2,8 +2,6 @@
|
||||
"1": {
|
||||
"id": 1,
|
||||
"dao": 1001,
|
||||
"name": "mingDao_name_1",
|
||||
"undefined": "正宗",
|
||||
"condition": [
|
||||
[
|
||||
"loginDays",
|
||||
@ -43,14 +41,13 @@
|
||||
"zjgy_xld": 10
|
||||
},
|
||||
"img": 1001,
|
||||
"name": "mingDao_name_1",
|
||||
"des": "mingDao_des_1",
|
||||
"privilege_des": "mingDao_tequan_1"
|
||||
},
|
||||
"2": {
|
||||
"id": 2,
|
||||
"dao": 1002,
|
||||
"name": "mingDao_name_2",
|
||||
"undefined": "妖刀村正",
|
||||
"condition": [
|
||||
[
|
||||
"power",
|
||||
@ -100,14 +97,13 @@
|
||||
"wzsj_free": 1
|
||||
},
|
||||
"img": 1002,
|
||||
"name": "mingDao_name_2",
|
||||
"des": "mingDao_des_2",
|
||||
"privilege_des": "mingDao_tequan_2"
|
||||
},
|
||||
"3": {
|
||||
"id": 3,
|
||||
"dao": 1003,
|
||||
"name": "mingDao_name_3",
|
||||
"undefined": "村雨",
|
||||
"condition": [
|
||||
[
|
||||
"zccg",
|
||||
@ -162,14 +158,13 @@
|
||||
"zjgy_xld": 20
|
||||
},
|
||||
"img": 1003,
|
||||
"name": "mingDao_name_3",
|
||||
"des": "mingDao_des_3",
|
||||
"privilege_des": "mingDao_tequan_3"
|
||||
},
|
||||
"4": {
|
||||
"id": 4,
|
||||
"dao": 1004,
|
||||
"name": "mingDao_name_4",
|
||||
"undefined": "大典太",
|
||||
"condition": [
|
||||
[
|
||||
"use_attr_rmbmoney",
|
||||
@ -229,14 +224,13 @@
|
||||
"dpzd_zl": 1
|
||||
},
|
||||
"img": 1004,
|
||||
"name": "mingDao_name_4",
|
||||
"des": "mingDao_des_4",
|
||||
"privilege_des": "mingDao_tequan_4"
|
||||
},
|
||||
"5": {
|
||||
"id": 5,
|
||||
"dao": 1005,
|
||||
"name": "mingDao_name_5",
|
||||
"undefined": "菊一文字",
|
||||
"condition": [
|
||||
[
|
||||
"equip_star_5",
|
||||
@ -301,14 +295,13 @@
|
||||
"zccg_sd": 1
|
||||
},
|
||||
"img": 2001,
|
||||
"name": "mingDao_name_5",
|
||||
"des": "mingDao_des_5",
|
||||
"privilege_des": "mingDao_tequan_5"
|
||||
},
|
||||
"6": {
|
||||
"id": 6,
|
||||
"dao": 1006,
|
||||
"name": "mingDao_name_6",
|
||||
"undefined": "长曾弥虎彻",
|
||||
"condition": [
|
||||
[
|
||||
"zccg",
|
||||
@ -373,14 +366,13 @@
|
||||
"pjbb_rl": 100
|
||||
},
|
||||
"img": 2002,
|
||||
"name": "mingDao_name_6",
|
||||
"des": "mingDao_des_6",
|
||||
"privilege_des": "mingDao_tequan_6"
|
||||
},
|
||||
"7": {
|
||||
"id": 7,
|
||||
"dao": 1007,
|
||||
"name": "mingDao_name_7",
|
||||
"undefined": "和泉守兼定",
|
||||
"condition": [
|
||||
[
|
||||
"peijian_colour_5",
|
||||
@ -442,17 +434,18 @@
|
||||
"hp": 108
|
||||
},
|
||||
"privilege": {
|
||||
"pjbb_rl": 100
|
||||
"hero_buff": {
|
||||
"xixuepro": 0.05
|
||||
}
|
||||
},
|
||||
"img": 2003,
|
||||
"name": "mingDao_name_7",
|
||||
"des": "mingDao_des_7",
|
||||
"privilege_des": "mingDao_tequan_7"
|
||||
},
|
||||
"8": {
|
||||
"id": 8,
|
||||
"dao": 1008,
|
||||
"name": "mingDao_name_8",
|
||||
"undefined": "肥前国忠吉",
|
||||
"condition": [
|
||||
[
|
||||
"equip_star_5",
|
||||
@ -515,18 +508,17 @@
|
||||
},
|
||||
"privilege": {
|
||||
"hero_buff": {
|
||||
"xixuepro": 0.05
|
||||
"dpspro": 0.06
|
||||
}
|
||||
},
|
||||
"img": 3001,
|
||||
"name": "mingDao_name_8",
|
||||
"des": "mingDao_des_8",
|
||||
"privilege_des": "mingDao_tequan_8"
|
||||
},
|
||||
"9": {
|
||||
"id": 9,
|
||||
"dao": 1009,
|
||||
"name": "mingDao_name_9",
|
||||
"undefined": "长船",
|
||||
"condition": [
|
||||
[
|
||||
"power",
|
||||
@ -593,19 +585,16 @@
|
||||
"hp": 112
|
||||
},
|
||||
"privilege": {
|
||||
"hero_buff": {
|
||||
"dpspro": 0.06
|
||||
}
|
||||
"pjbb_rl": 100
|
||||
},
|
||||
"img": 3002,
|
||||
"name": "mingDao_name_9",
|
||||
"des": "mingDao_des_9",
|
||||
"privilege_des": "mingDao_tequan_9"
|
||||
},
|
||||
"10": {
|
||||
"id": 10,
|
||||
"dao": 1010,
|
||||
"name": "mingDao_name_10",
|
||||
"undefined": "童子切安纲",
|
||||
"condition": [
|
||||
[
|
||||
"peijian_colour_5",
|
||||
@ -677,321 +666,8 @@
|
||||
}
|
||||
},
|
||||
"img": 3003,
|
||||
"name": "mingDao_name_10",
|
||||
"des": "mingDao_des_10",
|
||||
"privilege_des": "mingDao_tequan_10"
|
||||
},
|
||||
"11": {
|
||||
"id": 11,
|
||||
"dao": 1011,
|
||||
"name": "mingDao_name_11",
|
||||
"undefined": "乌兹冲锋枪",
|
||||
"condition": [
|
||||
[
|
||||
"power",
|
||||
4000000
|
||||
]
|
||||
],
|
||||
"level": 250,
|
||||
"need": {
|
||||
"a": "item",
|
||||
"t": "21",
|
||||
"n": 1
|
||||
},
|
||||
"needExp": 2250,
|
||||
"reward": {
|
||||
"10": {
|
||||
"a": "attr",
|
||||
"t": "jinbi",
|
||||
"n": 3000000
|
||||
},
|
||||
"20": {
|
||||
"a": "item",
|
||||
"t": "24",
|
||||
"n": 20
|
||||
},
|
||||
"30": {
|
||||
"a": "item",
|
||||
"t": "18",
|
||||
"n": 200
|
||||
},
|
||||
"50": {
|
||||
"a": "item",
|
||||
"t": "10",
|
||||
"n": 150
|
||||
},
|
||||
"80": {
|
||||
"a": "item",
|
||||
"t": "611",
|
||||
"n": 1
|
||||
},
|
||||
"120": {
|
||||
"a": "attr",
|
||||
"t": "nexp",
|
||||
"n": 1500000
|
||||
},
|
||||
"160": {
|
||||
"a": "item",
|
||||
"t": "10",
|
||||
"n": 150
|
||||
},
|
||||
"200": {
|
||||
"a": "hero",
|
||||
"t": "5005",
|
||||
"n": 1
|
||||
}
|
||||
},
|
||||
"buff": {
|
||||
"atk": 93,
|
||||
"def": 36,
|
||||
"hp": 718
|
||||
},
|
||||
"upBuff": {
|
||||
"atk": 16,
|
||||
"def": 7,
|
||||
"hp": 130
|
||||
},
|
||||
"privilege": {
|
||||
"pjbb_rl": 100
|
||||
},
|
||||
"img": 3004,
|
||||
"des": "mingDao_des_11",
|
||||
"privilege_des": "mingDao_tequan_11"
|
||||
},
|
||||
"12": {
|
||||
"id": 12,
|
||||
"dao": 1012,
|
||||
"name": "mingDao_name_12",
|
||||
"undefined": "雷明顿M31霰弹枪",
|
||||
"condition": [
|
||||
[
|
||||
"equip_star_5",
|
||||
10
|
||||
]
|
||||
],
|
||||
"level": 300,
|
||||
"need": {
|
||||
"a": "item",
|
||||
"t": "21",
|
||||
"n": 1
|
||||
},
|
||||
"needExp": 2250,
|
||||
"reward": {
|
||||
"20": {
|
||||
"a": "attr",
|
||||
"t": "jinbi",
|
||||
"n": 3000000
|
||||
},
|
||||
"40": {
|
||||
"a": "item",
|
||||
"t": "24",
|
||||
"n": 22
|
||||
},
|
||||
"60": {
|
||||
"a": "item",
|
||||
"t": "18",
|
||||
"n": 250
|
||||
},
|
||||
"80": {
|
||||
"a": "item",
|
||||
"t": "10",
|
||||
"n": 150
|
||||
},
|
||||
"100": {
|
||||
"a": "item",
|
||||
"t": "611",
|
||||
"n": 1
|
||||
},
|
||||
"150": {
|
||||
"a": "attr",
|
||||
"t": "nexp",
|
||||
"n": 2000000
|
||||
},
|
||||
"200": {
|
||||
"a": "item",
|
||||
"t": "10",
|
||||
"n": 150
|
||||
},
|
||||
"250": {
|
||||
"a": "hero",
|
||||
"t": "5003",
|
||||
"n": 1
|
||||
}
|
||||
},
|
||||
"buff": {
|
||||
"atk": 99,
|
||||
"def": 40,
|
||||
"hp": 783
|
||||
},
|
||||
"upBuff": {
|
||||
"atk": 16,
|
||||
"def": 7,
|
||||
"hp": 136
|
||||
},
|
||||
"privilege": {
|
||||
"hero_buff": {
|
||||
"mingzhongpro": 0.03
|
||||
}
|
||||
},
|
||||
"img": 3005,
|
||||
"des": "mingDao_des_12",
|
||||
"privilege_des": "mingDao_tequan_12"
|
||||
},
|
||||
"13": {
|
||||
"id": 13,
|
||||
"dao": 1013,
|
||||
"name": "mingDao_name_13",
|
||||
"undefined": "栓动式步枪",
|
||||
"condition": [
|
||||
[
|
||||
"power",
|
||||
8000000
|
||||
]
|
||||
],
|
||||
"level": 350,
|
||||
"need": {
|
||||
"a": "item",
|
||||
"t": "21",
|
||||
"n": 1
|
||||
},
|
||||
"needExp": 2950,
|
||||
"reward": {
|
||||
"30": {
|
||||
"a": "attr",
|
||||
"t": "jinbi",
|
||||
"n": 5000000
|
||||
},
|
||||
"60": {
|
||||
"a": "item",
|
||||
"t": "24",
|
||||
"n": 24
|
||||
},
|
||||
"90": {
|
||||
"a": "item",
|
||||
"t": "18",
|
||||
"n": 300
|
||||
},
|
||||
"120": {
|
||||
"a": "item",
|
||||
"t": "10",
|
||||
"n": 150
|
||||
},
|
||||
"150": {
|
||||
"a": "item",
|
||||
"t": "611",
|
||||
"n": 1
|
||||
},
|
||||
"200": {
|
||||
"a": "attr",
|
||||
"t": "nexp",
|
||||
"n": 2000000
|
||||
},
|
||||
"250": {
|
||||
"a": "item",
|
||||
"t": "10",
|
||||
"n": 150
|
||||
},
|
||||
"300": {
|
||||
"a": "hero",
|
||||
"t": "5001",
|
||||
"n": 1
|
||||
}
|
||||
},
|
||||
"buff": {
|
||||
"atk": 108,
|
||||
"def": 44,
|
||||
"hp": 848
|
||||
},
|
||||
"upBuff": {
|
||||
"atk": 16,
|
||||
"def": 7,
|
||||
"hp": 142
|
||||
},
|
||||
"privilege": {
|
||||
"hero_buff": {
|
||||
"shanbipro": 0.03
|
||||
}
|
||||
},
|
||||
"img": 3007,
|
||||
"des": "mingDao_des_13",
|
||||
"privilege_des": "mingDao_tequan_13"
|
||||
},
|
||||
"14": {
|
||||
"id": 14,
|
||||
"dao": 1014,
|
||||
"name": "mingDao_name_14",
|
||||
"undefined": "M16自动步枪",
|
||||
"condition": [
|
||||
[
|
||||
"zccg",
|
||||
400
|
||||
]
|
||||
],
|
||||
"level": 400,
|
||||
"need": {
|
||||
"a": "item",
|
||||
"t": "21",
|
||||
"n": 1
|
||||
},
|
||||
"needExp": 2950,
|
||||
"reward": {
|
||||
"30": {
|
||||
"a": "attr",
|
||||
"t": "jinbi",
|
||||
"n": 5000000
|
||||
},
|
||||
"60": {
|
||||
"a": "item",
|
||||
"t": "24",
|
||||
"n": 26
|
||||
},
|
||||
"100": {
|
||||
"a": "item",
|
||||
"t": "18",
|
||||
"n": 400
|
||||
},
|
||||
"150": {
|
||||
"a": "item",
|
||||
"t": "10",
|
||||
"n": 150
|
||||
},
|
||||
"200": {
|
||||
"a": "item",
|
||||
"t": "611",
|
||||
"n": 1
|
||||
},
|
||||
"250": {
|
||||
"a": "attr",
|
||||
"t": "nexp",
|
||||
"n": 2000000
|
||||
},
|
||||
"300": {
|
||||
"a": "item",
|
||||
"t": "10",
|
||||
"n": 150
|
||||
},
|
||||
"350": {
|
||||
"a": "hero",
|
||||
"t": "5005",
|
||||
"n": 1
|
||||
}
|
||||
},
|
||||
"buff": {
|
||||
"atk": 117,
|
||||
"def": 48,
|
||||
"hp": 913
|
||||
},
|
||||
"upBuff": {
|
||||
"atk": 17,
|
||||
"def": 8,
|
||||
"hp": 148
|
||||
},
|
||||
"privilege": {
|
||||
"hero_buff": {
|
||||
"hppro": 0.06
|
||||
}
|
||||
},
|
||||
"img": 3006,
|
||||
"des": "mingDao_des_14",
|
||||
"privilege_des": "mingDao_tequan_14"
|
||||
}
|
||||
}
|
@ -21849,22 +21849,6 @@
|
||||
"isboss": 1,
|
||||
"ghname": "npc_ghname_2"
|
||||
},
|
||||
"17004": {
|
||||
"npcId": 17004,
|
||||
"attr": {},
|
||||
"npclist": "5001_60_90301#5001_60_90301#5001_60_90301#5001_60_90301#5001_60_90301#5001_60_90301",
|
||||
"npcLv": [],
|
||||
"isboss": 1,
|
||||
"ghname": "npc_ghname_6",
|
||||
"skin": [
|
||||
50011,
|
||||
50011,
|
||||
50011,
|
||||
50011,
|
||||
50011,
|
||||
50011
|
||||
]
|
||||
},
|
||||
"18001": {
|
||||
"npcId": 18001,
|
||||
"attr": {},
|
||||
|
@ -1391,18 +1391,5 @@
|
||||
"display": {
|
||||
"lv": 12
|
||||
}
|
||||
},
|
||||
"huangqijiuiguan": {
|
||||
"name": "huangqijiuiguan",
|
||||
"undefined": "黄旗酒馆",
|
||||
"and": {
|
||||
"lv": 10
|
||||
},
|
||||
"or": {},
|
||||
"time": 0,
|
||||
"tips": "openCond_tips_96",
|
||||
"display": {
|
||||
"lv": 10
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -69,7 +69,7 @@
|
||||
1001
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_1001",
|
||||
"sort": 43,
|
||||
"sort": 42,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
@ -84,7 +84,7 @@
|
||||
1002
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_1002",
|
||||
"sort": 44,
|
||||
"sort": 43,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
@ -99,7 +99,7 @@
|
||||
2001
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_2001",
|
||||
"sort": 41,
|
||||
"sort": 40,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
@ -114,7 +114,7 @@
|
||||
2002
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_2002",
|
||||
"sort": 42,
|
||||
"sort": 41,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
@ -129,7 +129,7 @@
|
||||
3001
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_3001",
|
||||
"sort": 26,
|
||||
"sort": 25,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
@ -144,7 +144,7 @@
|
||||
3002
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_3002",
|
||||
"sort": 27,
|
||||
"sort": 26,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
@ -159,7 +159,7 @@
|
||||
3003
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_3003",
|
||||
"sort": 28,
|
||||
"sort": 27,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
@ -174,7 +174,7 @@
|
||||
3004
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_3004",
|
||||
"sort": 29,
|
||||
"sort": 28,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
@ -189,7 +189,7 @@
|
||||
3005
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_3005",
|
||||
"sort": 30,
|
||||
"sort": 29,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
@ -204,7 +204,7 @@
|
||||
3006
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_3006",
|
||||
"sort": 31,
|
||||
"sort": 30,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
@ -219,7 +219,7 @@
|
||||
3007
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_3007",
|
||||
"sort": 32,
|
||||
"sort": 31,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
@ -234,7 +234,7 @@
|
||||
3008
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_3008",
|
||||
"sort": 33,
|
||||
"sort": 32,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
@ -249,7 +249,7 @@
|
||||
3009
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_3009",
|
||||
"sort": 34,
|
||||
"sort": 33,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
@ -264,7 +264,7 @@
|
||||
3010
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_3010",
|
||||
"sort": 35,
|
||||
"sort": 34,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
@ -279,7 +279,7 @@
|
||||
3011
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_3011",
|
||||
"sort": 36,
|
||||
"sort": 35,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
@ -294,7 +294,7 @@
|
||||
3012
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_3012",
|
||||
"sort": 37,
|
||||
"sort": 36,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
@ -309,7 +309,7 @@
|
||||
3013
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_3013",
|
||||
"sort": 38,
|
||||
"sort": 37,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
@ -324,7 +324,7 @@
|
||||
3014
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_3014",
|
||||
"sort": 39,
|
||||
"sort": 38,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
@ -339,7 +339,7 @@
|
||||
3015
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_3015",
|
||||
"sort": 40,
|
||||
"sort": 39,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
@ -354,7 +354,7 @@
|
||||
4001
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_4001",
|
||||
"sort": 11,
|
||||
"sort": 10,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
@ -369,7 +369,7 @@
|
||||
4002
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_4002",
|
||||
"sort": 12,
|
||||
"sort": 11,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
@ -384,7 +384,7 @@
|
||||
4003
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_4003",
|
||||
"sort": 13,
|
||||
"sort": 12,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
@ -399,7 +399,7 @@
|
||||
4004
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_4004",
|
||||
"sort": 14,
|
||||
"sort": 13,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
@ -414,7 +414,7 @@
|
||||
4005
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_4005",
|
||||
"sort": 15,
|
||||
"sort": 14,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
@ -429,7 +429,7 @@
|
||||
4006
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_4006",
|
||||
"sort": 16,
|
||||
"sort": 15,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
@ -444,7 +444,7 @@
|
||||
4007
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_4007",
|
||||
"sort": 17,
|
||||
"sort": 16,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
@ -459,7 +459,7 @@
|
||||
4008
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_4008",
|
||||
"sort": 18,
|
||||
"sort": 17,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
@ -474,7 +474,7 @@
|
||||
4009
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_4009",
|
||||
"sort": 19,
|
||||
"sort": 18,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
@ -489,7 +489,7 @@
|
||||
4010
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_4010",
|
||||
"sort": 20,
|
||||
"sort": 19,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
@ -504,7 +504,7 @@
|
||||
4011
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_4011",
|
||||
"sort": 21,
|
||||
"sort": 20,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
@ -519,7 +519,7 @@
|
||||
4012
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_4012",
|
||||
"sort": 22,
|
||||
"sort": 21,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
@ -527,14 +527,14 @@
|
||||
"4013": {
|
||||
"id": 4013,
|
||||
"name": "intr_playerinfo_name_4013",
|
||||
"undefined": "获得干部葛丽特后解锁",
|
||||
"undefined": "获得干部格里达尔后解锁",
|
||||
"img": 4013,
|
||||
"cond": [
|
||||
"hero",
|
||||
4013
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_4013",
|
||||
"sort": 23,
|
||||
"sort": 22,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
@ -549,7 +549,7 @@
|
||||
4014
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_4014",
|
||||
"sort": 24,
|
||||
"sort": 23,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
@ -564,7 +564,7 @@
|
||||
4015
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_4015",
|
||||
"sort": 25,
|
||||
"sort": 24,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
@ -579,7 +579,7 @@
|
||||
5001
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_5001",
|
||||
"sort": 6,
|
||||
"sort": 5,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
@ -594,7 +594,7 @@
|
||||
5002
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_5002",
|
||||
"sort": 7,
|
||||
"sort": 6,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
@ -609,7 +609,7 @@
|
||||
5003
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_5003",
|
||||
"sort": 8,
|
||||
"sort": 7,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
@ -624,7 +624,7 @@
|
||||
5004
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_5004",
|
||||
"sort": 9,
|
||||
"sort": 8,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
@ -639,22 +639,7 @@
|
||||
5005
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_5005",
|
||||
"sort": 10,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
},
|
||||
"50011": {
|
||||
"id": 50011,
|
||||
"name": "intr_playerinfo_name_50011",
|
||||
"undefined": "获得干部莱薇外观【兔女郎】后解锁",
|
||||
"img": 50011,
|
||||
"cond": [
|
||||
"heroskin",
|
||||
50011
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_50011",
|
||||
"sort": 5,
|
||||
"sort": 9,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
|
@ -139,7 +139,7 @@
|
||||
"id": 9,
|
||||
"name": "playerheadFrame_name_9",
|
||||
"undefined": "名望等级达到五阶获得,解锁后防御加成+1%",
|
||||
"img": "txk_012",
|
||||
"img": "txk_005",
|
||||
"cond": [
|
||||
"renown",
|
||||
41
|
||||
@ -311,7 +311,7 @@
|
||||
"id": 19,
|
||||
"name": "playerheadFrame_name_19",
|
||||
"undefined": "开服冲榜活动获得,解锁后攻击加成+1%",
|
||||
"img": "txk_006",
|
||||
"img": "txk_004",
|
||||
"cond": [
|
||||
"time",
|
||||
-1
|
||||
@ -395,8 +395,8 @@
|
||||
"24": {
|
||||
"id": 24,
|
||||
"name": "playerheadFrame_name_24",
|
||||
"undefined": "消费竞赛活动获得,解锁后伤害加成+1%(限时7天)",
|
||||
"img": "txk_015",
|
||||
"undefined": "消费竞赛活动前三名获得,解锁后伤害加成+1%(限时7天)",
|
||||
"img": "txk_025",
|
||||
"cond": [
|
||||
"time",
|
||||
604800
|
||||
@ -425,22 +425,5 @@
|
||||
},
|
||||
"colour": 4,
|
||||
"ani": ""
|
||||
},
|
||||
"26": {
|
||||
"id": 26,
|
||||
"name": "playerheadFrame_name_26",
|
||||
"undefined": "黄旗酒馆活动获得,解锁后生命加成+1%",
|
||||
"img": "txk_007",
|
||||
"cond": [
|
||||
"time",
|
||||
-1
|
||||
],
|
||||
"intr": "playerheadFrame_des_26",
|
||||
"sort": 26,
|
||||
"buff": {
|
||||
"hppro": 0.01
|
||||
},
|
||||
"colour": 5,
|
||||
"ani": ""
|
||||
}
|
||||
}
|
5002
src/json/renown_chanchu.json
Normal file
5002
src/json/renown_chanchu.json
Normal file
File diff suppressed because it is too large
Load Diff
@ -20,7 +20,7 @@
|
||||
{ need: [{a: 'attr', t: 'rmbmoney', n: 200}], prize: [{a: 'item', t: '15', n: 300}], maxNum: 3, addExp: 100, vipAddNum: [1,1,1,1,1,1,1,1,3,3,3,5,5,7,9,13,15,21] },
|
||||
],
|
||||
//弹劾时间
|
||||
tanheTime: 259200,
|
||||
tanheTime: 86400,
|
||||
//公会任务
|
||||
ghTask: [
|
||||
{ total: 30, prize: [{a: 'item', t: '19', n: 1},{a: 'item', t: '9', n: 10},{a: 'attr', t: 'jinbi', n: 50000}]},
|
||||
|
@ -100,7 +100,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"addmaxhp": [
|
||||
"addhp": [
|
||||
0.004,
|
||||
0.008
|
||||
]
|
||||
@ -162,7 +162,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"addmaxhp": [
|
||||
"addhp": [
|
||||
0.006,
|
||||
0.01
|
||||
]
|
||||
@ -224,7 +224,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"addmaxhp": [
|
||||
"addhp": [
|
||||
0.09,
|
||||
0.013
|
||||
]
|
||||
@ -286,7 +286,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"addmaxhp": [
|
||||
"addhp": [
|
||||
0.011,
|
||||
0.016
|
||||
]
|
||||
@ -348,7 +348,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"addmaxhp": [
|
||||
"addhp": [
|
||||
0.012,
|
||||
0.02
|
||||
]
|
||||
@ -360,27 +360,27 @@
|
||||
{
|
||||
"range": [
|
||||
0,
|
||||
0.333
|
||||
0.33
|
||||
],
|
||||
"color": 2
|
||||
},
|
||||
{
|
||||
"range": [
|
||||
0.334,
|
||||
0.666
|
||||
0.33,
|
||||
0.66
|
||||
],
|
||||
"color": 3
|
||||
},
|
||||
{
|
||||
"range": [
|
||||
0.667,
|
||||
0.999
|
||||
0.66,
|
||||
0.99
|
||||
],
|
||||
"color": 4
|
||||
},
|
||||
{
|
||||
"range": [
|
||||
0.999,
|
||||
0.99,
|
||||
1
|
||||
],
|
||||
"color": 5
|
||||
|
@ -1705,13 +1705,13 @@
|
||||
"sxleixing": "attr",
|
||||
"buff_type": 1,
|
||||
"xiaoguocanshu": {
|
||||
"dpspro": 1
|
||||
"dpspro": 2
|
||||
},
|
||||
"round": 3,
|
||||
"round": 2,
|
||||
"group": "tx01300",
|
||||
"jiejiaxiaoguo": "retime",
|
||||
"diejiacengshu": 1,
|
||||
"describe": "进入战斗后的前2回合进入致命状态,攻击敌人时有1%的几率造成双倍伤害"
|
||||
"describe": "进入战斗后的前2回合进入致命状态,攻击敌人时有0.01的几率造成双倍伤害"
|
||||
},
|
||||
"tx01301": {
|
||||
"skillid": "tx01301",
|
||||
@ -1724,13 +1724,13 @@
|
||||
"sxleixing": "attr",
|
||||
"buff_type": 1,
|
||||
"xiaoguocanshu": {
|
||||
"dpspro": 1
|
||||
"dpspro": 2
|
||||
},
|
||||
"round": 3,
|
||||
"round": 2,
|
||||
"group": "tx01300",
|
||||
"jiejiaxiaoguo": "retime",
|
||||
"diejiacengshu": 1,
|
||||
"describe": "进入战斗后的前2回合进入致命状态,攻击敌人时有2%的几率造成双倍伤害"
|
||||
"describe": "进入战斗后的前2回合进入致命状态,攻击敌人时有0.02的几率造成双倍伤害"
|
||||
},
|
||||
"tx01302": {
|
||||
"skillid": "tx01302",
|
||||
@ -1743,13 +1743,13 @@
|
||||
"sxleixing": "attr",
|
||||
"buff_type": 1,
|
||||
"xiaoguocanshu": {
|
||||
"dpspro": 1
|
||||
"dpspro": 2
|
||||
},
|
||||
"round": 3,
|
||||
"round": 2,
|
||||
"group": "tx01300",
|
||||
"jiejiaxiaoguo": "retime",
|
||||
"diejiacengshu": 1,
|
||||
"describe": "进入战斗后的前2回合进入致命状态,攻击敌人时有3%的几率造成双倍伤害"
|
||||
"describe": "进入战斗后的前2回合进入致命状态,攻击敌人时有0.03的几率造成双倍伤害"
|
||||
},
|
||||
"tx01303": {
|
||||
"skillid": "tx01303",
|
||||
@ -1762,13 +1762,13 @@
|
||||
"sxleixing": "attr",
|
||||
"buff_type": 1,
|
||||
"xiaoguocanshu": {
|
||||
"dpspro": 1
|
||||
"dpspro": 2
|
||||
},
|
||||
"round": 3,
|
||||
"round": 2,
|
||||
"group": "tx01300",
|
||||
"jiejiaxiaoguo": "retime",
|
||||
"diejiacengshu": 1,
|
||||
"describe": "进入战斗后的前2回合进入致命状态,攻击敌人时有4%的几率造成双倍伤害"
|
||||
"describe": "进入战斗后的前2回合进入致命状态,攻击敌人时有0.04的几率造成双倍伤害"
|
||||
},
|
||||
"tx01304": {
|
||||
"skillid": "tx01304",
|
||||
@ -1781,13 +1781,13 @@
|
||||
"sxleixing": "attr",
|
||||
"buff_type": 1,
|
||||
"xiaoguocanshu": {
|
||||
"dpspro": 1
|
||||
"dpspro": 2
|
||||
},
|
||||
"round": 3,
|
||||
"round": 2,
|
||||
"group": "tx01300",
|
||||
"jiejiaxiaoguo": "retime",
|
||||
"diejiacengshu": 1,
|
||||
"describe": "进入战斗后的前2回合进入致命状态,攻击敌人时有5%的几率造成双倍伤害"
|
||||
"describe": "进入战斗后的前2回合进入致命状态,攻击敌人时有0.05的几率造成双倍伤害"
|
||||
},
|
||||
"tx01305": {
|
||||
"skillid": "tx01305",
|
||||
@ -1800,13 +1800,13 @@
|
||||
"sxleixing": "attr",
|
||||
"buff_type": 1,
|
||||
"xiaoguocanshu": {
|
||||
"dpspro": 1
|
||||
"dpspro": 2
|
||||
},
|
||||
"round": 3,
|
||||
"round": 2,
|
||||
"group": "tx01300",
|
||||
"jiejiaxiaoguo": "retime",
|
||||
"diejiacengshu": 1,
|
||||
"describe": "进入战斗后的前2回合进入致命状态,攻击敌人时有6%的几率造成双倍伤害"
|
||||
"describe": "进入战斗后的前2回合进入致命状态,攻击敌人时有0.06的几率造成双倍伤害"
|
||||
},
|
||||
"tx01306": {
|
||||
"skillid": "tx01306",
|
||||
@ -1819,13 +1819,13 @@
|
||||
"sxleixing": "attr",
|
||||
"buff_type": 1,
|
||||
"xiaoguocanshu": {
|
||||
"dpspro": 1
|
||||
"dpspro": 2
|
||||
},
|
||||
"round": 3,
|
||||
"round": 2,
|
||||
"group": "tx01300",
|
||||
"jiejiaxiaoguo": "retime",
|
||||
"diejiacengshu": 1,
|
||||
"describe": "进入战斗后的前2回合进入致命状态,攻击敌人时有7%的几率造成双倍伤害"
|
||||
"describe": "进入战斗后的前2回合进入致命状态,攻击敌人时有0.07的几率造成双倍伤害"
|
||||
},
|
||||
"tx01307": {
|
||||
"skillid": "tx01307",
|
||||
@ -1838,13 +1838,13 @@
|
||||
"sxleixing": "attr",
|
||||
"buff_type": 1,
|
||||
"xiaoguocanshu": {
|
||||
"dpspro": 1
|
||||
"dpspro": 2
|
||||
},
|
||||
"round": 3,
|
||||
"round": 2,
|
||||
"group": "tx01300",
|
||||
"jiejiaxiaoguo": "retime",
|
||||
"diejiacengshu": 1,
|
||||
"describe": "进入战斗后的前2回合进入致命状态,攻击敌人时有8%的几率造成双倍伤害"
|
||||
"describe": "进入战斗后的前2回合进入致命状态,攻击敌人时有0.08的几率造成双倍伤害"
|
||||
},
|
||||
"tx01308": {
|
||||
"skillid": "tx01308",
|
||||
@ -1857,13 +1857,13 @@
|
||||
"sxleixing": "attr",
|
||||
"buff_type": 1,
|
||||
"xiaoguocanshu": {
|
||||
"dpspro": 1
|
||||
"dpspro": 2
|
||||
},
|
||||
"round": 3,
|
||||
"round": 2,
|
||||
"group": "tx01300",
|
||||
"jiejiaxiaoguo": "retime",
|
||||
"diejiacengshu": 1,
|
||||
"describe": "进入战斗后的前2回合进入致命状态,攻击敌人时有9%的几率造成双倍伤害"
|
||||
"describe": "进入战斗后的前2回合进入致命状态,攻击敌人时有0.09的几率造成双倍伤害"
|
||||
},
|
||||
"tx01309": {
|
||||
"skillid": "tx01309",
|
||||
@ -1876,13 +1876,13 @@
|
||||
"sxleixing": "attr",
|
||||
"buff_type": 1,
|
||||
"xiaoguocanshu": {
|
||||
"dpspro": 1
|
||||
"dpspro": 2
|
||||
},
|
||||
"round": 3,
|
||||
"round": 2,
|
||||
"group": "tx01300",
|
||||
"jiejiaxiaoguo": "retime",
|
||||
"diejiacengshu": 1,
|
||||
"describe": "进入战斗后的前2回合进入致命状态,攻击敌人时有10%的几率造成双倍伤害"
|
||||
"describe": "进入战斗后的前2回合进入致命状态,攻击敌人时有0.10的几率造成双倍伤害"
|
||||
},
|
||||
"tx02300": {
|
||||
"skillid": "tx02300",
|
||||
|
@ -588,155 +588,5 @@
|
||||
"displayCD": 3600,
|
||||
"scale": 3000,
|
||||
"icon": "djlb"
|
||||
},
|
||||
"501": {
|
||||
"id": 501,
|
||||
"type": 6,
|
||||
"typeName": "tuisonglibao_name_6",
|
||||
"num": [
|
||||
250
|
||||
],
|
||||
"payId": [
|
||||
"yxl_libao_1,yxl_libao_2"
|
||||
],
|
||||
"time": 10800,
|
||||
"displayCD": 10800,
|
||||
"scale": 3000,
|
||||
"icon": "gkts"
|
||||
},
|
||||
"502": {
|
||||
"id": 502,
|
||||
"type": 6,
|
||||
"typeName": "tuisonglibao_name_6",
|
||||
"num": [
|
||||
250
|
||||
],
|
||||
"payId": [
|
||||
"yxl_libao_1,yxl_libao_2"
|
||||
],
|
||||
"time": 10800,
|
||||
"displayCD": 10800,
|
||||
"scale": 3000,
|
||||
"icon": "gkts"
|
||||
},
|
||||
"503": {
|
||||
"id": 503,
|
||||
"type": 6,
|
||||
"typeName": "tuisonglibao_name_6",
|
||||
"num": [
|
||||
19500
|
||||
],
|
||||
"payId": [
|
||||
"yxl_libao_1,yxl_libao_2"
|
||||
],
|
||||
"time": 10800,
|
||||
"displayCD": 10800,
|
||||
"scale": 3000,
|
||||
"icon": "gkts"
|
||||
},
|
||||
"504": {
|
||||
"id": 504,
|
||||
"type": 6,
|
||||
"typeName": "tuisonglibao_name_6",
|
||||
"num": [
|
||||
19500
|
||||
],
|
||||
"payId": [
|
||||
"yxl_libao_1,yxl_libao_2"
|
||||
],
|
||||
"time": 10800,
|
||||
"displayCD": 10800,
|
||||
"scale": 3000,
|
||||
"icon": "gkts"
|
||||
},
|
||||
"505": {
|
||||
"id": 505,
|
||||
"type": 6,
|
||||
"typeName": "tuisonglibao_name_6",
|
||||
"num": [
|
||||
30000
|
||||
],
|
||||
"payId": [
|
||||
"yxl_libao_1,yxl_libao_2"
|
||||
],
|
||||
"time": 10800,
|
||||
"displayCD": 10800,
|
||||
"scale": 3000,
|
||||
"icon": "gkts"
|
||||
},
|
||||
"506": {
|
||||
"id": 506,
|
||||
"type": 6,
|
||||
"typeName": "tuisonglibao_name_6",
|
||||
"num": [
|
||||
30000
|
||||
],
|
||||
"payId": [
|
||||
"yxl_libao_1,yxl_libao_2"
|
||||
],
|
||||
"time": 10800,
|
||||
"displayCD": 10800,
|
||||
"scale": 3000,
|
||||
"icon": "gkts"
|
||||
},
|
||||
"507": {
|
||||
"id": 507,
|
||||
"type": 6,
|
||||
"typeName": "tuisonglibao_name_6",
|
||||
"num": [
|
||||
42750
|
||||
],
|
||||
"payId": [
|
||||
"yxl_libao_2,yxl_libao_3"
|
||||
],
|
||||
"time": 10800,
|
||||
"displayCD": 10800,
|
||||
"scale": 3000,
|
||||
"icon": "gkts"
|
||||
},
|
||||
"508": {
|
||||
"id": 508,
|
||||
"type": 6,
|
||||
"typeName": "tuisonglibao_name_6",
|
||||
"num": [
|
||||
42750
|
||||
],
|
||||
"payId": [
|
||||
"yxl_libao_2,yxl_libao_3"
|
||||
],
|
||||
"time": 10800,
|
||||
"displayCD": 10800,
|
||||
"scale": 3000,
|
||||
"icon": "gkts"
|
||||
},
|
||||
"509": {
|
||||
"id": 509,
|
||||
"type": 6,
|
||||
"typeName": "tuisonglibao_name_6",
|
||||
"num": [
|
||||
62500
|
||||
],
|
||||
"payId": [
|
||||
"yxl_libao_2,yxl_libao_3"
|
||||
],
|
||||
"time": 10800,
|
||||
"displayCD": 10800,
|
||||
"scale": 3000,
|
||||
"icon": "gkts"
|
||||
},
|
||||
"510": {
|
||||
"id": 510,
|
||||
"type": 6,
|
||||
"typeName": "tuisonglibao_name_6",
|
||||
"num": [
|
||||
62500
|
||||
],
|
||||
"payId": [
|
||||
"yxl_libao_2,yxl_libao_3"
|
||||
],
|
||||
"time": 10800,
|
||||
"displayCD": 10800,
|
||||
"scale": 3000,
|
||||
"icon": "gkts"
|
||||
}
|
||||
}
|
@ -136,9 +136,9 @@ type gc_clsl_dan = k_v<{
|
||||
/** 机器人 */
|
||||
'npc': number,
|
||||
/** 随机机器人概率*/
|
||||
'pro': number
|
||||
'pro':number
|
||||
/** 对手范围 */
|
||||
'fighter': number[]
|
||||
'fighter':number[]
|
||||
}>;
|
||||
|
||||
type gc_com = k_v<{
|
||||
@ -800,8 +800,6 @@ type gc_npc = k_v<{
|
||||
'ghname': string
|
||||
/**npc名称 */
|
||||
'npcname': string
|
||||
/**怪物皮肤*/
|
||||
'skin': number[]
|
||||
}>;
|
||||
|
||||
type gc_openCond = k_v<{
|
||||
@ -1811,29 +1809,6 @@ type gc_push_gift = {
|
||||
}
|
||||
}
|
||||
|
||||
type gc_hero_skin = {
|
||||
[k: string]: {
|
||||
/**皮肤id*/
|
||||
id: number
|
||||
/**干部id*/
|
||||
heroId: number
|
||||
/**皮肤品质*/
|
||||
colour: number
|
||||
/**摸到重复时转换*/
|
||||
zhuanhuan: atn[]
|
||||
}
|
||||
}
|
||||
|
||||
type gc_hero_skin_lv = {
|
||||
[colour: string]: {
|
||||
[lv: string]: {
|
||||
suipian: number
|
||||
buff: { [k: string]: number }
|
||||
need: { a: string, t: string, n: number }[];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
type gcType = {
|
||||
[key: string]: any
|
||||
armyattr: gc_armyattr
|
||||
@ -1984,8 +1959,6 @@ type gcType = {
|
||||
yuyuemail: gc_yuyuemail
|
||||
tuisonglibao: gc_push_gift
|
||||
renown_level: gc_renown_level
|
||||
heroSkin: gc_hero_skin
|
||||
heroSkinLv: gc_hero_skin_lv
|
||||
}
|
||||
|
||||
|
||||
|
21
src/lng.ts
21
src/lng.ts
@ -239,9 +239,6 @@ class Lng {
|
||||
hero_17 = "hero_17";
|
||||
hero_18 = "hero_18";
|
||||
hero_19 = "hero_19";
|
||||
hero_20 = "hero_20";
|
||||
hero_21 = "hero_21";
|
||||
hero_22 = "hero_22";
|
||||
|
||||
item_1 = "item_1";
|
||||
item_2 = "item_2";
|
||||
@ -350,18 +347,14 @@ class Lng {
|
||||
event_kfkh_12 = "event_kfkh_12";
|
||||
event_kfkh_13 = "event_kfkh_13";
|
||||
|
||||
qingxiandenglu = "qingxiandenglu";
|
||||
wuciwanjia = "wuciwanjia";
|
||||
huoqupaihang = "huoqupaihang";
|
||||
wucigonghui = "wucigonghui";
|
||||
nameyicunzai = "nameyicunzai";
|
||||
ljlibaotips_8 = "ljlibaotips_8";
|
||||
qingxiandenglu: "qingxiandenglu";
|
||||
wuciwanjia: "wuciwanjia";
|
||||
huoqupaihang: "huoqupaihang";
|
||||
wucigonghui: "wucigonghui";
|
||||
nameyicunzai: "nameyicunzai";
|
||||
ljlibaotips_8: "ljlibaotips_8";
|
||||
|
||||
weiwang_12 = "weiwang_12";
|
||||
|
||||
hqjgtips_27 = "hqjgtips_27";
|
||||
hqjgtips_28 = "hqjgtips_28";
|
||||
hqjgtips_29 = "hqjgtips_29";
|
||||
weiwang_12: "weiwang_12";
|
||||
|
||||
"11111" = "globalThis.lng.chat_1"
|
||||
// return call.error('', { code: -3, message: globalThis.lng.chat_2 });
|
||||
|
@ -23,7 +23,7 @@ export default {
|
||||
/**cross mongodb url */
|
||||
crossMongodbUrl: 'mongodb://root:lyMaple525458@10.0.1.20:27017/heijiao_cross?authSource=admin',
|
||||
/**运营平台接口地址 */
|
||||
baseUrl: 'blacklagoon-slb.pro.g123-cpp.com',
|
||||
baseUrl: 'https://blacklagoon-slb.stg.g123-cpp.com',
|
||||
/**服务器时间 */
|
||||
time: '',
|
||||
/**开服时间 */
|
||||
|
@ -24,7 +24,6 @@ import {ResOpen as ResOpenZhoumolibao} from '../shared/protocols/event/zhoumolib
|
||||
import {ResOpen as ResOpenPobinglibao} from '../shared/protocols/event/pobinglibao/PtlOpen';
|
||||
import {ResOpen as ResOpenLeiChongLiBao} from '../shared/protocols/event/leichonglibao/PtlOpen';
|
||||
import {event as ResOpenYuandan} from '../shared/protocols/event/yuandan/PtlOpen';
|
||||
import {PlayerData} from "../api_s2c/event/huangqijiuguan/fun";
|
||||
|
||||
export type eventType = {
|
||||
shouchong: {
|
||||
@ -75,7 +74,6 @@ export type eventType = {
|
||||
[k: `leichonglibao${number}`]: ResOpenLeiChongLiBao & { opentime: number };
|
||||
[k: `yuandan${number}`]: ResOpenYuandan;
|
||||
[k: `pobinglibao${number}`]: ResOpenPobinglibao;
|
||||
[k: `huangqijiuguan_${number}`]: PlayerData;
|
||||
};
|
||||
|
||||
export type CollectionEvent<T extends keyof eventType> = {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {fightResult} from '../shared/fightControl/fightType';
|
||||
|
||||
|
||||
export type CollectionFightLog = fightResult & { uid: string, type: string, ttl: Date};
|
||||
export type CollectionFightLog = fightResult & { uid: string, type: string };
|
@ -1,25 +1,25 @@
|
||||
import { ResSyncBtn } from '../shared/protocols/PtlSyncBtn';
|
||||
import { payLog } from '../shared/protocols/pay/PtlGetList';
|
||||
import { rankType } from '../shared/protocols/rank/PtlOpen';
|
||||
import { CollectionChatLog } from './collection_chatlog';
|
||||
import { CollectionActionLog } from './collection_actionLog';
|
||||
import { CollectionCardlog } from './collection_cardlog';
|
||||
import { CollectionCllsCrossGroup, CollectionCllsCrossUser } from './collection_clsl';
|
||||
import { CollectionCrosskv } from './collection_crosskv';
|
||||
import { CollectionDayPay } from './collection_dayPay';
|
||||
import { CollectionDxlt } from './collection_dxlt';
|
||||
import { CollectionEmail } from './collection_email';
|
||||
import { CollectionEquip } from './collection_equip';
|
||||
import { CollectionEvent } from './collection_event';
|
||||
import { CollectionFriend } from './collection_friend';
|
||||
import { CollectionGanHai } from './collection_ganhai';
|
||||
import { CollectionGBTX } from './collection_gbtx';
|
||||
import { CollectionGongHui, CollectionGongHuiFb, CollectionGongHuiUser } from './collection_gonghui';
|
||||
import { CollectionHbzbUserCross, CollectionHbzbUserZbs } from './collection_hbzb_user_cross';
|
||||
import { CollectionHero } from './collection_hero';
|
||||
import { CollectionItem } from './collection_item';
|
||||
import { CollectionJJC } from './collection_jjc';
|
||||
import { CollectionApiWeiXiuChang } from './collection_weixiuchang';
|
||||
import {ResSyncBtn} from '../shared/protocols/PtlSyncBtn';
|
||||
import {payLog} from '../shared/protocols/pay/PtlGetList';
|
||||
import {rankType} from '../shared/protocols/rank/PtlOpen';
|
||||
import {CollectionChatLog} from './collection_chatlog';
|
||||
import {CollectionActionLog} from './collection_actionLog';
|
||||
import {CollectionCardlog} from './collection_cardlog';
|
||||
import {CollectionCllsCrossGroup, CollectionCllsCrossUser} from './collection_clsl';
|
||||
import {CollectionCrosskv} from './collection_crosskv';
|
||||
import {CollectionDayPay} from './collection_dayPay';
|
||||
import {CollectionDxlt} from './collection_dxlt';
|
||||
import {CollectionEmail} from './collection_email';
|
||||
import {CollectionEquip} from './collection_equip';
|
||||
import {CollectionEvent} from './collection_event';
|
||||
import {CollectionFriend} from './collection_friend';
|
||||
import {CollectionGanHai} from './collection_ganhai';
|
||||
import {CollectionGBTX} from './collection_gbtx';
|
||||
import {CollectionGongHui, CollectionGongHuiFb, CollectionGongHuiUser} from './collection_gonghui';
|
||||
import {CollectionHbzbUserCross, CollectionHbzbUserZbs} from './collection_hbzb_user_cross';
|
||||
import {CollectionHero} from './collection_hero';
|
||||
import {CollectionItem} from './collection_item';
|
||||
import {CollectionJJC} from './collection_jjc';
|
||||
import {CollectionApiWeiXiuChang} from './collection_weixiuchang';
|
||||
|
||||
import {
|
||||
CollectionKbzzApplyUser,
|
||||
@ -134,7 +134,7 @@ export type MongodbCollections = {
|
||||
rmbuse: CollectionRmbuse
|
||||
fightLog: CollectionFightLog
|
||||
shop: CollectionShop
|
||||
pushgift: CollectionPushGift
|
||||
pushgift:CollectionPushGift
|
||||
|
||||
huodong_user: CollectionUser;
|
||||
weiwang: CollectionWeiwang;
|
||||
|
@ -2651,20 +2651,6 @@ export const serviceProto: ServiceProto<ServiceType> = {
|
||||
}
|
||||
},
|
||||
"optional": true
|
||||
},
|
||||
{
|
||||
"id": 39,
|
||||
"name": "heroskin",
|
||||
"type": {
|
||||
"type": "Interface",
|
||||
"indexSignature": {
|
||||
"keyType": "String",
|
||||
"type": {
|
||||
"type": "Number"
|
||||
}
|
||||
}
|
||||
},
|
||||
"optional": true
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -11,29 +11,14 @@
|
||||
},
|
||||
{
|
||||
"key":"got_rmbmoney",
|
||||
"limit":100000,
|
||||
"tips":"钻石获取达到10万"
|
||||
"limit":50000,
|
||||
"tips":"钻石获取达到5万"
|
||||
},
|
||||
{
|
||||
"key":"use_attr_rmbmoney",
|
||||
"limit":100000,
|
||||
"tips":"钻石消耗达到10万"
|
||||
},
|
||||
{
|
||||
"key":"got_huangqijinbi",
|
||||
"limit":5000,
|
||||
"tips":"单日获取黄旗金币达到5000"
|
||||
},
|
||||
{
|
||||
"key":"got_huangqiduihuan",
|
||||
"limit":10000,
|
||||
"tips":"单日获取黄旗兑换达到10000"
|
||||
},
|
||||
{
|
||||
"key": "huangqijiuguan/ZhaoMu",
|
||||
"limit": 1000,
|
||||
"tips": "单日获取黄旗招募超过1000抽"
|
||||
},
|
||||
{
|
||||
"key":"tanxian/FastGuaJi",
|
||||
"limit":30,
|
||||
|
@ -4,7 +4,6 @@ import { MsgChat } from '../shared/protocols/msg_s2c/MsgChat';
|
||||
import { player } from '../shared/protocols/user/type';
|
||||
import { chatLog, chatMsgLog } from '../shared/protocols/type'
|
||||
import { PublicShared } from '../shared/public/public';
|
||||
import { clusterRunOnce } from '../clusterUtils';
|
||||
|
||||
const msgListLen = {
|
||||
'cross': 30,
|
||||
@ -29,9 +28,13 @@ export function getCrossChatGroupByOpenDay(){
|
||||
export class ChatFun {
|
||||
/**新增消息 */
|
||||
static async newMsg(sendData: MsgChat) {
|
||||
let addToDB = 0;
|
||||
G.mongodb.collection('chat').updateOne(
|
||||
{ type: `${sendData.type}${sendData.type == 'guild' ? (sendData.sender as player)?.ghId : ''}` },
|
||||
{ $push: { list: { $each: [sendData], $slice: -msgListLen[sendData.type] } } },
|
||||
{ upsert: true }
|
||||
);
|
||||
|
||||
if (sendData.type == 'guild') {
|
||||
addToDB = 1;
|
||||
G.server.broadcastClusterMsg('msg_s2c/Chat', sendData,{ghId:(sendData.sender as player)?.ghId});
|
||||
}else if(sendData.type == 'cross'){
|
||||
//所有的子进程都会收到,不需要集群内分别广播
|
||||
@ -39,27 +42,9 @@ export class ChatFun {
|
||||
//如果时候同一个分组的
|
||||
delete sendData?.otherData?.group;
|
||||
G.server.broadcastMsg('msg_s2c/Chat', sendData);
|
||||
addToDB = 2;
|
||||
}
|
||||
}else{
|
||||
G.server.broadcastClusterMsg('msg_s2c/Chat', sendData);
|
||||
addToDB = 1;
|
||||
}
|
||||
|
||||
if(addToDB == 1){
|
||||
G.mongodb.collection('chat').updateOne(
|
||||
{ type: `${sendData.type}${sendData.type == 'guild' ? (sendData.sender as player)?.ghId : ''}` },
|
||||
{ $push: { list: { $each: [sendData], $slice: -msgListLen[sendData.type] } } },
|
||||
{ upsert: true }
|
||||
);
|
||||
}else if(addToDB == 2){
|
||||
clusterRunOnce(()=>{
|
||||
G.mongodb.collection('chat').updateOne(
|
||||
{ type: `${sendData.type}${sendData.type == 'guild' ? (sendData.sender as player)?.ghId : ''}` },
|
||||
{ $push: { list: { $each: [sendData], $slice: -msgListLen[sendData.type] } } },
|
||||
{ upsert: true }
|
||||
);
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -19,8 +19,7 @@ export class DxltFun {
|
||||
}
|
||||
/**回退层数 */
|
||||
static backLayer(data: ResOpen) {
|
||||
//let num = data.curLayer - G.gc.dxlt_com.dayResetBackLayer;
|
||||
let num = (data.curLayer-30) - (data.curLayer-30)%5+1
|
||||
let num = data.curLayer - G.gc.dxlt_com.dayResetBackLayer;
|
||||
data.curLayer = num < 1 ? 1 : num;
|
||||
data.over = G.gc.dxlt_layer[data.curLayer].type == 2;
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ import { re, string } from "mathjs";
|
||||
import { getGud } from './gud';
|
||||
import { PushGiftFun } from "./pushgift";
|
||||
|
||||
type fightType = 'tanxian' | 'pata' | 'jjc' | 'gbtx' | 'qjzzd' | 'meirishilian' | 'wzrycross' | 'hqjg';
|
||||
type fightType = 'tanxian' | 'pata' | 'jjc' | 'gbtx' | 'qjzzd' | 'meirishilian' | 'wzrycross';
|
||||
|
||||
|
||||
let fights: { [key: string]: FightControl } = {
|
||||
@ -87,13 +87,9 @@ export class FightFun {
|
||||
|
||||
/**挑战竞技场 */
|
||||
static async fightJJc(call: ApiCall, rankInfo: rankInfo) {
|
||||
let result;
|
||||
if (rankInfo.player.uid.indexOf('npc_') != -1) return await this.fightNpc(call, G.gc.jjc_npc[rankInfo.player.uid].npcId, 'jjc', await this.getPlayerFightData(call.conn.uid));
|
||||
|
||||
if (rankInfo.player.uid.indexOf('npc_') != -1) {
|
||||
result = await this.fightNpc(call, G.gc.jjc_npc[rankInfo.player.uid].npcId, 'jjc', await this.getPlayerFightData(call.conn.uid));
|
||||
} else {
|
||||
result = this.fight([await this.getPlayerFightData(call.conn.uid), await this.getPlayerFightData(rankInfo.player.uid)]);
|
||||
}
|
||||
let result = this.fight([await this.getPlayerFightData(call.conn.uid), await this.getPlayerFightData(rankInfo.player.uid)]);
|
||||
|
||||
// 竞技场 战败触发推送礼包
|
||||
if (result.winSide != 0) {
|
||||
@ -144,11 +140,11 @@ export class FightFun {
|
||||
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, ttl: new Date() })
|
||||
G.mongodb.collection('fightLog').insertOne({ uid, type, ...result })
|
||||
|
||||
}
|
||||
|
||||
static async readLog(uid: string, type: string, len = 20) {
|
||||
return await G.mongodb.collection('fightLog').find({ uid, type }).limit(len).sort({ _id: -1 }).toArray() || []
|
||||
return await G.mongodb.collection('fightLog').find({ uid, type }).limit(len).toArray() || []
|
||||
}
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
import { ApiCall } from "tsrpc";
|
||||
import { call } from "../public/player";
|
||||
import { PlayerFun } from "../public/player";
|
||||
|
||||
|
||||
export default class HeroSkinFun {
|
||||
|
||||
/**
|
||||
* 获取英雄皮肤列表
|
||||
* @param uid
|
||||
* @returns
|
||||
*/
|
||||
static getHeroSkin(call: call, oids: string | string[] = '') {
|
||||
return call.conn.gud.heroskin || {};
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新英雄皮肤数据
|
||||
*
|
||||
* 说明 addAttr 会推送msg_s2c/PlayerChange
|
||||
* addEventMsg 会检测 PlayerChange 如果change的key在player中则触发重算战力操作
|
||||
* 所以这个地放更新heroskin数据不需要主动重算战力
|
||||
* @param oid
|
||||
* @param data
|
||||
* @returns
|
||||
* */
|
||||
static async updateHeroSkinLv(call: ApiCall, change: k_v<number>) {
|
||||
let skin = this.getHeroSkin(call);
|
||||
skin = Object.assign(skin, change);
|
||||
await PlayerFun.addAttr(call, { heroskin: skin });
|
||||
}
|
||||
}
|
@ -94,37 +94,37 @@ export class JJCFun {
|
||||
* @param uTimeOffset
|
||||
* @param isUpdate 是否更新数据
|
||||
*/
|
||||
// static async checkUpdatePlayer(min: number = 0, max: number = 1000, uTimeOffset: number = 600, isUpdate: boolean = true) {
|
||||
// // 获取指定排名用户uid
|
||||
// let sortInfo = await this.getRankListUid(min, max)
|
||||
// if (!sortInfo.length) return []
|
||||
// let updateArr = []
|
||||
static async checkUpdatePlayer(min: number = 0, max: number = 1000, uTimeOffset: number = 600, isUpdate: boolean = true) {
|
||||
// 获取指定排名用户uid
|
||||
let sortInfo = await this.getRankListUid(min, max)
|
||||
if (!sortInfo.length) return []
|
||||
let updateArr = []
|
||||
|
||||
// let users = await G.redis.hGetAll('rank:jjc:data')
|
||||
let users = await G.redis.hGetAll('rank:jjc:data')
|
||||
|
||||
// for (let i = 0; i < sortInfo.length; i++) {
|
||||
// let uid = sortInfo[i]
|
||||
// let rankInfo = users[uid]
|
||||
// if (!rankInfo?.player) continue
|
||||
// // 比对utime,判断是否更新数据
|
||||
// if (!rankInfo.player.isNpc) {
|
||||
// if (!rankInfo.utime || (rankInfo.utime && rankInfo.utime < (G.time - uTimeOffset))) {
|
||||
// updateArr.push(rankInfo)
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// // 更新数据
|
||||
// if (isUpdate && updateArr.length > 0) {
|
||||
// let playerArrInfo = await G.mongodb.collection("user").find({uid: {$in: updateArr.map(i => i.uid)}}).toArray()
|
||||
// for (let i = 0; i < playerArrInfo.length; i++) {
|
||||
// let playerInfo = playerArrInfo[i]
|
||||
// let index = updateArr.findIndex(x => x.player.uid == playerInfo.uid)
|
||||
// updateArr[index].player = playerInfo
|
||||
// updateArr[index].utime = G.time
|
||||
// this.updatePlayerData(playerInfo.uid, updateArr[index]);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
for (let i = 0; i < sortInfo.length; i++) {
|
||||
let uid = sortInfo[i]
|
||||
let rankInfo = users[uid]
|
||||
if (!rankInfo?.player) continue
|
||||
// 比对utime,判断是否更新数据
|
||||
if (!rankInfo.player.isNpc) {
|
||||
if (!rankInfo.utime || (rankInfo.utime && rankInfo.utime < (G.time - uTimeOffset))) {
|
||||
updateArr.push(rankInfo)
|
||||
}
|
||||
}
|
||||
}
|
||||
// 更新数据
|
||||
if (isUpdate && updateArr.length > 0) {
|
||||
let playerArrInfo = await G.mongodb.collection("user").find({uid: {$in: updateArr.map(i => i.uid)}}).toArray()
|
||||
for (let i = 0; i < playerArrInfo.length; i++) {
|
||||
let playerInfo = playerArrInfo[i]
|
||||
let index = updateArr.findIndex(x => x.player.uid == playerInfo.uid)
|
||||
updateArr[index].player = playerInfo
|
||||
updateArr[index].utime = G.time
|
||||
this.updatePlayerData(playerInfo.uid, updateArr[index]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取指定范围排名的用户,仅返回uid[]
|
||||
|
@ -179,14 +179,14 @@ export class KuangDongfun {
|
||||
}
|
||||
if (!kdInfo) return []
|
||||
let _con = await this.getCon(hdid)
|
||||
let _kcTime = G.time - kdInfo.ctime
|
||||
let _kcTime = G.time + kdInfo.yanshi - kdInfo.ctime
|
||||
//let _gud = await G.mongodb.collection('user').findOne({uid: kdInfo.uid})
|
||||
let _gud = await getGud(kdInfo.uid)
|
||||
let gamer_lv = _gud.lv
|
||||
// @ts-ignore
|
||||
let prize: prizeType[] = _con.reward
|
||||
// let prize: prizeType[] = [{ a: 'attr', t: 'rmbmoney', n: 50 }] // todo 待接入配置
|
||||
if (_kcTime > 8 * 3600 + kdInfo.yanshi) _kcTime = 8 * 3600 + kdInfo.yanshi // 设置最大时长
|
||||
if (_kcTime > 8 * 3600) _kcTime = 8 * 3600 + kdInfo.yanshi // 设置最大时长
|
||||
prize[0]["n"] = Math.floor(eval(_con.formula) * _kcTime)
|
||||
|
||||
if (_con.public_map == 1){
|
||||
|
@ -66,8 +66,7 @@ export class PayFun {
|
||||
);
|
||||
})
|
||||
|
||||
let colls = args.map(i => ({key: i.payId, uid: uid, values: i.val}))
|
||||
if(colls.length>0)G.mongodb.collection('payLogNew').insertMany(colls);
|
||||
G.mongodb.collection('payLogNew').insertMany(args.map(i => ({key: i.payId, uid: uid, values: i.val})));
|
||||
|
||||
G.server.sendMsgByUid(uid, 'msg_s2c/PayChange', Object.fromEntries(args.map(a => [a.payId, a.val])));
|
||||
}
|
||||
@ -261,10 +260,7 @@ export class PayFun {
|
||||
let selectPrize = await G.ioredis.get(`pay:${payId}:${player.uid}`);
|
||||
if (selectPrize) {
|
||||
prize.push(...JSON.parse(selectPrize))
|
||||
//支付A check -> 玩家支付 -> 网络延迟
|
||||
//支付B check -> 玩家支付 -> pay -> del
|
||||
//支付A -> pay 时,这里可能被清了,导致给玩家发放了空的奖励,因此,这里不清除
|
||||
//G.ioredis.del(`pay:${payId}:${player.uid}`)
|
||||
G.ioredis.del(`pay:${payId}:${player.uid}`)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,27 +1,24 @@
|
||||
import { ObjectId, OptionalId } from 'mongodb';
|
||||
import { ApiCall, BaseConnection, TsrpcError } from 'tsrpc';
|
||||
import { checkPlayerGift } from '../api_s2c/event/xianshilibao/fun';
|
||||
import { md_redPoint_check } from '../api_s2c/gongyu/mingdao/ApiOpen';
|
||||
import { CollectionPeiJian } from '../module/collection_peijian';
|
||||
import { Wjjl } from '../module/collection_wjjl';
|
||||
import { MongodbCollections } from '../module/mongodb';
|
||||
import { G123 } from '../sdk/G123';
|
||||
import { ResGetList } from '../shared/protocols/item/PtlGetList';
|
||||
import { ResLogin } from '../shared/protocols/user/PtlLogin';
|
||||
import { player } from '../shared/protocols/user/type';
|
||||
import { HeroShared, otherBuff } from '../shared/public/hero';
|
||||
import { PublicShared } from '../shared/public/public';
|
||||
import { HeroFun } from './hero';
|
||||
import { ShiwuFun } from './shiwu';
|
||||
import { UserFun } from './user';
|
||||
import { getItemByItemId, getItemNum } from './item';
|
||||
import { getGud, setGud } from './gud';
|
||||
import { addGameLog } from "../gameLog";
|
||||
import { PushGiftFun } from "./pushgift";
|
||||
import {ObjectId, OptionalId} from 'mongodb';
|
||||
import {ApiCall, BaseConnection, TsrpcError} from 'tsrpc';
|
||||
import {checkPlayerGift} from '../api_s2c/event/xianshilibao/fun';
|
||||
import {md_redPoint_check} from '../api_s2c/gongyu/mingdao/ApiOpen';
|
||||
import {CollectionPeiJian} from '../module/collection_peijian';
|
||||
import {Wjjl} from '../module/collection_wjjl';
|
||||
import {MongodbCollections} from '../module/mongodb';
|
||||
import {G123} from '../sdk/G123';
|
||||
import {ResGetList} from '../shared/protocols/item/PtlGetList';
|
||||
import {ResLogin} from '../shared/protocols/user/PtlLogin';
|
||||
import {player} from '../shared/protocols/user/type';
|
||||
import {HeroShared, otherBuff} from '../shared/public/hero';
|
||||
import {PublicShared} from '../shared/public/public';
|
||||
import {HeroFun} from './hero';
|
||||
import {ShiwuFun} from './shiwu';
|
||||
import {UserFun} from './user';
|
||||
import {getItemByItemId, getItemNum} from './item';
|
||||
import {getGud, setGud} from './gud';
|
||||
import {addGameLog} from "../gameLog";
|
||||
import {PushGiftFun} from "./pushgift";
|
||||
import { ActionLog } from './actionLog/actionLog';
|
||||
import { roleDataType } from '../shared/fightControl/fightType';
|
||||
import { PlayerShared } from '../shared/public/player';
|
||||
import HeroSkinFun from './heroskin';
|
||||
|
||||
|
||||
export type call = {
|
||||
@ -44,41 +41,6 @@ export type call = {
|
||||
};
|
||||
|
||||
export class PlayerFun {
|
||||
/**
|
||||
* 通过uid获取战斗数据
|
||||
* @param uid
|
||||
* @returns
|
||||
*/
|
||||
static async getDefaultFightDataByUid(uid: string) {
|
||||
let gud = await getGud(uid);
|
||||
let posObj = gud.heroPos;
|
||||
let roles: k_v<roleDataType> = {};
|
||||
if (gud.selectMatrix && gud.matrixPos) {
|
||||
posObj = gud.matrixPos[gud.selectMatrix];
|
||||
}
|
||||
let heros = await HeroFun.getHeros({ uid: uid }, Object.values(posObj).filter(_id => _id != '') as string[]);
|
||||
let otherBuff = UserFun.getOtherBuff(gud)
|
||||
|
||||
Object.entries(posObj).forEach(obj => {
|
||||
let pos = obj[0];
|
||||
let _id = obj[1];
|
||||
let hero = heros.filter(h => h._id == _id)[0];
|
||||
|
||||
if (hero) {
|
||||
roles[pos] = {
|
||||
...hero,
|
||||
attr: {
|
||||
...HeroShared.getHeroBasicAttr(hero, { ...otherBuff, allBuff: HeroShared.getAllBuff(heros) }, Number(pos))
|
||||
}
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
return {
|
||||
player: { ...gud, buff: PlayerShared.getBuff(gud) },
|
||||
roles: roles
|
||||
};
|
||||
}
|
||||
/**
|
||||
* 获取玩家atn数量
|
||||
*/
|
||||
@ -108,13 +70,13 @@ export class PlayerFun {
|
||||
if (err) {
|
||||
// 消耗不足 触发推送礼包
|
||||
PushGiftFun.chkItemGift(call.uid, atn)
|
||||
throw new TsrpcError('', { code: -104, atn: atn });
|
||||
throw new TsrpcError('', {code: -104, atn: atn});
|
||||
} else {
|
||||
return { isOk: false, atn: atn };
|
||||
return {isOk: false, atn: atn};
|
||||
}
|
||||
}
|
||||
}
|
||||
return { isOk: true, atn: null };
|
||||
return {isOk: true, atn: null};
|
||||
}
|
||||
|
||||
/**
|
||||
@ -132,7 +94,7 @@ export class PlayerFun {
|
||||
atn: need
|
||||
};
|
||||
if (args.length < 1) {
|
||||
throw new TsrpcError('', { code: -104, atn: meet.atn });
|
||||
throw new TsrpcError('', {code: -104, atn: meet.atn});
|
||||
}
|
||||
return await this.checkNeedByArgs(call, ...args);
|
||||
}
|
||||
@ -155,17 +117,17 @@ export class PlayerFun {
|
||||
all.push(this.addItem(call, item));
|
||||
}
|
||||
// 记录消耗
|
||||
addGameLog(call.uid, call.service.name, call.req, { need: val })
|
||||
addGameLog(call.uid, call.service.name, call.req, {need: val})
|
||||
await Promise.all(all);
|
||||
G.emit('USE_ITEM', call.conn.gud, needArr.map(need => {
|
||||
return { ...need, n: Math.abs(need.n) };
|
||||
return {...need, n: Math.abs(need.n)};
|
||||
}));
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送奖励
|
||||
*/
|
||||
static async sendPrize(call: call, prizeList: atn[], pushToClient=false) {
|
||||
static async sendPrize(call: call, prizeList: atn[]) {
|
||||
prizeList = PublicShared.mergePrize(prizeList);
|
||||
|
||||
let attr = prizeList.filter(atn => atn.a == 'attr' && atn.n != 0);
|
||||
@ -174,28 +136,18 @@ export class PlayerFun {
|
||||
let equip = prizeList.filter(atn => atn.a == 'equip' && atn.n != 0);
|
||||
let shiwu = prizeList.filter(atn => atn.a == 'shiwu' && atn.n != 0);
|
||||
let peijian = prizeList.filter(atn => atn.a == 'peijian' && atn.n != 0);
|
||||
let heroskin = prizeList.filter(atn => atn.a == 'heroskin' && atn.n != 0);
|
||||
|
||||
// 记录获得
|
||||
addGameLog(call.uid, call.service.name, call.req, { prize: prizeList })
|
||||
addGameLog(call.uid, call.service.name, call.req, {prize: prizeList})
|
||||
await Promise.all([
|
||||
attr.length > 0 && this.addAttr(call, attr),
|
||||
item.length > 0 && this.addItem(call, item),
|
||||
hero.length > 0 && this.addHero(call, hero),
|
||||
equip.length > 0 && this.addEquip(call, equip),
|
||||
shiwu.length > 0 && this.addShiwu(call, shiwu),
|
||||
peijian.length > 0 && this.addPeijian(call, peijian),
|
||||
heroskin.length > 0 && this.addHeroskin(call, heroskin),
|
||||
peijian.length > 0 && this.addPeijian(call, peijian)
|
||||
]);
|
||||
|
||||
if(pushToClient){
|
||||
G.server.sendMsgByUid(call.uid, 'msg_s2c/Collection', {
|
||||
fromApi: `PlayerFun_sendPrize`,
|
||||
msg: call.eventMsg
|
||||
});
|
||||
call.eventMsg = {};
|
||||
}
|
||||
|
||||
return prizeList;
|
||||
};
|
||||
|
||||
@ -228,14 +180,9 @@ export class PlayerFun {
|
||||
}
|
||||
}
|
||||
|
||||
if ((atn.t == 'rmbmoney' || atn.t == 'jinbi') && 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 });
|
||||
}
|
||||
|
||||
if (["huangqijinbi", "huangqiduihuan"].includes(atn.t) && atn.n > 0) {
|
||||
//统计今日获取的黄旗金币和黄旗对换币
|
||||
ActionLog.addDayLog(call.conn.uid, { key: 'got_' + atn.t, val: atn.n });
|
||||
ActionLog.addDayLog(call.conn.uid, { key: 'got_'+atn.t, val: atn.n });
|
||||
}
|
||||
|
||||
// 增加vip经验的任务监听
|
||||
@ -243,7 +190,7 @@ export class PlayerFun {
|
||||
G.emit("Class_task_157", 'Class_task_157', call, atn.n, 0);
|
||||
}
|
||||
all.push(this.changeAttr(call.conn.uid, change));
|
||||
all.push(this.upAttr(call, { ...atn, n: change[atn.t] }));
|
||||
all.push(this.upAttr(call, {...atn, n: change[atn.t]}));
|
||||
//await this.changeAttr(call.conn.uid, change);
|
||||
//await this.upAttr(call, {...atn, n: change[atn.t]});
|
||||
}
|
||||
@ -286,17 +233,17 @@ export class PlayerFun {
|
||||
G.mongodb.collection('rmbuse').insertOne(data);
|
||||
// 消费竞赛开启时写入跨服数据库
|
||||
if (G.huodong.xfjs && !data.isAdd && typeof data.change == 'number') {
|
||||
G.crossmongodb.collection('rmbuse').updateOne({ uid: data.uid, type: `xfjs_${G.huodong.xfjsId}` }, {
|
||||
$set: { time: G.time },
|
||||
$inc: { change: data.change }
|
||||
}, { upsert: true });
|
||||
G.crossmongodb.collection('rmbuse').updateOne({uid: data.uid, type: `xfjs_${G.huodong.xfjsId}`}, {
|
||||
$set: {time: G.time},
|
||||
$inc: {change: data.change}
|
||||
}, {upsert: true});
|
||||
}
|
||||
}
|
||||
|
||||
static async changeAttr(uid: string, change: Partial<player>) {
|
||||
setGud(uid, change);
|
||||
|
||||
G.mongodb.collection('user').updateOne({ uid: uid }, { $set: change });
|
||||
G.mongodb.collection('user').updateOne({uid: uid}, {$set: change});
|
||||
|
||||
if (G.server.uid_connections[uid]) {
|
||||
checkPlayerGift(G.server.uid_connections[uid].gud, change);
|
||||
@ -318,9 +265,9 @@ export class PlayerFun {
|
||||
const curLv = call.conn.gud.lv;
|
||||
while (conf[curLv + addLv + 1] && atn.n >= conf[curLv + addLv + 1].need) {
|
||||
addLv++;
|
||||
G123.sendUserLevelUp({ ...call.conn.gud, lv: curLv + addLv, nexp: atn.n });
|
||||
G123.sendUserLevelUp({...call.conn.gud, lv: curLv + addLv, nexp: atn.n});
|
||||
}
|
||||
addLv && await this.addAttr(call, { lv: curLv + addLv });
|
||||
addLv && await this.addAttr(call, {lv: curLv + addLv});
|
||||
break;
|
||||
case 'payExp':
|
||||
let addVip = 0;
|
||||
@ -329,7 +276,7 @@ export class PlayerFun {
|
||||
while (vipConf[curVip + addVip + 1] && atn.n >= vipConf[curVip + addVip + 1].exp) {
|
||||
addVip++;
|
||||
}
|
||||
addVip && await this.addAttr(call, { vip: curVip + addVip });
|
||||
addVip && await this.addAttr(call, {vip: curVip + addVip});
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -340,7 +287,7 @@ export class PlayerFun {
|
||||
static async addItem(call: call, val: atn[]) {
|
||||
for (let atn of val) {
|
||||
let upObj = {
|
||||
filter: { uid: call.uid, itemId: atn.t },
|
||||
filter: {uid: call.uid, itemId: atn.t},
|
||||
update: {
|
||||
$setOnInsert: {
|
||||
firstTime: G.time,
|
||||
@ -372,7 +319,7 @@ export class PlayerFun {
|
||||
};
|
||||
G.mongodb.collection('item').updateOne(upObj.filter, upObj.update, upObj.options);
|
||||
call.addEventMsg('msg_s2c/ItemChange', atn.t, data);
|
||||
addGameLog(call.uid, "_itemChange", { "additem": 1 }, {
|
||||
addGameLog(call.uid, "_itemChange", {"additem": 1}, {
|
||||
"filter": upObj.filter,
|
||||
"update": upObj.update,
|
||||
"options": upObj.options
|
||||
@ -380,10 +327,10 @@ export class PlayerFun {
|
||||
} else {
|
||||
if (item.num + atn.n <= 0) {
|
||||
await Promise.all([
|
||||
G.mongodb.collection('item').deleteOne({ uid: call.uid, itemId: atn.t })
|
||||
G.mongodb.collection('item').deleteOne({uid: call.uid, itemId: atn.t})
|
||||
]);
|
||||
call.addEventMsg('msg_s2c/ItemChange', atn.t, { num: 0 });
|
||||
addGameLog(call.uid, "_itemChange", { "delitem": 1 }, { "itemId": atn.t })
|
||||
call.addEventMsg('msg_s2c/ItemChange', atn.t, {num: 0});
|
||||
addGameLog(call.uid, "_itemChange", {"delitem": 1}, {"itemId": atn.t})
|
||||
} else {
|
||||
await Promise.all([
|
||||
G.mongodb.collection('item').updateOne(upObj.filter, upObj.update, upObj.options)
|
||||
@ -392,7 +339,7 @@ export class PlayerFun {
|
||||
num: item.num + atn.n,
|
||||
lastTime: upObj.update.$set.lastTime
|
||||
});
|
||||
addGameLog(call.uid, "_itemChange", { "attritem": 1 }, {
|
||||
addGameLog(call.uid, "_itemChange", {"attritem": 1}, {
|
||||
"filter": upObj.filter,
|
||||
"update": upObj.update,
|
||||
"options": upObj.options,
|
||||
@ -427,7 +374,7 @@ export class PlayerFun {
|
||||
|
||||
insertData.forEach((v, key) => {
|
||||
let id = result.insertedIds[key].toHexString();
|
||||
let { _id, ...ops } = v;
|
||||
let {_id, ...ops} = v;
|
||||
|
||||
Wjjl.setVal(call.uid, `has_equip_color_${G.gc.equip[ops.equipId].colour}`, 1, false);
|
||||
|
||||
@ -461,10 +408,10 @@ export class PlayerFun {
|
||||
*/
|
||||
static async cutEquip(call: call, _idArr: string[]) {
|
||||
for (let _id of _idArr) {
|
||||
G.mongodb.collection('equip').deleteOne({ uid: call.uid, _id: new ObjectId(_id) });
|
||||
call.addEventMsg('msg_s2c/EquipChange', _id, { num: 0 });
|
||||
G.mongodb.collection('equip').deleteOne({uid: call.uid, _id: new ObjectId(_id)});
|
||||
call.addEventMsg('msg_s2c/EquipChange', _id, {num: 0});
|
||||
|
||||
addGameLog(call.uid, "_cutEquip", {}, { _id: _id })
|
||||
addGameLog(call.uid, "_cutEquip", {}, {_id: _id})
|
||||
}
|
||||
}
|
||||
|
||||
@ -498,7 +445,7 @@ export class PlayerFun {
|
||||
let v = insertData[key]
|
||||
|
||||
let id = result.insertedIds[key].toHexString();
|
||||
let { _id, ...ops } = v;
|
||||
let {_id, ...ops} = v;
|
||||
|
||||
call.addEventMsg('msg_s2c/HeroChange', id, {
|
||||
_id: id,
|
||||
@ -531,9 +478,9 @@ export class PlayerFun {
|
||||
static async cutHero(call: call, _idArr: string[]) {
|
||||
for (let _id of _idArr) {
|
||||
await HeroFun.delHero(call, _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 })
|
||||
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})
|
||||
}
|
||||
}
|
||||
|
||||
@ -548,7 +495,7 @@ export class PlayerFun {
|
||||
colour: v.colour,
|
||||
wearId: '',
|
||||
shiwuId: v.t,
|
||||
jichu: ShiwuFun.randomJichu({ colour: v.colour, shiwuId: v.t }),
|
||||
jichu: ShiwuFun.randomJichu({colour: v.colour, shiwuId: v.t}),
|
||||
fujia: []
|
||||
};
|
||||
if (v.shiwuBuff) {
|
||||
@ -568,7 +515,7 @@ export class PlayerFun {
|
||||
|
||||
insertData.forEach((v, key) => {
|
||||
let id = result.insertedIds[key].toHexString();
|
||||
let { _id, ...ops } = v;
|
||||
let {_id, ...ops} = v;
|
||||
call.addEventMsg('msg_s2c/ShiwuChange', id, {
|
||||
_id: id,
|
||||
...ops
|
||||
@ -587,9 +534,9 @@ export class PlayerFun {
|
||||
*/
|
||||
static async cutShiwu(call: call, _idArr: string[]) {
|
||||
for (let _id of _idArr) {
|
||||
G.mongodb.collection('shiwu').deleteOne({ uid: call.uid, _id: new ObjectId(_id) });
|
||||
call.addEventMsg('msg_s2c/ShiwuChange', _id, { num: 0 });
|
||||
addGameLog(call.uid, "_cutShiwu", {}, { _id: _id })
|
||||
G.mongodb.collection('shiwu').deleteOne({uid: call.uid, _id: new ObjectId(_id)});
|
||||
call.addEventMsg('msg_s2c/ShiwuChange', _id, {num: 0});
|
||||
addGameLog(call.uid, "_cutShiwu", {}, {_id: _id})
|
||||
}
|
||||
}
|
||||
|
||||
@ -614,7 +561,7 @@ export class PlayerFun {
|
||||
addGameLog(call.uid, "_addPeiJian", {}, insertData)
|
||||
|
||||
insertData.forEach((v, key) => {
|
||||
let { _id, uid, ...ops } = v;
|
||||
let {_id, uid, ...ops} = v;
|
||||
let id = _id.toHexString();
|
||||
|
||||
if (G.gc.peijian[v.peijianId].colour != 5) {
|
||||
@ -622,8 +569,8 @@ export class PlayerFun {
|
||||
lshd[v.peijianId]++;
|
||||
}
|
||||
|
||||
G.redis.set('peijian', call.uid, id, { _id: id, ...ops });
|
||||
call.addEventMsg('msg_s2c/PeijianChange', id, { _id: id, ...ops });
|
||||
G.redis.set('peijian', call.uid, id, {_id: id, ...ops});
|
||||
call.addEventMsg('msg_s2c/PeijianChange', id, {_id: id, ...ops});
|
||||
});
|
||||
|
||||
G.mongodb.collection('playerInfo', 'lshd_peijian').updateOne(
|
||||
@ -644,42 +591,15 @@ export class PlayerFun {
|
||||
return Object.values(result.insertedIds).map(v => G.mongodb.conversionId(v));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加皮肤
|
||||
* */
|
||||
static async addHeroskin(call: call, val: atn[]) {
|
||||
let prize = [];
|
||||
let upskin = {};
|
||||
let heroskin = HeroSkinFun.getHeroSkin(call);
|
||||
for (let p of val) {
|
||||
if (!heroskin[p.t]) {
|
||||
upskin[p.t] = 1;
|
||||
} else {
|
||||
for (let i = 0; i < p.n; i++) {
|
||||
prize = prize.concat(G.gc.heroSkin[p.t].zhuanhuan);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (Object.keys(upskin).length > 0) {
|
||||
await this.addAttr(call, { heroskin: Object.assign(heroskin, upskin) });
|
||||
}
|
||||
|
||||
// 皮肤存在转换为其他奖励
|
||||
if (prize.length > 0) {
|
||||
await this.sendPrize(call, prize);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除配件
|
||||
*/
|
||||
static async cutPeijian(call: call, _idArr: string[]) {
|
||||
for (let _id of _idArr) {
|
||||
G.redis.del('peijian', call.uid, _id);
|
||||
G.mongodb.collection('peijian').deleteOne({ uid: call.uid, _id: new ObjectId(_id) });
|
||||
call.addEventMsg('msg_s2c/PeijianChange', _id, { num: 0 });
|
||||
addGameLog(call.uid, "_cutPeijian", {}, { _id: _id })
|
||||
G.mongodb.collection('peijian').deleteOne({uid: call.uid, _id: new ObjectId(_id)});
|
||||
call.addEventMsg('msg_s2c/PeijianChange', _id, {num: 0});
|
||||
addGameLog(call.uid, "_cutPeijian", {}, {_id: _id})
|
||||
}
|
||||
}
|
||||
|
||||
@ -688,7 +608,7 @@ export class PlayerFun {
|
||||
*/
|
||||
static async getAttr(uid: string, where: { ctype: string; }) {
|
||||
let _w = where;
|
||||
Object.assign(_w, { uid: uid });
|
||||
Object.assign(_w, {uid: uid});
|
||||
const _res = await G.mongodb.collection('playattr').find(_w).toArray();
|
||||
_res.forEach(v => {
|
||||
if (v._id) {
|
||||
@ -703,7 +623,7 @@ export class PlayerFun {
|
||||
*/
|
||||
static async getAttrOne(uid: string, where: { ctype: string; }) {
|
||||
let _w = where;
|
||||
Object.assign(_w, { uid: uid });
|
||||
Object.assign(_w, {uid: uid});
|
||||
const _res = await G.mongodb.collection('playattr').findOne(_w);
|
||||
if (_res) {
|
||||
delete _res['_id'];
|
||||
@ -719,10 +639,10 @@ export class PlayerFun {
|
||||
time = G.time;
|
||||
}
|
||||
let _zeroTime = PublicShared.getToDayZeroTime(time);
|
||||
let _tmp = { lasttime: { $gte: _zeroTime, $lte: _zeroTime + 24 * 60 * 60 - 1 } };
|
||||
let _tmp = {lasttime: {$gte: _zeroTime, $lte: _zeroTime + 24 * 60 * 60 - 1}};
|
||||
|
||||
let _w = where;
|
||||
Object.assign(_w, { uid: uid, ..._tmp });
|
||||
Object.assign(_w, {uid: uid, ..._tmp});
|
||||
const _res = await G.mongodb.collection('playattr').find(_w).toArray();
|
||||
_res.forEach(v => {
|
||||
if (v._id) {
|
||||
@ -737,7 +657,7 @@ export class PlayerFun {
|
||||
*/
|
||||
static async setAttr(uid: string, where: { ctype: string; }, data: {}, islasttime = 1) {
|
||||
let _w = where;
|
||||
Object.assign(_w, { uid: uid });
|
||||
Object.assign(_w, {uid: uid});
|
||||
|
||||
if (islasttime == 1) {
|
||||
data["lasttime"] = G.time;
|
||||
@ -748,7 +668,7 @@ export class PlayerFun {
|
||||
// 加入创建数据时间
|
||||
data["ctime"] = G.time;
|
||||
}
|
||||
let _res = await G.mongodb.collection('playattr').updateMany(_w, { $set: data }, { upsert: true });
|
||||
let _res = await G.mongodb.collection('playattr').updateMany(_w, {$set: data}, {upsert: true});
|
||||
return _res;
|
||||
}
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
import { PublicShared } from '../../shared/public/public';
|
||||
import { EmailFun } from '../email';
|
||||
import { RankClslCross } from '../rank/rank_clsl';
|
||||
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';
|
||||
|
||||
/**
|
||||
* 丛林猎手赛季重置
|
||||
@ -26,12 +26,12 @@ export class SchedulerClslLocalCtor extends Scheduler {
|
||||
// 修改clslCrossUser表中的uid为del_uid_week 并且 设置ttltime为当前时间
|
||||
await G.mongodb.collection('clslCrossUser').updateMany(
|
||||
{
|
||||
ttltime: { $exists: false }
|
||||
}, { $rename: { "uid": `del_uid_${week}` }, $set: { "ttltime": new Date() } }
|
||||
ttltime: {$exists: false}
|
||||
}, {$rename: {"uid": `del_uid_${week}`}, $set: {"ttltime": new Date()}}
|
||||
);
|
||||
|
||||
// 获取分组信息 重置排行榜
|
||||
let groups = await G.mongodb.collection('clslCrossGroup').findOne({ week });
|
||||
let groups = await G.mongodb.collection('clslCrossGroup').findOne({week});
|
||||
Object.keys(groups.groups).forEach((group) => {
|
||||
// 清理排行数据
|
||||
new RankClslCross(group).clear();
|
||||
@ -64,7 +64,7 @@ export class SchedulerClslCrossCtor extends Scheduler {
|
||||
async start() {
|
||||
let week = PublicShared.getToWeek();
|
||||
let users = await G.mongodb.collection('clslCrossUser').find({
|
||||
ttltime: { $exists: false }
|
||||
ttltime: {$exists: false}
|
||||
}, {
|
||||
projection: {
|
||||
"uid": 1,
|
||||
@ -118,15 +118,15 @@ export class SchedulerClslCrossCtor extends Scheduler {
|
||||
|
||||
// 更新玩家分组id
|
||||
for (let group in groups) {
|
||||
await G.mongodb.collection('clslCrossUser').updateMany({ uid: { $in: groups[group].users } }, { $set: { group: group } });
|
||||
await G.mongodb.collection('clslCrossUser').updateMany({uid: {$in: groups[group].users}}, {$set: {group: group}});
|
||||
}
|
||||
|
||||
// 记录分组
|
||||
await G.mongodb.collection("clslCrossGroup").updateOne({ week: week }, { $set: { groups: groups } }, { upsert: true });
|
||||
await G.mongodb.collection("clslCrossGroup").updateOne({week: week}, {$set: {groups: groups}}, {upsert: true});
|
||||
|
||||
// 初始化丛林猎手排行榜
|
||||
G.mongodb.collection('clslCrossUser').find({
|
||||
allStar: { $gte: this.star }, ttltime: { $exists: false }
|
||||
allStar: {$gte: this.star}, ttltime: {$exists: false}
|
||||
}).toArray().then(users => {
|
||||
users.forEach(u => {
|
||||
new RankClslCross(u.group).addNew({
|
||||
@ -161,13 +161,7 @@ export class SchedulerClslPrize extends Scheduler {
|
||||
async start() {
|
||||
// 排名奖励
|
||||
let group2users: { [group: string]: string[] } = {};
|
||||
(await G.mongodb.collection('clslCrossUser').find(
|
||||
{
|
||||
uid: { $exists: true },
|
||||
allStar: { $gte: this.star }
|
||||
},
|
||||
{ sort: { allStar: -1 } }
|
||||
).limit(10).toArray()).forEach(u => {
|
||||
(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 {
|
||||
|
@ -27,44 +27,6 @@ export class SchedulerNewDayLocalCtor extends Scheduler {
|
||||
|
||||
async start() {
|
||||
|
||||
clusterRunOnce(async () => {
|
||||
//这个定时器会被每个进程都启动,这是这部分逻辑,应该只执行1次
|
||||
|
||||
//重置所有的ActionLog
|
||||
await ActionLog.initAllDayLog();
|
||||
|
||||
// 每周一,发放终身卡
|
||||
(async () => {
|
||||
if (PublicShared.getWeek(G.time) == 1) {
|
||||
let logs = await G.mongodb.collection("payLogNew").find(
|
||||
{ key: "zhongshenka", del_time: { $exists: false } }, { projection: { _id: 0, } }
|
||||
).toArray();
|
||||
|
||||
if (logs.length == 0) {
|
||||
console.log("没有终身卡数据,不发放终身卡");
|
||||
}
|
||||
let con = G.gc.payEmail.zhongshenka.filter(e => e.day == 7)[0];
|
||||
for (let i = 0; i < logs.length; i++) {
|
||||
console.log("发放终身卡", logs[i].uid);
|
||||
// 发送邮件
|
||||
EmailFun.addEmail({
|
||||
uid: logs[i].uid,
|
||||
type: "system",
|
||||
title: con.title,
|
||||
content: con.content,
|
||||
contentInsertArr: [],
|
||||
createTime: G.time,
|
||||
prize: con.prize,
|
||||
})
|
||||
}
|
||||
}
|
||||
})()
|
||||
|
||||
// 转点刷新事件
|
||||
G.emit('NEW_DAY', G.time);
|
||||
})
|
||||
|
||||
|
||||
clusterRunOnce(async ()=>{
|
||||
//这个定时器会被每个进程都启动,这是这部分逻辑,应该只执行1次
|
||||
|
||||
|
@ -299,7 +299,7 @@ export class SchedulerWzryZuanshiSendPrize extends SchedulerWzryAutoBaoMing {
|
||||
await this.record()
|
||||
return
|
||||
}
|
||||
let _prizeCon = this.typeprzie=='zuanshi'?G.gc.wangzherongyao.wangzhe.jiangli.zuanshi:G.gc.wangzherongyao.wangzhe.jiangli.wangzhe;
|
||||
let _prizeCon = this.typeprzie=='zhuanshi'?G.gc.wangzherongyao.wangzhe.jiangli.zuanshi:G.gc.wangzherongyao.wangzhe.jiangli.wangzhe;
|
||||
let _u = []
|
||||
for (let index = 0; index < _user.length; index++) {
|
||||
const element = _user[index];
|
||||
|
@ -4,6 +4,7 @@ import { taskType } from "../shared/protocols/task/type";
|
||||
import { PublicShared } from "../shared/public/public";
|
||||
import { PeijianFun } from "./peijian";
|
||||
import { manager } from "./taskclass";
|
||||
import ApiRecTask from "../api_s2c/event/zhanling/ApiRecTask";
|
||||
|
||||
let taskDict = {};
|
||||
const SHUJUKU = "task";
|
||||
@ -260,28 +261,28 @@ export class TaskFun {
|
||||
delete _w["finish"];
|
||||
}
|
||||
let _tmp = await this.getUserTaksList(call.uid, _w);
|
||||
// // 没有未完成任务 后续添加任务直接使用脚本刷任务
|
||||
// // 检测是否有新加任务
|
||||
// if (_tmp.length == 0) {
|
||||
// let rectask = (await G.mongodb.collection('task').find(
|
||||
// { uid: call.uid, type: _type }, { projection: { taskid: 1, _id: 0 } }
|
||||
// ).toArray()).map(e => e.taskid);
|
||||
// 没有未完成任务
|
||||
// 检测是否有新加任务
|
||||
if (_tmp.length == 0) {
|
||||
let rectask = (await G.mongodb.collection('task').find(
|
||||
{ uid: call.uid, type: _type }, { projection: { taskid: 1, _id: 0 } }
|
||||
).toArray()).map(e => e.taskid);
|
||||
|
||||
// for (let taskid of rectask) {
|
||||
// let conf = G.gc.task[_type][taskid];
|
||||
// // 配置不存在
|
||||
// // 没有后续任务
|
||||
// // 后续任务已完成
|
||||
// if (!conf || !conf.followtask || rectask.includes(conf.followtask)) {
|
||||
// continue
|
||||
// }
|
||||
for (let taskid of rectask) {
|
||||
let conf = G.gc.task[_type][taskid];
|
||||
// 配置不存在
|
||||
// 没有后续任务
|
||||
// 后续任务已完成
|
||||
if (!conf || !conf.followtask || rectask.includes(conf.followtask)) {
|
||||
continue
|
||||
}
|
||||
|
||||
// // 生成后续任务
|
||||
// await this.setTaskInfo(call, conf.followtask, { type: _type });
|
||||
// break;
|
||||
// }
|
||||
// _tmp = await this.getUserTaksList(call.uid, _w);
|
||||
// }
|
||||
// 生成后续任务
|
||||
await this.setTaskInfo(call, conf.followtask, { type: _type });
|
||||
break;
|
||||
}
|
||||
_tmp = await this.getUserTaksList(call.uid, _w);
|
||||
}
|
||||
_r[_type] = _tmp;
|
||||
}
|
||||
return _r;
|
||||
|
@ -1,20 +1,19 @@
|
||||
import { ApiCall } from "tsrpc"
|
||||
import { YangChengMuBiaofun } from "../api_s2c/event/yangchengmubiao/fun"
|
||||
import { Christmasfun } from "../api_s2c/event/christmas/fun"
|
||||
import {ApiCall} from "tsrpc"
|
||||
import {YangChengMuBiaofun} from "../api_s2c/event/yangchengmubiao/fun"
|
||||
import {Christmasfun} from "../api_s2c/event/christmas/fun"
|
||||
// import { YangChengMuBiaofun } from "../api_s2c/event/yangchengmubiao/fun"
|
||||
import { Wjjl } from "../module/collection_wjjl"
|
||||
import { PublicShared } from "../shared/public/public"
|
||||
import { PayFun } from "./pay"
|
||||
import { TaskFun } from "./task"
|
||||
import { CollectionWanted } from "../module/collection_wanted";
|
||||
import { TanXianFun } from "./tanxian";
|
||||
import { PataFun } from "./pata";
|
||||
import { weixiuchangType } from "../shared/protocols/weixiuchang/type";
|
||||
import { FunWeiXiuChang } from "./weixiuchang";
|
||||
import { JJCFun } from "./jjc";
|
||||
import { getGud } from "./gud";
|
||||
import { Yuandanfun } from "../api_s2c/event/yuandan/fun";
|
||||
import HQJGFun from "../api_s2c/event/huangqijiuguan/fun"
|
||||
import {Wjjl} from "../module/collection_wjjl"
|
||||
import {PublicShared} from "../shared/public/public"
|
||||
import {PayFun} from "./pay"
|
||||
import {TaskFun} from "./task"
|
||||
import {CollectionWanted} from "../module/collection_wanted";
|
||||
import {TanXianFun} from "./tanxian";
|
||||
import {PataFun} from "./pata";
|
||||
import {weixiuchangType} from "../shared/protocols/weixiuchang/type";
|
||||
import {FunWeiXiuChang} from "./weixiuchang";
|
||||
import {JJCFun} from "./jjc";
|
||||
import {getGud} from "./gud";
|
||||
import {Yuandanfun} from "../api_s2c/event/yuandan/fun";
|
||||
|
||||
let _classNameFunc = {}
|
||||
/**
|
||||
@ -73,15 +72,13 @@ export module manager {
|
||||
|
||||
// 设置数据
|
||||
async setVal(call: ApiCall, val: number, chkval, arg) {
|
||||
TaskFun.setTaskVal(call, this.stype, val, this.chkCall, chkval, this.isinc, this.alchangeVal, arg);
|
||||
TaskFun.setTaskVal(call, this.stype, val, this.chkCall, chkval, this.isinc, this.alchangeVal, arg)
|
||||
// 养成目标任务计数
|
||||
YangChengMuBiaofun.setTaskVal(call, this.stype, val, this.chkCall, chkval, this.isinc, this.alchangeVal, arg);
|
||||
YangChengMuBiaofun.setTaskVal(call, this.stype, val, this.chkCall, chkval, this.isinc, this.alchangeVal, arg)
|
||||
// 圣诞活动任务计数
|
||||
Christmasfun.setTaskVal(call, this.stype, val, this.chkCall, chkval, this.isinc, this.alchangeVal, arg);
|
||||
Christmasfun.setTaskVal(call, this.stype, val, this.chkCall, chkval, this.isinc, this.alchangeVal, arg)
|
||||
// 元旦活动任务计数
|
||||
Yuandanfun.setTaskVal(call, this.stype, val, this.chkCall, chkval, this.isinc, this.alchangeVal, arg);
|
||||
// 黄旗酒馆
|
||||
HQJGFun.setTaskVal(call, this.stype, val, this.chkCall, chkval, this.isinc, this.alchangeVal, arg);
|
||||
Yuandanfun.setTaskVal(call, this.stype, val, this.chkCall, chkval, this.isinc, this.alchangeVal, arg)
|
||||
}
|
||||
|
||||
// 任务数值, 和检测值,看情况需要上层复写
|
||||
@ -170,12 +167,12 @@ export module manager {
|
||||
|
||||
async initVal(call: ApiCall, con) {
|
||||
let _chk = parseInt(con.cond[0])
|
||||
return await G.mongodb.collection('hero').countDocuments({ uid: call.uid, lv: { $gte: _chk } }) || 0
|
||||
return await G.mongodb.collection('hero').countDocuments({uid: call.uid, lv: {$gte: _chk}}) || 0
|
||||
}
|
||||
|
||||
async alchangeVal(call: ApiCall, con, val: number) {
|
||||
let _chk = parseInt(con.cond[0])
|
||||
return await G.mongodb.collection('hero').countDocuments({ uid: call.uid, lv: { $gte: _chk } }) || 0
|
||||
return await G.mongodb.collection('hero').countDocuments({uid: call.uid, lv: {$gte: _chk}}) || 0
|
||||
}
|
||||
}
|
||||
|
||||
@ -197,13 +194,13 @@ export module manager {
|
||||
|
||||
async initVal(call: ApiCall, con) {
|
||||
let _chk = parseInt(con.cond[0])
|
||||
let _num = await G.mongodb.collection('hero').countDocuments({ uid: call.uid, jieji: { $gte: _chk } }) || 0
|
||||
let _num = await G.mongodb.collection('hero').countDocuments({uid: call.uid, jieji: {$gte: _chk}}) || 0
|
||||
return _num
|
||||
}
|
||||
|
||||
async alchangeVal(call: ApiCall, con, val: number) {
|
||||
let _chk = parseInt(con.cond[0])
|
||||
let _num = await G.mongodb.collection('hero').countDocuments({ uid: call.uid, jieji: { $gte: _chk } }) || 0
|
||||
let _num = await G.mongodb.collection('hero').countDocuments({uid: call.uid, jieji: {$gte: _chk}}) || 0
|
||||
return _num
|
||||
}
|
||||
}
|
||||
@ -259,13 +256,13 @@ export module manager {
|
||||
|
||||
async initVal(call: ApiCall, con) {
|
||||
let _chk = parseInt(con.cond[0])
|
||||
let _num = await G.mongodb.collection('equip').countDocuments({ uid: call.uid, lv: { $gte: _chk } }) || 0
|
||||
let _num = await G.mongodb.collection('equip').countDocuments({uid: call.uid, lv: {$gte: _chk}}) || 0
|
||||
return _num
|
||||
}
|
||||
|
||||
async alchangeVal(call: ApiCall, con, val: number) {
|
||||
let _chk = parseInt(con.cond[0])
|
||||
let _num = await G.mongodb.collection('equip').countDocuments({ uid: call.uid, lv: { $gte: _chk } }) || 0
|
||||
let _num = await G.mongodb.collection('equip').countDocuments({uid: call.uid, lv: {$gte: _chk}}) || 0
|
||||
return _num
|
||||
}
|
||||
}
|
||||
@ -429,7 +426,7 @@ export module manager {
|
||||
isinc = 1
|
||||
|
||||
async initVal(call: ApiCall, con) {
|
||||
let myData = await G.mongodb.cPlayerInfo('meirishilian').findOne({ uid: call.uid, type: 'meirishilian' });
|
||||
let myData = await G.mongodb.cPlayerInfo('meirishilian').findOne({uid: call.uid, type: 'meirishilian'});
|
||||
if (myData.data.refreshTime > PublicShared.getToDayZeroTime()) {
|
||||
return R.compose(R.sum(), R.map(i => i[0].useFightNum), R.values())(myData.data.numInfo) || 0
|
||||
}
|
||||
@ -449,7 +446,7 @@ export module manager {
|
||||
isinc = 1
|
||||
|
||||
async initVal(call: ApiCall, con) {
|
||||
let myData = await G.mongodb.cPlayerInfo('qjzzd').findOne({ uid: call.uid, type: 'qjzzd' });
|
||||
let myData = await G.mongodb.cPlayerInfo('qjzzd').findOne({uid: call.uid, type: 'qjzzd'});
|
||||
if (myData?.refreFightTime > PublicShared.getToDayZeroTime()) {
|
||||
return myData?.useFightNum || 0
|
||||
}
|
||||
@ -508,7 +505,7 @@ export module manager {
|
||||
isinc = 1
|
||||
|
||||
async initVal(call: ApiCall, con) {
|
||||
let data: Partial<CollectionWanted> = await G.mongodb.collection('wanted').findOne({ uid: call.uid }) || {};
|
||||
let data: Partial<CollectionWanted> = await G.mongodb.collection('wanted').findOne({uid: call.uid}) || {};
|
||||
if (data.refreshTime > PublicShared.getToDayZeroTime()) {
|
||||
return data.toDayUseNum || 0
|
||||
}
|
||||
@ -611,12 +608,12 @@ export module manager {
|
||||
|
||||
async initVal(call: ApiCall, con) {
|
||||
let _chk = parseInt(con.cond[0])
|
||||
return await G.mongodb.collection('peijian').countDocuments({ uid: call.uid, lv: { $gte: _chk } }) || 0
|
||||
return await G.mongodb.collection('peijian').countDocuments({uid: call.uid, lv: {$gte: _chk}}) || 0
|
||||
}
|
||||
|
||||
async alchangeVal(call: ApiCall, con, val: number) {
|
||||
let _chk = parseInt(con.cond[0])
|
||||
return await G.mongodb.collection('peijian').countDocuments({ uid: call.uid, lv: { $gte: _chk } }) || 0
|
||||
return await G.mongodb.collection('peijian').countDocuments({uid: call.uid, lv: {$gte: _chk}}) || 0
|
||||
}
|
||||
}
|
||||
|
||||
@ -678,11 +675,11 @@ export module manager {
|
||||
isinc = 0
|
||||
|
||||
async initVal(call: ApiCall, con) {
|
||||
return await G.mongodb.collection('equip').countDocuments({ uid: call.uid, wearaId: { $ne: "" } }) || 0
|
||||
return await G.mongodb.collection('equip').countDocuments({uid: call.uid, wearaId: {$ne: ""}}) || 0
|
||||
}
|
||||
|
||||
async alchangeVal(call: ApiCall, con, val: number) {
|
||||
return await G.mongodb.collection('equip').countDocuments({ uid: call.uid, wearaId: { $ne: "" } }) || 0
|
||||
return await G.mongodb.collection('equip').countDocuments({uid: call.uid, wearaId: {$ne: ""}}) || 0
|
||||
}
|
||||
|
||||
}
|
||||
@ -813,7 +810,7 @@ export module manager {
|
||||
isinc = 1
|
||||
|
||||
async initVal(call: ApiCall, con) {
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
// 第59个任务 获得vip经验
|
||||
@ -836,11 +833,6 @@ export module manager {
|
||||
}
|
||||
}
|
||||
|
||||
// 第61个任务 黄旗酒馆累计抽卡X次
|
||||
export class Class_task_159 extends BaseClass {
|
||||
stype = 159
|
||||
isinc = 1
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -297,16 +297,16 @@ export class UserFun {
|
||||
if (val == -1 && !gud.headFrames[conf.id]) {
|
||||
change = true;
|
||||
gud.headFrames[conf.id] = -1;
|
||||
} else if (val > 0 && gud.headFrames[conf.id] != -1) {
|
||||
} else if (!gud.headFrames[conf.id] || gud.headFrames[conf.id] < G.time) {
|
||||
change = true;
|
||||
gud.headFrames[conf.id] = G.time + val * v;
|
||||
}
|
||||
}
|
||||
else if(conf?.cond?.[0] == "jjc_rank") {
|
||||
} else {
|
||||
change = true;
|
||||
gud.headFrames[conf.id] = -1;
|
||||
gud.headFrames[conf.id] += val * v;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (change) {
|
||||
PlayerFun.changeAttr(uid, {headFrames: gud.headFrames});
|
||||
G.server.sendMsgByUid(uid, 'msg_s2c/PlayerChange', {headFrames: gud.headFrames});
|
||||
@ -344,9 +344,12 @@ export class UserFun {
|
||||
if (val == -1 && !gud.chatFrames[conf.id]) {
|
||||
change = true;
|
||||
gud.chatFrames[conf.id] = -1;
|
||||
} else if (val > 0 && gud.chatFrames[conf.id] != -1) {
|
||||
} else if (!gud.chatFrames[conf.id] || gud.chatFrames[conf.id] < G.time) {
|
||||
change = true;
|
||||
gud.chatFrames[conf.id] = G.time + val * v;
|
||||
} else {
|
||||
change = true;
|
||||
gud.chatFrames[conf.id] += val * v;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -78,17 +78,16 @@ export class XstaskFun {
|
||||
uid: uid,
|
||||
};
|
||||
});
|
||||
this.uidTask[uid] = this.uidTask[uid] || [];
|
||||
|
||||
if(taskList.length > 0){
|
||||
let result = await G.mongodb.collection('xstask').insertMany(taskList);
|
||||
|
||||
this.uidTask[uid] = this.uidTask[uid] || [];
|
||||
taskList.forEach((task, index) => {
|
||||
this.uidTask[uid].push(G.mongodb.conversionIdObj({
|
||||
_id: result.insertedIds[index],
|
||||
...task
|
||||
}));
|
||||
});
|
||||
}
|
||||
|
||||
return this.uidTask[uid];
|
||||
}
|
||||
|
||||
|
@ -78,8 +78,8 @@ async function clearRedis() {
|
||||
G.redis.fromatKey('equip'),
|
||||
G.redis.fromatKey('shiwu'),
|
||||
G.redis.fromatKey('tanxian'),
|
||||
//G.redis.fromatKey('gbtx'),
|
||||
//G.redis.fromatKey('dxlt'),
|
||||
G.redis.fromatKey('gbtx'),
|
||||
G.redis.fromatKey('dxlt'),
|
||||
])
|
||||
}
|
||||
|
||||
|
@ -86,8 +86,8 @@ export async function startAfter() {
|
||||
new SchedulerSlzdClean().init();
|
||||
new SchedulerSlzdPrize().init();
|
||||
|
||||
// new SchedulerClslPrize().init();
|
||||
// new SchedulerClslLocalCtor().init();
|
||||
new SchedulerClslPrize().init();
|
||||
new SchedulerClslLocalCtor().init();
|
||||
new SchedulerWzryAutoBaoMing().init();
|
||||
new SchedulerWzryjingcaiSendPrize().init();
|
||||
new SchedulerWzryendDel().init();
|
||||
|
@ -152,7 +152,7 @@ export class FightControl {
|
||||
this.eachLiveRoles((role) => {
|
||||
let heroId = role.roleData.heroId;
|
||||
// let shiwu = role.roleData?.shiwu || {};
|
||||
let talent = role.roleData?.talent || {};
|
||||
// let talent = role.roleData?.talent || {};
|
||||
let skills = G.gc.heroskill[heroId][role.roleData.jieji || 0].bdskill || [];
|
||||
skills = skills.concat(role.roleData.attr.skillArr);
|
||||
|
||||
@ -161,15 +161,15 @@ export class FightControl {
|
||||
// if (!zhushuan) continue;
|
||||
// if (zhushuan.skill) skills.push(zhushuan.skill);
|
||||
// };
|
||||
const hero_tf = G.gc.hero_tf;
|
||||
for (let key in talent) {
|
||||
let cdata = hero_tf[key][talent[key]];
|
||||
if (cdata && cdata.skill_effect) skills.push(cdata.skill_effect);
|
||||
}
|
||||
// const hero_tf = G.gc.hero_tf;
|
||||
// for (let key in talent) {
|
||||
// let cdata = hero_tf[key][talent[key]];
|
||||
// if (cdata && cdata.skill_effect) skills.push(cdata.skill_effect);
|
||||
// }
|
||||
|
||||
// skills.push('tx06309');
|
||||
|
||||
if (!skills) return;
|
||||
// if (!skills) return;
|
||||
skills.forEach(_skill => {
|
||||
let askillconf = getSkillConf(_skill);
|
||||
if (!askillconf) return console.log('没有技能配置-->', _skill);
|
||||
|
@ -121,7 +121,7 @@ export function createNpc(npcId: string | number, fixData: Partial<ResLogin['gud
|
||||
isNpc: true
|
||||
},
|
||||
roles: Object.fromEntries(dataArr.map((d, i) => [i + 1, function () {
|
||||
d['skin'] = (npcConf.skin?.[i] || '');
|
||||
|
||||
let { id, atk, def, mindps, maxdps, hp, speed, ...ops } = G.gc.armyattr[d.countId];
|
||||
let buff = HeroShared.getHeroBasicAttr({ heroId: d.heroId, lv: d.lv });
|
||||
|
||||
@ -149,9 +149,9 @@ export function createNpc(npcId: string | number, fixData: Partial<ResLogin['gud
|
||||
return {
|
||||
attr: buff,
|
||||
...d,
|
||||
lv: (npcConf.npcLv ? npcConf.npcLv[i] : 0) || d.lv,
|
||||
lv: (npcConf.npcLv ? npcConf.npcLv[i]: 0) || d.lv,
|
||||
isBoss: !!npcConf.isboss,
|
||||
trueLv: d.lv || (npcConf.npcLv ? npcConf.npcLv[i] : 0)
|
||||
trueLv: d.lv || (npcConf.npcLv ? npcConf.npcLv[i]: 0)
|
||||
};
|
||||
|
||||
}()]))
|
||||
|
@ -1,11 +0,0 @@
|
||||
import { PlayerData } from "../../../../api_s2c/event/huangqijiuguan/fun"
|
||||
|
||||
export interface ReqDuiHuan {
|
||||
hdid: number
|
||||
dh: { [id: number]: number }
|
||||
}
|
||||
|
||||
export interface ResDuiHuan {
|
||||
data: PlayerData
|
||||
prize: { a: string, t: string, n: number }[]
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
import { PlayerData } from "../../../../api_s2c/event/huangqijiuguan/fun";
|
||||
import { fightResult } from "../../../fightControl/fightType";
|
||||
|
||||
export interface ReqFight {
|
||||
hdid: number
|
||||
}
|
||||
|
||||
export interface ResFight {
|
||||
data: PlayerData
|
||||
result: fightResult;
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
import { PlayerData } from "../../../../api_s2c/event/huangqijiuguan/fun"
|
||||
|
||||
export interface ReqGiftRec {
|
||||
hdid: number
|
||||
giftid: number
|
||||
}
|
||||
|
||||
export interface ResGiftRec {
|
||||
data: PlayerData
|
||||
prize: { a: string, t: string, n: number }[]
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
import { PlayerData } from "../../../../api_s2c/event/huangqijiuguan/fun"
|
||||
|
||||
export interface ReqGiftSelect {
|
||||
hdid: number
|
||||
giftid: number
|
||||
seletc: number[]
|
||||
}
|
||||
|
||||
export interface ResGiftSelect {
|
||||
data: PlayerData
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
import { PlayerData } from "../../../../api_s2c/event/huangqijiuguan/fun"
|
||||
|
||||
export interface ReqOpen {
|
||||
hdid: number
|
||||
}
|
||||
|
||||
export interface ResOpen {
|
||||
data: PlayerData
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
export interface ReqRankList {
|
||||
hdid: number
|
||||
}
|
||||
|
||||
export interface ResRankList {
|
||||
rankList: any[]
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
import { PlayerData } from "../../../../api_s2c/event/huangqijiuguan/fun"
|
||||
|
||||
export interface ReqRecDpsPrize {
|
||||
hdid: number
|
||||
recid: number[]
|
||||
}
|
||||
|
||||
export interface ResRecDpsPrize {
|
||||
data: PlayerData,
|
||||
prize: { a: string, t: string, n: number }[]
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
import { PlayerData } from "../../../../api_s2c/event/huangqijiuguan/fun"
|
||||
|
||||
export interface ReqTaskRec {
|
||||
day: number
|
||||
hdid: number
|
||||
taskid: number[]
|
||||
}
|
||||
|
||||
export interface ResTaskRec {
|
||||
data: PlayerData
|
||||
prize: { a: string, t: string, n: number }[]
|
||||
}
|
||||
|
@ -1,12 +0,0 @@
|
||||
import { PlayerData } from "../../../../api_s2c/event/huangqijiuguan/fun"
|
||||
|
||||
|
||||
export interface ReqZhaoMu {
|
||||
num: number
|
||||
hdid: number
|
||||
}
|
||||
|
||||
export interface ResZhaoMu {
|
||||
data: PlayerData
|
||||
prize: { a: string, t: string, n: number }[]
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
import { PlayerData } from "../../../../api_s2c/event/huangqijiuguan/fun"
|
||||
|
||||
export interface ReqZhaoMuPrizeRec {
|
||||
hdid: number
|
||||
recid: { idx: number, sec: string }[]
|
||||
}
|
||||
|
||||
export interface ResZhaoMuPrizeRec {
|
||||
data: PlayerData
|
||||
prize: { a: string, t: string, n: number }[]
|
||||
}
|
@ -71,6 +71,4 @@ type heroAddKey = {
|
||||
peijian: {
|
||||
[pos: string]: string;
|
||||
};
|
||||
/**皮肤*/
|
||||
skin: string | number;
|
||||
};
|
@ -1,7 +0,0 @@
|
||||
export interface ReqTakeOff {
|
||||
heroOid: string
|
||||
}
|
||||
|
||||
export interface ResTakeOff {
|
||||
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
export interface ReqUplv {
|
||||
lv: 1;
|
||||
skid: string;
|
||||
}
|
||||
|
||||
export interface ResUplv { }
|
@ -1,6 +0,0 @@
|
||||
export interface ReqWear {
|
||||
skid: string,
|
||||
heroOid: string,
|
||||
}
|
||||
|
||||
export interface ResWear { }
|
File diff suppressed because it is too large
Load Diff
@ -195,9 +195,4 @@ export type playerAppend = {
|
||||
};
|
||||
/**威望额外属性*/
|
||||
weiwangbuff?: { [k: string]: number };
|
||||
|
||||
/**获得的皮肤*/
|
||||
heroskin?: {
|
||||
[skid: string]: number;
|
||||
}
|
||||
};
|
@ -1,7 +1,6 @@
|
||||
import { ResGetList } from '../protocols/hero/PtlGetList';
|
||||
import { player } from '../protocols/user/type';
|
||||
import { EquipShared } from './equip';
|
||||
import HeroSkinShared from './heroskin';
|
||||
import { PeijianShared } from './peijian';
|
||||
import { PlayerShared } from './player';
|
||||
import { PublicShared } from './public';
|
||||
@ -284,17 +283,6 @@ export class HeroShared {
|
||||
PublicShared.mergeProperty(buff, otherBuff?.weiwangbuff || {});
|
||||
}
|
||||
|
||||
// 计算皮肤buff
|
||||
if (otherBuff?.heroskin) {
|
||||
for (let skinId in otherBuff.heroskin) {
|
||||
let skinConf = G.gc.heroSkin[skinId];
|
||||
if (skinConf.heroId != hero.heroId) console;
|
||||
PublicShared.mergeProperty(buff, HeroSkinShared.calcBuff(
|
||||
skinId, otherBuff.heroskin[skinId]
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
//最后进行加成属性计算
|
||||
for (let k in buff) {
|
||||
if (k.indexOf('pro') == -1) continue;
|
||||
@ -322,7 +310,7 @@ export class HeroShared {
|
||||
static amendAttr(buff: k_v<number>) {
|
||||
for (let k in buff) {
|
||||
if (typeof buff[k] != 'number') continue;
|
||||
if (k.indexOf('pro') != -1 || k.indexOf('drop') != -1 || k=='addhp') continue;
|
||||
if (k.indexOf('pro') != -1 || k.indexOf('drop') != -1) continue;
|
||||
buff[k] = Math.floor(buff[k]);
|
||||
}
|
||||
}
|
||||
|
@ -1,21 +0,0 @@
|
||||
|
||||
export default class HeroSkinShared {
|
||||
|
||||
|
||||
/**
|
||||
* 计算皮肤buff
|
||||
* @param skid
|
||||
* @param lv
|
||||
* @returns {[string]: number}
|
||||
* */
|
||||
static calcBuff(skid: string, lv: number): k_v<number> {
|
||||
let buff = {};
|
||||
let skin = G.gc.heroSkin[skid];
|
||||
for (let i = 1; i <= lv; i++) {
|
||||
for (let k in (G.gc.heroSkinLv[skin.colour][i]?.buff || {})) {
|
||||
buff[k] = (buff[k] || 0) + G.gc.heroSkinLv[skin.colour][i].buff[k];
|
||||
}
|
||||
}
|
||||
return buff;
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user