活动:支持礼包兑换

This commit is contained in:
qiaoxin
2021-04-27 20:52:42 +08:00
parent 2996a899e2
commit 2ec957c619
8 changed files with 326 additions and 131 deletions

View File

@@ -8,12 +8,12 @@ export const IT_TYPE = {
// 背包页签
export const GOOD_TYPE = {
ITEM: 1,
EQUIP: 2,
PIECE: 3,
BLUEPRT: 4,
JEWEL: 5,
PICTURE: 6
ITEM: 1,
EQUIP: 2,
PIECE: 3,
BLUEPRT: 4,
JEWEL: 5,
PICTURE: 6
};
// 存到消耗品表内显示的类型
@@ -31,6 +31,7 @@ export const CONSUME_TYPE = {
HEAD: 11, // 头像
FRAME: 12, // 相框
SPINE: 13, // 形象
GIFT_PACKAGE: 14, // 礼包
};
export enum ROLE_TERAPH {
@@ -74,14 +75,14 @@ export enum JEWEL_TYPE {
}
export const ITEM_TABLE = {
EQUIP: 'equip',
ITEM: 'item',
ROLE: 'role',
HERO: 'hero'
EQUIP: 'equip',
ITEM: 'item',
ROLE: 'role',
HERO: 'hero'
}
const itid_array = [
{ id: 1, name: '短兵(神兵)', table: 'equip', type: EQUIP_TYPE.WEAPON, equipJewel: JEWEL_TYPE.WEAPON},
{ id: 1, name: '短兵(神兵)', table: 'equip', type: EQUIP_TYPE.WEAPON, equipJewel: JEWEL_TYPE.WEAPON },
{ id: 2, name: '枪矛(神兵)', table: 'equip', type: EQUIP_TYPE.WEAPON, equipJewel: JEWEL_TYPE.WEAPON },
{ id: 3, name: '重兵(神兵)', table: 'equip', type: EQUIP_TYPE.WEAPON, equipJewel: JEWEL_TYPE.WEAPON },
{ id: 4, name: '弓弩(神兵)', table: 'equip', type: EQUIP_TYPE.WEAPON, equipJewel: JEWEL_TYPE.WEAPON },
@@ -103,10 +104,10 @@ const itid_array = [
{ id: 20, name: '车(行具)', table: 'equip', type: EQUIP_TYPE.SHOES, equipJewel: JEWEL_TYPE.SHOES },
{ id: 21, name: '佩饰(礼器)', table: 'equip', type: EQUIP_TYPE.ACCESSORY, equipJewel: JEWEL_TYPE.ACCESSORY },
{ id: 22, name: '钟鼎(礼器)', table: 'equip', type: EQUIP_TYPE.ACCESSORY, equipJewel: JEWEL_TYPE.ACCESSORY },
{ id: 23, name: '印章(礼器)', table: 'equip', type: EQUIP_TYPE.ACCESSORY, equipJewel: JEWEL_TYPE.ACCESSORY },
{ id: 23, name: '印章(礼器)', table: 'equip', type: EQUIP_TYPE.ACCESSORY, equipJewel: JEWEL_TYPE.ACCESSORY },
{ id: 24, name: '消耗品', table: 'item', type: CONSUME_TYPE.CONSUME },
{ id: 37, name: '消耗类物品(图纸类)', table: 'item', type: CONSUME_TYPE.CONSUME },
{ id: 35, name: '消耗类物品(经验书)', table: 'item', type: CONSUME_TYPE.EXP },
{ id: 36, name: '消耗类物品(好感道具)', table: 'item', type: CONSUME_TYPE.FAVOUR },
@@ -139,49 +140,51 @@ const itid_array = [
{ id: 49, name: '玩家好感道具', table: 'item', type: CONSUME_TYPE.FRIEND_FAVOUR },
{ id: 50, name: '形象', table: 'role', type: CONSUME_TYPE.HEAD },
{ id: 51, name: '相框', table: 'role', type: CONSUME_TYPE.FRAME },
{ id: 52, name: '玩家形象', table: 'role', type: CONSUME_TYPE.SPINE }
{ id: 52, name: '玩家形象', table: 'role', type: CONSUME_TYPE.SPINE },
{ id: 54, name: '礼包分类', table: 'item', type: CONSUME_TYPE.GIFT_PACKAGE }
];
export const ITID = new Map<number, {id: number, name: string, table: string, type?: number, isCurrency?: boolean, equipJewel?: number}>();
for(let obj of itid_array) {
export const ITID = new Map<number, { id: number, name: string, table: string, type?: number, isCurrency?: boolean, equipJewel?: number }>();
for (let obj of itid_array) {
ITID.set(obj.id, obj);
}
export const CURRENCY_TYPE = {
GOLD: "gold",
COIN: "coin",
ACTION_POINT: "ap",
TREASURE_POINT: "treasurePoint",
EXPEDITION_POINT: "expeditionPoint",
DUNGEON_POINT: "dungeonPoint",
FRIEND_POINT: "friendPoint",
HONOUR: "honour",
SKIN_COIN: "skinCoin",
DUNGEON: "dungeon"
GOLD: "gold",
COIN: "coin",
ACTION_POINT: "ap",
TREASURE_POINT: "treasurePoint",
EXPEDITION_POINT: "expeditionPoint",
DUNGEON_POINT: "dungeonPoint",
FRIEND_POINT: "friendPoint",
HONOUR: "honour",
SKIN_COIN: "skinCoin",
DUNGEON: "dungeon"
}
export const SPEICAL_ITEM = {
REFINE_ADD_RATE: [17039]
REFINE_ADD_RATE: [17039]
};
const currencyArr = [
{ "gid": 31001, "name": "铜钱", "type": CURRENCY_TYPE.COIN },
{ "gid": 31002, "name": "元宝", "type": CURRENCY_TYPE.GOLD },
{ "gid": 31003, "name": "体力", "type": CURRENCY_TYPE.ACTION_POINT },
{ "gid": 40001, "name": "远征币", "type": CURRENCY_TYPE.EXPEDITION_POINT },
{ "gid": 40002, "name": "寻宝币", "type": CURRENCY_TYPE.TREASURE_POINT },
{ "gid": 40003, "name": "情谊点", "type": CURRENCY_TYPE.FRIEND_POINT },
{ "gid": 40004, "name": "秘境币", "type": CURRENCY_TYPE.DUNGEON_POINT },
{ "gid": 40005, "name": "功勋", "type": CURRENCY_TYPE.HONOUR },
{ "gid": 40006, "name": "蜀锦", "type": CURRENCY_TYPE.SKIN_COIN },
{ "gid": 40007, "name": "秘境币", "type": CURRENCY_TYPE.DUNGEON }
{ "gid": 31001, "name": "铜钱", "type": CURRENCY_TYPE.COIN },
{ "gid": 31002, "name": "元宝", "type": CURRENCY_TYPE.GOLD },
{ "gid": 31003, "name": "体力", "type": CURRENCY_TYPE.ACTION_POINT },
{ "gid": 40001, "name": "远征币", "type": CURRENCY_TYPE.EXPEDITION_POINT },
{ "gid": 40002, "name": "寻宝币", "type": CURRENCY_TYPE.TREASURE_POINT },
{ "gid": 40003, "name": "情谊点", "type": CURRENCY_TYPE.FRIEND_POINT },
{ "gid": 40004, "name": "秘境币", "type": CURRENCY_TYPE.DUNGEON_POINT },
{ "gid": 40005, "name": "功勋", "type": CURRENCY_TYPE.HONOUR },
{ "gid": 40006, "name": "蜀锦", "type": CURRENCY_TYPE.SKIN_COIN },
{ "gid": 40007, "name": "秘境币", "type": CURRENCY_TYPE.DUNGEON }
];
export const CURRENCY = new Map<number, {gid: number, name: string, type: string}>();
export const CURRENCY = new Map<number, { gid: number, name: string, type: string }>();
export const CURRENCY_BY_TYPE = new Map<string, number>();
for(let obj of currencyArr) {
CURRENCY.set(obj.gid, obj);
CURRENCY_BY_TYPE.set(obj.type, obj.gid);
for (let obj of currencyArr) {
CURRENCY.set(obj.gid, obj);
CURRENCY_BY_TYPE.set(obj.type, obj.gid);
}
export enum QUALITY_TYPE {
@@ -197,11 +200,11 @@ export const COM_BTL_QUALITY = [QUALITY_TYPE.BLUE, QUALITY_TYPE.PURPLE, QUALITY_
// 各品质随机属性条数 quality => number
export const RANDOM_SE_COUNT = new Map<number, number>([
[QUALITY_TYPE.BLUE, 0],
[QUALITY_TYPE.PURPLE, 1],
[QUALITY_TYPE.ORANGE, 2],
[QUALITY_TYPE.RED, 3],
[QUALITY_TYPE.GOLD, 4]
[QUALITY_TYPE.BLUE, 0],
[QUALITY_TYPE.PURPLE, 1],
[QUALITY_TYPE.ORANGE, 2],
[QUALITY_TYPE.RED, 3],
[QUALITY_TYPE.GOLD, 4]
]);
@@ -215,47 +218,47 @@ export const FIX_ATTRIBUTES_RAN = 20; // 固定属性值+-20%随机
export function getCurNameById(gid) {
let currency = CURRENCY.get(gid);
if (!currency) {
return;
}
if (currency.type == CURRENCY_TYPE.COIN) {
return 'coin';
} else if (currency.type == CURRENCY_TYPE.GOLD) {
return 'gold';
} else if (currency.type == CURRENCY_TYPE.ACTION_POINT) {
return 'ap';
} else if (currency.type == CURRENCY_TYPE.FRIEND_POINT) {
return 'frdCnt';
} else if (currency.type == CURRENCY_TYPE.EXPEDITION_POINT) {
return 'expeditionPoint';
} else if (currency.type == CURRENCY_TYPE.HONOUR) {
return 'honour'
}
}
let currency = CURRENCY.get(gid);
if (!currency) {
return;
}
if (currency.type == CURRENCY_TYPE.COIN) {
return 'coin';
} else if (currency.type == CURRENCY_TYPE.GOLD) {
return 'gold';
} else if (currency.type == CURRENCY_TYPE.ACTION_POINT) {
return 'ap';
} else if (currency.type == CURRENCY_TYPE.FRIEND_POINT) {
return 'frdCnt';
} else if (currency.type == CURRENCY_TYPE.EXPEDITION_POINT) {
return 'expeditionPoint';
} else if (currency.type == CURRENCY_TYPE.HONOUR) {
return 'honour'
}
}
export function getDropItems() {
let items = [
{ id:25 ,count: 1 },{ id:225 ,count: 1 },{ id:625 ,count: 1 },{ id:2025 ,count: 1 },{ id:3025 ,count: 1 },{ id:4025 ,count: 1 },{ id:5025 ,count: 1 },{ id:6025 ,count: 1 },
{ id:1 ,count: 1 },{ id:2 ,count: 1 },{ id:101 ,count: 1 },{ id:102 ,count: 1 },{ id:201 ,count: 1 },{ id:202 ,count: 1 },{ id:301 ,count: 1 },{ id:302 ,count: 1 },
{ id:401 ,count: 1 },{ id:501 ,count: 1 },{ id:601 ,count: 1 },{ id:602 ,count: 1 },{ id:701 ,count: 1 },{ id:702 ,count: 1 },{ id:2001 ,count: 1 },{ id:2002 ,count: 1 },
{ id:2101 ,count: 1 },{ id:2102 ,count: 1 },{ id:2201 ,count: 1 },{ id:2202 ,count: 1 },{ id:3001 ,count: 1 },{ id:3002 ,count: 1 },{ id:3101 ,count: 1 },{ id:3102 ,count: 1 },
{ id:3201 ,count: 1 },{ id:3202 ,count: 1 },{ id:4001 ,count: 1 },{ id:4002 ,count: 1 },{ id:4101 ,count: 1 },{ id:4102 ,count: 1 },{ id:4201 ,count: 1 },{ id:4202 ,count: 1 },
{ id:5001 ,count: 1 },{ id:5002 ,count: 1 },{ id:5101 ,count: 1 },{ id:5102 ,count: 1 },{ id:5201 ,count: 1 },{ id:5202 ,count: 1 },{ id:6001 ,count: 1 },{ id:6002 ,count: 1 },
{ id:6101 ,count: 1 },{ id:6102 ,count: 1 },{ id:11001 ,count: 10000},{ id:11002 ,count: 10000 },{ id:11003,count: 10000 },{ id:11004 ,count: 100000 },{ id:11011 ,count: 100000 },
{ id:11012 ,count: 100000 },{ id:11013 ,count: 100000 },{ id:11014 ,count: 100000 },{ id:11015 ,count: 100000 },{ id:11016 ,count: 100000 },{ id:11017 ,count: 100000 },
{ id:17001 ,count: 100000 },{ id:17002 ,count: 100000 },{ id:17003 ,count: 100000 },{ id:17004 ,count: 100000 },{ id:17005 ,count: 100000 },{ id:17006 ,count: 100000 },
{ id:17007 ,count: 100000 },{ id:17008 ,count: 100000 },{ id:17009 ,count: 100000 },{ id:17010 ,count: 100000 },{ id:17011 ,count: 100000 },{ id:17012 ,count: 100000 },
{ id:17013 ,count: 100000 },{ id:17014 ,count: 100000 },{ id:17015 ,count: 100000 },{ id:17016 ,count: 100000 },{ id:17016 ,count: 100000 },{ id:17017 ,count: 100000 },
{ id:17018 ,count: 100000 },{ id:17019 ,count: 100000 },{ id:17020 ,count: 100000 },{ id:17021 ,count: 100000 },{ id:17022 ,count: 100000 },{ id:17023 ,count: 100000 },
{ id:17024 ,count: 100000 },{ id:17025 ,count: 100000 },{ id:17026 ,count: 100000 },{ id:17027 ,count: 100000 },{ id:17028 ,count: 100000 },{ id:17029 ,count: 100000 },
{ id:17030 ,count: 100000 },{ id:17031 ,count: 100000 },{ id:17032 ,count: 100000 },{ id:17033 ,count: 100000 },{ id:17034 ,count: 100000 },{ id:17035 ,count: 100000 },
{ id:17036 ,count: 100000 },{ id:17037 ,count: 100000 },{ id:17038 ,count: 100000 },{ id:17039 ,count: 100000 },{ id:17040 ,count: 100000 },{ id:17041 ,count: 100000 },
{ id:17042 ,count: 100000 },{ id:17043 ,count: 100000 },{ id:17044 ,count: 100000 },{ id:17045 ,count: 100000 },{ id:17046 ,count: 100000 },{ id:17047 ,count: 100000 },
{ id:21001 ,count: 100000 },{ id:21002 ,count: 100000 },{ id:31001 ,count: 100000 },{ id:31002 ,count: 100000 },{ id:31003 ,count: 100000 },{ id:33001 ,count: 100000 },
{ id:33002 ,count: 100000 },{ id:33003 ,count: 100000 },{ id:40001 ,count: 100000 },{ id:40002 ,count: 100000 },{ id:42001 ,count: 100000 },{ id:42002 ,count: 100000 },
{ id:50009 ,count: 100000 },{ id:50010 ,count: 100000 },{ id:60001 ,count: 100000 },{ id:60002 ,count: 100000 },{ id:4 ,count: 2 },{ id:2004 ,count: 2 },{ id:220 ,count: 2 },
{ id:2008 ,count: 2 },{ id:2012 ,count: 2 },{ id:2208 ,count: 2 },{ id:2016 ,count: 2 },{ id:2120 ,count: 2 },{ id:2220 ,count: 2 },{ id:50031, count: 1000}
{ id: 25, count: 1 }, { id: 225, count: 1 }, { id: 625, count: 1 }, { id: 2025, count: 1 }, { id: 3025, count: 1 }, { id: 4025, count: 1 }, { id: 5025, count: 1 }, { id: 6025, count: 1 },
{ id: 1, count: 1 }, { id: 2, count: 1 }, { id: 101, count: 1 }, { id: 102, count: 1 }, { id: 201, count: 1 }, { id: 202, count: 1 }, { id: 301, count: 1 }, { id: 302, count: 1 },
{ id: 401, count: 1 }, { id: 501, count: 1 }, { id: 601, count: 1 }, { id: 602, count: 1 }, { id: 701, count: 1 }, { id: 702, count: 1 }, { id: 2001, count: 1 }, { id: 2002, count: 1 },
{ id: 2101, count: 1 }, { id: 2102, count: 1 }, { id: 2201, count: 1 }, { id: 2202, count: 1 }, { id: 3001, count: 1 }, { id: 3002, count: 1 }, { id: 3101, count: 1 }, { id: 3102, count: 1 },
{ id: 3201, count: 1 }, { id: 3202, count: 1 }, { id: 4001, count: 1 }, { id: 4002, count: 1 }, { id: 4101, count: 1 }, { id: 4102, count: 1 }, { id: 4201, count: 1 }, { id: 4202, count: 1 },
{ id: 5001, count: 1 }, { id: 5002, count: 1 }, { id: 5101, count: 1 }, { id: 5102, count: 1 }, { id: 5201, count: 1 }, { id: 5202, count: 1 }, { id: 6001, count: 1 }, { id: 6002, count: 1 },
{ id: 6101, count: 1 }, { id: 6102, count: 1 }, { id: 11001, count: 10000 }, { id: 11002, count: 10000 }, { id: 11003, count: 10000 }, { id: 11004, count: 100000 }, { id: 11011, count: 100000 },
{ id: 11012, count: 100000 }, { id: 11013, count: 100000 }, { id: 11014, count: 100000 }, { id: 11015, count: 100000 }, { id: 11016, count: 100000 }, { id: 11017, count: 100000 },
{ id: 17001, count: 100000 }, { id: 17002, count: 100000 }, { id: 17003, count: 100000 }, { id: 17004, count: 100000 }, { id: 17005, count: 100000 }, { id: 17006, count: 100000 },
{ id: 17007, count: 100000 }, { id: 17008, count: 100000 }, { id: 17009, count: 100000 }, { id: 17010, count: 100000 }, { id: 17011, count: 100000 }, { id: 17012, count: 100000 },
{ id: 17013, count: 100000 }, { id: 17014, count: 100000 }, { id: 17015, count: 100000 }, { id: 17016, count: 100000 }, { id: 17016, count: 100000 }, { id: 17017, count: 100000 },
{ id: 17018, count: 100000 }, { id: 17019, count: 100000 }, { id: 17020, count: 100000 }, { id: 17021, count: 100000 }, { id: 17022, count: 100000 }, { id: 17023, count: 100000 },
{ id: 17024, count: 100000 }, { id: 17025, count: 100000 }, { id: 17026, count: 100000 }, { id: 17027, count: 100000 }, { id: 17028, count: 100000 }, { id: 17029, count: 100000 },
{ id: 17030, count: 100000 }, { id: 17031, count: 100000 }, { id: 17032, count: 100000 }, { id: 17033, count: 100000 }, { id: 17034, count: 100000 }, { id: 17035, count: 100000 },
{ id: 17036, count: 100000 }, { id: 17037, count: 100000 }, { id: 17038, count: 100000 }, { id: 17039, count: 100000 }, { id: 17040, count: 100000 }, { id: 17041, count: 100000 },
{ id: 17042, count: 100000 }, { id: 17043, count: 100000 }, { id: 17044, count: 100000 }, { id: 17045, count: 100000 }, { id: 17046, count: 100000 }, { id: 17047, count: 100000 },
{ id: 21001, count: 100000 }, { id: 21002, count: 100000 }, { id: 31001, count: 100000 }, { id: 31002, count: 100000 }, { id: 31003, count: 100000 }, { id: 33001, count: 100000 },
{ id: 33002, count: 100000 }, { id: 33003, count: 100000 }, { id: 40001, count: 100000 }, { id: 40002, count: 100000 }, { id: 42001, count: 100000 }, { id: 42002, count: 100000 },
{ id: 50009, count: 100000 }, { id: 50010, count: 100000 }, { id: 60001, count: 100000 }, { id: 60002, count: 100000 }, { id: 4, count: 2 }, { id: 2004, count: 2 }, { id: 220, count: 2 },
{ id: 2008, count: 2 }, { id: 2012, count: 2 }, { id: 2208, count: 2 }, { id: 2016, count: 2 }, { id: 2120, count: 2 }, { id: 2220, count: 2 }, { id: 50031, count: 1000 }
]
return items;
}
@@ -272,11 +275,11 @@ export enum FIGURE_UNLOCK_CONDITION {
export const TERAPH_RANDOM = {
MIN: 2,
MAX: 4
}
}
// 道具特殊属性,如藏宝图等
export const SPECIAL_ATTR = {
WAR_ID: 1,
TREASURE_ID: 2,
TREASURE_TYPE: 3
}
TREASURE_TYPE: 3
}