Compare commits

...

119 Commits

Author SHA1 Message Date
dy
eb1e346988 Merge branch 'dev' into release 2023-12-19 10:13:21 +08:00
xcy
d4634f729e fix:跨服邮件定时器 2023-12-19 10:12:49 +08:00
dy
d1b9aa476b Merge branch 'dev' into release
# Conflicts:
#	src/json/herogrow_ewai.json
#	src/json/huodong.json5
#	src/json/item.json
#	src/json/pay.json
2023-12-19 10:10:20 +08:00
dy
83c99c25bd Merge branch 'bugfix' into release 2023-12-19 10:08:44 +08:00
dy
c428d0d2f7 cehua-json 2023-12-19 09:48:43 +08:00
xcy
91f14c69ce fix:红点 2023-12-18 21:31:51 +08:00
xcy
0ac5246d5b fix:
积天好礼bug
2023-12-18 21:22:01 +08:00
xcy
3cce7bbfc7 fix:
过滤没有充值得payid
2023-12-18 21:22:01 +08:00
xcy
7e063ef72b fix:
协议
2023-12-18 21:22:00 +08:00
xcy
50087cd543 fix:
十五天累计充值
2023-12-18 21:21:35 +08:00
1463aa239f Merge branch 'bugfix' of http://git.legu.cc/qixin/HJ_Server into bugfix 2023-12-18 21:18:50 +08:00
xcy
d2ce3dd143 Merge branch 'dev-jitianhaoli' into dev
# Conflicts:
#	src/api_s2c/event/shiwuleichong/ApiOpen.ts
2023-12-18 21:18:10 +08:00
724f91fc36 公会战力优化 2023-12-18 21:17:30 +08:00
xcy
3b49056a60 fix:脚本 2023-12-18 20:30:22 +08:00
dy
203e8ee297 trace log 2023-12-18 20:20:01 +08:00
xcy
79fcc6ec85 Revert "feat: 1.推送礼包"
This reverts commit 5d9ece05
2023-12-18 20:09:56 +08:00
xcy
ce5836be83 Revert "feat:"
This reverts commit ef90c131f3.
2023-12-18 20:08:30 +08:00
xcy
c282ece109 Revert "feat:"
This reverts commit e99b5dad15.
2023-12-18 20:08:27 +08:00
xcy
cddda8288e Revert "fix bug"
This reverts commit 0b18e39dd7.
2023-12-18 20:06:54 +08:00
xcy
fe898ca42c Revert "fix:"
This reverts commit 4fc0da4a70.
2023-12-18 20:06:40 +08:00
xcy
893008c1e7 Revert "fix:"
This reverts commit d060004609.
2023-12-18 20:06:33 +08:00
xcy
fa7fbbfdd0 Revert "fix:"
This reverts commit a6fb04ce58.
2023-12-18 20:05:46 +08:00
xcy
10c54fce47 Revert "fix:"
This reverts commit 00f829c48c.
2023-12-18 20:05:40 +08:00
xcy
b2c0d754a1 Revert "fix:"
This reverts commit 14ab1d45b8.
2023-12-18 20:05:32 +08:00
xcy
e57fad35d8 Revert "fix:"
This reverts commit 7e775e90e1.
2023-12-18 20:05:26 +08:00
xcy
28e4aca1f2 Revert "fix:"
This reverts commit 404bb9a7e5.
2023-12-18 20:04:52 +08:00
xcy
c8751956ef Revert "fix:"
This reverts commit 5679361eab.
2023-12-18 20:04:48 +08:00
xcy
e89d7a91c1 Revert "fix:脚本"
This reverts commit 954c2e8d2e.
2023-12-18 20:04:41 +08:00
xcy
9f744b7cee Revert "fix:脚本"
This reverts commit 76794921fb.
2023-12-18 20:04:35 +08:00
xcy
9523f7c00d fix:
积天好礼bug
2023-12-18 20:00:49 +08:00
9964e12f80 Merge branch 'bugfix' of http://git.legu.cc/qixin/HJ_Server into bugfix 2023-12-18 19:22:48 +08:00
a452f12654 分析db find数据 2023-12-18 19:22:37 +08:00
dy
a1b7cb1d7c Merge branch 'bugfix' into dev 2023-12-18 19:19:13 +08:00
dy
c8d6f7d433 修复充值经验任务计算,开服狂欢进度,优化dayPay查询 2023-12-18 19:12:51 +08:00
xcy
20bb0c9478 Merge remote-tracking branch 'origin/dev' into dev 2023-12-18 18:35:44 +08:00
xcy
76794921fb fix:脚本 2023-12-18 18:34:41 +08:00
af0225005a Merge branch 'bugfix' of http://git.legu.cc/qixin/HJ_Server into bugfix 2023-12-18 18:02:15 +08:00
3f275e4af4 去掉发邮件时的上限判断机制 2023-12-18 18:01:55 +08:00
dy
540291696a Merge branch 'dev-meirilibao' into dev 2023-12-18 16:51:38 +08:00
dy
d84173b67e 每日礼包改版,增加一键购买 2023-12-18 16:49:54 +08:00
yushunrui
9882a28090 fix:处理圣诞活动免费次数bug 2023-12-18 16:16:11 +08:00
dy
a5ad7ee2cf Merge remote-tracking branch 'origin/bugfix' into bugfix 2023-12-18 15:50:50 +08:00
dy
7ae81dc6f5 战力数值计算加上速度倍数 2023-12-18 15:50:40 +08:00
ea179c2a3c redis优化 2023-12-18 15:50:28 +08:00
yushunrui
25a8e15ed3 task增加新的任务类型,154是圣诞小游戏挑战 155是每日任务最终宝箱奖励 2023-12-18 15:29:48 +08:00
dd34a1c3a4 equip去redis化 2023-12-18 15:27:10 +08:00
yushunrui
89b75bbf2b Merge remote-tracking branch 'origin/dev' into dev 2023-12-18 15:02:07 +08:00
yushunrui
30de992a62 圣诞活动增加异步按钮 2023-12-18 14:58:41 +08:00
dy
b615f5d4fc Merge branch 'dev-json' into dev 2023-12-18 14:47:30 +08:00
dy
fdbf22f62f Merge branch 'bugfix' into dev 2023-12-18 14:47:13 +08:00
dy
7474b4583f json 2023-12-18 14:46:36 +08:00
327f9c9b5a 全面去掉hero的redis依赖 2023-12-18 14:43:13 +08:00
xcy
954c2e8d2e fix:脚本 2023-12-18 14:38:26 +08:00
xcy
6809bdc2b3 fix:
积天好礼bug
2023-12-18 14:29:31 +08:00
xcy
4737f94fcd Merge remote-tracking branch 'origin/dev' into dev 2023-12-18 13:51:20 +08:00
xcy
5679361eab fix:
积天好礼bug
2023-12-18 13:48:43 +08:00
dy
3cbc09345a 策划JSON同步 2023-12-18 11:37:23 +08:00
yushunrui
192ee578dc 圣诞功能还原版本 2023-12-18 11:23:13 +08:00
dy
23f56c3964 Merge remote-tracking branch 'origin/dev-tequan' into dev 2023-12-18 10:26:31 +08:00
dy
ce11402430 Merge branch 'bugfix' into dev 2023-12-18 10:06:55 +08:00
dy
2bbfb55704 修复矿洞延时接口 2023-12-16 11:15:16 +08:00
dy
5ccea04bbe Merge branch 'master' into bugfix 2023-12-16 11:05:37 +08:00
dy
64f333908d bugfix 2023-12-15 22:58:48 +08:00
dy
77159cc7e3 干部功能redis直取修复 2023-12-15 22:48:45 +08:00
dy
5106632893 cehua json 2023-12-15 22:31:48 +08:00
dy
2dcb2f2082 cehua json 2023-12-15 21:15:42 +08:00
xcy
404bb9a7e5 fix:
修改伙伴招募的奖励领取条件
2023-12-15 21:11:31 +08:00
dy
9d436fd34a Merge remote-tracking branch 'origin/dev-jitianhaoli' into dev 2023-12-15 20:21:24 +08:00
dy
2f87f25a8d fix bug 2023-12-15 20:20:46 +08:00
xcy
7e775e90e1 fix:
修改情报特权
2023-12-15 20:06:20 +08:00
xcy
fb6a6dfb38 Merge remote-tracking branch 'origin/dev' into dev-shouchong 2023-12-15 18:28:50 +08:00
xcy
14ab1d45b8 fix:
过滤没有充值得payid
2023-12-15 18:27:57 +08:00
xcy
00f829c48c fix:
协议
2023-12-15 18:26:25 +08:00
xcy
973e2033a0 Merge remote-tracking branch 'origin/dev' into dev-jitianhaoli
# Conflicts:
#	src/shared/protocols/serviceProto.ts
2023-12-15 18:24:19 +08:00
xcy
a6fb04ce58 fix:
首充
2023-12-15 18:01:05 +08:00
xcy
d060004609 fix:
十五天累计充值
2023-12-15 17:42:20 +08:00
dy
99eb799c99 Merge branch 'dev-shouchong' into dev 2023-12-15 17:01:40 +08:00
dy
11c1c0b2c2 fix bug 2023-12-15 17:01:32 +08:00
dy
14d691604e proto 2023-12-15 16:47:34 +08:00
dy
159bafcea9 Merge branch 'bugfix' into dev
# Conflicts:
#	src/api_s2c/event/christmas/ApiGame.ts
#	src/api_s2c/event/christmas/ApiLiBao.ts
#	src/api_s2c/event/christmas/ApiOpen.ts
#	src/api_s2c/event/christmas/ApiQianDao.ts
#	src/api_s2c/event/christmas/ApiZhanLingRec.ts
#	src/api_s2c/event/christmas/fun.ts
#	src/api_s2c/hongdian/fun.ts
#	src/api_s2c/pushgift/ApiOpen.ts
#	src/globalListener.ts
2023-12-15 16:46:06 +08:00
xcy
4a10921600 Merge branch 'dev-shouchong' into dev 2023-12-15 16:24:33 +08:00
xcy
4fc0da4a70 fix:
首充调整与脚本
2023-12-15 15:14:12 +08:00
f07b1fc0b7 mdb空闲关闭 2023-12-15 14:41:10 +08:00
dy
28d01f586a cehua json 2023-12-15 14:28:42 +08:00
dy
865bfb9943 fix bug 2023-12-15 12:17:58 +08:00
dy
0b806429ab fix bug 2023-12-15 12:01:38 +08:00
xcy
9d5b69edc2 fix bug 2023-12-15 11:31:46 +08:00
dy
3488f61978 Merge remote-tracking branch 'origin/dev' into dev 2023-12-15 11:12:12 +08:00
dy
f6248d1294 fix bug 2023-12-15 11:12:04 +08:00
xcy
e35e950e11 fix:
主线任务vip经验计数错误,修改为直接读取gud的payexp
2023-12-15 11:01:56 +08:00
xcy
e99b5dad15 feat:
1.推送礼包
2023-12-15 10:30:47 +08:00
dy
0fc409b0dc fix bug 2023-12-15 09:55:18 +08:00
xcy
ef90c131f3 feat:
1.推送礼包
2023-12-14 20:57:15 +08:00
xcy
aab0951e6d Merge remote-tracking branch 'origin/pushgift' into pushgift 2023-12-14 20:53:47 +08:00
5dea65e51a Merge branch 'dev' of http://git.legu.cc/qixin/HJ_Server into dev 2023-12-14 20:43:33 +08:00
0304c78991 战斗清理 2023-12-14 20:42:22 +08:00
dy
5a3f489691 proto 2023-12-14 20:12:17 +08:00
dy
bfc1fb0c9c Merge remote-tracking branch 'origin/dev' into dev 2023-12-14 19:42:13 +08:00
yushunrui
96f8b26ce8 修改圣诞小游戏逻辑 2023-12-16 19:31:48 +08:00
yushunrui
582ac4f7e3 更新圣诞活动相关代码 2023-12-16 19:05:37 +08:00
dy
dc50b71b01 proto 2023-12-14 19:42:03 +08:00
dy
5fabfb2c5a 周末礼包红点 2023-12-14 18:52:17 +08:00
dy
0f7c1db0a1 Merge remote-tracking branch 'origin/pushgift' into dev 2023-12-14 18:35:23 +08:00
dy
8bc84b5816 内网linux服务器一键更新启动脚本 2023-12-14 18:28:58 +08:00
dy
e9a2c50696 内网linux服务器一键更新启动脚本 2023-12-14 18:20:37 +08:00
dy
dcea046183 内网linux服务器一键更新启动脚本 2023-12-14 18:20:14 +08:00
xcy
5d9ece056e feat:
1.推送礼包
2023-12-14 18:18:26 +08:00
dy
39362ea6ab 周末礼包 2023-12-14 17:53:52 +08:00
dy
39cb12ac9a 周末礼包,修补钻石替换 2023-12-14 17:16:36 +08:00
dy
ab8404ef62 周末礼包 2023-12-14 17:01:39 +08:00
e0d9c40be3 Merge branch 'dev' of http://git.legu.cc/qixin/HJ_Server into dev 2023-12-14 16:07:54 +08:00
yushunrui
dc822cc958 Merge remote-tracking branch 'origin/dev' into dev 2023-12-16 15:49:56 +08:00
yushunrui
901484252d 追杀令经验修改 2023-12-16 15:49:22 +08:00
02798b1c1d fix语言包为null 2023-12-14 16:07:36 +08:00
dy
0ebe169f50 周末礼包 2023-12-14 15:34:32 +08:00
dy
49cb5d6f81 proto 2023-12-14 14:01:18 +08:00
dy
ae56d03f72 proto 2023-12-14 13:52:41 +08:00
dy
64f3f75b77 init 2023-12-14 13:51:24 +08:00
dy
d8f8aaa8d1 init 2023-12-14 13:48:47 +08:00
78 changed files with 5593 additions and 1433 deletions

12
oneKeyStartPm2.sh Normal file
View File

@ -0,0 +1,12 @@
git fetch origin dev && git reset --hard origin/dev && git pull
npm run build_linux
cp src/config.json dist/
pm2 del heijiao_msg_s0
cd dist && pm2 start js_pm2.config.js
pm2 save

View File

