| | |
| | | def NotifyItemDropByKill(curPlayer, curItem, npcID, notifyMark='', mapID=0):
|
| | | return #吕超说此处屏蔽
|
| | |
|
| | | def GetNotifySuperItemInfo(curPlayer, curEquip, place=None):
|
| | | '''装备提示超链接信息汇总
|
| | | <a><Word info=item id=%s0/>|showitem=%s0 itemPlus=%s0</a>
|
| | | {"ItemID":物品ID, "UserData":..., "Star":星级, "EvolveLV":进化等级,"PlusLV":强化等级,"Stone":[宝石ID,...], "Wash":{"LV":洗练等级,"Value":[洗练值, ...]}, "Equips":[itemID, itemID, ...]}
|
| | | def CacheNotifyEquipDetailInfo(curPlayer, curEquip):
|
| | | ''' 缓存装备广播信息中的装备明细信息
|
| | | 因为本版本需要的查看的内容相对较多,为了减少全服广播流量消耗,所以先进行缓存,玩家点击查看时再进行查询
|
| | | '''
|
| | |
|
| | | guid = curEquip.GetGUID()
|
| | | packType = curEquip.GetItemPlaceType()
|
| | | packIndex = curEquip.GetItemPlaceIndex()
|
| | | if packType != IPY_GameWorld.rptEquip:
|
| | | return "{}"
|
| | | return guid
|
| | |
|
| | | classLV = GetItemClassLV(curEquip)
|
| | | if not classLV:
|
| | | return "{}"
|
| | | return guid
|
| | |
|
| | | packType = IPY_GameWorld.rptEquip
|
| | | itemDict = {}
|
| | | itemDict["ItemID"] = curEquip.GetItemTypeID()
|
| | | userData = curEquip.GetUserData()
|
| | | if userData and userData != "{}":
|
| | | itemDict["UserData"] = userData
|
| | | |
| | | #部位升星数据
|
| | | itemID = curEquip.GetItemTypeID()
|
| | | #部位星级
|
| | | equipStar = ChEquip.GetEquipPartStarByRank(curPlayer, packIndex, curEquip)
|
| | | if equipStar:
|
| | | itemDict["Star"] = equipStar
|
| | | |
| | | |
| | | #部位强化数据
|
| | | equipPartPlusLV = ChEquip.GetEquipPartPlusLVByRank(curPlayer, packType, packIndex, curEquip)
|
| | | equipPartPlusEvolveLV = ChEquip.GetEquipPartPlusEvolveLVByEquip(curPlayer, packType, packIndex, curEquip)
|
| | | if equipPartPlusLV:
|
| | | itemDict["PlusLV"] = equipPartPlusLV
|
| | | if equipPartPlusEvolveLV:
|
| | | itemDict["EvolveLV"] = equipPartPlusEvolveLV
|
| | | plusLV = ChEquip.GetEquipPartPlusLVByRank(curPlayer, packType, packIndex, curEquip)
|
| | | plusEvolveLV = ChEquip.GetEquipPartPlusEvolveLVByEquip(curPlayer, packType, packIndex, curEquip)
|
| | | |
| | | #部位洗练数据
|
| | | 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)
|
| | | if stoneIDList and stoneIDList.count(0) != len(stoneIDList):
|
| | | itemDict["Stone"] = stoneIDList
|
| | | |
| | | #部位洗练数据
|
| | | washLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipWashLV % packIndex) + 1
|
| | | valueList = []
|
| | | for attrNum in xrange(1, Operate_EquipWash.Def_EquipWashMaxAttrCount + 1):
|
| | | value = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipWashValue % (packIndex, attrNum))
|
| | | valueList.append(value)
|
| | | if valueList and valueList.count(0) != len(valueList):
|
| | | itemDict["Wash"] = {"LV":washLV, "Value":valueList}
|
| | | |
| | | classItems = [] # 本阶已穿装备ID
|
| | | |
| | | #本阶已穿装备ID [[itemID,star], ...]
|
| | | classItems = [] |
| | | ipyDataList = IpyGameDataPY.GetIpyGameDataByCondition('EquipPlaceIndexMap', {'ClassLV':classLV}, True)
|
| | | if ipyDataList:
|
| | | equipPack = curPlayer.GetItemManager().GetPack(packType)
|
| | |
| | | if not classEquip or classEquip.IsEmpty():
|
| | | continue
|
| | | equipID = classEquip.GetItemTypeID()
|
| | | equipStar = ChEquip.GetEquipPartStarByRank(curPlayer, index, classEquip)
|
| | | classItems.append([equipID, equipStar])
|
| | | if classItems:
|
| | | itemDict["Equips"] = classItems
|
| | | |
| | | return json.dumps(itemDict, ensure_ascii=False).replace(" ", "")
|
| | |
|
| | | 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 当前玩家
|
| | |
| | | return itemDict
|
| | |
|
| | | def GetWeightItemListByAlchemyDiffLV(curPlayer, weightList, alchemyDiffLV):
|
| | | ## 根据炼丹等级差异等级过滤权重列表中不满足的物品,返回新的权重列表
|
| | | ''' 根据炼丹等级差异等级过滤权重列表中不满足的物品,返回新的权重列表
|
| | | @param weightList: 物品权重信息列表
|
| | | @param alchemyDiffLV: 是否过滤掉大于X级的炼丹等级物品,0-不过滤,1-过滤且读默认配置,>1-特殊功能指定的过滤等级
|
| | | '''
|
| | | resultWeightList = []
|
| | | if alchemyDiffLV:
|
| | | # 如果有指定大于1的等级则取指定等级,没有的话取默认等级差
|
| | | if alchemyDiffLV == 1:
|
| | | alchemyDiffLV = IpyGameDataPY.GetFuncCfg("AlchemyDiffLV", 1)
|
| | | curAlchemyLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_AlchemyLV)
|
| | | for itemInfo in weightList:
|
| | | itemID = itemInfo[1][0]
|