diff --git a/game-server/app/servers/role/handler/shopHandler.ts b/game-server/app/servers/role/handler/shopHandler.ts index 78bdf32ed..7e4017b18 100644 --- a/game-server/app/servers/role/handler/shopHandler.ts +++ b/game-server/app/servers/role/handler/shopHandler.ts @@ -1,5 +1,5 @@ import { Application, BackendSession } from "pinus"; -import { gameData } from "../../../pubUtils/data"; +import { gameData, hasShopType } from "../../../pubUtils/data"; import { parseGoodStr, resResult } from "../../../pubUtils/util"; import { STATUS, GUILD_STRUCTURE, ITID, CONSUME_TYPE, HERO_QUALITY_TYPE, HERO_GROW_MAX, ITEM_CHANGE_REASON } from "../../../consts"; import { DicShopListModel } from "../../../db/DicShopList"; @@ -8,7 +8,7 @@ import { handleCost, addItems } from "../../../services/role/rewardService"; import { GuildModel } from "../../../db/Guild"; import { SHOP } from "../../../pubUtils/dicParam"; import { HeroModel } from "../../../db/Hero"; -import { getShopListById } from "../../../services/shopService"; +import { getShopDicById, getShopListByType, getShopPrice } from "../../../services/shopService"; import { RewardInter } from "../../../pubUtils/interface"; import { RoleModel } from "../../../db/Role"; @@ -21,20 +21,21 @@ export class ShopHandler { } // 获得商品列表 - async getShopList(msg: { shopId: number }, session: BackendSession) { + async getShopList(msg: { shop: number, type: number }, session: BackendSession) { let roleId = session.get('roleId'); - let { shopId } = msg; + let serverId = session.get('serverId'); + let { shop, type } = msg; - if(!gameData.shopList.has(shopId)) { + if(!hasShopType(shop, type)) { return resResult(STATUS.WRONG_PARMS); } - const shopItemList = await getShopListById(shopId, roleId); - return resResult(STATUS.SUCCESS, { shopItemList }); + const result = await getShopListByType(shop, type, roleId, serverId); + return resResult(STATUS.SUCCESS, result); } // 购买商品 - async purchase(msg: { shopItemId: number, count: number }, session: BackendSession) { + async purchase(msg: { activityId: number, shopItemId: number, count: number }, session: BackendSession) { let roleId = session.get('roleId'); let roleName = session.get('roleName'); let sid = session.get('sid'); @@ -42,24 +43,24 @@ export class ShopHandler { let serverId = session.get('serverId'); let vipStartTime: number = session.get('vipStartTime'); - let { shopItemId, count } = msg; + let { activityId, shopItemId, count } = msg; if( count < 0) return resResult(STATUS.WRONG_PARMS); - let dicShopItem = gameData.shopItem.get(shopItemId); + let dicShopItem = await getShopDicById(activityId, shopItemId, roleId, serverId); if(!dicShopItem) return resResult(STATUS.DIC_DATA_NOT_FOUND); if(dicShopItem.guildLvLimit) { let myGuild = await GuildModel.findByCode(guildCode, serverId); if(!myGuild || myGuild.lv < dicShopItem.guildLvLimit) return resResult(STATUS.GUILD_LV_LIMIT); } - if(dicShopItem.lvlimit) { + if(dicShopItem.lvLimit) { let role = await RoleModel.findByRoleId(roleId, 'lv'); - if(role.lv < dicShopItem.lvlimit) { + if(role.lv < dicShopItem.lvLimit) { return resResult(STATUS.LV_LIMIT); } } - let userShop = await UserShopModel.findByRoleAndItem(roleId, dicShopItem.id); + let userShop = await UserShopModel.findByRoleAndItem(roleId, activityId, dicShopItem); if(dicShopItem.purchaseLimit != -1) { if(vipStartTime > 0 && dicShopItem.purchaseLimit != -1) { if(userShop && userShop.count + count > dicShopItem.purchaseLimit + dicShopItem.vipPurchaseLimit) { @@ -73,20 +74,17 @@ export class ShopHandler { } // 消耗 - let cost = [{ - id: dicShopItem.money, - count: Math.round(dicShopItem.price * count) - }]; + let cost = getShopPrice(dicShopItem.money, count, userShop?.count||0, dicShopItem.price); let costResult = await handleCost(roleId, sid, cost, ITEM_CHANGE_REASON.SHOP_PURCHASE); if(!costResult) return resResult(STATUS.BATTLE_CONSUMES_NOT_ENOUGH); // 次数 - userShop = await UserShopModel.purchase(roleId, roleName, dicShopItem, count); + userShop = await UserShopModel.purchase(roleId, roleName, activityId, dicShopItem, count); if(!userShop) return resResult(STATUS.BUY_COUNT_OVER); // 获得 let reward = [{ - id: dicShopItem.goodid, + id: dicShopItem.goodId, count }]; let goods = await addItems(roleId, roleName, sid, reward, ITEM_CHANGE_REASON.SHOP_PURCHASE); diff --git a/game-server/app/services/connectorService.ts b/game-server/app/services/connectorService.ts index 0f7ae70a6..3ca1c24c4 100644 --- a/game-server/app/services/connectorService.ts +++ b/game-server/app/services/connectorService.ts @@ -133,7 +133,7 @@ export async function getModuleData(type: string, data: { role: RoleType, sessio role.spines = role.spines.filter(cur => cur.status); return pick(role, ENTERY_ROLE_PICK); case 'shop': // 商店 - return await getAllShopList(roleId); + return await getAllShopList(roleId, serverId); case 'rank': // 排名 const rewards = await getRankFirstReward(role, serverId); return { rewards } diff --git a/game-server/app/services/shopService.ts b/game-server/app/services/shopService.ts index 044522d58..b37ee843a 100644 --- a/game-server/app/services/shopService.ts +++ b/game-server/app/services/shopService.ts @@ -1,30 +1,104 @@ -import { gameData } from "../pubUtils/data"; -import { ShopItemListParam } from '../domain/roleField/shop'; -import { UserShopModel } from "../db/UserShop"; +import { gameData, getShopType } from "../pubUtils/data"; +import { ShopData, ShopReturnData } from '../domain/roleField/shop'; +import { UserShopModel, UserShopType } from "../db/UserShop"; +import { getActivitiesByType, getActivityById } from "./activity/activityService"; +import { ACTIVITY_TYPE } from "../consts"; +import { getRoleCreateTime, getServerCreateTime } from "./redisService"; +import { decodeArrayListStr } from "../pubUtils/util"; -export async function getShopListById(shopId: number, roleId: string) { +export async function getAllShopList(roleId: string, serverId: number) { + let userShopRecs = await UserShopModel.findByRoleId(roleId); + let activities = await getShopActivityDatas(roleId, serverId); - let shopItemList = new Array(); // 返回 - let userShopRecs = await UserShopModel.findMapByShopId(roleId, shopId); - // console.log(JSON.stringify([...userShopRecs])) - - let dicShop = gameData.shop.get(shopId)||[]; - for(let { id, type } of dicShop) { - let buyCount = userShopRecs.has(id)?userShopRecs.get(id).count: 0; - - let param = new ShopItemListParam(id, 1, type, buyCount, 0); - shopItemList.push(param); + let shops: ShopReturnData[] = []; + for(let [_, { shop, type } ] of gameData.shopType) { + let shopData = await getShopListByData(shop, type, userShopRecs, activities); + shops.push(shopData); } - - shopItemList = shopItemList.sort((a, b) => b.order - a.order); - return shopItemList; + return shops; } -export async function getAllShopList(roleId: string) { - let shopLists: {shopId: number, shopItemList: ShopItemListParam[]}[] = []; - for(let [ shopId ] of gameData.shopList) { - let shopItemList = await getShopListById(shopId, roleId); - shopLists.push({ shopId, shopItemList }); +export async function getShopListByType(shop: number, type: number, roleId: string, serverId: number) { + let userShopRecs = await UserShopModel.findByShopType(roleId, shop, type); + let activities = await getShopActivityDatas(roleId, serverId); + return await getShopListByData(shop, type, userShopRecs, activities); +} + +async function getShopListByData(shop: number, type: number, userShopRecs: UserShopType[], activities: ShopData[]) { + let result = new ShopReturnData(shop, type); + + let dicShopType = getShopType(shop, type); + if(dicShopType && dicShopType.isLimit) { + for(let activity of activities) { + result.setDicByActivity(activity); + } } - return shopLists; + for(let userShop of userShopRecs) { + result.setUserRecords(userShop); + } + + return result; +} + + +export async function getShopDicById(activityId: number, itemId: number, roleId: string, serverId: number) { + if(activityId == 0) { + return gameData.shopItem.get(itemId); + } else { + let activityData = await getShopActivityById(roleId, serverId, activityId); + return activityData.findByItemId(itemId); + } +} + +export async function getShopActivityDatas(roleId: string, serverId: number) { + let createTime = await getRoleCreateTime(roleId); + let serverTime = await getServerCreateTime(serverId); + let activities = await getActivitiesByType(serverId, ACTIVITY_TYPE.SHOP); + return activities.map(activity => { + return new ShopData(activity, createTime, serverTime); + }); +} + +export async function getShopActivityById(roleId: string, serverId: number, activityId: number) { + let createTime = await getRoleCreateTime(roleId); + let serverTime = await getServerCreateTime(serverId); + let activity = await getActivityById(activityId); + return new ShopData(activity, createTime, serverTime); +} + +/** + * + * @param goodId 物品 + * @param count 本次购买次数 + * @param buyCount 上次购买到多少次 + * @param str 字典 + */ +export function getShopPrice(goodId: number, count: number, buyCount: number, str: string) { + let arr = parseShopPrice(str); + let result = 0; + for(let i = 0; i < count; i++) { + let curPrice = 0; + for(let { times, price } of arr) { + curPrice = price; + if(buyCount + i <= times) break; + } + result += curPrice; + } + return [{ + id: goodId, + count: result + }] +} + +function parseShopPrice(str: string) { + let result = new Array<{ times: number, price: number }>(); + if (!str) return result; + let decodeArr = decodeArrayListStr(str); + for (let [times, price] of decodeArr) { + if (isNaN(parseInt(times)) || isNaN(parseInt(price))) { + throw new Error('data table format wrong'); + } + result.push({ times: parseInt(times), price: parseInt(price) }); + } + return result } \ No newline at end of file diff --git a/shared/consts/constModules/activityConst.ts b/shared/consts/constModules/activityConst.ts index 79151eebd..750747f06 100644 --- a/shared/consts/constModules/activityConst.ts +++ b/shared/consts/constModules/activityConst.ts @@ -56,6 +56,7 @@ export enum ACTIVITY_TYPE { TIME_LIMIT_RANK = 41, // 限时排行榜 TASK_PASS = 42, // 战令活动 GUILD_PAY = 43, // 军团充值人数 + SHOP = 44, // 限时商店 } /** diff --git a/shared/consts/constModules/sysConst.ts b/shared/consts/constModules/sysConst.ts index 4e443d220..108068588 100644 --- a/shared/consts/constModules/sysConst.ts +++ b/shared/consts/constModules/sysConst.ts @@ -493,7 +493,7 @@ export const FILENAME = { DIC_CITY_ACTIVITY_REWARD: 'dic_zyz_cityActivityReward', DIC_RACE_ACTIVITY: 'dic_zyz_raceActivity', DIC_SHOP: 'dic_zyz_shop', - DIC_SHOP_LIST: 'dic_zyz_shopList', + DIC_SHOP_TYPE: 'dic_zyz_shopType', DIC_RANK: 'dic_zyz_rankingType', DIC_RANK_REWARD: 'dic_zyz_rankingReward', DIC_MAIN_TASK: 'dic_zyz_mainTask', diff --git a/shared/db/UserShop.ts b/shared/db/UserShop.ts index 4f861b8f4..e22d72091 100644 --- a/shared/db/UserShop.ts +++ b/shared/db/UserShop.ts @@ -3,7 +3,6 @@ import { index, getModelForClass, prop, DocumentType, modelOptions } from '@type import { genCode } from '../pubUtils/util'; import { getZeroPointD } from '../pubUtils/timeUtil'; import { SHOP_REFRESH_TYPE } from '../consts'; -import { DicShop } from '../pubUtils/dictionary/DicShop'; /** * 玩家购买商店记录表,每个商品一条,每次刷新新建一条 @@ -22,7 +21,13 @@ export default class UserShop extends BaseModel { roleName: string; // 玩家名 @prop({ required: true }) - shopId: number; // 商店id + activityId: number; // 商店id + + @prop({ required: true }) + shop: number; // 商店id + + @prop({ required: true }) + type: number; // 商店页签id @prop({ required: true }) itemId: number; // 商品id @@ -50,36 +55,34 @@ export default class UserShop extends BaseModel { } - public static async findByShopId(roleId: string, shopId: number) { + public static async findByShopType(roleId: string, shopId: number, typeId: number) { let timeCondition = this.getRefreshCondition(); - let rec: UserShopType[] = await UserShopModel.find({ shopId, roleId, $or: timeCondition }).lean(); + let rec: UserShopType[] = await UserShopModel.find({ shopId, typeId, roleId, $or: timeCondition }).lean(); return rec; } - public static async findMapByShopId(roleId: string, shopId: number) { - let rec = await this.findByShopId(roleId, shopId); - let map = new Map(); - - for(let userShop of rec) { - map.set(userShop.itemId, userShop); - } - return map - } - - public static async findByRoleAndItem(roleId: string, itemId: number) { + public static async findByRoleId(roleId: string) { let timeCondition = this.getRefreshCondition(); - let rec: UserShopType = await UserShopModel.findOne({ roleId, itemId, $or: timeCondition }).lean(); + let rec: UserShopType[] = await UserShopModel.find({ roleId, $or: timeCondition }).lean(); return rec; } - public static async purchase(roleId: string, roleName: string, dicShopItem: DicShop, inc: number) { + public static async findByRoleAndItem(roleId: string, activityId: number, dicShopItem: { id: number, shop: number, type: number }) { + let timeCondition = this.getRefreshCondition(); + let { id, shop, type } = dicShopItem; + + let rec: UserShopType = await UserShopModel.findOne({ roleId, itemId: id, shop, type, activityId, $or: timeCondition }).lean(); + return rec; + } + + public static async purchase(roleId: string, roleName: string, activityId: number, dicShopItem: { id: number, goodId: number, refreshType: number, shop: number, type: number }, inc: number) { let code = genCode(8); let timeCondition = this.getRefreshCondition(); - let { id, goodid, refreshType, shop } = dicShopItem; + let { id, goodId, refreshType, shop, type } = dicShopItem; let rec: UserShopType = await UserShopModel.findOneAndUpdate( - { roleId, itemId: id, $or: timeCondition }, - { $setOnInsert: { roleName, code, goodId: goodid, refreshType, shopId: shop }, $inc: { count: inc } }, + { roleId, itemId: id, $or: timeCondition, activityId, shop, type }, + { $setOnInsert: { roleName, code, goodId, refreshType }, $inc: { count: inc } }, { new: true, upsert: true } ).lean(); return rec; diff --git a/shared/domain/roleField/shop.ts b/shared/domain/roleField/shop.ts index 94c7153ec..bfed5f0f7 100644 --- a/shared/domain/roleField/shop.ts +++ b/shared/domain/roleField/shop.ts @@ -1,17 +1,134 @@ +import { SHOP_REFRESH_TYPE } from "../../consts"; +import { ActivityModelType } from "../../db/Activity"; +import { UserShopType } from "../../db/UserShop"; +import { ActivityBase } from "../activityField/activityField"; -// hero表内属性基础格式 -export class ShopItemListParam { +interface ShopInDb { + shop: number; + type: number; + list: ShopItemInDb[]; +} + +interface ShopItemInDb { + id: number; + goodId: number; + goodName: string; + guildLvLimit: number; + lvLimit: number; + purchaseLimit: number; + vipPurchaseLimit: number; + refreshType: number; + money: number; + price: string; + productID: string; + chosen: number; + indirectId: number; + createTime: number; + beginTime: number; + endTime: number; +} + +export class ShopData extends ActivityBase { + shop: number; + type: number; + list: ShopDicData[] = []; + + constructor(activityData: ActivityModelType, createTime: number, serverTime: number) { + super(activityData, createTime, serverTime) + this.initData(activityData.data) + } + + public initData(data: string) { + let result: ShopInDb = JSON.parse(data); + if(result) { + this.shop = result.shop; + this.type = result.type; + for (let obj of result.list) { + this.list.push(new ShopDicData(obj)) + } + + } + } + + public findByItemId(itemId: number) { + let item = this.list.find(cur => cur.id == itemId); + if(!item) return null; + return {...item, shop: this.shop, type: this.type}; + } +} + +export class ShopDicData { + isNew: boolean = false; + id: number; + goodId: number; + goodName: string; + guildLvLimit: number; + lvLimit: number; + purchaseLimit: number; + vipPurchaseLimit: number; + refreshType: SHOP_REFRESH_TYPE; + money: number; + price: string; + productID: string = ''; + chosen: number; + indirectId: number; + createTime: number; + beginTime: number; + endTime: number; + + constructor(obj: ShopItemInDb) { + this.id = obj.id; + this.goodId = obj.goodId; + this.goodName = obj.goodName; + this.guildLvLimit = obj.guildLvLimit; + this.lvLimit = obj.lvLimit; + this.purchaseLimit = obj.purchaseLimit; + this.vipPurchaseLimit = obj.vipPurchaseLimit; + this.refreshType = obj.refreshType; + this.money = obj.money; + this.price = obj.price; + this.productID = obj.productID; + this.chosen = obj.chosen; + this.indirectId = obj.indirectId; + this.createTime = obj.createTime; + this.beginTime = obj.beginTime; + this.endTime = obj.endTime; + } +} + + +export class ShopReturnData { + activityId: number = 0; + shop: number; + type: number; + dic: ShopDicData[] = []; + records: ShopReturnRecordData[] = []; + + constructor(shop: number, type: number) { + this.shop = shop; + this.type = type; + } + + public setDicByActivity(activityData: ShopData) { + if(!activityData || activityData.shop != this.shop || activityData.type != this.type) return; + this.activityId = activityData.activityId; + this.dic.push(...activityData.list) + } + + public setUserRecords(record: UserShopType) { + if(!record || record.shop != this.shop || record.type != this.type) return; + let recordResult = new ShopReturnRecordData(record); + if(recordResult && recordResult.shopItemId) this.records.push(recordResult) + } +} + +export class ShopReturnRecordData { shopItemId: number; - discount: number; - typeId: number; buyCount: number; - order: number; - constructor(shopItemId: number, discount: number, typeId: number, buyCount: number, order: number) { - this.shopItemId = shopItemId; - this.discount = discount; - this.typeId = typeId; - this.buyCount = buyCount; - this.order = order; + constructor(record: UserShopType) { + if(!record) return; + this.shopItemId = record.itemId; + this.buyCount = record.count; } } \ No newline at end of file diff --git a/shared/pubUtils/data.ts b/shared/pubUtils/data.ts index cb26a1747..85e03a064 100644 --- a/shared/pubUtils/data.ts +++ b/shared/pubUtils/data.ts @@ -59,8 +59,8 @@ import { GUILDACTIVITY, RECRUIT } from "./dicParam"; import * as param from "./dicParam"; import { decodeIdCntArrayStr, parseGoodStr, decodeArrayListStr, getRandEelm, readTsFile, getRandEelmWithWeight } from "./util"; import { RACE_EVENT_TYPE } from "../consts"; -import { dicShop, dicShopItem, loadShop } from "./dictionary/DicShop"; -import { dicShopList, loadShopList } from "./dictionary/DicShopList"; +import { dicShopByType, dicShopItem, loadShop } from "./dictionary/DicShop"; +import { dicShopType, loadShopType } from "./dictionary/DicShopType"; import { dicRank, loadRank } from "./dictionary/DicRank"; import { dicRankReward, loadRankReward } from "./dictionary/DicRankReward"; import { dicTaskType, taskMap, dicMainTask, dicDailyTask, dicAchievement, loadTask, dicPvpDailyTask } from "./dictionary/DicTask"; @@ -198,9 +198,9 @@ export const gameData = { raceActivityEncounter: { events: new Map(), eventNum: 0 }, raceNormalItems: new Array<{id: number, total: number, max: number}>(), raceEventItems: new Array<{id: number, count: number}>(), - shop: dicShop, + shopItemByType: dicShopByType, shopItem: dicShopItem, - shopList: dicShopList, + shopType: dicShopType, rank: dicRank, generalRankReward: dicRankReward, taskType: dicTaskType, @@ -1010,6 +1010,15 @@ export function getLadderRankReward(myRank: number) { return null } +export function hasShopType(shop: number, type: number) { + return gameData.shopType.has(`${shop}_${type}`); +} + +export function getShopType(shop: number, type: number) { + let key = `${shop}_${type}`; + return gameData.shopType.get(key)||null; +} + // 初始加载 function initDatas() { parseDicParam(); @@ -1138,7 +1147,7 @@ function loadDatas() { loadCityActivityReward(); loadRaceActivity(); loadShop(); - loadShopList(); + loadShopType(); loadRank(); loadRankReward(); loadTask(); diff --git a/shared/pubUtils/dictionary/DicShop.ts b/shared/pubUtils/dictionary/DicShop.ts index 27e42ace2..43e5ab0ce 100644 --- a/shared/pubUtils/dictionary/DicShop.ts +++ b/shared/pubUtils/dictionary/DicShop.ts @@ -7,9 +7,9 @@ export interface DicShop { // 商品id readonly id: number; // 物品表id - readonly goodid: number; + readonly goodId: number; // 物品表名 - readonly goodname: number; + readonly goodName: number; // 商店id 对应 dic_zyz_shoplist的id readonly shop: number; // 商店标签 对应 dic_zyz_shopType的id @@ -17,7 +17,7 @@ export interface DicShop { // 军团等级需求 readonly guildLvLimit: number; // 玩家等级需求 - readonly lvlimit: number; + readonly lvLimit: number; // 购买次数限制 readonly purchaseLimit: number; // vip购买次数限制 @@ -27,26 +27,27 @@ export interface DicShop { // 用于购买的货币 readonly money: number; // 价格 - readonly price: number; + readonly price: string; } export const dicShopItem = new Map(); // itemid => DicShop -export const dicShop = new Map(); // shop => DicShop[] +export const dicShopByType = new Map(); // shop + type => DicShop[] export function loadShop() { dicShopItem.clear(); - dicShop.clear(); + dicShopByType.clear(); let arr = readFileAndParse(FILENAME.DIC_SHOP); arr.forEach(o => { - o.guildLvLimit = o.guildlvlimit == '&'?0: o.guildlvlimit; - o.lvlimit = o.lvlimit == '&'?0: o.lvlimit; - o.purchaseLimit = o.purchaselimit == '&'?-1: (o.purchaselimit||0); - o.vipPurchaseLimit = o.vipPurchaseLimit == '&'?-1: (o.vipPurchaseLimit||0); - if(!dicShop.has(o.shop)) { - dicShop.set(o.shop, [o]); + o.guildLvLimit = o.guildLvLimit == '&'?0: o.guildLvLimit; + o.lvLimit = o.lvLimit == '&'?0: o.lvLimit; + o.purchaseLimit = o.purchaseLimit == '&'?-1: (o.purchaseLimit||0); + o.vipPurchaseLimit = o.vipPurchaseLimit == '&'? 0: (o.vipPurchaseLimit||0); + let key = `${o.shop}_${o.type}`; + if(!dicShopByType.has(key)) { + dicShopByType.set(key, { shop: o.shop, type: o.type, items: [] }); } else { - dicShop.get(o.shop).push(o); + dicShopByType.get(key).items.push(o); } dicShopItem.set(o.id, o); }); diff --git a/shared/pubUtils/dictionary/DicShopList.ts b/shared/pubUtils/dictionary/DicShopList.ts deleted file mode 100644 index afbd67ea1..000000000 --- a/shared/pubUtils/dictionary/DicShopList.ts +++ /dev/null @@ -1,28 +0,0 @@ -// 商店表 -import { readFileAndParse, parseNumberList } from '../util' -import { FILENAME } from '../../consts' - -export interface DicShopList { - // 商店id - readonly shopid: number; - // 商店名 - readonly shopname: number; - // 商店内标签,小分类 - readonly type: number[]; - // 使用的货币 - readonly money: number[]; -} - -export const dicShopList = new Map(); -export function loadShopList() { - dicShopList.clear(); - - let arr = readFileAndParse(FILENAME.DIC_SHOP_LIST); - - arr.forEach(o => { - o.type = parseNumberList(o.typeid); - o.money = parseNumberList(o.moneyid); - dicShopList.set(o.shopid, o); - }); - arr = undefined; -} \ No newline at end of file diff --git a/shared/pubUtils/dictionary/DicShopType.ts b/shared/pubUtils/dictionary/DicShopType.ts new file mode 100644 index 000000000..61ba39b8a --- /dev/null +++ b/shared/pubUtils/dictionary/DicShopType.ts @@ -0,0 +1,26 @@ +// 商店表 +import { readFileAndParse } from '../util' +import { FILENAME } from '../../consts' + +export interface DicShopType { + // 商店id + readonly shop: number; + // 商店内标签,小分类 + readonly type: number; + // 是否限时 + readonly isLimit: boolean; +} + +export const dicShopType = new Map(); // shop+type => DicShopType +export function loadShopType() { + dicShopType.clear(); + let arr = readFileAndParse(FILENAME.DIC_SHOP_TYPE); + + arr.forEach(o => { + o.type = o.typeid; + if(o.shop != '&') { + dicShopType.set(`${o.shop}_${o.type}`, o); + } + }); + arr = undefined; +} \ No newline at end of file diff --git a/shared/resource/jsons/dic_zyz_shop.json b/shared/resource/jsons/dic_zyz_shop.json index 3d7533edb..4b106d84f 100644 --- a/shared/resource/jsons/dic_zyz_shop.json +++ b/shared/resource/jsons/dic_zyz_shop.json @@ -1,45 +1,48 @@ [ { "id": 1, - "goodid": 72001, - "goodname": "烧肉", + "goodId": 72001, + "goodName": "烧肉", "shop": 1, "type": 5, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 6, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 6, "refreshType": 1, "money": 31002, - "price": 50, - "chosen": 0, + "price": "1&0|3&50", + "chosen": 1, "indirectId": 0, "vipPurchaseLimit": 4 }, { "id": 2, - "goodid": 17042, - "goodname": "虎符", + "goodId": 17042, + "goodName": "虎符", "shop": 1, "type": 5, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 20, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 20, "refreshType": 2, "money": 31002, - "price": 800, + "price": "1&400|6&600|10&800", "chosen": 0, "indirectId": 0, "vipPurchaseLimit": 0 }, { "id": 3, - "goodid": 17001, - "goodname": "觉醒丹", + "goodId": 17001, + "goodName": "觉醒丹", "shop": 1, "type": 5, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 8, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 8, "refreshType": 2, "money": 31002, "price": 1000, @@ -49,13 +52,14 @@ }, { "id": 4, - "goodid": 11101, - "goodname": "四叶草玉符", + "goodId": 11101, + "goodName": "四叶草玉符", "shop": 1, "type": 5, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 9999, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 9999, "refreshType": 2, "money": 31002, "price": 300, @@ -65,13 +69,14 @@ }, { "id": 5, - "goodid": 17055, - "goodname": "天外陨金", + "goodId": 17055, + "goodName": "天外陨金", "shop": 1, "type": 5, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 50, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 50, "refreshType": 2, "money": 31002, "price": 300, @@ -81,13 +86,14 @@ }, { "id": 6, - "goodid": 17044, - "goodname": "洗练石", + "goodId": 17044, + "goodName": "洗练石", "shop": 1, "type": 5, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 9999, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 9999, "refreshType": 2, "money": 31002, "price": 400, @@ -97,13 +103,14 @@ }, { "id": 7, - "goodid": 17057, - "goodname": "淬炼石", + "goodId": 17057, + "goodName": "淬炼石", "shop": 1, "type": 5, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 9999, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 9999, "refreshType": 2, "money": 31002, "price": 250, @@ -113,13 +120,14 @@ }, { "id": 8, - "goodid": 22001, - "goodname": "点将令", + "goodId": 22001, + "goodName": "点将令", "shop": 1, "type": 5, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 1000, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 1000, "refreshType": 1, "money": 31002, "price": 200, @@ -129,13 +137,14 @@ }, { "id": 9, - "goodid": 22002, - "goodname": "求贤令", + "goodId": 22002, + "goodName": "求贤令", "shop": 1, "type": 5, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 1000, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 1000, "refreshType": 1, "money": 31002, "price": 500, @@ -145,13 +154,14 @@ }, { "id": 10, - "goodid": 17045, - "goodname": "乾坤锁", + "goodId": 17045, + "goodName": "乾坤锁", "shop": 1, "type": 5, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 9999, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 9999, "refreshType": 1, "money": 31002, "price": 500, @@ -161,13 +171,14 @@ }, { "id": 11, - "goodid": 17056, - "goodname": "息壤", + "goodId": 17056, + "goodName": "息壤", "shop": 1, "type": 5, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 9999, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 9999, "refreshType": 1, "money": 31002, "price": 200, @@ -177,13 +188,14 @@ }, { "id": 2001, - "goodid": 50001, - "goodname": "下品装备图纸", + "goodId": 50001, + "goodName": "下品装备图纸", "shop": 2, "type": 11, - "guildlvlimit": 1, - "lvlimit": 0, - "purchaselimit": 20, + "guildLvLimit": 1, + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 20, "refreshType": 1, "money": 40005, "price": 200, @@ -193,13 +205,14 @@ }, { "id": 2002, - "goodid": 50002, - "goodname": "中品装备图纸", + "goodId": 50002, + "goodName": "中品装备图纸", "shop": 2, "type": 11, - "guildlvlimit": 2, - "lvlimit": 0, - "purchaselimit": 20, + "guildLvLimit": 2, + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 20, "refreshType": 1, "money": 40005, "price": 500, @@ -209,13 +222,14 @@ }, { "id": 2003, - "goodid": 50003, - "goodname": "上品装备图纸", + "goodId": 50003, + "goodName": "上品装备图纸", "shop": 2, "type": 11, - "guildlvlimit": 3, - "lvlimit": 0, - "purchaselimit": 20, + "guildLvLimit": 3, + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 20, "refreshType": 1, "money": 40005, "price": 1200, @@ -225,13 +239,14 @@ }, { "id": 2004, - "goodid": 50004, - "goodname": "极品装备图纸", + "goodId": 50004, + "goodName": "极品装备图纸", "shop": 2, "type": 11, - "guildlvlimit": 4, - "lvlimit": 0, - "purchaselimit": 20, + "guildLvLimit": 4, + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 20, "refreshType": 1, "money": 40005, "price": 2400, @@ -241,13 +256,14 @@ }, { "id": 2005, - "goodid": 50005, - "goodname": "圣品装备图纸", + "goodId": 50005, + "goodName": "圣品装备图纸", "shop": 2, "type": 11, - "guildlvlimit": 6, - "lvlimit": 0, - "purchaselimit": 20, + "guildLvLimit": 6, + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 20, "refreshType": 1, "money": 40005, "price": 10000, @@ -257,13 +273,14 @@ }, { "id": 2006, - "goodid": 17054, - "goodname": "镔铁", + "goodId": 17054, + "goodName": "镔铁", "shop": 2, "type": 5, - "guildlvlimit": 1, - "lvlimit": 0, - "purchaselimit": 1000, + "guildLvLimit": 1, + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 1000, "refreshType": 1, "money": 40005, "price": 30, @@ -273,13 +290,14 @@ }, { "id": 2007, - "goodid": 71009, - "goodname": "一阶宝石随机礼包", + "goodId": 71009, + "goodName": "一阶宝石随机礼包", "shop": 2, "type": 5, - "guildlvlimit": 1, - "lvlimit": 0, - "purchaselimit": 100, + "guildLvLimit": 1, + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 100, "refreshType": 1, "money": 40005, "price": 25, @@ -289,13 +307,14 @@ }, { "id": 2008, - "goodid": 17052, - "goodname": "玉石", + "goodId": 17052, + "goodName": "玉石", "shop": 2, "type": 5, - "guildlvlimit": 2, - "lvlimit": 0, - "purchaselimit": 140, + "guildLvLimit": 2, + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 140, "refreshType": 1, "money": 40005, "price": 200, @@ -305,13 +324,14 @@ }, { "id": 2009, - "goodid": 17053, - "goodname": "玉髓", + "goodId": 17053, + "goodName": "玉髓", "shop": 2, "type": 5, - "guildlvlimit": 2, - "lvlimit": 0, - "purchaselimit": 16, + "guildLvLimit": 2, + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 16, "refreshType": 1, "money": 40005, "price": 1500, @@ -321,13 +341,14 @@ }, { "id": 3001, - "goodid": 17042, - "goodname": "虎符", + "goodId": 17042, + "goodName": "虎符", "shop": 3, "type": 5, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 20, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 20, "refreshType": 2, "money": 40001, "price": 100, @@ -337,13 +358,14 @@ }, { "id": 3002, - "goodid": 17001, - "goodname": "觉醒石", + "goodId": 17001, + "goodName": "觉醒石", "shop": 3, "type": 5, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 2, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 2, "refreshType": 2, "money": 40001, "price": 400, @@ -353,13 +375,14 @@ }, { "id": 3003, - "goodid": 11011, - "goodname": "美食", + "goodId": 11011, + "goodName": "美食", "shop": 3, "type": 5, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 6, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 6, "refreshType": 1, "money": 40001, "price": 10, @@ -369,13 +392,14 @@ }, { "id": 3004, - "goodid": 11012, - "goodname": "兵器", + "goodId": 11012, + "goodName": "兵器", "shop": 3, "type": 5, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 6, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 6, "refreshType": 1, "money": 40001, "price": 20, @@ -385,13 +409,14 @@ }, { "id": 3005, - "goodid": 11013, - "goodname": "字画", + "goodId": 11013, + "goodName": "字画", "shop": 3, "type": 5, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 4, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 4, "refreshType": 1, "money": 40001, "price": 30, @@ -401,13 +426,14 @@ }, { "id": 3006, - "goodid": 11014, - "goodname": "古玩", + "goodId": 11014, + "goodName": "古玩", "shop": 3, "type": 5, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 2, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 2, "refreshType": 1, "money": 40001, "price": 50, @@ -417,13 +443,14 @@ }, { "id": 4000, - "goodid": 40014, - "goodname": "龙纹蜀锦", + "goodId": 40014, + "goodName": "龙纹蜀锦", "shop": 4, "type": 5, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 30, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 30, "refreshType": 3, "money": 40004, "price": 150, @@ -433,13 +460,14 @@ }, { "id": 4001, - "goodid": 17001, - "goodname": "觉醒石", + "goodId": 17001, + "goodName": "觉醒石", "shop": 4, "type": 5, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 2, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 2, "refreshType": 2, "money": 40004, "price": 400, @@ -449,13 +477,14 @@ }, { "id": 4002, - "goodid": 71001, - "goodname": "自选橙将碎片", + "goodId": 71001, + "goodName": "自选橙将碎片", "shop": 4, "type": 5, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 80, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 80, "refreshType": 2, "money": 40004, "price": 10, @@ -465,13 +494,14 @@ }, { "id": 4003, - "goodid": 17046, - "goodname": "皇蟒印", + "goodId": 17046, + "goodName": "皇蟒印", "shop": 4, "type": 5, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 20, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 20, "refreshType": 2, "money": 40004, "price": 45, @@ -481,13 +511,14 @@ }, { "id": 4004, - "goodid": 17047, - "goodname": "玄龟印", + "goodId": 17047, + "goodName": "玄龟印", "shop": 4, "type": 5, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 10, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 10, "refreshType": 2, "money": 40004, "price": 60, @@ -497,13 +528,14 @@ }, { "id": 4005, - "goodid": 17048, - "goodname": "饕餮印", + "goodId": 17048, + "goodName": "饕餮印", "shop": 4, "type": 5, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 10, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 10, "refreshType": 2, "money": 40004, "price": 75, @@ -513,13 +545,14 @@ }, { "id": 4006, - "goodid": 17049, - "goodname": "螭虎印", + "goodId": 17049, + "goodName": "螭虎印", "shop": 4, "type": 5, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 10, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 10, "refreshType": 2, "money": 40004, "price": 90, @@ -529,13 +562,14 @@ }, { "id": 4007, - "goodid": 17050, - "goodname": "金龙印", + "goodId": 17050, + "goodName": "金龙印", "shop": 4, "type": 5, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 10, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 10, "refreshType": 2, "money": 40004, "price": 120, @@ -545,13 +579,14 @@ }, { "id": 4008, - "goodid": 17042, - "goodname": "虎符", + "goodId": 17042, + "goodName": "虎符", "shop": 4, "type": 5, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 20, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 20, "refreshType": 2, "money": 40004, "price": 100, @@ -561,13 +596,14 @@ }, { "id": 5001, - "goodid": 41122, - "goodname": "连弩武侯", + "goodId": 41122, + "goodName": "连弩武侯", "shop": 5, "type": 12, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 1, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 1, "refreshType": 4, "money": 40014, "price": 30, @@ -577,13 +613,14 @@ }, { "id": 5002, - "goodid": 41138, - "goodname": "红袖枭姬", + "goodId": 41138, + "goodName": "红袖枭姬", "shop": 5, "type": 12, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 1, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 1, "refreshType": 4, "money": 40014, "price": 30, @@ -593,13 +630,14 @@ }, { "id": 5003, - "goodid": 41144, - "goodname": "无双飞将", + "goodId": 41144, + "goodName": "无双飞将", "shop": 5, "type": 7, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 1, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 1, "refreshType": 4, "money": 40006, "price": 30, @@ -609,13 +647,14 @@ }, { "id": 5004, - "goodid": 41156, - "goodname": "有女初成", + "goodId": 41156, + "goodName": "有女初成", "shop": 5, "type": 7, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 1, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 1, "refreshType": 4, "money": 40006, "price": 10, @@ -625,13 +664,14 @@ }, { "id": 6001, - "goodid": 17055, - "goodname": "天外陨金", + "goodId": 17055, + "goodName": "天外陨金", "shop": 6, "type": 5, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 1, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 1, "refreshType": 2, "money": 40002, "price": 500, @@ -641,13 +681,14 @@ }, { "id": 6002, - "goodid": 17044, - "goodname": "洗练石", + "goodId": 17044, + "goodName": "洗练石", "shop": 6, "type": 5, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 9999, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 9999, "refreshType": 2, "money": 40002, "price": 400, @@ -657,13 +698,14 @@ }, { "id": 6003, - "goodid": 17057, - "goodname": "淬炼石", + "goodId": 17057, + "goodName": "淬炼石", "shop": 6, "type": 5, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 9999, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 9999, "refreshType": 2, "money": 40002, "price": 250, @@ -673,13 +715,14 @@ }, { "id": 6004, - "goodid": 17045, - "goodname": "乾坤锁", + "goodId": 17045, + "goodName": "乾坤锁", "shop": 6, "type": 5, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 9999, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 9999, "refreshType": 1, "money": 40002, "price": 500, @@ -689,13 +732,14 @@ }, { "id": 6005, - "goodid": 17056, - "goodname": "息壤", + "goodId": 17056, + "goodName": "息壤", "shop": 6, "type": 5, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 9999, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 9999, "refreshType": 1, "money": 40002, "price": 200, @@ -705,13 +749,14 @@ }, { "id": 6006, - "goodid": 33001, - "goodname": "天晶·破(1品)藏宝图", + "goodId": 33001, + "goodName": "天晶·破(1品)藏宝图", "shop": 6, "type": 3, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 9999, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 9999, "refreshType": 2, "money": 40002, "price": 200, @@ -721,13 +766,14 @@ }, { "id": 6007, - "goodid": 33010, - "goodname": "天晶·护(1品)藏宝图", + "goodId": 33010, + "goodName": "天晶·护(1品)藏宝图", "shop": 6, "type": 3, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 9999, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 9999, "refreshType": 2, "money": 40002, "price": 200, @@ -737,13 +783,14 @@ }, { "id": 6008, - "goodid": 33019, - "goodname": "天晶·御(1品)藏宝图", + "goodId": 33019, + "goodName": "天晶·御(1品)藏宝图", "shop": 6, "type": 3, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 9999, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 9999, "refreshType": 2, "money": 40002, "price": 200, @@ -753,13 +800,14 @@ }, { "id": 6009, - "goodid": 33028, - "goodname": "天晶·命(1品)藏宝图", + "goodId": 33028, + "goodName": "天晶·命(1品)藏宝图", "shop": 6, "type": 3, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 9999, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 9999, "refreshType": 2, "money": 40002, "price": 200, @@ -769,13 +817,14 @@ }, { "id": 6010, - "goodid": 33002, - "goodname": "天晶·破(2品)藏宝图", + "goodId": 33002, + "goodName": "天晶·破(2品)藏宝图", "shop": 6, "type": 3, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 9999, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 9999, "refreshType": 2, "money": 40002, "price": 500, @@ -785,13 +834,14 @@ }, { "id": 6011, - "goodid": 33011, - "goodname": "天晶·护(2品)藏宝图", + "goodId": 33011, + "goodName": "天晶·护(2品)藏宝图", "shop": 6, "type": 3, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 9999, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 9999, "refreshType": 2, "money": 40002, "price": 500, @@ -801,13 +851,14 @@ }, { "id": 6012, - "goodid": 33020, - "goodname": "天晶·御(2品)藏宝图", + "goodId": 33020, + "goodName": "天晶·御(2品)藏宝图", "shop": 6, "type": 3, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 9999, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 9999, "refreshType": 2, "money": 40002, "price": 500, @@ -817,13 +868,14 @@ }, { "id": 6013, - "goodid": 33029, - "goodname": "天晶·命(2品)藏宝图", + "goodId": 33029, + "goodName": "天晶·命(2品)藏宝图", "shop": 6, "type": 3, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 9999, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 9999, "refreshType": 2, "money": 40002, "price": 500, @@ -833,13 +885,14 @@ }, { "id": 6014, - "goodid": 33003, - "goodname": "天晶·破(3品)藏宝图", + "goodId": 33003, + "goodName": "天晶·破(3品)藏宝图", "shop": 6, "type": 3, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 9999, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 9999, "refreshType": 2, "money": 40002, "price": 1000, @@ -849,13 +902,14 @@ }, { "id": 6015, - "goodid": 33012, - "goodname": "天晶·护(3品)藏宝图", + "goodId": 33012, + "goodName": "天晶·护(3品)藏宝图", "shop": 6, "type": 3, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 9999, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 9999, "refreshType": 2, "money": 40002, "price": 1000, @@ -865,13 +919,14 @@ }, { "id": 6016, - "goodid": 33021, - "goodname": "天晶·御(3品)藏宝图", + "goodId": 33021, + "goodName": "天晶·御(3品)藏宝图", "shop": 6, "type": 3, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 9999, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 9999, "refreshType": 2, "money": 40002, "price": 1000, @@ -881,13 +936,14 @@ }, { "id": 6017, - "goodid": 33030, - "goodname": "天晶·命(3品)藏宝图", + "goodId": 33030, + "goodName": "天晶·命(3品)藏宝图", "shop": 6, "type": 3, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 9999, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 9999, "refreshType": 2, "money": 40002, "price": 1000, @@ -897,13 +953,14 @@ }, { "id": 6018, - "goodid": 33004, - "goodname": "天晶·破(4品)藏宝图", + "goodId": 33004, + "goodName": "天晶·破(4品)藏宝图", "shop": 6, "type": 3, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 9999, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 9999, "refreshType": 2, "money": 40002, "price": 2500, @@ -913,13 +970,14 @@ }, { "id": 6019, - "goodid": 33013, - "goodname": "天晶·护(4品)藏宝图", + "goodId": 33013, + "goodName": "天晶·护(4品)藏宝图", "shop": 6, "type": 3, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 9999, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 9999, "refreshType": 2, "money": 40002, "price": 2500, @@ -929,13 +987,14 @@ }, { "id": 6020, - "goodid": 33022, - "goodname": "天晶·御(4品)藏宝图", + "goodId": 33022, + "goodName": "天晶·御(4品)藏宝图", "shop": 6, "type": 3, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 9999, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 9999, "refreshType": 2, "money": 40002, "price": 2500, @@ -945,13 +1004,14 @@ }, { "id": 6021, - "goodid": 33031, - "goodname": "天晶·命(4品)藏宝图", + "goodId": 33031, + "goodName": "天晶·命(4品)藏宝图", "shop": 6, "type": 3, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 9999, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 9999, "refreshType": 2, "money": 40002, "price": 2500, @@ -961,13 +1021,14 @@ }, { "id": 6022, - "goodid": 33005, - "goodname": "天晶·破(5品)藏宝图", + "goodId": 33005, + "goodName": "天晶·破(5品)藏宝图", "shop": 6, "type": 3, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 9999, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 9999, "refreshType": 2, "money": 40002, "price": 5000, @@ -977,13 +1038,14 @@ }, { "id": 6023, - "goodid": 33014, - "goodname": "天晶·护(5品)藏宝图", + "goodId": 33014, + "goodName": "天晶·护(5品)藏宝图", "shop": 6, "type": 3, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 9999, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 9999, "refreshType": 2, "money": 40002, "price": 5000, @@ -993,13 +1055,14 @@ }, { "id": 6024, - "goodid": 33023, - "goodname": "天晶·御(5品)藏宝图", + "goodId": 33023, + "goodName": "天晶·御(5品)藏宝图", "shop": 6, "type": 3, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 9999, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 9999, "refreshType": 2, "money": 40002, "price": 5000, @@ -1009,13 +1072,14 @@ }, { "id": 6025, - "goodid": 33032, - "goodname": "天晶·命(5品)藏宝图", + "goodId": 33032, + "goodName": "天晶·命(5品)藏宝图", "shop": 6, "type": 3, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 9999, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 9999, "refreshType": 2, "money": 40002, "price": 5000, @@ -1025,13 +1089,14 @@ }, { "id": 6026, - "goodid": 33006, - "goodname": "天晶·破(6品)藏宝图", + "goodId": 33006, + "goodName": "天晶·破(6品)藏宝图", "shop": 6, "type": 3, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 9999, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 9999, "refreshType": 2, "money": 40002, "price": 8000, @@ -1041,13 +1106,14 @@ }, { "id": 6027, - "goodid": 33015, - "goodname": "天晶·护(6品)藏宝图", + "goodId": 33015, + "goodName": "天晶·护(6品)藏宝图", "shop": 6, "type": 3, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 9999, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 9999, "refreshType": 2, "money": 40002, "price": 8000, @@ -1057,13 +1123,14 @@ }, { "id": 6028, - "goodid": 33024, - "goodname": "天晶·御(6品)藏宝图", + "goodId": 33024, + "goodName": "天晶·御(6品)藏宝图", "shop": 6, "type": 3, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 9999, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 9999, "refreshType": 2, "money": 40002, "price": 8000, @@ -1073,13 +1140,14 @@ }, { "id": 6029, - "goodid": 33033, - "goodname": "天晶·命(6品)藏宝图", + "goodId": 33033, + "goodName": "天晶·命(6品)藏宝图", "shop": 6, "type": 3, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 9999, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 9999, "refreshType": 2, "money": 40002, "price": 8000, @@ -1089,13 +1157,14 @@ }, { "id": 6030, - "goodid": 33007, - "goodname": "天晶·破(7品)藏宝图", + "goodId": 33007, + "goodName": "天晶·破(7品)藏宝图", "shop": 6, "type": 3, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 9999, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 9999, "refreshType": 2, "money": 40002, "price": 15000, @@ -1105,13 +1174,14 @@ }, { "id": 6031, - "goodid": 33016, - "goodname": "天晶·护(7品)藏宝图", + "goodId": 33016, + "goodName": "天晶·护(7品)藏宝图", "shop": 6, "type": 3, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 9999, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 9999, "refreshType": 2, "money": 40002, "price": 15000, @@ -1121,13 +1191,14 @@ }, { "id": 6032, - "goodid": 33025, - "goodname": "天晶·御(7品)藏宝图", + "goodId": 33025, + "goodName": "天晶·御(7品)藏宝图", "shop": 6, "type": 3, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 9999, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 9999, "refreshType": 2, "money": 40002, "price": 15000, @@ -1137,13 +1208,14 @@ }, { "id": 6033, - "goodid": 33034, - "goodname": "天晶·命(7品)藏宝图", + "goodId": 33034, + "goodName": "天晶·命(7品)藏宝图", "shop": 6, "type": 3, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 9999, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 9999, "refreshType": 2, "money": 40002, "price": 15000, @@ -1153,13 +1225,14 @@ }, { "id": 7001, - "goodid": 50001, - "goodname": "下品装备图纸", + "goodId": 50001, + "goodName": "下品装备图纸", "shop": 7, "type": 11, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 9999, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 9999, "refreshType": 1, "money": 40007, "price": 100, @@ -1169,13 +1242,14 @@ }, { "id": 7002, - "goodid": 50002, - "goodname": "中品装备图纸", + "goodId": 50002, + "goodName": "中品装备图纸", "shop": 7, "type": 11, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 9999, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 9999, "refreshType": 1, "money": 40007, "price": 250, @@ -1185,13 +1259,14 @@ }, { "id": 7003, - "goodid": 50003, - "goodname": "上品装备图纸", + "goodId": 50003, + "goodName": "上品装备图纸", "shop": 7, "type": 11, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 9999, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 9999, "refreshType": 1, "money": 40007, "price": 600, @@ -1201,13 +1276,14 @@ }, { "id": 7004, - "goodid": 50004, - "goodname": "极品装备图纸", + "goodId": 50004, + "goodName": "极品装备图纸", "shop": 7, "type": 11, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 9999, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 9999, "refreshType": 1, "money": 40007, "price": 1200, @@ -1217,13 +1293,14 @@ }, { "id": 7005, - "goodid": 50005, - "goodname": "圣品装备图纸", + "goodId": 50005, + "goodName": "圣品装备图纸", "shop": 7, "type": 11, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 9999, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 9999, "refreshType": 1, "money": 40007, "price": 5000, @@ -1233,13 +1310,14 @@ }, { "id": 7006, - "goodid": 71009, - "goodname": "一阶宝石随机礼包", + "goodId": 71009, + "goodName": "一阶宝石随机礼包", "shop": 7, "type": 2, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 1200, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 1200, "refreshType": 1, "money": 40007, "price": 20, @@ -1249,13 +1327,14 @@ }, { "id": 8001, - "goodid": 60001, - "goodname": "地玉·破(一品)", + "goodId": 60001, + "goodName": "地玉·破(一品)", "shop": 8, "type": 10, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 9999, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 9999, "refreshType": 1, "money": 40011, "price": 10, @@ -1265,13 +1344,14 @@ }, { "id": 8002, - "goodid": 60011, - "goodname": "地玉·护(一品)", + "goodId": 60011, + "goodName": "地玉·护(一品)", "shop": 8, "type": 10, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 9999, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 9999, "refreshType": 1, "money": 40011, "price": 10, @@ -1281,13 +1361,14 @@ }, { "id": 8003, - "goodid": 60021, - "goodname": "地玉·御(一品)", + "goodId": 60021, + "goodName": "地玉·御(一品)", "shop": 8, "type": 10, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 9999, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 9999, "refreshType": 1, "money": 40011, "price": 10, @@ -1297,13 +1378,14 @@ }, { "id": 8004, - "goodid": 60031, - "goodname": "地玉·命(一品)", + "goodId": 60031, + "goodName": "地玉·命(一品)", "shop": 8, "type": 10, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 9999, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 9999, "refreshType": 1, "money": 40011, "price": 10, @@ -1313,13 +1395,14 @@ }, { "id": 8005, - "goodid": 11004, - "goodname": "特技武将经验书", + "goodId": 11004, + "goodName": "特技武将经验书", "shop": 8, "type": 10, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 9999, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 9999, "refreshType": 1, "money": 40011, "price": 1000, @@ -1329,13 +1412,14 @@ }, { "id": 8006, - "goodid": 17042, - "goodname": "虎符", + "goodId": 17042, + "goodName": "虎符", "shop": 8, "type": 10, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 9999, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 9999, "refreshType": 1, "money": 40011, "price": 2000, @@ -1345,13 +1429,14 @@ }, { "id": 8007, - "goodid": 17001, - "goodname": "觉醒石", + "goodId": 17001, + "goodName": "觉醒石", "shop": 8, "type": 10, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 9999, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 9999, "refreshType": 1, "money": 40011, "price": 4000, @@ -1361,13 +1446,14 @@ }, { "id": 8008, - "goodid": 17056, - "goodname": "息壤", + "goodId": 17056, + "goodName": "息壤", "shop": 8, "type": 10, - "guildlvlimit": "&", - "lvlimit": 0, - "purchaselimit": 9999, + "guildLvLimit": "&", + "lvLimit": 0, + "ranklimit": 0, + "purchaseLimit": 9999, "refreshType": 1, "money": 40011, "price": 800, diff --git a/shared/resource/jsons/dic_zyz_shopType.json b/shared/resource/jsons/dic_zyz_shopType.json index d195618d7..cff4b7717 100644 --- a/shared/resource/jsons/dic_zyz_shopType.json +++ b/shared/resource/jsons/dic_zyz_shopType.json @@ -1,46 +1,146 @@ [ { + "id": 1, "typeid": 1, - "name": "武器" + "name": "武器", + "shop": "&", + "isLimit": 0, + "openLimit": "&" }, { + "id": 2, "typeid": 2, - "name": "宝石" + "name": "宝石", + "shop": 7, + "isLimit": 0, + "openLimit": "&" }, { + "id": 3, "typeid": 3, - "name": "藏宝图" + "name": "藏宝图", + "shop": 6, + "isLimit": 0, + "openLimit": "&" }, { + "id": 4, "typeid": 4, - "name": "精魄" + "name": "精魄", + "shop": "&", + "isLimit": 0, + "openLimit": "&" }, { + "id": 5, "typeid": 5, - "name": "奇珍" + "name": "奇珍", + "shop": 1, + "isLimit": 0, + "openLimit": "&" }, { + "id": 6, "typeid": 6, - "name": "防具" + "name": "防具", + "shop": "&", + "isLimit": 0, + "openLimit": "&" }, { + "id": 7, "typeid": 7, - "name": "臻选" + "name": "臻选", + "shop": 5, + "isLimit": 0, + "openLimit": "&" }, { + "id": 8, "typeid": 9, - "name": "将魂回收" + "name": "将魂回收", + "shop": 8, + "isLimit": 0, + "openLimit": "&" }, { + "id": 9, "typeid": 10, - "name": "将魂兑换" + "name": "将魂兑换", + "shop": 8, + "isLimit": 0, + "openLimit": "&" }, { + "id": 10, "typeid": 11, - "name": "图纸" + "name": "图纸", + "shop": 7, + "isLimit": 0, + "openLimit": "&" }, { + "id": 11, "typeid": 12, - "name": "竞技" + "name": "竞技", + "shop": 5, + "isLimit": 0, + "openLimit": "&" + }, + { + "id": 12, + "typeid": 13, + "name": "名将擂台", + "shop": 4, + "isLimit": 0, + "openLimit": "0&124" + }, + { + "id": 13, + "typeid": 14, + "name": "擂台限定", + "shop": 4, + "isLimit": 0, + "openLimit": "0&124" + }, + { + "id": 14, + "typeid": 15, + "name": "巅峰演武", + "shop": 4, + "isLimit": 0, + "openLimit": "50&" + }, + { + "id": 15, + "typeid": 11, + "name": "图纸", + "shop": 2, + "isLimit": 0, + "openLimit": "&" + }, + { + "id": 16, + "typeid": 5, + "name": "奇珍", + "shop": 2, + "isLimit": 0, + "openLimit": "&" + }, + { + "id": 17, + "typeid": 5, + "name": "奇珍", + "shop": 3, + "isLimit": 0, + "openLimit": "&" + }, + { + "id": 18, + "typeid": 16, + "name": "限时", + "shop": 5, + "isLimit": 1, + "openLimit": "&" } ] \ No newline at end of file