Compare commits

..

52 Commits
dev ... release

Author SHA1 Message Date
xichaoyin
724145f9c8 Merge remote-tracking branch 'origin/bugfix' into release
# Conflicts:
#	src/public/fight.ts
#	src/public/player.ts
#	zoeninfo.sh
2024-01-15 09:44:23 +08:00
xichaoyin
a20b284731 fix: 修复威望buff计算不生效问题 2024-01-12 22:15:27 +08:00
xichaoyin
2a9ce52aa1 fix:皮肤头像 2024-01-12 20:14:14 +08:00
xichaoyin
6370e88116 fix:皮肤头像 2024-01-12 20:12:18 +08:00
xichaoyin
e30155ca54 Merge branch 'feature/skin' into release 2024-01-12 19:38:20 +08:00
xichaoyin
73537c3637 时区脚本 2024-01-12 18:30:58 +08:00
xichaoyin
9e4c1995b7 Merge remote-tracking branch 'origin/feature/huangqijiuguan' into release 2024-01-12 18:24:57 +08:00
xichaoyin
12f768d887 json:配置提交 2024-01-12 18:24:25 +08:00
xichaoyin
c52f9b4b9a Merge remote-tracking branch 'origin/feature/skin' into release 2024-01-12 17:55:11 +08:00
xichaoyin
129103d061 Merge remote-tracking branch 'origin/feature/huangqijiuguan' into release 2024-01-12 17:55:00 +08:00
xichaoyin
8fe4e99ddc json:配置提交 2024-01-12 17:53:53 +08:00
286b10947d 外网insertMany报错兼容 2024-01-12 17:51:01 +08:00
xichaoyin
a2e3fc1aa9 fix:
1:头像框脚本
2:添加监控数据
2024-01-12 17:50:37 +08:00
yushunrui
fc1e2c9e1f fix:头像框问题 2024-01-12 15:15:23 +08:00
xichaoyin
00ed252403 Revert "fix:头像框 聊天框,造型逻辑修改"
This reverts commit 3e43065142.
2024-01-12 15:10:54 +08:00
xichaoyin
4c4e1d20dc Revert "fix:处理了头像框和聊天框得逻辑"
This reverts commit e4815b4246.
2024-01-12 15:10:54 +08:00
xichaoyin
6d184b20ab Revert "脚本提交,兑换掉落修改礼包内容, 玩家新年头像框刷成永久"
This reverts commit b7c86e9769.
2024-01-12 15:10:53 +08:00
xichaoyin
c2f3d0649d json:配置文件提交 2024-01-12 03:32:21 +08:00
xichaoyin
f79f341998 Merge branch 'feature/huangqijiuguan' into release 2024-01-12 03:30:23 +08:00
xichaoyin
de40641464 Merge branch 'feature/huangqijiuguan' into release
# Conflicts:
#	src/public/task.ts
2024-01-12 02:07:10 +08:00
xichaoyin
e4011067fd Merge branch 'feature/huangqijiuguan' into release
# Conflicts:
#	src/json/huodong.json5
#	src/public/scheduler/scheduler_newDay.ts
#	src/shared/protocols/serviceProto.ts
2024-01-12 00:45:51 +08:00
75be49d528 发奖发错了 2024-01-12 00:40:17 +08:00
799c0a60d3 slzd不需要回复次数 2024-01-12 00:40:17 +08:00
05a1ab6fb3 矿洞结算bug 2024-01-12 00:40:16 +08:00
38aeaf3247 积分容错 2024-01-12 00:40:16 +08:00
625220ca03 聊天分组bug 2024-01-12 00:40:16 +08:00
yushunrui
b7c86e9769 脚本提交,兑换掉落修改礼包内容, 玩家新年头像框刷成永久 2024-01-12 00:40:15 +08:00
yushunrui
e4815b4246 fix:处理了头像框和聊天框得逻辑 2024-01-12 00:40:00 +08:00
yushunrui
3e43065142 fix:头像框 聊天框,造型逻辑修改 2024-01-12 00:36:00 +08:00
xichaoyin
d421f06edf fix:丛林狩猎定时器修复 2024-01-12 00:33:24 +08:00
46a333b87f 去掉多余的环境变量,解决pm2集群启动失败问题 2024-01-12 00:33:24 +08:00
xichaoyin
3a7d3cadf4 fix:时区脚本修复 2024-01-12 00:33:23 +08:00
0947bc386e addhp不应该取整 2024-01-12 00:33:04 +08:00
a8d0a87f72 配件修正 2024-01-12 00:33:04 +08:00
74e0286250 天赋技能 2024-01-12 00:33:03 +08:00
xichaoyin
ac90f9db33 Merge branch 'feature/skin' into release
# Conflicts:
#	src/cross/protocols/serviceProto.ts
#	src/json/huodong.json5
#	src/json/pay.json
#	src/json/renown_level.json
#	src/json/tanxian.json
#	src/json/xstask.json
#	src/jsonType.ts
#	src/module/mongodb.ts
#	src/monopoly/protocols/serviceProto.ts
#	src/shared/protocols/serviceProto.ts
#	src/shared/protocols/user/PtlLogin.ts
#	src/shared/public/hero.ts
2024-01-12 00:28:09 +08:00
yushunrui
5161035eae json:配置文件 2024-01-11 18:23:12 +08:00
xichaoyin
42f80bde16 json:配置文件 2024-01-11 18:22:01 +08:00
yushunrui
369e654772 fix:处理了头像框和聊天框得逻辑 2024-01-11 18:12:47 +08:00
yushunrui
3d7644dce4 fix:头像框 聊天框,造型逻辑修改 2024-01-11 18:12:46 +08:00
xichaoyin
55aa5eac26 Revert "fix:时区脚本修复"
This reverts commit 99ccf69f19.
2024-01-11 11:59:55 +08:00
a7b3f4d49e 去掉多余的环境变量,解决pm2集群启动失败问题 2024-01-11 11:25:01 +08:00
xichaoyin
99ccf69f19 fix:时区脚本修复 2024-01-10 16:44:25 +08:00
xichaoyin
700e0fe15d fix:屏蔽检测生成新的任务逻辑 2024-01-10 15:56:59 +08:00
b83ff979cc fix:自选礼包异常 2024-01-10 15:55:11 +08:00
xichaoyin
e9173290fa fix:
时区脚本去除空格
2024-01-09 15:58:50 +08:00
xichaoyin
149de2b908 json:
配置提交
2024-01-08 18:23:39 +08:00
xichaoyin
5d3508aa40 Merge branch 'bugfix' into release 2024-01-08 18:20:03 +08:00
xichaoyin
0f3ad155ac fix:
json提交
2024-01-08 17:50:35 +08:00
xichaoyin
1ec21d71e0 Merge branch 'bugfix' into release 2024-01-08 17:13:48 +08:00
xichaoyin
ce3fd79126 Merge branch 'bugfix' into release 2024-01-06 17:51:57 +08:00
xichaoyin
ffd8d50463 Merge branch 'bugfix' into release 2024-01-06 00:07:59 +08:00
20 changed files with 5332 additions and 621 deletions

