From 6cc90041d8b5ecbda9bcde0754ecb7a735a12950 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 19 三月 2024 19:24:32 +0800
Subject: [PATCH] 10138 内存分析(优化py自定配置表数据内存占用及加载方式)
---
ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/GMT_AddPersonalCompensation.py | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/GMT_AddPersonalCompensation.py b/ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/GMT_AddPersonalCompensation.py
index 8309b56..ddb4ada 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/GMT_AddPersonalCompensation.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/GMT_AddPersonalCompensation.py
@@ -29,6 +29,7 @@
import GMCommon
import uuid
import ChConfig
+import ShareDefine
#---------------------------------------------------------------------
@@ -51,6 +52,7 @@
def OnExec(orderId, gmCmdDict):
strMsg = ""
gmCmdDict = ClearEmptyFromDict(gmCmdDict)
+ GameWorld.DebugLog("GMT_AddPersonalCompensation gmCmdDict:%s" % gmCmdDict)
queryType = gmCmdDict.get(GMCommon.Def_GMKey_QueryType, '')
if queryType == GMCommon.Def_GMKey_FamilyID:
sendFamilyIDList = []
@@ -90,6 +92,7 @@
GMCommon.GMCommandResult(orderId, gmCmdDict, GMCommon.Def_InvalidTime)
return
+ MailType = int(gmCmdDict.get('MailType', '0'))
Title = gmCmdDict.get('Title', '')
Text = gmCmdDict.get('Text', '')
GUID = str(uuid.uuid1())
@@ -118,7 +121,7 @@
# GMCommon.GMCommandResult(orderId, gmCmdDict, GMCommon.Def_ParamErr)
# return
PlayerCompensation.AddPersonalItem(GUID, addItemDictList, PlayerIDList,
- LimitTime, "%s<$_$>%s<$_$>%s"%(sender, Title, Text),
+ LimitTime, PlayerCompensation.GetMailText(Title, Text, MailType, sender),
gold, goldPaper, silver, detail=detail)
#执行成功
@@ -137,6 +140,7 @@
if addItemDict['Count'] == 0:
return {}
addItemDict['IsAuctionItem'] = GameWorld.ToIntDef(gmCmdDict.get('IsBind%s'%itemIndexStr, '0'))
+ appointID = GameWorld.ToIntDef(gmCmdDict.get('AppointID%s'%itemIndexStr, '0'))
#添加UserData信息
addItemDict['UserData'] = ''
UserDataDict = {}
@@ -167,6 +171,9 @@
continue
itemUserData[key] = value
+ if appointID:
+ itemUserData[ShareDefine.Def_CItemKey_AppointID] = appointID
+
if itemUserData:
addItemDict['UserData'] = '%s'%itemUserData
--
Gitblit v1.8.0