xdh
2019-05-28 ea1b7e5229ebbae2340b5616c796f2a2b00a123f
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/Item_ResetAttrPoint.py
@@ -20,6 +20,7 @@
import IpyGameDataPY
import ItemCommon
import ChConfig
import SkillShell
##批量使用物品
# @param curPlayer: 玩家实例
@@ -30,11 +31,13 @@
def BatchUseItem(curPlayer, curRoleItem, tick, useCnt, exData):
    curEff = curRoleItem.GetEffectByIndex(0)
    effectID = curEff.GetEffectID()
    if effectID not in ChConfig.Def_Effect_ResetAttrPoint:
    if effectID != ChConfig.Def_Effect_ResetAttrPoint:
        return
    resetID = curEff.GetEffectValue(0)
    resetPoint = curEff.GetEffectValue(0) * useCnt
    if not DoResetAttrPoint(curPlayer, resetID, resetPoint):
    if not resetID and exData:
        resetID = exData
    resetPoint = curEff.GetEffectValue(1) * useCnt
    if not DoResetAttrPoint(curPlayer, resetID, resetPoint, curRoleItem.GetItemTypeID()):
        return
    
    #扣除物品
@@ -66,6 +69,8 @@
            realResetPoint = curPoint
        else:
            realResetPoint = min(resetPoint, curPoint)
        if not realResetPoint:
            continue
        resetPointTotal += realResetPoint
        updPoint = max(curPoint - realResetPoint, 0)
        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_AddPointValue % resetID, updPoint)
@@ -75,7 +80,7 @@
    freePoint = curPlayer.GetFreePoint()
    curPlayer.SetFreePoint(freePoint + resetPointTotal)
    ChPlayer.NotifyPlayerBasePoint(curPlayer, resetIDList)
    DataRecordPack.Cache_FightPowerChangeInfo(curPlayer, ChConfig.PowerDownType_ResetPoint, {'resetAttrID':resetID, 'resetPoint':resetPoint})
    DataRecordPack.Cache_FightPowerChangeInfo(curPlayer, ChConfig.PowerDownType_ResetPoint, {'resetIDList':resetIDList, 'resetPointTotal':resetPointTotal})
    
    #刷新人物所有状态
    playerControl = PlayerControl.PlayerControl(curPlayer)