| | |
| | | import PyGameData
|
| | | import PlayerHorse
|
| | | import BaseAttack
|
| | | import EventShell
|
| | | import NPCCommon
|
| | | import PetControl
|
| | | import QuestCommon
|
| | | import ItemCommon
|
| | | import FBCommon
|
| | |
|
| | |
| | | def OnPassiveSet(index, clientData, tick):
|
| | | #改为都生效,不需要设置
|
| | | return
|
| | | # curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
|
| | | # findSkill = None
|
| | | # if clientData.SkillID != 0:
|
| | | # findSkill = curPlayer.GetSkillManager().FindSkillBySkillID(clientData.SkillID)
|
| | | # if not findSkill:
|
| | | # return
|
| | | # |
| | | # if findSkill.GetFuncType() != ChConfig.Def_SkillFuncType_FbPassiveSkill:
|
| | | # return
|
| | | # |
| | | # holeCnt = IpyGameDataPY.GetFuncCfg('PassSkillEquipLimit', 2)
|
| | | # if clientData.Index >= holeCnt:
|
| | | # # 超出孔数
|
| | | # return
|
| | | # |
| | | # pageCnt = IpyGameDataPY.GetFuncCfg('PassSkillEquipLimit', 3)
|
| | | # if clientData.Page >= pageCnt:
|
| | | # # 超出页数
|
| | | # return
|
| | | # |
| | | # tmpDict = IpyGameDataPY.GetFuncEvalCfg('PassSkillEquipLimit', 1)
|
| | | # # 剩余VIP时间
|
| | | # #haveVipTime = PlayerVip.GetCurVIPTime(curPlayer)
|
| | | # strIndex = str(clientData.Index) |
| | | # if strIndex in tmpDict:
|
| | | # # 判断条件
|
| | | # for key, value in tmpDict[strIndex].items():
|
| | | # if key == "level" and curPlayer.GetLV() < value:
|
| | | # return
|
| | | # if key == "vipLv":
|
| | | # if curPlayer.GetVIPLv() < value:# or haveVipTime <=0:
|
| | | # return
|
| | | # if key == "MountLv":
|
| | | # if PlayerHorse.GetHorseSumLV(curPlayer) < value:
|
| | | # return
|
| | | # |
| | | #
|
| | | # # 多加一种任务判断
|
| | | # if key == "OpenSkillSlots":
|
| | | # # 主线任务完成时会设置标志可进地图标志
|
| | | # mission_1 = QuestCommon.GetCommonMission(curPlayer)
|
| | | # if not mission_1:
|
| | | # return
|
| | | #
|
| | | # if (pow(2, int(strIndex)) & mission_1.GetProperty("OpenSkillSlots")) == 0:
|
| | | # return
|
| | | # |
| | | # PlayerControl.NomalDictSetProperty(curPlayer, |
| | | # ChConfig.Def_PDict_GFPassiveIndex%(clientData.Page, clientData.Index),
|
| | | # clientData.SkillID,
|
| | | # ChConfig.Def_PDictType_GFPassive)
|
| | | # |
| | | # # 通知客户端设置成功
|
| | | # sendPack = ChPyNetSendPack.tagMCPassiveSetAnswer()
|
| | | # sendPack.Page = clientData.Page
|
| | | # sendPack.Index = clientData.Index
|
| | | # sendPack.SkillID = clientData.SkillID
|
| | | # NetPackCommon.SendFakePack(curPlayer, sendPack)
|
| | | # |
| | | # # 刷被动效果和属性
|
| | | # page = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_GFPassivePage, 0, ChConfig.Def_PDictType_GFPassive)
|
| | | # if clientData.Page == page:
|
| | | # GetPassiveEffManager().RegistPassiveEffSet(curPlayer, True)
|
| | | # PlayerControl.PlayerControl(curPlayer).RefreshPlayerAttrState()
|
| | | # |
| | | # EventShell.EventRespons_PassiveSet(curPlayer)
|
| | | # return
|
| | |
|
| | |
|
| | | #===============================================================================
|
| | | # //B4 08 被动技能页选择(功法) # tagCMPassivePage
|