|  |  | 
 |  |  | #    小心, 小心, 小心, 小心, 小心
 | 
 |  |  | #    eggxp
 | 
 |  |  | #===============================================================================
 | 
 |  |  |     def __PutItemInVPack(self, packIndex, tagItem, event):
 | 
 |  |  |     def PutItemInVPack(self, packIndex, tagItem, event=["", False, {}]):
 | 
 |  |  |         # 虚拟背包, 默认不做叠加
 | 
 |  |  |         curPlayer = self.__Player
 | 
 |  |  |         canPutInCnt = 1
 | 
 |  |  | 
 |  |  |             Sync_VPackItem_Refresh(curPlayer, packIndex, refreshPlaceList)
 | 
 |  |  | 
 | 
 |  |  |         if tagItem and not tagItem.IsEmpty():
 | 
 |  |  |             tagItem.Clear()
 | 
 |  |  |             #tagItem.Clear()
 | 
 |  |  |             return False
 | 
 |  |  |         return True
 | 
 |  |  |     
 | 
 |  |  | 
 |  |  |         
 | 
 |  |  |         # 虚拟背包, 默认不做叠加
 | 
 |  |  |         if packIndex in ShareDefine.Def_VPack_TypeList:
 | 
 |  |  |             return self.__PutItemInVPack(packIndex, tagItem, event)
 | 
 |  |  |             return self.PutItemInVPack(packIndex, tagItem, event)
 | 
 |  |  |         
 | 
 |  |  |         eventName, isForceEvent, addDict = event
 | 
 |  |  | 
 | 
 |  |  | 
 |  |  |     #curItemGUID = curItem.GetGUID()
 | 
 |  |  |     curItemCount = curItem.GetCount()
 | 
 |  |  |     curItemIsBind = curItem.GetIsBind()
 | 
 |  |  |     toPackIndex = ChConfig.GetItemPackType(curItem.GetType(), toPackIndex)
 | 
 |  |  |      | 
 |  |  |     # 常规物品转移到虚拟符印背包
 | 
 |  |  |     if toPackIndex == ShareDefine.rptRune:
 | 
 |  |  |         if not ItemCommon.CheckPackHasSpace(curPlayer, toPackIndex, True):
 | 
 |  |  |             return False
 | 
 |  |  |         return itemControl.PutItemInVPack(toPackIndex, curItem)
 | 
 |  |  |      | 
 |  |  |     checkRet, putIndex = itemControl.CanPutInItemEx(toPackIndex, curItemTypeID, curItemCount, curItemIsBind)
 | 
 |  |  |     if not checkRet:
 | 
 |  |  |         return False
 | 
 |  |  | 
 |  |  |     itemList = []   # 非装备普通物品
 | 
 |  |  |     equipGSGreaterList = [] # 属于本职业的高评分装备
 | 
 |  |  |     equipGSLesserList = []  # 低评分装备和非本职业
 | 
 |  |  |     runeItemList = []   # 符印
 | 
 |  |  |      | 
 |  |  |     #EquipGSTypeForSort
 | 
 |  |  |     equipPack = curPlayer.GetItemManager().GetPack(IPY_GameWorld.rptEquip)
 | 
 |  |  |     #组合列表
 | 
 |  |  | 
 |  |  |                 equipGS = 1
 | 
 |  |  |                 cmpEquipGS = 2
 | 
 |  |  |                 
 | 
 |  |  |             if equipGS == 0:
 | 
 |  |  |             if tmpItem.GetType() in [ChConfig.Def_ItemType_Rune, ChConfig.Def_ItemType_RuneExp]:
 | 
 |  |  |                 runeItemList.append(tmpItem)
 | 
 |  |  |             elif equipGS == 0:
 | 
 |  |  |                 itemList.append(tmpItem)
 | 
 |  |  |             elif equipGS > cmpEquipGS:
 | 
 |  |  |                 equipGSGreaterList.append(tmpItem)
 | 
 |  |  | 
 |  |  |     equipGSGreaterList.sort(__CmpRolePack)
 | 
 |  |  |     itemList.sort(__CmpRolePack)
 | 
 |  |  |     equipGSLesserList.sort(__CmpRolePack)
 | 
 |  |  | 
 | 
 |  |  |     runeItemList.sort(__CmpRolePack)
 | 
 |  |  |      | 
 |  |  |     #===========================================================================
 | 
 |  |  |     # GameWorld.DebugLog("equipGSGreaterList")
 | 
 |  |  |     # for item in equipGSGreaterList:
 | 
 |  |  | 
 |  |  |     for item in equipGSLesserList:
 | 
 |  |  |         curPack.GetAt(putPlace).AssignItem(item, False)
 | 
 |  |  |         putPlace += 1
 | 
 |  |  |          | 
 |  |  |     for item in runeItemList:
 | 
 |  |  |         curPack.GetAt(putPlace).AssignItem(item, False)
 | 
 |  |  |         putPlace += 1
 | 
 |  |  |          | 
 |  |  |     return
 | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  | 
 |  |  |     itemClassLV = ItemCommon.GetItemClassLV(curItem)
 | 
 |  |  |     itemQuality = curItem.GetItemQuality()
 | 
 |  |  |     key = (itemColor, itemQuality)
 | 
 |  |  |     isDogzEquip = ItemCommon.GetIsDogzEquip(curItem)
 | 
 |  |  |     # {(颜色,星级):[一般属性条数, 追求属性条数, 固定属性条数], ...}
 | 
 |  |  |     legAttrCntDict = IpyGameDataPY.GetFuncEvalCfg("LegendAttrCount")
 | 
 |  |  |     if isDogzEquip:
 | 
 |  |  |         #神兽装备条数不一样
 | 
 |  |  |         legAttrCntDict = IpyGameDataPY.GetFuncEvalCfg("LegendAttrCount", 2)
 | 
 |  |  |     else:
 | 
 |  |  |         legAttrCntDict = IpyGameDataPY.GetFuncEvalCfg("LegendAttrCount")
 | 
 |  |  |     if key not in legAttrCntDict:
 | 
 |  |  |         #GameWorld.DebugLog("该装备品质没有传奇属性: itemColor=%s,itemQuality=%s" % (itemColor, itemQuality))
 | 
 |  |  |         return
 | 
 |  |  | 
 |  |  |     curLegAttrIDList = []
 | 
 |  |  |     curLegAttrValueList = []
 | 
 |  |  |     # {属性ID:{颜色:数值, ...}, ...}
 | 
 |  |  |     legAttrValueColorDict = IpyGameDataPY.GetFuncEvalCfg("LegendAttrValueByColor")
 | 
 |  |  |     if isDogzEquip:
 | 
 |  |  |         # 神兽装备数值不一样  | 
 |  |  |         legAttrValueColorDict = IpyGameDataPY.GetFuncEvalCfg("LegendAttrValueByColor2")
 | 
 |  |  |     else:
 | 
 |  |  |         legAttrValueColorDict = IpyGameDataPY.GetFuncEvalCfg("LegendAttrValueByColor")
 | 
 |  |  |     legAttrValueClassLVDict = IpyGameDataPY.GetFuncEvalCfg("LegendAttrValueByClassLV")
 | 
 |  |  |     for attrID in randAttrIDList:
 | 
 |  |  |         if attrID in legAttrValueColorDict:
 |