@ -120,7 +120,13 @@ export default async function (call: ApiCall<ReqBingo, ResBingo>) {
} }
} else if (shell[0] == 'heroMaxLv') { } else if (shell[0] == 'heroMaxLv') {
let heros = await G.redis.get('hero', call.uid); //let heros = await G.redis.get('hero', call.uid);
let s = await G.mongodb.collection('hero').find({
uid: call.uid
}).toArray();
let heros = s.map(h => G.mongodb.conversionIdObj(h));
for (let [_id, hero] of Object.entries(heros)) { for (let [_id, hero] of Object.entries(heros)) {
await HeroFun.changeHeroAttr(call, hero, { await HeroFun.changeHeroAttr(call, hero, {
lv: Object.keys(G.gc.playerLv).length * 3, lv: Object.keys(G.gc.playerLv).length * 3,

View File

@ -3,6 +3,7 @@ import {EventFun} from '../public/event/event';
import {PayFun} from '../public/pay'; import {PayFun} from '../public/pay';
import {ReqSyncBtn, ResSyncBtn, syncBtnKeys} from "../shared/protocols/PtlSyncBtn"; import {ReqSyncBtn, ResSyncBtn, syncBtnKeys} from "../shared/protocols/PtlSyncBtn";
import {PublicShared} from '../shared/public/public'; import {PublicShared} from '../shared/public/public';
import {HuoDongFun} from "../public/huodongfun";
const defaultKeys: syncBtnKeys[] = [ const defaultKeys: syncBtnKeys[] = [
'huobanzhaomu', 'yibaichou', 'shouchong', 'huobanzhaomu', 'yibaichou', 'shouchong',
@ -10,7 +11,8 @@ const defaultKeys: syncBtnKeys[] = [
'zhanling', 'zhanling',
'xianshilibao', 'xianshilibao',
'xianshizhaomu', 'xianshizhaomu',
'G123Gift' 'G123Gift',
'christmas',
// 'kaifukuanghuan', // 'kaifukuanghuan',
// 'qiridenglu', // 'qiridenglu',
@ -36,6 +38,17 @@ export default async function (call: ApiCall<ReqSyncBtn, ResSyncBtn>) {
change[key] = data[key]; change[key] = data[key];
} }
break; break;
case 'christmas':
//领完消失
if (!data[key]) {
let _hdList = await HuoDongFun.gethdList(call, 8)
if (_hdList) {
// 无此活动
data[key] = {active: true};
change[key] = data[key];
}
}
break;
case 'dayjijin': case 'dayjijin':
case 'dengjijijin': case 'dengjijijin':
case 'guanqiajijin': case 'guanqiajijin':

View File

@ -4,7 +4,7 @@ import { ReqGetList, ResGetList } from "../../shared/protocols/equip/PtlGetList"
export default async function (call: ApiCall<ReqGetList, ResGetList>) { export default async function (call: ApiCall<ReqGetList, ResGetList>) {
let list: ResGetList['list'] = {}; let list: ResGetList['list'] = {};
let kvList: k_v<RedisCollections2['equip']> = {}; //let kvList: k_v<RedisCollections2['equip']> = {};
let arrList = await G.mongodb.collection('equip').find({ uid: call.uid }).toArray(); let arrList = await G.mongodb.collection('equip').find({ uid: call.uid }).toArray();
let equipCon = G.gc.equip let equipCon = G.gc.equip
@ -12,7 +12,7 @@ export default async function (call: ApiCall<ReqGetList, ResGetList>) {
let maxequiplv = 0 let maxequiplv = 0
arrList.forEach(v => { arrList.forEach(v => {
let d = G.mongodb.conversionIdObj(v); let d = G.mongodb.conversionIdObj(v);
kvList[G.formatRedisKey(d._id)] = d; //kvList[G.formatRedisKey(d._id)] = d;
list[d._id] = d; list[d._id] = d;
if (v.lv > maxequiplv) maxequiplv = v.lv if (v.lv > maxequiplv) maxequiplv = v.lv
@ -24,7 +24,7 @@ export default async function (call: ApiCall<ReqGetList, ResGetList>) {
await G.mongodb.collection('playerInfo', 'usertasklog').updateOne({ uid: call.conn.uid, type: 'usertasklog' }, await G.mongodb.collection('playerInfo', 'usertasklog').updateOne({ uid: call.conn.uid, type: 'usertasklog' },
{ $set: { maxequiplv: maxequiplv, equipcolor: color } }, { upsert: true }) { $set: { maxequiplv: maxequiplv, equipcolor: color } }, { upsert: true })
G.redis.set('equip', call.uid, kvList); //G.redis.set('equip', call.uid, kvList);
let recLshd = await G.mongodb.collection('playerInfo', 'lshd_equip').findOne({ uid: call.conn.uid, type: 'lshd_equip' }); let recLshd = await G.mongodb.collection('playerInfo', 'lshd_equip').findOne({ uid: call.conn.uid, type: 'lshd_equip' });
let { uid, _id, type, ...equips } = (recLshd || {}); let { uid, _id, type, ...equips } = (recLshd || {});

View File

@ -14,7 +14,7 @@ export default async function (call: ApiCall<ReqOneKeyWear, ResOneKeyWear, Servi
let wearNum = 0; let wearNum = 0;
let wearData = hero.equip || {}; let wearData = hero.equip || {};
let equipList = await G.redis.get('equip', call.conn.uid) || {}; let equipList = await EquipFun.getAllEquips(call);
let allEquip = Object.values(equipList); let allEquip = Object.values(equipList);
let heroIds = Object.values(call.conn.gud.heroPos).filter(i => !!i) let heroIds = Object.values(call.conn.gud.heroPos).filter(i => !!i)

View File

@ -11,7 +11,7 @@ import { PublicShared } from "../../shared/public/public";
export default async function (call: ApiCall<ReqStarUp, ResStarUp, ServiceType>) { export default async function (call: ApiCall<ReqStarUp, ResStarUp, ServiceType>) {
let equip = await G.redis.get('equip', call.uid, call.req.equipId); let equip = await EquipFun.getEquip(call, call.req.equipId);
if (!equip) return call.error(globalThis.lng.equip_1); if (!equip) return call.error(globalThis.lng.equip_1);
if (!G.gc.equipstar[equip.equipId]) return call.error(globalThis.lng.equip_4); if (!G.gc.equipstar[equip.equipId]) return call.error(globalThis.lng.equip_4);
@ -28,7 +28,7 @@ export default async function (call: ApiCall<ReqStarUp, ResStarUp, ServiceType>)
for (let _id of call.req.equipArr) { for (let _id of call.req.equipArr) {
//遍历客户端传过来的所有装备,如果不存在或处于穿戴中,则报错 //遍历客户端传过来的所有装备,如果不存在或处于穿戴中,则报错
let equip = await G.redis.get('equip', call.conn.uid, _id); let equip = await EquipFun.getEquip(call, _id);
if (!equip) return call.error(globalThis.lng.equip_6); if (!equip) return call.error(globalThis.lng.equip_6);
if (equip.wearaId) return call.error(globalThis.lng.equip_7); if (equip.wearaId) return call.error(globalThis.lng.equip_7);
equipArr.push(equip); equipArr.push(equip);

View File

@ -5,7 +5,7 @@ import { ServiceType } from '../../shared/protocols/serviceProto';
import kfjsFun from "../../public/kaifujingsai"; import kfjsFun from "../../public/kaifujingsai";
export default async function (call: ApiCall<ReqTakeOff, ResTakeOff, ServiceType>) { export default async function (call: ApiCall<ReqTakeOff, ResTakeOff, ServiceType>) {
let equip = await G.redis.get('equip', call.conn.uid, call.req.equipId); let equip = await EquipFun.getEquip(call, call.req.equipId);
if (!equip) return call.error(globalThis.lng.equip_1); if (!equip) return call.error(globalThis.lng.equip_1);
if (!equip.wearaId) return call.error(globalThis.lng.equip_9); if (!equip.wearaId) return call.error(globalThis.lng.equip_9);

View File

@ -12,7 +12,7 @@ export default async function (call: ApiCall<ReqWear, ResWear, ServiceType>) {
if (!hero) return call.error(globalThis.lng.equip_10); if (!hero) return call.error(globalThis.lng.equip_10);
if (hero.lv < G.gc.herocom.equipOpenLv) return call.error(`英雄${G.gc.herocom.equipOpenLv}级开启`); if (hero.lv < G.gc.herocom.equipOpenLv) return call.error(`英雄${G.gc.herocom.equipOpenLv}级开启`);
let equip = await G.redis.get('equip', call.conn.uid, call.req.equipId); let equip = await EquipFun.getEquip(call, call.req.equipId);
if (!equip) return call.error(globalThis.lng.equip_1); if (!equip) return call.error(globalThis.lng.equip_1);
if (equip.wearaId == hero._id) return call.error(globalThis.lng.equip_11); if (equip.wearaId == hero._id) return call.error(globalThis.lng.equip_11);

View File

@ -1,7 +1,35 @@
import { ApiCall } from "tsrpc"; import { ApiCall } from "tsrpc";
import { ReqGame, ResGame } from "../../../shared/protocols/event/christmas/PtlGame"; import { ReqGame, ResGame } from "../../../shared/protocols/event/christmas/PtlGame";
import { HongDianChange } from "../../hongdian/fun";
import { Christmasfun } from "./fun";
import {PlayerFun} from "../../../public/player";
export default async function (call: ApiCall<ReqGame, ResGame>) { export default async function (call: ApiCall<ReqGame, ResGame>) {
// TODO let initCon = await Christmasfun.getCon(call)
call.error('API Not Implemented'); let need = initCon[call.req.hdid].data.gameneed;
let freenum = initCon[call.req.hdid].data.gamefree
let addval = initCon[call.req.hdid].data.game[call.req.index];
let _mydata = await Christmasfun.getMyData(call, call.req.hdid)
// 判断是否有免费配置
if (_mydata.gamenum >= freenum) {
// 判断消耗是否满足
await PlayerFun.checkNeedIsMeet(call, need);
// 扣除消耗
await PlayerFun.cutNeed(call, need);
}
let _setData = {}
_mydata["val"] += addval
_mydata["gamenum"] += 1
_setData["val"] = _mydata.val
_setData["gamenum"] = _mydata["gamenum"]
await Christmasfun.setMyData(call.uid, call.req.hdid, { $set: _setData})
// 监听任务
G.emit("Class_task_154", 'Class_task_154', call, 1, 0);
let changedata = { mydata: _mydata}
// 推送红点
HongDianChange.sendChangeKey(call.uid, ['huodonghd']);
call.succ(changedata);
} }

View File

@ -1,7 +1,47 @@
import { ApiCall } from "tsrpc"; import { ApiCall } from "tsrpc";
import { ReqLiBao, ResLiBao } from "../../../shared/protocols/event/christmas/PtlLiBao"; import { ReqLiBao, ResLiBao } from "../../../shared/protocols/event/christmas/PtlLiBao";
import {Christmasfun} from "./fun";
import {PlayerFun} from "../../../public/player";
import {HongDianChange} from "../../hongdian/fun";
export default async function (call: ApiCall<ReqLiBao, ResLiBao>) { export default async function (call: ApiCall<ReqLiBao, ResLiBao>) {
// TODO let initCon = await Christmasfun.getCon(call)
call.error('API Not Implemented'); let lbid = call.req.lbid;
let _con = initCon[call.req.hdid].data.libao[call.req.lbid];
if (!_con) {
// 礼包id 不存在
return call.error('', { code: -1, message: globalThis.lng.yangchengmubiao_2 })
}
if (_con.payid) {
// 判断是否能购买
return call.error('', { code: -2, message: globalThis.lng.yangchengmubiao_2 })
}
let _mydata = await Christmasfun.getMyData(call, call.req.hdid)
let _buyNum = _mydata.libao[lbid] || 0
if (_buyNum >= _con.buynum) {
// 判断是否能购买
return call.error('', { code: -3, message: globalThis.lng.yangchengmubiao_2 })
}
let _select = _mydata.select[lbid] || {}
if (Object.keys(_select).length < _con.dlz.length) {
// 判断是否选择奖励了
return call.error('', { code: -3, message: globalThis.lng.yangchengmubiao_2 })
}
let _prize: atn[] = _con.basep
for (let key in _select) {
_prize.push(_con.dlz[parseInt(key)][_select[key]])
}
let _setData = {}
_mydata.libao[lbid] = _buyNum + 1
_setData["libao"] = _mydata.libao
await Christmasfun.setMyData(call.uid, call.req.hdid, { $set: _setData })
await PlayerFun.sendPrize(call, _prize);
let changedata = { mydata: _mydata, prize: _prize}
// 推送红点
HongDianChange.sendChangeKey(call.uid, ['huodonghd']);
call.succ(changedata);
} }

View File

@ -1,7 +1,17 @@
import { ApiCall } from "tsrpc"; import { ApiCall } from "tsrpc";
import { ReqOpen, ResOpen } from "../../../shared/protocols/event/christmas/PtlOpen"; import { HuoDongFun } from "../../../public/huodongfun";
import { ReqOpen, ResOpen } from "../../../shared/protocols/event/yangchengmubiao/PtlOpen";
import { Christmasfun } from "./fun";
export default async function (call: ApiCall<ReqOpen, ResOpen>) { export default async function (call: ApiCall<ReqOpen, ResOpen>) {
// TODO let _hdinfo = await HuoDongFun.getHdidInfo(call, call.req.hdid)
call.error('API Not Implemented'); if (!_hdinfo || Object.keys(_hdinfo).length <= 0) {
} // 无此活动
return call.error('', { code: -1, message: globalThis.lng.huodong_open_1 })
}
let _mydata = await Christmasfun.getMyData(call, call.req.hdid)
let changedata = { mydata: _mydata, hdinfo: _hdinfo }
call.succ(changedata);
}

View File

@ -1,7 +1,38 @@
import { ApiCall } from "tsrpc"; import { ApiCall } from "tsrpc";
import { ReqQianDao, ResQianDao } from "../../../shared/protocols/event/christmas/PtlQianDao"; import { ReqQianDao, ResQianDao } from "../../../shared/protocols/event/christmas/PtlQianDao";
import {Christmasfun} from "./fun";
import {PublicShared} from "../../../shared/public/public";
import {PlayerFun} from "../../../public/player";
import {HongDianChange} from "../../hongdian/fun";
export default async function (call: ApiCall<ReqQianDao, ResQianDao>) { export default async function (call: ApiCall<ReqQianDao, ResQianDao>) {
// TODO let initCon = await Christmasfun.getCon(call)
call.error('API Not Implemented'); let _con = initCon[call.req.hdid].data.qiandao;
let _stime = initCon[call.req.hdid].stime
let _diff = PublicShared.getDiff(_stime)
let _mydata = await Christmasfun.getMyData(call, call.req.hdid)
// 循环判断是否有可以领取的
let _prize = []
for(let i = 0; i < _diff; i++) {
if (_mydata.qiandao.includes(i)) continue
_mydata.qiandao.push(i)
_prize = _prize.concat(_con[i])
}
if (!_prize){
// 没有奖励可以领取
return call.error('', { code: -1, message: globalThis.lng.yangchengmubiao_2 })
}
let _setData = {}
_setData["qiandao"] = _mydata.qiandao
await Christmasfun.setMyData(call.uid, call.req.hdid, { $set: _setData })
await PlayerFun.sendPrize(call, _prize);
let changedata = { mydata: _mydata, prize: _prize}
// 推送红点
HongDianChange.sendChangeKey(call.uid, ['huodonghd']);
call.succ(changedata);
} }

View File

@ -1,7 +1,39 @@
import { ApiCall } from "tsrpc"; import { ApiCall } from "tsrpc";
import { ReqSelect, ResSelect } from "../../../shared/protocols/event/christmas/PtlSelect"; import { ReqSelect, ResSelect } from "../../../shared/protocols/event/christmas/PtlSelect";
import {Christmasfun} from "./fun";
import {HongDianChange} from "../../hongdian/fun";
export default async function (call: ApiCall<ReqSelect, ResSelect>) { export default async function (call: ApiCall<ReqSelect, ResSelect>) {
// TODO let initCon = await Christmasfun.getCon(call)
call.error('API Not Implemented'); let index = call.req.index;
let pid = call.req.pid;
let lbid = call.req.lbid;
let _con = initCon[call.req.hdid].data.libao[lbid];
if (!_con) {
// 礼包id 不存在
return call.error('', { code: -1, message: globalThis.lng.yangchengmubiao_2 })
}
if (index >= _con.dlz.length){
// 礼包id 不存在
return call.error('', { code: -2, message: globalThis.lng.yangchengmubiao_2 })
}
if (index >= _con.dlz.length){
// 礼包id 不存在
return call.error('', { code: -3, message: globalThis.lng.yangchengmubiao_2 })
}
if (!_con.dlz[index][pid]){
// 礼包id 不存在
return call.error('', { code: -4, message: globalThis.lng.yangchengmubiao_2 })
}
let _mydata = await Christmasfun.getMyData(call, call.req.hdid)
let lb_select = _mydata.select[lbid] || {}
lb_select[index.toString()] = pid
_mydata.select[lbid] = lb_select
let _setData = {}
_setData["select"] = _mydata.select
await Christmasfun.setMyData(call.uid, call.req.hdid, { $set: _setData })
let changedata = { mydata: _mydata}
// 推送红点
HongDianChange.sendChangeKey(call.uid, ['huodonghd']);
call.succ(changedata);
} }

View File

@ -1,7 +1,37 @@
import { ApiCall } from "tsrpc"; import { ApiCall } from "tsrpc";
import { ReqTaskRec, ResTaskRec } from "../../../shared/protocols/event/christmas/PtlTaskRec"; import { ReqTaskRec, ResTaskRec } from "../../../shared/protocols/event/christmas/PtlTaskRec";
import {Christmasfun} from "./fun";
import {HongDianChange} from "../../hongdian/fun";
import {PlayerFun} from "../../../public/player";
export default async function (call: ApiCall<ReqTaskRec, ResTaskRec>) { export default async function (call: ApiCall<ReqTaskRec, ResTaskRec>) {
// TODO let initCon = await Christmasfun.getCon(call)
call.error('API Not Implemented'); let taskid = call.req.taskid;
let _con = initCon[call.req.hdid].data.task[taskid];
if (!_con) {
// 任务id 不存在
return call.error('', { code: -1, message: globalThis.lng.yangchengmubiao_2 })
}
let _mydata = await Christmasfun.getMyData(call, call.req.hdid)
if (_mydata.taskval[taskid] < _con.pval) {
// 任务未完成
return call.error('', { code: -2, message: globalThis.lng.yangchengmubiao_3 })
}
if (_mydata.taskfinish.includes(taskid)) {
// 任务已领取
return call.error('', { code: -3, message: globalThis.lng.yangchengmubiao_4 })
}
_mydata.taskfinish.push(taskid)
let _setData = {}
_setData["taskfinish"] = _mydata.taskfinish
await Christmasfun.setMyData(call.uid, call.req.hdid, { $set: _setData })
let _prize = _con.prize
await PlayerFun.sendPrize(call, _prize);
let changedata = { mydata: _mydata, prize: _prize}
// 推送红点
HongDianChange.sendChangeKey(call.uid, ['huodonghd']);
call.succ(changedata);
} }

View File

@ -1,7 +1,48 @@
import { ApiCall } from "tsrpc"; import { ApiCall } from "tsrpc";
import { ReqZhanLingRec, ResZhanLingRec } from "../../../shared/protocols/event/christmas/PtlZhanLingRec"; import { ReqZhanLingRec, ResZhanLingRec } from "../../../shared/protocols/event/christmas/PtlZhanLingRec";
import {Christmasfun} from "./fun";
import {PlayerFun} from "../../../public/player";
import {HongDianChange} from "../../hongdian/fun";
export default async function (call: ApiCall<ReqZhanLingRec, ResZhanLingRec>) { export default async function (call: ApiCall<ReqZhanLingRec, ResZhanLingRec>) {
// TODO let initCon = await Christmasfun.getCon(call)
call.error('API Not Implemented'); let index = call.req.index;
let _con = initCon[call.req.hdid].data.zhanling[index];
if (!_con) {
// 礼包id 不存在
return call.error('', { code: -1, message: globalThis.lng.yangchengmubiao_2 })
}
let _mydata = await Christmasfun.getMyData(call, call.req.hdid)
if (_mydata.val < _con.val) {
return call.error('', { code: -1, message: globalThis.lng.yangchengmubiao_2 })
}
let _prize = []
if (!_mydata.pt.includes(index)){
// 如果普通奖励没有领取
_prize = _prize.concat(_con.pt)
_mydata.pt.push(index)
}
if (_mydata.pay && !_mydata.gj.includes(index)){
// 如果普通奖励没有领取
_prize = _prize.concat(_con.gj)
_mydata.gj.push(index)
}
if (!_prize) {
// 没有奖励可以领取
return call.error('', { code: -1, message: globalThis.lng.yangchengmubiao_2 })
}
let _setData = {}
_setData["gj"] = _mydata.gj
_setData["pt"] = _mydata.pt
await Christmasfun.setMyData(call.uid, call.req.hdid, { $set: _setData })
await PlayerFun.sendPrize(call, _prize);
let changedata = { mydata: _mydata, prize: _prize}
// 推送红点
HongDianChange.sendChangeKey(call.uid, ['huodonghd']);
call.succ(changedata);
} }

View File

@ -0,0 +1,200 @@
import { strict } from 'assert';
import {ApiCall, BaseConnection} from 'tsrpc';
import { ReqAddHuoDong } from '../../../monopoly/protocols/PtlAddHuoDong';
import { HuoDongFun } from '../../../public/huodongfun';
import { TaskFun } from '../../../public/task';
import { christmas } from '../../../shared/protocols/event/christmas/PtlOpen';
import { PublicShared } from '../../../shared/public/public';
import {player} from '../../../shared/protocols/user/type';
import {PlayerFun} from "../../../public/player";
export class Christmasfun {
/**配置 */
static async getCon(call: ApiCall) {
let _con: { [id: string]: ReqAddHuoDong } = {}
let _hd = await HuoDongFun.gethdList(call, 8)
for (let index = 0; index < _hd.length; index++) {
const element = _hd[index];
if (element && element._id) delete element._id
_con[element.hdid] = element
}
return _con
}
/**获取所有符合时间的活动 */
static async gethdids(call: ApiCall) {
let _hdids = []
let _hd = await HuoDongFun.gethdList(call, 8)
for (let index = 0; index < _hd.length; index++) {
const element = _hd[index];
_hdids.push(element.hdid)
}
return _hdids
}
/**获取我的数据 */
static async getMyData(call: ApiCall, hdid: number) {
let db: any = await G.mongodb.cEvent(`christmas${hdid}`).findOne({ uid: call.uid, type: `christmas${hdid}`, hdid: hdid });
if (!db) {
db = await this.initData(call, hdid)
await G.mongodb.cEvent(`christmas${hdid}`).updateOne(
{ uid: call.uid, type: `christmas${hdid}`, hdid: hdid },
{ $set: db },
{ upsert: true }
)
}
let { _id, ..._myData } = db
if (!PublicShared.chkSameDate(_myData.refresh, G.time)) {
// 刷新每日任务
_myData = await this.refreTask(call, _myData, hdid)
}
return _myData
}
/**初始数据 */
static async initData(call: ApiCall, hdid: number) {
let _initCon = await this.getCon(call)
let _con = _initCon[hdid]
let _r: christmas = {
type: `christmas${hdid}`,
uid: call.uid,
hdid: hdid,
taskval: await this.getTaskVal(call, hdid),
taskfinish: [],
refresh: G.time,
gamenum: 0,
pt: [],
gj: [],
pay: false,
select:{},
val: 0,
qiandao: [],
libao:{}
}
return _r
}
/**设置数据 */
static async setMyData(uid: string, hdid: number, set: {}) {
await G.mongodb.cEvent(`christmas${hdid}`).updateOne(
{ uid: uid, type: `christmas${hdid}`, hdid: hdid },
set
)
}
/**获取所有taskid 及对应的值 */
static async getTaskVal(call: ApiCall, hdid: number) {
let _initCon = await this.getCon(call)
let _tasks = _initCon[hdid].data.task
let _res = {}
for (let index = 0; index < Object.keys(_tasks).length; index++) {
const element = Object.keys(_tasks)[index];
let _tmp = _tasks[element]
_tmp["id"] = element
// 每日登录直接完成
if (element == "1"){
_res[element] = 1
}
else{
_res[element] = 0
}
}
return _res
}
/**刷新每日任务 */
static async refreTask(call: ApiCall, mydata: christmas, hdid: number) {
let _initCon = await this.getCon(call)
let _con = _initCon[hdid].data.task
if (!_con) return mydata
mydata.taskfinish = []
mydata.taskval = await this.getTaskVal(call, hdid)
mydata.refresh = G.time
mydata.gamenum = 0
await this.setMyData(call.uid, hdid, { $set: { refresh: mydata.refresh, taskfinish: mydata.taskfinish, taskval: mydata.taskval, gamenum: mydata.gamenum} })
return mydata
}
static async payChristmas(payid, call: ApiCall) {
let _hd = await HuoDongFun.gethdList(call, 8)
for (let index = 0; index < _hd.length; index++) {
const hdinfo = _hd[index];
const _hdid = hdinfo.hdid
if (payid == hdinfo.data.zlpayid){
let _mydata = await Christmasfun.getMyData(call, _hdid)
if (_mydata.pay) continue
await this.setMyData(call.uid, _hdid, { $set: { pay: true} })
let _prize = hdinfo.data.zlpayprize
await PlayerFun.sendPrize(call, _prize);
}
else{
const libaos = hdinfo.data.libao
for (let index = 0; index < Object.keys(libaos).length; index++){
const lbid = Object.keys(libaos)[index];
let _tmp = libaos[lbid]
if (_tmp['payid'] != payid) continue
let _mydata = await Christmasfun.getMyData(call, _hdid)
let _buyNum = _mydata.libao[lbid] || 0
if (_buyNum >= _tmp["buynum"]) continue
_mydata.libao[lbid] = _buyNum + 1
this.setMyData(call.uid, _hdid, { $set: { libao: _mydata.libao} })
break
}
}
}
}
/**设置任务 */
static async setTaskVal(call: ApiCall, stype: number, val: number, chkCall: Function, chkval: number = 0, isinc: number = 0, alchangeVal: Function, arg) {
let hdids = await this.gethdids(call)
if (hdids.length <= 0) return // 活动过期,不计数
let _initCon = await this.getCon(call)
for (let index = 0; index < hdids.length; index++) {
const hdid = hdids[index];
let _mydata = await Christmasfun.getMyData(call, hdid)
let _tasks = _initCon[hdid].data.task
let _setData= {
$inc: {},
$set: {}
}
let isset = 0
for (let indextask = 0; indextask < Object.keys(_tasks).length; indextask++) {
const ele = Object.keys(_tasks)[indextask];
// 具体任务配置
let _taskCon = _tasks[ele]
if (_taskCon.stype != stype) continue
let _pval = _taskCon.pval
// 不符合任务要求
if (!(await chkCall(_taskCon["cond"], chkval, arg))) continue
// 根据需求改写
val = await alchangeVal(call, _taskCon, val, arg)
isset = 1
if (isinc == 1) { // 累加
_setData["$inc"][`taskval.${ele}`] = val
} else {
_setData["$set"][`taskval.${ele}`] = val
}
}
// 设置任务
if (isset == 1) {
await G.mongodb.collection('event').updateMany(
{ uid: call.uid, type: { $regex: "christmas" }, hdid: parseInt(hdid) },
_setData
)
}
}
}
}

View File

@ -31,7 +31,7 @@ export default async function (call: ApiCall<ReqOpen, ResOpen>) {
call.succ({ call.succ({
...ops, ...ops,
day: PublicShared.getOpenServerDay(call.conn.gud.cTime), day: PublicShared.getOpenServerDay(),
taskFinished: taskFinished taskFinished: taskFinished
}); });
} }
@ -79,7 +79,7 @@ export async function getTaskVal(gud: player, taskTyps: string[]) {
else if (t.indexOf('toDayPay') != -1) { else if (t.indexOf('toDayPay') != -1) {
let daystr = t.split('_')[1] || '1'; let daystr = t.split('_')[1] || '1';
let day = Number(daystr); let day = Number(daystr);
let zeroTime = PublicShared.getToDayZeroTime(gud.cTime); let zeroTime = PublicShared.getToDayZeroTime(G.openTime);
val[t] = await PayFun.getPayDaysAllPayNum( val[t] = await PayFun.getPayDaysAllPayNum(
gud.uid, gud.uid,
zeroTime + (day - 1) * 24 * 3600, zeroTime + day * 24 * 3600 zeroTime + (day - 1) * 24 * 3600, zeroTime + day * 24 * 3600

View File

@ -1,41 +1,42 @@
import { UpdateFilter } from 'mongodb'; import {ApiCall} from "tsrpc";
import { ApiCall } from "tsrpc"; import {ReqOpen, ResOpen} from "../../../shared/protocols/event/shiwuleichong/PtlOpen";
import { CollectionEvent } from '../../../module/collection_event'; import {PayFun} from "../../../public/pay";
import { PayFun } from '../../../public/pay'; import {PublicShared} from "../../../shared/public/public";
import { ReqOpen, ResOpen } from "../../../shared/protocols/event/shiwuleichong/PtlOpen";
import { PublicShared } from '../../../shared/public/public';
export default async function (call: ApiCall<ReqOpen, ResOpen>) { export default async function (call: ApiCall<ReqOpen, ResOpen>) {
let db = await G.mongodb.cEvent('15leichong').findOne({ uid: call.uid, type: '15leichong' }); let payids = G.gc.shiwuleichong.tasks.map(
let update: UpdateFilter<CollectionEvent<'15leichong'>>; (i) => i.payid
let sTime = PublicShared.getToDayZeroTime(G.time); );
if (!db) { let day: number = 1;
update = { let _zt = PublicShared.getToDayZeroTime();
$set: { index: 0, sTime: sTime, recIndex: [] } let pays = await PayFun.getPayLogs(call.uid, payids);
}; for (; day <= G.gc.shiwuleichong.tasks.length; day++) {
} else { let pay = pays[G.gc.shiwuleichong.tasks[day - 1].payid];
if (db.sTime + G.gc.shiwuleichong.data[db.index].time < G.time) { if (!pay || pay.length == 0) {
break
db.sTime = sTime;
db.index = G.gc.shiwuleichong.data[db.index + 1] == undefined ? db.index : db.index + 1;
db.recIndex = [];
update = {
$set: { index: db.index, sTime: db.sTime, recIndex: [] }
};
} else { } else {
sTime = db.sTime; // 如果是最后一天奖励
if (day >= G.gc.shiwuleichong.tasks.length) {
// 充值订单隔天了
if (pay.slice(-1)[0].time < _zt) {
// 重置所有订单
await PayFun.delPayLog(call.uid, ...payids.map(i => {
return {payId: i, val: []}
}))
day = 1;
pays = {};
}
break;
} else if (pay.slice(-1)[0].time >= _zt) {
break
}
} }
} }
update && G.mongodb.cEvent('15leichong').updateOne({ uid: call.uid, type: '15leichong' }, update, { upsert: true });
let index = db?.index || 0;
call.succ({ call.succ({
index: index, day: day,
sTime: sTime, payIds: Object.keys(pays).filter((i) => pays[i].length > 0)
recIndex: db?.recIndex || [],
payDay: await PayFun.getPayDaysBuyPayNum(call.uid, sTime, sTime + G.gc.shiwuleichong.data[index].time, G.gc.shiwuleichong.dayPayNeed)
}); });
} }

View File

@ -1,26 +0,0 @@
import { ApiCall } from "tsrpc";
import { PayFun } from '../../../public/pay';
import { PlayerFun } from '../../../public/player';
import { ReqRec, ResRec } from "../../../shared/protocols/event/shiwuleichong/PtlRec";
export default async function (call: ApiCall<ReqRec, ResRec>) {
let db = await G.mongodb.cEvent('15leichong').findOne({ uid: call.uid, type: '15leichong' });
let confArr = G.gc.shiwuleichong.data[db.index];
if (!confArr.tasks[call.req.index]) return call.error('', { code: -1 });
if (db.recIndex.includes(call.req.index)) return call.error('', { code: -2 });
let payDay = await PayFun.getPayDaysBuyPayNum(call.uid, db.sTime, db.sTime + confArr.time, G.gc.shiwuleichong.dayPayNeed);
if (payDay < confArr.tasks[call.req.index].total) return call.error('', { code: -3 });
await PlayerFun.sendPrize(call, confArr.tasks[call.req.index].prize);
G.mongodb.cEvent('15leichong').updateOne(
{ uid: call.uid, type: '15leichong' },
{ $push: { recIndex: call.req.index } }
);
call.succ({
prize: confArr.tasks[call.req.index].prize
});
}

View File

@ -20,7 +20,7 @@ export default async function (call: ApiCall<ReqBuyLv, ResBuyLv>) {
let change: ResBuyLv['change'] = {}; let change: ResBuyLv['change'] = {};
change.lv = data.lv + lv; change.lv = data.lv + lv;
change.exp = G.gc.zhanling.lv[change.lv]; change.exp = data.exp + 1000;
G.mongodb.cEvent('zhanling').updateOne( G.mongodb.cEvent('zhanling').updateOne(
{ uid: call.uid, type: 'zhanling' }, { uid: call.uid, type: 'zhanling' },

View File

@ -2,20 +2,46 @@ import {ApiCall} from "tsrpc";
import {GHManage} from '../../public/gonghui/manage'; import {GHManage} from '../../public/gonghui/manage';
import {ReqGetList, ResGetList} from "../../shared/protocols/gonghui/PtlGetList"; import {ReqGetList, ResGetList} from "../../shared/protocols/gonghui/PtlGetList";
async function getGongHuiZhanli(ghId:string):Promise<number>{
//如果redis里有则直接返回
let zhanliRes = await G.ioredis.get(`gongHuiZhanLi:${ghId}`);
if(zhanliRes){
return parseInt(zhanliRes);
}
let GHData = await GHManage.getGHList();
let ghs = Object.values(GHData).map(item => item.data).filter(i => !!i.players);
let fuids = R.flatten(ghs.map(i => i.players.map(j => j.uid)))
let allRoles = await G.mongodb.find('user',{uid: {$in: fuids}},['uid','power'])
let zhanlis = Object.fromEntries(allRoles.map(r => [r.uid, r.power]));
for (let gh of ghs) {
let uids = gh.players.map(p => p.uid);
let zhanli = uids.map(u => (zhanlis[u] || 0)).reduce((a, b) => a + b);
//重设redis的值有效期1小时
G.ioredis.setex(`gongHuiZhanLi:${gh._id}`,3600, zhanli);
if(gh._id == ghId){
zhanliRes = zhanli;
}
}
return parseInt(zhanliRes||"0");
}
export default async function (call: ApiCall<ReqGetList, ResGetList>) { export default async function (call: ApiCall<ReqGetList, ResGetList>) {
let arr: ResGetList['list'] = []; let arr: ResGetList['list'] = [];
let GHData = await GHManage.getGHList(); let GHData = await GHManage.getGHList();
let ghs = Object.values(GHData).map(item => item.data).filter(i => !!i.players); let ghs = Object.values(GHData).map(item => item.data).filter(i => !!i.players);
// let fuids = R.flatten(ghs.map(i => i.players.map(j => j.uid)))
let fuids = R.flatten(ghs.map(i => i.players.map(j => j.uid))) // let allRoles = await G.mongodb.find('user',{uid: {$in: fuids}},['uid','power'])
// let zhanlis = Object.fromEntries(allRoles.map(r => [r.uid, r.power]));
let allRoles = await G.mongodb.find('user',{uid: {$in: fuids}},['uid','power'])
let zhanlis = Object.fromEntries(allRoles.map(r => [r.uid, r.power]));
for (let gh of ghs) { for (let gh of ghs) {
let uids = gh.players.map(p => p.uid); //let uids = gh.players.map(p => p.uid);
let zhanli = uids.map(u => (zhanlis[u] || 0)).reduce((a, b) => a + b); //let zhanli = uids.map(u => (zhanlis[u] || 0)).reduce((a, b) => a + b);
let zhanli = await getGongHuiZhanli(gh._id);
arr.push({ arr.push({
gh: gh, gh: gh,
zhanli: zhanli zhanli: zhanli

View File

@ -39,7 +39,7 @@ export default async function (call: ApiCall<ReqChangePos, ResChangePos>) {
} }
} else if (call.req.state == 'change') { } else if (call.req.state == 'change') {
if (heroPos[call.req.pos]) { if (heroPos[call.req.pos]) {
let unLoadHero = await G.redis.get('hero', call.uid, heroPos[call.req.pos]); let unLoadHero = await HeroFun.getHero(call, heroPos[call.req.pos]);
unLoadHero && fightHeros.removeOne(id => id == unLoadHero.heroId); unLoadHero && fightHeros.removeOne(id => id == unLoadHero.heroId);
} }
if (fightHeros.includes(hero.heroId.toString())) return call.errorCode(-2); if (fightHeros.includes(hero.heroId.toString())) return call.errorCode(-2);

View File

@ -4,7 +4,7 @@ import { ReqGetList, ResGetList } from "../../shared/protocols/hero/PtlGetList";
export default async function (call: ApiCall<ReqGetList, ResGetList>) { export default async function (call: ApiCall<ReqGetList, ResGetList>) {
let list: ResGetList['list'] = {}; let list: ResGetList['list'] = {};
let kvList: k_v<RedisCollections2['hero']> = {}; //let kvList: k_v<RedisCollections2['hero']> = {};
let arrList = await G.mongodb.collection('hero').find({ uid: call.uid }).toArray(); let arrList = await G.mongodb.collection('hero').find({ uid: call.uid }).toArray();
let heroCon = G.gc.hero; let heroCon = G.gc.hero;
@ -12,7 +12,7 @@ export default async function (call: ApiCall<ReqGetList, ResGetList>) {
let maxherolv = 0; let maxherolv = 0;
arrList.forEach(v => { arrList.forEach(v => {
let d = G.mongodb.conversionIdObj(v); let d = G.mongodb.conversionIdObj(v);
kvList[G.formatRedisKey(d._id)] = d; //kvList[G.formatRedisKey(d._id)] = d;
list[d._id] = d; list[d._id] = d;
if (v.lv > maxherolv) maxherolv = v.lv; if (v.lv > maxherolv) maxherolv = v.lv;
@ -23,7 +23,7 @@ export default async function (call: ApiCall<ReqGetList, ResGetList>) {
await G.mongodb.collection('playerInfo', 'usertasklog').updateOne({ uid: call.conn.uid, type: 'usertasklog' }, await G.mongodb.collection('playerInfo', 'usertasklog').updateOne({ uid: call.conn.uid, type: 'usertasklog' },
{ $set: { maxherolv: maxherolv, herocolor: color } }, { upsert: true }); { $set: { maxherolv: maxherolv, herocolor: color } }, { upsert: true });
G.redis.set('hero', call.uid, kvList); //G.redis.set('hero', call.uid, kvList);
let recLshd = await G.mongodb.collection('playerInfo', 'lshd_hero').findOne({ uid: call.conn.uid, type: 'lshd_hero' }); let recLshd = await G.mongodb.collection('playerInfo', 'lshd_hero').findOne({ uid: call.conn.uid, type: 'lshd_hero' });
let { uid, _id, type, ...heros } = (recLshd || {}); let { uid, _id, type, ...heros } = (recLshd || {});

View File

@ -39,7 +39,7 @@ export default async function (call: ApiCall<ReqJinJie, ResJinJie, ServiceType>)
let selectHeros: ResGetList['list'][''][] = []; let selectHeros: ResGetList['list'][''][] = [];
for (let _id of call.req.idArr) { for (let _id of call.req.idArr) {
let _hero = await G.redis.get('hero', call.uid, _id); let _hero = await HeroFun.getHero(call, _id);
if (!_hero) return call.error(globalThis.lng.hero_1); if (!_hero) return call.error(globalThis.lng.hero_1);
selectHeros.push(_hero); selectHeros.push(_hero);
} }

View File

@ -11,10 +11,10 @@ import {WangZheRongYaofun} from "../../public/wzry";
import {XstaskFun} from "../../public/xstask"; import {XstaskFun} from "../../public/xstask";
import {ReqGet, ResGet, hongdianKey} from "../../shared/protocols/hongdian/PtlGet"; import {ReqGet, ResGet, hongdianKey} from "../../shared/protocols/hongdian/PtlGet";
import {PublicShared} from '../../shared/public/public'; import {PublicShared} from '../../shared/public/public';
import {getShouChongRedPoint} from '../event/shouchong/ApiReceive';
import {md_redPoint} from '../gongyu/mingdao/ApiOpen'; import {md_redPoint} from '../gongyu/mingdao/ApiOpen';
import {HongDianFun, HuoDongHongDianFun} from "./fun"; import {HongDianFun, HuoDongHongDianFun} from "./fun";
import {FunWeiXiuChang} from "../../public/weixiuchang"; import {FunWeiXiuChang} from "../../public/weixiuchang";
import {getShouChongRedPoint} from "../event/shouchong/ApiReceive";
const defaultKeys: hongdianKey[] = ['jiuba', 'jiaotang', 'shouchong', 'clslhd', 'dixiaqianzhuanghd', 'gonghuihd', 'hbzbhd', 'jjchd', 'taskhd', const defaultKeys: hongdianKey[] = ['jiuba', 'jiaotang', 'shouchong', 'clslhd', 'dixiaqianzhuanghd', 'gonghuihd', 'hbzbhd', 'jjchd', 'taskhd',
'xstaskhd', 'lingzhulaixihd', 'dxlthd', 'wzcjhd', 'slzdhd', 'qjzzdhd', 'kuangdonghd', 'qiandaohd', 'kaifukuanghuanhd', 'jijinhd', 'zhuishalinghd', 'xstaskhd', 'lingzhulaixihd', 'dxlthd', 'wzcjhd', 'slzdhd', 'qjzzdhd', 'kuangdonghd', 'qiandaohd', 'kaifukuanghuanhd', 'jijinhd', 'zhuishalinghd',

View File

@ -20,6 +20,7 @@ import {PlayerFun} from "../../public/player";
import kfjsFun from "../../public/kaifujingsai"; import kfjsFun from "../../public/kaifujingsai";
import {RankKfjs} from "../../public/rank/rank_kfjs"; import {RankKfjs} from "../../public/rank/rank_kfjs";
import {ShopFun} from "../../public/shop"; import {ShopFun} from "../../public/shop";
import {Christmasfun} from '../event/christmas/fun';
export class HongDianFun { export class HongDianFun {
/**黑榜争霸红点 */ /**黑榜争霸红点 */
@ -689,6 +690,68 @@ export class HuoDongHongDianFun {
return _res; return _res;
} }
/**圣诞节活动红点 */
static async christmasHongDian(call: ApiCall, hdCon: ReqAddHuoDong) {
let _res: hongdianVal = {
show: false,
};
let _hdCon = hdCon.data;
let stime = hdCon.stime
let _mydata = await Christmasfun.getMyData(call, hdCon.hdid);
let _tasks = hdCon.data.task; // 所有任务 taskid 为key
for (let indextask = 0; indextask < Object.keys(_tasks).length; indextask++) {
const elementtask = Object.keys(_tasks)[indextask];
let _tmp = _tasks[elementtask];
if (_tmp.pval <= (_mydata.taskval[elementtask] || 0) && !_mydata.taskfinsih.includes(elementtask)) {
// 任务完成且没有领取
_res.show = true;
return _res;
}
}
let libaos = _hdCon.libao
for (let indexlibao = 0; indexlibao < Object.keys(libaos).length; indexlibao++) {
const elementlibao = Object.keys(libaos)[indexlibao];
let _tmp = _tasks[elementlibao];
if (_tmp.payid) continue
let _buyNum = _mydata.libao[elementlibao] || 0
if (_buyNum < _tmp.buynum) {
_res.show = true;
return _res;
}
}
let _diff = PublicShared.getDiff(stime)
// 循环判断是否有可以领取的
for (let i = 0; i < _diff; i++) {
if (_mydata.qiandao.includes(i)) continue
_res.show = true;
return _res;
}
let need = _hdCon.gameneed;
// 判断消耗是否满足
let meet = await PlayerFun.checkNeedIsMeet(call, need, false);
if (meet.isOk == true) {
_res.show = true;
return _res;
}
let zhanling = _hdCon.zhanling
for (let indexzhanling = 0; indexzhanling < zhanling.length; indexzhanling++) {
if (!_mydata.pt.includes(indexzhanling)) {
_res.show = true;
return _res;
}
if (_mydata.pay && !_mydata.gj.includes(indexzhanling)) {
_res.show = true;
return _res;
}
}
return _res;
}
/**养成目标红点 */ /**养成目标红点 */
static async yangchengmubiaoHongDian(call: ApiCall, hdCon: ReqAddHuoDong) { static async yangchengmubiaoHongDian(call: ApiCall, hdCon: ReqAddHuoDong) {
let _res: hongdianVal = { let _res: hongdianVal = {
@ -814,7 +877,7 @@ export class HuoDongHongDianFun {
} }
}; };
_res.val.meirijingxuan = await this.heiShiHongDian(call) _res.val.meirijingxuan = await this.heiShiHongDian(call)
_res.val.jitianhaoli = await this.heiShiLCHongDian(call) // _res.val.jitianhaoli = await this.heiShiLCHongDian(call)
_res.val.niudanji = await this.heiShiNiuDanJi(call) _res.val.niudanji = await this.heiShiNiuDanJi(call)
Object.values(_res.val).forEach(x => _res.show = _res.show || x.show) Object.values(_res.val).forEach(x => _res.show = _res.show || x.show)
return _res return _res
@ -850,25 +913,25 @@ export class HuoDongHongDianFun {
} }
/**黑市 积天豪礼 */ /**黑市 积天豪礼 */
static async heiShiLCHongDian(call: ApiCall): Promise<hongdianVal> { // static async heiShiLCHongDian(call: ApiCall): Promise<hongdianVal> {
let _res: hongdianVal = { // let _res: hongdianVal = {
show: false // show: false
}; // };
let db = await G.mongodb.cEvent('15leichong').findOne({uid: call.uid, type: '15leichong'}); // let db = await G.mongodb.cEvent('15leichong').findOne({uid: call.uid, type: '15leichong'});
//
if (!db) return _res; // if (!db) return _res;
//
let _con = G.gc.shiwuleichong.data[db.index]; // let _con = G.gc.shiwuleichong.data[db.index];
let payDay = await PayFun.getPayDaysBuyPayNum(call.uid, db.sTime, db.sTime + _con.time, G.gc.shiwuleichong.dayPayNeed); // let payDay = await PayFun.getPayDaysBuyPayNum(call.uid, db.sTime, db.sTime + _con.time, G.gc.shiwuleichong.dayPayNeed);
for (let index = 0; index < _con.tasks.length; index++) { // for (let index = 0; index < _con.tasks.length; index++) {
const element = _con.tasks[index]; // const element = _con.tasks[index];
if (db.recIndex.includes(index)) continue; // if (db.recIndex.includes(index)) continue;
if (payDay < element.total) continue; // if (payDay < element.total) continue;
_res.show = true; // _res.show = true;
break; // break;
} // }
return _res; // return _res;
} // }
/**黑市 扭蛋机 */ /**黑市 扭蛋机 */
static async heiShiNiuDanJi(call: ApiCall): Promise<hongdianVal> { static async heiShiNiuDanJi(call: ApiCall): Promise<hongdianVal> {

View File

@ -5,9 +5,16 @@ import {ReqYanShi, ResYanShi} from "../../shared/protocols/kuangdong/PtlYanShi";
export default async function (call: ApiCall<ReqYanShi, ResYanShi>) { export default async function (call: ApiCall<ReqYanShi, ResYanShi>) {
let hdid = call.req.hdid let hdid = call.req.hdid
let kdInfo = await KuangDongfun.getKaiCaiInfo(hdid) let con = await KuangDongfun.getCon(hdid)
if (!kdInfo) { let kdInfo
if (con.public_map == 1){
kdInfo = await KuangDongfun.getKaiCaiInfo(hdid)
}else {
kdInfo = await KuangDongfun.getKaiCaiInfo(hdid, call.uid)
}
if (!kdInfo || !con) {
return call.error('', {code: -1, message: globalThis.lng.kudangdong_1}) return call.error('', {code: -1, message: globalThis.lng.kudangdong_1})
} }
@ -30,12 +37,15 @@ export default async function (call: ApiCall<ReqYanShi, ResYanShi>) {
_need && await PlayerFun.cutNeed(call, _need); _need && await PlayerFun.cutNeed(call, _need);
kdInfo.yanshi = 8 * 3600 kdInfo.yanshi = 8 * 3600
if (!kdInfo.ctime) kdInfo.ctime = G.time
if (!kdInfo.etime) kdInfo.etime = G.time
if (!kdInfo.kdtype) kdInfo.kdtype = con.type
// 如果调用这个方法会upsert在没有查到数据的情况下 // 如果调用这个方法会upsert在没有查到数据的情况下
// 会插入空数据,全服玩家的查询列表接口都会报错 // 会插入空数据,全服玩家的查询列表接口都会报错
// await KuangDongfun.setminingZhanLing(call.uid, hdid, { $set: { yanshi: kdInfo.yanshi } }) // await KuangDongfun.setminingZhanLing(call.uid, hdid, { $set: { yanshi: kdInfo.yanshi } })
await G.mongodb.collection('kuangdong').updateOne({uid: call.uid, hdid: hdid}, await G.mongodb.collection('kuangdong').updateOne({uid: call.uid, hdid: hdid},
{$set: {yanshi: kdInfo.yanshi}}); {$set: kdInfo});
kdInfo._id = kdInfo._id.toString() kdInfo._id = kdInfo._id.toString()
let changeData = { let changeData = {

View File

@ -1,7 +0,0 @@
import { ApiCall } from "tsrpc";
import { ReqOpen, ResOpen } from "../../shared/protocols/pushgift/PtlOpen";
export default async function (call: ApiCall<ReqOpen, ResOpen>) {
// TODO
call.error('API Not Implemented');
}

View File

@ -42,6 +42,12 @@ export default async function (call: ApiCall<ReqAllFinsh, ResAllFinsh>) {
// 设置数据 // 设置数据
await TaskFun.setTask(call.uid, { type: _type, taskid: { $in: _finishTaks } }, { finish: 1 }) await TaskFun.setTask(call.uid, { type: _type, taskid: { $in: _finishTaks } }, { finish: 1 })
let prize = await PlayerFun.sendPrize(call, _prize) let prize = await PlayerFun.sendPrize(call, _prize)
// 是否是每日任务奖励最终宝箱
if (_type == 4 && 25 in _finishTaks){
// 监听任务
G.emit("Class_task_155", 'Class_task_155', call, 1, 0);
}
let data = { let data = {
finishtask: _finishTaks, finishtask: _finishTaks,

View File

@ -44,6 +44,11 @@ export default async function (call: ApiCall<ReqFinsh, ResFinsh>) {
} }
// 设置数据 // 设置数据
await TaskFun.setTask(call.uid, {taskid: taskid}, {finish: 1}) await TaskFun.setTask(call.uid, {taskid: taskid}, {finish: 1})
// 是否是每日任务奖励最终宝箱
if (_task["type"] == 4 && 25 == taskid){
// 监听任务
G.emit("Class_task_155", 'Class_task_155', call, 1, 0);
}
let _prize = await PlayerFun.sendPrize(call, _con["prize"]) let _prize = await PlayerFun.sendPrize(call, _con["prize"])
_task["finish"] = 1 _task["finish"] = 1

View File

@ -9,7 +9,10 @@ async function connGameLogDB() {
}else{ }else{
logDBUrl = "mongodb://root:lyMaple525458@10.0.1.20:27017/heijiao_gamelog?authSource=admin"; logDBUrl = "mongodb://root:lyMaple525458@10.0.1.20:27017/heijiao_gamelog?authSource=admin";
} }
let client = await MongoClient.connect(logDBUrl,{maxPoolSize:10}); let client = await MongoClient.connect(logDBUrl,{
maxPoolSize:10,
maxIdleTimeMS: 5*60*1000
});
logDB = client.db(`gameLog${G.config.serverId}`); logDB = client.db(`gameLog${G.config.serverId}`);
return logDB; return logDB;
} }

View File

@ -16,6 +16,7 @@ import { player } from './shared/protocols/user/type';
import { PublicShared } from './shared/public/public'; import { PublicShared } from './shared/public/public';
import { setGud } from './public/gud'; import { setGud } from './public/gud';
import {checkResetBuyLog} from "./api_s2c/event/zhoumolibao/ApiOpen"; import {checkResetBuyLog} from "./api_s2c/event/zhoumolibao/ApiOpen";
import {Christmasfun} from "./api_s2c/event/christmas/fun";
export type gEventType = { export type gEventType = {
/**玩家断开连接 */ /**玩家断开连接 */
@ -23,7 +24,7 @@ export type gEventType = {
/**玩家修改名字 */ /**玩家修改名字 */
PLAYER_CHANGE_NAME: (gud: player, name: string) => void; PLAYER_CHANGE_NAME: (gud: player, name: string) => void;
/**玩家充值 */ /**玩家充值 */
PLAYER_PAY: (gud: player, payId: string, type: 'user' | 'system') => void; PLAYER_PAY: (gud: player, payId: string, type: 'user' | 'system', call) => void;
/**玩家发生api调用 */ /**玩家发生api调用 */
API_CALL: (node: { call: ApiCall, return: ApiReturn<any>; }) => void; API_CALL: (node: { call: ApiCall, return: ApiReturn<any>; }) => void;
/**玩家每日首次登陆 */ /**玩家每日首次登陆 */
@ -138,6 +139,10 @@ export type gEventType = {
Class_task_152: (eventname, call, val, chkVal) => void; Class_task_152: (eventname, call, val, chkVal) => void;
/**合成x次装备 */ /**合成x次装备 */
Class_task_153: (eventname, call, val, chkVal) => void; Class_task_153: (eventname, call, val, chkVal) => void;
/**参与圣诞活动小游戏 */
Class_task_154: (eventname, call, val, chkVal) => void;
/**每日任务宝箱领取 */
Class_task_155: (eventname, call, val, chkVal) => void;
}; };
export function addListener() { export function addListener() {
@ -166,13 +171,14 @@ export function addListener() {
} }
}); });
G.on('PLAYER_PAY', async (player, payId, payArgs) => { G.on('PLAYER_PAY', async (player, payId, payArgs,call) => {
let conf: any = await PayFun.getConf(payId, payArgs); let conf: any = await PayFun.getConf(payId, payArgs);
ActionLog.addDayLog(player.uid, { key: 'pay', val: conf.payExp[0].n }); ActionLog.addDayLog(player.uid, { key: 'pay', val: conf.payExp[0].n });
ActionLog.addRetainLog(player.uid, { key: 'pay', val: conf.payExp[0].n }); ActionLog.addRetainLog(player.uid, { key: 'pay', val: conf.payExp[0].n });
if (payId == G.gc.zhanling.payId) payZhanLing(player); if (payId == G.gc.zhanling.payId) payZhanLing(player);
//圣诞节活动充值
Christmasfun.payChristmas(payId, call);
let payEmailConf = G.gc.payEmail[payId] as _gcType['payEmail']['caifutequan']; let payEmailConf = G.gc.payEmail[payId] as _gcType['payEmail']['caifutequan'];
if (payEmailConf?.length > 0) { if (payEmailConf?.length > 0) {
let sendEmailConfs = payEmailConf; let sendEmailConfs = payEmailConf;
@ -202,18 +208,17 @@ export function addListener() {
ActionLog.addRetainLog(gud.uid, { key: 'login_day', val: 1 }); ActionLog.addRetainLog(gud.uid, { key: 'login_day', val: 1 });
ZhanLingTasks.clearLog(gud.uid, 'day'); ZhanLingTasks.clearLog(gud.uid, 'day');
PayFun.checkGiftDayEmail(gud, lastTime, curTime); PayFun.checkGiftDayEmail(gud, lastTime, curTime);
reissuePrize(gud, lastTime, curTime); reissuePrize(gud, lastTime, curTime);
addDay(gud); addDay(gud);
// 任务累计登录天数 // 任务累计登录天数
let call = PayFun.getCall(gud); let call = PayFun.getCall(gud);
G.emit("Class_task_135", 'Class_task_135', call, 1, 0); G.emit("Class_task_135", 'Class_task_135', call, 1, 0);
// 七日登录活动计数 // 七日登录活动计数
qiRiDengLuAddDay(call); qiRiDengLuAddDay(call);
// 周末礼包检测刷新 // 周末礼包检测刷新
checkResetBuyLog(call) checkResetBuyLog(call);
}); });
G.on('API_CALL', node => { G.on('API_CALL', node => {

View File

@ -108,5 +108,25 @@
"sicon": "icon_heroBox_11", "sicon": "icon_heroBox_11",
"describe": "tlsd_guess_prize_3", "describe": "tlsd_guess_prize_3",
"advancedEffects": "ani_xiangzikuang" "advancedEffects": "ani_xiangzikuang"
},
"shengdanExp": {
"id": "shengdanExp",
"name": "intr_attr_name_13",
"undefined": "圣诞战令经验",
"colour": 5,
"icon": "icon_shengdanExp",
"sicon": "icon_shengdanExp",
"describe": "intr_attr_describe_13",
"advancedEffects": "ani_xiangzikuang"
},
"shengdanBullet": {
"id": "shengdanBullet",
"name": "intr_attr_name_14",
"undefined": "圣诞子弹",
"colour": 5,
"icon": "icon_zuanshi",
"sicon": "icon_zuanshi",
"describe": "intr_attr_describe_14",
"advancedEffects": "ani_xiangzikuang"
} }
} }

View File

@ -154,7 +154,7 @@
}, },
"jiubabaodi": { "jiubabaodi": {
"numbd": { "numbd": {
"50": [10011], "30": [10011],
"250": [10012], "250": [10012],
"550": [10011], "550": [10011],
"1000": [10011], "1000": [10011],

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,62 @@
{
"1": {
"id": 1,
"jieji": 0,
"ewai_buff": 0
},
"2": {
"id": 2,
"jieji": 1,
"ewai_buff": 0
},
"3": {
"id": 3,
"jieji": 2,
"ewai_buff": 0
},
"4": {
"id": 4,
"jieji": 3,
"ewai_buff": 0
},
"5": {
"id": 5,
"jieji": 4,
"ewai_buff": 40
},
"6": {
"id": 6,
"jieji": 5,
"ewai_buff": 50
},
"7": {
"id": 7,
"jieji": 6,
"ewai_buff": 60
},
"8": {
"id": 8,
"jieji": 7,
"ewai_buff": 80
},
"9": {
"id": 9,
"jieji": 8,
"ewai_buff": 100
},
"10": {
"id": 10,
"jieji": 9,
"ewai_buff": 120
},
"11": {
"id": 11,
"jieji": 10,
"ewai_buff": 140
},
"12": {
"id": 12,
"jieji": 11,
"ewai_buff": 180
}
}

View File

@ -7,15 +7,15 @@
{ {
total: 2, total: 2,
gudKey: 'loginDays', gudKey: 'loginDays',
prize: [{a: 'hero', t: '4013', n: 1}] prize: [{a: 'hero', t: '4004', n: 1}]
}, },
{ {
total: 1, total: 1,
gudKey: 'payExp', gudKey: 'payExp',
prize: [{a: 'hero', t: '4005', n: 1}] prize: [{a: 'item', t: '4', n: 10}]
}, },
{ {
total: 1, total: 1,
prize: [{a: 'hero', t: '4002', n: 1}] prize: [{a: 'hero', t: '4012', n: 1}]
} }
] ]

View File

@ -2464,12 +2464,12 @@
'cond': [], 'cond': [],
'stype': 118 'stype': 118
}, },
'2004': { '2004': {
'prize': [{'a': 'item', 't': '4', 'n': 10}, {'a': 'item', 't': '600', 'n': 20}], 'prize': [{'a': 'item', 't': '4', 'n': 10}, {'a': 'item', 't': '600', 'n': 20}],
'tujing': '', 'tujing': '',
'title': 'intr_yczm_day_des_2', 'title': 'intr_yczm_day_des_2',
'type': 2, 'type': 2,
'pval': 300, 'pval': 250,
'cond': [], 'cond': [],
'stype': 118 'stype': 118
}, },
@ -2478,12 +2478,21 @@
'tujing': '', 'tujing': '',
'title': 'intr_yczm_day_des_2', 'title': 'intr_yczm_day_des_2',
'type': 2, 'type': 2,
'pval': 400, 'pval': 300,
'cond': [], 'cond': [],
'stype': 118 'stype': 118
}, },
'2006': { '2006': {
'prize': [{'a': 'item', 't': '4', 'n': 10}, {'a': 'item', 't': '600', 'n': 40}], 'prize': [{'a': 'item', 't': '4', 'n': 10}, {'a': 'item', 't': '619', 'n': 1}],
'tujing': '',
'title': 'intr_yczm_day_des_2',
'type': 2,
'pval': 400,
'cond': [],
'stype': 118
},
'2007': {
'prize': [{'a': 'item', 't': '4', 'n': 10}, {'a': 'item', 't': '619', 'n': 1}],
'tujing': '', 'tujing': '',
'title': 'intr_yczm_day_des_2', 'title': 'intr_yczm_day_des_2',
'type': 2, 'type': 2,
@ -2608,7 +2617,7 @@
'tujing': '', 'tujing': '',
'title': 'intr_yczm_day_des_2', 'title': 'intr_yczm_day_des_2',
'type': 2, 'type': 2,
'pval': 300, 'pval': 250,
'cond': [], 'cond': [],
'stype': 118 'stype': 118
}, },
@ -2617,12 +2626,21 @@
'tujing': '', 'tujing': '',
'title': 'intr_yczm_day_des_2', 'title': 'intr_yczm_day_des_2',
'type': 2, 'type': 2,
'pval': 400, 'pval': 300,
'cond': [], 'cond': [],
'stype': 118 'stype': 118
}, },
'2006': { '2006': {
'prize': [{'a': 'item', 't': '4', 'n': 10}, {'a': 'item', 't': '600', 'n': 40}], 'prize': [{'a': 'item', 't': '4', 'n': 10}, {'a': 'item', 't': '619', 'n': 1}],
'tujing': '',
'title': 'intr_yczm_day_des_2',
'type': 2,
'pval': 400,
'cond': [],
'stype': 118
},
'2007': {
'prize': [{'a': 'item', 't': '4', 'n': 10}, {'a': 'item', 't': '619', 'n': 1}],
'tujing': '', 'tujing': '',
'title': 'intr_yczm_day_des_2', 'title': 'intr_yczm_day_des_2',
'type': 2, 'type': 2,
@ -3276,6 +3294,481 @@
} }
}, },
{ {
"hdid" : 8000, // 唯一活动id 圣诞活动
"htype" : 8,
"stype" : 800,
"ttype" : 4, // 0 按照开服时间计算1 玩家注册时间计算 4 屏蔽此活动
"stime" : 60,
"rtime" : 90,
"etime" : 90,
"name" : "sdhd_tips_1",
"icon" : "icon_xfdj",
"showtime" : "根据玩家注册时间,游戏返回时复写",
"data" : {
//任务
"task" : {
"1": {
"pval" : 1,
"stype" : "128",
"cond": [],
"prize" : [
{
"a" : "attr",
"t" : "shengdanExp",
"n" : 100
},
{
"a" : "attr",
"t" : "shengdanBullet",
"n" : 2
},
{
"a" : "attr",
"t" : "rmbmoney",
"n" : 200
},
{
"a" : "item",
"t" : "1",
"n" : 100000
}
],
"des" : "intr_cszl_des_1"
},
"2": {
"pval" : 300,
"stype" : "116",
"cond": [],
"prize" : [
{
"a" : "attr",
"t" : "shengdanExp",
"n" : 200
},
{
"a" : "attr",
"t" : "shengdanBullet",
"n" : 3
},
{
"a" : "item",
"t" : "600",
"n" : 5
},
{
"a" : "item",
"t" : "1",
"n" : 500000
}
],
"des" : "intr_cszl_des_2"
},
"3": {
"pval" : 1000,
"stype" : "116",
"cond": [],
"prize" : [
{
"a" : "attr",
"t" : "shengdanExp",
"n" : 300
},
{
"a" : "attr",
"t" : "shengdanBullet",
"n" : 5
},
{
"a" : "item",
"t" : "600",
"n" : 10
},
{
"a" : "item",
"t" : "1",
"n" : 1000000
}
],
"des" : "intr_cszl_des_3"
},
"4": {
"pval" : 2000,
"stype" : "116",
"cond": [],
"prize" : [
{
"a" : "attr",
"t" : "shengdanExp",
"n" : 150
},
{
"a" : "attr",
"t" : "shengdanBullet",
"n" : 2
},
{
"a" : "item",
"t" : "6",
"n" : 10
},
{
"a" : "item",
"t" : "1",
"n" : 200000
}
],
"des" : "intr_cszl_des_4"
},
"5": {
"pval" : 3,
"stype" : "142",
"cond": [2],
"prize" : [
{
"a" : "attr",
"t" : "shengdanExp",
"n" : 100
},
{
"a" : "attr",
"t" : "shengdanBullet",
"n" : 2
},
{
"a" : "item",
"t" : "2",
"n" : 500
},
{
"a" : "item",
"t" : "1",
"n" : 200000
}
],
"des" : "intr_cszl_des_5"
},
"6": {
"pval" : 3,
"stype" : "122",
"cond": [],
"prize" : [
{
"a" : "attr",
"t" : "shengdanExp",
"n" : 200
},
{
"a" : "attr",
"t" : "shengdanBullet",
"n" : 2
},
{
"a" : "item",
"t" : "12",
"n" : 400
},
{
"a" : "item",
"t" : "1",
"n" : 200000
}
],
"des" : "intr_cszl_des_6"
},
"7": {
"pval" : 1,
"stype" : "155",
"cond": [],
"prize" : [
{
"a" : "attr",
"t" : "shengdanExp",
"n" : 100
},
{
"a" : "attr",
"t" : "shengdanBullet",
"n" : 2
},
{
"a" : "attr",
"t" : "rmbmoney",
"n" : 200
},
{
"a" : "item",
"t" : "1",
"n" : 100000
}
],
"des" : "intr_cszl_des_7"
},
"8": {
"pval" : 1,
"stype" : "127",
"cond": [],
"prize" : [
{
"a" : "attr",
"t" : "shengdanExp",
"n" : 100
},
{
"a" : "attr",
"t" : "shengdanBullet",
"n" : 2
},
{
"a" : "item",
"t" : "21",
"n" : 50
},
{
"a" : "item",
"t" : "1",
"n" : 100000
}
],
"des" : "intr_cszl_des_8"
},
"9": {
"pval" : 1,
"stype" : "154",
"cond": [],
"prize" : [
{
"a" : "attr",
"t" : "shengdanExp",
"n" : 100
},
{
"a" : "attr",
"t" : "shengdanBullet",
"n" : 2
},
{
"a" : "attr",
"t" : "jinbi",
"n" : 100000
},
{
"a" : "item",
"t" : "1",
"n" : 100000
}
],
"des" : "intr_cszl_des_9"
},
},
//玩游戏需要消耗
"gameneed": [{"a": "attr", "t":"shengdanBullet", "n": 1}],
//玩游戏拿分
"game": [5,10,20,30,50],
//免费玩游戏次数
"gamefree": 3,
//战令
"zhanling":[
{
"val": 2500,
"pt": [{"a": "item", "t":"1", "n": 200000}],
"gj": [{"a": "item", "t":"50009", "n": 1},{"a": "item", "t":"1", "n": 500000}]
},
{
"val": 5000,
"pt": [{"a": "attr", "t":"rmbmoney", "n": 500}],
"gj": [{"a": "item", "t":"23", "n": 2000},{"a": "item", "t":"1", "n": 500000}]
},
{
"val": 7500,
"pt": [{"a": "item", "t":"50104", "n": 1}],
"gj": [{"a": "item", "t":"9", "n": 100},{"a": "item", "t":"10", "n": 800}]
},
{
"val": 10000,
"pt": [{"a": "item", "t":"4", "n": 10}],
"gj": [{"a": "item", "t":"28", "n": 5000},{"a": "item", "t":"605", "n": 2}]
},
{
"val": 12500,
"pt": [{"a": "item", "t":"2", "n": 500}],
"gj": [{"a": "item", "t":"9", "n": 150},{"a": "item", "t":"10", "n": 1500}]
},
{
"val": 15000,
"pt": [{"a": "item", "t":"600", "n": 10}],
"gj": [{"a": "item", "t":"605", "n": 2},{"a": "item", "t":"28", "n": 10000}]
},
{
"val": 17500,
"pt": [{"a": "item", "t":"600", "n": 10}],
"gj": [{"a": "item", "t":"605", "n": 2},{"a": "item", "t":"28", "n": 20000}]
},
{
"val": 20000,
"pt": [{"a": "item", "t":"10", "n": 800}],
"gj": [{"a": "item", "t":"600", "n": 20},{"a": "item", "t":"28", "n": 20000}]
},
{
"val": 22500,
"pt": [{"a": "attr", "t":"rmbmoney", "n": 2000}],
"gj": [{"a": "item", "t":"600", "n": 20},{"a": "item", "t":"28", "n": 20000}]
}
],
"zlpayid":"ycmb_1_1",
//活动礼包
"libao": {
"1": {
"payid": "",
"buynum": 1,
"basep": [{"a": "attr", "t":"rmbmoney", "n": 100}],
"des" : "intr_cszl_des_10",
"dlz": [
{
"1": {"a": "attr", "t":"jinbi", "n": 100000},
"2": {"a": "item", "t":"1", "n": 50000}
}
]
},
"2": {
"payid": "pay_name_sdhd_libao_2",
"buynum": 2,
"basep": [{"a": "attr", "t":"rmbmoney", "n": 120}],
"des" : "intr_cszl_des_11",
"dlz": [
{
"1": {"a": "item", "t":"2", "n": 400},
"2": {"a": "item", "t":"12", "n": 200}
},
{
"1": {"a": "attr", "t":"jinbi", "n": 1000000},
"2": {"a": "item", "t":"1", "n": 500000}
}
]
},
"3": {
"payid": "pay_name_sdhd_libao_3",
"buynum": 2,
"basep": [{"a": "attr", "t":"rmbmoney", "n": 300}],
"des" : "intr_cszl_des_12",
"dlz": [
{
"1": {"a": "item", "t":"9", "n": 500},
"2": {"a": "item", "t":"10", "n": 100}
},
{
"1": {"a": "item", "t":"9", "n": 500},
"2": {"a": "item", "t":"10", "n": 100}
},
{
"1": {"a": "item", "t":"9", "n": 500},
"2": {"a": "item", "t":"10", "n": 100}
}
]
},
"4": {
"payid": "pay_name_sdhd_libao_4",
"buynum": 5,
"basep": [{"a": "attr", "t":"rmbmoney", "n": 680}],
"des" : "intr_cszl_des_12",
"dlz": [
{
"1": {"a": "item", "t":"615", "n": 1},
"2": {"a": "item", "t":"18", "n": 200}
},
{
"1": {"a": "item", "t":"615", "n": 1},
"2": {"a": "item", "t":"18", "n": 200}
},
{
"1": {"a": "item", "t":"615", "n": 1},
"2": {"a": "item", "t":"18", "n": 200}
}
]
},
"5": {
"payid": "pay_name_sdhd_libao_5",
"buynum": 9,
"basep": [{"a": "attr", "t":"rmbmoney", "n": 1280}],
"des" : "intr_cszl_des_13",
"dlz": [
{
"1": {"a": "item", "t":"600", "n": 10},
"2": {"a": "item", "t":"605", "n": 2},
"3": {"a": "item", "t":"606", "n": 1}
},
{
"1": {"a": "item", "t":"600", "n": 10},
"2": {"a": "item", "t":"605", "n": 2},
"3": {"a": "item", "t":"606", "n": 1}
},
{
"1": {"a": "item", "t":"1", "n": 5000000},
"2": {"a": "attr", "t":"jinbi", "n": 10000000}
}
]
},
"6": {
"payid": "pay_name_sdhd_libao_6",
"buynum": 9,
"basep": [{"a": "attr", "t":"rmbmoney", "n": 3280}],
"des" : "intr_cszl_des_14",
"dlz": [
{
"1": {"a": "item", "t":"600", "n": 20},
"2": {"a": "item", "t":"5002", "n": 10},
"3": {"a": "item", "t":"5004", "n": 10}
},
{
"1": {"a": "item", "t":"600", "n": 20},
"2": {"a": "item", "t":"5002", "n": 10},
"3": {"a": "item", "t":"5004", "n": 10}
},
{
"1": {"a": "item", "t":"1", "n": 10000000},
"2": {"a": "item", "t":"12", "n": 1000},
"3": {"a": "item", "t":"2", "n": 2000},
"4": {"a": "item", "t":"18", "n": 500}
}
]
},
"7": {
"payid": "pay_name_sdhd_libao_7",
"buynum": 9,
"basep": [{"a": "attr", "t":"rmbmoney", "n": 6480}],
"des" : "intr_cszl_des_14",
"dlz": [
{
"1": {"a": "item", "t":"600", "n": 30},
"2": {"a": "item", "t":"5002", "n": 20},
"3": {"a": "item", "t":"5004", "n": 20}
},
{
"1": {"a": "item", "t":"600", "n": 30},
"2": {"a": "item", "t":"5002", "n": 20},
"3": {"a": "item", "t":"5004", "n": 20}
},
{
"1": {"a": "item", "t":"605", "n": 4},
"2": {"a": "item", "t":"606", "n": 2},
"3": {"a": "item", "t":"18", "n": 1000},
"4": {"a": "item", "t":"23", "n": 1000000}
}
]
},
},
//签到奖励
"qiandao": [
[{"a": "attr", "t":"shengdanExp", "n": 100},{"a": "attr", "t":"shengdanBullet", "n": 1},{"a": "item", "t":"4", "n": 10},{"a": "item", "t":"1", "n": 300000}],
[{"a": "attr", "t":"shengdanExp", "n": 100},{"a": "attr", "t":"shengdanBullet", "n": 1},{"a": "attr", "t":"rmbmoney", "n": 300},{"a": "item", "t":"1", "n": 300000}],
[{"a": "attr", "t":"shengdanExp", "n": 100},{"a": "attr", "t":"shengdanBullet", "n": 1},{"a": "item", "t":"12", "n": 300},{"a": "item", "t":"1", "n": 300000}],
[{"a": "attr", "t":"shengdanExp", "n": 100},{"a": "attr", "t":"shengdanBullet", "n": 1},{"a": "item", "t":"9", "n": 200},{"a": "item", "t":"1", "n": 300000}],
[{"a": "attr", "t":"shengdanExp", "n": 100},{"a": "attr", "t":"shengdanBullet", "n": 1},{"a": "item", "t":"2", "n": 400},{"a": "item", "t":"1", "n": 300000}],
[{"a": "attr", "t":"shengdanExp", "n": 100},{"a": "attr", "t":"shengdanBullet", "n": 1},{"a": "item", "t":"27", "n": 5000},{"a": "item", "t":"1", "n": 300000}],
[{"a": "attr", "t":"shengdanExp", "n": 100},{"a": "attr", "t":"shengdanBullet", "n": 1},{"a": "item", "t":"4", "n": 10},{"a": "item", "t":"1", "n": 300000}],
]
}
},
{
"hdid" : 9000, // 唯一活动id 周末礼包 "hdid" : 9000, // 唯一活动id 周末礼包
"htype" : 9, // 后端唯一识别标识 "htype" : 9, // 后端唯一识别标识
"stype" : 900, // 前端唯一识别标识(看前端需要是否修改) "stype" : 900, // 前端唯一识别标识(看前端需要是否修改)
@ -3330,6 +3823,62 @@
} }
] ]
} }
},
{
"hdid" : 10000, // 唯一活动id 超值好礼
"htype" : 10, // 后端唯一识别标识
"stype" : 1000, // 前端唯一识别标识(看前端需要是否修改)
"ttype" : 0, // 0 按照开服时间计算1 玩家注册时间计算 4 屏蔽此活动
"stime" : 0, // 活动开始天数
"rtime" : 30, // 活动显示结束天数
"etime" : 30, // 活动实际结束
"name": "czlibao",
"icon": "icon_czlibao",
"showtime" : "仅供参考,会复写正确值", // 自选礼包,如果存在多个活动,计费点不要设置一样;如果是一样,可能会存在付费一次,购买多次。
"data" : {
//活动文本描述
intr: "czlbtips_1",
intr: "czlbtips_2",
//礼包
//礼包
gift: [
{
id: '1',
name: 'czlbtips_4',
need: [],
free: false,
payId: 'czlb_1',
buyNum: 1,
prize:{"1":[{'a': 'item', 't': '13', 'n': 600}],
"2":[{'a': 'item', 't': '13', 'n': 600}],
"3":[{'a': 'item', 't': '13', 'n': 600}]
}
},
{
id: '2',
name: 'czlbtips_5',
need: [],
free: false,
payId: 'czlb_2',
buyNum: 1,
prize: {"1":[{'a': 'item', 't': '13', 'n': 600}],
"2":[{'a': 'item', 't': '13', 'n': 600}],
"3":[{'a': 'item', 't': '13', 'n': 600}]
}
},
{
id: '3',
name: 'czlbtips_6',
need: [],
free: false,
payId: 'czlb_3',
buyNum: 1,
prize: {"1":[{'a': 'item', 't': '13', 'n': 600}],
"2":[{'a': 'item', 't': '13', 'n': 600}],
"3":[{'a': 'item', 't': '13', 'n': 600}]
}
}
]
}
} }
] ]

View File

@ -116,7 +116,7 @@
"6": { "6": {
"id": 6, "id": 6,
"name": "intr_item_name_6", "name": "intr_item_name_6",
"undefined": "每次进行干部特训需要消耗1个特训指南", "undefined": "用于干部特训,消耗特训指南挑战成功后可获得干部碎片",
"type": 1, "type": 1,
"sort": 1, "sort": 1,
"colour": 4, "colour": 4,
@ -155,7 +155,7 @@
"9": { "9": {
"id": 9, "id": 9,
"name": "intr_item_name_9", "name": "intr_item_name_9",
"undefined": "润滑剂,用于专属武器升星", "undefined": "稀有材料,可用于专属武器升星",
"type": 1, "type": 1,
"sort": 1, "sort": 1,
"colour": 4, "colour": 4,
@ -464,7 +464,7 @@
"24": { "24": {
"id": 24, "id": 24,
"name": "intr_item_name_24", "name": "intr_item_name_24",
"undefined": "使用后直接快速探险2小时", "undefined": "用于主线探险,使用后直接获得快速探险2小时的收益",
"type": 2, "type": 2,
"sort": 1, "sort": 1,
"colour": 5, "colour": 5,
@ -1204,7 +1204,7 @@
"607": { "607": {
"id": 607, "id": 607,
"name": "intr_item_name_607", "name": "intr_item_name_607",
"undefined": "使用后可以自选艾达,加尔西亚,葛丽特中一个干部的碎片", "undefined": "使用后可以自选艾达,加尔西亚,葛丽特,达奇,汉塞尔中一个干部的碎片",
"type": 2, "type": 2,
"sort": 1, "sort": 1,
"colour": 5, "colour": 5,
@ -2072,6 +2072,50 @@
"payId": "", "payId": "",
"advancedEffects": "ani_xiangzikuang" "advancedEffects": "ani_xiangzikuang"
}, },
"637": {
"id": 637,
"name": "intr_item_name_637",
"undefined": "使用后可以选择获得巴拉莱卡、罗贝尔特中的一个干部",
"type": 2,
"sort": 1,
"colour": 6,
"way": [],
"go": "",
"icon": "icon_heroBox_3",
"sicon": "icon_heroBox_3",
"describe": "intr_item_describe_637",
"useNeed": [],
"usePrize": [],
"selecPrize": [
{
"a": "hero",
"t": "5001",
"n": 1
},
{
"a": "hero",
"t": "5002",
"n": 1
},
{
"a": "hero",
"t": "5003",
"n": 1
},
{
"a": "hero",
"t": "5004",
"n": 1
},
{
"a": "hero",
"t": "5005",
"n": 1
}
],
"payId": "",
"advancedEffects": "ani_xiangzihong"
},
"1001": { "1001": {
"id": 1001, "id": 1001,
"name": "intr_item_name_1001", "name": "intr_item_name_1001",
@ -3950,6 +3994,24 @@
"payId": "", "payId": "",
"advancedEffects": "" "advancedEffects": ""
}, },
"50009": {
"id": 50009,
"name": "playerheadFrame_name_23",
"undefined": "使用后解锁头像框“圣诞氛围”",
"type": 7,
"sort": 1,
"colour": 4,
"way": [],
"go": "",
"icon": "txk_028",
"describe": "intr_item_describe_50009",
"diaoluo": 23,
"useNeed": [],
"usePrize": [],
"selecPrize": [],
"payId": "",
"advancedEffects": ""
},
"50101": { "50101": {
"id": 50101, "id": 50101,
"name": "playerChatFrame_name_6", "name": "playerChatFrame_name_6",
@ -4001,7 +4063,26 @@
"useNeed": [], "useNeed": [],
"usePrize": [], "usePrize": [],
"selecPrize": [], "selecPrize": [],
"payId": "" "payId": "",
"advancedEffects": ""
},
"50104": {
"id": 50104,
"name": "playerChatFrame_name_8",
"undefined": "使用后解锁聊天框“圣诞快乐”",
"type": 8,
"sort": 1,
"colour": 4,
"way": [],
"go": "",
"icon": "lt_dhk14",
"describe": "intr_item_describe_50104",
"diaoluo": 8,
"useNeed": [],
"usePrize": [],
"selecPrize": [],
"payId": "",
"advancedEffects": ""
}, },
"50201": { "50201": {
"id": 50201, "id": 50201,
@ -4011,13 +4092,15 @@
"sort": 1, "sort": 1,
"colour": 4, "colour": 4,
"way": [], "way": [],
"go": "",
"icon": "txk_017", "icon": "txk_017",
"describe": "intr_item_describe_50201", "describe": "intr_item_describe_50201",
"diaoluo": 16, "diaoluo": 16,
"useNeed": [], "useNeed": [],
"usePrize": [], "usePrize": [],
"selecPrize": [], "selecPrize": [],
"payId": "" "payId": "",
"advancedEffects": ""
}, },
"50202": { "50202": {
"id": 50202, "id": 50202,
@ -4027,13 +4110,15 @@
"sort": 1, "sort": 1,
"colour": 4, "colour": 4,
"way": [], "way": [],
"go": "",
"icon": "txk_011", "icon": "txk_011",
"describe": "intr_item_describe_50202", "describe": "intr_item_describe_50202",
"diaoluo": 17, "diaoluo": 17,
"useNeed": [], "useNeed": [],
"usePrize": [], "usePrize": [],
"selecPrize": [], "selecPrize": [],
"payId": "" "payId": "",
"advancedEffects": ""
}, },
"50203": { "50203": {
"id": 50203, "id": 50203,
@ -4043,13 +4128,15 @@
"sort": 1, "sort": 1,
"colour": 4, "colour": 4,
"way": [], "way": [],
"go": "",
"icon": "txk_005", "icon": "txk_005",
"describe": "intr_item_describe_50203", "describe": "intr_item_describe_50203",
"diaoluo": 18, "diaoluo": 18,
"useNeed": [], "useNeed": [],
"usePrize": [], "usePrize": [],
"selecPrize": [], "selecPrize": [],
"payId": "" "payId": "",
"advancedEffects": ""
}, },
"50204": { "50204": {
"id": 50204, "id": 50204,
@ -4059,13 +4146,15 @@
"sort": 1, "sort": 1,
"colour": 4, "colour": 4,
"way": [], "way": [],
"go": "",
"icon": "txk_004", "icon": "txk_004",
"describe": "intr_item_describe_50204", "describe": "intr_item_describe_50204",
"diaoluo": 19, "diaoluo": 19,
"useNeed": [], "useNeed": [],
"usePrize": [], "usePrize": [],
"selecPrize": [], "selecPrize": [],
"payId": "" "payId": "",
"advancedEffects": ""
}, },
"50205": { "50205": {
"id": 50205, "id": 50205,
@ -4075,13 +4164,15 @@
"sort": 1, "sort": 1,
"colour": 4, "colour": 4,
"way": [], "way": [],
"go": "",
"icon": "txk_024", "icon": "txk_024",
"describe": "intr_item_describe_50205", "describe": "intr_item_describe_50205",
"diaoluo": 20, "diaoluo": 20,
"useNeed": [], "useNeed": [],
"usePrize": [], "usePrize": [],
"selecPrize": [], "selecPrize": [],
"payId": "" "payId": "",
"advancedEffects": ""
}, },
"50206": { "50206": {
"id": 50206, "id": 50206,
@ -4091,13 +4182,15 @@
"sort": 1, "sort": 1,
"colour": 4, "colour": 4,
"way": [], "way": [],
"go": "",
"icon": "txk_013", "icon": "txk_013",
"describe": "intr_item_describe_50206", "describe": "intr_item_describe_50206",
"diaoluo": 21, "diaoluo": 21,
"useNeed": [], "useNeed": [],
"usePrize": [], "usePrize": [],
"selecPrize": [], "selecPrize": [],
"payId": "" "payId": "",
"advancedEffects": ""
}, },
"50207": { "50207": {
"id": 50207, "id": 50207,
@ -4107,13 +4200,51 @@
"sort": 1, "sort": 1,
"colour": 4, "colour": 4,
"way": [], "way": [],
"go": "",
"icon": "txk_021", "icon": "txk_021",
"describe": "intr_item_describe_50207", "describe": "intr_item_describe_50207",
"diaoluo": 22, "diaoluo": 22,
"useNeed": [], "useNeed": [],
"usePrize": [], "usePrize": [],
"selecPrize": [], "selecPrize": [],
"payId": "" "payId": "",
"advancedEffects": ""
},
"50301": {
"id": 50301,
"name": "playerModel_name_3",
"undefined": "使用后解锁主角造型“圣诞庆典:男”",
"type": 6,
"sort": 1,
"colour": 5,
"way": [],
"go": "",
"icon": 100011,
"describe": "intr_item_describe_50208",
"diaoluo": 3,
"useNeed": [],
"usePrize": [],
"selecPrize": [],
"payId": "",
"advancedEffects": "ani_xiangzikuang"
},
"50302": {
"id": 50302,
"name": "playerModel_name_4",
"undefined": "使用后解锁主角造型“圣诞庆典:女”",
"type": 6,
"sort": 1,
"colour": 5,
"way": [],
"go": "",
"icon": 100021,
"describe": "intr_item_describe_50209",
"diaoluo": 4,
"useNeed": [],
"usePrize": [],
"selecPrize": [],
"payId": "",
"advancedEffects": "ani_xiangzikuang"
}, },
"60101": { "60101": {
"id": 60101, "id": 60101,

View File

@ -1,5 +1,41 @@
{ {
"dengjijijin": [ "dengjijijin": [
{
"type": "dengjijijin",
"total": 10,
"pt": [
{
"a": "attr",
"t": "rmbmoney",
"n": 300
}
],
"tq": [
{
"a": "attr",
"t": "rmbmoney",
"n": 8000
}
]
},
{
"type": "dengjijijin",
"total": 15,
"pt": [
{
"a": "attr",
"t": "rmbmoney",
"n": 300
}
],
"tq": [
{
"a": "attr",
"t": "rmbmoney",
"n": 2000
}
]
},
{ {
"type": "dengjijijin", "type": "dengjijijin",
"total": 20, "total": 20,
@ -14,7 +50,7 @@
{ {
"a": "attr", "a": "attr",
"t": "rmbmoney", "t": "rmbmoney",
"n": 1700 "n": 2000
} }
] ]
}, },
@ -32,7 +68,7 @@
{ {
"a": "attr", "a": "attr",
"t": "rmbmoney", "t": "rmbmoney",
"n": 1700 "n": 2000
} }
] ]
}, },
@ -50,7 +86,7 @@
{ {
"a": "attr", "a": "attr",
"t": "rmbmoney", "t": "rmbmoney",
"n": 1700 "n": 2000
} }
] ]
}, },
@ -68,7 +104,7 @@
{ {
"a": "attr", "a": "attr",
"t": "rmbmoney", "t": "rmbmoney",
"n": 1700 "n": 2000
} }
] ]
}, },
@ -86,7 +122,7 @@
{ {
"a": "attr", "a": "attr",
"t": "rmbmoney", "t": "rmbmoney",
"n": 1700 "n": 2000
} }
] ]
}, },
@ -104,43 +140,7 @@
{ {
"a": "attr", "a": "attr",
"t": "rmbmoney", "t": "rmbmoney",
"n": 1700 "n": 2000
}
]
},
{
"type": "dengjijijin",
"total": 50,
"pt": [
{
"a": "attr",
"t": "rmbmoney",
"n": 300
}
],
"tq": [
{
"a": "attr",
"t": "rmbmoney",
"n": 1700
}
]
},
{
"type": "dengjijijin",
"total": 55,
"pt": [
{
"a": "attr",
"t": "rmbmoney",
"n": 300
}
],
"tq": [
{
"a": "attr",
"t": "rmbmoney",
"n": 1700
} }
] ]
} }
@ -148,104 +148,104 @@
"guanqiajijin": [ "guanqiajijin": [
{ {
"type": "guanqiajijin", "type": "guanqiajijin",
"total": 30, "total": 10,
"pt": [], "pt": [],
"tq": [ "tq": [
{ {
"a": "attr", "a": "item",
"t": "rmbmoney", "t": "1",
"n": 2000 "n": 3000000
} }
], ],
"des": "guanqiajijin_des_1" "des": "guanqiajijin_des_1"
}, },
{ {
"type": "guanqiajijin", "type": "guanqiajijin",
"total": 50, "total": 20,
"pt": [], "pt": [],
"tq": [ "tq": [
{ {
"a": "attr", "a": "item",
"t": "rmbmoney", "t": "1",
"n": 2000 "n": 3000000
} }
], ],
"des": "guanqiajijin_des_2" "des": "guanqiajijin_des_2"
}, },
{ {
"type": "guanqiajijin", "type": "guanqiajijin",
"total": 70, "total": 40,
"pt": [], "pt": [],
"tq": [ "tq": [
{ {
"a": "attr", "a": "item",
"t": "rmbmoney", "t": "1",
"n": 2000 "n": 3000000
} }
], ],
"des": "guanqiajijin_des_3" "des": "guanqiajijin_des_3"
}, },
{ {
"type": "guanqiajijin", "type": "guanqiajijin",
"total": 90, "total": 60,
"pt": [], "pt": [],
"tq": [ "tq": [
{ {
"a": "attr", "a": "item",
"t": "rmbmoney", "t": "1",
"n": 2000 "n": 3000000
} }
], ],
"des": "guanqiajijin_des_4" "des": "guanqiajijin_des_4"
}, },
{ {
"type": "guanqiajijin", "type": "guanqiajijin",
"total": 110, "total": 80,
"pt": [], "pt": [],
"tq": [ "tq": [
{ {
"a": "attr", "a": "item",
"t": "rmbmoney", "t": "1",
"n": 2000 "n": 3000000
} }
], ],
"des": "guanqiajijin_des_5" "des": "guanqiajijin_des_5"
}, },
{ {
"type": "guanqiajijin", "type": "guanqiajijin",
"total": 150, "total": 100,
"pt": [], "pt": [],
"tq": [ "tq": [
{ {
"a": "attr", "a": "item",
"t": "rmbmoney", "t": "1",
"n": 2000 "n": 3000000
} }
], ],
"des": "guanqiajijin_des_6" "des": "guanqiajijin_des_6"
}, },
{ {
"type": "guanqiajijin", "type": "guanqiajijin",
"total": 180, "total": 120,
"pt": [], "pt": [],
"tq": [ "tq": [
{ {
"a": "attr", "a": "item",
"t": "rmbmoney", "t": "1",
"n": 2000 "n": 3000000
} }
], ],
"des": "guanqiajijin_des_7" "des": "guanqiajijin_des_7"
}, },
{ {
"type": "guanqiajijin", "type": "guanqiajijin",
"total": 250, "total": 140,
"pt": [], "pt": [],
"tq": [ "tq": [
{ {
"a": "attr", "a": "item",
"t": "rmbmoney", "t": "1",
"n": 2000 "n": 3000000
} }
], ],
"des": "guanqiajijin_des_8" "des": "guanqiajijin_des_8"
@ -254,37 +254,37 @@
"dayjijin": [ "dayjijin": [
{ {
"type": "dayjijin", "type": "dayjijin",
"total": 5, "total": 10,
"pt": [ "pt": [
{ {
"a": "item", "a": "attr",
"t": "23", "t": "rmbmoney",
"n": 20000
}
],
"tq": [
{
"a": "item",
"t": "4",
"n": 5
}
]
},
{
"type": "dayjijin",
"total": 15,
"pt": [
{
"a": "item",
"t": "2",
"n": 200 "n": 200
} }
], ],
"tq": [ "tq": [
{ {
"a": "item", "a": "item",
"t": "2", "t": "4",
"n": 2000 "n": 10
}
]
},
{
"type": "dayjijin",
"total": 20,
"pt": [
{
"a": "attr",
"t": "rmbmoney",
"n": 200
}
],
"tq": [
{
"a": "item",
"t": "4",
"n": 10
} }
] ]
}, },
@ -292,35 +292,53 @@
"type": "dayjijin", "type": "dayjijin",
"total": 30, "total": 30,
"pt": [ "pt": [
{
"a": "item",
"t": "23",
"n": 20000
}
],
"tq": [
{ {
"a": "attr", "a": "attr",
"t": "rmbmoney", "t": "rmbmoney",
"n": 888
}
]
},
{
"type": "dayjijin",
"total": 45,
"pt": [
{
"a": "item",
"t": "2",
"n": 200 "n": 200
} }
], ],
"tq": [ "tq": [
{ {
"a": "item", "a": "item",
"t": "615", "t": "4",
"n": 1 "n": 10
}
]
},
{
"type": "dayjijin",
"total": 40,
"pt": [
{
"a": "attr",
"t": "rmbmoney",
"n": 200
}
],
"tq": [
{
"a": "item",
"t": "4",
"n": 10
}
]
},
{
"type": "dayjijin",
"total": 50,
"pt": [
{
"a": "attr",
"t": "rmbmoney",
"n": 200
}
],
"tq": [
{
"a": "item",
"t": "4",
"n": 10
} }
] ]
}, },
@ -329,34 +347,52 @@
"total": 60, "total": 60,
"pt": [ "pt": [
{ {
"a": "item", "a": "attr",
"t": "23", "t": "rmbmoney",
"n": 20000 "n": 200
} }
], ],
"tq": [ "tq": [
{ {
"a": "item", "a": "item",
"t": "4", "t": "4",
"n": 5 "n": 10
} }
] ]
}, },
{ {
"type": "dayjijin", "type": "dayjijin",
"total": 75, "total": 70,
"pt": [ "pt": [
{ {
"a": "item", "a": "attr",
"t": "2", "t": "rmbmoney",
"n": 300 "n": 200
} }
], ],
"tq": [ "tq": [
{ {
"a": "item", "a": "item",
"t": "2", "t": "4",
"n": 2000 "n": 10
}
]
},
{
"type": "dayjijin",
"total": 80,
"pt": [
{
"a": "attr",
"t": "rmbmoney",
"n": 200
}
],
"tq": [
{
"a": "item",
"t": "4",
"n": 10
} }
] ]
}, },
@ -365,34 +401,52 @@
"total": 90, "total": 90,
"pt": [ "pt": [
{ {
"a": "item", "a": "attr",
"t": "23", "t": "rmbmoney",
"n": 20000 "n": 200
} }
], ],
"tq": [ "tq": [
{ {
"a": "attr", "a": "item",
"t": "rmbmoney", "t": "4",
"n": 888 "n": 10
} }
] ]
}, },
{ {
"type": "dayjijin", "type": "dayjijin",
"total": 105, "total": 100,
"pt": [ "pt": [
{ {
"a": "item", "a": "attr",
"t": "2", "t": "rmbmoney",
"n": 300 "n": 200
} }
], ],
"tq": [ "tq": [
{ {
"a": "item", "a": "item",
"t": "615", "t": "4",
"n": 1 "n": 10
}
]
},
{
"type": "dayjijin",
"total": 110,
"pt": [
{
"a": "attr",
"t": "rmbmoney",
"n": 200
}
],
"tq": [
{
"a": "item",
"t": "4",
"n": 10
} }
] ]
}, },
@ -401,106 +455,52 @@
"total": 120, "total": 120,
"pt": [ "pt": [
{ {
"a": "item", "a": "attr",
"t": "23", "t": "rmbmoney",
"n": 20000 "n": 200
} }
], ],
"tq": [ "tq": [
{ {
"a": "item", "a": "item",
"t": "4", "t": "4",
"n": 5 "n": 10
} }
] ]
}, },
{ {
"type": "dayjijin", "type": "dayjijin",
"total": 135, "total": 130,
"pt": [ "pt": [
{
"a": "item",
"t": "2",
"n": 400
}
],
"tq": [
{
"a": "item",
"t": "2",
"n": 2000
}
]
},
{
"type": "dayjijin",
"total": 150,
"pt": [
{
"a": "item",
"t": "23",
"n": 20000
}
],
"tq": [
{ {
"a": "attr", "a": "attr",
"t": "rmbmoney", "t": "rmbmoney",
"n": 888 "n": 200
}
]
},
{
"type": "dayjijin",
"total": 165,
"pt": [
{
"a": "item",
"t": "2",
"n": 400
}
],
"tq": [
{
"a": "item",
"t": "615",
"n": 1
}
]
},
{
"type": "dayjijin",
"total": 180,
"pt": [
{
"a": "item",
"t": "23",
"n": 20000
} }
], ],
"tq": [ "tq": [
{ {
"a": "item", "a": "item",
"t": "4", "t": "4",
"n": 5 "n": 10
} }
] ]
}, },
{ {
"type": "dayjijin", "type": "dayjijin",
"total": 200, "total": 140,
"pt": [ "pt": [
{ {
"a": "item", "a": "attr",
"t": "2", "t": "rmbmoney",
"n": 500 "n": 200
} }
], ],
"tq": [ "tq": [
{ {
"a": "attr", "a": "item",
"t": "rmbmoney", "t": "4",
"n": 1888 "n": 10
} }
] ]
} }

View File

@ -10,7 +10,13 @@
2 2
], ],
"content": "kfcb_des_1", "content": "kfcb_des_1",
"text": "kfcb_text_1" "text": "kfcb_text_1",
"payIds": [
"kfcb_libao_1",
"kfcb_libao_2",
"kfcb_libao_3",
"kfcb_libao_7"
]
}, },
"2": { "2": {
"id": 2, "id": 2,
@ -23,7 +29,12 @@
4 4
], ],
"content": "kfcb_des_2", "content": "kfcb_des_2",
"text": "kfcb_text_2" "text": "kfcb_text_2",
"payIds": [
"kfcb_libao_4",
"kfcb_libao_5",
"kfcb_libao_6"
]
}, },
"3": { "3": {
"id": 3, "id": 3,
@ -36,7 +47,11 @@
6 6
], ],
"content": "kfcb_des_3", "content": "kfcb_des_3",
"text": "kfcb_text_3" "text": "kfcb_text_3",
"payIds": [
"kfcb_libao_1",
"kfcb_libao_2"
]
}, },
"4": { "4": {
"id": 4, "id": 4,
@ -49,7 +64,11 @@
8 8
], ],
"content": "kfcb_des_4", "content": "kfcb_des_4",
"text": "kfcb_text_4" "text": "kfcb_text_4",
"payIds": [
"kfcb_libao_2",
"kfcb_libao_3"
]
}, },
"5": { "5": {
"id": 5, "id": 5,
@ -62,7 +81,12 @@
10 10
], ],
"content": "kfcb_des_5", "content": "kfcb_des_5",
"text": "kfcb_text_5" "text": "kfcb_text_5",
"payIds": [
"kfcb_libao_1",
"kfcb_libao_2",
"kfcb_libao_3"
]
}, },
"6": { "6": {
"id": 6, "id": 6,
@ -75,7 +99,12 @@
12 12
], ],
"content": "kfcb_des_6", "content": "kfcb_des_6",
"text": "kfcb_text_6" "text": "kfcb_text_6",
"payIds": [
"kfcb_libao_1",
"kfcb_libao_2",
"kfcb_libao_3"
]
}, },
"7": { "7": {
"id": 7, "id": 7,
@ -88,6 +117,11 @@
14 14
], ],
"content": "kfcb_des_7", "content": "kfcb_des_7",
"text": "kfcb_text_7" "text": "kfcb_text_7",
"payIds": [
"kfcb_libao_1",
"kfcb_libao_2",
"kfcb_libao_3"
]
} }
} }

View File

@ -1313,5 +1313,31 @@
"display": { "display": {
"lv": 15 "lv": 15
} }
},
"shengdanhuodong": {
"name": "shengdanhuodong",
"undefined": "圣诞活动",
"and": {
"lv": 15
},
"or": {},
"time": 0,
"tips": "openCond_tips_96",
"display": {
"lv": 15
}
},
"yuandanhuodong": {
"name": "yuandanhuodong",
"undefined": "元旦活动",
"and": {
"lv": 15
},
"or": {},
"time": 0,
"tips": "openCond_tips_96",
"display": {
"lv": 15
}
} }
} }

File diff suppressed because it is too large Load Diff

View File

@ -26,7 +26,7 @@
day: 7, day: 7,
title: 'title_email_zhongshenka_day7', title: 'title_email_zhongshenka_day7',
content: 'intr_email_zhongshenka_day7', content: 'intr_email_zhongshenka_day7',
prize: [{ a: 'item', t: '4', n: 10 },{ a: 'item', t: '9', n: 200 }] prize: [{ a: 'item', t: '4', n: 10 },{ a: 'item', t: '1', n: 5000000 }]
} }
], ],
chaozhiyueka: [ chaozhiyueka: [

View File

@ -118,5 +118,22 @@
}, },
"colour": 3, "colour": 3,
"ani": "" "ani": ""
},
"8": {
"id": 8,
"name": "playerChatFrame_name_8",
"img": "lt_dhk14",
"cond": [
"time",
-1
],
"undefined": "圣诞庆典获得",
"intr": "playerChatFrame_des_8",
"sort": 8,
"buff": {
"defpro": 0.01
},
"colour": 3,
"ani": ""
} }
} }

