Compare commits

..

No commits in common. "04533c80f44f6d0321b72ec05e08382c10f09265" and "eb73af1dd2337ed30641013332ea777f2cda9f0b" have entirely different histories.

5 changed files with 44 additions and 43 deletions

View File

@ -91,13 +91,13 @@ export default async function (call: ApiCall<ReqPkBoss, ResPkBoss>) {
} }
_mySetDat = { _mySetDat = {
maxdps: _myData.maxdps, maxdps: _myData.maxdps,
time: _myData.time,
} }
_bossData.delhp += result.totalDamage[0] _bossData.delhp += result.totalDamage[0]
} }
// 无论挑战成功失败都扣除战斗次数 // 无论挑战成功失败都扣除战斗次数
_mySetDat["num"] = _myData.num + 1; _mySetDat["num"] = _myData.num + 1;
_mySetDat["time"] = G.time;
// 设置boss数据 // 设置boss数据
await LingZhuLaiXifun.setBossData(_bossData.bid, _setData) await LingZhuLaiXifun.setBossData(_bossData.bid, _setData)

View File

@ -86,7 +86,7 @@ export default async function (call: ApiCall<ReqSaoDang, ResSaoDang>) {
// 设置boss数据 // 设置boss数据
await LingZhuLaiXifun.setBossData(_bossData.bid, _setData) await LingZhuLaiXifun.setBossData(_bossData.bid, _setData)
await LingZhuLaiXifun.setMyData(call, {$inc: {num: _num}, $set: {time: G.time}}) await LingZhuLaiXifun.setMyData(call, { $inc: { num: _num } })
// 发奖 // 发奖
prize = PublicShared.mergePrize(prize) prize = PublicShared.mergePrize(prize)

View File

@ -25,11 +25,11 @@ export default async function (call: ApiCall<ReqSaoDang, ResSaoDang>) {
changeInfo.saodangNum = call.req.num + (changeInfo?.saodangNum || 0); changeInfo.saodangNum = call.req.num + (changeInfo?.saodangNum || 0);
// 改变的数据 // 改变的数据
// let setData = { let setData = {
// saodangNum: changeInfo.saodangNum saodangNum: changeInfo.saodangNum
// }; };
// 设置数据 // 设置数据
await PataFun.changeInfo(call.uid, changeInfo.sid, {"$inc": {saodangNum: call.req.num}}); await PataFun.changeInfo(call.uid, changeInfo.sid, { $set: setData });
_prize = await PlayerFun.sendPrize(call, _prize); _prize = await PlayerFun.sendPrize(call, _prize);
let data = { let data = {

View File

@ -11,8 +11,8 @@
}, },
{ {
"key":"got_rmbmoney", "key":"got_rmbmoney",
"limit":50000, "limit":30000,
"tips":"钻石获取达到5万" "tips":"钻石获取达到3万"
}, },
{ {
"key":"use_attr_rmbmoney", "key":"use_attr_rmbmoney",
@ -21,8 +21,8 @@
}, },
{ {
"key":"tanxian/FastGuaJi", "key":"tanxian/FastGuaJi",
"limit":30, "limit":40,
"tips":"快速探险达到30次" "tips":"快速探险达到40次"
}, },
{ {
"key":"xstask/Receive/Num", "key":"xstask/Receive/Num",

View File

@ -38,8 +38,9 @@ export class PataFun {
} }
/**修改爬塔信息 */ /**修改爬塔信息 */
static async changeInfo(uid: string, sid: number, change: Pick<UpdateFilter<paTaType>, string>) { static async changeInfo(uid: string, sid: number, change: Pick<UpdateFilter<paTaType>, '$set'>) {
await G.mongodb.collection('pata').updateOne(
G.mongodb.collection('pata').updateOne(
{ uid: uid, sid: sid }, { uid: uid, sid: sid },
change, change,
{ upsert: true } { upsert: true }
@ -50,7 +51,7 @@ export class PataFun {
static async getHongDian(uid: string) { static async getHongDian(uid: string) {
let mydata = await this.getInfo(uid); let mydata = await this.getInfo(uid);
let con = Object.keys(G.gc.patacom); let con = Object.keys(G.gc.patacom);
con.sort((a, b) => parseInt(a) - parseInt(b)); con.sort((a, b) => { return parseInt(a) - parseInt(b); });
for (let idx in con) { for (let idx in con) {
idx = con[idx]; idx = con[idx];
if (mydata.lv <= parseInt(idx)) { if (mydata.lv <= parseInt(idx)) {