From 11a8ef04dc70453203e1f1ab7b0bceffd6a7774a Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期五, 05 七月 2024 16:35:12 +0800
Subject: [PATCH] 10198 【香港】【越南】【主干】【砍树】【后端】BOSS凭证优化(优化凭证转化: 活动开始后到参与结束都不转化,包含活动开始参与前;)
---
ServerPython/db/PyMongoDataServer/GMToolLogicProcess/Commands/GMT_GetPlayerInfo.py | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/ServerPython/db/PyMongoDataServer/GMToolLogicProcess/Commands/GMT_GetPlayerInfo.py b/ServerPython/db/PyMongoDataServer/GMToolLogicProcess/Commands/GMT_GetPlayerInfo.py
index 0454831..19cf306 100644
--- a/ServerPython/db/PyMongoDataServer/GMToolLogicProcess/Commands/GMT_GetPlayerInfo.py
+++ b/ServerPython/db/PyMongoDataServer/GMToolLogicProcess/Commands/GMT_GetPlayerInfo.py
@@ -101,6 +101,7 @@
# 回复gm
return GMCommon.Def_NoTag, ''
+ roleDict = {}
moneyMinusDict = {}
collection = userdb[UCN_RoleNomalDict]
docs = collection.find({'PlayerID':dbPlayer.PlayerID})
@@ -113,8 +114,10 @@
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:
+ 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, # 账号
@@ -126,13 +129,14 @@
'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':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, # 家族名称
@@ -143,6 +147,11 @@
'Online':0,
}
+ # 需要额外同步的自定义货币
+ CurrencyValueDict = {}
+ for moneyType in [99, 41, 42]:
+ CurrencyValueDict['PlayerCurrency_%s' % moneyType] = roleDict.get("PlayerCurrency_%s" % moneyType, 0)
+ playerInfo.update(CurrencyValueDict)
return GMCommon.Def_Success, playerInfo
--
Gitblit v1.8.0