ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGatherTheSoul.py
@@ -50,6 +50,8 @@
        OnGatherTheSoulPuton(curPlayer, soulID)
    elif OpType == 2:
        OnGatherTheSoulTakeoff(curPlayer, soulID)
    elif OpType == 3:
        OnGatherTheSoulReset(curPlayer, soulID)
    return
def OnGatherTheSoulUp(curPlayer, upSoulID):
@@ -169,6 +171,49 @@
    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()