View File

@ -142,7 +142,7 @@ export default async function (call: ApiCall<ReqBingo, ResBingo>) {
if (shell[3]) emailMsg.prize = JSON.parse(shell[3])
EmailFun.addEmail(emailMsg);
} else if (shell[0] == "heroskin") {
await PlayerFun.sendPrize(call, [{ a: "heroskin", "t": shell[1], n: 1 }]);
PlayerFun.sendPrize(call, [{ a: "heroskin", "t": shell[1], n: 1 }]);
}
call.succ('succ');

View File

@ -1319,20 +1319,6 @@ export const serviceProto: ServiceProto<ServiceType> = {
},
{
"id": 38,
"name": "weiwangbuff",
"type": {
"type": "Interface",
"indexSignature": {
"keyType": "String",
"type": {
"type": "Number"
}
}
},
"optional": true
},
{
"id": 39,
"name": "heroskin",
"type": {
"type": "Interface",
@ -1739,23 +1725,9 @@ export const serviceProto: ServiceProto<ServiceType> = {
{
"id": 8,
"name": "skin",
"type": {
"type": "Union",
"members": [
{
"id": 0,
"type": {
"type": "String"
}
},
{
"id": 1,
"type": {
"type": "Number"
}
}
]
}
}
]
},

View File

@ -11,7 +11,6 @@ export class Encrypt {
if (buf instanceof Uint8Array) {
return decryptUint8Array(buf);
}
return buf;
}
}

View File

