Compare commits
65 Commits
3bdc98a1f6
...
cfcf9c7027
Author | SHA1 | Date | |
---|---|---|---|
![]() |
cfcf9c7027 | ||
![]() |
847613db4a | ||
![]() |
8ff548c717 | ||
![]() |
8d35b1d74c | ||
![]() |
0dd6daa2c2 | ||
![]() |
f1f792ad82 | ||
![]() |
9f2a28044c | ||
![]() |
a8051b9767 | ||
![]() |
fbf2daae91 | ||
![]() |
13de3624dc | ||
2c3d53899e | |||
![]() |
325ed8745c | ||
2e1bd44f0f | |||
45c5a195ed | |||
![]() |
bed7c86211 | ||
![]() |
b41076023a | ||
![]() |
6f7eab1701 | ||
8e9553386f | |||
c09c9dec89 | |||
![]() |
48d512a3a6 | ||
![]() |
b80263ed16 | ||
![]() |
363787fb39 | ||
![]() |
0a94965e30 | ||
![]() |
48b07c2d74 | ||
![]() |
95971d809b | ||
![]() |
48ccedcbee | ||
![]() |
206e87d64c | ||
![]() |
138ee2675c | ||
![]() |
8aab7b6322 | ||
![]() |
48cd24d309 | ||
![]() |
4fc571d9b0 | ||
![]() |
d30f62f6c5 | ||
![]() |
bb44f79920 | ||
![]() |
f7b29c24fa | ||
![]() |
8b8e14a609 | ||
![]() |
a5b3053a20 | ||
![]() |
1c18a5b7fd | ||
![]() |
dbd59fba83 | ||
![]() |
ca28e82823 | ||
![]() |
950a048742 | ||
![]() |
6895a14d04 | ||
![]() |
eb44e7a9b4 | ||
![]() |
001a8166b5 | ||
![]() |
273b1865c3 | ||
![]() |
14796bb06b | ||
c3db97b3be | |||
72b215451b | |||
104a1edadc | |||
![]() |
7feff43ee6 | ||
![]() |
a26aa7dab3 | ||
![]() |
ca3e973afd | ||
![]() |
0932d3ee47 | ||
![]() |
452f5f3d14 | ||
![]() |
0a296d739a | ||
![]() |
6d4851930f | ||
![]() |
7550fdf237 | ||
![]() |
0fd7f63f87 | ||
![]() |
4596fb537c | ||
d8a47e85b2 | |||
f802242b35 | |||
![]() |
51ddb55637 | ||
f1963d2e53 | |||
0ddd611c59 | |||
![]() |
1c256ab58b | ||
![]() |
09a72cf039 |
@ -12,11 +12,38 @@ 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: db?.info || {},
|
||||
info: _info,
|
||||
hdinfo: _hdinfo
|
||||
});
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ import { fightResult } from "../../../shared/fightControl/fightType";
|
||||
import { FightFun } from "../../../public/fight";
|
||||
|
||||
export default async function (call: ApiCall<ReqFight, ResFight>) {
|
||||
let hd = await HuoDongFun.getHdidInfo(call, call.req.hdid);
|
||||
let hd = await HQJGFun.HdInfo(call, call.req.hdid);
|
||||
|
||||
if (!hd) {
|
||||
// 无此活动
|
||||
@ -17,7 +17,7 @@ export default async function (call: ApiCall<ReqFight, ResFight>) {
|
||||
let mydata = await HQJGFun.getMydata(call, call.req.hdid);
|
||||
|
||||
// 开始战斗
|
||||
let result: fightResult = await FightFun.fightNpc(call, hd.data.bossId, 'hqjg');
|
||||
let result: fightResult = await FightFun.fightNpc(call, hd.data.boss.npcId, 'hqjg');
|
||||
|
||||
let up = false;
|
||||
let today = HQJGFun.today(hd);
|
||||
|
42
src/api_s2c/event/huangqijiuguan/ApiGiftRec.ts
Normal file
42
src/api_s2c/event/huangqijiuguan/ApiGiftRec.ts
Normal file
@ -0,0 +1,42 @@
|
||||
import { ApiCall } from "tsrpc";
|
||||
import { ReqGiftRec, ResGiftRec } from "../../../shared/protocols/event/huangqijiuguan/PtlGiftRec";
|
||||
import HQJGFun from "./fun";
|
||||
|
||||
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, call.req.hdid);
|
||||
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 });
|
||||
|
||||
call.succ({ data: mydata, prize: prize })
|
||||
}
|
35
src/api_s2c/event/huangqijiuguan/ApiGiftSelect.ts
Normal file
35
src/api_s2c/event/huangqijiuguan/ApiGiftSelect.ts
Normal file
@ -0,0 +1,35 @@
|
||||
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, call.req.hdid);
|
||||
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,10 +1,9 @@
|
||||
import HQJGFun from "./fun";
|
||||
import { ApiCall } from "tsrpc";
|
||||
import { HuoDongFun } from "../../../public/huodongfun";
|
||||
import { ReqOpen, ResOpen } from "../../../shared/protocols/event/huangqijiuguan/PtlOpen";
|
||||
|
||||
export default async (call: ApiCall<ReqOpen, ResOpen>) => {
|
||||
let hd = await HuoDongFun.getHdidInfo(call, call.req.hdid);
|
||||
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 })
|
||||
|
@ -1,11 +1,10 @@
|
||||
import { ApiCall } from "tsrpc";
|
||||
import HQJGFun, { Data } from "./fun";
|
||||
import { HuoDongFun } from "../../../public/huodongfun";
|
||||
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 HuoDongFun.getHdidInfo(call, call.req.hdid);
|
||||
let hd = await HQJGFun.HdInfo(call, call.req.hdid);
|
||||
|
||||
if (!hd) {
|
||||
// 无此活动
|
||||
|
@ -19,7 +19,7 @@ export default async function (call: ApiCall<ReqZhaoMu, ResZhaoMu>) {
|
||||
let prize = [];
|
||||
let mydata = await HQJGFun.getMydata(call, call.req.hdid);
|
||||
|
||||
for (let n = 0; n < call.req.num; n++) {
|
||||
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) {
|
||||
@ -45,4 +45,6 @@ export default async function (call: ApiCall<ReqZhaoMu, ResZhaoMu>) {
|
||||
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);
|
||||
}
|
@ -14,13 +14,19 @@ export default async function (call: ApiCall<ReqZhaoMuPrizeRec, ResZhaoMuPrizeRe
|
||||
let mydata = await HQJGFun.getMydata(call, call.req.hdid);
|
||||
|
||||
for (let rec of call.req.recid) {
|
||||
let con = hd.data.choukajiangli[rec];
|
||||
if (con.num > mydata.zhaomu.num || mydata.zhaomu.prize.includes(rec)) {
|
||||
let con = hd.data.choukajiangli[rec.idx];
|
||||
|
||||
if (con.num > mydata.zhaomu.num || mydata.zhaomu.prize.includes(rec.idx)) {
|
||||
continue
|
||||
}
|
||||
|
||||
mydata.zhaomu.prize.push(rec);
|
||||
prize = prize.concat(con.prize);
|
||||
if (con.dlz) {
|
||||
prize.push(con.dlz[0][rec.sec]);
|
||||
} else {
|
||||
prize = prize.concat(con.prize);
|
||||
}
|
||||
console.log(JSON.stringify(prize));
|
||||
mydata.zhaomu.prize.push(rec.idx);
|
||||
}
|
||||
|
||||
if (prize.length <= 0) {
|
||||
|
@ -3,18 +3,22 @@ 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"
|
||||
|
||||
// hddata.data
|
||||
export interface Data {
|
||||
show: 1
|
||||
task: {
|
||||
[k: `day${number}`]: {
|
||||
[k: string]: { pval: number, stype: string, cond: string[], tiaozhuan: number, prize: atn[], des: string }
|
||||
[k: string]: { pval: number, stype: number, cond: string[], tiaozhuan: number, prize: atn[], des: string }
|
||||
}
|
||||
}
|
||||
|
||||
huobi: atn // 抽卡货币
|
||||
bossId: number // boss表的ID
|
||||
boss: {
|
||||
img: string
|
||||
npcId: number
|
||||
}
|
||||
|
||||
// boss排行邮件
|
||||
bossRank_des: string
|
||||
@ -26,11 +30,11 @@ export interface Data {
|
||||
|
||||
chouka: { a: string, t: string, n: number, p: number, gailv: number, cishu: number }[]
|
||||
|
||||
choukajiangli: { num: number, prize: any[] }[]
|
||||
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[] }[]
|
||||
gift: { id: number, free: boolean, payId: string, buynum: number, prize: atn[], dlz?: { [k: string]: atn }[] }[]
|
||||
|
||||
duihuan: { id: number, need: atn[], prize: atn[], buyNum: number }[]
|
||||
|
||||
@ -151,14 +155,14 @@ export default class HQJGFun {
|
||||
}
|
||||
|
||||
/** 获取活动数据 */
|
||||
static async HdInfo(call: ApiCall, hdid?: number): Promise<ReqAddHuoDong> {
|
||||
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 ReqAddHuoDong
|
||||
return await HuoDongFun.getHdidInfo(call, hdid) as any as ReqAddHuoDong & { data: Data }
|
||||
}
|
||||
}
|
||||
|
||||
@ -200,24 +204,16 @@ export default class HQJGFun {
|
||||
}
|
||||
}
|
||||
|
||||
static async buy(call: ApiCall, payId: string) {
|
||||
let hddata = await this.HdInfo(call);
|
||||
|
||||
if (!hddata) { // 活动不存在
|
||||
return
|
||||
}
|
||||
|
||||
let mydata = await this.getMydata(call);
|
||||
await this.setMyData(call.uid, (await this.HdInfo(call)).hdid, mydata);
|
||||
}
|
||||
|
||||
/**
|
||||
* 每日伤害等级奖励结算
|
||||
*/
|
||||
static async dayDpsLvPrize() {
|
||||
static async dayDpsLvPrize(time: number) {
|
||||
console.log(
|
||||
"黄旗酒馆 每日伤害等级奖励结算 开始执行。。。"
|
||||
)
|
||||
// 取stime小于当前时间的最后一条数据
|
||||
let hdinfo = await G.mongodb.collection("hdinfo").find({
|
||||
htype: this.htype, stime: { $lte: G.time }
|
||||
htype: this.htype, stime: { $lte: time }
|
||||
}, { sort: { stime: -1 } }).limit(1).toArray();
|
||||
|
||||
// 没有活动数
|
||||
@ -227,6 +223,7 @@ export default class HQJGFun {
|
||||
|
||||
let hd = hdinfo[0];
|
||||
let hdid = hdinfo[0].hdid;
|
||||
// 活动结束
|
||||
if (hd.etime < G.time - 300) {
|
||||
return
|
||||
}
|
||||
@ -260,17 +257,26 @@ export default class HQJGFun {
|
||||
contentInsertArr: [lvprize.lv],
|
||||
})
|
||||
}
|
||||
console.log(
|
||||
"黄旗酒馆 每日伤害等级奖励结算 执行完成!!!"
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 最大伤害排行奖励结算
|
||||
*/
|
||||
static async endDpsRankPrize() {
|
||||
// 取stime小于当前时间的最后一条数据
|
||||
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, stime: { $lte: G.time }
|
||||
}, { sort: { stime: -1 } }).limit(1).toArray();
|
||||
htype: this.htype, rtime: { $gt: yesterday, $lte: today }
|
||||
}).toArray();
|
||||
|
||||
// 没有活动数
|
||||
if (hdinfo.length <= 0) {
|
||||
@ -279,7 +285,7 @@ export default class HQJGFun {
|
||||
|
||||
let hd = hdinfo[0];
|
||||
let hdid = hdinfo[0].hdid;
|
||||
if (hd.etime < G.time - 300) {
|
||||
if (hd.data.sendrank) {
|
||||
return
|
||||
}
|
||||
|
||||
@ -306,5 +312,91 @@ export default class HQJGFun {
|
||||
contentInsertArr: [rank],
|
||||
})
|
||||
}
|
||||
// 标记已发送
|
||||
await G.mongodb.collection("hdinfo").updateOne(
|
||||
{ hdid: hdid }, { $set: { "data.sendrank": true } }
|
||||
);
|
||||
|
||||
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);
|
||||
await this.getMydata(call, hd.hdid)
|
||||
|
||||
let isset = 0;
|
||||
let setData = {
|
||||
$inc: {},
|
||||
$set: {}
|
||||
};
|
||||
let tasks = hd.data.task[`day${today}`];
|
||||
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) { // 累加
|
||||
setData["$inc"][`task.val.day${today}.${taskid}`] = val
|
||||
} else {
|
||||
setData["$set"][`task.val.day${today}.${taskid}`] = val
|
||||
}
|
||||
}
|
||||
|
||||
// 设置任务
|
||||
if (isset == 1) {
|
||||
await G.mongodb.collection('event').updateOne({ uid: call.uid, type: this.dataType(hd.hdid) }, setData)
|
||||
}
|
||||
}
|
||||
|
||||
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);
|
||||
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 this.setMyData(call.uid, hd.hdid, { giftbuy: mydata.giftbuy });
|
||||
}
|
||||
}
|
@ -35,6 +35,7 @@ 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);
|
||||
|
||||
|
||||
G.mongodb.cEvent(type).updateOne({uid: call.uid, type: type}, {$push: {rec: call.req.index}}, {upsert: true});
|
||||
// 从异步改成同步
|
||||
await 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]));
|
||||
|
@ -51,16 +51,24 @@ export default async function (call: ApiCall<ReqGetList, ResGetList>) {
|
||||
async function checkDataAndFix(call: ApiCall, list: ResGetList['list']) {
|
||||
try {
|
||||
// 修复配件数据
|
||||
let peijianids = [];
|
||||
Object.values(list).map(hero => {
|
||||
hero.peijian && Object.values(hero.peijian).map(
|
||||
i => peijianids.push(G.mongodb.conversionId(PeijianShared.fmt(i)._id))
|
||||
)
|
||||
});
|
||||
//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 peijians = (await G.mongodb.collection("peijian").find(
|
||||
{uid: call.uid, _id: {$in: peijianids}}, {projection: {_id: 1}}
|
||||
).toArray()).map(temp => G.mongodb.conversionId(temp._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 shiwuIds = R.flatten(R.values(list).map(hero => R.values(hero.shiwu).map(i => G.mongodb.conversionId(i._id))))
|
||||
|
||||
@ -68,15 +76,19 @@ 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) {
|
||||
if (!peijians.includes(PeijianShared.fmt(hero.peijian[pos])._id)) {
|
||||
hero.peijian[pos] = "";
|
||||
peijianChanges[hero._id] = hero.peijian;
|
||||
}
|
||||
}
|
||||
// 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.shiwu) {
|
||||
if (!shiwus.includes(hero.shiwu[pos]._id)) {
|
||||
hero.shiwu = R.omit([pos], hero.shiwu)
|
||||
@ -85,12 +97,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) {
|
||||
// 修复数据
|
||||
|
@ -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()
|
||||
|
||||
}
|
@ -1,12 +1,38 @@
|
||||
import {ApiCall} from "tsrpc";
|
||||
import {ReqGetList, ResGetList} from "../../shared/protocols/peijian/PtlGetList";
|
||||
import { connGameLogDB } from "../../gameLog";
|
||||
import {PeiJian, ReqGetList, ResGetList} from "../../shared/protocols/peijian/PtlGetList";
|
||||
import { PeijianShared } from "../../shared/public/peijian";
|
||||
|
||||
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;
|
||||
|
||||
@ -16,17 +42,25 @@ export default async function (call: ApiCall<ReqGetList, ResGetList>) {
|
||||
return ops;
|
||||
});
|
||||
|
||||
// 修复配件穿戴在不存在的英雄身上
|
||||
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: ''}})
|
||||
//对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]
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// 记录玩家最大等级,颜色相关数据 注册任务用
|
||||
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);
|
||||
|
||||
|
51
src/fix_patch/patch_20240110.ts
Normal file
51
src/fix_patch/patch_20240110.ts
Normal file
@ -0,0 +1,51 @@
|
||||
import { patchInit } from "../patch";
|
||||
|
||||
|
||||
class Path {
|
||||
|
||||
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) {
|
||||
for (let taskid of unFinishTask) {
|
||||
let con = G.gc.task[taskType][taskid];
|
||||
if (!con) {
|
||||
await G.mongodb.collection("task").deleteOne({
|
||||
uid: user.uid, taskid: taskid
|
||||
});
|
||||
console.log(`删除玩家${user.uid}任务:${taskid}`);
|
||||
}
|
||||
if (unFinishTask.includes(con.pretask)) {
|
||||
await G.mongodb.collection("task").deleteOne({
|
||||
uid: user.uid, taskid: taskid
|
||||
});
|
||||
console.log(`删除玩家${user.uid}任务:${taskid}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
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();
|
@ -15,13 +15,15 @@ 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 {Christmasfun} from "./api_s2c/event/christmas/fun";
|
||||
import {PushGiftFun} from "./public/pushgift";
|
||||
import {LeiChongLiBaoBuyGift} from "./api_s2c/event/leichonglibao/ApiReceive";
|
||||
import { checkResetBuyLog } from "./api_s2c/event/zhoumolibao/ApiOpen";
|
||||
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;
|
||||
/**玩家修改名字 */
|
||||
@ -152,6 +154,8 @@ 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() {
|
||||
@ -165,7 +169,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 } });
|
||||
});
|
||||
|
||||
@ -177,7 +181,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 });
|
||||
@ -261,4 +265,9 @@ 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));
|
||||
}
|
@ -3291,7 +3291,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"hdid" : 4000, // 唯一活动id 自选礼包
|
||||
"hdid" : 4000, // 唯一活动id 自选礼包 定制礼包
|
||||
"htype" : 4, // 后端唯一识别标识
|
||||
"stype" : 400, // 前端唯一识别标识(看前端需要是否修改)
|
||||
"ttype" : 1, // 0 按照开服时间计算,1 玩家注册时间计算 4 屏蔽此活动
|
||||
@ -4248,9 +4248,6 @@
|
||||
"icon": "icon_tuisonglibao",
|
||||
"showtime" : "仅供参考,会复写正确值", // 自选礼包,如果存在多个活动,计费点不要设置一样;如果是一样,可能会存在付费一次,购买多次。
|
||||
"data" : {
|
||||
//活动文本描述
|
||||
intr: "wkdtips_1",
|
||||
intr: "wkdtips_2",
|
||||
//礼包
|
||||
gift: [
|
||||
{
|
||||
@ -4306,7 +4303,7 @@
|
||||
"data" : {
|
||||
//活动文本描述
|
||||
intr: "czlbtips_1",
|
||||
intr: "czlbtips_2",
|
||||
intr2: "czlbtips_2",
|
||||
//礼包
|
||||
gift: [
|
||||
{
|
||||
@ -6869,16 +6866,19 @@
|
||||
},
|
||||
],
|
||||
//兑换商店
|
||||
//sell是打X折,显示用
|
||||
"duihuan": [
|
||||
{id:1, need: [{a: 'attr', t: 'huangqiduihuan', n: 1000}], prize: [{a: 'item', t: '610', n: 1},{a: 'item', t: '2', n: 500},{a: 'item', t: '1', n: 1000}], buyNum: 2 },
|
||||
{id:2, need: [{a: 'attr', t: 'huangqiduihuan', n: 2000}], prize: [{a: 'item', t: '610', n: 2},{a: 'item', t: '2', n: 600},{a: 'item', t: '1', n: 550}], buyNum: 1 },
|
||||
{id:3, need: [{a: 'attr', t: 'huangqiduihuan', n: 3000}], prize: [{a: 'item', t: '610', n: 3},{a: 'item', t: '2', n: 700},{a: 'item', t: '1', n: 230}], buyNum: 1 },
|
||||
{id:4, need: [{a: 'attr', t: 'huangqiduihuan', n: 4000}], prize: [{a: 'item', t: '610', n: 4},{a: 'item', t: '2', n: 800},{a: 'item', t: '1', n: 690}], buyNum: 3 },
|
||||
{id:5, need: [{a: 'attr', t: 'huangqiduihuan', n: 5000}], prize: [{a: 'item', t: '610', n: 5},{a: 'item', t: '2', n: 900},{a: 'item', t: '1', n: 3300}], buyNum: 5 },
|
||||
{id:6, need: [{a: 'attr', t: 'huangqiduihuan', n: 6000}], prize: [{a: 'item', t: '610', n: 6},{a: 'item', t: '2', n: 1000},{a: 'item', t: '1', n: 130}], buyNum: 6 }
|
||||
{id:1, need: [{a: 'attr', t: 'huangqiduihuan', n: 1000}], prize: [{a: 'item', t: '610', n: 1}], buyNum: 2},
|
||||
{id:2, need: [{a: 'attr', t: 'huangqiduihuan', n: 2000}], prize: [{a: 'item', t: '610', n: 2}], buyNum: 1, sell: 90},
|
||||
{id:3, need: [{a: 'attr', t: 'huangqiduihuan', n: 3000}], prize: [{a: 'item', t: '610', n: 3}], buyNum: 1, sell: 80},
|
||||
{id:4, need: [{a: 'attr', t: 'huangqiduihuan', n: 4000}], prize: [{a: 'item', t: '610', n: 4}], buyNum: 3, sell: 75},
|
||||
{id:5, need: [{a: 'attr', t: 'huangqiduihuan', n: 5000}], prize: [{a: 'item', t: '610', n: 5}], buyNum: 5},
|
||||
{id:6, need: [{a: 'attr', t: 'huangqiduihuan', n: 6000}], prize: [{a: 'item', t: '610', n: 6}], buyNum: 6}
|
||||
],
|
||||
//boss表的ID
|
||||
"bossId": 17001,
|
||||
//boss战配置
|
||||
//npcId读NPC表
|
||||
//img是战斗地图(写死)
|
||||
"boss": {npcId: 17001, img:"bg_fight_jg"},
|
||||
//boss挑战等级奖励(每日,0点结算发邮件)
|
||||
"bossLvReward": [
|
||||
{lv:1, "need": 10000, prize: [{a: 'item', t: '610', n: 1},{a: 'item', t: '2', n: 500},{a: 'item', t: '1', n: 1000}]},
|
||||
@ -6951,7 +6951,30 @@
|
||||
//boss排行邮件标题
|
||||
"bossRank_title": "email_title_hqjg_rank",
|
||||
//boss排行邮件内容
|
||||
"bossRank_des": "email_content_hqjg_rank"
|
||||
"bossRank_des": "email_content_hqjg_rank",
|
||||
//活动时间结束后道具转换
|
||||
"zhuanhuan": [
|
||||
{
|
||||
"start": {
|
||||
'a': 'attr', 't': 'huangqijinbi', 'n': 1
|
||||
},
|
||||
"end": {
|
||||
'a': 'attr', 't': 'jinbi', 'n': 10000
|
||||
}
|
||||
},
|
||||
{
|
||||
"start": {
|
||||
'a': 'attr', 't': 'huangqiduihuan', 'n': 1
|
||||
},
|
||||
"end": {
|
||||
'a': 'attr', 't': 'jinbi', 'n': 5000
|
||||
}
|
||||
}
|
||||
],
|
||||
//活动结算转换货币邮件标题
|
||||
"end_mail_title": "email_title_hqjg_end",
|
||||
//活动结算转换货币邮件内容
|
||||
"end_mail_des": "email_content_hqjg_end"
|
||||
}
|
||||
}
|
||||
]
|
@ -2114,7 +2114,7 @@
|
||||
"638": {
|
||||
"id": 638,
|
||||
"name": "intr_item_name_638",
|
||||
"undefined": "使用后可以随机获得巴拉莱卡、罗贝尔特中的10个碎片",
|
||||
"undefined": "使用后可随机获得以下碎片",
|
||||
"type": 2,
|
||||
"sort": 1,
|
||||
"colour": 5,
|
||||
@ -4016,7 +4016,7 @@
|
||||
"undefined": "使用后解锁头像框“圣诞氛围”,解锁后防御加成+1%,解锁后生命加成+1%",
|
||||
"type": 7,
|
||||
"sort": 1,
|
||||
"colour": 4,
|
||||
"colour": 5,
|
||||
"way": [],
|
||||
"go": "",
|
||||
"icon": "txk_028",
|
||||
@ -4027,7 +4027,7 @@
|
||||
"usePrize": [],
|
||||
"selecPrize": [],
|
||||
"payId": "",
|
||||
"advancedEffects": ""
|
||||
"advancedEffects": "ani_xiangzikuang"
|
||||
},
|
||||
"50010": {
|
||||
"id": 50010,
|
||||
@ -4035,7 +4035,7 @@
|
||||
"undefined": "使用后解锁头像框“披星戴月”,解锁后伤害加成+1%(限时7天)",
|
||||
"type": 7,
|
||||
"sort": 1,
|
||||
"colour": 4,
|
||||
"colour": 5,
|
||||
"way": [],
|
||||
"go": "",
|
||||
"icon": "txk_025",
|
||||
@ -4046,7 +4046,7 @@
|
||||
"usePrize": [],
|
||||
"selecPrize": [],
|
||||
"payId": "",
|
||||
"advancedEffects": ""
|
||||
"advancedEffects": "ani_xiangzikuang"
|
||||
},
|
||||
"50011": {
|
||||
"id": 50011,
|
||||
@ -4054,7 +4054,7 @@
|
||||
"undefined": "使用后解锁头像框“新春安宁”,解锁后生命加成+1%",
|
||||
"type": 7,
|
||||
"sort": 1,
|
||||
"colour": 4,
|
||||
"colour": 5,
|
||||
"way": [],
|
||||
"go": "",
|
||||
"icon": "txk_029",
|
||||
@ -4065,7 +4065,26 @@
|
||||
"usePrize": [],
|
||||
"selecPrize": [],
|
||||
"payId": "",
|
||||
"advancedEffects": ""
|
||||
"advancedEffects": "ani_xiangzikuang"
|
||||
},
|
||||
"50012": {
|
||||
"id": 50012,
|
||||
"name": "playerheadFrame_name_26",
|
||||
"undefined": "使用后解锁头像框“花漫大地”,解锁后生命加成+1%(限时7天)",
|
||||
"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"
|
||||
},
|
||||
"50101": {
|
||||
"id": 50101,
|
||||
|
@ -1,25 +1,201 @@
|
||||
{
|
||||
//登陆福利
|
||||
denglufuli: [
|
||||
{ total: 2, prize: [{a: 'attr', t: 'jinbi', n: 20000},{a: 'item', t: '1', n: 40000},{a: 'item', t: '12', n: 200}] },
|
||||
{ total: 3, prize: [{a: 'attr', t: 'jinbi', n: 20000},{a: 'item', t: '1', n: 40000},{a: 'item', t: '12', n: 200}] },
|
||||
{ total: 4, prize: [{a: 'attr', t: 'jinbi', n: 20000},{a: 'item', t: '1', n: 40000},{a: 'item', t: '12', n: 200}] },
|
||||
{ total: 5, prize: [{a: 'attr', t: 'jinbi', n: 20000},{a: 'item', t: '1', n: 40000},{a: 'item', t: '12', n: 200}] },
|
||||
],
|
||||
//活动任务
|
||||
huodongrenwu: [
|
||||
{idx: 0, taskId: 'use_attr_rmbmoney', total: 300, prize: [{ a: 'item', t: '4', n: 5 }] , decs: 'intr_jierihuodong_1'},
|
||||
{idx: 1, taskId: 'tanxian/FastGuaJi', total: 3, prize: [{ a: 'item', t: '4', n: 5 }] , decs: 'intr_jierihuodong_2'},
|
||||
{idx: 2, taskId: 'jjc/Fight', total: 3, prize: [{ a: 'item', t: '4', n: 5 }] , decs: 'intr_jierihuodong_3'}
|
||||
],
|
||||
//兑换
|
||||
duihuan: [
|
||||
{ need: [{a: 'attr', t: 'jinbi', n: 200}], prize: [{a: 'item', t: '12', n: 200}], num: 10 },
|
||||
{ need: [{a: 'attr', t: 'jinbi', n: 400}], prize: [{a: 'item', t: '12', n: 400}], num: 10 }
|
||||
],
|
||||
//礼包
|
||||
libao: [
|
||||
{ need: [{a: 'attr', t: 'jinbi', n: 200}], prize: [{a: 'item', t: '12', n: 200}], num: 10 },
|
||||
{ need: [{a: 'attr', t: 'jinbi', n: 400}], prize: [{a: 'item', t: '12', n: 400}], num: 10 }
|
||||
]
|
||||
//登陆福利
|
||||
denglufuli: [
|
||||
{
|
||||
total: 2,
|
||||
prize: [
|
||||
{
|
||||
a: 'attr',
|
||||
t: 'jinbi',
|
||||
n: 20000
|
||||
},
|
||||
{
|
||||
a: 'item',
|
||||
t: '1',
|
||||
n: 40000
|
||||
},
|
||||
{
|
||||
a: 'item',
|
||||
t: '12',
|
||||
n: 200
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
total: 3,
|
||||
prize: [
|
||||
{
|
||||
a: 'attr',
|
||||
t: 'jinbi',
|
||||
n: 20000
|
||||
},
|
||||
{
|
||||
a: 'item',
|
||||
t: '1',
|
||||
n: 40000
|
||||
},
|
||||
{
|
||||
a: 'item',
|
||||
t: '12',
|
||||
n: 200
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
total: 4,
|
||||
prize: [
|
||||
{
|
||||
a: 'attr',
|
||||
t: 'jinbi',
|
||||
n: 20000
|
||||
},
|
||||
{
|
||||
a: 'item',
|
||||
t: '1',
|
||||
n: 40000
|
||||
},
|
||||
{
|
||||
a: 'item',
|
||||
t: '12',
|
||||
n: 200
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
total: 5,
|
||||
prize: [
|
||||
{
|
||||
a: 'attr',
|
||||
t: 'jinbi',
|
||||
n: 20000
|
||||
},
|
||||
{
|
||||
a: 'item',
|
||||
t: '1',
|
||||
n: 40000
|
||||
},
|
||||
{
|
||||
a: 'item',
|
||||
t: '12',
|
||||
n: 200
|
||||
}
|
||||
]
|
||||
},
|
||||
],
|
||||
//活动任务
|
||||
huodongrenwu: [
|
||||
{
|
||||
idx: 0,
|
||||
taskId: 'use_attr_rmbmoney',
|
||||
total: 300,
|
||||
prize: [
|
||||
{
|
||||
a: 'item',
|
||||
t: '4',
|
||||
n: 5
|
||||
}
|
||||
],
|
||||
decs: 'intr_jierihuodong_1'
|
||||
},
|
||||
{
|
||||
idx: 1,
|
||||
taskId: 'tanxian/FastGuaJi',
|
||||
total: 3,
|
||||
prize: [
|
||||
{
|
||||
a: 'item',
|
||||
t: '4',
|
||||
n: 5
|
||||
}
|
||||
],
|
||||
decs: 'intr_jierihuodong_2'
|
||||
},
|
||||
{
|
||||
idx: 2,
|
||||
taskId: 'jjc/Fight',
|
||||
total: 3,
|
||||
prize: [
|
||||
{
|
||||
a: 'item',
|
||||
t: '4',
|
||||
n: 5
|
||||
}
|
||||
],
|
||||
decs: 'intr_jierihuodong_3'
|
||||
}
|
||||
],
|
||||
//兑换
|
||||
duihuan: [
|
||||
{
|
||||
need: [
|
||||
{
|
||||
a: 'attr',
|
||||
t: 'jinbi',
|
||||
n: 200
|
||||
}
|
||||
],
|
||||
prize: [
|
||||
{
|
||||
a: 'item',
|
||||
t: '12',
|
||||
n: 200
|
||||
}
|
||||
],
|
||||
num: 10
|
||||
},
|
||||
{
|
||||
need: [
|
||||
{
|
||||
a: 'attr',
|
||||
t: 'jinbi',
|
||||
n: 400
|
||||
}
|
||||
],
|
||||
prize: [
|
||||
{
|
||||
a: 'item',
|
||||
t: '12',
|
||||
n: 400
|
||||
}
|
||||
],
|
||||
num: 10
|
||||
}
|
||||
],
|
||||
//礼包
|
||||
libao: [
|
||||
{
|
||||
need: [
|
||||
{
|
||||
a: 'attr',
|
||||
t: 'jinbi',
|
||||
n: 200
|
||||
}
|
||||
],
|
||||
prize: [
|
||||
{
|
||||
a: 'item',
|
||||
t: '12',
|
||||
n: 200
|
||||
}
|
||||
],
|
||||
num: 10
|
||||
},
|
||||
{
|
||||
need: [
|
||||
{
|
||||
a: 'attr',
|
||||
t: 'jinbi',
|
||||
n: 400
|
||||
}
|
||||
],
|
||||
prize: [
|
||||
{
|
||||
a: 'item',
|
||||
t: '12',
|
||||
n: 400
|
||||
}
|
||||
],
|
||||
num: 10
|
||||
}
|
||||
]
|
||||
}
|
@ -21849,6 +21849,22 @@
|
||||
"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": {},
|
||||
|
@ -69,7 +69,7 @@
|
||||
1001
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_1001",
|
||||
"sort": 42,
|
||||
"sort": 43,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
@ -84,7 +84,7 @@
|
||||
1002
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_1002",
|
||||
"sort": 43,
|
||||
"sort": 44,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
@ -99,7 +99,7 @@
|
||||
2001
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_2001",
|
||||
"sort": 40,
|
||||
"sort": 41,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
@ -114,7 +114,7 @@
|
||||
2002
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_2002",
|
||||
"sort": 41,
|
||||
"sort": 42,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
@ -129,7 +129,7 @@
|
||||
3001
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_3001",
|
||||
"sort": 25,
|
||||
"sort": 26,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
@ -144,7 +144,7 @@
|
||||
3002
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_3002",
|
||||
"sort": 26,
|
||||
"sort": 27,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
@ -159,7 +159,7 @@
|
||||
3003
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_3003",
|
||||
"sort": 27,
|
||||
"sort": 28,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
@ -174,7 +174,7 @@
|
||||
3004
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_3004",
|
||||
"sort": 28,
|
||||
"sort": 29,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
@ -189,7 +189,7 @@
|
||||
3005
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_3005",
|
||||
"sort": 29,
|
||||
"sort": 30,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
@ -204,7 +204,7 @@
|
||||
3006
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_3006",
|
||||
"sort": 30,
|
||||
"sort": 31,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
@ -219,7 +219,7 @@
|
||||
3007
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_3007",
|
||||
"sort": 31,
|
||||
"sort": 32,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
@ -234,7 +234,7 @@
|
||||
3008
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_3008",
|
||||
"sort": 32,
|
||||
"sort": 33,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
@ -249,7 +249,7 @@
|
||||
3009
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_3009",
|
||||
"sort": 33,
|
||||
"sort": 34,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
@ -264,7 +264,7 @@
|
||||
3010
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_3010",
|
||||
"sort": 34,
|
||||
"sort": 35,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
@ -279,7 +279,7 @@
|
||||
3011
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_3011",
|
||||
"sort": 35,
|
||||
"sort": 36,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
@ -294,7 +294,7 @@
|
||||
3012
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_3012",
|
||||
"sort": 36,
|
||||
"sort": 37,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
@ -309,7 +309,7 @@
|
||||
3013
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_3013",
|
||||
"sort": 37,
|
||||
"sort": 38,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
@ -324,7 +324,7 @@
|
||||
3014
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_3014",
|
||||
"sort": 38,
|
||||
"sort": 39,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
@ -339,7 +339,7 @@
|
||||
3015
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_3015",
|
||||
"sort": 39,
|
||||
"sort": 40,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
@ -354,7 +354,7 @@
|
||||
4001
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_4001",
|
||||
"sort": 10,
|
||||
"sort": 11,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
@ -369,7 +369,7 @@
|
||||
4002
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_4002",
|
||||
"sort": 11,
|
||||
"sort": 12,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
@ -384,7 +384,7 @@
|
||||
4003
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_4003",
|
||||
"sort": 12,
|
||||
"sort": 13,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
@ -399,7 +399,7 @@
|
||||
4004
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_4004",
|
||||
"sort": 13,
|
||||
"sort": 14,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
@ -414,7 +414,7 @@
|
||||
4005
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_4005",
|
||||
"sort": 14,
|
||||
"sort": 15,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
@ -429,7 +429,7 @@
|
||||
4006
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_4006",
|
||||
"sort": 15,
|
||||
"sort": 16,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
@ -444,7 +444,7 @@
|
||||
4007
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_4007",
|
||||
"sort": 16,
|
||||
"sort": 17,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
@ -459,7 +459,7 @@
|
||||
4008
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_4008",
|
||||
"sort": 17,
|
||||
"sort": 18,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
@ -474,7 +474,7 @@
|
||||
4009
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_4009",
|
||||
"sort": 18,
|
||||
"sort": 19,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
@ -489,7 +489,7 @@
|
||||
4010
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_4010",
|
||||
"sort": 19,
|
||||
"sort": 20,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
@ -504,7 +504,7 @@
|
||||
4011
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_4011",
|
||||
"sort": 20,
|
||||
"sort": 21,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
@ -519,7 +519,7 @@
|
||||
4012
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_4012",
|
||||
"sort": 21,
|
||||
"sort": 22,
|
||||
"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": 22,
|
||||
"sort": 23,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
@ -549,7 +549,7 @@
|
||||
4014
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_4014",
|
||||
"sort": 23,
|
||||
"sort": 24,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
@ -564,7 +564,7 @@
|
||||
4015
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_4015",
|
||||
"sort": 24,
|
||||
"sort": 25,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
@ -579,7 +579,7 @@
|
||||
5001
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_5001",
|
||||
"sort": 5,
|
||||
"sort": 6,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
@ -594,7 +594,7 @@
|
||||
5002
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_5002",
|
||||
"sort": 6,
|
||||
"sort": 7,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
@ -609,7 +609,7 @@
|
||||
5003
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_5003",
|
||||
"sort": 7,
|
||||
"sort": 8,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
@ -624,7 +624,7 @@
|
||||
5004
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_5004",
|
||||
"sort": 8,
|
||||
"sort": 9,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
@ -639,7 +639,22 @@
|
||||
5005
|
||||
],
|
||||
"intr": "intr_playerinfo_intr_5005",
|
||||
"sort": 9,
|
||||
"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,
|
||||
"buff": {},
|
||||
"colour": 1,
|
||||
"ani": ""
|
||||
|
@ -139,7 +139,7 @@
|
||||
"id": 9,
|
||||
"name": "playerheadFrame_name_9",
|
||||
"undefined": "名望等级达到五阶获得,解锁后防御加成+1%",
|
||||
"img": "txk_005",
|
||||
"img": "txk_012",
|
||||
"cond": [
|
||||
"renown",
|
||||
41
|
||||
@ -311,7 +311,7 @@
|
||||
"id": 19,
|
||||
"name": "playerheadFrame_name_19",
|
||||
"undefined": "开服冲榜活动获得,解锁后攻击加成+1%",
|
||||
"img": "txk_004",
|
||||
"img": "txk_006",
|
||||
"cond": [
|
||||
"time",
|
||||
-1
|
||||
@ -395,8 +395,8 @@
|
||||
"24": {
|
||||
"id": 24,
|
||||
"name": "playerheadFrame_name_24",
|
||||
"undefined": "消费竞赛活动前三名获得,解锁后伤害加成+1%(限时7天)",
|
||||
"img": "txk_025",
|
||||
"undefined": "消费竞赛活动获得,解锁后伤害加成+1%(限时7天)",
|
||||
"img": "txk_015",
|
||||
"cond": [
|
||||
"time",
|
||||
604800
|
||||
@ -425,5 +425,22 @@
|
||||
},
|
||||
"colour": 4,
|
||||
"ani": ""
|
||||
},
|
||||
"26": {
|
||||
"id": 26,
|
||||
"name": "playerheadFrame_name_26",
|
||||
"undefined": "黄旗酒馆活动获得,解锁后生命加成+1%(限时7天)",
|
||||
"img": "txk_007",
|
||||
"cond": [
|
||||
"time",
|
||||
604800
|
||||
],
|
||||
"intr": "playerheadFrame_des_26",
|
||||
"sort": 26,
|
||||
"buff": {
|
||||
"hppro": 0.01
|
||||
},
|
||||
"colour": 5,
|
||||
"ani": ""
|
||||
}
|
||||
}
|
@ -1705,13 +1705,13 @@
|
||||
"sxleixing": "attr",
|
||||
"buff_type": 1,
|
||||
"xiaoguocanshu": {
|
||||
"dpspro": 2
|
||||
"dpspro": 1
|
||||
},
|
||||
"round": 2,
|
||||
"round": 3,
|
||||
"group": "tx01300",
|
||||
"jiejiaxiaoguo": "retime",
|
||||
"diejiacengshu": 1,
|
||||
"describe": "进入战斗后的前2回合进入致命状态,攻击敌人时有0.01的几率造成双倍伤害"
|
||||
"describe": "进入战斗后的前2回合进入致命状态,攻击敌人时有1%的几率造成双倍伤害"
|
||||
},
|
||||
"tx01301": {
|
||||
"skillid": "tx01301",
|
||||
@ -1724,13 +1724,13 @@
|
||||
"sxleixing": "attr",
|
||||
"buff_type": 1,
|
||||
"xiaoguocanshu": {
|
||||
"dpspro": 2
|
||||
"dpspro": 1
|
||||
},
|
||||
"round": 2,
|
||||
"round": 3,
|
||||
"group": "tx01300",
|
||||
"jiejiaxiaoguo": "retime",
|
||||
"diejiacengshu": 1,
|
||||
"describe": "进入战斗后的前2回合进入致命状态,攻击敌人时有0.02的几率造成双倍伤害"
|
||||
"describe": "进入战斗后的前2回合进入致命状态,攻击敌人时有2%的几率造成双倍伤害"
|
||||
},
|
||||
"tx01302": {
|
||||
"skillid": "tx01302",
|
||||
@ -1743,13 +1743,13 @@
|
||||
"sxleixing": "attr",
|
||||
"buff_type": 1,
|
||||
"xiaoguocanshu": {
|
||||
"dpspro": 2
|
||||
"dpspro": 1
|
||||
},
|
||||
"round": 2,
|
||||
"round": 3,
|
||||
"group": "tx01300",
|
||||
"jiejiaxiaoguo": "retime",
|
||||
"diejiacengshu": 1,
|
||||
"describe": "进入战斗后的前2回合进入致命状态,攻击敌人时有0.03的几率造成双倍伤害"
|
||||
"describe": "进入战斗后的前2回合进入致命状态,攻击敌人时有3%的几率造成双倍伤害"
|
||||
},
|
||||
"tx01303": {
|
||||
"skillid": "tx01303",
|
||||
@ -1762,13 +1762,13 @@
|
||||
"sxleixing": "attr",
|
||||
"buff_type": 1,
|
||||
"xiaoguocanshu": {
|
||||
"dpspro": 2
|
||||
"dpspro": 1
|
||||
},
|
||||
"round": 2,
|
||||
"round": 3,
|
||||
"group": "tx01300",
|
||||
"jiejiaxiaoguo": "retime",
|
||||
"diejiacengshu": 1,
|
||||
"describe": "进入战斗后的前2回合进入致命状态,攻击敌人时有0.04的几率造成双倍伤害"
|
||||
"describe": "进入战斗后的前2回合进入致命状态,攻击敌人时有4%的几率造成双倍伤害"
|
||||
},
|
||||
"tx01304": {
|
||||
"skillid": "tx01304",
|
||||
@ -1781,13 +1781,13 @@
|
||||
"sxleixing": "attr",
|
||||
"buff_type": 1,
|
||||
"xiaoguocanshu": {
|
||||
"dpspro": 2
|
||||
"dpspro": 1
|
||||
},
|
||||
"round": 2,
|
||||
"round": 3,
|
||||
"group": "tx01300",
|
||||
"jiejiaxiaoguo": "retime",
|
||||
"diejiacengshu": 1,
|
||||
"describe": "进入战斗后的前2回合进入致命状态,攻击敌人时有0.05的几率造成双倍伤害"
|
||||
"describe": "进入战斗后的前2回合进入致命状态,攻击敌人时有5%的几率造成双倍伤害"
|
||||
},
|
||||
"tx01305": {
|
||||
"skillid": "tx01305",
|
||||
@ -1800,13 +1800,13 @@
|
||||
"sxleixing": "attr",
|
||||
"buff_type": 1,
|
||||
"xiaoguocanshu": {
|
||||
"dpspro": 2
|
||||
"dpspro": 1
|
||||
},
|
||||
"round": 2,
|
||||
"round": 3,
|
||||
"group": "tx01300",
|
||||
"jiejiaxiaoguo": "retime",
|
||||
"diejiacengshu": 1,
|
||||
"describe": "进入战斗后的前2回合进入致命状态,攻击敌人时有0.06的几率造成双倍伤害"
|
||||
"describe": "进入战斗后的前2回合进入致命状态,攻击敌人时有6%的几率造成双倍伤害"
|
||||
},
|
||||
"tx01306": {
|
||||
"skillid": "tx01306",
|
||||
@ -1819,13 +1819,13 @@
|
||||
"sxleixing": "attr",
|
||||
"buff_type": 1,
|
||||
"xiaoguocanshu": {
|
||||
"dpspro": 2
|
||||
"dpspro": 1
|
||||
},
|
||||
"round": 2,
|
||||
"round": 3,
|
||||
"group": "tx01300",
|
||||
"jiejiaxiaoguo": "retime",
|
||||
"diejiacengshu": 1,
|
||||
"describe": "进入战斗后的前2回合进入致命状态,攻击敌人时有0.07的几率造成双倍伤害"
|
||||
"describe": "进入战斗后的前2回合进入致命状态,攻击敌人时有7%的几率造成双倍伤害"
|
||||
},
|
||||
"tx01307": {
|
||||
"skillid": "tx01307",
|
||||
@ -1838,13 +1838,13 @@
|
||||
"sxleixing": "attr",
|
||||
"buff_type": 1,
|
||||
"xiaoguocanshu": {
|
||||
"dpspro": 2
|
||||
"dpspro": 1
|
||||
},
|
||||
"round": 2,
|
||||
"round": 3,
|
||||
"group": "tx01300",
|
||||
"jiejiaxiaoguo": "retime",
|
||||
"diejiacengshu": 1,
|
||||
"describe": "进入战斗后的前2回合进入致命状态,攻击敌人时有0.08的几率造成双倍伤害"
|
||||
"describe": "进入战斗后的前2回合进入致命状态,攻击敌人时有8%的几率造成双倍伤害"
|
||||
},
|
||||
"tx01308": {
|
||||
"skillid": "tx01308",
|
||||
@ -1857,13 +1857,13 @@
|
||||
"sxleixing": "attr",
|
||||
"buff_type": 1,
|
||||
"xiaoguocanshu": {
|
||||
"dpspro": 2
|
||||
"dpspro": 1
|
||||
},
|
||||
"round": 2,
|
||||
"round": 3,
|
||||
"group": "tx01300",
|
||||
"jiejiaxiaoguo": "retime",
|
||||
"diejiacengshu": 1,
|
||||
"describe": "进入战斗后的前2回合进入致命状态,攻击敌人时有0.09的几率造成双倍伤害"
|
||||
"describe": "进入战斗后的前2回合进入致命状态,攻击敌人时有9%的几率造成双倍伤害"
|
||||
},
|
||||
"tx01309": {
|
||||
"skillid": "tx01309",
|
||||
@ -1876,13 +1876,13 @@
|
||||
"sxleixing": "attr",
|
||||
"buff_type": 1,
|
||||
"xiaoguocanshu": {
|
||||
"dpspro": 2
|
||||
"dpspro": 1
|
||||
},
|
||||
"round": 2,
|
||||
"round": 3,
|
||||
"group": "tx01300",
|
||||
"jiejiaxiaoguo": "retime",
|
||||
"diejiacengshu": 1,
|
||||
"describe": "进入战斗后的前2回合进入致命状态,攻击敌人时有0.10的几率造成双倍伤害"
|
||||
"describe": "进入战斗后的前2回合进入致命状态,攻击敌人时有10%的几率造成双倍伤害"
|
||||
},
|
||||
"tx02300": {
|
||||
"skillid": "tx02300",
|
||||
|
@ -800,6 +800,8 @@ type gc_npc = k_v<{
|
||||
'ghname': string
|
||||
/**npc名称 */
|
||||
'npcname': string
|
||||
/**怪物皮肤*/
|
||||
'skin': number[]
|
||||
}>;
|
||||
|
||||
type gc_openCond = k_v<{
|
||||
|
@ -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[]
|
||||
|
@ -260,7 +260,10 @@ export class PayFun {
|
||||
let selectPrize = await G.ioredis.get(`pay:${payId}:${player.uid}`);
|
||||
if (selectPrize) {
|
||||
prize.push(...JSON.parse(selectPrize))
|
||||
G.ioredis.del(`pay:${payId}:${player.uid}`)
|
||||
//支付A check -> 玩家支付 -> 网络延迟
|
||||
//支付B check -> 玩家支付 -> pay -> del
|
||||
//支付A -> pay 时,这里可能被清了,导致给玩家发放了空的奖励,因此,这里不清除
|
||||
//G.ioredis.del(`pay:${payId}:${player.uid}`)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,25 +1,27 @@
|
||||
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 HeroSkinFun from './heroskin';
|
||||
import { roleDataType } from '../shared/fightControl/fightType';
|
||||
import { PlayerShared } from '../shared/public/player';
|
||||
|
||||
|
||||
export type call = {
|
||||
get otherBuff(): otherBuff;
|
||||
@ -41,6 +43,41 @@ 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数量
|
||||
*/
|
||||
@ -70,13 +107,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};
|
||||
}
|
||||
|
||||
/**
|
||||
@ -94,7 +131,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);
|
||||
}
|
||||
@ -117,10 +154,10 @@ 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)};
|
||||
}));
|
||||
}
|
||||
|
||||
@ -136,18 +173,16 @@ 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)
|
||||
]);
|
||||
|
||||
return prizeList;
|
||||
@ -182,9 +217,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 });
|
||||
ActionLog.addDayLog(call.conn.uid, { key: 'got_'+atn.t, val: atn.n });
|
||||
}
|
||||
|
||||
// 增加vip经验的任务监听
|
||||
@ -192,7 +227,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]});
|
||||
}
|
||||
@ -235,17 +270,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);
|
||||
@ -267,9 +302,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;
|
||||
@ -278,7 +313,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;
|
||||
}
|
||||
}
|
||||
@ -289,7 +324,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,
|
||||
@ -321,7 +356,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
|
||||
@ -329,10 +364,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)
|
||||
@ -341,7 +376,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,
|
||||
@ -376,7 +411,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);
|
||||
|
||||
@ -410,10 +445,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})
|
||||
}
|
||||
}
|
||||
|
||||
@ -447,7 +482,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,
|
||||
@ -480,9 +515,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})
|
||||
}
|
||||
}
|
||||
|
||||
@ -497,7 +532,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) {
|
||||
@ -517,7 +552,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
|
||||
@ -536,9 +571,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})
|
||||
}
|
||||
}
|
||||
|
||||
@ -563,7 +598,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) {
|
||||
@ -571,8 +606,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(
|
||||
@ -593,39 +628,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 {
|
||||
prize.concat(G.gc.heroSkin[p.t].zhuanhuan);
|
||||
}
|
||||
}
|
||||
if (Object.keys(upskin).length > 0) {
|
||||
this.addAttr(call, { heroskin: Object.assign(heroskin, upskin) });
|
||||
}
|
||||
|
||||
// 皮肤存在转换为其他奖励
|
||||
if (prize.length > 0) {
|
||||
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})
|
||||
}
|
||||
}
|
||||
|
||||
@ -634,7 +645,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) {
|
||||
@ -649,7 +660,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'];
|
||||
@ -665,10 +676,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) {
|
||||
@ -683,7 +694,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;
|
||||
@ -694,7 +705,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,7 +161,13 @@ export class SchedulerClslPrize extends Scheduler {
|
||||
async start() {
|
||||
// 排名奖励
|
||||
let group2users: { [group: string]: string[] } = {};
|
||||
(await G.mongodb.collection('clslCrossUser').find({allStar: {$gte: this.star}}).toArray()).forEach(u => {
|
||||
(await G.mongodb.collection('clslCrossUser').find(
|
||||
{
|
||||
uid: { $exists: true },
|
||||
allStar: { $gte: this.star }
|
||||
},
|
||||
{ sort: { allStar: -1 } }
|
||||
).limit(10).toArray()).forEach(u => {
|
||||
if (u.group in group2users) {
|
||||
group2users[u.group].push(u.uid);
|
||||
} else {
|
||||
|
@ -59,6 +59,9 @@ export class SchedulerNewDayLocalCtor extends Scheduler {
|
||||
}
|
||||
}
|
||||
})()
|
||||
|
||||
// 转点刷新事件
|
||||
G.emit('NEW_DAY', G.time);
|
||||
})
|
||||
|
||||
let users = Object.values(G.server.uid_connections)
|
||||
|
@ -1,19 +1,20 @@
|
||||
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 { 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"
|
||||
|
||||
let _classNameFunc = {}
|
||||
/**
|
||||
@ -72,13 +73,15 @@ 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)
|
||||
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);
|
||||
}
|
||||
|
||||
// 任务数值, 和检测值,看情况需要上层复写
|
||||
@ -167,12 +170,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
|
||||
}
|
||||
}
|
||||
|
||||
@ -194,13 +197,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
|
||||
}
|
||||
}
|
||||
@ -256,13 +259,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
|
||||
}
|
||||
}
|
||||
@ -426,7 +429,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
|
||||
}
|
||||
@ -446,7 +449,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
|
||||
}
|
||||
@ -505,7 +508,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
|
||||
}
|
||||
@ -608,12 +611,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
|
||||
}
|
||||
}
|
||||
|
||||
@ -675,11 +678,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
|
||||
}
|
||||
|
||||
}
|
||||
@ -833,6 +836,11 @@ export module manager {
|
||||
}
|
||||
}
|
||||
|
||||
// 第61个任务 黄旗酒馆累计抽卡X次
|
||||
export class Class_task_159 extends BaseClass {
|
||||
stype = 159
|
||||
isinc = 1
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -305,8 +305,11 @@ export class UserFun {
|
||||
gud.headFrames[conf.id] += val * v;
|
||||
}
|
||||
}
|
||||
else if(conf?.cond?.[0] == "jjc_rank") {
|
||||
change = true;
|
||||
gud.headFrames[conf.id] = -1;
|
||||
}
|
||||
}
|
||||
|
||||
if (change) {
|
||||
PlayerFun.changeAttr(uid, {headFrames: gud.headFrames});
|
||||
G.server.sendMsgByUid(uid, 'msg_s2c/PlayerChange', {headFrames: gud.headFrames});
|
||||
|
@ -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)
|
||||
};
|
||||
|
||||
}()]))
|
||||
|
11
src/shared/protocols/event/huangqijiuguan/PtlGiftRec.ts
Normal file
11
src/shared/protocols/event/huangqijiuguan/PtlGiftRec.ts
Normal file
@ -0,0 +1,11 @@
|
||||
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 }[]
|
||||
}
|
11
src/shared/protocols/event/huangqijiuguan/PtlGiftSelect.ts
Normal file
11
src/shared/protocols/event/huangqijiuguan/PtlGiftSelect.ts
Normal file
@ -0,0 +1,11 @@
|
||||
import { PlayerData } from "../../../../api_s2c/event/huangqijiuguan/fun"
|
||||
|
||||
export interface ReqGiftSelect {
|
||||
hdid: number
|
||||
giftid: number
|
||||
seletc: number[]
|
||||
}
|
||||
|
||||
export interface ResGiftSelect {
|
||||
data: PlayerData
|
||||
}
|
@ -2,7 +2,7 @@ import { PlayerData } from "../../../../api_s2c/event/huangqijiuguan/fun"
|
||||
|
||||
export interface ReqZhaoMuPrizeRec {
|
||||
hdid: number
|
||||
recid: number[]
|
||||
recid: { idx: number, sec: string }[]
|
||||
}
|
||||
|
||||
export interface ResZhaoMuPrizeRec {
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -322,7 +322,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) continue;
|
||||
if (k.indexOf('pro') != -1 || k.indexOf('drop') != -1 || k=='addhp') continue;
|
||||
buff[k] = Math.floor(buff[k]);
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,10 @@
|
||||
|
||||
# "Asia/Shanghai"
|
||||
# "Asia/Tokyo"
|
||||
|
||||
cp "/usr/share/zoneinfo/$1" "/etc/localtime"
|
||||
|
||||
echo "$1" > /etc/timezone
|
||||
|
||||
pm2 restart all || true
|
||||
for i in `env | grep -E -i 'SERVER_GAME' | sed 's/=.*//'` ; do
|
||||
unset $i
|
||||
done
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user