皮肤系统
This commit is contained in:
xichaoyin 2024-01-04 17:42:14 +08:00
parent 20f0f41c22
commit 83485d0fd0
28 changed files with 9464 additions and 719 deletions

View File

@ -0,0 +1,20 @@
import { ApiCall } from "tsrpc";
import { ReqTakeOff, ResTakeOff } from "../../shared/protocols/heroskin/PtlTakeOff";
import { HeroFun } from "../../public/hero";
export default async function (call: ApiCall<ReqTakeOff, ResTakeOff>) {
let hero = await HeroFun.getHero(call, call.req.heroOid);
if (!hero) { // 英雄不存在
call.error(lng.hero_1);
return;
}
if (!hero.skin) { // 没有穿戴皮肤
call.error(lng.hero_22);
return;
}
HeroFun.changeHeroAttr(call, hero, { skin: "" });
call.succ({});
}

View File

@ -0,0 +1,36 @@
import { ApiCall } from "tsrpc";
import HeroSkinFun from "../../public/heroskin";
import { PlayerFun } from "../../public/player";
import { ReqUplv, ResUplv } from "../../shared/protocols/heroskin/PtlUplv";
export default async function (call: ApiCall<ReqUplv, ResUplv>) {
let skin = HeroSkinFun.getHeroSkin(call);
if (!skin[call.req.skid]) {// 皮肤未获得
call.error(lng.hero_20);
}
let cur_lv = skin[call.req.skid];
let skinconf = G.gc.heroSkin[skin.skid];
let need = [];
for (let i = 0; i < call.req.lv; i++) {
need.concat(
G.gc.heroSkinLv[skinconf.colour][cur_lv + i].need
)
}
// 检测消耗
await PlayerFun.checkNeedIsMeet(call, need);
// 扣除消耗
await PlayerFun.cutNeed(call, need);
// 更新等级
skin[call.req.skid] = cur_lv + call.req.lv;
// 更新skinlv
HeroSkinFun.updateHeroSkinLv(call, { [call.req.skid]: cur_lv + call.req.lv });
call.succ({});
}

View File

@ -0,0 +1,28 @@
import { ApiCall } from "tsrpc";
import { HeroFun } from "../../public/hero";
import HeroSkinFun from "../../public/heroskin";
import { ReqWear, ResWear } from "../../shared/protocols/heroskin/PtlWear";
export default async function (call: ApiCall<ReqWear, ResWear>) {
let hero = await HeroFun.getHero(call, call.req.heroOid);
if (!hero) { // 英雄不存在
call.error(lng.hero_1);
return;
}
let skin = HeroSkinFun.getHeroSkin(call);
if (!skin || !skin[call.req.skid]) { // 皮肤不存在
call.error(lng.hero_20);
return;
}
let skinconf = G.gc.heroSkin[skin.skid];
if (skinconf.heroid != hero.heroId) { // 皮肤不属于该英雄
call.error(lng.hero_21);
return;
}
HeroFun.changeHeroAttr(call, hero, { skin: call.req.skid });
call.succ({});
}

View File

@ -1316,6 +1316,20 @@ export const serviceProto: ServiceProto<ServiceType> = {
}
},
"optional": true
},
{
"id": 38,
"name": "heroskin",
"type": {
"type": "Interface",
"indexSignature": {
"keyType": "String",
"type": {
"type": "Number"
}
}
},
"optional": true
}
]
},
@ -1707,6 +1721,13 @@ export const serviceProto: ServiceProto<ServiceType> = {
}
}
}
},
{
"id": 8,
"name": "skin",
"type": {
"type": "String"
}
}
]
},

View File

