| | |
| | | #
|
| | | ##@package Event.EventSrc.Operate_EquipPlus
|
| | | #
|
| | | # @todo:部位星级公共模式强化
|
| | | # @todo:部位强化公共模式强化
|
| | | # @author hxp
|
| | | # @date 2015-12-15
|
| | | # @version 1.2
|
| | | #
|
| | | # 详细描述: 部位星级公共模式强化
|
| | | # 详细描述: 部位强化公共模式强化
|
| | | #
|
| | | # @change: "2016-06-30 21:30" hxp 强化达人开服活动
|
| | | # @change: "2016-10-08 18:00" hxp 自动购买物品价格统一取商城物品价格
|
| | |
| | | GameWorld.DebugLog("OnEquipMayaPlus() equip is empty")
|
| | | return
|
| | |
|
| | | maxStarLV = ItemCommon.GetItemMaxStarLV(curEquip)
|
| | | curPartStarLV = ChEquip.GetEquipPartStarLV(curPlayer, packType, index)
|
| | | maxStarLV = ItemCommon.GetItemMaxPlusLV(curEquip)
|
| | | curPartStarLV = ChEquip.GetEquipPartPlusLV(curPlayer, packType, index)
|
| | | if curPartStarLV >= maxStarLV:
|
| | | GameWorld.Log("OnEquipMayaPlus:curPartStarLV(%s) >= maxStarLV(%s)" % (curPartStarLV, maxStarLV), playerID)
|
| | | return
|
| | |
| | | # 强化处理
|
| | | result = DoLogic_EquipMayaPlus(curPlayer, curEquip, packType, index)
|
| | |
|
| | | updPartStarLV = ChEquip.GetEquipPartStarLV(curPlayer, packType, index)
|
| | | updPartStarLV = ChEquip.GetEquipPartPlusLV(curPlayer, packType, index)
|
| | | #GameWorld.Log(" result=%s,curStarLV=%s,updStarLV=%s" % (result, curPartStarLV, updPartStarLV), playerID)
|
| | | if result == ChConfig.Def_ComposeState_None:
|
| | | return
|
| | |
| | | #===========================================================================
|
| | |
|
| | |
|
| | | # 星级变更时处理
|
| | | # 强化变更时处理
|
| | | if curPartStarLV != updPartStarLV:
|
| | | DoLogic_OnEquipPartStarLVChange(curPlayer, packType)
|
| | | # 增加强化成就
|
| | |
| | | if findType == -1:
|
| | | return result
|
| | |
|
| | | curPartStarLV = ChEquip.GetEquipPartStarLV(curPlayer, packType, index)
|
| | | curPartStarLV = ChEquip.GetEquipPartPlusLV(curPlayer, packType, index)
|
| | | ipyData = IpyGameDataPY.GetIpyGameData("ItemPlus", findType, curPartStarLV)
|
| | | if not ipyData:
|
| | | return
|
| | |
| | | curExp = curExp - totalExp
|
| | |
|
| | | ChEquip.SetEquipPartProficiency(curPlayer, packType, index, curExp)
|
| | | ChEquip.NotifyEquipPartStarLV(curPlayer, packType, index)
|
| | | ChEquip.NotifyEquipPartPlusLV(curPlayer, packType, index)
|
| | | # 支付金币
|
| | | PlayerControl.PayMoney(curPlayer, IPY_GameWorld.TYPE_Price_Silver_Money, costSilver, isNotify=False)
|
| | |
|
| | |
| | | # @param packType: 背包类型
|
| | | # @param curEquip: 当前装备
|
| | | # @param succeedRate: 成功率
|
| | | # @param failStarLV: 失败时的星级数
|
| | | # @param failStarLV: 失败时的强化数
|
| | | # @return
|
| | | def __EquipMayaPlusChange(curPlayer, packType, curEquip, index):
|
| | | curPlusLV = ChEquip.GetEquipPartStarLV(curPlayer, packType, index)
|
| | | curPlusLV = ChEquip.GetEquipPartPlusLV(curPlayer, packType, index)
|
| | | updPlusLV = curPlusLV + 1
|
| | | ChEquip.SetEquipPartStarLV(curPlayer, packType, index, curEquip, updPlusLV)
|
| | | ChEquip.SetEquipPartPlusLV(curPlayer, packType, index, curEquip, updPlusLV)
|
| | |
|
| | | broadCastLVList = IpyGameDataPY.GetFuncEvalCfg("StrengthenLevelBroadCast", 1)
|
| | | #GameWorld.DebugLog("PlusLVChange index=%s,updPlusLV=%s,broadCastLVList=%s" % (index, updPlusLV, broadCastLVList))
|
| | |
| | | # minPlusLV = GetMaxEquipPartStarLV()
|
| | | # equipPartIndexList = ChConfig.Pack_EquipPart_CanPlusStar.get(packType, [])
|
| | | # for i in equipPartIndexList:
|
| | | # partStarLV = ChEquip.GetEquipPartStarLV(curPlayer, packType, i)
|
| | | # partStarLV = ChEquip.GetEquipPartPlusLV(curPlayer, packType, i)
|
| | | # if partStarLV < minPlusLV:
|
| | | # minPlusLV = partStarLV
|
| | | # return minPlusLV
|