diff --git a/game-server/app/servers/role/handler/shopHandler.ts b/game-server/app/servers/role/handler/shopHandler.ts index 99df69570..805d3a76b 100644 --- a/game-server/app/servers/role/handler/shopHandler.ts +++ b/game-server/app/servers/role/handler/shopHandler.ts @@ -77,7 +77,7 @@ export class ShopHandler { // 获得 let reward = [{ id: dicShopItem.goodId, - count + count: count * (dicShopItem.num||1) }]; let goods = await addItems(roleId, roleName, sid, reward, ITEM_CHANGE_REASON.SHOP_PURCHASE); diff --git a/game-server/app/services/pvpService.ts b/game-server/app/services/pvpService.ts index dbbfc1621..5b58d35e8 100644 --- a/game-server/app/services/pvpService.ts +++ b/game-server/app/services/pvpService.ts @@ -2,7 +2,7 @@ import { PvpDefenseModel, PvpDefenseType, pvpUpdateInter } from '../db/PvpDefense'; import { Defense, Attack, LineupCe, OppPlayer, HeroScore, HeroReward, OppPlayerReturn, AttackHero, DefenseHero } from '../domain/battleField/pvp'; import { RoleType } from '../db/Role'; -import { PVP_HERO_POS, REDIS_KEY, PVP_CONST, COUNTER, TASK_TYPE, MAIL_TYPE, TA_EVENT } from '../consts'; +import { REDIS_KEY, TASK_TYPE, MAIL_TYPE, TA_EVENT } from '../consts'; import { dicPvpOpponent, DicPvpOpponent } from "../pubUtils/dictionary/DicPvpOpponent"; import { getRandSingleIndex, genCode, shouldRefresh, getChineseName, makeRobotId, robotIdComBack, getRandSingleEelm } from '../pubUtils/util'; import { pvpEndParamInter, RewardInter } from '../pubUtils/interface'; @@ -67,7 +67,7 @@ export async function refreshEnemies(role: RoleType, seasonNum: number, sumScore let opp = dicPvpOpponent.values() for (let dicOpp of opp) { let pvpHistoryOpp: PvpOppCreateParam; // 是否筛选成功 - if (sumScore >= PVP_CONST.SCORE_LINE) { // 将这个放到const + if (sumScore >= PVP.PVP_MATCH_ROBOT) { pvpHistoryOpp = await matchPlayer(seasonNum, chosenOpps, roleId, pLv, dicOpp); // 按照等级匹配对手 if (!pvpHistoryOpp) pvpHistoryOpp = await matchPlayerByRank(seasonNum, chosenOpps, roleId, dicOpp.id); // 当前后分数段没有时,返回前一名的玩家 if (!pvpHistoryOpp) pvpHistoryOpp = await matchRobot(chosenOpps, role, score, dicOpp); diff --git a/shared/consts/constModules/battleConst.ts b/shared/consts/constModules/battleConst.ts index da4048e3b..c4a6241e2 100644 --- a/shared/consts/constModules/battleConst.ts +++ b/shared/consts/constModules/battleConst.ts @@ -94,12 +94,6 @@ export const HANG_UP_CONSTS = { SPD_UP_REC_TIME: dicParam.TOWER_HANG_UP.TOWE_HANG_UP_SPD_UP_REC_TIME * 60 * 60 * 1000 // 加速直接获得6小时收益 } -export const PVP_CONST = { - REFRESH_TIME: 5, // 每天加点刷新 - SCORE_LINE: 3000, // 超过这个分数之后可以刷人类对手 - ENEMY_CE: 10000 // 对手战力 -} - export const EVENT_QUIZ_NUM = 3; diff --git a/shared/domain/roleField/shop.ts b/shared/domain/roleField/shop.ts index db922bcb4..5d381fe3e 100644 --- a/shared/domain/roleField/shop.ts +++ b/shared/domain/roleField/shop.ts @@ -16,6 +16,7 @@ interface ShopItemInDb { id: number; goodId: number; goodName: string; + num: number; guildLvLimit: number; lvLimit: number; purchaseLimit: number; @@ -71,6 +72,7 @@ export class ShopDicData { id: number; goodId: number; goodName: string; + num: number; guildLvLimit: number; lvLimit: number; purchaseLimit: number; @@ -89,6 +91,7 @@ export class ShopDicData { this.id = obj.id; this.goodId = obj.goodId; this.goodName = obj.goodName; + this.num = obj.num; this.guildLvLimit = obj.guildLvLimit; this.lvLimit = obj.lvLimit; this.purchaseLimit = obj.purchaseLimit; diff --git a/shared/pubUtils/dictionary/DicShop.ts b/shared/pubUtils/dictionary/DicShop.ts index 43e5ab0ce..273a8dce9 100644 --- a/shared/pubUtils/dictionary/DicShop.ts +++ b/shared/pubUtils/dictionary/DicShop.ts @@ -10,6 +10,8 @@ export interface DicShop { readonly goodId: number; // 物品表名 readonly goodName: number; + // 堆叠数量 + readonly num: number; // 商店id 对应 dic_zyz_shoplist的id readonly shop: number; // 商店标签 对应 dic_zyz_shopType的id diff --git a/shared/resource/jsons/dic_zyz_shop.json b/shared/resource/jsons/dic_zyz_shop.json index e1b4a7009..6d54b4377 100644 --- a/shared/resource/jsons/dic_zyz_shop.json +++ b/shared/resource/jsons/dic_zyz_shop.json @@ -3,6 +3,7 @@ "id": 1, "goodId": 72001, "goodName": "烧肉", + "num": 1, "shop": 1, "type": 5, "guildLvLimit": 0, @@ -20,6 +21,7 @@ "id": 2, "goodId": 17042, "goodName": "虎符", + "num": 1, "shop": 1, "type": 5, "guildLvLimit": 0, @@ -37,6 +39,7 @@ "id": 3, "goodId": 17001, "goodName": "觉醒丹", + "num": 10, "shop": 1, "type": 5, "guildLvLimit": 0, @@ -54,6 +57,7 @@ "id": 4, "goodId": 11101, "goodName": "四叶草玉符", + "num": 10, "shop": 1, "type": 5, "guildLvLimit": 0, @@ -71,6 +75,7 @@ "id": 5, "goodId": 17055, "goodName": "天外陨金", + "num": 1, "shop": 1, "type": 5, "guildLvLimit": 0, @@ -88,6 +93,7 @@ "id": 6, "goodId": 17044, "goodName": "洗练石", + "num": 1, "shop": 1, "type": 5, "guildLvLimit": 0, @@ -105,6 +111,7 @@ "id": 7, "goodId": 17057, "goodName": "淬炼石", + "num": 1, "shop": 1, "type": 5, "guildLvLimit": 0, @@ -122,6 +129,7 @@ "id": 8, "goodId": 22001, "goodName": "点将令", + "num": 1, "shop": 1, "type": 5, "guildLvLimit": 0, @@ -139,6 +147,7 @@ "id": 9, "goodId": 22002, "goodName": "求贤令", + "num": 1, "shop": 1, "type": 5, "guildLvLimit": 0, @@ -156,6 +165,7 @@ "id": 10, "goodId": 17045, "goodName": "乾坤锁", + "num": 100, "shop": 1, "type": 5, "guildLvLimit": 0, @@ -173,6 +183,7 @@ "id": 11, "goodId": 17056, "goodName": "息壤", + "num": 1, "shop": 1, "type": 5, "guildLvLimit": 0, @@ -190,6 +201,7 @@ "id": 12, "goodId": 22001, "goodName": "点将令", + "num": 1, "shop": 1, "type": 5, "guildLvLimit": 0, @@ -207,6 +219,7 @@ "id": 2001, "goodId": 50001, "goodName": "下品装备图纸", + "num": 1, "shop": 2, "type": 11, "guildLvLimit": 1, @@ -224,6 +237,7 @@ "id": 2002, "goodId": 50002, "goodName": "中品装备图纸", + "num": 1, "shop": 2, "type": 11, "guildLvLimit": 2, @@ -241,6 +255,7 @@ "id": 2003, "goodId": 50003, "goodName": "上品装备图纸", + "num": 1, "shop": 2, "type": 11, "guildLvLimit": 3, @@ -258,6 +273,7 @@ "id": 2004, "goodId": 50004, "goodName": "极品装备图纸", + "num": 1, "shop": 2, "type": 11, "guildLvLimit": 4, @@ -275,6 +291,7 @@ "id": 2005, "goodId": 50005, "goodName": "圣品装备图纸", + "num": 1, "shop": 2, "type": 11, "guildLvLimit": 6, @@ -292,6 +309,7 @@ "id": 2006, "goodId": 17054, "goodName": "镔铁", + "num": 1, "shop": 2, "type": 17, "guildLvLimit": 1, @@ -309,6 +327,7 @@ "id": 2007, "goodId": 71009, "goodName": "一阶宝石随机礼包", + "num": 1, "shop": 2, "type": 17, "guildLvLimit": 1, @@ -326,6 +345,7 @@ "id": 2008, "goodId": 17052, "goodName": "玉石", + "num": 1, "shop": 2, "type": 17, "guildLvLimit": 2, @@ -343,6 +363,7 @@ "id": 2009, "goodId": 17053, "goodName": "玉髓", + "num": 1, "shop": 2, "type": 17, "guildLvLimit": 2, @@ -360,6 +381,7 @@ "id": 3001, "goodId": 17042, "goodName": "虎符", + "num": 1, "shop": 3, "type": 18, "guildLvLimit": 0, @@ -377,6 +399,7 @@ "id": 3002, "goodId": 17001, "goodName": "觉醒石", + "num": 1, "shop": 3, "type": 18, "guildLvLimit": 0, @@ -394,6 +417,7 @@ "id": 3003, "goodId": 11011, "goodName": "美食", + "num": 1, "shop": 3, "type": 18, "guildLvLimit": 0, @@ -411,6 +435,7 @@ "id": 3004, "goodId": 11012, "goodName": "兵器", + "num": 1, "shop": 3, "type": 18, "guildLvLimit": 0, @@ -428,6 +453,7 @@ "id": 3005, "goodId": 11013, "goodName": "字画", + "num": 1, "shop": 3, "type": 18, "guildLvLimit": 0, @@ -445,6 +471,7 @@ "id": 3006, "goodId": 11014, "goodName": "古玩", + "num": 1, "shop": 3, "type": 18, "guildLvLimit": 0, @@ -462,6 +489,7 @@ "id": 4000, "goodId": 40014, "goodName": "龙纹蜀锦", + "num": 1, "shop": 4, "type": 13, "guildLvLimit": 0, @@ -479,6 +507,7 @@ "id": 4001, "goodId": 17001, "goodName": "觉醒石", + "num": 1, "shop": 4, "type": 13, "guildLvLimit": 0, @@ -496,6 +525,7 @@ "id": 4002, "goodId": 71001, "goodName": "自选橙将碎片", + "num": 1, "shop": 4, "type": 14, "guildLvLimit": 0, @@ -513,6 +543,7 @@ "id": 4003, "goodId": 17046, "goodName": "皇蟒印", + "num": 1, "shop": 4, "type": 14, "guildLvLimit": 0, @@ -530,6 +561,7 @@ "id": 4004, "goodId": 17047, "goodName": "玄龟印", + "num": 1, "shop": 4, "type": 15, "guildLvLimit": 0, @@ -547,6 +579,7 @@ "id": 4005, "goodId": 17048, "goodName": "饕餮印", + "num": 1, "shop": 4, "type": 15, "guildLvLimit": 0, @@ -564,6 +597,7 @@ "id": 4006, "goodId": 17049, "goodName": "螭虎印", + "num": 1, "shop": 4, "type": 15, "guildLvLimit": 0, @@ -581,6 +615,7 @@ "id": 4007, "goodId": 17050, "goodName": "金龙印", + "num": 1, "shop": 4, "type": 15, "guildLvLimit": 0, @@ -598,6 +633,7 @@ "id": 4008, "goodId": 17042, "goodName": "虎符", + "num": 1, "shop": 4, "type": 15, "guildLvLimit": 0, @@ -615,6 +651,7 @@ "id": 5001, "goodId": 41122, "goodName": "连弩武侯", + "num": 1, "shop": 5, "type": 12, "guildLvLimit": 0, @@ -632,6 +669,7 @@ "id": 5002, "goodId": 41153, "goodName": "甜心喵爪", + "num": 1, "shop": 5, "type": 7, "guildLvLimit": 0, @@ -649,6 +687,7 @@ "id": 5003, "goodId": 41144, "goodName": "无双飞将", + "num": 1, "shop": 5, "type": 16, "guildLvLimit": 0, @@ -666,6 +705,7 @@ "id": 5004, "goodId": 41140, "goodName": "曲误周顾", + "num": 1, "shop": 5, "type": 7, "guildLvLimit": 0, @@ -683,6 +723,7 @@ "id": 6001, "goodId": 17055, "goodName": "天外陨金", + "num": 1, "shop": 6, "type": 19, "guildLvLimit": 0, @@ -700,6 +741,7 @@ "id": 6002, "goodId": 17044, "goodName": "洗练石", + "num": 1, "shop": 6, "type": 19, "guildLvLimit": 0, @@ -717,6 +759,7 @@ "id": 6003, "goodId": 17057, "goodName": "淬炼石", + "num": 1, "shop": 6, "type": 19, "guildLvLimit": 0, @@ -734,6 +777,7 @@ "id": 6004, "goodId": 17045, "goodName": "乾坤锁", + "num": 1, "shop": 6, "type": 19, "guildLvLimit": 0, @@ -751,6 +795,7 @@ "id": 6005, "goodId": 17056, "goodName": "息壤", + "num": 1, "shop": 6, "type": 19, "guildLvLimit": 0, @@ -768,6 +813,7 @@ "id": 6006, "goodId": 33001, "goodName": "天晶·破(1品)藏宝图", + "num": 1, "shop": 6, "type": 3, "guildLvLimit": 0, @@ -785,6 +831,7 @@ "id": 6007, "goodId": 33010, "goodName": "天晶·护(1品)藏宝图", + "num": 1, "shop": 6, "type": 3, "guildLvLimit": 0, @@ -802,6 +849,7 @@ "id": 6008, "goodId": 33019, "goodName": "天晶·御(1品)藏宝图", + "num": 1, "shop": 6, "type": 3, "guildLvLimit": 0, @@ -819,6 +867,7 @@ "id": 6009, "goodId": 33028, "goodName": "天晶·命(1品)藏宝图", + "num": 1, "shop": 6, "type": 3, "guildLvLimit": 0, @@ -836,6 +885,7 @@ "id": 6010, "goodId": 33002, "goodName": "天晶·破(2品)藏宝图", + "num": 1, "shop": 6, "type": 3, "guildLvLimit": 0, @@ -853,6 +903,7 @@ "id": 6011, "goodId": 33011, "goodName": "天晶·护(2品)藏宝图", + "num": 1, "shop": 6, "type": 3, "guildLvLimit": 0, @@ -870,6 +921,7 @@ "id": 6012, "goodId": 33020, "goodName": "天晶·御(2品)藏宝图", + "num": 1, "shop": 6, "type": 3, "guildLvLimit": 0, @@ -887,6 +939,7 @@ "id": 6013, "goodId": 33029, "goodName": "天晶·命(2品)藏宝图", + "num": 1, "shop": 6, "type": 3, "guildLvLimit": 0, @@ -904,6 +957,7 @@ "id": 6014, "goodId": 33003, "goodName": "天晶·破(3品)藏宝图", + "num": 1, "shop": 6, "type": 3, "guildLvLimit": 0, @@ -921,6 +975,7 @@ "id": 6015, "goodId": 33012, "goodName": "天晶·护(3品)藏宝图", + "num": 1, "shop": 6, "type": 3, "guildLvLimit": 0, @@ -938,6 +993,7 @@ "id": 6016, "goodId": 33021, "goodName": "天晶·御(3品)藏宝图", + "num": 1, "shop": 6, "type": 3, "guildLvLimit": 0, @@ -955,6 +1011,7 @@ "id": 6017, "goodId": 33030, "goodName": "天晶·命(3品)藏宝图", + "num": 1, "shop": 6, "type": 3, "guildLvLimit": 0, @@ -972,6 +1029,7 @@ "id": 6018, "goodId": 33004, "goodName": "天晶·破(4品)藏宝图", + "num": 1, "shop": 6, "type": 3, "guildLvLimit": 0, @@ -989,6 +1047,7 @@ "id": 6019, "goodId": 33013, "goodName": "天晶·护(4品)藏宝图", + "num": 1, "shop": 6, "type": 3, "guildLvLimit": 0, @@ -1006,6 +1065,7 @@ "id": 6020, "goodId": 33022, "goodName": "天晶·御(4品)藏宝图", + "num": 1, "shop": 6, "type": 3, "guildLvLimit": 0, @@ -1023,6 +1083,7 @@ "id": 6021, "goodId": 33031, "goodName": "天晶·命(4品)藏宝图", + "num": 1, "shop": 6, "type": 3, "guildLvLimit": 0, @@ -1040,6 +1101,7 @@ "id": 6022, "goodId": 33005, "goodName": "天晶·破(5品)藏宝图", + "num": 1, "shop": 6, "type": 3, "guildLvLimit": 0, @@ -1057,6 +1119,7 @@ "id": 6023, "goodId": 33014, "goodName": "天晶·护(5品)藏宝图", + "num": 1, "shop": 6, "type": 3, "guildLvLimit": 0, @@ -1074,6 +1137,7 @@ "id": 6024, "goodId": 33023, "goodName": "天晶·御(5品)藏宝图", + "num": 1, "shop": 6, "type": 3, "guildLvLimit": 0, @@ -1091,6 +1155,7 @@ "id": 6025, "goodId": 33032, "goodName": "天晶·命(5品)藏宝图", + "num": 1, "shop": 6, "type": 3, "guildLvLimit": 0, @@ -1108,6 +1173,7 @@ "id": 6026, "goodId": 33006, "goodName": "天晶·破(6品)藏宝图", + "num": 1, "shop": 6, "type": 3, "guildLvLimit": 0, @@ -1125,6 +1191,7 @@ "id": 6027, "goodId": 33015, "goodName": "天晶·护(6品)藏宝图", + "num": 1, "shop": 6, "type": 3, "guildLvLimit": 0, @@ -1142,6 +1209,7 @@ "id": 6028, "goodId": 33024, "goodName": "天晶·御(6品)藏宝图", + "num": 1, "shop": 6, "type": 3, "guildLvLimit": 0, @@ -1159,6 +1227,7 @@ "id": 6029, "goodId": 33033, "goodName": "天晶·命(6品)藏宝图", + "num": 1, "shop": 6, "type": 3, "guildLvLimit": 0, @@ -1176,6 +1245,7 @@ "id": 6030, "goodId": 33007, "goodName": "天晶·破(7品)藏宝图", + "num": 1, "shop": 6, "type": 3, "guildLvLimit": 0, @@ -1193,6 +1263,7 @@ "id": 6031, "goodId": 33016, "goodName": "天晶·护(7品)藏宝图", + "num": 1, "shop": 6, "type": 3, "guildLvLimit": 0, @@ -1210,6 +1281,7 @@ "id": 6032, "goodId": 33025, "goodName": "天晶·御(7品)藏宝图", + "num": 1, "shop": 6, "type": 3, "guildLvLimit": 0, @@ -1227,6 +1299,7 @@ "id": 6033, "goodId": 33034, "goodName": "天晶·命(7品)藏宝图", + "num": 1, "shop": 6, "type": 3, "guildLvLimit": 0, @@ -1244,6 +1317,7 @@ "id": 7001, "goodId": 50001, "goodName": "下品装备图纸", + "num": 1, "shop": 7, "type": 20, "guildLvLimit": 0, @@ -1261,6 +1335,7 @@ "id": 7002, "goodId": 50002, "goodName": "中品装备图纸", + "num": 1, "shop": 7, "type": 20, "guildLvLimit": 0, @@ -1278,6 +1353,7 @@ "id": 7003, "goodId": 50003, "goodName": "上品装备图纸", + "num": 1, "shop": 7, "type": 20, "guildLvLimit": 0, @@ -1295,6 +1371,7 @@ "id": 7004, "goodId": 50004, "goodName": "极品装备图纸", + "num": 1, "shop": 7, "type": 20, "guildLvLimit": 0, @@ -1312,6 +1389,7 @@ "id": 7005, "goodId": 50005, "goodName": "圣品装备图纸", + "num": 1, "shop": 7, "type": 20, "guildLvLimit": 0, @@ -1329,6 +1407,7 @@ "id": 7006, "goodId": 71009, "goodName": "一阶宝石随机礼包", + "num": 1, "shop": 7, "type": 2, "guildLvLimit": 0, @@ -1346,6 +1425,7 @@ "id": 8001, "goodId": 60001, "goodName": "地玉·破(一品)", + "num": 1, "shop": 8, "type": 10, "guildLvLimit": 0, @@ -1363,6 +1443,7 @@ "id": 8002, "goodId": 60011, "goodName": "地玉·护(一品)", + "num": 1, "shop": 8, "type": 10, "guildLvLimit": 0, @@ -1380,6 +1461,7 @@ "id": 8003, "goodId": 60021, "goodName": "地玉·御(一品)", + "num": 1, "shop": 8, "type": 10, "guildLvLimit": 0, @@ -1397,6 +1479,7 @@ "id": 8004, "goodId": 60031, "goodName": "地玉·命(一品)", + "num": 1, "shop": 8, "type": 10, "guildLvLimit": 0, @@ -1414,6 +1497,7 @@ "id": 8005, "goodId": 11004, "goodName": "特技武将经验书", + "num": 1, "shop": 8, "type": 10, "guildLvLimit": 0, @@ -1431,6 +1515,7 @@ "id": 8006, "goodId": 17042, "goodName": "虎符", + "num": 1, "shop": 8, "type": 10, "guildLvLimit": 0, @@ -1448,6 +1533,7 @@ "id": 8007, "goodId": 17001, "goodName": "觉醒石", + "num": 1, "shop": 8, "type": 10, "guildLvLimit": 0, @@ -1465,6 +1551,7 @@ "id": 8008, "goodId": 17056, "goodName": "息壤", + "num": 1, "shop": 8, "type": 10, "guildLvLimit": 0,