View File

@ -26,7 +26,7 @@
"intr": "intr_playerinfo_intr_2", "intr": "intr_playerinfo_intr_2",
"sort": 2, "sort": 2,
"buff": {}, "buff": {},
"colour": 2, "colour": 1,
"ani": "" "ani": ""
}, },
"1001": { "1001": {

View File

@ -208,7 +208,7 @@
"13": { "13": {
"id": 13, "id": 13,
"name": "playerheadFrame_name_13", "name": "playerheadFrame_name_13",
"undefined": "购买战令获得", "undefined": "购买悬赏令获得,解锁后伤害加成+2%限时30天",
"img": "txk_002", "img": "txk_002",
"cond": [ "cond": [
"time", "time",
@ -216,14 +216,16 @@
], ],
"intr": "playerheadFrame_des_13", "intr": "playerheadFrame_des_13",
"sort": 13, "sort": 13,
"buff": {}, "buff": {
"dpspro": 0.02
},
"colour": 4, "colour": 4,
"ani": "" "ani": ""
}, },
"14": { "14": {
"id": 14, "id": 14,
"name": "playerheadFrame_name_14", "name": "playerheadFrame_name_14",
"undefined": "铁笼死斗晋级八强获得", "undefined": "铁笼死斗晋级八强获得,解锁后防御加成+1%限时7天",
"img": "txk_003", "img": "txk_003",
"cond": [ "cond": [
"time", "time",
@ -231,14 +233,16 @@
], ],
"intr": "playerheadFrame_des_14", "intr": "playerheadFrame_des_14",
"sort": 14, "sort": 14,
"buff": {}, "buff": {
"defpro": 0.01
},
"colour": 4, "colour": 4,
"ani": "" "ani": ""
}, },
"15": { "15": {
"id": 15, "id": 15,
"name": "playerheadFrame_name_15", "name": "playerheadFrame_name_15",
"undefined": "购买名望特权礼包获得", "undefined": "购买名望特权礼包获得,解锁后伤害加成+1%",
"img": "txk_020", "img": "txk_020",
"cond": [ "cond": [
"time", "time",
@ -255,7 +259,7 @@
"16": { "16": {
"id": 16, "id": 16,
"name": "playerheadFrame_name_16", "name": "playerheadFrame_name_16",
"undefined": "开服冲榜活动获得", "undefined": "开服冲榜活动获得,解锁后攻击加成+1%",
"img": "txk_017", "img": "txk_017",
"cond": [ "cond": [
"time", "time",
@ -272,7 +276,7 @@
"17": { "17": {
"id": 17, "id": 17,
"name": "playerheadFrame_name_17", "name": "playerheadFrame_name_17",
"undefined": "开服冲榜活动获得", "undefined": "开服冲榜活动获得,解锁后防御加成+1%",
"img": "txk_011", "img": "txk_011",
"cond": [ "cond": [
"time", "time",
@ -289,7 +293,7 @@
"18": { "18": {
"id": 18, "id": 18,
"name": "playerheadFrame_name_18", "name": "playerheadFrame_name_18",
"undefined": "开服冲榜活动获得", "undefined": "开服冲榜活动获得,解锁后生命加成+1%",
"img": "txk_005", "img": "txk_005",
"cond": [ "cond": [
"time", "time",
@ -306,7 +310,7 @@
"19": { "19": {
"id": 19, "id": 19,
"name": "playerheadFrame_name_19", "name": "playerheadFrame_name_19",
"undefined": "开服冲榜活动获得", "undefined": "开服冲榜活动获得,解锁后攻击加成+1%",
"img": "txk_004", "img": "txk_004",
"cond": [ "cond": [
"time", "time",
@ -323,7 +327,7 @@
"20": { "20": {
"id": 20, "id": 20,
"name": "playerheadFrame_name_20", "name": "playerheadFrame_name_20",
"undefined": "开服冲榜活动获得", "undefined": "开服冲榜活动获得,解锁后防御加成+1%",
"img": "txk_024", "img": "txk_024",
"cond": [ "cond": [
"time", "time",
@ -340,7 +344,7 @@
"21": { "21": {
"id": 21, "id": 21,
"name": "playerheadFrame_name_21", "name": "playerheadFrame_name_21",
"undefined": "开服冲榜活动获得", "undefined": "开服冲榜活动获得,解锁后生命加成+1%",
"img": "txk_013", "img": "txk_013",
"cond": [ "cond": [
"time", "time",
@ -357,7 +361,7 @@
"22": { "22": {
"id": 22, "id": 22,
"name": "playerheadFrame_name_22", "name": "playerheadFrame_name_22",
"undefined": "开服冲榜活动获得", "undefined": "开服冲榜活动获得,解锁后伤害加成+1%",
"img": "txk_021", "img": "txk_021",
"cond": [ "cond": [
"time", "time",
@ -370,5 +374,22 @@
}, },
"colour": 4, "colour": 4,
"ani": "" "ani": ""
},
"23": {
"id": 23,
"name": "playerheadFrame_name_23",
"undefined": "圣诞庆典活动获得,解锁后生命加成+1%",
"img": "txk_028",
"cond": [
"time",
-1
],
"intr": "playerheadFrame_des_23",
"sort": 23,
"buff": {
"hppro": 0.01
},
"colour": 4,
"ani": ""
} }
} }

View File

@ -33,6 +33,44 @@
"colour": 1, "colour": 1,
"mwSpine": "ani_mingwangnv", "mwSpine": "ani_mingwangnv",
"fireHead": "img_lih1" "fireHead": "img_lih1"
},
"3": {
"type": 1,
"id": 3,
"name": "playerModel_name_3",
"head": 100011,
"img": 100011,
"cond": [
"time",
-1
],
"intr": "playerModel_des_3",
"sort": 3,
"buff": {
"defpro": 0.02
},
"colour": 5,
"mwSpine": "ani_mingwangnan",
"fireHead": "img_lih21"
},
"4": {
"type": 1,
"id": 4,
"name": "playerModel_name_4",
"head": 100021,
"img": 100021,
"cond": [
"time",
-1
],
"intr": "playerModel_des_4",
"sort": 4,
"buff": {
"atkpro": 0.02
},
"colour": 5,
"mwSpine": "ani_mingwangnv",
"fireHead": "img_lih11"
} }
} }
} }

View File

@ -1,46 +1,19 @@
{ {
//每日充值要求 tasks: [
dayPayNeed: 6, { day: 1, payid:"jitianlibao_1" },
data: [ { day: 2, payid:"jitianlibao_2" },
{ { day: 3, payid:"jitianlibao_3" },
time: 1296000, { day: 4, payid:"jitianlibao_4" },
tasks: [ { day: 5, payid:"jitianlibao_5" },
{ total: 1, prize: [{a: 'attr', t: 'jinbi', n: 20000},{a: 'item', t: '1', n: 100000},{a: 'item', t: '4', n: 5}] }, { day: 6, payid:"jitianlibao_6" },
{ total: 2, prize: [{a: 'attr', t: 'jinbi', n: 40000},{a: 'item', t: '1', n: 200000},{a: 'item', t: '12', n: 200}] }, { day: 7, payid:"jitianlibao_7" },
{ total: 3, prize: [{a: 'attr', t: 'jinbi', n: 60000},{a: 'item', t: '1', n: 300000},{a: 'item', t: '4', n: 10}] }, { day: 8, payid:"jitianlibao_8" },
{ total: 4, prize: [{a: 'attr', t: 'jinbi', n: 80000},{a: 'item', t: '1', n: 400000},{a: 'item', t: '12', n: 200}] }, { day: 9, payid:"jitianlibao_9" },
{ total: 5, prize: [{a: 'attr', t: 'jinbi', n: 100000},{a: 'item', t: '1', n: 500000},{a: 'item', t: '12', n: 200}] }, { day: 10, payid:"jitianlibao_10" },
{ total: 6, prize: [{a: 'attr', t: 'jinbi', n: 120000},{a: 'item', t: '1', n: 600000},{a: 'item', t: '607', n: 20}] }, { day: 11, payid:"jitianlibao_11" },
{ total: 7, prize: [{a: 'attr', t: 'jinbi', n: 140000},{a: 'item', t: '1', n: 700000},{a: 'item', t: '12', n: 200}] }, { day: 12, payid:"jitianlibao_12" },
{ total: 8, prize: [{a: 'attr', t: 'jinbi', n: 160000},{a: 'item', t: '1', n: 800000},{a: 'item', t: '12', n: 200}] }, { day: 13, payid:"jitianlibao_13" },
{ total: 9, prize: [{a: 'attr', t: 'jinbi', n: 180000},{a: 'item', t: '1', n: 900000},{a: 'item', t: '4', n: 10}] }, { day: 14, payid:"jitianlibao_14" },
{ total: 10, prize: [{a: 'attr', t: 'jinbi', n: 200000},{a: 'item', t: '1', n: 1000000},{a: 'item', t: '12', n: 200}] }, { day: 15, payid:"jitianlibao_15" }
{ total: 11, prize: [{a: 'attr', t: 'jinbi', n: 220000},{a: 'item', t: '1', n: 1100000},{a: 'item', t: '12', n: 200}] },
{ total: 12, prize: [{a: 'attr', t: 'jinbi', n: 240000},{a: 'item', t: '1', n: 1200000},{a: 'item', t: '4', n: 10}] },
{ total: 13, prize: [{a: 'attr', t: 'jinbi', n: 260000},{a: 'item', t: '1', n: 1300000},{a: 'item', t: '12', n: 200}] },
{ total: 14, prize: [{a: 'attr', t: 'jinbi', n: 280000},{a: 'item', t: '1', n: 1400000},{a: 'item', t: '12', n: 200}] },
{ total: 15, prize: [{a: 'attr', t: 'jinbi', n: 300000},{a: 'item', t: '1', n: 1500000},{a: 'item', t: '600', n: 20}] }
]
},
{
time: 1296000,
tasks: [
{ total: 1, prize: [{a: 'attr', t: 'jinbi', n: 20000},{a: 'item', t: '1', n: 100000},{a: 'item', t: '4', n: 5}] },
{ total: 2, prize: [{a: 'attr', t: 'jinbi', n: 40000},{a: 'item', t: '1', n: 200000},{a: 'item', t: '12', n: 200}] },
{ total: 3, prize: [{a: 'attr', t: 'jinbi', n: 60000},{a: 'item', t: '1', n: 300000},{a: 'item', t: '4', n: 10}] },
{ total: 4, prize: [{a: 'attr', t: 'jinbi', n: 80000},{a: 'item', t: '1', n: 400000},{a: 'item', t: '12', n: 200}] },
{ total: 5, prize: [{a: 'attr', t: 'jinbi', n: 100000},{a: 'item', t: '1', n: 500000},{a: 'item', t: '12', n: 200}] },
{ total: 6, prize: [{a: 'attr', t: 'jinbi', n: 120000},{a: 'item', t: '1', n: 600000},{a: 'item', t: '607', n: 20}] },
{ total: 7, prize: [{a: 'attr', t: 'jinbi', n: 140000},{a: 'item', t: '1', n: 700000},{a: 'item', t: '12', n: 200}] },
{ total: 8, prize: [{a: 'attr', t: 'jinbi', n: 160000},{a: 'item', t: '1', n: 800000},{a: 'item', t: '12', n: 200}] },
{ total: 9, prize: [{a: 'attr', t: 'jinbi', n: 180000},{a: 'item', t: '1', n: 900000},{a: 'item', t: '4', n: 10}] },
{ total: 10, prize: [{a: 'attr', t: 'jinbi', n: 200000},{a: 'item', t: '1', n: 1000000},{a: 'item', t: '12', n: 200}] },
{ total: 11, prize: [{a: 'attr', t: 'jinbi', n: 220000},{a: 'item', t: '1', n: 1100000},{a: 'item', t: '12', n: 200}] },
{ total: 12, prize: [{a: 'attr', t: 'jinbi', n: 240000},{a: 'item', t: '1', n: 1200000},{a: 'item', t: '4', n: 10}] },
{ total: 13, prize: [{a: 'attr', t: 'jinbi', n: 260000},{a: 'item', t: '1', n: 1300000},{a: 'item', t: '12', n: 200}] },
{ total: 14, prize: [{a: 'attr', t: 'jinbi', n: 280000},{a: 'item', t: '1', n: 1400000},{a: 'item', t: '12', n: 200}] },
{ total: 15, prize: [{a: 'attr', t: 'jinbi', n: 300000},{a: 'item', t: '1', n: 1500000},{a: 'item', t: '600', n: 20}] }
]
}
] ]
} }

View File

@ -495,5 +495,36 @@
"vip": [], "vip": [],
"npcImg": 3011, "npcImg": 3011,
"npcText": "intr_shopCom_text_10" "npcText": "intr_shopCom_text_10"
},
"13": {
"id": 13,
"type": 12,
"name": "wsw_wz_dhsd",
"undefined": "兑换商店",
"openCond": [
"lv",
15
],
"autoRefreshTime": 0,
"recoilRefreshNeed": [],
"recoilRefreshNum": 0,
"freeRefreshInterval": 0,
"freeRefreshNum": 0,
"shopItems": [
4001
],
"showItem": [
{
"a": "attr",
"t": "jinbi",
"n": 0
},
{
"a": "attr",
"t": "rmbmoney",
"n": 0
}
],
"vip": []
} }
} }

View File

@ -3918,6 +3918,31 @@
9999 9999
], ],
"vipAddbuyNum": [] "vipAddbuyNum": []
},
{
"id": 4001,
"a": "item",
"t": 4,
"n": 10,
"p": 1,
"colour": 4,
"buyNum": -1,
"openDay": 1,
"buyNeed": [
{
"a": "item",
"t": "15",
"n": 2800
}
],
"sale": 10,
"needVip": 0,
"needZCCG": 0,
"lv": [
1,
9999
],
"vipAddbuyNum": []
} }
], ],
"4002": [ "4002": [

View File

@ -1,6 +1,7 @@
{ {
"shouchong1": { "shouchong1": {
"paynum": 6, "paynum": 6,
"payid":"shouchong_1",
"cartoon": { "cartoon": {
"hero": 5001 "hero": 5001
}, },
@ -45,6 +46,7 @@
}, },
"shouchong2": { "shouchong2": {
"paynum": 30, "paynum": 30,
"payid":"shouchong_2",
"cartoon": { "cartoon": {
"img": 5001 "img": 5001
}, },
@ -89,6 +91,7 @@
}, },
"shouchong3": { "shouchong3": {
"paynum": 98, "paynum": 98,
"payid":"shouchong_3",
"cartoon": { "cartoon": {
"hero": 5002 "hero": 5002
}, },

View File

@ -1011,7 +1011,7 @@
"mofa": 0, "mofa": 0,
"islong": 0 "islong": 0
}, },
"describe": "普通攻击替换为随机攻击3个目标造成基础伤害95%的物理伤害" "describe": "普通攻击替换为随机攻击2个目标造成基础伤害95%的物理伤害"
}, },
"4002201": { "4002201": {
"skillid": 4002201, "skillid": 4002201,
@ -1029,7 +1029,7 @@
"mofa": 0, "mofa": 0,
"islong": 0 "islong": 0
}, },
"describe": "普通攻击替换为随机攻击3个目标造成基础伤害114%的物理伤害" "describe": "普通攻击替换为随机攻击2个目标造成基础伤害114%的物理伤害"
}, },
"4003200": { "4003200": {
"skillid": 4003200, "skillid": 4003200,
@ -1202,7 +1202,7 @@
"order": "rand", "order": "rand",
"limit": 6, "limit": 6,
"data": { "data": {
"pro": 0.11 "pro": 0.13
}, },
"chkdata": {}, "chkdata": {},
"ext": {}, "ext": {},
@ -1217,7 +1217,7 @@
"order": "rand", "order": "rand",
"limit": 6, "limit": 6,
"data": { "data": {
"pro": 0.11 "pro": 0.13
}, },
"chkdata": {}, "chkdata": {},
"ext": {}, "ext": {},

View File

@ -739,7 +739,7 @@
"sxleixing": "zhongdu", "sxleixing": "zhongdu",
"buff_type": 2, "buff_type": 2,
"xiaoguocanshu": { "xiaoguocanshu": {
"pro": 0.15, "pro": 0.18,
"type": "hp" "type": "hp"
}, },
"round": 2, "round": 2,
@ -759,7 +759,7 @@
"sxleixing": "zhongdu", "sxleixing": "zhongdu",
"buff_type": 2, "buff_type": 2,
"xiaoguocanshu": { "xiaoguocanshu": {
"pro": 0.15, "pro": 0.18,
"type": "hp" "type": "hp"
}, },
"round": 2, "round": 2,

View File

@ -1202,13 +1202,13 @@
"n": 100000 "n": 100000
} }
], ],
"pval": 2, "pval": 1,
"name": "intr_task_name_2007", "name": "intr_task_name_2007",
"intr": "intr_task_intr_2007", "intr": "intr_task_intr_2007",
"pretask": 2015, "pretask": 2015,
"followtask": 2017, "followtask": 2017,
"cond": [ "cond": [
1 2
], ],
"tiaozhuan": 67, "tiaozhuan": 67,
"order": 17, "order": 17,
@ -1467,13 +1467,13 @@
"n": 100000 "n": 100000
} }
], ],
"pval": 3, "pval": 1,
"name": "intr_task_name_2016", "name": "intr_task_name_2016",
"intr": "intr_task_intr_2016", "intr": "intr_task_intr_2016",
"pretask": 2022, "pretask": 2022,
"followtask": 2024, "followtask": 2024,
"cond": [ "cond": [
1 3
], ],
"tiaozhuan": 67, "tiaozhuan": 67,
"order": 24, "order": 24,
@ -1619,13 +1619,13 @@
"n": 200000 "n": 200000
} }
], ],
"pval": 4, "pval": 2,
"name": "intr_task_name_2016", "name": "intr_task_name_2016",
"intr": "intr_task_intr_2016", "intr": "intr_task_intr_2016",
"pretask": 2026, "pretask": 2026,
"followtask": 2028, "followtask": 2028,
"cond": [ "cond": [
1 2
], ],
"tiaozhuan": 67, "tiaozhuan": 67,
"order": 28, "order": 28,
@ -3016,13 +3016,13 @@
"n": 100000 "n": 100000
} }
], ],
"pval": 3, "pval": 2,
"name": "intr_task_name_2016", "name": "intr_task_name_2016",
"intr": "intr_task_intr_2016", "intr": "intr_task_intr_2016",
"pretask": 2064, "pretask": 2064,
"followtask": 2066, "followtask": 2066,
"cond": [ "cond": [
2 3
], ],
"tiaozhuan": 67, "tiaozhuan": 67,
"order": 66, "order": 66,
@ -3350,13 +3350,13 @@
"n": 100000 "n": 100000
} }
], ],
"pval": 4, "pval": 3,
"name": "intr_task_name_2016", "name": "intr_task_name_2016",
"intr": "intr_task_intr_2016", "intr": "intr_task_intr_2016",
"pretask": 2073, "pretask": 2073,
"followtask": 2075, "followtask": 2075,
"cond": [ "cond": [
2 3
], ],
"tiaozhuan": 67, "tiaozhuan": 67,
"order": 75, "order": 75,

