129 【战斗】战斗系统-服务端(PrintFightPower命令支持刷属性指定属性明细)
2个文件已修改
18 ■■■■ 已修改文件
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/PrintFightPower.py 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerOnline.py 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/PrintFightPower.py
@@ -33,6 +33,7 @@
    
    olPlayer = PlayerOnline.GetOnlinePlayer(curPlayer)
    if not msgList:
        GameWorld.DebugAnswer(curPlayer, "重刷计算属性: PrintFightPower calc [明细]")
        GameWorld.DebugAnswer(curPlayer, "PrintFightPower [预设方案 专享属性地图ID]")
        GameWorld.DebugAnswer(curPlayer, "主公战力: %s" % PlayerControl.GetFightPower(curPlayer))
        
@@ -61,6 +62,12 @@
            
        return
    
    if msgList[0] == "calc":
        GameWorld.DebugAnswer(curPlayer, "重刷计算属性详见地图日志")
        PlayerOnline.g_calcDetail = msgList[1] if len(msgList) > 1 else 0
        PlayerOnline.GetOnlinePlayer(curPlayer).RefreshRoleAttr()
        return
    batPresetID = msgList[0]
    exclusiveMapID = msgList[1] if len(msgList) > 1 else 0
    batPresetIDList = olPlayer.GetBatPresetIDList()
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerOnline.py
@@ -40,6 +40,8 @@
import time
g_calcDetail = 0
class LineupHero():
    ## 阵容武将,注意:同一个武将在不同阵容中可能属性不一样
    
@@ -1086,8 +1088,13 @@
                attrValue = FormulaControl.Eval("baseAttrFormula", baseAttrFormula, attrParamDict, toInt=False, ndigits=3)
            else:
                attrValue = FormulaControl.Eval("otherAttrFormula", otherAttrFormula, attrParamDict, toInt=False, ndigits=3)
            #GameWorld.DebugLog("    attrID=%s,attrValue=%s,attrParamDict=%s" % (attrID, attrValue, attrParamDict))
            if g_calcDetail and attrValue > 0:
                calcParamDict = {}
                for k, v in attrParamDict.items():
                    if v > 0:
                        calcParamDict[k] = v
                GameWorld.DebugLog("    heroID=%s,attrID=%s,attrValue=%s,attrParamDict=%s" % (heroID, attrID, attrValue, calcParamDict))
            attrIpyData = IpyGameDataPY.GetIpyGameData("PlayerAttr", attrID)
            attrName = attrIpyData.GetParameter() if attrIpyData else "%s" % attrID
            attrRatioName = "%sRatio" % attrName