@ -1,4 +1,3 @@
import 'tsrpc';
import { ApiCall, BaseConnection, ConnectionStatus, WsServer } from 'tsrpc';
import { Wjjl } from './module/collection_wjjl';
@ -133,7 +132,7 @@ BaseConnection.prototype.getDefaultFightData = async function (this: BaseConnect
posObj = this.gud.matrixPos[this.gud.selectMatrix];
}
let heros = await HeroFun.getHeros(this, Object.values(posObj).filter(_id => _id != ''));
let heros = await HeroFun.getHeros(this, Object.values(posObj).filter(_id => _id != '') as string[]);
Object.entries(posObj).forEach(obj => {
let pos = obj[0];

View File

@ -5067,8 +5067,8 @@
"firstPayPrize": [],
"name": "pay_name_daojulibao_1",
"undefined": "专属润滑剂不足_30",
"time": 1,
"buys": 1,
"time": -1,
"buys": 0,
"needVip": 0,
"front": {},
"currency": "CNY"
@ -5108,8 +5108,8 @@
"firstPayPrize": [],
"name": "pay_name_daojulibao_2",
"undefined": "专属润滑剂不足_68",
"time": 1,
"buys": 1,
"time": -1,
"buys": 0,
"needVip": 0,
"front": {},
"currency": "CNY"
@ -5149,8 +5149,8 @@
"firstPayPrize": [],
"name": "pay_name_daojulibao_3",
"undefined": "专属润滑剂不足_128",
"time": 1,
"buys": 1,
"time": -1,
"buys": 0,
"needVip": 0,
"front": {},
"currency": "CNY"
@ -5190,8 +5190,8 @@
"firstPayPrize": [],
"name": "pay_name_daojulibao_4",
"undefined": "配件零件不足_30",
"time": 1,
"buys": 1,
"time": -1,
"buys": 0,
"needVip": 0,
"front": {},
"currency": "CNY"
@ -5231,8 +5231,8 @@
"firstPayPrize": [],
"name": "pay_name_daojulibao_5",
"undefined": "配件零件不足_68",
"time": 1,
"buys": 1,
"time": -1,
"buys": 0,
"needVip": 0,
"front": {},
"currency": "CNY"
@ -5272,8 +5272,8 @@
"firstPayPrize": [],
"name": "pay_name_daojulibao_6",
"undefined": "配件零件不足_128",
"time": 1,
"buys": 1,
"time": -1,
"buys": 0,
"needVip": 0,
"front": {},
"currency": "CNY"
@ -5313,8 +5313,8 @@
"firstPayPrize": [],
"name": "pay_name_daojulibao_7",
"undefined": "装备蓝图不足_30",
"time": 1,
"buys": 1,
"time": -1,
"buys": 0,
"needVip": 0,
"front": {},
"currency": "CNY"
@ -5354,8 +5354,8 @@
"firstPayPrize": [],
"name": "pay_name_daojulibao_8",
"undefined": "装备蓝图不足_68",
"time": 1,
"buys": 1,
"time": -1,
"buys": 0,
"needVip": 0,
"front": {},
"currency": "CNY"
@ -5395,8 +5395,8 @@
"firstPayPrize": [],
"name": "pay_name_daojulibao_9",
"undefined": "装备蓝图不足_128",
"time": 1,
"buys": 1,
"time": -1,
"buys": 0,
"needVip": 0,
"front": {},
"currency": "CNY"
@ -5436,8 +5436,8 @@
"firstPayPrize": [],
"name": "pay_name_daojulibao_10",
"undefined": "调校合金不足_30",
"time": 1,
"buys": 1,
"time": -1,
"buys": 0,
"needVip": 0,
"front": {},
"currency": "CNY"
@ -5477,8 +5477,8 @@
"firstPayPrize": [],
"name": "pay_name_daojulibao_11",
"undefined": "调校合金不足_68",
"time": 1,
"buys": 1,
"time": -1,
"buys": 0,
"needVip": 0,
"front": {},
"currency": "CNY"
@ -5518,8 +5518,8 @@
"firstPayPrize": [],
"name": "pay_name_daojulibao_12",
"undefined": "调校合金不足_128",
"time": 1,
"buys": 1,
"time": -1,
"buys": 0,
"needVip": 0,
"front": {},
"currency": "CNY"
@ -5549,8 +5549,8 @@
"firstPayPrize": [],
"name": "pay_name_zhanbailibao_1",
"undefined": "战败礼包_68",
"time": 1,
"buys": 1,
"time": -1,
"buys": 0,
"needVip": 0,
"front": {},
"currency": "CNY"
@ -5580,8 +5580,8 @@
"firstPayPrize": [],
"name": "pay_name_zhanbailibao_2",
"undefined": "战败礼包_68",
"time": 1,
"buys": 1,
"time": -1,
"buys": 0,
"needVip": 0,
"front": {},
"currency": "CNY"
@ -5611,8 +5611,8 @@
"firstPayPrize": [],
"name": "pay_name_zhanbailibao_3",
"undefined": "战败礼包_68",
"time": 1,
"buys": 1,
"time": -1,
"buys": 0,
"needVip": 0,
"front": {},
"currency": "CNY"

5002
src/json/renown_chanchu.json Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1811,29 +1811,6 @@ type gc_push_gift = {
}
}
type gc_hero_skin = {
[k: string]: {
/**皮肤id*/
id: number
/**干部id*/
heroId: number
/**皮肤品质*/
colour: number
/**摸到重复时转换*/
zhuanhuan: atn[]
}
}
type gc_hero_skin_lv = {
[colour: string]: {
[lv: string]: {
suipian: number
buff: { [k: string]: number }
need: { a: string, t: string, n: number }[];
}
}
}
type gcType = {
[key: string]: any
armyattr: gc_armyattr
@ -1983,9 +1960,7 @@ type gcType = {
kfcb_prize: gc_kfcb_prize
yuyuemail: gc_yuyuemail
tuisonglibao: gc_push_gift
renown_level: gc_renown_level
heroSkin: gc_hero_skin
heroSkinLv: gc_hero_skin_lv
}
@ -1996,3 +1971,4 @@ declare global {
export function initGcType() {
}

View File

@ -23,7 +23,7 @@ export default {
/**cross mongodb url */
crossMongodbUrl: 'mongodb://root:lyMaple525458@10.0.1.20:27017/heijiao_cross?authSource=admin',
/**运营平台接口地址 */
baseUrl: 'blacklagoon-slb.pro.g123-cpp.com',
baseUrl: 'https://blacklagoon-slb.stg.g123-cpp.com',
/**服务器时间 */
time: '',
/**开服时间 */

View File

@ -27,39 +27,39 @@ import {
CollectionKbzzGroupTroop,
CollectionKbzzGroupUser
} from './collection_kbzz';
import {CollectionKuangDong} from './collection_kuangdong';
import {CollectionLingZhuLaiXi} from './collection_lingzhulaixi';
import {CollectionMingdao} from './collection_mingdao';
import {CollectionPlayerInfo} from './collection_palyerInfo';
import {CollectionPata} from './collection_pata';
import {CollectionPeiJian} from './collection_peijian';
import {CollectionPlayAttr} from './collection_playattr';
import {CollectionRank, CollectionRankList} from './collection_rank';
import {CollectionRecord} from './collection_record';
import {CollectionSchedler} from './collection_scheduler';
import {CollectionShiwu} from './collection_shiwu';
import {CollectionSlzdGh, CollectionSlzdUser, CollectionSlzdStash} from './collection_slzd';
import {CollectionTanXian} from './collection_tanxian';
import {CollectionTask} from './collection_task';
import {CollectionUser} from './collection_user';
import {CollectionWanted} from './collection_wanted';
import {CollectionWjjl} from './collection_wjjl';
import {CollectionWzryCross} from './collection_wzry_user_cross';
import {CollectionWzryCrossFight} from './collection_wzryfight';
import {CollectionWzryCrossFightLOG} from './collection_wzryfightlOG';
import {CollectionWzryCrossWiner} from './collection_wzrywiner';
import {CollectionXstask} from './collection_xstask';
import {CollectionZhanLing} from './collection_zhanling';
import {CollectionHdinfo} from './collection_hdinfo';
import {CollectionGiftLog} from "./collection_giftLog";
import {CollectionLoginLog} from "./collection_loginLog";
import {CollectionPayLogNew} from "./collection_payLogNew";
import {CollectionApiCount} from "./collection_apiCount";
import {CollectionPlayerBehavior} from "./collection_player_behavior";
import {CollectionRmbuse} from "./collection_rmbuse";
import {CollectionFightLog} from "./collection_fightLog";
import {CollectionShop} from "./collection_shop";
import {CollectionPushGift} from "./collection_pushgift";
import { CollectionKuangDong } from './collection_kuangdong';
import { CollectionLingZhuLaiXi } from './collection_lingzhulaixi';
import { CollectionMingdao } from './collection_mingdao';
import { CollectionPlayerInfo } from './collection_palyerInfo';
import { CollectionPata } from './collection_pata';
import { CollectionPeiJian } from './collection_peijian';
import { CollectionPlayAttr } from './collection_playattr';
import { CollectionRank, CollectionRankList } from './collection_rank';
import { CollectionRecord } from './collection_record';
import { CollectionSchedler } from './collection_scheduler';
import { CollectionShiwu } from './collection_shiwu';
import { CollectionSlzdGh, CollectionSlzdUser, CollectionSlzdStash } from './collection_slzd';
import { CollectionTanXian } from './collection_tanxian';
import { CollectionTask } from './collection_task';
import { CollectionUser } from './collection_user';
import { CollectionWanted } from './collection_wanted';
import { CollectionWjjl } from './collection_wjjl';
import { CollectionWzryCross } from './collection_wzry_user_cross';
import { CollectionWzryCrossFight } from './collection_wzryfight';
import { CollectionWzryCrossFightLOG } from './collection_wzryfightlOG';
import { CollectionWzryCrossWiner } from './collection_wzrywiner';
import { CollectionXstask } from './collection_xstask';
import { CollectionZhanLing } from './collection_zhanling';
import { CollectionHdinfo } from './collection_hdinfo';
import { CollectionGiftLog } from "./collection_giftLog";
import { CollectionLoginLog } from "./collection_loginLog";
import { CollectionPayLogNew } from "./collection_payLogNew";
import { CollectionApiCount } from "./collection_apiCount";
import { CollectionPlayerBehavior } from "./collection_player_behavior";
import { CollectionRmbuse } from "./collection_rmbuse";
import { CollectionFightLog } from "./collection_fightLog";
import { CollectionShop } from "./collection_shop";
import { CollectionPushGift } from "./collection_pushgift";
import { CollectionWeiwang } from './collection_weiwang';
export type MongodbCollections = {

View File

@ -2640,20 +2640,6 @@ export const serviceProto: ServiceProto<ServiceType> = {
},
{
"id": 38,
"name": "weiwangbuff",
"type": {
"type": "Interface",
"indexSignature": {
"keyType": "String",
"type": {
"type": "Number"
}
}
},
"optional": true
},
{
"id": 39,
"name": "heroskin",
"type": {
"type": "Interface",

View File

@ -1,15 +1,15 @@
import { ApiCall, TsrpcError } from 'tsrpc';
import { FightControl } from '../shared/fightControl/fightCntrol';
import { formatNpcData } from '../shared/fightControl/fightFun';
import { fightResult, joinFightData, roleDataType } from '../shared/fightControl/fightType';
import { rankInfo } from '../shared/protocols/type';
import { HeroShared } from '../shared/public/hero';
import { PlayerShared } from '../shared/public/player';
import { HeroFun } from './hero';
import { UserFun } from './user';
import { re, string } from "mathjs";
import { getGud } from './gud';
import { PushGiftFun } from "./pushgift";
import {ApiCall, TsrpcError} from 'tsrpc';
import {FightControl} from '../shared/fightControl/fightCntrol';
import {formatNpcData} from '../shared/fightControl/fightFun';
import {fightResult, joinFightData, roleDataType} from '../shared/fightControl/fightType';
import {rankInfo} from '../shared/protocols/type';
import {HeroShared} from '../shared/public/hero';
import {PlayerShared} from '../shared/public/player';
import {HeroFun} from './hero';
import {UserFun} from './user';
import {re, string} from "mathjs";
import {getGud} from './gud';
import {PushGiftFun} from "./pushgift";
type fightType = 'tanxian' | 'pata' | 'jjc' | 'gbtx' | 'qjzzd' | 'meirishilian' | 'wzrycross' | 'hqjg';

View File

@ -19,9 +19,9 @@ import { getGud, setGud } from './gud';
import { addGameLog } from "../gameLog";
import { PushGiftFun } from "./pushgift";
import { ActionLog } from './actionLog/actionLog';
import HeroSkinFun from './heroskin';
import { roleDataType } from '../shared/fightControl/fightType';
import { PlayerShared } from '../shared/public/player';
import HeroSkinFun from './heroskin';
export type call = {
@ -49,14 +49,14 @@ export class PlayerFun {
* @param uid
* @returns
*/
static async getDefaultFightDataByUid(uid: string) {
static async getDefaultFightDataByUid(uid:string){
let gud = await getGud(uid);
let posObj = gud.heroPos;
let roles: k_v<roleDataType> = {};
if (gud.selectMatrix && gud.matrixPos) {
posObj = gud.matrixPos[gud.selectMatrix];
}
let heros = await HeroFun.getHeros({ uid: uid }, Object.values(posObj).filter(_id => _id != '') as string[]);
let heros = await HeroFun.getHeros({uid:uid}, Object.values(posObj).filter(_id => _id != '') as string[]);
let otherBuff = UserFun.getOtherBuff(gud)
Object.entries(posObj).forEach(obj => {
@ -155,7 +155,7 @@ export class PlayerFun {
all.push(this.addItem(call, item));
}
// 记录消耗
addGameLog(call.uid, call.service.name, call.req, { need: val })
addGameLog(call.uid, call.service.name, call.req, {need: val})
await Promise.all(all);
G.emit('USE_ITEM', call.conn.gud, needArr.map(need => {
return { ...need, n: Math.abs(need.n) };

View File

@ -64,41 +64,6 @@ export class SchedulerNewDayLocalCtor extends Scheduler {
G.emit('NEW_DAY', G.time);
})
clusterRunOnce(async ()=>{
//这个定时器会被每个进程都启动这是这部分逻辑应该只执行1次
//重置所有的ActionLog
await ActionLog.initAllDayLog();
// 每周一,发放终身卡
(async () => {
if (PublicShared.getWeek(G.time) == 1) {
let logs = await G.mongodb.collection("payLogNew").find(
{ key: "zhongshenka", del_time: { $exists: false } }, { projection: { _id: 0, } }
).toArray();
if (logs.length == 0) {
console.log("没有终身卡数据,不发放终身卡");
}
let con = G.gc.payEmail.zhongshenka.filter(e => e.day == 7)[0];
for (let i = 0; i < logs.length; i++) {
console.log("发放终身卡", logs[i].uid);
// 发送邮件
EmailFun.addEmail({
uid: logs[i].uid,
type: "system",
title: con.title,
content: con.content,
contentInsertArr: [],
createTime: G.time,
prize:con.prize,
})
}
}
})()
})
let users = Object.values(G.server.uid_connections)
if (users.length) {
for (let item of users) {

View File

@ -4,6 +4,7 @@ import { taskType } from "../shared/protocols/task/type";
import { PublicShared } from "../shared/public/public";
import { PeijianFun } from "./peijian";
import { manager } from "./taskclass";
import ApiRecTask from "../api_s2c/event/zhanling/ApiRecTask";
let taskDict = {};
const SHUJUKU = "task";
@ -114,7 +115,7 @@ export class TaskFun {
let _taskCon = await this.getTaskConByType(_task["type"], _task["taskid"]);
if (!_taskCon || Object.keys(_taskCon).length == 0) {
// 策划改了任务 找不到 自动删除任务
await G.mongodb.collection(SHUJUKU).deleteMany({ uid: call.uid, taskid: _task["taskid"] });
await G.mongodb.collection(SHUJUKU).deleteMany({uid: call.uid, taskid: _task["taskid"]});
continue
}
@ -142,12 +143,12 @@ export class TaskFun {
// 任务值上限检测
_resVal = _resVal > _pval ? _pval : _resVal;
// 设置任务
let _setData = { nval: _resVal };
let _where = { taskid: _task["taskid"] };
let _setData = {nval: _resVal};
let _where = {taskid: _task["taskid"]};
await this.setTask(uid, _where, _setData);
if (_resVal == _pval) {
G.server.sendMsgByUid(call.uid, 'msg_s2c/TaskChange', { ..._task, nval: _resVal })
G.server.sendMsgByUid(call.uid, 'msg_s2c/TaskChange', {..._task, nval: _resVal})
}
}
}
@ -187,7 +188,7 @@ export class TaskFun {
// 重置每日任务
if (ttype == 1 || ttype == 4) {
let _zero = PublicShared.getToDayZeroTime(G.time);
let _where = { retime: { $gte: _zero, $lte: _zero + 24 * 60 * 60 - 1 }, type: ttype };
let _where = {retime: {$gte: _zero, $lte: _zero + 24 * 60 * 60 - 1}, type: ttype};
let _tmp = await this.getUserTaksList(call.uid, _where);
if (_tmp.length == 0) await this.resetDailyTask(call, ttype);
}
@ -197,7 +198,7 @@ export class TaskFun {
*
*/
static async resetDailyTask(call: ApiCall, type: number = 1) {
await this.delTasks(call.uid, { type: type });
await this.delTasks(call.uid, {type: type});
// 该限制改到红点检测判断,避免此处注释后,红点检测与账号创建初始化任务并发。
// if (PublicShared.chkSameDate(call.conn.gud.cTime, G.time)) return;
let _taskCons = await this.getTaskConsByType(type);
@ -236,7 +237,7 @@ export class TaskFun {
static async getFinishByStype(call: ApiCall, stype: number, where: {}) {
// 任务刷新
await this.refreshTask(call);
Object.assign(where, { stype: stype });
Object.assign(where, {stype: stype});
let _r = await this.getUserTaksList(call.uid, where);
return _r;
}
@ -255,7 +256,7 @@ export class TaskFun {
// Object.assign(where, { type: { $in: ttype } })
for (let index = 0; index < ttype.length; index++) {
const _type = ttype[index];
Object.assign(_w, { type: _type, ...where });
Object.assign(_w, {type: _type, ...where});
if (_finishType.indexOf(_type) != -1) {
delete _w["finish"];
}
@ -335,7 +336,7 @@ export class TaskFun {
* @param call
*/
static async updateMainTask(call: ApiCall) {
let data = await G.mongodb.collection(SHUJUKU).findOne({ uid: call.uid, type: 2, finish: 0 });
let data = await G.mongodb.collection(SHUJUKU).findOne({uid: call.uid, type: 2, finish: 0});
let _ftaskCon = await TaskFun.getTaskConByType(2, data.taskid);
// @ts-ignore
@ -346,14 +347,14 @@ export class TaskFun {
type: 2,
finish: 0,
taskid: data.taskid
}, { $set: { ...newTask, nval: data.nval || newTask.nval, retime: data.retime, } }, { upsert: true })
}, {$set: {...newTask, nval: data.nval || newTask.nval, retime: data.retime,}}, {upsert: true})
}
/**
*
*/
static async generateAllTask(call: ApiCall) {
let _r = await G.mongodb.collection(SHUJUKU).count({ uid: call.uid });
let _r = await G.mongodb.collection(SHUJUKU).count({uid: call.uid});
if (_r > 0) return;
let _taskInfo = [];
let _con = G.gc.task;
@ -374,7 +375,7 @@ export class TaskFun {
/**生成指定类型任务-初始化 */
static async reInitTask(call: ApiCall, type: string) {
// 查询类型任务是否存在
let _r = await G.mongodb.collection(SHUJUKU).count({ uid: call.uid, type: ~~type });
let _r = await G.mongodb.collection(SHUJUKU).count({uid: call.uid, type: ~~type});
let _taskInfo = [];
if (_r == 0) {
let _con = G.gc.task;
@ -396,7 +397,7 @@ export class TaskFun {
*/
static async getUserTaksList(uid: string, where: {}) {
// type : 1 主线 2 成就 3 每日
Object.assign(where, { uid: uid });
Object.assign(where, {uid: uid});
let _taskInfo = await G.mongodb.collection(SHUJUKU).find(where).toArray();
_taskInfo.forEach(e => {
if (e._id) delete e._id;
@ -408,7 +409,7 @@ export class TaskFun {
*
*/
static async delTasks(uid: string, where: { type: number; }) {
Object.assign(where, { uid: uid });
Object.assign(where, {uid: uid});
await G.mongodb.collection(SHUJUKU).deleteMany(where);
}
@ -442,8 +443,8 @@ export class TaskFun {
if (Object.keys(setData).length == 0) {
return;
}
Object.assign(where, { uid });
setData = { $set: setData };
Object.assign(where, {uid});
setData = {$set: setData};
await G.mongodb.collection(SHUJUKU).updateOne(where, setData);
}
@ -467,7 +468,7 @@ export class TaskFun {
if ((element == "1" || element == "3") && call.conn.gud.lv < 7) continue;
let _values: number[] = _ttype[element];
let _where: {} = {
uid: call.uid, type: { $in: _values }, finish: 0, '$expr': {
uid: call.uid, type: {$in: _values}, finish: 0, '$expr': {
$lte: ["$pval", "$nval"]
}
};
@ -605,7 +606,7 @@ export class TaskAllEmitFun {
uid: node.call.conn.uid,
type: 'usertasklog'
},
{ $set: { maxequiplv: _val } });
{$set: {maxequiplv: _val}});
}
G.emit("Class_task_112", 'Class_task_112', node.call, _val, 0);
// 有 n 件强化 配置 等级装备 后面复写正确值
@ -629,7 +630,7 @@ export class TaskAllEmitFun {
uid: node.call.conn.uid,
type: 'usertasklog'
},
{ $set: { maxequiplv: _val } });
{$set: {maxequiplv: _val}});
}
// 有 n 件强化 配置 等级装备 后面复写正确值
G.emit("Class_task_113", 'Class_task_113', node.call, 0, 0);
@ -647,7 +648,7 @@ export class TaskAllEmitFun {
uid: node.call.conn.uid,
type: 'usertasklog'
},
{ $inc: G.mongodb.createTreeObj({ key: `herocolor.${_color}`, val: 1 }) });
{$inc: G.mongodb.createTreeObj({key: `herocolor.${_color}`, val: 1})});
}
}
}
@ -673,7 +674,7 @@ export class TaskAllEmitFun {
await G.mongodb.collection('playerInfo', 'usertasklog').updateOne({
uid: node.call.uid,
type: 'usertasklog'
}, { $set: { equipcolor: usertasklog.equipcolor } })
}, {$set: {equipcolor: usertasklog.equipcolor}})
}
// if (node.call.service.name == 'chongzhi/Open' && node.return.isSucc) {
// // 累计充值 n 钻石 数量后面复写
@ -715,7 +716,7 @@ export class TaskAllEmitFun {
uid: node.call.conn.uid,
type: 'usertasklog'
},
{ $set: { friendAsk: _val } });
{$set: {friendAsk: _val}});
G.emit("Class_task_144", 'Class_task_144', node.call, 1, 0);
}
if (node.call.service.name == 'tanxian/FastGuaJi' && node.return.isSucc) {
@ -874,7 +875,7 @@ export class TaskAllEmitFun {
uid: node.call.conn.uid,
type: 'usertasklog'
});
let _setData = { $set: {} }; // 更新配件记录
let _setData = {$set: {}}; // 更新配件记录
let peijianCon = G.gc.peijian;
let _lv = 0;

View File

@ -813,7 +813,7 @@ export module manager {
isinc = 1
async initVal(call: ApiCall, con) {
return 0;
return 1;
}
}
// 第59个任务 获得vip经验

View File

@ -301,6 +301,9 @@ export class UserFun {
change = true;
gud.headFrames[conf.id] = G.time + val * v;
}
} else if (conf?.cond?.[0] == "jjc_rank") {
change = true;
gud.headFrames[conf.id] = -1;
}
else if(conf?.cond?.[0] == "jjc_rank") {
change = true;

File diff suppressed because it is too large Load Diff

View File

@ -7,6 +7,7 @@ import { PlayerShared } from './player';
import { PublicShared } from './public';
import { ShiwuShared } from './shiwu';
export type otherBuff = Partial<player & {
allBuff: k_v<number>;
}>;
@ -32,7 +33,7 @@ export class HeroShared {
*/
static getHeroBasicAttr(hero: heroDataType, otherBuff: otherBuff = G.otherBuff, pos = 0) {
let jiban = 0;
let buff: k_v<any> = { skillArr: [] };
let buff: k_v<any> = {skillArr: []};
let heroConf = G.gc.hero[hero.heroId];
let heroLv = G.gc.herolv[heroConf.lvup];
let heroGrow = G.gc.herogrow[heroConf.jjup]?.[hero.jieji];
@ -41,7 +42,7 @@ export class HeroShared {
for (let k in heroLv.buff) {
let val = heroLv.buff[k];
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}`)());
}
@ -136,7 +137,7 @@ export class HeroShared {
PublicShared.mergeProperty(buff, PeijianShared.getAttr(p));
let conf = G.gc.peijian[p.peijianId];
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++;
if (!suitObj[conf.suit].minLv || p.lv < suitObj[conf.suit].minLv) suitObj[conf.suit].minLv = p.lv;
}
@ -274,16 +275,11 @@ export class HeroShared {
if (otherBuff?.skills) {
for (let [id, lv] of Object.entries(otherBuff.skills)) {
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})])));
}
}
}
// 威望加成计算
if (otherBuff?.weiwangbuff) {
PublicShared.mergeProperty(buff, otherBuff?.weiwangbuff || {});
}
// 计算皮肤buff
if (otherBuff?.heroskin) {
for (let skinId in otherBuff.heroskin) {
@ -295,6 +291,11 @@ export class HeroShared {
}
}
// 威望加成计算
if (otherBuff?.weiwangbuff) {
PublicShared.mergeProperty(buff, otherBuff?.weiwangbuff || {});
}
//最后进行加成属性计算
for (let k in buff) {
if (k.indexOf('pro') == -1) continue;

View File

@ -37,7 +37,7 @@ export class UserShared {
// else if (conf.cond[0] == 'time') return collection.active[fmtId] == -1 || collection.active[fmtId] > G.time;
else if (conf.cond[0] == 'time') return conf.cond[1] == -1 || collection.active?.[fmtId] > G.time;
else if (conf.cond[0] == 'model') return Object.values(collection.model).find(i => i.id == conf.cond[1]);
else if (conf.cond[0] == 'heroskin') return conf.cond[1] in collection.heroskin;
else if (conf.cond[0] == 'heroskin') return conf.cond[1] in (collection.heroskin || {});
else return false;
}
}

View File

@ -3,8 +3,3 @@
cp "/usr/share/zoneinfo/$1" "/etc/localtime"
echo "$1" > /etc/timezone
for i in `env | grep -E -i 'SERVER_GAME' | sed 's/=.*//'` ; do
unset $i
done