257
src/json/tuisonglibao.json Normal file
View File

@ -0,0 +1,257 @@
{
"1": {
"id": 1,
"type": 1,
"num": [
5
],
"payId": [
"guanqialibao_1",
"guanqialibao_2",
"guanqialibao_3"
],
"time": 3600,
"displayCD": 7200,
"scale": 500
},
"2": {
"id": 2,
"type": 1,
"num": [
10
],
"payId": [
"guanqialibao_1",
"guanqialibao_2"
],
"time": 3600,
"displayCD": 7200,
"scale": 501
},
"3": {
"id": 3,
"type": 1,
"num": [
20
],
"payId": [
"guanqialibao_1",
"guanqialibao_3"
],
"time": 3600,
"displayCD": 7200,
"scale": 502
},
"4": {
"id": 4,
"type": 2,
"num": [
{
"a": "item",
"t": "1"
}
],
"payId": [
"daojulibao_1",
"daojulibao_2"
],
"time": 3600,
"displayCD": 7200,
"scale": 503
},
"5": {
"id": 5,
"type": 2,
"num": [
{
"a": "item",
"t": "2"
}
],
"payId": [
"daojulibao_1",
"daojulibao_3"
],
"time": 3600,
"displayCD": 7200,
"scale": 504
},
"6": {
"id": 6,
"type": 2,
"num": [
{
"a": "attr",
"t": "jinbi"
}
],
"payId": [
"daojulibao_1",
"daojulibao_2",
"daojulibao_3"
],
"time": 3600,
"displayCD": 7200,
"scale": 505
},
"7": {
"id": 7,
"type": 3,
"num": [
1
],
"payId": [
"zhanbailibao_1",
"zhanbailibao_2",
"zhanbailibao_3"
],
"time": 3600,
"displayCD": 7200,
"scale": 506
},
"8": {
"id": 8,
"type": 4,
"num": [
3
],
"payId": [
"choukalibao_1",
"choukalibao_2",
"choukalibao_3"
],
"time": 3600,
"displayCD": 7200,
"scale": 507
},
"9": {
"id": 9,
"type": 5,
"num": [
31
],
"payId": [
"lv30"
],
"time": 3600,
"displayCD": 3600,
"scale": 3300
},
"10": {
"id": 10,
"type": 5,
"num": [
45
],
"payId": [
"lv40"
],
"time": 3600,
"displayCD": 3600,
"scale": 3300
},
"11": {
"id": 11,
"type": 5,
"num": [
50
],
"payId": [
"lv55"
],
"time": 3600,
"displayCD": 3600,
"scale": 2000
},
"12": {
"id": 12,
"type": 5,
"num": [
53
],
"payId": [
"lv58"
],
"time": 3600,
"displayCD": 3600,
"scale": 2000
},
"13": {
"id": 13,
"type": 5,
"num": [
56
],
"payId": [
"lv60"
],
"time": 3600,
"displayCD": 3600,
"scale": 2000
},
"14": {
"id": 14,
"type": 5,
"num": [
60
],
"payId": [
"lv63"
],
"time": 3600,
"displayCD": 3600,
"scale": 2000
},
"15": {
"id": 15,
"type": 5,
"num": [
63
],
"payId": [
"lv66"
],
"time": 3600,
"displayCD": 3600,
"scale": 2000
},
"16": {
"id": 16,
"type": 5,
"num": [
66
],
"payId": [
"lv69"
],
"time": 3600,
"displayCD": 3600,
"scale": 1800
},
"17": {
"id": 17,
"type": 5,
"num": [
68
],
"payId": [
"lv72"
],
"time": 3600,
"displayCD": 3600,
"scale": 1800
},
"18": {
"id": 18,
"type": 5,
"num": [
70
],
"payId": [
"lv75"
],
"time": 3600,
"displayCD": 3600,
"scale": 1800
}
}

