From abf52d9b57227178576ccbc2b0b353515a2874cd Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期二, 21 八月 2018 14:44:09 +0800
Subject: [PATCH] fix:【2728】新增任务接口
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_QueenRelics.py | 1
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py | 61 +++++++++++++++++++++++++++++-
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerHorse.py | 3 +
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventShell.py | 24 ++++++++----
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipSuitCompose.py | 9 ++++
5 files changed, 86 insertions(+), 12 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventShell.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventShell.py
index a52b3f0..69e12cf 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventShell.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventShell.py
@@ -1617,14 +1617,6 @@
RunQuestEvent(curPlayer, "on_buy_mission_sum", buyNum, Def_RunQuestType_RunAll)
return
-## 坐骑升阶
-# @param curPlayer 玩家实例
-# @param eventName
-# @return None
-def EventRespons_OnHorseUp(curPlayer, updClassLV, updStarLV):
- #星级*100+阶级
- RunQuestEvent(curPlayer, "on_horseup", updStarLV*100+updClassLV, Def_RunQuestType_Normal)
- return
## 穿装备触发判断所穿橙装数量
# @param curPlayer 玩家实例
@@ -1816,6 +1808,22 @@
#法宝之魂激活
RunQuestEvent(curPlayer, "mwsoulactive", soulid, Def_RunQuestType_RunAll)
return
+
+def EventRespons_PassQueenRelecs(curPlayer, lineID):
+ #S级通关X层娲皇遗迹
+ RunQuestEvent(curPlayer, "passqueenrelecs", lineID, Def_RunQuestType_Normal)
+ return
+
+def EventRespons_HorseUp(curPlayer, alllv):
+ #坐骑升级
+ RunQuestEvent(curPlayer, "horseup", alllv, Def_RunQuestType_Normal)
+ return
+
+def EventRespons_SuitPlus(curPlayer, cnt):
+ #2阶强化防具套装X件
+ RunQuestEvent(curPlayer, "suitplus", cnt, Def_RunQuestType_Normal)
+ return
+
#---------------------------------------------------------------------
#================================================================================
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipSuitCompose.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipSuitCompose.py
index 1b6281f..2d78662 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipSuitCompose.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipSuitCompose.py
@@ -26,6 +26,7 @@
import PlayerSuccess
import ItemControler
import IpyGameDataPY
+import EventShell
#//A3 17 套装合成#tagCMSuitCompose
@@ -153,7 +154,7 @@
resetSuiteType = clientData.SuiteType
__DoDecomposeSuite(curPlayer, equipPlace, resetSuiteType, 0)
-
+
return
def __DoDecomposeSuite(curPlayer, equipPlace, resetSuiteType, downByEquip=False):
@@ -207,6 +208,8 @@
#先刷装备BUFF 再计算属性
ChEquip.RefreshPlayerEquipAttribute(curPlayer)
PlayerControl.PlayerControl(curPlayer).RefreshPlayerAttrState()
+
+ __DoSuiteSuccess(curPlayer)
return
def CheckEquipSuitReduce(curPlayer, equipIndex):
@@ -235,10 +238,14 @@
def __DoSuiteSuccess(curPlayer):
PlayerSuccess.ResetSuccessByType(curPlayer, ShareDefine.SuccType_EquipSuit)
equipSuitTypeDict = IpyGameDataPY.GetFuncEvalCfg('EquipSuitType')
+ groupCnt = 0 #2阶强化防具套装件数
for groupType, equipIndexList in equipSuitTypeDict.items():
for i in equipIndexList:
suiteInfo = ChEquip.GetSuiteInfoByPlace(curPlayer, i)
for suiteType, lv in suiteInfo.items():
+ if lv >= 2 and groupType == 1 and suiteType == 2:
+ groupCnt +=1
for j in xrange(1,lv+1):
PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_EquipSuit, 1, [j, suiteType, int(groupType)])
+ EventShell.EventRespons_SuitPlus(curPlayer, groupCnt)
return
\ No newline at end of file
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 5962869..60877cc 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
@@ -1921,7 +1921,7 @@
# @param curMission 任务实例
# @param curConditionNode 节点信息
# @return 返回值, 是否判断成功
-# @remarks <Have_Money value="期望值" check="查找对话中的货币" moneytype="货币类型 1元宝2礼券3银两" type="__Eval+替换的名字"/>
+# @remarks <Have_Money value="期望值" check="查找对话中的货币" moneytype="货币类型 1元宝2礼券3银两" type="__Eval+替换的名字" maxItem="需要物品数量" itemID="20410"/>
def ConditionType_Have_Money(curPlayer, curMission, curConditionNode):
#格式<have_money value="" type="" moneytype=""/>
value = curConditionNode.GetAttribute("value")
@@ -1930,6 +1930,13 @@
conditionValue = int(value)
elif check != "":
conditionValue = int(QuestRunnerValue.GetNPCTalkReplaceValue(curPlayer, curMission, check))
+
+ maxItemCnt = GameWorld.ToIntDef(curConditionNode.GetAttribute("maxItem"), 0)
+ itemID = GameWorld.ToIntDef(curConditionNode.GetAttribute("itemID"), 0)
+ if maxItemCnt and itemID: #未收集的道具个数乘以单价
+ haveCnt = ItemControler.FindPlayerItemCountByItemID(curPlayer, IPY_GameWorld.rptItem, itemID)
+ conditionValue = max(0, maxItemCnt-haveCnt)*value
+
conditionType = curConditionNode.GetAttribute("type")
moneyType = int(curConditionNode.GetAttribute("moneytype"))
goldValue = curPlayer.GetGold()
@@ -3655,7 +3662,7 @@
# @param curMission 任务实例
# @param curActionNode节点信息
# @return 返回值无意义
-# @remarks <Del_Money form_value="是否取对话的值" value="form_value为空取" moneytype="1元宝2礼券3银两" />
+# @remarks <Del_Money form_value="是否取对话的值" value="form_value为空取" moneytype="1元宝2礼券3银两" maxItem="需要物品数量" itemID="20410"/>
def DoType_Del_Money(curPlayer, curMission, curActionNode):
#扣钱
#格式<del_money form_value = ""value="" moneytype=""/>
@@ -3665,6 +3672,12 @@
value = int(QuestRunnerValue.GetNPCTalkReplaceValue(curPlayer, curMission, form_value))
else:
value = int(curActionNode.GetAttribute("value"))
+
+ maxItemCnt = GameWorld.ToIntDef(curActionNode.GetAttribute("maxItem"), 0)
+ itemID = GameWorld.ToIntDef(curActionNode.GetAttribute("itemID"), 0)
+ if maxItemCnt and itemID: #未收集的道具个数乘以单价
+ haveCnt = ItemControler.FindPlayerItemCountByItemID(curPlayer, IPY_GameWorld.rptItem, itemID)
+ value = max(0, maxItemCnt-haveCnt)*value
moneytype = int(curActionNode.GetAttribute("moneytype"))
@@ -6011,6 +6024,17 @@
key = curActionNode.GetAttribute("key")
curMission.SetProperty(key, PlayerMagicWeapon.GetMWActiveCntTotal(curPlayer))
return
+
+##设置坐骑总等级
+# @param curPlayer 玩家实例
+# @param curMission 任务实例
+# @param curActionNode节点信息
+# @return 返回值无意义
+# @remarks <Set_Horsetotallv key="" />
+def DoType_Set_Horsetotallv(curPlayer, curMission, curActionNode):
+ key = curActionNode.GetAttribute("key")
+ curMission.SetProperty(key, PlayerHorse.GetHorseSumLV(curPlayer))
+ return
#---------------------------------------------------------------------
##DoType_调度器
# @param curPlayer 玩家实例
@@ -7105,6 +7129,39 @@
soulID = GameWorld.ToIntDef(curActionNode.GetAttribute("value"), 0)
return bool(PlayerMagicWeapon.GetIsActiveMWSoul(curPlayer, soulID))
+##S级通关X层娲皇遗迹
+# @param None
+# @return None <Passqueenrelecs value="lineID"/>
+def ConditionType_Passqueenrelecs(curPlayer, curMission, curActionNode):
+ lineID = GameWorld.ToIntDef(curActionNode.GetAttribute("value"), 0)
+ grade = GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_Player_Dict_PlayerFBStar_MapId, lineID, False, [ChConfig.Def_FBMapID_QueenRelics])
+ maxGrade = len(FBCommon.GetFBLineGrade(ChConfig.Def_FBMapID_QueenRelics, lineID))
+ return grade >=maxGrade
+
+##坐骑总等级
+# @param None
+# @return None <Horsetotallv value="lv"/>
+def ConditionType_Horsetotallv(curPlayer, curMission, curActionNode):
+ totallv = GameWorld.ToIntDef(curActionNode.GetAttribute("value"), 0)
+ return PlayerHorse.GetHorseSumLV(curPlayer) >= totallv
+
+##2阶强化防具套装件数
+# @param None
+# @return None <Mwsoul value="id"/>
+def ConditionType_SuitPlus(curPlayer, curMission, curActionNode):
+ needCnt = GameWorld.ToIntDef(curActionNode.GetAttribute("value"), 0)
+
+ equipSuitTypeDict = IpyGameDataPY.GetFuncEvalCfg('EquipSuitType')
+ groupCnt = 0 #2阶强化防具套装件数
+ for groupType, equipIndexList in equipSuitTypeDict.items():
+ for i in equipIndexList:
+ suiteInfo = ChEquip.GetSuiteInfoByPlace(curPlayer, i)
+ for suiteType, lv in suiteInfo.items():
+ if lv >= 2 and groupType == 1 and suiteType == 2:
+ groupCnt +=1
+ return groupCnt >= needCnt
+
+
##激活法宝,确认与成就逻辑后使用
# @param None
# @return None <Active_Magicweapon id="法宝ID"/>
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_QueenRelics.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_QueenRelics.py
index cace376..add73a0 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_QueenRelics.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_QueenRelics.py
@@ -501,6 +501,7 @@
#成就
if grade >= maxGrade:
PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_QueenRelics, 1, [lineID+1])
+ EventShell.EventRespons_PassQueenRelecs(curPlayer, lineID)
#任务
EventShell.EventRespons_FBEvent(curPlayer, "queenrelics_pass")
FBCommon.NotifyFBOver(curPlayer, dataMapID, lineID, isPass, overDict)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerHorse.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerHorse.py
index 83dde4e..def8e8e 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerHorse.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerHorse.py
@@ -642,7 +642,7 @@
PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_HorseAllLV, 1, [horseID, updClassLV])
EventShell.EventRespons_HorseLV(curPlayer, updClassLV)
-
+ EventShell.EventRespons_HorseUp(curPlayer)
addLV = updClassLV - horseLV
if addLV:
@@ -683,6 +683,7 @@
#EventReport.WriteEvent_custom_mission_log(curPlayer, ChConfig.CME_Class_Horse, ChConfig.CME_Log_End, 1, cmeInfoEx=str(updateClassLV))
sumLV = GetHorseSumLV(curPlayer)
PlayerMagicWeapon.SetMWPrivilegeData(curPlayer, ChConfig.MWPrivilege_Horse, sumLV)
+
# 刷属性,更新排行榜
RefreshHorseAttr(curPlayer)
# 玩家马匹进阶
--
Gitblit v1.8.0