From 74289e90aeda4ddcdb317b6ce33f58222c57cad6 Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期一, 04 十二月 2023 16:56:55 +0800 Subject: [PATCH] 10021 【主干】【港台】新手流程修改(增加灵根及修仙之路相关任务接口) --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 47 insertions(+), 0 deletions(-) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py index 05649d6..7839ffd 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py @@ -7071,6 +7071,53 @@ realmlv = GameWorld.ToIntDef(curActionNode.GetAttribute("value"), 0) return curPlayer.GetOfficialRank() >= realmlv +##境界修仙之路是否已领取 +# @param None +# @return None <Realmxxzlaward taskid="修仙之路任务ID"/> +def ConditionType_Realmxxzlaward(curPlayer, curMission, curActionNode): + taskID = GameWorld.ToIntDef(curActionNode.GetAttribute("taskid"), 0) + awardState = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_RealmXXZLAward) + if awardState&pow(2, taskID): + return True + return False + +##判断已加总灵根点数 +# @param None +# @return None <Linggenaddtotal attrid="灵根ID或0代表全部灵根" value="期望点数"/> +def ConditionType_Linggenaddtotal(curPlayer, curMission, curActionNode): + attrID = GameWorld.ToIntDef(curActionNode.GetAttribute("attrid"), 0) + value = GameWorld.ToIntDef(curActionNode.GetAttribute("value"), 0) + return GetLinggenaddtotal(curPlayer, attrID) >= value + +##设置已加总灵根数 +# @param curPlayer 玩家实例 +# @param curMission 任务实例 +# @param curActionNode节点信息 +# @return 返回值无意义 +# @remarks <Set_Linggenaddtotal key="" attrid="灵根ID或0代表全部灵根" id="可选指定任务ID"/> +def DoType_Set_Linggenaddtotal(curPlayer, curMission, curActionNode): + key = curActionNode.GetAttribute("key") + attrID = GameWorld.ToIntDef(curActionNode.GetAttribute("attrid"), 0) + questID = GameWorld.ToIntDef(curActionNode.GetAttribute("id"), 0) + if questID != 0: + curMission = curPlayer.FindMission(questID) + curMission.SetProperty(key, GetLinggenaddtotal(curPlayer, attrID)) + return + +def GetLinggenaddtotal(curPlayer, attrID): + # 获取已加总灵根点数 + funcDict = {ShareDefine.Def_Effect_Metal:lambda curObj:PlayerControl.GetMetal(curObj), + ShareDefine.Def_Effect_Wood:lambda curObj:PlayerControl.GetWood(curObj), + ShareDefine.Def_Effect_Water:lambda curObj:PlayerControl.GetWater(curObj), + ShareDefine.Def_Effect_Fire:lambda curObj:PlayerControl.GetFire(curObj), + ShareDefine.Def_Effect_Earth:lambda curObj:PlayerControl.GetEarth(curObj), + } + curTotalPoint = 0 + for k, func in funcDict.items(): + if not attrID or attrID == k: + curTotalPoint += func(curPlayer) + return curTotalPoint + ##灵根品级是否达到X级 # @param None # @return None <Linggenqualitylv attrid="灵根ID" value="期望等级"/> -- Gitblit v1.8.0