View File

@ -2,35 +2,35 @@
{ {
payId: '128jijin', payId: '128jijin',
prize: [ prize: [
{a:'item',t:'4',n:50},
{a:'item',t:'617',n:1},
{a:'attr',t:'rmbmoney',n:1000},
{a:'item',t:'9',n:1000},
{a:'attr',t:'rmbmoney',n:300},
{a:'attr',t:'rmbmoney',n:300},
{a:'item',t:'9',n:1000},
{a:'item',t:'4',n:10},
{a:'attr',t:'rmbmoney',n:500},
{a:'attr',t:'rmbmoney',n:300},
{a:'item',t:'9',n:1000},
{a:'item',t:'4',n:10}, {a:'item',t:'4',n:10},
{a:'attr',t:'rmbmoney',n:300}, {a:'attr',t:'rmbmoney',n:300},
{a:'item',t:'9',n:1000},
{a:'attr',t:'rmbmoney',n:300},
{a:'attr',t:'rmbmoney',n:300},
{a:'item',t:'9',n:3000},
{a:'attr',t:'rmbmoney',n:300},
{a:'attr',t:'rmbmoney',n:300},
{a:'item',t:'9',n:3000},
{a:'attr',t:'rmbmoney',n:500},
{a:'attr',t:'rmbmoney',n:300}, {a:'attr',t:'rmbmoney',n:300},
{a:'item',t:'9',n:2000}, {a:'item',t:'9',n:2000},
{a:'attr',t:'rmbmoney',n:300}, {a:'attr',t:'rmbmoney',n:300},
{a:'attr',t:'rmbmoney',n:300}, {a:'attr',t:'rmbmoney',n:300},
{a:'item',t:'609',n:1},
{a:'item',t:'4',n:10},
{a:'attr',t:'rmbmoney',n:500},
{a:'attr',t:'rmbmoney',n:300},
{a:'item',t:'18',n:300},
{a:'attr',t:'rmbmoney',n:300},
{a:'attr',t:'rmbmoney',n:300},
{a:'item',t:'6',n:20},
{a:'attr',t:'rmbmoney',n:300},
{a:'attr',t:'rmbmoney',n:300},
{a:'item',t:'9',n:3000}, {a:'item',t:'9',n:3000},
{a:'attr',t:'rmbmoney',n:300}, {a:'attr',t:'rmbmoney',n:300},
{a:'attr',t:'rmbmoney',n:300},
{a:'item',t:'4',n:10},
{a:'attr',t:'rmbmoney',n:500}, {a:'attr',t:'rmbmoney',n:500},
{a:'attr',t:'rmbmoney',n:300}, {a:'attr',t:'rmbmoney',n:500},
{a:'item',t:'20',n:200},
{a:'attr',t:'rmbmoney',n:300},
{a:'attr',t:'rmbmoney',n:300},
{a:'item',t:'9',n:3000},
{a:'attr',t:'rmbmoney',n:300},
{a:'attr',t:'rmbmoney',n:300},
{a:'attr',t:'rmbmoney',n:1000},
{a:'item',t:'628',n:1}, {a:'item',t:'628',n:1},
], ],
//奖励总价值X钻 //奖励总价值X钻
@ -43,36 +43,36 @@
{ {
payId: '328jijin', payId: '328jijin',
prize: [ prize: [
{a:'item',t:'4',n:30}, {a:'item',t:'611',n:1},
{a:'attr',t:'rmbmoney',n:800}, {a:'item',t:'617',n:2},
{a:'attr',t:'rmbmoney',n:800}, {a:'attr',t:'rmbmoney',n:2000},
{a:'item',t:'10',n:300},
{a:'attr',t:'rmbmoney',n:800},
{a:'attr',t:'rmbmoney',n:800},
{a:'item',t:'628',n:1},
{a:'item',t:'4',n:20},
{a:'attr',t:'rmbmoney',n:800},
{a:'attr',t:'rmbmoney',n:800},
{a:'item',t:'628',n:1},
{a:'attr',t:'rmbmoney',n:800},
{a:'attr',t:'rmbmoney',n:800},
{a:'item',t:'628',n:1},
{a:'attr',t:'rmbmoney',n:800},
{a:'attr',t:'rmbmoney',n:800},
{a:'item',t:'628',n:1},
{a:'attr',t:'rmbmoney',n:800},
{a:'attr',t:'rmbmoney',n:800},
{a:'item',t:'4',n:20},
{a:'attr',t:'rmbmoney',n:800},
{a:'attr',t:'rmbmoney',n:800},
{a:'item',t:'10',n:400}, {a:'item',t:'10',n:400},
{a:'attr',t:'rmbmoney',n:800}, {a:'attr',t:'rmbmoney',n:2000},
{a:'attr',t:'rmbmoney',n:800}, {a:'attr',t:'rmbmoney',n:2000},
{a:'item',t:'10',n:400},
{a:'item',t:'4',n:20},
{a:'attr',t:'rmbmoney',n:2000},
{a:'attr',t:'rmbmoney',n:2000},
{a:'item',t:'10',n:400},
{a:'attr',t:'rmbmoney',n:2000},
{a:'attr',t:'rmbmoney',n:2000},
{a:'item',t:'10',n:400},
{a:'attr',t:'rmbmoney',n:2000},
{a:'attr',t:'rmbmoney',n:2000},
{a:'item',t:'10',n:400},
{a:'attr',t:'rmbmoney',n:2000},
{a:'attr',t:'rmbmoney',n:2000},
{a:'item',t:'4',n:20},
{a:'attr',t:'rmbmoney',n:2000},
{a:'attr',t:'rmbmoney',n:2000},
{a:'item',t:'10',n:400},
{a:'attr',t:'rmbmoney',n:2000},
{a:'attr',t:'rmbmoney',n:2000},
{a:'item',t:'10',n:400},
{a:'attr',t:'rmbmoney',n:2000},
{a:'attr',t:'rmbmoney',n:2000},
{a:'attr',t:'rmbmoney',n:2000},
{a:'item',t:'10',n:400}, {a:'item',t:'10',n:400},
{a:'attr',t:'rmbmoney',n:800},
{a:'attr',t:'rmbmoney',n:800},
{a:'attr',t:'rmbmoney',n:1500},
{a:'item',t:'617',n:1},
], ],
//奖励总价值X钻 //奖励总价值X钻
num1: 70080, num1: 70080,

View File

@ -1179,7 +1179,7 @@ type gc_shiwucom = {
}, "comment": { "jichu_colour": string, "fujia_colour": string, "fujianum_colour": string, "putongxilian": string, "gaojixilian": string, "hero_zhuanshu": string, "buff_zhuanshu": string, "skill_zhuanshu": string, "chongzhuneed": string, "chongzhurate": string, "tilianhuobi": string, [x: string]: any }, [x: string]: any }, "comment": { "jichu_colour": string, "fujia_colour": string, "fujianum_colour": string, "putongxilian": string, "gaojixilian": string, "hero_zhuanshu": string, "buff_zhuanshu": string, "skill_zhuanshu": string, "chongzhuneed": string, "chongzhurate": string, "tilianhuobi": string, [x: string]: any }, [x: string]: any
} }
type gc_shiwuleichong = { "dayPayNeed": number, "data": { "time": number, "tasks": { "total": number, "prize": { "a": string, "t": string, "n": number, [x: string]: any }[], [x: string]: any }[], [x: string]: any }[], [x: string]: any } type gc_shiwuleichong = { tasks: { day: number, payid: string }[] }
type gc_shoot = { [key: string]: { "name": string, "num": number, "speed": number, "cartridge": number, "time": number, "prize": { [key: string]: { "describe": string, "hit": number, "content": { "a": string, "t": string, "n": number, [x: string]: any }[], [x: string]: any } }, [x: string]: any } } type gc_shoot = { [key: string]: { "name": string, "num": number, "speed": number, "cartridge": number, "time": number, "prize": { [key: string]: { "describe": string, "hit": number, "content": { "a": string, "t": string, "n": number, [x: string]: any }[], [x: string]: any } }, [x: string]: any } }

View File

@ -13,7 +13,7 @@ export default {
/**跨服 ws url */ /**跨服 ws url */
corssWsUrl: "ws://10.0.1.20:10003", corssWsUrl: "ws://10.0.1.20:10003",
/**服务器id */ /**服务器id */
serverId: 0, serverId: 1001,
/**redis url */ /**redis url */
redisUrl: 'redis://:lyMaple525458@10.0.1.20:6379/0', redisUrl: 'redis://:lyMaple525458@10.0.1.20:6379/0',
/**mongodb url */ /**mongodb url */
@ -27,7 +27,7 @@ export default {
/**服务器时间 */ /**服务器时间 */
time: '', time: '',
/**开服时间 */ /**开服时间 */
openTime: '2022-10-10 1:0:0', openTime: '2023-12-11 1:0:0',
/**项目名称 */ /**项目名称 */
projectName: 'heijiao', projectName: 'heijiao',
/**加密key */ /**加密key */

View File

@ -1,13 +0,0 @@
import {ObjectId} from "mongodb";
import {ResOpen} from "../shared/protocols/pushgift/PtlOpen";
export type Gift = {
id: string
uid: string
buy: number[]
ctime: number
passTime: number
ext_data: { [key: string]: any }
}
export type CollectionPushGift = Gift & { _id: ObjectId };

View File

@ -172,7 +172,7 @@ export class EmailFun {
sendEmail.sid = uid.split('_')[0] sendEmail.sid = uid.split('_')[0]
} }
if (prize.length > 0) { if (prize?.length > 0) {
sendEmail.prizeData = { sendEmail.prizeData = {
prize: email.prize, prize: email.prize,
isGet: false isGet: false
@ -186,27 +186,29 @@ export class EmailFun {
sendEmail.lngContent = email.lngContent sendEmail.lngContent = email.lngContent
} }
if (!isCross) { //太亏了换其他清理机制getAllEmail是性能消耗大户
let emailList = await this.getAllEmail(uid); //todo.. 换其他清理机制
if (emailList.length >= 50) { // if (!isCross) {
emailList.sort((a, b) => { // let emailList = await this.getAllEmail(uid);
let noPrizeA = a.prizeData == undefined ? 0 : 1; // if (emailList.length >= 50) {
let noPrizeB = b.prizeData == undefined ? 0 : 1; // emailList.sort((a, b) => {
let getA = a.prizeData?.isGet == true ? 0 : 1; // let noPrizeA = a.prizeData == undefined ? 0 : 1;
let getB = b.prizeData?.isGet == true ? 0 : 1; // let noPrizeB = b.prizeData == undefined ? 0 : 1;
// let getA = a.prizeData?.isGet == true ? 0 : 1;
// let getB = b.prizeData?.isGet == true ? 0 : 1;
if (noPrizeA != noPrizeB) { // if (noPrizeA != noPrizeB) {
return noPrizeA - noPrizeB; // return noPrizeA - noPrizeB;
} else if (getA != getB) { // } else if (getA != getB) {
return getA - getB; // return getA - getB;
} // }
return a.createTime - b.createTime; // return a.createTime - b.createTime;
}); // });
this.removeEmail(uid, emailList[0]._id); // this.removeEmail(uid, emailList[0]._id);
G.server.sendMsgByUid(uid, 'msg_s2c/EmailDel', emailList[0]._id); // G.server.sendMsgByUid(uid, 'msg_s2c/EmailDel', emailList[0]._id);
} // }
} // }
let _id = (await G.mongodb.collection('email').insertOne({ let _id = (await G.mongodb.collection('email').insertOne({
ttl: new Date(), ...G.mongodb.conversionIdObj(sendEmail) ttl: new Date(), ...G.mongodb.conversionIdObj(sendEmail)

View File

@ -17,7 +17,7 @@ export class EquipFun {
//穿戴装备时该装备穿戴在另一个英雄身上 //穿戴装备时该装备穿戴在另一个英雄身上
if (change.wearaId != undefined && equip.wearaId && equip.wearaId != change.wearaId && changeHero) { if (change.wearaId != undefined && equip.wearaId && equip.wearaId != change.wearaId && changeHero) {
let takeHero = await G.redis.get('hero', call.uid, equip.wearaId); let takeHero = await HeroFun.getHero(call, equip.wearaId);
if (takeHero) { if (takeHero) {
let _equip = Object.assign({}, takeHero.equip); let _equip = Object.assign({}, takeHero.equip);
_equip[G.gc.equip[equip.equipId].type] = ''; _equip[G.gc.equip[equip.equipId].type] = '';
@ -27,9 +27,9 @@ export class EquipFun {
Object.assign(equip, change); Object.assign(equip, change);
for (let k in change) { // for (let k in change) {
G.redis.set('equip', call.uid, equip._id, k as keyof CollectionEquip, change[k]); // G.redis.set('equip', call.uid, equip._id, k as keyof CollectionEquip, change[k]);
} // }
G.mongodb.collection('equip').updateOne({uid: call.uid, _id: new ObjectId(equip._id)}, {$set: {...change}}); G.mongodb.collection('equip').updateOne({uid: call.uid, _id: new ObjectId(equip._id)}, {$set: {...change}});
call.addEventMsg('msg_s2c/EquipChange', equip._id, change); call.addEventMsg('msg_s2c/EquipChange', equip._id, change);
} }
@ -37,24 +37,37 @@ export class EquipFun {
/** /**
* *
*/ */
static async getEquip(call: ApiCall, oid: string): Promise<CollectionEquip>; static async getEquip(call: ApiCall, oid?: string): Promise<CollectionEquip>;
static async getEquip(call: ApiCall, oid: string[]): Promise<CollectionEquip[]>; static async getEquip(call: ApiCall, oid?: string[]): Promise<CollectionEquip[]>;
static async getEquip(call: ApiCall, oid: string | string[]) { static async getEquip(call: ApiCall, oid?: string | string[]) {
if (typeof oid == 'string') { if (typeof oid == 'string') {
let data = await G.redis.get('equip', call.uid, oid); let {_id, ...info} = await G.mongodb.collection('equip').findOne({
if (!data) { _id: G.mongodb.conversionId(oid)
let {_id, ...info} = await G.mongodb.collection('equip').findOne({ })
_id: G.mongodb.conversionId(oid) let data = Object.assign({_id: _id.toHexString()}, info)
})
data = Object.assign({_id: _id.toHexString()}, info)
}
return data return data
} else { } else {
let equips = await G.mongodb.collection('equip').find({ let filter = {
uid: call.uid, uid: call.uid,
_id: {$in: oid.map(v => G.mongodb.conversionId(v))} }
}).toArray(); if(oid && oid.length > 0){
filter['_id'] = {$in: oid.map(v => G.mongodb.conversionId(v))}
}
let equips = await G.mongodb.collection('equip').find(filter).toArray();
return equips.map(v => G.mongodb.conversionIdObj(v)); return equips.map(v => G.mongodb.conversionIdObj(v));
} }
} }
/**
*
* redis返回的格式
*/
static async getAllEquips(call: ApiCall):Promise<k_v<CollectionEquip>>{
let res = {};
let equips:CollectionEquip[] = await this.getEquip(call,[]);
equips.map(v => {
res['_'+v._id] = v;
});
return res;
}
} }

View File

@ -18,9 +18,11 @@ export async function clearGud(uid) {
G.ioredis.del(`gudVersion:${uid}_pid`); G.ioredis.del(`gudVersion:${uid}_pid`);
G.ioredis.del(`gudVersion:${uid}_ver`); G.ioredis.del(`gudVersion:${uid}_ver`);
} }
G.redis.del("equip",uid);
G.redis.del("hero",uid); if(await G.redis.type('tanxian', uid)){
G.redis.del("shiwu",uid); console.log('清空tanxian Redis',uid);
G.redis.del("tanxian",uid);
}
}; };
/** /**

View File

@ -24,9 +24,9 @@ export class HeroFun {
hero.zhanli = HeroShared.getHeroZhanLi(hero, call.otherBuff, Object.values(call.conn.gud.heroPos).indexOf(hero._id)); hero.zhanli = HeroShared.getHeroZhanLi(hero, call.otherBuff, Object.values(call.conn.gud.heroPos).indexOf(hero._id));
change.zhanli = hero.zhanli; change.zhanli = hero.zhanli;
for (let k in change) { // for (let k in change) {
await G.redis.set('hero', call.uid, hero._id, k as any, change[k]); // await G.redis.set('hero', call.uid, hero._id, k as any, change[k]);
} // }
await G.mongodb.collection('hero').updateOne({uid: call.uid, _id: new ObjectId(hero._id)}, { await G.mongodb.collection('hero').updateOne({uid: call.uid, _id: new ObjectId(hero._id)}, {
$set: { $set: {
@ -41,13 +41,13 @@ export class HeroFun {
/**获取英雄 */ /**获取英雄 */
static async getHero(call: call, oid: string) { static async getHero(call: call, oid: string) {
let data = await G.redis.get('hero', call.uid, oid); //let data = await G.redis.get('hero', call.uid, oid);
if (!data) { // 如果redis中的hero数据被清理掉 直接查询数据库 //if (!data) { // 如果redis中的hero数据被清理掉 直接查询数据库
let {_id, ...info} = await G.mongodb.collection("hero").findOne({ let {_id, ...info} = await G.mongodb.collection("hero").findOne({
_id: G.mongodb.conversionId(oid) _id: G.mongodb.conversionId(oid)
}) })
data = Object.assign({_id: _id.toHexString()}, info) let data = Object.assign({_id: _id.toHexString()}, info)
} //}
return data return data
} }

View File

@ -149,6 +149,12 @@ export class PayFun {
needVip: 0, needVip: 0,
front: {} front: {}
} }
} else if (payId == '136GiftAll') {
// 136礼包一键购买加入所有礼包奖励
conf = {
...conf,
prize: R.compose(R.flatten(), R.map(i => i.prize), R.filter(i => i.id.indexOf('136Gift') != -1), R.values())(G.gc.pay)
}
} }
return conf return conf
} }
@ -225,7 +231,7 @@ export class PayFun {
prize.push(...conf.prize) prize.push(...conf.prize)
} }
let isReplaceConf = await this.checkBuysAfterPay(uid, payId, conf, payArgs) let isReplaceConf = await this.checkBuysAfterPay(uid, payId, conf, payArgs, player)
if (isReplaceConf) { if (isReplaceConf) {
let prizePayId = `zuanshi_${conf.money}` let prizePayId = `zuanshi_${conf.money}`
payArgs.toPrizePayId = prizePayId payArgs.toPrizePayId = prizePayId
@ -270,7 +276,7 @@ export class PayFun {
} }
}); });
G.emit('PLAYER_PAY', player, payId, payArgs); G.emit('PLAYER_PAY', player, payId, payArgs, call);
G.emit("Class_task_116", 'Class_task_116', call, 1, 0); G.emit("Class_task_116", 'Class_task_116', call, 1, 0);
} }
@ -314,8 +320,9 @@ export class PayFun {
* @param payId * @param payId
* @param conf * @param conf
* @param payArgs * @param payArgs
* @param player
*/ */
static async checkBuysAfterPay(uid, payId, conf, payArgs) { static async checkBuysAfterPay(uid, payId, conf, payArgs, player) {
if (payId == 'G123SendGift') { if (payId == 'G123SendGift') {
let giftInfo = await G.mongodb.collection('giftLog').findOne({popup_id: payArgs.popup_id}); let giftInfo = await G.mongodb.collection('giftLog').findOne({popup_id: payArgs.popup_id});
if (giftInfo.purchaseLimitAmount && giftInfo.buyNumber >= giftInfo.purchaseLimitAmount && number(giftInfo.price) > 0) { if (giftInfo.purchaseLimitAmount && giftInfo.buyNumber >= giftInfo.purchaseLimitAmount && number(giftInfo.price) > 0) {
@ -327,6 +334,12 @@ export class PayFun {
buyLog = buyLog.filter(v => v.time >= PublicShared.getToDayZeroTime(G.time)); buyLog = buyLog.filter(v => v.time >= PublicShared.getToDayZeroTime(G.time));
} }
if (conf.buys > 0 && buyLog.length >= conf.buys) return true; if (conf.buys > 0 && buyLog.length >= conf.buys) return true;
//针对周末礼包的单独处理
if (payId.indexOf('wkdlibao') != -1) {
let call = this.getCall(player)
let conf = await zmlbGetConf(call, {payId})
if (buyLog.length && buyLog.length >= conf.buyNum) return true
}
} }
return false return false
} }
@ -376,10 +389,20 @@ export class PayFun {
if (conf.time != -1 && buyLog.slice(-1)[0]?.eTime > G.time && conf.buys == 0 && payId.indexOf('wkdlibao') == -1) { if (conf.time != -1 && buyLog.slice(-1)[0]?.eTime > G.time && conf.buys == 0 && payId.indexOf('wkdlibao') == -1) {
return G.server.sendMsgByUid(player.uid, 'msg_s2c/PayResult', {code: -2}); return G.server.sendMsgByUid(player.uid, 'msg_s2c/PayResult', {code: -2});
} }
if (payId.indexOf('136Gift') != -1 && payId != '136Gift1') { //针对每日礼包的单独处理
buyLog = await this.getPayLog(player.uid, '136Gift1'); let zeroTime = PublicShared.getToDayZeroTime(G.time)
if (buyLog.slice(-1)[0]?.eTime > G.time) return G.server.sendMsgByUid(player.uid, 'msg_s2c/PayResult', {code: -3}); if (payId.indexOf('136Gift') != -1 && payId != '136GiftAll') {
let buyLog136 = await this.getPayLog(player.uid, '136GiftAll');
buyLog136 = buyLog136.filter(v => v.time >= zeroTime);
if (buyLog136.length) return G.server.sendMsgByUid(player.uid, 'msg_s2c/PayResult', {code: -1});
} }
if (payId.indexOf('136Gift') != -1 && payId == '136GiftAll') {
let ids = R.compose(R.map(i => i.id), R.filter(i => i.id.indexOf('136Gift') != -1 && i.id != '136GiftAll'), R.values())(G.gc.pay)
let buyLog136 = await this.getPayLogs(player.uid, ids);
let buyLog136list = R.compose(R.filter(v => v.time >= zeroTime), R.flatten(), R.values())(buyLog136)
if (buyLog136list.length) return G.server.sendMsgByUid(player.uid, 'msg_s2c/PayResult', {code: -1});
}
//针对周末礼包的单独处理
if (payId.indexOf('wkdlibao') != -1) { if (payId.indexOf('wkdlibao') != -1) {
let call = this.getCall(player) let call = this.getCall(player)
let conf = await zmlbGetConf(call, {payId}) let conf = await zmlbGetConf(call, {payId})
@ -478,9 +501,10 @@ export class PayFun {
* *
*/ */
static async getPayDaysAllPayNum(uid: string, sTime: number, eTime: number) { static async getPayDaysAllPayNum(uid: string, sTime: number, eTime: number) {
let logs = await G.mongodb.collection('dayPay').find({uid: uid}).toArray() || []; let logs = await G.mongodb.collection('dayPay').find({
uid: uid,
logs = logs.filter(log => log.time >= sTime && log.time < eTime); time: {$gte: sTime, $lt: eTime}
}).toArray() || [];
if (logs.length <= 0) return 0; if (logs.length <= 0) return 0;
return logs.map(log => log.payNum).reduce((a, b) => a + b); return logs.map(log => log.payNum).reduce((a, b) => a + b);

View File

@ -350,10 +350,10 @@ export class PlayerFun {
let id = result.insertedIds[key].toHexString(); let id = result.insertedIds[key].toHexString();
let {_id, ...ops} = v; let {_id, ...ops} = v;
G.redis.set('equip', call.uid, id, { // G.redis.set('equip', call.uid, id, {
_id: id, // _id: id,
...ops // ...ops
}); // });
Wjjl.setVal(call.uid, `has_equip_color_${G.gc.equip[ops.equipId].colour}`, 1, false); Wjjl.setVal(call.uid, `has_equip_color_${G.gc.equip[ops.equipId].colour}`, 1, false);
@ -432,12 +432,12 @@ export class PlayerFun {
//hero/apiGetList里会G.redis.set('hero', call.uid, kvList); //hero/apiGetList里会G.redis.set('hero', call.uid, kvList);
//在这之后再执行下面的代码则不会报错 //在这之后再执行下面的代码则不会报错
if (await G.redis.type('hero', call.uid) != null) { // if (await G.redis.type('hero', call.uid) != null) {
G.redis.set('hero', call.uid, id, { // G.redis.set('hero', call.uid, id, {
_id: id, // _id: id,
...ops // ...ops
}); // });
} // }
call.addEventMsg('msg_s2c/HeroChange', id, { call.addEventMsg('msg_s2c/HeroChange', id, {

View File

@ -20,7 +20,7 @@ export class CrossEmailPull extends Scheduler {
async start() { async start() {
/**同步跨服邮件*/ /**同步跨服邮件*/
G.clientCross.callApi("email/GetCrossEmail", {server_id: G.config.serverId + ""}).then((res) => { G.clientCross.callApi("email/GetCrossEmail", {server_id: G.config.serverId + ""}).then((res) => {
if(!res.isSucc)return; if (!res.isSucc) return;
res.res.emails.forEach(async (email) => { res.res.emails.forEach(async (email) => {
if (email.uid != "system") { if (email.uid != "system") {
await EmailFun.addEmail(email) await EmailFun.addEmail(email)
@ -29,6 +29,9 @@ export class CrossEmailPull extends Scheduler {
} }
await EmailFun.addEmail(email) await EmailFun.addEmail(email)
}) })
if (res.res.emails.length > 0) {
G.clientCross.callApi("email/DelCrossEmail", {eids: res.res.emails.map(e => e._id)})
}
}) })
await this.ctorStartTime() await this.ctorStartTime()
} }

View File

@ -38,7 +38,7 @@ export class ShiwuFun {
//穿戴饰物时该装备穿戴在另一个英雄身上 //穿戴饰物时该装备穿戴在另一个英雄身上
if (change.wearId != undefined && shiwu.wearId && shiwu.wearId != change.wearId && changeHero) { if (change.wearId != undefined && shiwu.wearId && shiwu.wearId != change.wearId && changeHero) {
let takeHero = await G.redis.get('hero', call.uid, shiwu.wearId); let takeHero = await HeroFun.getHero(call, shiwu.wearId);
if (takeHero) { if (takeHero) {
let _shiwu = Object.assign({}, takeHero.shiwu); let _shiwu = Object.assign({}, takeHero.shiwu);
let _pos = Object.keys(_shiwu).filter(pos => _shiwu[pos]._id == shiwu._id)[0]; let _pos = Object.keys(_shiwu).filter(pos => _shiwu[pos]._id == shiwu._id)[0];
@ -55,7 +55,7 @@ export class ShiwuFun {
//属性发生变化并且穿戴在英雄身上时 //属性发生变化并且穿戴在英雄身上时
if (change.wearId == undefined && shiwu.wearId) { if (change.wearId == undefined && shiwu.wearId) {
let takeHero = await G.redis.get('hero', call.uid, shiwu.wearId); let takeHero = await HeroFun.getHero(call, shiwu.wearId);
if (takeHero) { if (takeHero) {
let _shiwu = Object.assign({}, takeHero.shiwu); let _shiwu = Object.assign({}, takeHero.shiwu);
let _pos = Object.keys(_shiwu).filter(pos => _shiwu[pos]._id == shiwu._id)[0]; let _pos = Object.keys(_shiwu).filter(pos => _shiwu[pos]._id == shiwu._id)[0];

View File

@ -1,5 +1,6 @@
import {ApiCall} from "tsrpc" import {ApiCall} from "tsrpc"
import {YangChengMuBiaofun} from "../api_s2c/event/yangchengmubiao/fun" 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 { YangChengMuBiaofun } from "../api_s2c/event/yangchengmubiao/fun"
import {Wjjl} from "../module/collection_wjjl" import {Wjjl} from "../module/collection_wjjl"
import {PublicShared} from "../shared/public/public" import {PublicShared} from "../shared/public/public"
@ -73,6 +74,8 @@ export module manager {
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)
} }
// 任务数值, 和检测值,看情况需要上层复写 // 任务数值, 和检测值,看情况需要上层复写
@ -763,6 +766,24 @@ export module manager {
return call.conn.gud?.helpHeros?.length || 0; return call.conn.gud?.helpHeros?.length || 0;
} }
} }
// 第56个任务 完成圣诞活动小游戏
export class Class_task_154 extends BaseClass {
stype = 154
isinc = 1
async initVal(call: ApiCall, con) {
return 1;
}
}
// 第57个任务 领取每日任务最终宝箱
export class Class_task_155 extends BaseClass {
stype = 155
isinc = 0
async initVal(call: ApiCall, con) {
return 1;
}
}
} }

View File

@ -2,6 +2,7 @@ import {
Collection, Collection,
CreateIndexesOptions, CreateIndexesOptions,
Db, Db,
FindCursor,
IndexDescription, IndexDescription,
IndexSpecification, IndexSpecification,
MongoClient, MongoClient,
@ -18,6 +19,7 @@ import {HuoDongFun} from './public/huodongfun';
import {zbsGroup} from './api_s2c/hbzb/zbs/fun'; import {zbsGroup} from './api_s2c/hbzb/zbs/fun';
import {clusterRunOnce} from './clusterUtils'; import {clusterRunOnce} from './clusterUtils';
import { PublicShared } from './shared/public/public'; import { PublicShared } from './shared/public/public';
import { addGameLog } from './gameLog';
const indexs: Partial<{ [k in keyof MongodbCollections]: IndexDescription[] }> = { const indexs: Partial<{ [k in keyof MongodbCollections]: IndexDescription[] }> = {
item: [ item: [
@ -441,13 +443,22 @@ export async function initMongoDB() {
//可结合查看node_modules\mongodb\lib\connection_string.js //可结合查看node_modules\mongodb\lib\connection_string.js
//maxPoolSize默认值100 //maxPoolSize默认值100
let option:MongoClientOptions; /**
* MongoDB连接池具有多个参数
* maxPoolSize100
* minPoolSize0
* maxIdleTimeMS0
* waitQueueTimeoutMS0
*/
let option:MongoClientOptions = {
//空闲5分钟后关闭
maxIdleTimeMS: 5*60*1000
};
//跨服只有1个直接采用默认配置就行 //跨服只有1个直接采用默认配置就行
if(G.argv.serverType != 'cross'){ if(G.argv.serverType != 'cross'){
if(PublicShared.getOpenServerDay() > 3){ if(PublicShared.getOpenServerDay() > 3){
option = { option.maxPoolSize=10;
maxPoolSize: 10
}
} }
} }
@ -461,7 +472,8 @@ export async function initMongoDB() {
console.log('connect crossmongodb ......'); console.log('connect crossmongodb ......');
//本服里,维持住跟跨服数据库的链接 //本服里,维持住跟跨服数据库的链接
let crossClient = await MongoClient.connect(G.config.crossMongodbUrl,{ let crossClient = await MongoClient.connect(G.config.crossMongodbUrl,{
maxPoolSize:10 maxPoolSize:10,
maxIdleTimeMS: 5*60*1000
}); });
G.crossmongodb = new _mongodb(crossClient.db(G.config.corssDBName || "")); G.crossmongodb = new _mongodb(crossClient.db(G.config.corssDBName || ""));
console.log('connect crossmongodb succ'); console.log('connect crossmongodb succ');
@ -626,4 +638,27 @@ export class _mongodb {
indexInformation(name) { indexInformation(name) {
return this.db.indexInformation(name) return this.db.indexInformation(name)
} }
}
//@ts-ignore
FindCursor.prototype._toArray = FindCursor.prototype.toArray;
//@ts-ignore
FindCursor.prototype.toArray = async function(){
let rss = await this._toArray();
//如果返回的数据超过50条
if(rss.length>50){
addGameLog("system","findCount",null,{
collection: this.namespace.collection,
db:this.namespace.db,
count:rss.length
})
console.log("system,findCount",{
collection: this.namespace.collection,
db:this.namespace.db,
count:rss.length
})
console.trace();
}
return rss;
} }

View File

@ -60,10 +60,9 @@ export async function initRedis() {
//启动前清理redis残余数据 //启动前清理redis残余数据
clusterRunOnce(async () => { clusterRunOnce(async () => {
await clearRedis(); await clearRedis();
await setRedis();
}) })
if (G.config.cleanRedis) await redisClient.flushDb(); if (G.config.cleanRedis) await redisClient.flushDb();
await setRedis();
console.log('connect redis succ'); console.log('connect redis succ');
} }
@ -75,9 +74,9 @@ async function clearRedis() {
G.redis.fromatKey('jjc'), G.redis.fromatKey('jjc'),
G.redis.fromatKey('user'), G.redis.fromatKey('user'),
G.redis.fromatKey('item'), G.redis.fromatKey('item'),
//G.redis.fromatKey('equip'), G.redis.fromatKey('hero'),
//G.redis.fromatKey('hero'), G.redis.fromatKey('equip'),
//G.redis.fromatKey('shiwu'), G.redis.fromatKey('shiwu'),
//G.redis.fromatKey('gbtx'), //G.redis.fromatKey('gbtx'),
//G.redis.fromatKey('dxlt'), //G.redis.fromatKey('dxlt'),
]) ])

View File

@ -30,4 +30,4 @@ export type defaultSyncBtn = {
export type syncBtnKeys = 'shouchong' | 'kaifukuanghuan' | jijinType | 'zhanling' | 'qiridenglu' export type syncBtnKeys = 'shouchong' | 'kaifukuanghuan' | jijinType | 'zhanling' | 'qiridenglu'
| 'xianshilibao' | 'yibaichou' | 'huobanzhaomu' | 'xianshizhaomu' | 'xianshilibao' | 'yibaichou' | 'huobanzhaomu' | 'xianshizhaomu'
| 'leijichongzhi' | 'xinshoulibao' | 'jierihuodong' | 'yuedujijin' | 'zixuanlibao' | 'diaoluoduihuan' | 'chuanshuozhilu' | 'leijichongzhi' | 'xinshoulibao' | 'jierihuodong' | 'yuedujijin' | 'zixuanlibao' | 'diaoluoduihuan' | 'chuanshuozhilu'
| 'yangchengmubiao' | 'G123Gift' | 'yangchengmubiao' | 'G123Gift' | 'christmas'

View File

@ -1,18 +1,10 @@
/** /**
* 15 * 15
*/ */
export type ReqOpen = { export type ReqOpen = {};
};
export type ResOpen = { export type ResOpen = {
/**礼包组 取G.gc.shiwuleichong[index] */ /**礼包组 取G.gc.shiwuleichong[index] */
index: number; day: number;
/**开始时间 倒计时显示 sTime+G.gc.shiwuleichong[index].time */ payIds: string[];
sTime: number;
/**已领取的奖励下标 */
recIndex: number[];
/**已充值的天数 */
payDay: number;
}; };

View File

@ -1,13 +0,0 @@
import { prizeType } from '../../type';
/**
* 15
*/
export type ReqRec = {
index: number;
};
export type ResRec = {
prize: prizeType[];
};

View File

@ -1 +0,0 @@
export type MsgPushGiftChange = 1;

View File

@ -1,5 +0,0 @@
import {Gift} from "../../../module/collection_pushgift";
export type ReqOpen = {}
export type ResOpen = { gifts: Gift[] }

File diff suppressed because it is too large Load Diff

View File

@ -1,10 +1,10 @@
import { ResGetList } from '../protocols/hero/PtlGetList'; import {ResGetList} from '../protocols/hero/PtlGetList';
import { player } from '../protocols/user/type'; import {player} from '../protocols/user/type';
import { EquipShared } from './equip'; import {EquipShared} from './equip';
import { PeijianShared } from './peijian'; import {PeijianShared} from './peijian';
import { PlayerShared } from './player'; import {PlayerShared} from './player';
import { PublicShared } from './public'; import {PublicShared} from './public';
import { ShiwuShared } from './shiwu'; import {ShiwuShared} from './shiwu';
export type otherBuff = Partial<player & { export type otherBuff = Partial<player & {
allBuff: k_v<number>; allBuff: k_v<number>;
@ -23,6 +23,7 @@ export class HeroShared {
return allBuff; return allBuff;
} }
/** /**
* *
* @param hero * @param hero
@ -30,7 +31,7 @@ export class HeroShared {
*/ */
static getHeroBasicAttr(hero: heroDataType, otherBuff: otherBuff = G.otherBuff, pos = 0) { static getHeroBasicAttr(hero: heroDataType, otherBuff: otherBuff = G.otherBuff, pos = 0) {
let jiban = 0; let jiban = 0;
let buff: k_v<any> = { skillArr: [] }; let buff: k_v<any> = {skillArr: []};
let heroConf = G.gc.hero[hero.heroId]; let heroConf = G.gc.hero[hero.heroId];
let heroLv = G.gc.herolv[heroConf.lvup]; let heroLv = G.gc.herolv[heroConf.lvup];
let heroGrow = G.gc.herogrow[heroConf.jjup]?.[hero.jieji]; let heroGrow = G.gc.herogrow[heroConf.jjup]?.[hero.jieji];
@ -39,7 +40,7 @@ export class HeroShared {
for (let k in heroLv.buff) { for (let k in heroLv.buff) {
let val = heroLv.buff[k]; let val = heroLv.buff[k];
if (typeof val == 'number') buff[k] = val; if (typeof val == 'number') buff[k] = val;
else buff[k] = PublicShared.eval(val, { lv: hero.lv }); else buff[k] = PublicShared.eval(val, {lv: hero.lv});
// else buff[k] = Math.floor(new Function(`let lv=${hero.lv}; return ${val}`)()); // else buff[k] = Math.floor(new Function(`let lv=${hero.lv}; return ${val}`)());
} }
@ -126,7 +127,7 @@ export class HeroShared {
PublicShared.mergeProperty(buff, PeijianShared.getAttr(p)); PublicShared.mergeProperty(buff, PeijianShared.getAttr(p));
let conf = G.gc.peijian[p.peijianId]; let conf = G.gc.peijian[p.peijianId];
if (conf.suit) { if (conf.suit) {
if (!suitObj[conf.suit]) suitObj[conf.suit] = { num: 0, minLv: 0 }; if (!suitObj[conf.suit]) suitObj[conf.suit] = {num: 0, minLv: 0};
suitObj[conf.suit].num++; suitObj[conf.suit].num++;
if (!suitObj[conf.suit].minLv || p.lv < suitObj[conf.suit].minLv) suitObj[conf.suit].minLv = p.lv; if (!suitObj[conf.suit].minLv || p.lv < suitObj[conf.suit].minLv) suitObj[conf.suit].minLv = p.lv;
} }
@ -172,7 +173,7 @@ export class HeroShared {
if (hero.qiannneg) { if (hero.qiannneg) {
for (let type in hero.qiannneg) { for (let type in hero.qiannneg) {
// console.log(PublicShared.mergeProperty(buff, G.gc.hero_qianneng[type]?.[hero.qiannneg[type]].buff)) // console.log(PublicShared.mergeProperty(buff, G.gc.hero_qianneng[type]?.[hero.qiannneg[type]].buff))
for(let i = 1; i <= hero.qiannneg[type]; i++) { for (let i = 1; i <= hero.qiannneg[type]; i++) {
G.gc.hero_qianneng[type]?.[i] && PublicShared.mergeProperty(buff, G.gc.hero_qianneng[type]?.[i].buff); G.gc.hero_qianneng[type]?.[i] && PublicShared.mergeProperty(buff, G.gc.hero_qianneng[type]?.[i].buff);
} }
} }
@ -260,7 +261,7 @@ export class HeroShared {
if (otherBuff?.skills) { if (otherBuff?.skills) {
for (let [id, lv] of Object.entries(otherBuff.skills)) { for (let [id, lv] of Object.entries(otherBuff.skills)) {
if (lv && G.gc.xunlianjihua[id].use == 0) { if (lv && G.gc.xunlianjihua[id].use == 0) {
PublicShared.mergeProperty(buff, Object.fromEntries([G.gc.xunlianjihua[id].skill].map(k => [k, PublicShared.eval(G.gc.xunlianjihua[id].v[0], { slv: lv })]))); PublicShared.mergeProperty(buff, Object.fromEntries([G.gc.xunlianjihua[id].skill].map(k => [k, PublicShared.eval(G.gc.xunlianjihua[id].v[0], {slv: lv})])));
} }
} }
} }
@ -286,6 +287,7 @@ export class HeroShared {
return buff; return buff;
}; };
/**修正属性 数值取整*/ /**修正属性 数值取整*/
static amendAttr(buff: k_v<number>) { static amendAttr(buff: k_v<number>) {
for (let k in buff) { for (let k in buff) {
@ -294,6 +296,7 @@ export class HeroShared {
buff[k] = Math.floor(buff[k]); buff[k] = Math.floor(buff[k]);
} }
} }
/** /**
* *
* @param hero * @param hero
@ -303,6 +306,7 @@ export class HeroShared {
let buff = this.getHeroBasicAttr(hero, otherBuff, pos); let buff = this.getHeroBasicAttr(hero, otherBuff, pos);
return this.computeHeroZhanLi(buff); return this.computeHeroZhanLi(buff);
} }
/** /**
* *
*/ */
@ -313,6 +317,7 @@ export class HeroShared {
let def = buff.def || 0; let def = buff.def || 0;
let hp = buff.hp || 0; let hp = buff.hp || 0;
let speed = buff.speed || 0; let speed = buff.speed || 0;
let speedpro = buff.speedpro || 0;
let hppro = buff.hppro || 0; let hppro = buff.hppro || 0;
let dpspro = buff.dpspro || 0; let dpspro = buff.dpspro || 0;
let undpspro = buff.undpspro || 0; let undpspro = buff.undpspro || 0;
@ -329,11 +334,11 @@ export class HeroShared {
(maxdps * .75) + (maxdps * .75) +
(def * 1.03) + (def * 1.03) +
(hp * 1) + (hp * 1) +
(speed * 21.28) +
(hp * hppro * .5) + (hp * hppro * .5) +
(speed * (speedpro + 1) * 21.28) +
((mindps + maxdps) / 2 * dpspro * .75) + ((mindps + maxdps) / 2 * dpspro * .75) +
(hp * undpspro * .6) + (hp * undpspro * .6) +
((mindps + maxdps) / 2 * xixuepro * 1) + ((mindps + maxdps) / 2 * xixuepro) +
((mindps + maxdps) / 2 * baoshangpro * .75) + ((mindps + maxdps) / 2 * baoshangpro * .75) +
((mindps + maxdps) / 2 * shanbipro * .5) + ((mindps + maxdps) / 2 * shanbipro * .5) +
((mindps + maxdps) / 2 * mingzhongpro * .5) + ((mindps + maxdps) / 2 * mingzhongpro * .5) +
@ -341,6 +346,7 @@ export class HeroShared {
(hp * pvpdpsdrop * .5) (hp * pvpdpsdrop * .5)
); );
} }
/** /**
* *
* @param id id * @param id id
@ -349,10 +355,11 @@ export class HeroShared {
static getHeroLvUpNeed(id: string | number, lv = 1): atn[] { static getHeroLvUpNeed(id: string | number, lv = 1): atn[] {
return [ return [
{ a: 'item', t: '1', n: G.gc.herolvup[lv].expneed }, {a: 'item', t: '1', n: G.gc.herolvup[lv].expneed},
{ a: 'attr', t: 'jinbi', n: G.gc.herolvup[lv].jinbineed } {a: 'attr', t: 'jinbi', n: G.gc.herolvup[lv].jinbineed}
]; ];
} }
/** /**
* *
* @param id id * @param id id