From 89cd5c46258340014d31e4b8c6ee7df0e3b00c2d Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 16 三月 2026 19:51:54 +0800
Subject: [PATCH] 16 卡牌服务端(自动开服相关;A103增加同步开服时间;增加是否允许加入跨服标记,默认否;跨服公会仅在允许跨服时才会加入跨服;优化ServersConfig.json配置,支持后台导出,优化战斗服务器配置;)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/FormulaControl.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/FormulaControl.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/FormulaControl.py
index 0428a46..34f6807 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/FormulaControl.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/FormulaControl.py
@@ -101,6 +101,7 @@
'round': round,
# 类型转换
'int': int,
+ 'long': long,
'float': float,
'bool': bool,
# 数学常数
@@ -111,7 +112,7 @@
try:
# 执行计算
value = eval(compileFormula, safe_env)
- if ndigits > 0:
+ if ndigits > 0 and not isinstance(value, int):
value = round(value, ndigits)
if ceil:
value = math.ceil(value)
--
Gitblit v1.8.0