| | |
| | | continue
|
| | | PlayerControl.CalcAttrDict_Type(attrID, attrValue, allAttrListSkin)
|
| | |
|
| | | #觉醒战力
|
| | | skintype = 1
|
| | | horseID = skinPlusIpyData.GetHorseID()
|
| | | skinData = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_HorsePetSkinData % (skintype, horseID))
|
| | | skinIpyData = IpyGameDataPY.GetIpyGameDataNotLog('HorsePetSkin', skintype, horseID, skinData / 100)
|
| | | if skinIpyData:
|
| | | for attrID, attrValue in skinIpyData.GetAttrInfo().items():
|
| | | PlayerControl.CalcAttrDict_Type(attrID, attrValue, allAttrListSkin)
|
| | | |
| | | # 新培养属性
|
| | | for index in xrange(ipyDataMgr.GetHorseTrainCount()):
|
| | | trainIpyData = ipyDataMgr.GetHorseTrainByIndex(index)
|
| | |
| | | skintype = curPackData.Type
|
| | | horsePetID = curPackData.ID
|
| | | eatItemID = curPackData.EatItemID
|
| | | GameWorld.DebugLog("骑宠觉醒: skintype=%s,horsePetID=%s,eatItemID=%s" % (skintype, horsePetID, eatItemID))
|
| | | if not IpyGameDataPY.GetIpyGameDataByCondition('HorsePetSkin', {'Type':skintype, 'ID':horsePetID}):
|
| | | return
|
| | | # if skintype == 1:
|
| | |
| | | return
|
| | | curEff = curItem.GetEffectByIndex(4)
|
| | | curEffID = curEff.GetEffectID()
|
| | | if curEffID != ChConfig.Def_Effect_HorsePetSkinExp:
|
| | | return
|
| | | addExp = curEff.GetEffectValue(0)
|
| | | if not addExp:
|
| | | if curEffID != ChConfig.Def_Effect_HorsePetSkinExp or not addExp:
|
| | | GameWorld.ErrLog('物品效果5没有配置骑宠觉醒经验效果! eatItemID=%s,curEffID=%s,addExp=%s,needEffID=%s' |
| | | % (eatItemID, curEffID, addExp, ChConfig.Def_Effect_HorsePetSkinExp))
|
| | | return
|
| | | itemPack = curPlayer.GetItemManager().GetPack(IPY_GameWorld.rptItem)
|
| | | hasEnough, itemList = ItemCommon.GetItem_FromPack_ByID(eatItemID, itemPack, 1)
|
| | |
| | | updSkinData = updSkinLV * 100 + updSkinIndex
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_HorsePetSkinData % (skintype, horsePetID), updSkinData)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_HorsePetSkinExp % (skintype, horsePetID), updExp)
|
| | | GameWorld.DebugLog("skinData=%s,curExp=%s,updSkinData=%s,updExp=%s" % (skinData, curExp, updSkinData, updExp))
|
| | | if curSkinIndex != updSkinIndex:
|
| | | __DoHorsePetSkinChange(curPlayer, skintype, horsePetID, updSkinIndex)
|
| | | if updSkinLV != curSkinLV:
|