Skip to content

Commit

Permalink
删除配置引用
Browse files Browse the repository at this point in the history
  • Loading branch information
xiyoo0812 committed Apr 23, 2024
1 parent afa3da1 commit f9d8b0e
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 28 deletions.
Binary file removed deploy/utility.xlsm
Binary file not shown.
5 changes: 5 additions & 0 deletions script/constant.lua
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,11 @@ RobotType.RANDOM = 0 -- 随机账号
RobotType.COMPOSE = 1 -- 组合账号
RobotType.PLAYER = 2 -- 指定账号

--刷新时间
local FlushType = enum("FlushType", 0)
FlushType.DAY = 0 -- 每日0点刷新
FlushType.WEEK = 1 -- 每周一刷新

--Cache错误码
local CacheCode = enum("CacheCode", 0)
CacheCode.CACHE_DB_LOAD_ERR = 10001 -- DB加载失败
Expand Down
22 changes: 0 additions & 22 deletions server/config/utility_cfg.lua

This file was deleted.

3 changes: 1 addition & 2 deletions server/lobby/player/player.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ local store_mgr = quanta.get("store_mgr")
local config_mgr = quanta.get("config_mgr")

local attr_db = config_mgr:init_table("player_attr", "key")
local utility_db = config_mgr:init_table("utility", "key")

local OFFTIMEOUT = quanta.enum("NetwkTime", "OFFLINE_TIMEOUT")
local SECOND_5_MS = quanta.enum("PeriodTime", "SECOND_5_MS")
Expand All @@ -18,7 +17,7 @@ local ONL_INLINE = quanta.enum("OnlineStatus", "INLINE")
local ONL_OFFLINE = quanta.enum("OnlineStatus", "OFFLINE")
local ONL_CLOSE = quanta.enum("OnlineStatus", "CLOSE")

local DAY_FLUSH_S = utility_db:find_integer("value", "flush_day_hour") * 3600
local DAY_FLUSH_S = quanta.enum("FlushType", "DAY") * 3600

local Entity = import("business/entity/entity.lua")
local MsgComponent = import("business/component/msg_component.lua")
Expand Down
6 changes: 2 additions & 4 deletions server/lobby/player/player_mgr.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@ local log_debug = logger.debug

local event_mgr = quanta.get("event_mgr")
local update_mgr = quanta.get("update_mgr")
local config_mgr = quanta.get("config_mgr")
local protobuf_mgr = quanta.get("protobuf_mgr")

local utility_db = config_mgr:init_table("utility", "key")
local DAY_FLUSH = utility_db:find_integer("value", "flush_day_hour")
local WEEK_FLUSH = utility_db:find_integer("value", "flush_week_day")
local DAY_FLUSH = quanta.enum("FlushType", "DAY")
local WEEK_FLUSH = quanta.enum("FlushType", "WEEK")

local SERVER_UPHOLD = protobuf_mgr:error_code("KICK_SERVER_UPHOLD")

Expand Down

0 comments on commit f9d8b0e

Please sign in to comment.