From 75c16c80bcacd22c5e0bc4c7a77ffca594ad4e2f Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期二, 25 九月 2018 21:16:21 +0800
Subject: [PATCH] 1834 装备分解-服务端防范不分解非装备道具
---
ServerPython/CoreServerGroup/GameServer/Script/GameWorld.py | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GameWorld.py b/ServerPython/CoreServerGroup/GameServer/Script/GameWorld.py
index 4742007..6992c9c 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/GameWorld.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/GameWorld.py
@@ -535,6 +535,19 @@
return tagPlayer.GetRealMapID()
#---------------------------------------------------------------------
+
+def GetOperationActionDateStr(dateInfo, openServerDay):
+ '''获取运营活动对应日期,存数字代表开服天配置,需要转化为对应的日期
+ @param dateInfo: 运营活动表配置的日期信息, 如果是纯数字代表开服天
+ @param openServerDay: 当前开服天
+ '''
+ if not dateInfo.isdigit():
+ return dateInfo
+ actionServerDay = int(dateInfo)
+ curDateTime = datetime.datetime.today()
+ actionDateTime = curDateTime + datetime.timedelta(days=(actionServerDay-openServerDay))
+ return "%d-%d-%d" % (actionDateTime.year, actionDateTime.month, actionDateTime.day)
+
##获得系统时间
# @param 无意义
# @return 系统时间
--
Gitblit v1.8.0