@ -2,7 +2,7 @@
"jinbi": {
"id": "jinbi",
"name": "intr_attr_name_1",
"undefined": "美金",
"undefined": "通用货币,能购买大多数商品",
"colour": 3,
"icon": "icon_jinbi",
"sicon": "icon_jinbi",
@ -12,7 +12,7 @@
"rmbmoney": {
"id": "rmbmoney",
"name": "intr_attr_name_2",
"undefined": "钻石",
"undefined": "稀有货币,没有人可以抗拒它",
"colour": 5,
"icon": "icon_zuanshi",
"sicon": "icon_zuanshi",
@ -22,7 +22,7 @@
"nexp": {
"id": "nexp",
"name": "intr_attr_name_3",
"undefined": "主角经验",
"undefined": "用于提升主角等级",
"colour": 4,
"icon": "icon_zjjy",
"sicon": "icon_zjjy",
@ -32,7 +32,7 @@
"rongyu": {
"id": "rongyu",
"name": "intr_attr_name_4",
"undefined": "荣誉勋章",
"undefined": "荣誉的象征,可以在荣誉商店兑换道具",
"colour": 4,
"icon": "icon_rongyu",
"sicon": "icon_rongyu",
@ -42,7 +42,7 @@
"payExp": {
"id": "payExp",
"name": "intr_attr_name_5",
"undefined": "VIP经验",
"undefined": "稀有货币,没有人可以抗拒它",
"colour": 5,
"icon": "icon_gzjy",
"sicon": "icon_gzjy",
@ -52,7 +52,7 @@
"guijinshu": {
"id": "guijinshu",
"name": "intr_attr_name_6",
"undefined": "贵金属",
"undefined": "通过精炼饰品获得的稀有贵金属,可以在饰品商店兑换饰品",
"colour": 3,
"icon": "icon_xyjsh",
"sicon": "icon_xyjsh",
@ -62,7 +62,7 @@
"shilifrd": {
"id": "shilifrd",
"name": "intr_attr_name_11",
"undefined": "势力繁荣度",
"undefined": "势力繁荣度越高,势力等级越高",
"colour": 4,
"icon": "icon_slfrd",
"sicon": "icon_slfrd",
@ -72,7 +72,7 @@
"clsl_sd": {
"id": "clsl_sd",
"name": "intr_attr_name_12",
"undefined": "丛林狩猎胜点",
"undefined": "丛林狩猎的段位胜点,胜点数量足够后可进阶",
"colour": 5,
"icon": "icon_clsl_xx",
"sicon": "icon_clsl_xx",
@ -82,7 +82,7 @@
"nahanzhuwei": {
"id": "nahanzhuwei",
"name": "tlsd_guess_name_1",
"undefined": "呐喊助威",
"undefined": "参与竞猜后获得莱微碎片*1和美金*500000",
"colour": 5,
"icon": "icon_heroBox_11",
"sicon": "icon_heroBox_11",
@ -92,7 +92,7 @@
"aidebaobao": {
"id": "aidebaobao",
"name": "tlsd_guess_name_2",
"undefined": "爱的抱抱",
"undefined": "参与竞猜后获得莱微碎片*1,配件蓝图*1和美金*800000",
"colour": 5,
"icon": "icon_heroBox_11",
"sicon": "icon_heroBox_11",
@ -102,7 +102,7 @@
"woweishenkuang": {
"id": "woweishenkuang",
"name": "tlsd_guess_name_3",
"undefined": "我为神狂",
"undefined": "参与竞猜后获得莱微碎片*1,配件蓝图*3和美金*1000000",
"colour": 5,
"icon": "icon_heroBox_11",
"sicon": "icon_heroBox_11",
@ -112,7 +112,7 @@
"shengdanExp": {
"id": "shengdanExp",
"name": "intr_attr_name_13",
"undefined": "圣诞战令经验",
"undefined": "一年一度的圣诞庆典获得的圣诞欢乐值,可以提升庆典圣诞树奖励进度",
"colour": 5,
"icon": "icon_sdhd_item_1",
"sicon": "icon_sdhd_item_1",
@ -122,7 +122,7 @@
"shengdanBullet": {
"id": "shengdanBullet",
"name": "intr_attr_name_14",
"undefined": "圣诞打靶币",
"undefined": "圣诞活动获得的庆典喷漆,可以在“百发百中”兑换射击次数",
"colour": 5,
"icon": "icon_chegaipq",
"sicon": "icon_chegaipq",
@ -132,7 +132,7 @@
"jingxuanbi": {
"id": "jingxuanbi",
"name": "intr_attr_name_15",
"undefined": "每日精选兑换币",
"undefined": "只能在黑市使用的票券,可以在黑市里的每日精选兑换商店购买稀有道具",
"colour": 4,
"icon": "icon_hspj",
"sicon": "icon_hspj",
@ -142,7 +142,7 @@
"weiwang": {
"id": "weiwang",
"name": "intr_attr_name_16",
"undefined": "影响力",
"undefined": "影响力提升了周围同伴的信任,可以在影响力系统中提升属性值",
"colour": 4,
"icon": "icon_weiwang",
"sicon": "icon_weiwang",
@ -152,11 +152,31 @@
"yuandanyouxi": {
"id": "yuandanyouxi",
"name": "intr_attr_name_17",
"undefined": "元旦游戏币",
"undefined": "在新年活动中获得的庆典币,可以在机遇礼盒兑换游玩次数",
"colour": 5,
"icon": "icon_xnjb",
"sicon": "icon_xnjb",
"describe": "intr_attr_describe_17",
"advancedEffects": "ani_xiangzikuang"
},
"huangqijinbi": {
"id": "huangqijinbi",
"name": "intr_attr_name_18",
"undefined": "在黄旗酒馆活动中获得的庆典币,可以在黄旗招募中兑换招募次数",
"colour": 5,
"icon": "icon_hqjb",
"sicon": "icon_hqjb",
"describe": "intr_attr_describe_18",
"advancedEffects": "ani_xiangzikuang"
},
"huangqiduihuan": {
"id": "huangqiduihuan",
"name": "intr_attr_name_19",
"undefined": "在黄旗酒馆活动中获得的兑换票券,可以在神秘兑换中购买商品",
"colour": 5,
"icon": "icon_hqdhq",
"sicon": "icon_hqdhq",
"describe": "intr_attr_describe_19",
"advancedEffects": "ani_xiangzikuang"
}
}

View File

@ -1,11 +1,18 @@
{
//赛区划分按照周三23:50的时候王者玩家100个一组
//赛区划分时间周三23:50
divideTime: 258600,
//挑战时间周一08:00——周六22:00
//赛区划分
divide: [
{ day: [1, 30], group: 0 },
{ day: [31, 60], group: 1 },
{ day: [61, 120], group: 2 },
{ day: [121, 210], group: 3 },
{ day: [211, 99999999], group: 4 },
],
//赛区划分时间
divideTime: 0,
//挑战时间
fightTime: [28800, 511200],
//发奖时间周六22:05
prizeTime: 511500,
//发奖时间
prizeTime: 598200,
//胜场奖励
fightWinPrize: [
{ total: 5, prize: [{ a: 'attr', t: 'clsl_sd', n: 1 },{ a: 'item', t: '37', n: 1 }], star: 1 },
@ -32,13 +39,13 @@
],
//段位奖励
danPrize: [
{ star: 49, title: "clsl_7", prize: [{ a: 'item', t: '605', n:3 },{ a: 'item', t: '29', n:10 },{ a: 'item', t: '631', n:3 },{ a: 'item', t: '40', n:1 }] },
{ star: 39, title: "clsl_6", prize: [{ a: 'item', t: '605', n:2 },{ a: 'item', t: '29', n:5 },{ a: 'item', t: '631', n:2 }] },
{ star: 29, title: "clsl_5", prize: [{ a: 'item', t: '606', n:3 },{ a: 'item', t: '29', n:5 },{ a: 'item', t: '631', n:1 }] },
{ star: 21, title: "clsl_4", prize: [{ a: 'item', t: '606', n:2 },{ a: 'item', t: '29', n:5 },{ a: 'item', t: '39', n:1000 }] },
{ star: 13, title: "clsl_3", prize: [{ a: 'item', t: '606', n:1 },{ a: 'item', t: '29', n:5 },{ a: 'item', t: '39', n:800 }] },
{ star: 7, title: "clsl_2", prize: [{ a: 'item', t: '29', n:10 },{ a: 'item', t: '29', n:5 },{ a: 'item', t: '39', n:600 }] },
{ star: 0, title: "clsl_1", prize: [{ a: 'item', t: '29', n:5 },{ a: 'item', t: '29', n:5 },{ a: 'item', t: '39', n:400 }] }
{ star: 49, prize: [{ a: 'item', t: '605', n:3 },{ a: 'item', t: '29', n:10 },{ a: 'item', t: '631', n:3 },{ a: 'item', t: '40', n:1 }] },
{ star: 39, prize: [{ a: 'item', t: '605', n:2 },{ a: 'item', t: '29', n:5 },{ a: 'item', t: '631', n:2 }] },
{ star: 29, prize: [{ a: 'item', t: '606', n:3 },{ a: 'item', t: '29', n:5 },{ a: 'item', t: '631', n:1 }] },
{ star: 21, prize: [{ a: 'item', t: '606', n:2 },{ a: 'item', t: '29', n:5 },{ a: 'item', t: '39', n:1000 }] },
{ star: 13, prize: [{ a: 'item', t: '606', n:1 },{ a: 'item', t: '29', n:5 },{ a: 'item', t: '39', n:800 }] },
{ star: 7, prize: [{ a: 'item', t: '29', n:10 },{ a: 'item', t: '29', n:5 },{ a: 'item', t: '39', n:600 }] },
{ star: 0, prize: [{ a: 'item', t: '29', n:5 },{ a: 'item', t: '29', n:5 },{ a: 'item', t: '39', n:400 }] }
],
//王者排名邮件信息
email_rank: {

View File

@ -2774,7 +2774,7 @@
"id": 4003,
"a": "item",
"t": 28,
"n": 1,
"n": 100,
"p": 6
},
{
@ -4505,82 +4505,12 @@
}
],
"10021": [
{
"id": 10021,
"a": "hero",
"t": 4001,
"n": 1,
"p": 20
},
{
"id": 10021,
"a": "hero",
"t": 4002,
"n": 1,
"p": 20
},
{
"id": 10021,
"a": "hero",
"t": 4003,
"n": 1,
"p": 20
},
{
"id": 10021,
"a": "hero",
"t": 4004,
"n": 1,
"p": 20
},
{
"id": 10021,
"a": "hero",
"t": 4005,
"n": 1,
"p": 20
},
{
"id": 10021,
"a": "hero",
"t": 4007,
"n": 1,
"p": 20
},
{
"id": 10021,
"a": "hero",
"t": 4009,
"n": 1,
"p": 20
},
{
"id": 10021,
"a": "hero",
"t": 4011,
"n": 1,
"p": 20
},
{
"id": 10021,
"a": "hero",
"t": 4012,
"n": 1,
"p": 20
},
{
"id": 10021,
"a": "hero",
"t": 4014,
"n": 1,
"p": 20
},
{
"id": 10021,
"a": "hero",
"t": 4015,
"n": 1,
"p": 20
}
],
"20001": [

File diff suppressed because it is too large Load Diff

View File

@ -915,6 +915,37 @@
"front": {},
"currency": "CNY"
},
"lv10": {
"id": "lv10",
"money": 0.5,
"payExp": [
{
"a": "attr",
"t": "payExp",
"n": 5
}
],
"prize": [
{
"a": "attr",
"t": "rmbmoney",
"n": 100
},
{
"a": "hero",
"t": "4012",
"n": 1
}
],
"firstPayPrize": [],
"name": "pay_name_lv10",
"undefined": "等级豪礼等级10",
"time": -1,
"buys": 1,
"needVip": 0,
"front": {},
"currency": "CNY"
},
"lv15": {
"id": "lv15",
"money": 0.5,
@ -6673,5 +6704,205 @@
"needVip": 0,
"front": {},
"currency": "CNY"
},
"hqjg_libao_1": {
"id": "hqjg_libao_1",
"money": 0.5,
"payExp": [
{
"a": "attr",
"t": "payExp",
"n": 5
}
],
"prize": [],
"firstPayPrize": [],
"name": "pay_name_hqjg_libao_1",
"undefined": "黄旗酒馆_1",
"time": -1,
"buys": 0,
"needVip": 0,
"front": {},
"currency": "CNY"
},
"hqjg_libao_2": {
"id": "hqjg_libao_2",
"money": 1,
"payExp": [
{
"a": "attr",
"t": "payExp",
"n": 10
}
],
"prize": [],
"firstPayPrize": [],
"name": "pay_name_hqjg_libao_2",
"undefined": "黄旗酒馆_2",
"time": -1,
"buys": 0,
"needVip": 0,
"front": {},
"currency": "CNY"
},
"hqjg_libao_3": {
"id": "hqjg_libao_3",
"money": 6,
"payExp": [
{
"a": "attr",
"t": "payExp",
"n": 60
}
],
"prize": [],
"firstPayPrize": [],
"name": "pay_name_hqjg_libao_3",
"undefined": "黄旗酒馆_3",
"time": -1,
"buys": 0,
"needVip": 0,
"front": {},
"currency": "CNY"
},
"hqjg_libao_4": {
"id": "hqjg_libao_4",
"money": 18,
"payExp": [
{
"a": "attr",
"t": "payExp",
"n": 180
}
],
"prize": [],
"firstPayPrize": [],
"name": "pay_name_hqjg_libao_4",
"undefined": "黄旗酒馆_4",
"time": -1,
"buys": 0,
"needVip": 0,
"front": {},
"currency": "CNY"
},
"hqjg_libao_5": {
"id": "hqjg_libao_5",
"money": 30,
"payExp": [
{
"a": "attr",
"t": "payExp",
"n": 300
}
],
"prize": [],
"firstPayPrize": [],
"name": "pay_name_hqjg_libao_5",
"undefined": "黄旗酒馆_5",
"time": -1,
"buys": 0,
"needVip": 0,
"front": {},
"currency": "CNY"
},
"hqjg_libao_6": {
"id": "hqjg_libao_6",
"money": 68,
"payExp": [
{
"a": "attr",
"t": "payExp",
"n": 680
}
],
"prize": [],
"firstPayPrize": [],
"name": "pay_name_hqjg_libao_6",
"undefined": "黄旗酒馆_6",
"time": -1,
"buys": 0,
"needVip": 0,
"front": {},
"currency": "CNY"
},
"hqjg_libao_7": {
"id": "hqjg_libao_7",
"money": 128,
"payExp": [
{
"a": "attr",
"t": "payExp",
"n": 1280
}
],
"prize": [],
"firstPayPrize": [],
"name": "pay_name_hqjg_libao_7",
"undefined": "黄旗酒馆_7",
"time": -1,
"buys": 0,
"needVip": 0,
"front": {},
"currency": "CNY"
},
"hqjg_libao_8": {
"id": "hqjg_libao_8",
"money": 198,
"payExp": [
{
"a": "attr",
"t": "payExp",
"n": 1980
}
],
"prize": [],
"firstPayPrize": [],
"name": "pay_name_hqjg_libao_8",
"undefined": "黄旗酒馆_8",
"time": -1,
"buys": 0,
"needVip": 0,
"front": {},
"currency": "CNY"
},
"hqjg_libao_9": {
"id": "hqjg_libao_9",
"money": 328,
"payExp": [
{
"a": "attr",
"t": "payExp",
"n": 3280
}
],
"prize": [],
"firstPayPrize": [],
"name": "pay_name_hqjg_libao_9",
"undefined": "黄旗酒馆_9",
"time": -1,
"buys": 0,
"needVip": 0,
"front": {},
"currency": "CNY"
},
"hqjg_libao_10": {
"id": "hqjg_libao_10",
"money": 648,
"payExp": [
{
"a": "attr",
"t": "payExp",
"n": 6480
}
],
"prize": [],
"firstPayPrize": [],
"name": "pay_name_hqjg_libao_10",
"undefined": "黄旗酒馆_10",
"time": -1,
"buys": 0,
"needVip": 0,
"front": {},
"currency": "CNY"
}
}

View File

@ -2,12 +2,12 @@
"1": {
"id": 1,
"name": "playerChatFrame_name_1",
"undefined": "玩家初始默认聊天框",
"img": "lt_dhk1",
"cond": [
"lv",
1
],
"undefined": "进入游戏默认获得",
"intr": "playerChatFrame_des_1",
"sort": 1,
"buff": {
@ -19,12 +19,12 @@
"2": {
"id": 2,
"name": "playerChatFrame_name_2",
"undefined": "主角等级达到30级获得解锁后防御加成+1%",
"img": "lt_dhk3",
"cond": [
"lv",
30
],
"undefined": "角色等级达到30级获得",
"intr": "playerChatFrame_des_2",
"sort": 2,
"buff": {
@ -36,12 +36,12 @@
"3": {
"id": 3,
"name": "playerChatFrame_name_3",
"undefined": "主角等级达到50级获得解锁后防御加成+1%",
"img": "lt_dhk4",
"cond": [
"lv",
50
],
"undefined": "角色等级达到50级获得",
"intr": "playerChatFrame_des_3",
"sort": 3,
"buff": {
@ -53,12 +53,12 @@
"4": {
"id": 4,
"name": "playerChatFrame_name_4",
"undefined": "图鉴数量达到30个获得解锁后防御加成+1%",
"img": "lt_dhk5",
"cond": [
"tujianLv",
7
],
"undefined": "图鉴数量达到30个获得",
"intr": "playerChatFrame_des_4",
"sort": 5,
"buff": {
@ -70,12 +70,12 @@
"5": {
"id": 5,
"name": "playerChatFrame_name_5",
"undefined": "VIP5获得解锁后攻击加成+1%",
"img": "lt_dhk7",
"cond": [
"vip",
5
],
"undefined": "VIP5获得",
"intr": "playerChatFrame_des_5",
"sort": 4,
"buff": {
@ -87,12 +87,12 @@
"6": {
"id": 6,
"name": "playerChatFrame_name_6",
"undefined": "跨服势力战最高品质据点第一势力成员,解锁后攻击加成+1%、生命加成+1%限时7天",
"img": "lt_dhk11",
"cond": [
"time",
604800
],
"undefined": "跨服势力战最高品质据点第一势力成员",
"intr": "playerChatFrame_des_6",
"sort": 6,
"buff": {
@ -105,12 +105,12 @@
"7": {
"id": 7,
"name": "playerChatFrame_name_7",
"undefined": "名望等级达到七阶获得,解锁后防御加成+1%",
"img": "lt_dhk13",
"cond": [
"renown",
61
],
"undefined": "名望等级达到七阶获得",
"intr": "playerChatFrame_des_7",
"sort": 7,
"buff": {
@ -122,12 +122,12 @@
"8": {
"id": 8,
"name": "playerChatFrame_name_8",
"undefined": "圣诞庆典活动获得,解锁后防御加成+1%",
"img": "lt_dhk14",
"cond": [
"time",
-1
],
"undefined": "圣诞庆典获得",
"intr": "playerChatFrame_des_8",
"sort": 8,
"buff": {
@ -139,12 +139,12 @@
"9": {
"id": 9,
"name": "playerChatFrame_name_9",
"undefined": "新年庆典活动获得,解锁后防御加成+1%",
"img": "lt_dhk15",
"cond": [
"time",
-1
],
"undefined": "新年庆典获得",
"intr": "playerChatFrame_des_9",
"sort": 9,
"buff": {

View File

@ -3,6 +3,7 @@
"id": 1,
"type": 1,
"name": "playerModel_name_1",
"undefined": "主角初始默认的男形象",
"head": 10001,
"img": "zhu_10001",
"cond": [
@ -20,6 +21,7 @@
"id": 2,
"type": 1,
"name": "playerModel_name_2",
"undefined": "主角初始默认的女形象",
"head": 10002,
"img": "zhu_10002",
"cond": [
@ -37,6 +39,7 @@
"id": 3,
"type": 1,
"name": "playerModel_name_3",
"undefined": "圣诞庆典活动获得,解锁后防御加成+2%",
"head": 100011,
"img": 100011,
"cond": [
@ -56,6 +59,7 @@
"id": 4,
"type": 1,
"name": "playerModel_name_4",
"undefined": "圣诞庆典活动获得,解锁后攻击加成+2%",
"head": 100021,
"img": 100021,
"cond": [

View File

@ -3,360 +3,600 @@
"id": 1,
"renownlevel": 1,
"maxlevel": 250,
"cost": 5,
"atk": 2,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 2
}
],
"atk": 1.2,
"def": 1,
"hp": 8
"hp": 4
},
"2": {
"id": 2,
"renownlevel": 2,
"maxlevel": 500,
"cost": 6,
"atk": 2,
"maxlevel": 750,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 2
}
],
"atk": 1.2,
"def": 1,
"hp": 9
"hp": 4
},
"3": {
"id": 3,
"renownlevel": 3,
"maxlevel": 750,
"cost": 7,
"atk": 2,
"maxlevel": 1500,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 2
}
],
"atk": 1.2,
"def": 1,
"hp": 10
"hp": 4
},
"4": {
"id": 4,
"renownlevel": 4,
"maxlevel": 1000,
"cost": 9,
"atk": 4,
"def": 2,
"hp": 11
"maxlevel": 2500,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 2
}
],
"atk": 1.2,
"def": 1,
"hp": 4
},
"5": {
"id": 5,
"renownlevel": 5,
"maxlevel": 1250,
"cost": 11,
"atk": 4,
"def": 2,
"hp": 12
"maxlevel": 3750,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 2
}
],
"atk": 1.2,
"def": 1,
"hp": 4
},
"6": {
"id": 6,
"renownlevel": 6,
"maxlevel": 1500,
"cost": 13,
"atk": 4,
"def": 2,
"hp": 13
"maxlevel": 5250,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 2
}
],
"atk": 1.2,
"def": 1,
"hp": 4
},
"7": {
"id": 7,
"renownlevel": 7,
"maxlevel": 1750,
"cost": 15,
"atk": 6,
"def": 3,
"hp": 14
"maxlevel": 7000,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 2
}
],
"atk": 1.2,
"def": 1,
"hp": 4
},
"8": {
"id": 8,
"renownlevel": 8,
"maxlevel": 2000,
"cost": 17,
"atk": 6,
"def": 3,
"hp": 15
"maxlevel": 9000,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 2
}
],
"atk": 1.2,
"def": 1,
"hp": 4
},
"9": {
"id": 9,
"renownlevel": 9,
"maxlevel": 2500,
"cost": 19,
"atk": 6,
"def": 3,
"hp": 16
"maxlevel": 11500,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 2
}
],
"atk": 1.2,
"def": 1,
"hp": 4
},
"10": {
"id": 10,
"renownlevel": 10,
"maxlevel": 3000,
"cost": 21,
"atk": 8,
"def": 4,
"hp": 17
"maxlevel": 14500,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 2
}
],
"atk": 1.2,
"def": 1,
"hp": 4
},
"11": {
"id": 11,
"renownlevel": 11,
"maxlevel": 3500,
"cost": 23,
"atk": 8,
"def": 4,
"hp": 18
"maxlevel": 18000,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 2
}
],
"atk": 1.2,
"def": 1,
"hp": 5
},
"12": {
"id": 12,
"renownlevel": 12,
"maxlevel": 4000,
"cost": 25,
"atk": 8,
"def": 4,
"hp": 19
"maxlevel": 22000,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 2
}
],
"atk": 1.2,
"def": 1,
"hp": 5
},
"13": {
"id": 13,
"renownlevel": 13,
"maxlevel": 4500,
"cost": 27,
"atk": 10,
"def": 5,
"hp": 20
"maxlevel": 26500,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 2
}
],
"atk": 1.2,
"def": 1,
"hp": 5
},
"14": {
"id": 14,
"renownlevel": 14,
"maxlevel": 5000,
"cost": 30,
"atk": 10,
"def": 5,
"hp": 21
"maxlevel": 31500,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 2
}
],
"atk": 1.2,
"def": 1,
"hp": 5
},
"15": {
"id": 15,
"renownlevel": 15,
"maxlevel": 5000,
"cost": 33,
"atk": 10,
"def": 5,
"hp": 21
"maxlevel": 36500,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 2
}
],
"atk": 1.2,
"def": 1,
"hp": 5
},
"16": {
"id": 16,
"renownlevel": 16,
"maxlevel": 5000,
"cost": 36,
"atk": 12,
"def": 6,
"hp": 22
"maxlevel": 41500,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 5
}
],
"atk": 1.4,
"def": 1.2,
"hp": 6
},
"17": {
"id": 17,
"renownlevel": 17,
"maxlevel": 5000,
"cost": 39,
"atk": 12,
"def": 6,
"hp": 22
"maxlevel": 46500,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 9
}
],
"atk": 1.4,
"def": 1.2,
"hp": 6
},
"18": {
"id": 18,
"renownlevel": 18,
"maxlevel": 5000,
"cost": 42,
"atk": 12,
"def": 6,
"hp": 22
"maxlevel": 51500,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 13
}
],
"atk": 1.4,
"def": 1.2,
"hp": 6
},
"19": {
"id": 19,
"renownlevel": 19,
"maxlevel": 5000,
"cost": 45,
"atk": 14,
"def": 7,
"hp": 23
"maxlevel": 56500,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 17
}
],
"atk": 1.4,
"def": 1.2,
"hp": 6
},
"20": {
"id": 20,
"renownlevel": 20,
"maxlevel": 5000,
"cost": 48,
"atk": 14,
"def": 7,
"hp": 23
"maxlevel": 61500,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 21
}
],
"atk": 1.4,
"def": 1.2,
"hp": 6
},
"21": {
"id": 21,
"renownlevel": 21,
"maxlevel": 5000,
"cost": 51,
"atk": 14,
"def": 7,
"hp": 23
"maxlevel": 66500,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 23
}
],
"atk": 1.4,
"def": 1.2,
"hp": 7
},
"22": {
"id": 22,
"renownlevel": 22,
"maxlevel": 5000,
"cost": 54,
"atk": 14,
"def": 7,
"hp": 23
"maxlevel": 71500,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 25
}
],
"atk": 1.4,
"def": 1.2,
"hp": 7
},
"23": {
"id": 23,
"renownlevel": 23,
"maxlevel": 5000,
"cost": 57,
"atk": 16,
"def": 8,
"hp": 24
"maxlevel": 76500,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 27
}
],
"atk": 1.4,
"def": 1.2,
"hp": 7
},
"24": {
"id": 24,
"renownlevel": 24,
"maxlevel": 5000,
"cost": 60,
"atk": 16,
"def": 8,
"hp": 24
"maxlevel": 81500,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 29
}
],
"atk": 1.4,
"def": 1.2,
"hp": 7
},
"25": {
"id": 25,
"renownlevel": 25,
"maxlevel": 5000,
"cost": 63,
"atk": 16,
"def": 8,
"hp": 24
"maxlevel": 86500,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 30
}
],
"atk": 1.4,
"def": 1.2,
"hp": 7
},
"26": {
"id": 26,
"renownlevel": 26,
"maxlevel": 5000,
"cost": 66,
"atk": 16,
"def": 8,
"hp": 24
"maxlevel": 91500,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 32
}
],
"atk": 1.4,
"def": 1.2,
"hp": 8
},
"27": {
"id": 27,
"renownlevel": 27,
"maxlevel": 5000,
"cost": 69,
"atk": 16,
"def": 8,
"hp": 24
"maxlevel": 96500,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 34
}
],
"atk": 1.4,
"def": 1.2,
"hp": 8
},
"28": {
"id": 28,
"renownlevel": 28,
"maxlevel": 5000,
"cost": 72,
"atk": 18,
"def": 9,
"hp": 25
"maxlevel": 101500,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 36
}
],
"atk": 1.4,
"def": 1.2,
"hp": 8
},
"29": {
"id": 29,
"renownlevel": 29,
"maxlevel": 5000,
"cost": 75,
"atk": 18,
"def": 9,
"hp": 25
"maxlevel": 106500,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 38
}
],
"atk": 1.4,
"def": 1.2,
"hp": 8
},
"30": {
"id": 30,
"renownlevel": 30,
"maxlevel": 5000,
"cost": 78,
"atk": 18,
"def": 9,
"hp": 25
"maxlevel": 111500,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 40
}
],
"atk": 1.4,
"def": 1.2,
"hp": 8
},
"31": {
"id": 31,
"renownlevel": 31,
"maxlevel": 5000,
"cost": 81,
"atk": 18,
"def": 9,
"hp": 25
"maxlevel": 116500,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 42
}
],
"atk": 1.4,
"def": 1.2,
"hp": 8
},
"32": {
"id": 32,
"renownlevel": 32,
"maxlevel": 5000,
"cost": 84,
"atk": 18,
"def": 9,
"hp": 25
"maxlevel": 121500,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 44
}
],
"atk": 1.4,
"def": 1.2,
"hp": 8
},
"33": {
"id": 33,
"renownlevel": 33,
"maxlevel": 5000,
"cost": 87,
"atk": 18,
"def": 10,
"hp": 25
"maxlevel": 126500,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 46
}
],
"atk": 1.4,
"def": 1.2,
"hp": 8
},
"34": {
"id": 34,
"renownlevel": 34,
"maxlevel": 5000,
"cost": 90,
"atk": 18,
"def": 10,
"hp": 25
"maxlevel": 131500,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 48
}
],
"atk": 1.4,
"def": 1.2,
"hp": 8
},
"35": {
"id": 35,
"renownlevel": 35,
"maxlevel": 5000,
"cost": 93,
"atk": 18,
"def": 10,
"hp": 25
"maxlevel": 136500,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 50
}
],
"atk": 1.4,
"def": 1.2,
"hp": 8
},
"36": {
"id": 36,
"renownlevel": 36,
"maxlevel": 5000,
"cost": 97,
"atk": 18,
"def": 10,
"hp": 25
"maxlevel": 141500,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 52
}
],
"atk": 1.4,
"def": 1.2,
"hp": 8
},
"37": {
"id": 37,
"renownlevel": 37,
"maxlevel": 5000,
"cost": 101,
"atk": 18,
"def": 10,
"hp": 25
"maxlevel": 146500,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 54
}
],
"atk": 1.4,
"def": 1.2,
"hp": 8
},
"38": {
"id": 38,
"renownlevel": 38,
"maxlevel": 5000,
"cost": 105,
"atk": 18,
"def": 10,
"hp": 25
"maxlevel": 151500,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 56
}
],
"atk": 1.4,
"def": 1.2,
"hp": 8
},
"39": {
"id": 39,
"renownlevel": 39,
"maxlevel": 5000,
"cost": 109,
"atk": 18,
"def": 10,
"hp": 25
"maxlevel": 156500,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 58
}
],
"atk": 1.4,
"def": 1.2,
"hp": 8
},
"40": {
"id": 40,
"renownlevel": 40,
"maxlevel": 5000,
"cost": 113,
"atk": 18,
"def": 10,
"hp": 25
"maxlevel": 161500,
"cost": [
{
"a": "attr",
"t": "weiwang",
"n": 60
}
],
"atk": 1.4,
"def": 1.2,
"hp": 8
}
}

