From 5a5967cf491cd6ddac4a1cc5f9b9ead029212f18 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 21 十二月 2020 18:21:54 +0800
Subject: [PATCH] 8655 【GM工具】【主干】【BT】个人邮件管理,支持删除;

---
 ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerCompensation.py |   45 ++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 44 insertions(+), 1 deletions(-)

diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerCompensation.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerCompensation.py
index 0df9819..876684c 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerCompensation.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerCompensation.py
@@ -207,8 +207,51 @@
     limitLVType = (mailInfo - checkState * 1000000) / 100000
     return checkState, limitLVType, limitLV
 
+def QueryCompensationPersonalInfo(playerID):
+    '''个人补偿邮件查询
+    '''
+        
+    retList = []
+    compensationMgr = GameWorld.GetCompensationMgr()
+    
+    tempSign = "<MailTemplate>"
+    tempSignEnd = "</MailTemplate>"
+    curPersonalCount = compensationMgr.GetPersonalCompensationCount(playerID)
+    GameWorld.DebugLog("QueryCompensationPersonalInfo %s" % curPersonalCount)
+    for i in xrange(curPersonalCount):
+        compensation = compensationMgr.PersonalCompensationAt(playerID, i)
+        
+        contentList = compensation.Text.split("<$_$>")
+        if len(contentList) != 3:
+            continue
+        sender, title, content = contentList
+        
+        if tempSign in content and tempSignEnd in content:
+            title = content[content.index(tempSign) + len(tempSign):content.index(tempSignEnd)]
+            content = ""
+            
+        GUID = compensation.GUID
+        itemList = []
+        curGUIDItemCount = compensationMgr.FindItemCount(GUID)
+        for i in xrange(curGUIDItemCount):
+            curItem = compensationMgr.FindItemAt(GUID, i)
+            itemID = curItem.ItemID
+            if not itemID:
+                continue
+            itemList.append([itemID, curItem.Count, curItem.IsBind, curItem.UserData])
+            
+        recState = compensationMgr.FindPlayerRecState(playerID, GUID)
+        
+        infoDict = {"GUID":GUID, "Gold":compensation.Gold, "GoldPaper":compensation.GoldPaper, "Silver":compensation.Silver,
+                    "Sender":sender, "Title":title, "Content":content, "RecState":recState,
+                    "CreateTime":compensation.CreateTime, "LimitTime":compensation.LimitTime, "ItemList":itemList}
+        
+        retList.append(infoDict)
+        
+    return retList
+
 def QueryCompensationInfo(fromDate, toDate, guid, searchTitle, searchContent, searchState=None, maxCount=10):
-    '''补偿邮件查询
+    '''全服补偿邮件查询
     '''
     
     compensationMgr = GameWorld.GetCompensationMgr()

--
Gitblit v1.8.0