10202 【越南】【香港】【主干】【砍树】聚魂(增加聚魂重置功能;)
| | |
| | | 18 : "装备被动技能",
|
| | | 19 : "炼体技能",
|
| | | 20 : "神通技能",
|
| | | 21 : "精怪技能",
|
| | | 22 : "聚魂技能",
|
| | | }
|
| | |
|
| | | for funcType, skillInfo in skillDict.items():
|
| | |
| | |
|
| | | return
|
| | |
|
| | | def GivePlayerItem(curPlayer, itemID, itemCount, isAuctionItem, packIndexList, event=["", False, {}]):
|
| | | def GivePlayerItem(curPlayer, itemID, itemCount, isAuctionItem, packIndexList=None, event=["", False, {}]):
|
| | | '''给玩家物品
|
| | | @param isAuctionItem: 是否拍品
|
| | | '''
|
| | |
| | | OnGatherTheSoulPuton(curPlayer, soulID)
|
| | | elif OpType == 2:
|
| | | OnGatherTheSoulTakeoff(curPlayer, soulID)
|
| | | elif OpType == 3:
|
| | | OnGatherTheSoulReset(curPlayer, soulID)
|
| | | return
|
| | |
|
| | | def OnGatherTheSoulUp(curPlayer, upSoulID):
|
| | |
| | | RefreshGatherTheSoulAttr(curPlayer, True)
|
| | | return
|
| | |
|
| | | def OnGatherTheSoulReset(curPlayer, soulID):
|
| | | ## 聚魂重置
|
| | | ipyData = IpyGameDataPY.GetIpyGameData("GatherTheSoul", soulID)
|
| | | if not ipyData:
|
| | | return
|
| | | holeNum = ipyData.GetHoleNum()
|
| | | pieceItemID = ipyData.GetPieceItemID()
|
| | | if not pieceItemID:
|
| | | return
|
| | | soulLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_GatherTheSoulLV % soulID)
|
| | | if soulLV <= 1:
|
| | | GameWorld.DebugLog("该聚魂等级不需要重置! soulID=%s,soulLV=%s" % (soulID, soulLV))
|
| | | return
|
| | | |
| | | costMoneyType, costMoneyValue = 0, 0
|
| | | costMoneyInfo = IpyGameDataPY.GetFuncEvalCfg("GatherTheSoulHole", 2)
|
| | | if costMoneyInfo and len(costMoneyInfo) == 2:
|
| | | costMoneyType, costMoneyValue = costMoneyInfo
|
| | | if not PlayerControl.HaveMoney(curPlayer, costMoneyType, costMoneyValue):
|
| | | return
|
| | | |
| | | # 重置保留激活的1级,从2级开始返还所有
|
| | | pieceTotal = 0
|
| | | soulValueTotal = 0
|
| | | for resetLV in range(2, 1 + soulLV):
|
| | | resetIpyData = IpyGameDataPY.GetIpyGameData("GatherTheSoulLV", soulID, resetLV)
|
| | | if not resetIpyData:
|
| | | continue
|
| | | pieceTotal += resetIpyData.GetNeedPiece()
|
| | | soulValueTotal += resetIpyData.GetNeedSoulValue()
|
| | | |
| | | GameWorld.DebugLog("重置聚魂: soulID=%s,soulLV=%s,pieceTotal=%s,soulValueTotal=%s" % (soulID, soulLV, pieceTotal, soulValueTotal))
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_GatherTheSoulLV % soulID, 1) # 重置到1级
|
| | | if costMoneyType and costMoneyValue:
|
| | | PlayerControl.PayMoney(curPlayer, costMoneyType, costMoneyValue, "GatherTheSoulReset", {"soulID":soulID})
|
| | | ItemControler.GivePlayerItem(curPlayer, pieceItemID, pieceTotal, False, event=["GatherTheSoulReset", False, {"soulID":soulID}])
|
| | | PlayerControl.GiveMoney(curPlayer, ShareDefine.TYPE_Price_GatherSoul, soulValueTotal, "GatherTheSoulReset", {"soulID":soulID})
|
| | | |
| | | holeSoulChange = (soulID == curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_GatherTheSoulHoleID % holeNum))
|
| | | Sync_SoulInfo(curPlayer, [soulID])
|
| | | RefreshGatherTheSoulAttr(curPlayer, holeSoulChange)
|
| | | return
|
| | |
|
| | | def GetGatherTheSoulTotalLV(curPlayer):
|
| | | totalSoulLV = 0
|
| | | ipyDataMgr = IpyGameDataPY.IPY_Data()
|