Compare commits
52 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
724145f9c8 | ||
![]() |
a20b284731 | ||
![]() |
2a9ce52aa1 | ||
![]() |
6370e88116 | ||
![]() |
e30155ca54 | ||
![]() |
73537c3637 | ||
![]() |
9e4c1995b7 | ||
![]() |
12f768d887 | ||
![]() |
c52f9b4b9a | ||
![]() |
129103d061 | ||
![]() |
8fe4e99ddc | ||
286b10947d | |||
![]() |
a2e3fc1aa9 | ||
![]() |
fc1e2c9e1f | ||
![]() |
00ed252403 | ||
![]() |
4c4e1d20dc | ||
![]() |
6d184b20ab | ||
![]() |
c2f3d0649d | ||
![]() |
f79f341998 | ||
![]() |
de40641464 | ||
![]() |
e4011067fd | ||
75be49d528 | |||
799c0a60d3 | |||
05a1ab6fb3 | |||
38aeaf3247 | |||
625220ca03 | |||
![]() |
b7c86e9769 | ||
![]() |
e4815b4246 | ||
![]() |
3e43065142 | ||
![]() |
d421f06edf | ||
46a333b87f | |||
![]() |
3a7d3cadf4 | ||
0947bc386e | |||
a8d0a87f72 | |||
74e0286250 | |||
![]() |
ac90f9db33 | ||
![]() |
5161035eae | ||
![]() |
42f80bde16 | ||
![]() |
369e654772 | ||
![]() |
3d7644dce4 | ||
![]() |
55aa5eac26 | ||
a7b3f4d49e | |||
![]() |
99ccf69f19 | ||
![]() |
700e0fe15d | ||
b83ff979cc | |||
![]() |
e9173290fa | ||
![]() |
149de2b908 | ||
![]() |
5d3508aa40 | ||
![]() |
0f3ad155ac | ||
![]() |
1ec21d71e0 | ||
![]() |
ce3fd79126 | ||
![]() |
ffd8d50463 |
@ -142,7 +142,7 @@ export default async function (call: ApiCall<ReqBingo, ResBingo>) {
|
|||||||
if (shell[3]) emailMsg.prize = JSON.parse(shell[3])
|
if (shell[3]) emailMsg.prize = JSON.parse(shell[3])
|
||||||
EmailFun.addEmail(emailMsg);
|
EmailFun.addEmail(emailMsg);
|
||||||
} else if (shell[0] == "heroskin") {
|
} 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');
|
call.succ('succ');
|
||||||
|
@ -1319,20 +1319,6 @@ export const serviceProto: ServiceProto<ServiceType> = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 38,
|
"id": 38,
|
||||||
"name": "weiwangbuff",
|
|
||||||
"type": {
|
|
||||||
"type": "Interface",
|
|
||||||
"indexSignature": {
|
|
||||||
"keyType": "String",
|
|
||||||
"type": {
|
|
||||||
"type": "Number"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": 39,
|
|
||||||
"name": "heroskin",
|
"name": "heroskin",
|
||||||
"type": {
|
"type": {
|
||||||
"type": "Interface",
|
"type": "Interface",
|
||||||
@ -1739,23 +1725,9 @@ export const serviceProto: ServiceProto<ServiceType> = {
|
|||||||
{
|
{
|
||||||
"id": 8,
|
"id": 8,
|
||||||
"name": "skin",
|
"name": "skin",
|
||||||
"type": {
|
|
||||||
"type": "Union",
|
|
||||||
"members": [
|
|
||||||
{
|
|
||||||
"id": 0,
|
|
||||||
"type": {
|
"type": {
|
||||||
"type": "String"
|
"type": "String"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": 1,
|
|
||||||
"type": {
|
|
||||||
"type": "Number"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -11,7 +11,6 @@ export class Encrypt {
|
|||||||
if (buf instanceof Uint8Array) {
|
if (buf instanceof Uint8Array) {
|
||||||
return decryptUint8Array(buf);
|
return decryptUint8Array(buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import 'tsrpc';
|
import 'tsrpc';
|
||||||
import { ApiCall, BaseConnection, ConnectionStatus, WsServer } from 'tsrpc';
|
import { ApiCall, BaseConnection, ConnectionStatus, WsServer } from 'tsrpc';
|
||||||
import { Wjjl } from './module/collection_wjjl';
|
import { Wjjl } from './module/collection_wjjl';
|
||||||
@ -133,7 +132,7 @@ BaseConnection.prototype.getDefaultFightData = async function (this: BaseConnect
|
|||||||
posObj = this.gud.matrixPos[this.gud.selectMatrix];
|
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 => {
|
Object.entries(posObj).forEach(obj => {
|
||||||
let pos = obj[0];
|
let pos = obj[0];
|
||||||
|
@ -5067,8 +5067,8 @@
|
|||||||
"firstPayPrize": [],
|
"firstPayPrize": [],
|
||||||
"name": "pay_name_daojulibao_1",
|
"name": "pay_name_daojulibao_1",
|
||||||
"undefined": "专属润滑剂不足_30",
|
"undefined": "专属润滑剂不足_30",
|
||||||
"time": 1,
|
"time": -1,
|
||||||
"buys": 1,
|
"buys": 0,
|
||||||
"needVip": 0,
|
"needVip": 0,
|
||||||
"front": {},
|
"front": {},
|
||||||
"currency": "CNY"
|
"currency": "CNY"
|
||||||
@ -5108,8 +5108,8 @@
|
|||||||
"firstPayPrize": [],
|
"firstPayPrize": [],
|
||||||
"name": "pay_name_daojulibao_2",
|
"name": "pay_name_daojulibao_2",
|
||||||
"undefined": "专属润滑剂不足_68",
|
"undefined": "专属润滑剂不足_68",
|
||||||
"time": 1,
|
"time": -1,
|
||||||
"buys": 1,
|
"buys": 0,
|
||||||
"needVip": 0,
|
"needVip": 0,
|
||||||
"front": {},
|
"front": {},
|
||||||
"currency": "CNY"
|
"currency": "CNY"
|
||||||
@ -5149,8 +5149,8 @@
|
|||||||
"firstPayPrize": [],
|
"firstPayPrize": [],
|
||||||
"name": "pay_name_daojulibao_3",
|
"name": "pay_name_daojulibao_3",
|
||||||
"undefined": "专属润滑剂不足_128",
|
"undefined": "专属润滑剂不足_128",
|
||||||
"time": 1,
|
"time": -1,
|
||||||
"buys": 1,
|
"buys": 0,
|
||||||
"needVip": 0,
|
"needVip": 0,
|
||||||
"front": {},
|
"front": {},
|
||||||
"currency": "CNY"
|
"currency": "CNY"
|
||||||
@ -5190,8 +5190,8 @@
|
|||||||
"firstPayPrize": [],
|
"firstPayPrize": [],
|
||||||
"name": "pay_name_daojulibao_4",
|
"name": "pay_name_daojulibao_4",
|
||||||
"undefined": "配件零件不足_30",
|
"undefined": "配件零件不足_30",
|
||||||
"time": 1,
|
"time": -1,
|
||||||
"buys": 1,
|
"buys": 0,
|
||||||
"needVip": 0,
|
"needVip": 0,
|
||||||
"front": {},
|
"front": {},
|
||||||
"currency": "CNY"
|
"currency": "CNY"
|
||||||
@ -5231,8 +5231,8 @@
|
|||||||
"firstPayPrize": [],
|
"firstPayPrize": [],
|
||||||
"name": "pay_name_daojulibao_5",
|
"name": "pay_name_daojulibao_5",
|
||||||
"undefined": "配件零件不足_68",
|
"undefined": "配件零件不足_68",
|
||||||
"time": 1,
|
"time": -1,
|
||||||
"buys": 1,
|
"buys": 0,
|
||||||
"needVip": 0,
|
"needVip": 0,
|
||||||
"front": {},
|
"front": {},
|
||||||
"currency": "CNY"
|
"currency": "CNY"
|
||||||
@ -5272,8 +5272,8 @@
|
|||||||
"firstPayPrize": [],
|
"firstPayPrize": [],
|
||||||
"name": "pay_name_daojulibao_6",
|
"name": "pay_name_daojulibao_6",
|
||||||
"undefined": "配件零件不足_128",
|
"undefined": "配件零件不足_128",
|
||||||
"time": 1,
|
"time": -1,
|
||||||
"buys": 1,
|
"buys": 0,
|
||||||
"needVip": 0,
|
"needVip": 0,
|
||||||
"front": {},
|
"front": {},
|
||||||
"currency": "CNY"
|
"currency": "CNY"
|
||||||
@ -5313,8 +5313,8 @@
|
|||||||
"firstPayPrize": [],
|
"firstPayPrize": [],
|
||||||
"name": "pay_name_daojulibao_7",
|
"name": "pay_name_daojulibao_7",
|
||||||
"undefined": "装备蓝图不足_30",
|
"undefined": "装备蓝图不足_30",
|
||||||
"time": 1,
|
"time": -1,
|
||||||
"buys": 1,
|
"buys": 0,
|
||||||
"needVip": 0,
|
"needVip": 0,
|
||||||
"front": {},
|
"front": {},
|
||||||
"currency": "CNY"
|
"currency": "CNY"
|
||||||
@ -5354,8 +5354,8 @@
|
|||||||
"firstPayPrize": [],
|
"firstPayPrize": [],
|
||||||
"name": "pay_name_daojulibao_8",
|
"name": "pay_name_daojulibao_8",
|
||||||
"undefined": "装备蓝图不足_68",
|
"undefined": "装备蓝图不足_68",
|
||||||
"time": 1,
|
"time": -1,
|
||||||
"buys": 1,
|
"buys": 0,
|
||||||
"needVip": 0,
|
"needVip": 0,
|
||||||
"front": {},
|
"front": {},
|
||||||
"currency": "CNY"
|
"currency": "CNY"
|
||||||
@ -5395,8 +5395,8 @@
|
|||||||
"firstPayPrize": [],
|
"firstPayPrize": [],
|
||||||
"name": "pay_name_daojulibao_9",
|
"name": "pay_name_daojulibao_9",
|
||||||
"undefined": "装备蓝图不足_128",
|
"undefined": "装备蓝图不足_128",
|
||||||
"time": 1,
|
"time": -1,
|
||||||
"buys": 1,
|
"buys": 0,
|
||||||
"needVip": 0,
|
"needVip": 0,
|
||||||
"front": {},
|
"front": {},
|
||||||
"currency": "CNY"
|
"currency": "CNY"
|
||||||
@ -5436,8 +5436,8 @@
|
|||||||
"firstPayPrize": [],
|
"firstPayPrize": [],
|
||||||
"name": "pay_name_daojulibao_10",
|
"name": "pay_name_daojulibao_10",
|
||||||
"undefined": "调校合金不足_30",
|
"undefined": "调校合金不足_30",
|
||||||
"time": 1,
|
"time": -1,
|
||||||
"buys": 1,
|
"buys": 0,
|
||||||
"needVip": 0,
|
"needVip": 0,
|
||||||
"front": {},
|
"front": {},
|
||||||
"currency": "CNY"
|
"currency": "CNY"
|
||||||
@ -5477,8 +5477,8 @@
|
|||||||
"firstPayPrize": [],
|
"firstPayPrize": [],
|
||||||
"name": "pay_name_daojulibao_11",
|
"name": "pay_name_daojulibao_11",
|
||||||
"undefined": "调校合金不足_68",
|
"undefined": "调校合金不足_68",
|
||||||
"time": 1,
|
"time": -1,
|
||||||
"buys": 1,
|
"buys": 0,
|
||||||
"needVip": 0,
|
"needVip": 0,
|
||||||
"front": {},
|
"front": {},
|
||||||
"currency": "CNY"
|
"currency": "CNY"
|
||||||
@ -5518,8 +5518,8 @@
|
|||||||
"firstPayPrize": [],
|
"firstPayPrize": [],
|
||||||
"name": "pay_name_daojulibao_12",
|
"name": "pay_name_daojulibao_12",
|
||||||
"undefined": "调校合金不足_128",
|
"undefined": "调校合金不足_128",
|
||||||
"time": 1,
|
"time": -1,
|
||||||
"buys": 1,
|
"buys": 0,
|
||||||
"needVip": 0,
|
"needVip": 0,
|
||||||
"front": {},
|
"front": {},
|
||||||
"currency": "CNY"
|
"currency": "CNY"
|
||||||
@ -5549,8 +5549,8 @@
|
|||||||
"firstPayPrize": [],
|
"firstPayPrize": [],
|
||||||
"name": "pay_name_zhanbailibao_1",
|
"name": "pay_name_zhanbailibao_1",
|
||||||
"undefined": "战败礼包_68",
|
"undefined": "战败礼包_68",
|
||||||
"time": 1,
|
"time": -1,
|
||||||
"buys": 1,
|
"buys": 0,
|
||||||
"needVip": 0,
|
"needVip": 0,
|
||||||
"front": {},
|
"front": {},
|
||||||
"currency": "CNY"
|
"currency": "CNY"
|
||||||
@ -5580,8 +5580,8 @@
|
|||||||
"firstPayPrize": [],
|
"firstPayPrize": [],
|
||||||
"name": "pay_name_zhanbailibao_2",
|
"name": "pay_name_zhanbailibao_2",
|
||||||
"undefined": "战败礼包_68",
|
"undefined": "战败礼包_68",
|
||||||
"time": 1,
|
"time": -1,
|
||||||
"buys": 1,
|
"buys": 0,
|
||||||
"needVip": 0,
|
"needVip": 0,
|
||||||
"front": {},
|
"front": {},
|
||||||
"currency": "CNY"
|
"currency": "CNY"
|
||||||
@ -5611,8 +5611,8 @@
|
|||||||
"firstPayPrize": [],
|
"firstPayPrize": [],
|
||||||
"name": "pay_name_zhanbailibao_3",
|
"name": "pay_name_zhanbailibao_3",
|
||||||
"undefined": "战败礼包_68",
|
"undefined": "战败礼包_68",
|
||||||
"time": 1,
|
"time": -1,
|
||||||
"buys": 1,
|
"buys": 0,
|
||||||
"needVip": 0,
|
"needVip": 0,
|
||||||
"front": {},
|
"front": {},
|
||||||
"currency": "CNY"
|
"currency": "CNY"
|
||||||
|
5002
src/json/renown_chanchu.json
Normal file
5002
src/json/renown_chanchu.json
Normal file
File diff suppressed because it is too large
Load Diff
@ -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 = {
|
type gcType = {
|
||||||
[key: string]: any
|
[key: string]: any
|
||||||
armyattr: gc_armyattr
|
armyattr: gc_armyattr
|
||||||
@ -1983,9 +1960,7 @@ type gcType = {
|
|||||||
kfcb_prize: gc_kfcb_prize
|
kfcb_prize: gc_kfcb_prize
|
||||||
yuyuemail: gc_yuyuemail
|
yuyuemail: gc_yuyuemail
|
||||||
tuisonglibao: gc_push_gift
|
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() {
|
export function initGcType() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -23,7 +23,7 @@ export default {
|
|||||||
/**cross mongodb url */
|
/**cross mongodb url */
|
||||||
crossMongodbUrl: 'mongodb://root:lyMaple525458@10.0.1.20:27017/heijiao_cross?authSource=admin',
|
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: '',
|
time: '',
|
||||||
/**开服时间 */
|
/**开服时间 */
|
||||||
|
@ -27,39 +27,39 @@ import {
|
|||||||
CollectionKbzzGroupTroop,
|
CollectionKbzzGroupTroop,
|
||||||
CollectionKbzzGroupUser
|
CollectionKbzzGroupUser
|
||||||
} from './collection_kbzz';
|
} from './collection_kbzz';
|
||||||
import {CollectionKuangDong} from './collection_kuangdong';
|
import { CollectionKuangDong } from './collection_kuangdong';
|
||||||
import {CollectionLingZhuLaiXi} from './collection_lingzhulaixi';
|
import { CollectionLingZhuLaiXi } from './collection_lingzhulaixi';
|
||||||
import {CollectionMingdao} from './collection_mingdao';
|
import { CollectionMingdao } from './collection_mingdao';
|
||||||
import {CollectionPlayerInfo} from './collection_palyerInfo';
|
import { CollectionPlayerInfo } from './collection_palyerInfo';
|
||||||
import {CollectionPata} from './collection_pata';
|
import { CollectionPata } from './collection_pata';
|
||||||
import {CollectionPeiJian} from './collection_peijian';
|
import { CollectionPeiJian } from './collection_peijian';
|
||||||
import {CollectionPlayAttr} from './collection_playattr';
|
import { CollectionPlayAttr } from './collection_playattr';
|
||||||
import {CollectionRank, CollectionRankList} from './collection_rank';
|
import { CollectionRank, CollectionRankList } from './collection_rank';
|
||||||
import {CollectionRecord} from './collection_record';
|
import { CollectionRecord } from './collection_record';
|
||||||
import {CollectionSchedler} from './collection_scheduler';
|
import { CollectionSchedler } from './collection_scheduler';
|
||||||
import {CollectionShiwu} from './collection_shiwu';
|
import { CollectionShiwu } from './collection_shiwu';
|
||||||
import {CollectionSlzdGh, CollectionSlzdUser, CollectionSlzdStash} from './collection_slzd';
|
import { CollectionSlzdGh, CollectionSlzdUser, CollectionSlzdStash } from './collection_slzd';
|
||||||
import {CollectionTanXian} from './collection_tanxian';
|
import { CollectionTanXian } from './collection_tanxian';
|
||||||
import {CollectionTask} from './collection_task';
|
import { CollectionTask } from './collection_task';
|
||||||
import {CollectionUser} from './collection_user';
|
import { CollectionUser } from './collection_user';
|
||||||
import {CollectionWanted} from './collection_wanted';
|
import { CollectionWanted } from './collection_wanted';
|
||||||
import {CollectionWjjl} from './collection_wjjl';
|
import { CollectionWjjl } from './collection_wjjl';
|
||||||
import {CollectionWzryCross} from './collection_wzry_user_cross';
|
import { CollectionWzryCross } from './collection_wzry_user_cross';
|
||||||
import {CollectionWzryCrossFight} from './collection_wzryfight';
|
import { CollectionWzryCrossFight } from './collection_wzryfight';
|
||||||
import {CollectionWzryCrossFightLOG} from './collection_wzryfightlOG';
|
import { CollectionWzryCrossFightLOG } from './collection_wzryfightlOG';
|
||||||
import {CollectionWzryCrossWiner} from './collection_wzrywiner';
|
import { CollectionWzryCrossWiner } from './collection_wzrywiner';
|
||||||
import {CollectionXstask} from './collection_xstask';
|
import { CollectionXstask } from './collection_xstask';
|
||||||
import {CollectionZhanLing} from './collection_zhanling';
|
import { CollectionZhanLing } from './collection_zhanling';
|
||||||
import {CollectionHdinfo} from './collection_hdinfo';
|
import { CollectionHdinfo } from './collection_hdinfo';
|
||||||
import {CollectionGiftLog} from "./collection_giftLog";
|
import { CollectionGiftLog } from "./collection_giftLog";
|
||||||
import {CollectionLoginLog} from "./collection_loginLog";
|
import { CollectionLoginLog } from "./collection_loginLog";
|
||||||
import {CollectionPayLogNew} from "./collection_payLogNew";
|
import { CollectionPayLogNew } from "./collection_payLogNew";
|
||||||
import {CollectionApiCount} from "./collection_apiCount";
|
import { CollectionApiCount } from "./collection_apiCount";
|
||||||
import {CollectionPlayerBehavior} from "./collection_player_behavior";
|
import { CollectionPlayerBehavior } from "./collection_player_behavior";
|
||||||
import {CollectionRmbuse} from "./collection_rmbuse";
|
import { CollectionRmbuse } from "./collection_rmbuse";
|
||||||
import {CollectionFightLog} from "./collection_fightLog";
|
import { CollectionFightLog } from "./collection_fightLog";
|
||||||
import {CollectionShop} from "./collection_shop";
|
import { CollectionShop } from "./collection_shop";
|
||||||
import {CollectionPushGift} from "./collection_pushgift";
|
import { CollectionPushGift } from "./collection_pushgift";
|
||||||
import { CollectionWeiwang } from './collection_weiwang';
|
import { CollectionWeiwang } from './collection_weiwang';
|
||||||
|
|
||||||
export type MongodbCollections = {
|
export type MongodbCollections = {
|
||||||
|
@ -2640,20 +2640,6 @@ export const serviceProto: ServiceProto<ServiceType> = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 38,
|
"id": 38,
|
||||||
"name": "weiwangbuff",
|
|
||||||
"type": {
|
|
||||||
"type": "Interface",
|
|
||||||
"indexSignature": {
|
|
||||||
"keyType": "String",
|
|
||||||
"type": {
|
|
||||||
"type": "Number"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": 39,
|
|
||||||
"name": "heroskin",
|
"name": "heroskin",
|
||||||
"type": {
|
"type": {
|
||||||
"type": "Interface",
|
"type": "Interface",
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
import { ApiCall, TsrpcError } from 'tsrpc';
|
import {ApiCall, TsrpcError} from 'tsrpc';
|
||||||
import { FightControl } from '../shared/fightControl/fightCntrol';
|
import {FightControl} from '../shared/fightControl/fightCntrol';
|
||||||
import { formatNpcData } from '../shared/fightControl/fightFun';
|
import {formatNpcData} from '../shared/fightControl/fightFun';
|
||||||
import { fightResult, joinFightData, roleDataType } from '../shared/fightControl/fightType';
|
import {fightResult, joinFightData, roleDataType} from '../shared/fightControl/fightType';
|
||||||
import { rankInfo } from '../shared/protocols/type';
|
import {rankInfo} from '../shared/protocols/type';
|
||||||
import { HeroShared } from '../shared/public/hero';
|
import {HeroShared} from '../shared/public/hero';
|
||||||
import { PlayerShared } from '../shared/public/player';
|
import {PlayerShared} from '../shared/public/player';
|
||||||
import { HeroFun } from './hero';
|
import {HeroFun} from './hero';
|
||||||
import { UserFun } from './user';
|
import {UserFun} from './user';
|
||||||
import { re, string } from "mathjs";
|
import {re, string} from "mathjs";
|
||||||
import { getGud } from './gud';
|
import {getGud} from './gud';
|
||||||
import { PushGiftFun } from "./pushgift";
|
import {PushGiftFun} from "./pushgift";
|
||||||
|
|
||||||
type fightType = 'tanxian' | 'pata' | 'jjc' | 'gbtx' | 'qjzzd' | 'meirishilian' | 'wzrycross' | 'hqjg';
|
type fightType = 'tanxian' | 'pata' | 'jjc' | 'gbtx' | 'qjzzd' | 'meirishilian' | 'wzrycross' | 'hqjg';
|
||||||
|
|
||||||
|
@ -19,9 +19,9 @@ import { getGud, setGud } from './gud';
|
|||||||
import { addGameLog } from "../gameLog";
|
import { addGameLog } from "../gameLog";
|
||||||
import { PushGiftFun } from "./pushgift";
|
import { PushGiftFun } from "./pushgift";
|
||||||
import { ActionLog } from './actionLog/actionLog';
|
import { ActionLog } from './actionLog/actionLog';
|
||||||
|
import HeroSkinFun from './heroskin';
|
||||||
import { roleDataType } from '../shared/fightControl/fightType';
|
import { roleDataType } from '../shared/fightControl/fightType';
|
||||||
import { PlayerShared } from '../shared/public/player';
|
import { PlayerShared } from '../shared/public/player';
|
||||||
import HeroSkinFun from './heroskin';
|
|
||||||
|
|
||||||
|
|
||||||
export type call = {
|
export type call = {
|
||||||
@ -49,14 +49,14 @@ export class PlayerFun {
|
|||||||
* @param uid
|
* @param uid
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
static async getDefaultFightDataByUid(uid: string) {
|
static async getDefaultFightDataByUid(uid:string){
|
||||||
let gud = await getGud(uid);
|
let gud = await getGud(uid);
|
||||||
let posObj = gud.heroPos;
|
let posObj = gud.heroPos;
|
||||||
let roles: k_v<roleDataType> = {};
|
let roles: k_v<roleDataType> = {};
|
||||||
if (gud.selectMatrix && gud.matrixPos) {
|
if (gud.selectMatrix && gud.matrixPos) {
|
||||||
posObj = gud.matrixPos[gud.selectMatrix];
|
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)
|
let otherBuff = UserFun.getOtherBuff(gud)
|
||||||
|
|
||||||
Object.entries(posObj).forEach(obj => {
|
Object.entries(posObj).forEach(obj => {
|
||||||
@ -155,7 +155,7 @@ export class PlayerFun {
|
|||||||
all.push(this.addItem(call, item));
|
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);
|
await Promise.all(all);
|
||||||
G.emit('USE_ITEM', call.conn.gud, needArr.map(need => {
|
G.emit('USE_ITEM', call.conn.gud, needArr.map(need => {
|
||||||
return { ...need, n: Math.abs(need.n) };
|
return { ...need, n: Math.abs(need.n) };
|
||||||
|
@ -64,41 +64,6 @@ export class SchedulerNewDayLocalCtor extends Scheduler {
|
|||||||
G.emit('NEW_DAY', G.time);
|
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)
|
let users = Object.values(G.server.uid_connections)
|
||||||
if (users.length) {
|
if (users.length) {
|
||||||
for (let item of users) {
|
for (let item of users) {
|
||||||
|
@ -4,6 +4,7 @@ import { taskType } from "../shared/protocols/task/type";
|
|||||||
import { PublicShared } from "../shared/public/public";
|
import { PublicShared } from "../shared/public/public";
|
||||||
import { PeijianFun } from "./peijian";
|
import { PeijianFun } from "./peijian";
|
||||||
import { manager } from "./taskclass";
|
import { manager } from "./taskclass";
|
||||||
|
import ApiRecTask from "../api_s2c/event/zhanling/ApiRecTask";
|
||||||
|
|
||||||
let taskDict = {};
|
let taskDict = {};
|
||||||
const SHUJUKU = "task";
|
const SHUJUKU = "task";
|
||||||
@ -114,7 +115,7 @@ export class TaskFun {
|
|||||||
let _taskCon = await this.getTaskConByType(_task["type"], _task["taskid"]);
|
let _taskCon = await this.getTaskConByType(_task["type"], _task["taskid"]);
|
||||||
if (!_taskCon || Object.keys(_taskCon).length == 0) {
|
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
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -142,12 +143,12 @@ export class TaskFun {
|
|||||||
// 任务值上限检测
|
// 任务值上限检测
|
||||||
_resVal = _resVal > _pval ? _pval : _resVal;
|
_resVal = _resVal > _pval ? _pval : _resVal;
|
||||||
// 设置任务
|
// 设置任务
|
||||||
let _setData = { nval: _resVal };
|
let _setData = {nval: _resVal};
|
||||||
let _where = { taskid: _task["taskid"] };
|
let _where = {taskid: _task["taskid"]};
|
||||||
await this.setTask(uid, _where, _setData);
|
await this.setTask(uid, _where, _setData);
|
||||||
|
|
||||||
if (_resVal == _pval) {
|
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) {
|
if (ttype == 1 || ttype == 4) {
|
||||||
let _zero = PublicShared.getToDayZeroTime(G.time);
|
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);
|
let _tmp = await this.getUserTaksList(call.uid, _where);
|
||||||
if (_tmp.length == 0) await this.resetDailyTask(call, ttype);
|
if (_tmp.length == 0) await this.resetDailyTask(call, ttype);
|
||||||
}
|
}
|
||||||
@ -197,7 +198,7 @@ export class TaskFun {
|
|||||||
* 重置每日任务
|
* 重置每日任务
|
||||||
*/
|
*/
|
||||||
static async resetDailyTask(call: ApiCall, type: number = 1) {
|
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;
|
// if (PublicShared.chkSameDate(call.conn.gud.cTime, G.time)) return;
|
||||||
let _taskCons = await this.getTaskConsByType(type);
|
let _taskCons = await this.getTaskConsByType(type);
|
||||||
@ -236,7 +237,7 @@ export class TaskFun {
|
|||||||
static async getFinishByStype(call: ApiCall, stype: number, where: {}) {
|
static async getFinishByStype(call: ApiCall, stype: number, where: {}) {
|
||||||
// 任务刷新
|
// 任务刷新
|
||||||
await this.refreshTask(call);
|
await this.refreshTask(call);
|
||||||
Object.assign(where, { stype: stype });
|
Object.assign(where, {stype: stype});
|
||||||
let _r = await this.getUserTaksList(call.uid, where);
|
let _r = await this.getUserTaksList(call.uid, where);
|
||||||
return _r;
|
return _r;
|
||||||
}
|
}
|
||||||
@ -255,7 +256,7 @@ export class TaskFun {
|
|||||||
// Object.assign(where, { type: { $in: ttype } })
|
// Object.assign(where, { type: { $in: ttype } })
|
||||||
for (let index = 0; index < ttype.length; index++) {
|
for (let index = 0; index < ttype.length; index++) {
|
||||||
const _type = ttype[index];
|
const _type = ttype[index];
|
||||||
Object.assign(_w, { type: _type, ...where });
|
Object.assign(_w, {type: _type, ...where});
|
||||||
if (_finishType.indexOf(_type) != -1) {
|
if (_finishType.indexOf(_type) != -1) {
|
||||||
delete _w["finish"];
|
delete _w["finish"];
|
||||||
}
|
}
|
||||||
@ -335,7 +336,7 @@ export class TaskFun {
|
|||||||
* @param call
|
* @param call
|
||||||
*/
|
*/
|
||||||
static async updateMainTask(call: ApiCall) {
|
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);
|
let _ftaskCon = await TaskFun.getTaskConByType(2, data.taskid);
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
@ -346,14 +347,14 @@ export class TaskFun {
|
|||||||
type: 2,
|
type: 2,
|
||||||
finish: 0,
|
finish: 0,
|
||||||
taskid: data.taskid
|
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) {
|
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;
|
if (_r > 0) return;
|
||||||
let _taskInfo = [];
|
let _taskInfo = [];
|
||||||
let _con = G.gc.task;
|
let _con = G.gc.task;
|
||||||
@ -374,7 +375,7 @@ export class TaskFun {
|
|||||||
/**生成指定类型任务-初始化 */
|
/**生成指定类型任务-初始化 */
|
||||||
static async reInitTask(call: ApiCall, type: string) {
|
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 = [];
|
let _taskInfo = [];
|
||||||
if (_r == 0) {
|
if (_r == 0) {
|
||||||
let _con = G.gc.task;
|
let _con = G.gc.task;
|
||||||
@ -396,7 +397,7 @@ export class TaskFun {
|
|||||||
*/
|
*/
|
||||||
static async getUserTaksList(uid: string, where: {}) {
|
static async getUserTaksList(uid: string, where: {}) {
|
||||||
// type : 1 主线 2 成就 3 每日
|
// type : 1 主线 2 成就 3 每日
|
||||||
Object.assign(where, { uid: uid });
|
Object.assign(where, {uid: uid});
|
||||||
let _taskInfo = await G.mongodb.collection(SHUJUKU).find(where).toArray();
|
let _taskInfo = await G.mongodb.collection(SHUJUKU).find(where).toArray();
|
||||||
_taskInfo.forEach(e => {
|
_taskInfo.forEach(e => {
|
||||||
if (e._id) delete e._id;
|
if (e._id) delete e._id;
|
||||||
@ -408,7 +409,7 @@ export class TaskFun {
|
|||||||
* 删除相关任务
|
* 删除相关任务
|
||||||
*/
|
*/
|
||||||
static async delTasks(uid: string, where: { type: number; }) {
|
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);
|
await G.mongodb.collection(SHUJUKU).deleteMany(where);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -442,8 +443,8 @@ export class TaskFun {
|
|||||||
if (Object.keys(setData).length == 0) {
|
if (Object.keys(setData).length == 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Object.assign(where, { uid });
|
Object.assign(where, {uid});
|
||||||
setData = { $set: setData };
|
setData = {$set: setData};
|
||||||
await G.mongodb.collection(SHUJUKU).updateOne(where, 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;
|
if ((element == "1" || element == "3") && call.conn.gud.lv < 7) continue;
|
||||||
let _values: number[] = _ttype[element];
|
let _values: number[] = _ttype[element];
|
||||||
let _where: {} = {
|
let _where: {} = {
|
||||||
uid: call.uid, type: { $in: _values }, finish: 0, '$expr': {
|
uid: call.uid, type: {$in: _values}, finish: 0, '$expr': {
|
||||||
$lte: ["$pval", "$nval"]
|
$lte: ["$pval", "$nval"]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -605,7 +606,7 @@ export class TaskAllEmitFun {
|
|||||||
uid: node.call.conn.uid,
|
uid: node.call.conn.uid,
|
||||||
type: 'usertasklog'
|
type: 'usertasklog'
|
||||||
},
|
},
|
||||||
{ $set: { maxequiplv: _val } });
|
{$set: {maxequiplv: _val}});
|
||||||
}
|
}
|
||||||
G.emit("Class_task_112", 'Class_task_112', node.call, _val, 0);
|
G.emit("Class_task_112", 'Class_task_112', node.call, _val, 0);
|
||||||
// 有 n 件强化 配置 等级装备 后面复写正确值
|
// 有 n 件强化 配置 等级装备 后面复写正确值
|
||||||
@ -629,7 +630,7 @@ export class TaskAllEmitFun {
|
|||||||
uid: node.call.conn.uid,
|
uid: node.call.conn.uid,
|
||||||
type: 'usertasklog'
|
type: 'usertasklog'
|
||||||
},
|
},
|
||||||
{ $set: { maxequiplv: _val } });
|
{$set: {maxequiplv: _val}});
|
||||||
}
|
}
|
||||||
// 有 n 件强化 配置 等级装备 后面复写正确值
|
// 有 n 件强化 配置 等级装备 后面复写正确值
|
||||||
G.emit("Class_task_113", 'Class_task_113', node.call, 0, 0);
|
G.emit("Class_task_113", 'Class_task_113', node.call, 0, 0);
|
||||||
@ -647,7 +648,7 @@ export class TaskAllEmitFun {
|
|||||||
uid: node.call.conn.uid,
|
uid: node.call.conn.uid,
|
||||||
type: 'usertasklog'
|
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({
|
await G.mongodb.collection('playerInfo', 'usertasklog').updateOne({
|
||||||
uid: node.call.uid,
|
uid: node.call.uid,
|
||||||
type: 'usertasklog'
|
type: 'usertasklog'
|
||||||
}, { $set: { equipcolor: usertasklog.equipcolor } })
|
}, {$set: {equipcolor: usertasklog.equipcolor}})
|
||||||
}
|
}
|
||||||
// if (node.call.service.name == 'chongzhi/Open' && node.return.isSucc) {
|
// if (node.call.service.name == 'chongzhi/Open' && node.return.isSucc) {
|
||||||
// // 累计充值 n 钻石 数量后面复写
|
// // 累计充值 n 钻石 数量后面复写
|
||||||
@ -715,7 +716,7 @@ export class TaskAllEmitFun {
|
|||||||
uid: node.call.conn.uid,
|
uid: node.call.conn.uid,
|
||||||
type: 'usertasklog'
|
type: 'usertasklog'
|
||||||
},
|
},
|
||||||
{ $set: { friendAsk: _val } });
|
{$set: {friendAsk: _val}});
|
||||||
G.emit("Class_task_144", 'Class_task_144', node.call, 1, 0);
|
G.emit("Class_task_144", 'Class_task_144', node.call, 1, 0);
|
||||||
}
|
}
|
||||||
if (node.call.service.name == 'tanxian/FastGuaJi' && node.return.isSucc) {
|
if (node.call.service.name == 'tanxian/FastGuaJi' && node.return.isSucc) {
|
||||||
@ -874,7 +875,7 @@ export class TaskAllEmitFun {
|
|||||||
uid: node.call.conn.uid,
|
uid: node.call.conn.uid,
|
||||||
type: 'usertasklog'
|
type: 'usertasklog'
|
||||||
});
|
});
|
||||||
let _setData = { $set: {} }; // 更新配件记录
|
let _setData = {$set: {}}; // 更新配件记录
|
||||||
|
|
||||||
let peijianCon = G.gc.peijian;
|
let peijianCon = G.gc.peijian;
|
||||||
let _lv = 0;
|
let _lv = 0;
|
||||||
|
@ -813,7 +813,7 @@ export module manager {
|
|||||||
isinc = 1
|
isinc = 1
|
||||||
|
|
||||||
async initVal(call: ApiCall, con) {
|
async initVal(call: ApiCall, con) {
|
||||||
return 0;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 第59个任务 获得vip经验
|
// 第59个任务 获得vip经验
|
||||||
|
@ -301,6 +301,9 @@ export class UserFun {
|
|||||||
change = true;
|
change = true;
|
||||||
gud.headFrames[conf.id] = G.time + val * v;
|
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") {
|
else if(conf?.cond?.[0] == "jjc_rank") {
|
||||||
change = true;
|
change = true;
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -7,6 +7,7 @@ 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>;
|
||||||
}>;
|
}>;
|
||||||
@ -32,7 +33,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];
|
||||||
@ -41,7 +42,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}`)());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -136,7 +137,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;
|
||||||
}
|
}
|
||||||
@ -274,16 +275,11 @@ 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})])));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 威望加成计算
|
|
||||||
if (otherBuff?.weiwangbuff) {
|
|
||||||
PublicShared.mergeProperty(buff, otherBuff?.weiwangbuff || {});
|
|
||||||
}
|
|
||||||
|
|
||||||
// 计算皮肤buff
|
// 计算皮肤buff
|
||||||
if (otherBuff?.heroskin) {
|
if (otherBuff?.heroskin) {
|
||||||
for (let skinId in 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) {
|
for (let k in buff) {
|
||||||
if (k.indexOf('pro') == -1) continue;
|
if (k.indexOf('pro') == -1) continue;
|
||||||
|
@ -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 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] == '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] == '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;
|
else return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -3,8 +3,3 @@
|
|||||||
cp "/usr/share/zoneinfo/$1" "/etc/localtime"
|
cp "/usr/share/zoneinfo/$1" "/etc/localtime"
|
||||||
echo "$1" > /etc/timezone
|
echo "$1" > /etc/timezone
|
||||||
|
|
||||||
for i in `env | grep -E -i 'SERVER_GAME' | sed 's/=.*//'` ; do
|
|
||||||
unset $i
|
|
||||||
done
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user