From cc3b988b52ba3f473862d289ec58e7873e35d713 Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期二, 31 十二月 2024 16:43:06 +0800 Subject: [PATCH] 10334 【越南】【英语】【BT】【砍树】境界修改-服务端 --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetFreePoint.py | 34 +++++++++++++++++++++++++++------- 1 files changed, 27 insertions(+), 7 deletions(-) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetFreePoint.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetFreePoint.py index 7194515..57c637e 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetFreePoint.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetFreePoint.py @@ -15,19 +15,39 @@ import OpenServerCampaign import GameWorld -import Lang +import PlayerControl +import IpyGameDataPY +import ChPlayer +import ChConfig + ## GM命令执行入口 # @param curPlayer 当前玩家 # @param playerList 参数列表 [pointCount] # @return None # @remarks 函数详细说明. -def OnExec(curPlayer,playerList): - if len(playerList) != 1: - #参数不正确 - GameWorld.DebugAnswer(curPlayer, Lang.GBText("参数不正确")) +def OnExec(curPlayer, paramList): + if not paramList: + GameWorld.DebugAnswer(curPlayer, "设置灵根点: SetFreePoint 自由点 [五行加点数]") return - #获取 指定帐号<玩家ID>的未分配点数<未分配点数> - curPlayer.SetFreePoint(playerList[0]) + value = paramList[0] + curPlayer.SetFreePoint(value) + GameWorld.DebugAnswer(curPlayer, "设置自由点: %s" % value) # 更新开服活动灵根数据 OpenServerCampaign.UpdOpenServerCampaignLingGenData(curPlayer) + + if len(paramList) > 1: + setPoint = paramList[1] + vIndex = 0 + setAddPointList = [] + ipyDataMgr = IpyGameDataPY.IPY_Data() + for index in range(ipyDataMgr.GetRolePointCount()): + vIndex += 1 + attrID = ipyDataMgr.GetRolePointByIndex(index).GetAttrID() + setPoint = paramList[vIndex] if len(paramList) > vIndex else setPoint + PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_AddPointValue % attrID, setPoint) + setAddPointList.append(setPoint) + GameWorld.DebugAnswer(curPlayer, "设置五行点: %s" % setAddPointList) + ChPlayer.NotifyPlayerBasePoint(curPlayer) + playerControl = PlayerControl.PlayerControl(curPlayer) + playerControl.RefreshPlayerAttrState() return -- Gitblit v1.8.0