| | |
| | | WORD NeedEatCount; //升级所需个数(非累计)
|
| | | WORD EatPerCount; //每次培养消耗x个
|
| | | list LVUpCostItemInfo; //突破等级道具ID|个数
|
| | | DWORD ActivateSkillID; //激活技能ID
|
| | | };
|
| | |
|
| | | //神兵表 #tagGodWeapon
|
| | |
| | | import GameWorld
|
| | | import PlayerControl
|
| | | import PlayerLianTi
|
| | | import IpyGameDataPY
|
| | | import SkillCommon
|
| | |
|
| | | #---------------------------------------------------------------------
|
| | | #逻辑实现
|
| | |
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_LianTiLV, lv)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_LianTiEatItemCount, eatItemCount)
|
| | |
|
| | | skillIDList = []
|
| | | ipyDataMgr = IpyGameDataPY.IPY_Data()
|
| | | for index in xrange(ipyDataMgr.GetLianTiCount()):
|
| | | lvupIpyData = ipyDataMgr.GetLianTiByIndex(index)
|
| | | dataLV = lvupIpyData.GetLianTiLV()
|
| | | if dataLV > lv:
|
| | | break
|
| | | activateSkillID = lvupIpyData.GetActivateSkillID()
|
| | | if activateSkillID:
|
| | | skillIDList.append(activateSkillID)
|
| | | |
| | | if skillIDList:
|
| | | SkillCommon.GivePlayerSkillByJobSkill(curPlayer, skillIDList)
|
| | | |
| | | else:
|
| | | return
|
| | |
|
| | |
| | | ("WORD", "NeedEatCount", 0),
|
| | | ("WORD", "EatPerCount", 0),
|
| | | ("list", "LVUpCostItemInfo", 0),
|
| | | ("DWORD", "ActivateSkillID", 0),
|
| | | ),
|
| | |
|
| | | "GodWeapon":(
|
| | |
| | | self.EatItemAttrValue = []
|
| | | self.NeedEatCount = 0
|
| | | self.EatPerCount = 0
|
| | | self.LVUpCostItemInfo = [] |
| | | self.LVUpCostItemInfo = []
|
| | | self.ActivateSkillID = 0 |
| | | return |
| | | |
| | | def GetLianTiLV(self): return self.LianTiLV # 炼体等级
|
| | |
| | | def GetEatItemAttrValue(self): return self.EatItemAttrValue # 每x个培养丹增加属性值,x=UpEatItemPerCount
|
| | | def GetNeedEatCount(self): return self.NeedEatCount # 升级所需个数(非累计)
|
| | | def GetEatPerCount(self): return self.EatPerCount # 每次培养消耗x个
|
| | | def GetLVUpCostItemInfo(self): return self.LVUpCostItemInfo # 突破等级道具ID|个数 |
| | | def GetLVUpCostItemInfo(self): return self.LVUpCostItemInfo # 突破等级道具ID|个数
|
| | | def GetActivateSkillID(self): return self.ActivateSkillID # 激活技能ID |
| | | |
| | | # 神兵表 |
| | | class IPY_GodWeapon(): |
| | |
| | | import NetPackCommon
|
| | | import ItemCommon
|
| | | import ChConfig
|
| | | import SkillCommon
|
| | |
|
| | | def DoLianTiOpen(curPlayer):
|
| | | ## 功能开启
|
| | |
| | | ItemCommon.DelCostItemByBind(curPlayer, costItemIndexList, bindCnt, unBindCnt, costItemCount, ChConfig.ItemDel_LianTi)
|
| | |
|
| | | updEatItemCount = curEatItemCount - needEatCount
|
| | | GameWorld.DebugLog("炼体突破: lianTiLV=%s,curEatItemCount=%s,needEatCount=%s,updEatItemCount=%s,nextLianTiLv=%s" |
| | | % (lianTiLV, curEatItemCount, needEatCount, updEatItemCount, nextLianTiLv))
|
| | | activateSkillID = nextIpyData.GetActivateSkillID()
|
| | | GameWorld.DebugLog("炼体突破: lianTiLV=%s,curEatItemCount=%s,needEatCount=%s,updEatItemCount=%s,nextLianTiLv=%s,activateSkillID=%s" |
| | | % (lianTiLV, curEatItemCount, needEatCount, updEatItemCount, nextLianTiLv, activateSkillID))
|
| | |
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_LianTiLV, nextLianTiLv)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_LianTiEatItemCount, updEatItemCount)
|
| | |
|
| | | if activateSkillID:
|
| | | SkillCommon.GivePlayerSkillByJobSkill(curPlayer, [activateSkillID])
|
| | | |
| | | SyncLianTiInfo(curPlayer)
|
| | | RefreshLianTiAttr(curPlayer)
|
| | | return
|