From 06469e3516489bdd51bf7bb11d824e72329a25f3 Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期日, 28 四月 2019 16:12:06 +0800
Subject: [PATCH] 6501 【后端】【2.0】仙盟任务(新增多个任务接口)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipStar.py | 3
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipStone.py | 9 +-
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py | 68 ++++++++++++++++++++++
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py | 13 +---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChEquip.py | 11 +++
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ItemControler.py | 4
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventShell.py | 26 +++++++-
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_GodArea.py | 2
8 files changed, 114 insertions(+), 22 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 9c40386..a150efc 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventShell.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventShell.py
@@ -1878,11 +1878,6 @@
RunQuestEvent(curPlayer, "equipplus", '%s_%s'%(classLV, partPlusLV), Def_RunQuestType_Normal)
return
-def EventRespons_EquipStar(curPlayer):
- #装备总星级变化
- RunQuestEvent(curPlayer, "equipstar", "equipstar", Def_RunQuestType_Normal)
- return
-
def EventRespons_Talk(curPlayer, eventName):
#频道发言
RunQuestEvent(curPlayer, "talk", eventName, Def_RunQuestType_Normal)
@@ -1912,6 +1907,27 @@
#选择五行专精
RunQuestEvent(curPlayer, "elementskill", 'elementskill', Def_RunQuestType_Normal)
return
+
+def EventRespons_EquipStarUp(curPlayer):
+ #装备升星
+ RunQuestEvent(curPlayer, "equipstarup", 'equipstarup', Def_RunQuestType_Normal)
+ return
+
+def EventRespons_InlayStone(curPlayer):
+ #宝石镶嵌
+ RunQuestEvent(curPlayer, "inlaystone", 'inlaystone', Def_RunQuestType_Normal)
+ return
+
+def EventRespons_EquipItem(curPlayer):
+ #穿脱装备
+ RunQuestEvent(curPlayer, "equipitem", 'equipitem', Def_RunQuestType_Normal)
+ return
+
+def EventRespons_SkillUp(curPlayer, FuncType):
+ #升级技能
+ RunQuestEvent(curPlayer, "skillup", FuncType, Def_RunQuestType_Normal)
+ return
+
#---------------------------------------------------------------------
#================================================================================
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipStar.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipStar.py
index 993d160..288c9d5 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipStar.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipStar.py
@@ -24,6 +24,7 @@
import DataRecordPack
import IpyGameDataPY
import GameWorld
+import EventShell
import ChConfig
import ChEquip
#-------------------------------------------------------------------------------------------
@@ -92,7 +93,7 @@
if updPartStar in IpyGameDataPY.GetFuncEvalCfg('EquipPartStarNotify'):
PlayerControl.WorldNotify(0, "StarLevelUp", [curPlayer.GetPlayerName(), curEquip.GetItemTypeID(), updPartStar])
- #EventShell.EventRespons_EquipPlus(curPlayer)
+ EventShell.EventRespons_EquipStarUp(curPlayer)
return
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipStone.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipStone.py
index 521fbce..8717ca8 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipStone.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipStone.py
@@ -30,6 +30,7 @@
import PlayerSuccess
import PlayerWeekParty
import ShareDefine
+import EventShell
#import EquipZhuXian
g_stoneCanPlaceList = [] #可镶嵌的位置
@@ -191,6 +192,8 @@
Sycn_StoneHoleInfo(curPlayer, [equipPackIndex])
#成就
DoStoneSuccess(curPlayer)
+
+ EventShell.EventRespons_InlayStone(curPlayer)
return
def DoStoneSuccess(curPlayer):
@@ -285,12 +288,10 @@
def GetTotalStoneLV(curPlayer):
##宝石总等级
totalStoneLV = 0
+ equipIndexList = GetAllStoneEquipIndexList()
holeIndexList = GetAllEquipPlaceHoleIndex()
gameData = GameWorld.GetGameData()
- playerEquip = curPlayer.GetItemManager().GetPack(IPY_GameWorld.rptEquip)
- for equipIndex in xrange(playerEquip.GetCount()):
- if equipIndex not in ShareDefine.RoleEquipType :
- continue
+ for equipIndex in equipIndexList:
for holeIndex in holeIndexList:
curGemID = GetEquipIndexStoneIDAndIsBand(curPlayer, equipIndex, holeIndex)[0]
if curGemID == 0:
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 52791c5..60deb8e 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
@@ -55,6 +55,7 @@
import PlayerBossReborn
import PlayerFairyCeremony
import PlayerNewFairyCeremony
+import Operate_EquipStone
import PlayerWeekParty
import PlayerFairyDomain
import PlayerActLogin
@@ -7092,6 +7093,56 @@
curMission.SetProperty(key, SkillShell.GetElementSkillCnt(curPlayer))
return
+##设置符合条件的已穿基础装备数量
+# @param curPlayer 玩家实例
+# @param curMission 任务实例
+# @param curActionNode节点信息
+# @return 返回值无意义
+# @remarks <Set_Baseequipcnt key="" classlv="" color="" suite="[suiteID,..]"/>
+def DoType_Set_Baseequipcnt(curPlayer, curMission, curActionNode):
+ classLV = GameWorld.ToIntDef(curActionNode.GetAttribute("classlv"), 0)
+ color = GameWorld.ToIntDef(curActionNode.GetAttribute("color"), 0)
+ suite = curActionNode.GetAttribute("suite")
+ suiteIDList = eval(suite) if suite else []
+
+ haveCnt = __GetBaseequipcnt(curPlayer, classLV, color, suiteIDList)
+
+ key = curActionNode.GetAttribute("key")
+ questID = GameWorld.ToIntDef(curActionNode.GetAttribute("id"), 0)
+ if questID != 0:
+ curMission = curPlayer.FindMission(questID)
+ curMission.SetProperty(key, haveCnt)
+ return
+def __GetBaseequipcnt(curPlayer, classLV, color, suiteIDList):
+ haveCnt = 0
+ equipPack = curPlayer.GetItemManager().GetPack(IPY_GameWorld.rptEquip)
+ for place in ChConfig.EquipPlace_Base:
+ ipyData = IpyGameDataPY.GetIpyGameData('EquipPlaceIndexMap', classLV, place)
+ if not ipyData:
+ break
+ gridIndex = ipyData.GetGridIndex()
+ curEquip = equipPack.GetAt(gridIndex)
+ if not ItemCommon.CheckItemCanUse(curEquip):
+ continue
+ if curEquip.GetItemColor() < color:
+ continue
+ if suiteIDList and curEquip.GetSuiteID() not in suiteIDList:
+ continue
+ haveCnt += 1
+ return haveCnt
+
+##判断符合条件的已穿基础装备数量
+# @param None
+# @return None <Baseequipcnt cnt="cnt" classlv="" color="" suite="[suiteID,..]"/>
+def ConditionType_Baseequipcnt(curPlayer, curMission, curActionNode):
+ totalcnt = GameWorld.ToIntDef(curActionNode.GetAttribute("cnt"), 0)
+ classLV = GameWorld.ToIntDef(curActionNode.GetAttribute("classlv"), 0)
+ color = GameWorld.ToIntDef(curActionNode.GetAttribute("color"), 0)
+ suite = curActionNode.GetAttribute("suite")
+ suiteIDList = eval(suite) if suite else []
+ haveCnt = __GetBaseequipcnt(curPlayer, classLV, color, suiteIDList)
+ return haveCnt >= totalcnt
+
##法宝激活个数
# @param None
# @return None <Mwcnt value="cnt"/>
@@ -7130,7 +7181,22 @@
# @return None <Equiptotalstar value="cnt"/>
def ConditionType_Equiptotalstar(curPlayer, curMission, curActionNode):
totalcnt = GameWorld.ToIntDef(curActionNode.GetAttribute("value"), 0)
- return #ChEquip.GetTotalEquipStars(curPlayer) >= totalcnt
+ return ChEquip.GetTotalEquipStars(curPlayer) >= totalcnt
+
+##装备宝石总等级
+# @param None
+# @return None <Equiptotalstone value="cnt"/>
+def ConditionType_Equiptotalstone(curPlayer, curMission, curActionNode):
+ totalcnt = GameWorld.ToIntDef(curActionNode.GetAttribute("value"), 0)
+ return Operate_EquipStone.GetTotalStoneLV(curPlayer) >= totalcnt
+
+##技能总等级
+# @param None
+# @return None <Totalskilllv value="" funcType=""/>
+def ConditionType_Totalskilllv(curPlayer, curMission, curActionNode):
+ totalcnt = GameWorld.ToIntDef(curActionNode.GetAttribute("value"), 0)
+ funcType = GameWorld.ToIntDef(curActionNode.GetAttribute("funcType"), 0)
+ return SkillShell.GetAllSkillLV(curPlayer, funcType) >= totalcnt
##激活法宝,确认与成就逻辑后使用
# @param None
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_GodArea.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_GodArea.py
index 1a5bb2f..0987690 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_GodArea.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_GodArea.py
@@ -28,6 +28,7 @@
import PlayerActLogin
import EventReport
import time
+import EventShell
Map_FBDict_LastGodAreaCheckTick = 'LastGodAreaCheckTick'
FBPlayerDict_LeaveTick = 'FBPlayerDict_LeaveTick'
@@ -140,6 +141,7 @@
FBCommon.ClearAreaRewardRecord(curPlayer.GetID())
FBCommon.SetHadDelTicket(curPlayer)
FBCommon.AddEnterFBCount(curPlayer, mapID)
+ EventShell.EventRespons_FBEvent(curPlayer, 'godarea')
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_GodArea_Anger, 0)
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_GodArea_LastAddAngerTime, 0)
PlayerControl.FBNotify('ElderGod_SomeIn', [curPlayer.GetName()])
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChEquip.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChEquip.py
index 3b419c2..cca0faa 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChEquip.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ChEquip.py
@@ -1203,6 +1203,17 @@
maxStarLV = ItemCommon.GetItemMaxStar(curEquip)
return min(GetEquipPartStar(curPlayer, equipPackindex), maxStarLV)
+def GetTotalEquipStars(curPlayer):
+ ##获取部位总星数
+ totalStar = 0
+ equipMaxClasslv = IpyGameDataPY.GetFuncCfg('EquipMaxClasslv')
+ for equipPlace in ChConfig.Pack_EquipPart_CanPlusStar.get(IPY_GameWorld.rptEquip, []):
+ for classlv in xrange(1, equipMaxClasslv+1):
+ ipyData = IpyGameDataPY.GetIpyGameData('EquipPlaceIndexMap', classlv, equipPlace)
+ if not ipyData:
+ continue
+ totalStar +=GetEquipPartStar(curPlayer, ipyData.GetGridIndex())
+ return totalStar
## 通知公共部位星数
def NotifyEquipPartStar(curPlayer, index=None):
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ItemControler.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ItemControler.py
index b67f0aa..f1cecf2 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ItemControler.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/ItemControler.py
@@ -842,7 +842,7 @@
PlayerSuccess.DoEquipSuccessLogic(curPlayer)
#换装宝石处理
Operate_EquipStone.DoMoveEquipStone(curPlayer, equipPackIndex)
- EventShell.EventRespons_EquipStar(curPlayer)
+ EventShell.EventRespons_EquipItem(curPlayer)
dataDict = {'dotype':'EquipItem', 'desItemID':desItemID, 'desUserData':desUserData,'srcItemID':srcItemID,'srcUserData':srcUserData}
DataRecordPack.Cache_FightPowerChangeInfo(curPlayer, ChConfig.PowerDownType_EquipChange, dataDict)
@@ -951,7 +951,7 @@
#脱当前外观阶的套装
ChEquip.ChangeEquipfacadeByClassLV(curPlayer, itemClassLV)
- EventShell.EventRespons_EquipStar(curPlayer)
+ EventShell.EventRespons_EquipItem(curPlayer)
dataDict = {'dotype':'UnEquipItem', 'equipID':equipID, 'userData':userData}
DataRecordPack.Cache_FightPowerChangeInfo(curPlayer, ChConfig.PowerDownType_EquipChange, dataDict)
#===============================================================================
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py
index 318083e..8f260a8 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py
@@ -1850,9 +1850,8 @@
#获得技能等级
curSkillLV = curSkill.GetSkillLV()
-
DataRecordPack.DR_LearnORUPSkill(curPlayer, curSkillID, curSkillLV)
-
+ EventShell.EventRespons_SkillUp(curPlayer, curSkill.GetFuncType())
GameWorld.Log("升级技能名 = %s 成功, 当前等级 = %s"%(curSkill.GetSkillName(), curSkill.GetSkillLV()), curPlayer.GetPlayerID())
return True
@@ -3713,19 +3712,15 @@
## 获取技能总等级
# @param curPlayer
# @return allSkillLV:总技能等级
-def GetAllSkillLV(curPlayer):
- successSkillIDList = ReadChConfig.GetEvalChConfig("SuccessSkillIDList")
+def GetAllSkillLV(curPlayer, funcType):
allSkillLV = 0
skillManager = curPlayer.GetSkillManager()
- for i in range(0 , skillManager.GetSkillCount()):
+ for i in xrange(skillManager.GetSkillCount()):
curPlayerSkill = skillManager.GetSkillByIndex(i)
if curPlayerSkill == None:
continue
-
- skillTypeID = curPlayerSkill.GetSkillTypeID()
- if skillTypeID not in successSkillIDList:
+ if curPlayerSkill.GetFuncType() != funcType:
continue
-
skillLV = curPlayerSkill.GetSkillLV()
allSkillLV += skillLV
--
Gitblit v1.8.0