From 3d0d0fa39bc4e24094de982640720a49f4cf080b Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期六, 22 六月 2019 16:28:34 +0800
Subject: [PATCH] 6603 【后端】【2.0】增加新版的sp和被动技能 - 修复盾值
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py | 164 +++++++++++++++++++++++++++++++++++++++++++++++-------
1 files changed, 141 insertions(+), 23 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 6b0d69c..5847a24 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
@@ -56,6 +56,7 @@
import PlayerFairyCeremony
import PlayerNewFairyCeremony
import Operate_EquipStone
+import OpenServerCampaign
import PlayerWeekParty
import PlayerFairyDomain
import GameFuncComm
@@ -4333,7 +4334,8 @@
value = int(curActionNode.GetAttribute("value"))
curPlayerFreePoint = curPlayer.GetFreePoint()
curPlayer.SetFreePoint(curPlayerFreePoint + value)
-
+ # 更新开服活动灵根数据
+ OpenServerCampaign.UpdOpenServerCampaignLingGenData(curPlayer)
DataRecordPack.DR_Freepoint(curPlayer, "Event", value, {"MissionID":curMission.GetMissionID()})
return
@@ -5965,18 +5967,20 @@
if questID != 0:
curMission = curPlayer.FindMission(questID)
classLV = GameWorld.ToIntDef(curActionNode.GetAttribute("classLV"), 0)
- if not classLV:
- return
+ equipMaxClasslv = IpyGameDataPY.GetFuncCfg('EquipMaxClasslv')
+ classlVList = [classLV] if classLV else range(1, equipMaxClasslv+1)
+
needPlusLV = GameWorld.ToIntDef(curActionNode.GetAttribute("plusLV"), 0)
totalCnt = 0
equipPlaceList = ChConfig.Pack_EquipPart_CanPlusStar[IPY_GameWorld.rptEquip]
for equipPlace in equipPlaceList:
- ipyData = IpyGameDataPY.GetIpyGameData('EquipPlaceIndexMap', classLV, equipPlace)
- if not ipyData:
- continue
- partStarLV = ChEquip.GetEquipPartPlusLV(curPlayer, IPY_GameWorld.rptEquip, ipyData.GetGridIndex())
- if partStarLV >= needPlusLV:
- totalCnt += 1
+ for classLV in classlVList:
+ ipyData = IpyGameDataPY.GetIpyGameData('EquipPlaceIndexMap', classLV, equipPlace)
+ if not ipyData:
+ continue
+ partStarLV = ChEquip.GetEquipPartPlusLV(curPlayer, IPY_GameWorld.rptEquip, ipyData.GetGridIndex())
+ if partStarLV >= needPlusLV:
+ totalCnt += 1
curMission.SetProperty(key, totalCnt)
return
@@ -7078,6 +7082,45 @@
curQualityLV = funcDict[attrID](curPlayer)
return curQualityLV >= qualityLV
+
+##X条灵根品级达到X级
+# @param None
+# @return None <Linggenqualitylvcnt qualitylv="品级" value="条数"/>
+def ConditionType_Linggenqualitylvcnt(curPlayer, curMission, curActionNode):
+ qualityLV = GameWorld.ToIntDef(curActionNode.GetAttribute("qualitylv"), 0)
+ cnt = GameWorld.ToIntDef(curActionNode.GetAttribute("value"), 0)
+ return GetLinggenQualitylvCnt(curPlayer, qualityLV) >= cnt
+
+##设置达到X品灵根数量
+# @param curPlayer 玩家实例
+# @param curMission 任务实例
+# @param curActionNode节点信息
+# @return 返回值无意义
+# @remarks <Set_Linggenqualitylvcnt key="" qualitylv="品级"/>
+def DoType_Set_Linggenqualitylvcnt(curPlayer, curMission, curActionNode):
+ key = curActionNode.GetAttribute("key")
+ questID = GameWorld.ToIntDef(curActionNode.GetAttribute("id"), 0)
+ qualityLV = GameWorld.ToIntDef(curActionNode.GetAttribute("qualitylv"), 0)
+ if questID != 0:
+ curMission = curPlayer.FindMission(questID)
+ curMission.SetProperty(key, GetLinggenQualitylvCnt(curPlayer, qualityLV))
+ return
+
+def GetLinggenQualitylvCnt(curPlayer, qualityLV):
+ # 获取达到X品的灵根数量
+ funcDict = {ShareDefine.Def_Effect_Metal: lambda curObj: PlayerControl.GetMetalQualityLV(curObj),
+ ShareDefine.Def_Effect_Wood: lambda curObj: PlayerControl.GetWoodQualityLV(curObj),
+ ShareDefine.Def_Effect_Water: lambda curObj: PlayerControl.GetWaterQualityLV(curObj),
+ ShareDefine.Def_Effect_Fire: lambda curObj: PlayerControl.GetFireQualityLV(curObj),
+ ShareDefine.Def_Effect_Earth: lambda curObj: PlayerControl.GetEarthQualityLV(curObj),
+ }
+ curCnt = 0
+ for attrID, func in funcDict.items():
+ if func(curPlayer) >= qualityLV:
+ curCnt += 1
+ return curCnt
+
+
##X级通关X层娲皇遗迹
# @param None
# @return None <Passqueenrelecs value="lineID" grade="grade"/>
@@ -7205,18 +7248,18 @@
# @return None <Classlvpluslv classLV="" plusLV="" value="cnt"/>
def ConditionType_Classlvpluslv(curPlayer, curMission, curActionNode):
classLV = GameWorld.ToIntDef(curActionNode.GetAttribute("classLV"), 0)
- if not classLV:
- return
+ classLVList = [classLV] if classLV else xrange(1, IpyGameDataPY.GetFuncCfg('EquipMaxClasslv') + 1)
needPlusLV = GameWorld.ToIntDef(curActionNode.GetAttribute("plusLV"), 0)
totalCnt = 0
equipPlaceList = ChConfig.Pack_EquipPart_CanPlusStar[IPY_GameWorld.rptEquip]
for equipPlace in equipPlaceList:
- ipyData = IpyGameDataPY.GetIpyGameData('EquipPlaceIndexMap', classLV, equipPlace)
- if not ipyData:
- continue
- partStarLV = ChEquip.GetEquipPartPlusLV(curPlayer, IPY_GameWorld.rptEquip, ipyData.GetGridIndex())
- if partStarLV >= needPlusLV:
- totalCnt += 1
+ for classLV in classLVList:
+ ipyData = IpyGameDataPY.GetIpyGameData('EquipPlaceIndexMap', classLV, equipPlace)
+ if not ipyData:
+ continue
+ partStarLV = ChEquip.GetEquipPartPlusLV(curPlayer, IPY_GameWorld.rptEquip, ipyData.GetGridIndex())
+ if partStarLV >= needPlusLV:
+ totalCnt += 1
return totalCnt >= GameWorld.ToIntDef(curActionNode.GetAttribute("value"), 0)
##装备总星级
@@ -7235,10 +7278,10 @@
##已镶嵌X等级宝石数量
# @param None
-# @return None <Equiptotalstone value="cnt" stoneLV=""/>
+# @return None <Equipstonecnt value="cnt" stoneLV=""/>
def ConditionType_Equipstonecnt(curPlayer, curMission, curActionNode):
totalCnt = GameWorld.ToIntDef(curActionNode.GetAttribute("value"), 0)
- stoneLV = GameWorld.ToIntDef(curActionNode.GetAttribute("lv"), 0)
+ stoneLV = GameWorld.ToIntDef(curActionNode.GetAttribute("stoneLV"), 0)
return Operate_EquipStone.GetStoneCntByLV(curPlayer, stoneLV) >= totalCnt
##设置已镶嵌X等级宝石数量
@@ -7246,11 +7289,11 @@
# @param curMission 任务实例
# @param curActionNode节点信息
# @return 返回值无意义
-# @remarks <Set_Equiptotalstone key="" stoneLV="[]"/>
-def DoType_Set_Equiptotalstone(curPlayer, curMission, curActionNode):
+# @remarks <Set_Equipstonecnt key="" stoneLV="宝石等级"/>
+def DoType_Set_Equipstonecnt(curPlayer, curMission, curActionNode):
key = curActionNode.GetAttribute("key")
questID = GameWorld.ToIntDef(curActionNode.GetAttribute("id"), 0)
- stoneLV = GameWorld.ToIntDef(curActionNode.GetAttribute("lv"), 1)
+ stoneLV = GameWorld.ToIntDef(curActionNode.GetAttribute("stoneLV"), 1)
if questID != 0:
curMission = curPlayer.FindMission(questID)
curMission.SetProperty(key, Operate_EquipStone.GetStoneCntByLV(curPlayer, stoneLV))
@@ -7329,4 +7372,79 @@
def ConditionType_Godweaponlv(curPlayer, curMission, curActionNode):
lv = GameWorld.ToIntDef(curActionNode.GetAttribute("value"), 0)
weapontype = GameWorld.ToIntDef(curActionNode.GetAttribute("weapontype"), 0)
- return curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_GodWeaponLV % weapontype) >= lv
\ No newline at end of file
+ return curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_GodWeaponLV % weapontype) >= lv
+
+##设置今日活跃度
+# @param curPlayer 玩家实例
+# @param curMission 任务实例
+# @param curActionNode节点信息
+# @return 返回值无意义
+# @remarks <Set_Dayactivity key=""/>
+def DoType_Set_Dayactivity(curPlayer, curMission, curActionNode):
+ key = curActionNode.GetAttribute("key")
+ questID = GameWorld.ToIntDef(curActionNode.GetAttribute("id"), 0)
+ if questID != 0:
+ curMission = curPlayer.FindMission(questID)
+ curMission.SetProperty(key, curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_Activity_TotalPoint, 0))
+ return
+
+##今日活跃度判断
+# @param None
+# @return None <Check_Dayactivity value="活跃度"/>
+def ConditionType_Check_Dayactivity(curPlayer, curMission, curActionNode):
+ value = GameWorld.ToIntDef(curActionNode.GetAttribute("value"), 0)
+ return curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_Activity_TotalPoint, 0) >= value
+
+
+##设置历史活跃度
+# @param curPlayer 玩家实例
+# @param curMission 任务实例
+# @param curActionNode节点信息
+# @return 返回值无意义
+# @remarks <Set_Historyactivity key=""/>
+def DoType_Set_Historyactivity(curPlayer, curMission, curActionNode):
+ key = curActionNode.GetAttribute("key")
+ questID = GameWorld.ToIntDef(curActionNode.GetAttribute("id"), 0)
+ if questID != 0:
+ curMission = curPlayer.FindMission(questID)
+ curMission.SetProperty(key, curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActivityHistoryPoint, 0))
+ return
+
+##历史活跃度判断
+# @param None
+# @return None <Check_Historyactivity value="活跃度"/>
+def ConditionType_Check_Historyactivity(curPlayer, curMission, curActionNode):
+ value = GameWorld.ToIntDef(curActionNode.GetAttribute("value"), 0)
+ return curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ActivityHistoryPoint, 0) >= value
+
+##设置仙宝寻主领奖进度
+# @param curPlayer 玩家实例
+# @param curMission 任务实例
+# @param curActionNode节点信息
+# @return 返回值无意义
+# @remarks <Set_Xbxz key="" mwid="法宝ID"/>
+def DoType_Set_Xbxz(curPlayer, curMission, curActionNode):
+ key = curActionNode.GetAttribute("key")
+ questID = GameWorld.ToIntDef(curActionNode.GetAttribute("id"), 0)
+ mwID = GameWorld.ToIntDef(curActionNode.GetAttribute("mwid"), 0)
+ if questID != 0:
+ curMission = curPlayer.FindMission(questID)
+ curMission.SetProperty(key, PlayerMagicWeapon.GetXBXZAwardProgress(curPlayer, mwID))
+ return
+
+##仙宝寻主进度判断
+# @param None
+# @return None <Check_Xbxz value="数量" mwid="法宝ID"/>
+def ConditionType_Check_Xbxz(curPlayer, curMission, curActionNode):
+ value = GameWorld.ToIntDef(curActionNode.GetAttribute("value"), 0)
+ mwID = GameWorld.ToIntDef(curActionNode.GetAttribute("mwid"), 0)
+ return PlayerMagicWeapon.GetXBXZAwardProgress(curPlayer, mwID) >= value
+
+##商城表商品购买记录判断(只适用购买次数不重置的)
+# @param None
+# @return None <Check_Buyshopitem value="数量" index="商城表唯一ID"/>
+def ConditionType_Check_Buyshopitem(curPlayer, curMission, curActionNode):
+ value = GameWorld.ToIntDef(curActionNode.GetAttribute("value"), 0)
+ itemIndex = GameWorld.ToIntDef(curActionNode.GetAttribute("index"), 0)
+ curDayBuyCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ShopItemDayBuyCnt % itemIndex)
+ return curDayBuyCnt >= value
\ No newline at end of file
--
Gitblit v1.8.0