File diff suppressed because it is too large Load Diff

View File

@ -388,10 +388,10 @@
"type": 5,
"typeName": "tuisonglibao_name_1",
"num": [
15
10
],
"payId": [
"lv15"
"lv10"
],
"time": 10800,
"displayCD": 10800,

View File

@ -14,9 +14,10 @@
"n": 10000
}
],
"p": 3,
"p": 5,
"intr": "intr_xuanshangrenwu_intr_1",
"img": "icon_jinbi"
"img": "icon_jinbi",
"appearNum": 0
},
"2": {
"id": 2,
@ -33,9 +34,10 @@
"n": 80
}
],
"p": 4,
"p": 3,
"intr": "intr_xuanshangrenwu_intr_2",
"img": "icon_jinbi"
"img": "icon_jinbi",
"appearNum": 0
},
"3": {
"id": 3,
@ -54,7 +56,8 @@
],
"p": 5,
"intr": "intr_xuanshangrenwu_intr_3",
"img": "icon_jinbi"
"img": "icon_jinbi",
"appearNum": 0
},
"4": {
"id": 4,
@ -71,9 +74,10 @@
"n": 30
}
],
"p": 6,
"p": 1,
"intr": "intr_xuanshangrenwu_intr_4",
"img": "icon_jinbi"
"img": "icon_jinbi",
"appearNum": 3
},
"5": {
"id": 5,
@ -90,9 +94,10 @@
"n": 20000
}
],
"p": 7,
"p": 3,
"intr": "intr_xuanshangrenwu_intr_5",
"img": "icon_jinbi"
"img": "icon_jinbi",
"appearNum": 0
},
"6": {
"id": 6,
@ -109,9 +114,10 @@
"n": 60
}
],
"p": 8,
"p": 5,
"intr": "intr_xuanshangrenwu_intr_4",
"img": "icon_jinbi"
"img": "icon_jinbi",
"appearNum": 3
},
"7": {
"id": 7,
@ -128,9 +134,10 @@
"n": 20000
}
],
"p": 9,
"p": 3,
"intr": "intr_xuanshangrenwu_intr_5",
"img": "icon_jinbi"
"img": "icon_jinbi",
"appearNum": 0
},
"8": {
"id": 8,
@ -147,9 +154,10 @@
"n": 40000
}
],
"p": 10,
"p": 5,
"intr": "intr_xuanshangrenwu_intr_6",
"img": "icon_jinbi"
"img": "icon_jinbi",
"appearNum": 0
},
"9": {
"id": 9,
@ -166,9 +174,10 @@
"n": 110
}
],
"p": 11,
"p": 1,
"intr": "intr_xuanshangrenwu_intr_7",
"img": "icon_jinbi"
"img": "icon_jinbi",
"appearNum": 0
},
"10": {
"id": 10,
@ -185,9 +194,10 @@
"n": 30000
}
],
"p": 12,
"p": 3,
"intr": "intr_xuanshangrenwu_intr_8",
"img": "icon_jinbi"
"img": "icon_jinbi",
"appearNum": 0
},
"11": {
"id": 11,
@ -204,9 +214,10 @@
"n": 30000
}
],
"p": 13,
"p": 5,
"intr": "intr_xuanshangrenwu_intr_6",
"img": "icon_jinbi"
"img": "icon_jinbi",
"appearNum": 0
},
"12": {
"id": 12,
@ -223,9 +234,10 @@
"n": 140
}
],
"p": 14,
"p": 3,
"intr": "intr_xuanshangrenwu_intr_7",
"img": "icon_jinbi"
"img": "icon_jinbi",
"appearNum": 0
},
"13": {
"id": 13,
@ -242,9 +254,10 @@
"n": 60000
}
],
"p": 15,
"p": 3,
"intr": "intr_xuanshangrenwu_intr_8",
"img": "icon_jinbi"
"img": "icon_jinbi",
"appearNum": 0
},
"14": {
"id": 14,
@ -261,9 +274,10 @@
"n": 40000
}
],
"p": 16,
"p": 5,
"intr": "intr_xuanshangrenwu_intr_9",
"img": "icon_jinbi"
"img": "icon_jinbi",
"appearNum": 0
},
"15": {
"id": 15,
@ -280,9 +294,10 @@
"n": 90
}
],
"p": 17,
"p": 2,
"intr": "intr_xuanshangrenwu_intr_10",
"img": "icon_jinbi"
"img": "icon_jinbi",
"appearNum": 3
},
"16": {
"id": 16,
@ -299,9 +314,10 @@
"n": 40000
}
],
"p": 18,
"p": 4,
"intr": "intr_xuanshangrenwu_intr_8",
"img": "icon_jinbi"
"img": "icon_jinbi",
"appearNum": 0
},
"17": {
"id": 17,
@ -318,9 +334,10 @@
"n": 50000
}
],
"p": 19,
"p": 5,
"intr": "intr_xuanshangrenwu_intr_9",
"img": "icon_jinbi"
"img": "icon_jinbi",
"appearNum": 0
},
"18": {
"id": 18,
@ -337,9 +354,10 @@
"n": 120
}
],
"p": 20,
"p": 1,
"intr": "intr_xuanshangrenwu_intr_10",
"img": "icon_jinbi"
"img": "icon_jinbi",
"appearNum": 3
},
"19": {
"id": 19,
@ -356,9 +374,10 @@
"n": 80000
}
],
"p": 21,
"p": 4,
"intr": "intr_xuanshangrenwu_intr_11",
"img": "icon_jinbi"
"img": "icon_jinbi",
"appearNum": 0
},
"20": {
"id": 20,
@ -375,9 +394,10 @@
"n": 170
}
],
"p": 22,
"p": 4,
"intr": "intr_xuanshangrenwu_intr_12",
"img": "icon_jinbi"
"img": "icon_jinbi",
"appearNum": 0
},
"21": {
"id": 21,
@ -394,9 +414,10 @@
"n": 100000
}
],
"p": 23,
"p": 3,
"intr": "intr_xuanshangrenwu_intr_11",
"img": "icon_jinbi"
"img": "icon_jinbi",
"appearNum": 0
},
"22": {
"id": 22,
@ -413,9 +434,10 @@
"n": 200
}
],
"p": 24,
"p": 2,
"intr": "intr_xuanshangrenwu_intr_12",
"img": "icon_jinbi"
"img": "icon_jinbi",
"appearNum": 0
},
"23": {
"id": 23,
@ -432,9 +454,10 @@
"n": 150
}
],
"p": 25,
"p": 1,
"intr": "intr_xuanshangrenwu_intr_13",
"img": "icon_jinbi"
"img": "icon_jinbi",
"appearNum": 3
},
"24": {
"id": 24,
@ -451,9 +474,10 @@
"n": 50000
}
],
"p": 26,
"p": 5,
"intr": "intr_xuanshangrenwu_intr_14",
"img": "icon_jinbi"
"img": "icon_jinbi",
"appearNum": 0
},
"25": {
"id": 25,
@ -470,9 +494,10 @@
"n": 60000
}
],
"p": 27,
"p": 2,
"intr": "intr_xuanshangrenwu_intr_15",
"img": "icon_jinbi"
"img": "icon_jinbi",
"appearNum": 0
},
"26": {
"id": 26,
@ -489,9 +514,10 @@
"n": 60000
}
],
"p": 28,
"p": 5,
"intr": "intr_xuanshangrenwu_intr_14",
"img": "icon_jinbi"
"img": "icon_jinbi",
"appearNum": 0
},
"27": {
"id": 27,
@ -508,9 +534,10 @@
"n": 75000
}
],
"p": 29,
"p": 5,
"intr": "intr_xuanshangrenwu_intr_15",
"img": "icon_jinbi"
"img": "icon_jinbi",
"appearNum": 0
},
"28": {
"id": 28,
@ -527,9 +554,10 @@
"n": 180
}
],
"p": 30,
"p": 1,
"intr": "intr_xuanshangrenwu_intr_16",
"img": "icon_jinbi"
"img": "icon_jinbi",
"appearNum": 3
},
"29": {
"id": 29,
@ -546,9 +574,10 @@
"n": 230
}
],
"p": 31,
"p": 2,
"intr": "intr_xuanshangrenwu_intr_17",
"img": "icon_jinbi"
"img": "icon_jinbi",
"appearNum": 0
},
"30": {
"id": 30,
@ -565,8 +594,9 @@
"n": 120000
}
],
"p": 32,
"p": 4,
"intr": "intr_xuanshangrenwu_intr_18",
"img": "icon_jinbi"
"img": "icon_jinbi",
"appearNum": 0
}
}

