| | |
| | | import EventReport
|
| | | import ChItem
|
| | | import IpyGameDataPY
|
| | | import Operate_EquipStone
|
| | | import Operate_EquipWash
|
| | | import FormulaControl
|
| | | import ChPyNetSendPack
|
| | | import NetPackCommon
|
| | | import PyGameData
|
| | |
| | | return 0
|
| | | keyStr = ChConfig.Def_VPackCnt_Dict[packindex]
|
| | | return IpyGameDataPY.GetFuncCfg(keyStr)
|
| | |
|
| | |
|
| | | ## 杀怪掉落提示
|
| | | # @param curPlayer 当前玩家
|
| | | # @return None
|
| | | def NotifyItemDropByKill(curPlayer, curItem, npcID, notifyMark='', mapID=0):
|
| | | return #吕超说此处屏蔽
|
| | |
|
| | | def CacheNotifyEquipDetailInfo(curPlayer, curEquip):
|
| | | ''' 缓存装备广播信息中的装备明细信息
|
| | | 因为本版本需要的查看的内容相对较多,为了减少全服广播流量消耗,所以先进行缓存,玩家点击查看时再进行查询
|
| | | '''
|
| | | |
| | | guid = curEquip.GetGUID()
|
| | | packType = curEquip.GetItemPlaceType()
|
| | | packIndex = curEquip.GetItemPlaceIndex()
|
| | | if packType != IPY_GameWorld.rptEquip:
|
| | | return guid
|
| | | |
| | | classLV = GetItemClassLV(curEquip)
|
| | | if not classLV:
|
| | | return guid
|
| | | |
| | | itemID = curEquip.GetItemTypeID()
|
| | | #部位星级
|
| | | equipStar = ChEquip.GetEquipPartStarByRank(curPlayer, packIndex, curEquip)
|
| | | |
| | | #部位强化数据
|
| | | plusLV = ChEquip.GetEquipPartPlusLV(curPlayer, packType, packIndex)
|
| | | plusEvolveLV = ChEquip.GetEquipPartPlusEvolveLV(curPlayer, packType, packIndex)
|
| | | |
| | | #部位洗练数据
|
| | | washLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipWashLV % packIndex)
|
| | | washValueList = []
|
| | | for attrNum in xrange(1, Operate_EquipWash.Def_EquipWashMaxAttrCount + 1):
|
| | | value = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipWashValue % (packIndex, attrNum))
|
| | | washValueList.append(value)
|
| | | |
| | | #部位宝石数据
|
| | | stoneIDList = Operate_EquipStone.GetEquipIndexStoneIDList(curPlayer, packIndex)
|
| | | |
| | | #本阶已穿装备ID [[itemID,star], ...]
|
| | | classItems = [] |
| | | ipyDataList = IpyGameDataPY.GetIpyGameDataByCondition('EquipPlaceIndexMap', {'ClassLV':classLV}, True)
|
| | | if ipyDataList:
|
| | | equipPack = curPlayer.GetItemManager().GetPack(packType)
|
| | | for ipyData in ipyDataList:
|
| | | index = ipyData.GetGridIndex()
|
| | | classEquip = equipPack.GetAt(index)
|
| | | if not classEquip or classEquip.IsEmpty():
|
| | | continue
|
| | | equipID = classEquip.GetItemTypeID()
|
| | | star = ChEquip.GetEquipPartStarByRank(curPlayer, index, classEquip)
|
| | | classItems.append([equipID, star])
|
| | | |
| | | cacheInfo = [guid, itemID, equipStar, plusLV, plusEvolveLV, washLV, washValueList, stoneIDList, classItems]
|
| | | cacheInfo = json.dumps(cacheInfo, ensure_ascii=False)
|
| | | GameWorld.GetPlayerManager().GameServer_QueryPlayerResult(0, 0, 0, "NotifyEquipDetailInfo", cacheInfo, len(cacheInfo))
|
| | | return guid
|
| | |
|
| | | ## 使用物品的特殊提示
|
| | | # @param curPlayer 当前玩家
|
| | |
| | | DR_DelItem(curPlayer, packIndex, "VPack_%s" % packIndex if not eventName else eventName, dataDict)
|
| | | ItemControler.Sync_VPackItem_Clear(curPlayer, packIndex, placeList)
|
| | | return
|
| | |
|
| | |
|
| | | ## 获取物品最高强化进化等级
|
| | | # @param itemType: 物品类型
|
| | | # @return 最大星级,0为不可强化
|
| | | def GetItemMaxPlusEvolveLV(curPlayer, equipPackindex, curItem):
|
| | | packType = IPY_GameWorld.rptEquip
|
| | | curPlusLV = ChEquip.GetEquipPartPlusLV(curPlayer, packType, equipPackindex)
|
| | | equipPlace = curItem.GetEquipPlace()
|
| | | ipyData = IpyGameDataPY.InterpolationSearch('EquipPlusEvolve', 'NeedPlusLV', curPlusLV, {'EquipPlace':equipPlace})
|
| | | if not ipyData:
|
| | | return 0
|
| | | return ipyData.GetEvolveLV()
|
| | |
|
| | |
|
| | | ## 获取物品最高星数
|
| | | # @param itemType: 物品类型
|
| | | # @return 最大星级,0为不可强化
|
| | | def GetItemMaxStar(curItem):
|
| | | itemColor = curItem.GetItemColor()
|
| | | maxStarDict = IpyGameDataPY.GetFuncEvalCfg('EquipPartStar', 1)
|
| | | if str(itemColor) not in maxStarDict:
|
| | | return 0
|
| | | classLV = GetItemClassLV(curItem)
|
| | | return maxStarDict[str(itemColor)].get(str(classLV), 0)
|
| | |
|
| | | ## 获取物品阶级或品级
|
| | | def GetItemClassLV(curItem):
|
| | | return curItem.GetLV()
|
| | |
|
| | | def GetWingLV(curItem):
|
| | | ## 获取翅膀代数等级
|
| | | wingLVDict = IpyGameDataPY.GetFuncEvalCfg("WingLV", 1)
|
| | | return wingLVDict.get(str(curItem.GetLV()), 0)
|
| | |
|
| | | ## 装备评分
|
| | | def GetEquipGearScore(curItem):
|