From 7744cd05d338d9ddb8a97a0a22946bace79fac67 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 22 十月 2024 16:19:31 +0800
Subject: [PATCH] 10284 【后端】 仙宝奇缘新版本-倒贴版本(增加时效代币; 增加终身卡特权;)

---
 ServerPython/db/PyMongoDataServer/GMToolLogicProcess/Commands/GMT_GetPlayerInfo.py |   39 ++++++++++++++++++++++++++++++++++++---
 1 files changed, 36 insertions(+), 3 deletions(-)

diff --git a/ServerPython/db/PyMongoDataServer/GMToolLogicProcess/Commands/GMT_GetPlayerInfo.py b/ServerPython/db/PyMongoDataServer/GMToolLogicProcess/Commands/GMT_GetPlayerInfo.py
index 4c7628f..e8b83cf 100644
--- a/ServerPython/db/PyMongoDataServer/GMToolLogicProcess/Commands/GMT_GetPlayerInfo.py
+++ b/ServerPython/db/PyMongoDataServer/GMToolLogicProcess/Commands/GMT_GetPlayerInfo.py
@@ -90,6 +90,10 @@
     if data == '%s'%GMCommon.Def_GMKey_PlayerName:        
         return GMCommon.Def_DoQueryLogDB, playerAccID
 
+    accountData = DataServerPlayerData.tagDSAccount()
+    accountData.ACCID = playerAccID
+    accountData.adoLoad(userdb[UCN_DSAccount])
+    
     collection = userdb[UCN_DBPlayer]   
     dbPlayer = DataServerPlayerData.tagDBPlayer()
     dbPlayer.IsDeleted = 0
@@ -101,6 +105,24 @@
         # 回复gm
         return GMCommon.Def_NoTag, ''
     
+    roleDict = {}
+    moneyMinusDict = {}
+    collection = userdb[UCN_RoleNomalDict]
+    docs = collection.find({'PlayerID':dbPlayer.PlayerID})
+    if docs.count():
+        obj = DataServerPlayerData.tagRoleNomalDict()
+        doc = list(docs)[0]
+        #有数据
+        if doc.has_key('__PackSave'):
+            for i in xrange(doc['Count']):
+                obj.readRecord(doc['%s'%(i+1)])
+                if obj.DictName.startswith("MoneyMinus_") and obj.DictValue > 0:
+                    moneyMinusDict[int(obj.DictName[len("MoneyMinus_"):])] = -obj.DictValue # 货币负值
+                    if 1 in moneyMinusDict and 2 in moneyMinusDict and 4 in moneyMinusDict:
+                        break
+                if obj.DictValue > 0:
+                    roleDict[obj.DictName] = obj.DictValue
+                
     playerInfo = {
                   'AccID':dbPlayer.AccID,   # 账号
                   'AccState':dbPlayer.AccState,  # 账号状态
@@ -111,23 +133,34 @@
                   'Job':dbPlayer.Job,  # 职业
                   'LV':dbPlayer.LV,  #玩家等级
                   'OfficialRank':dbPlayer.OfficialRank,  #境界
-                  'FightPower':dbPlayer.FightPower,  #战斗力
+                  'FightPower':dbPlayer.FightPowerEx * 100000000 + dbPlayer.FightPower,  #战斗力
                   'VIPLV':dbPlayer.VIPLv,  # vip等级
                   
                   'MapID':dbPlayer.MapID,  #当前地图id
-                  'Gold':dbPlayer.Gold,   # 元宝
-                  'GoldPaper':dbPlayer.GoldPaper,   # 绑钻
+                  'Gold':moneyMinusDict[1] if 1 in moneyMinusDict else dbPlayer.Gold,   # 元宝
+                  'GoldPaper':moneyMinusDict[2] if 2 in moneyMinusDict else dbPlayer.GoldPaper,   # 绑钻
                   'Silver':dbPlayer.Silver,  # 银两
+                  'SilverPaper':moneyMinusDict[4] if 4 in moneyMinusDict else dbPlayer.SilverPaper,   # 神玉
                   
                   'FamilyName':dbPlayer.FamilyName,  # 家族名称
                   
                   'LogoffTime':dbPlayer.LogoffTime, #离线时间
                   'LoginTime':dbPlayer.LoginTime,  # 上线时间
                   'LoginIP':dbPlayer.LoginIP,  #登入IP
+                  'ClientVersion':accountData.ClientVersion,  #客户端版本号
                   
                   'Online':0,
                   }
     
+    # 需要额外同步的自定义货币
+    CurrencyValueDict = {}
+    for moneyType in [99, 98]:
+        if moneyType == 99:
+            moneyValue = dbPlayer.ExAttr11
+        else:
+            moneyValue = roleDict.get("PlayerCurrency_%s" % moneyType, 0)
+        CurrencyValueDict['PlayerCurrency_%s' % moneyType] = moneyValue
+    playerInfo.update(CurrencyValueDict)
     return GMCommon.Def_Success, playerInfo
 
 

--
Gitblit v1.8.0