From d25f856346bbcecf0e44e26d3e0d641ded2bc81e Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期五, 23 九月 2022 14:35:08 +0800
Subject: [PATCH] 9701 【后端】【越南】【BT7】【主干】跨服竞技64位排位赛(支持投注;GM命令支持不指定玩家ID时可全组重新随机匹配; 跨服服务器时间调整通知前端)
---
ServerPython/CoreServerGroup/GameServer/Script/CommFunc.py | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/CommFunc.py b/ServerPython/CoreServerGroup/GameServer/Script/CommFunc.py
index e29d3be..3e65f93 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/CommFunc.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/CommFunc.py
@@ -546,6 +546,7 @@
# @param maxLen 最大长度
# @return
def GetStrCutoff(srcStr, maxLen):
+ import ShareDefine
if len(srcStr) <= maxLen:
return srcStr
tempComment = srcStr[:maxLen]
@@ -558,3 +559,11 @@
return ""
+def RMBToCoin(floatRMB):
+ ''' 元转为分,统一函数,方便修改及搜索
+ @param floatRMB: 单位元,float 类型,支持 RMB 或 美元
+ @return: 转化为分数值
+ '''
+ # 由于float会有不精确的现象出现xxx.9999999的问题,所以这里计算出的结果向上取整
+ return int(math.ceil(floatRMB * 100))
+
--
Gitblit v1.8.0