拍卖行:时间使用参数表

This commit is contained in:
luying
2021-09-22 16:46:15 +08:00
parent 7df7de4bed
commit fb8e88020c
5 changed files with 54 additions and 27 deletions

View File

@@ -16,17 +16,14 @@ export const AUCTION_SOURCE = {
export const LOT_CODE_LEN = 8;
export const DIVIDEND_CODE_LEN = 8;
// 世界拍卖开始时间需晚于军团拍卖结束时间
export const AUCTION_TIME = {
GUILD_BEGIN_HOUR: 20, // 军团拍卖开
GUILD_BEGIN_MIN: 20, // 军团拍卖开始
WORLD_BEGIN_HOUR: 20, // 世界拍卖开始
WORLD_BEGIN_MIN: 30, // 世界拍卖开
GUILD_END_HOUR: 20, // 军团拍卖结束
GUILD_END_MIN: 30, // 军团拍卖结束
WORLD_END_HOUR: 22, // 世界拍卖结束
WORLD_END_MIN: 0, // 世界拍卖结束
};
export enum AUCTION_TIME {
GUILD_PREVIEW = 1, // 军团拍卖预览时间(非开启时间)
GUILD_OPEN = 2, // 军团拍卖开启时间
GUILD_CLOSE = 3, // 军团拍卖关闭时间
WORLD_PREVIEW = 4, // 世界拍卖预览时间(非开启时间)
WORLD_OPEN = 5, // 世界拍卖开启时间
WORLD_CLOSE = 6, // 世界拍卖结束时间
}
export const DIVIDEND_STATUS = {
DEFAULT: 0, // 0未开始

View File

@@ -18,7 +18,7 @@ import { dicTowerTask, loadTowerTask } from "./dictionary/DicTowerTask";
import { dicWar, dicWarPvp, dicDailyWarByType, loadWar } from "./dictionary/DicWar";
import { dicWarJson, loadWarJson } from "./dictionary/DicWarJson";
import { dicXunbao, loadXunbao } from "./dictionary/DicXunbao";
import { SPECIAL_ATTR } from "../consts";
import { AUCTION_TIME, SPECIAL_ATTR } from "../consts";
import { dicFashions, loadFashions } from "./dictionary/DicFashions";
import { friendShips, friendShipHidAandIds, loadFriendShip } from "./dictionary/DicFriendShip";
import { maxFriendShipLv, dicFriendShipLevelMap, loadFriendShipLevel } from "./dictionary/DicFriendShipLevel";
@@ -235,7 +235,8 @@ export const gameData = {
ceRatio: new Array<{type: number, val: number}>(),
holiday: dicHoliday,
expeditionSubAttr: dicExpeditionSubAttr,
auctionPool: dicAuctionPool
auctionPool: dicAuctionPool,
auctionTime: new Map<number, { hour: number, minute: number, seconds: number}>()
};
// 在此提供一些原先在gamedata中提供的方法以便更方便获取gameData数据
@@ -799,6 +800,20 @@ function loadEquipAttributeRatio() {
}
}
function loadAuctionTime() {
gameData.auctionTime.set(AUCTION_TIME.GUILD_PREVIEW, splitTime(param.AUCTION.GUILD_AUCTION_PREVIEW_TIME));
gameData.auctionTime.set(AUCTION_TIME.GUILD_OPEN, splitTime(param.AUCTION.GUILD_AUCTION_OPEN_TIME));
gameData.auctionTime.set(AUCTION_TIME.GUILD_CLOSE, splitTime(param.AUCTION.GUILD_AUCTION_CLOSE_TIME));
gameData.auctionTime.set(AUCTION_TIME.WORLD_PREVIEW, splitTime(param.AUCTION.WORLD_AUCTION_PREVIEW_TIME));
gameData.auctionTime.set(AUCTION_TIME.WORLD_OPEN, splitTime(param.AUCTION.WORLD_AUCTION_OPEN_TIME));
gameData.auctionTime.set(AUCTION_TIME.WORLD_CLOSE, splitTime(param.AUCTION.WORLD_AUCTION_CLOSE_TIME));
}
function splitTime(str: string) {
let arr = str.split(':');
return { hour: parseInt(arr[0]), minute: parseInt(arr[1]), seconds: parseInt(arr[2]) }
}
// 初始加载
function initDatas() {
parseDicParam();
@@ -815,6 +830,7 @@ function parseDicParam() {
getHeroTransPiece();
parseComBtlLvRange();
getCeRatio();
loadAuctionTime();
}
// 加载json