| | |
| | | continue
|
| | | eatItemID = eatItem.GetItemTypeID()
|
| | | if eatItemID != ItemIDList[i]:
|
| | | GameWorld.Log('时装分解 发的物品ID不对应index=%s eatItemID=%s,ItemIDList[i]=%s'%(index, eatItemID, ItemIDList[i]))
|
| | | GameWorld.Log('时装分解 发的物品ID不对应index=%s eatItemID=%s,ItemIDList[i]=%s'%(index, eatItemID, ItemIDList[i]), playerID)
|
| | | continue
|
| | | itemData = GameWorld.GetGameData().GetItemByTypeID(eatItemID)
|
| | | if not itemData:
|
| | |
| | | addExp += itemCnt * curEff.GetEffectValue(1)
|
| | | ItemCommon.DelItem(curPlayer, eatItem, itemCnt, True, ChConfig.ItemDel_CoatDecompose)
|
| | | if not addExp:
|
| | | GameWorld.Log(' 时装分解, 没有可分解的ItemIDList=%s'%ItemIDList)
|
| | | GameWorld.Log(' 时装分解, 没有可分解的ItemIDList=%s'%ItemIDList, playerID)
|
| | | return
|
| | | totalExp = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ClothesChestEXP) + addExp
|
| | | curChestLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ClothesChestLV)
|
| | |
| | | continue
|
| | | for attrID, attrValue in starAttrDict[str(skinLV)].items():
|
| | | PlayerControl.CalcAttrDict_Type(int(attrID), attrValue, allAttrList)
|
| | | #时装柜属性
|
| | | curChestLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ClothesChestLV)
|
| | | ipyData = IpyGameDataPY.GetIpyGameDataNotLog('CoatChestUp', curChestLV)
|
| | | if ipyData:
|
| | | for attrID, attrValue in ipyData.GetAddAttr().items():
|
| | | PlayerControl.CalcAttrDict_Type(int(attrID), attrValue, allAttrList)
|
| | | |
| | | # 保存计算值
|
| | | PlayerControl.SetCalcAttrListValue(curPlayer, ChConfig.Def_CalcAttrFunc_Coat, allAttrList)
|
| | | return
|
| | |
| | | # @param destIndex 目标索引
|
| | | # @return
|
| | | def SwitchCoat(curPlayer, srcBackpack, desBackPack, srcIndex, destIndex):
|
| | | clothesPlaceList = [ShareDefine.retWeaponSkin, ShareDefine.retClothesSkin, ShareDefine.retWeapon2Skin]
|
| | | clothesPlaceList = [6,7,8]#[ShareDefine.retWeaponSkin, ShareDefine.retClothesSkin, ShareDefine.retWeapon2Skin]
|
| | | if not ((desBackPack == IPY_GameWorld.rptEquip and srcBackpack == ShareDefine.rptTempSwap and destIndex in clothesPlaceList) \
|
| | | or (srcBackpack == IPY_GameWorld.rptEquip and desBackPack == ShareDefine.rptTempSwap and srcIndex in clothesPlaceList)):
|
| | | return False
|
| | |
| | | if isOK:
|
| | | if desBackPack == IPY_GameWorld.rptEquip:
|
| | | packIndex = IPY_GameWorld.rptEquip
|
| | | itemPlace = IPY_GameWorld.retClothesCoat
|
| | | itemPlace = destIndex
|
| | | itemPack = curPlayer.GetItemManager().GetPack(packIndex)
|
| | | curItem = itemPack.GetAt(itemPlace)
|
| | | itemId = curItem.GetItemTypeID()
|
| | |
| | | itemPack = curPlayer.GetItemManager().GetPack(packIndex)
|
| | | curItem = itemPack.GetAt(0)
|
| | | if curItem:
|
| | | curPlayer.Sync_UnEquipItem(curItem.GetItemTypeID(), IPY_GameWorld.retClothesCoat)
|
| | | curPlayer.Sync_UnEquipItem(curItem.GetItemTypeID(), srcIndex)
|
| | | GameWorld.DebugLog("SwitchCoat isOK=%s" % isOK)
|
| | | return True
|
| | |
|