From f356b16e3fe29364ad7e2710ccc0564d90f03ea4 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期二, 03 二月 2026 21:12:02 +0800
Subject: [PATCH] 468 游戏事件记录服务器-py版本
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerOnline.py | 30 +++++++++++++++++++++++++-----
1 files changed, 25 insertions(+), 5 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerOnline.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerOnline.py
index f1f1396..cd3b221 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerOnline.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerOnline.py
@@ -40,6 +40,8 @@
import time
+g_calcDetail = 0
+
class LineupHero():
## 阵容武将,注意:同一个武将在不同阵容中可能属性不一样
@@ -78,6 +80,10 @@
if not isReload: # 非重读阵容的视为变更
self.isHeroChange = True
reloadEffHeroCard(curPlayer, self) # 更新武将阵容强制重刷生效卡牌
+ return
+
+ def OnSwitch(self):
+ self.isHeroChange = True
return
def IsHeroItemIn(self, itemIndex): return itemIndex in self.heroItemDict
@@ -1081,13 +1087,27 @@
"starTalentValue":starTalentValue, "starTalentPer":starTalentPer, "breakLVValue":breakLVValue, "breakLVPer":breakLVPer,
"awakeTalentValue":awakeTalentValue, "awakeTalentPer":awakeTalentPer,
}
-
+ #testDict = {'lineupHaloPer': 0.1, 'minggeValue': 43685, 'heroLVValue': 836851, 'cardPer': 72.276, 'realmValue': 9878456, 'fetterPer': 0.15, 'horseValue': 5040, 'equipValue': 18381400, 'inheritPer': 1.4, 'lvValue': 53600}
+ #testDict = {'inheritPer': 1, 'minggeValue': 905, 'equipValue': 796}
+ #for k in attrParamDict.keys():
+ # v = testDict.get(k, 0)
+ # exec("%s = %s" % (k, v))
+ # attrParamDict[k] = v
if attrID in ChConfig.BaseAttrIDList:
- attrValue = FormulaControl.Eval("baseAttrFormula", baseAttrFormula, attrParamDict, toInt=False, ndigits=3)
+ attrValue = FormulaControl.Eval("baseAttrFormula", baseAttrFormula, attrParamDict, toInt=False, ndigits=2)
+ #GameWorld.DebugLog(" evalValue=%s,attrValue=%s" % (eval(baseAttrFormula), attrValue))
else:
- attrValue = FormulaControl.Eval("otherAttrFormula", otherAttrFormula, attrParamDict, toInt=False, ndigits=3)
- #GameWorld.DebugLog(" attrID=%s,attrValue=%s,attrParamDict=%s" % (attrID, attrValue, attrParamDict))
-
+ attrValue = FormulaControl.Eval("otherAttrFormula", otherAttrFormula, attrParamDict, toInt=False, ndigits=2)
+ #GameWorld.DebugLog(" evalValue=%s,attrValue=%s" % (eval(otherAttrFormula), attrValue))
+ # 前端对比刷属性明细时需要
+ if g_calcDetail and attrValue > 0:
+ calcParamDict = {}
+ for k, v in attrParamDict.items():
+ if not v or (k == "inheritPer" and v == 1):
+ continue
+ calcParamDict[k] = v
+ GameWorld.DebugLogEx(" heroID=%s,attrID=%s,attrValue=%s,%s", heroID, attrID, attrValue, calcParamDict)
+
attrIpyData = IpyGameDataPY.GetIpyGameData("PlayerAttr", attrID)
attrName = attrIpyData.GetParameter() if attrIpyData else "%s" % attrID
attrRatioName = "%sRatio" % attrName
--
Gitblit v1.8.0