6501 【后端】【2.0】仙盟任务(新增多个任务接口)
| | |
| | | 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)
|
| | |
| | | #选择五行专精
|
| | | 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
|
| | |
|
| | | #---------------------------------------------------------------------
|
| | |
|
| | | #================================================================================
|
| | |
| | | import DataRecordPack
|
| | | import IpyGameDataPY
|
| | | import GameWorld
|
| | | import EventShell
|
| | | import ChConfig
|
| | | import ChEquip
|
| | | #-------------------------------------------------------------------------------------------
|
| | |
| | |
|
| | | if updPartStar in IpyGameDataPY.GetFuncEvalCfg('EquipPartStarNotify'):
|
| | | PlayerControl.WorldNotify(0, "StarLevelUp", [curPlayer.GetPlayerName(), curEquip.GetItemTypeID(), updPartStar])
|
| | | #EventShell.EventRespons_EquipPlus(curPlayer)
|
| | | EventShell.EventRespons_EquipStarUp(curPlayer)
|
| | | return
|
| | |
|
| | |
|
| | |
| | | import PlayerSuccess
|
| | | import PlayerWeekParty
|
| | | import ShareDefine
|
| | | import EventShell
|
| | | #import EquipZhuXian
|
| | |
|
| | | g_stoneCanPlaceList = [] #可镶嵌的位置
|
| | |
| | | Sycn_StoneHoleInfo(curPlayer, [equipPackIndex])
|
| | | #成就
|
| | | DoStoneSuccess(curPlayer)
|
| | | |
| | | EventShell.EventRespons_InlayStone(curPlayer)
|
| | | return
|
| | |
|
| | | def DoStoneSuccess(curPlayer):
|
| | |
| | | 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:
|
| | |
| | | import PlayerBossReborn
|
| | | import PlayerFairyCeremony
|
| | | import PlayerNewFairyCeremony
|
| | | import Operate_EquipStone
|
| | | import PlayerWeekParty
|
| | | import PlayerFairyDomain
|
| | | import PlayerActLogin
|
| | |
| | | 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"/>
|
| | |
| | | # @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
|
| | |
| | | import PlayerActLogin
|
| | | import EventReport
|
| | | import time
|
| | | import EventShell
|
| | |
|
| | | Map_FBDict_LastGodAreaCheckTick = 'LastGodAreaCheckTick'
|
| | | FBPlayerDict_LeaveTick = 'FBPlayerDict_LeaveTick'
|
| | |
| | | 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()])
|
| | |
| | | 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):
|
| | |
| | | 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)
|
| | |
|
| | |
| | | #脱当前外观阶的套装
|
| | | 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)
|
| | | #===============================================================================
|
| | |
| | |
|
| | | #获得技能等级
|
| | | 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
|
| | |
|
| | |
| | | ## 获取技能总等级
|
| | | # @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
|
| | |
|