View File

@ -1797,6 +1797,28 @@ 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]: {
buff: { [k: string]: number }
need: { a: string, t: string, n: number }[];
}
}
}
type gcType = {
[key: string]: any
armyattr: gc_armyattr
@ -1946,7 +1968,8 @@ type gcType = {
kfcb_prize: gc_kfcb_prize
yuyuemail: gc_yuyuemail
tuisonglibao: gc_push_gift
heroSkin: gc_hero_skin
heroSkinLv: gc_hero_skin_lv
}
@ -1957,4 +1980,3 @@ declare global {
export function initGcType() {
}

View File

@ -239,6 +239,9 @@ class Lng {
hero_17 = "hero_17";
hero_18 = "hero_18";
hero_19 = "hero_19";
hero_20 = "hero_20";
hero_21 = "hero_21";
hero_22 = "hero_22";
item_1 = "item_1";
item_2 = "item_2";

View File

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

49
src/public/heroskin.ts Normal file
View File

@ -0,0 +1,49 @@
import { ApiCall } from "tsrpc";
import { call } from "../public/player";
import { PlayerFun } from "./player";
export default class HeroSkinFun {
/**
*
* @param uid
* @returns
*/
static getHeroSkin(call: call, oids: string | string[] = '') {
return call.conn.gud.heroskin || {};
}
/**
*
*
* addAttr msg_s2c/PlayerChange
* addEventMsg PlayerChange change的key在player中则触发重算战力操作
* heroskin数据不需要主动重算战力
* @param oid
* @param data
* @returns
* */
static async updateHeroSkinLv(call: ApiCall, change: k_v<number>) {
let skin = this.getHeroSkin(call);
skin = Object.assign(skin, change);
await PlayerFun.addAttr(call, { heroskin: skin });
}
/**
* buff
* @param skid
* @param lv
* @returns {[string]: number}
* */
static calcBuff(skid: string, lv: number): k_v<number> {
let buff = {};
let skin = G.gc.heroSkin[skid];
for (let i = 1; i <= lv; i++) {
for (let k in G.gc.heroSkinLv[skin.colour][i].buff) {
buff[k] = (buff[k] || 0) + G.gc.heroSkinLv[skin.colour][i].buff[k];
}
}
return buff;
}
}

View File

@ -19,6 +19,7 @@ import {getGud, setGud} from './gud';
import { addGameLog } from "../gameLog";
import { PushGiftFun } from "./pushgift";
import { ActionLog } from './actionLog/actionLog';
import HeroSkinFun from './heroskin';
export type call = {
@ -136,6 +137,7 @@ export class PlayerFun {
let equip = prizeList.filter(atn => atn.a == 'equip' && atn.n != 0);
let shiwu = prizeList.filter(atn => atn.a == 'shiwu' && atn.n != 0);
let peijian = prizeList.filter(atn => atn.a == 'peijian' && atn.n != 0);
let heroskin = prizeList.filter(atn => atn.a == 'heroskin' && atn.n != 0);
// 记录获得
addGameLog(call.uid, call.service.name, call.req, { prize: prizeList })
@ -145,7 +147,8 @@ export class PlayerFun {
hero.length > 0 && this.addHero(call, hero),
equip.length > 0 && this.addEquip(call, equip),
shiwu.length > 0 && this.addShiwu(call, shiwu),
peijian.length > 0 && this.addPeijian(call, peijian)
peijian.length > 0 && this.addPeijian(call, peijian),
heroskin.length > 0 && this.addHeroskin(call, heroskin),
]);
return prizeList;
@ -591,6 +594,30 @@ export class PlayerFun {
return Object.values(result.insertedIds).map(v => G.mongodb.conversionId(v));
}
/**
*
* */
static async addHeroskin(call: call, val: atn[]) {
let prize = [];
let upskin = {};
let heroskin = HeroSkinFun.getHeroSkin(call);
for (let p of val) {
if (!heroskin[p.t]) {
upskin[p.t] = 1;
} else {
prize.concat(G.gc.heroSkin[p.t].zhuanhuan);
}
}
if (Object.keys(upskin).length > 0) {
this.addAttr(call, Object.assign(heroskin, upskin));
}
// 皮肤存在转换为其他奖励
if (prize.length > 0) {
this.sendPrize(call, prize);
}
}
/**
*
*/

View File

@ -71,4 +71,6 @@ type heroAddKey = {
peijian: {
[pos: string]: string;
};
/**皮肤*/
skin: string;
};

View File

@ -0,0 +1,7 @@
export interface ReqTakeOff {
heroOid: string
}
export interface ResTakeOff {
}

View File

@ -0,0 +1,6 @@
export interface ReqUplv {
lv: 1;
skid: string;
}
export interface ResUplv { }

View File

@ -0,0 +1,6 @@
export interface ReqWear {
skid: string,
heroOid: string,
}
export interface ResWear { }

File diff suppressed because it is too large Load Diff

View File

@ -193,4 +193,9 @@ export type playerAppend = {
chatFrames?: {
[id: string]: number;
};
/**获得的皮肤*/
heroskin?: {
[skid: string]: number;
}
};

View File

@ -1,3 +1,4 @@
import HeroSkinFun from '../../public/heroskin';
import { ResGetList } from '../protocols/hero/PtlGetList';
import { player } from '../protocols/user/type';
import { EquipShared } from './equip';
@ -278,6 +279,17 @@ export class HeroShared {
}
}
// 计算皮肤buff
if (otherBuff?.heroskin) {
for (let skinId in otherBuff.heroskin) {
let skinConf = G.gc.heroSkin[skinId];
if (skinConf.heroid != hero.heroId) console;
PublicShared.mergeProperty(buff, HeroSkinFun.calcBuff(
skinId, otherBuff.heroskin[skinId]
));
}
}
//最后进行加成属性计算
for (let k in buff) {
if (k.indexOf('pro') == -1) continue;