From 3f51f787b5fa9e9c49ff4bedbf4c390b135ead1f Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 29 四月 2019 15:05:04 +0800
Subject: [PATCH] 6649 【2.0】【后端】查看聊天信息、广播信息和掉落记录里的装备需求
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/ItemCommon.py | 253 ++++++++++++--------------------------------------
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipPlus.py | 4
2 files changed, 66 insertions(+), 191 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipPlus.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipPlus.py
index c112a11..e670e3c 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipPlus.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_EquipPlus.py
@@ -163,7 +163,9 @@
broadCastLVList = IpyGameDataPY.GetFuncEvalCfg("StrengthenLevelBroadCast", 1)
#GameWorld.DebugLog("PlusLVChange index=%s,updPlusLV=%s,broadCastLVList=%s" % (index, updPlusLV, broadCastLVList))
if updPlusLV in broadCastLVList:
- msgParamList = [curPlayer.GetPlayerName()] + ItemCommon.GetNotifySuperItemInfo(curPlayer, curEquip, index) + [updPlusLV]
+ itemID = curEquip.GetItemTypeID()
+ superItemInfo = ItemCommon.GetNotifySuperItemInfo(curPlayer, curEquip, index)
+ msgParamList = [curPlayer.GetPlayerName(), itemID, superItemInfo, updPlusLV]
PlayerControl.WorldNotify(0, "StrengthenCongratulation", msgParamList)
# 成就
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/ItemCommon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/ItemCommon.py
index 16e8b03..2f52e60 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/ItemCommon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/ItemCommon.py
@@ -213,71 +213,6 @@
return msgList
-## 提示超级装备
-# @param curPlayer 当前玩家
-# @param curItem 得到的物品
-# @param notifyType 鉴定1 打造2 升星3 神器升星4 神器唤醒5 宠物装备合成6 丢宝箱装备7
-# @param useItemID 使用的物品id
-# @return None
-# @remarks 函数详细说明.
-def Notify_SuperItem(curPlayer, curItem, notifyType, useItemID=0):
-#===============================================================================
-#Item_Link_Appraisal 鉴定出了一件惊世神装
-#Item_Link_Factory 打造出了一件惊世神装
-#S1 -> playID,S2 -> playname,S3 -> playname,s4 -> itemID,s5 -> start,s6 -> hole,s7-s15 stoneID,s16 -> 五行,
-#s17 -> 灵魂技能ID,s18 -> 当前耐久,s19 -> 最大耐久,s20 -> 绑定,s21 -> MakeID,s22 -> 物品名字
-#===============================================================================
-
-
- #升星及神器
- if notifyType in [3]:
-#===============================================================================
-# #升星的系统提示参数列表
-# roleName = curPlayer.GetName()
-#
-# #S1 -> playID,S2 -> playname,S3 -> playname,
-# msgList = ['%s' % curPlayer.GetID(), '%s' % roleName, '%s' % roleName]
-#
-# # 物品xml参数s4-s55
-# msgList.extend(GetItemXMLMsg(curItem))
-#
-# # GameWorld.Log('升星,msgList = %s, %s'%(len(msgList), msgList))
-# if notifyType == 3:
-# msgList.extend(["%s" % curItem.GetItemStarLV()]) # 升星最后一个参数为星数
-# #普通升星
-# PlayerControl.WorldNotify(0, "Item_Link_UpGrade", msgList)
-#===============================================================================
-
- return
-
-
- #---除升星外的系统提示参数列表---
- msgList = ['%s' % curPlayer.GetID(), '%s' % curPlayer.GetName(), '%s' % curPlayer.GetName(),
- '%s' % curItem.GetItemTypeID(),'%s' % curItem.GetIsBind(), '%s' % curItem.GetItemTypeID()
- ]
- #鉴定
- if notifyType == 1:
- PlayerControl.WorldNotify(0, "Item_Link_Appraisal", msgList)
- #打造
- elif notifyType == 2:
- PlayerControl.WorldNotify(0, "Item_Link_Factory", msgList)
- #宠物装备合成
- elif notifyType == 6:
- PlayerControl.WorldNotify(0, "Pet_liubo_436832", msgList)
- # mu装备全服广播
- elif notifyType == 7:
- # 插入使用的物品名
- if not useItemID:
- return
- msgList.insert(3, '%s' % useItemID)
- msgList.insert(4, '%s' % useItemID)
- itemInfo = GetNotifySuperItemInfo(curPlayer, curItem)
- msgList = msgList[:5] + itemInfo
- PlayerControl.WorldNotify(0, "GeRen_lhs_318691", msgList)
- return
-#---------------------------------------------------------------------
-
-
## 清除按天过期物品
# @param curPlayer 玩家
# @return None
@@ -766,48 +701,6 @@
return 0
keyStr = ChConfig.Def_VPackCnt_Dict[packindex]
return IpyGameDataPY.GetFuncCfg(keyStr)
-#---------------------------------------------------------------------
-## 获得物品信息提示
-# @param curPlayer 当前玩家
-# @param useItemID 使用物品
-# @param singleItem 通知的物品对象
-# @return None
-# @remarks 函数详细说明.
-def NeedNotifyItem(curPlayer, useItemID , singleItem):
- #需要提示的物品列表
- #===========================================================================
- # itemIDDict = ReadChConfig.GetEvalChConfig('need_notify_id_dict')
- # if useItemID not in itemIDDict.keys():
- # return
- #
- # notifyList = itemIDDict.get(useItemID, [])
- #
- # if not notifyList:
- # GameWorld.Log("NeedNotifyItem() need_notify_id_dict.txt error useItemID=%s not data" % (useItemID))
- # return
- #
- # isQualityNotify = notifyList[0] # 卓越是否提示
- # notifyStarLV = notifyList[1] # 通知的强化星级
- # itemIdList = notifyList[2:] # 去除星级通知的,其他的为具体id通知
- #
- # curItemID = singleItem.GetItemTypeID()
- # curItemCount = singleItem.GetCount()
- # # 如果是指定标的物
- # if (curItemID, curItemCount) in itemIdList:
- # PlayerControl.WorldNotify(0, "itemuse_chenxin_0", [curPlayer.GetPlayerName(),
- # useItemID, useItemID, curItemID, curItemID, curItemCount])
- # return
- #
- # # 其他的装备判断
- # itemQuality = singleItem.GetItemQuality()
- # isSuite = singleItem.GetIsSuite()
- # plusLV = singleItem.GetItemStarLV()
- # # 卓越广播,套装广播,星级广播
- # if (isQualityNotify and itemQuality) or isSuite or plusLV >= notifyStarLV:
- # Notify_SuperItem(curPlayer, singleItem, 7, useItemID)
- #===========================================================================
-
- return
## 杀怪掉落提示
@@ -815,93 +708,73 @@
# @return None
def NotifyItemDropByKill(curPlayer, curItem, npcID, notifyMark='', mapID=0):
return #吕超说此处屏蔽
- #需要提示的物品列表
- itemIDDict = ReadChConfig.GetEvalChConfig('need_notify_id_dict')
- notifyList = itemIDDict.get(0, [])
- if not notifyList:
- #GameWorld.Log("NotifyItemDropByKill() need_notify_id_dict.txt error useItemID=0")
- return
-
- playerName = curPlayer.GetPlayerName()
- notifyQuality = notifyList[0] # 需要提示的品质等级
- notifyStarLV = notifyList[1] # 通知的强化星级
- itemIdList = notifyList[2:] # 去除星级通知的,其他的为具体id通知
-
- curItemID = curItem.GetItemTypeID()
- curItemCount = curItem.GetCount()
- mapID = GameWorld.GetMap().GetMapID() if not mapID else mapID
- # 如果是指定标的物
- if (curItemID, curItemCount) in itemIdList:
- itemIDMarkDict = ReadChConfig.GetEvalChConfig('need_notify_id_mark_dict')
- notifyMark = itemIDMarkDict.get(curItemID, "GeRen_admin_272921")
- PlayerControl.WorldNotify(0, notifyMark, [playerName, mapID, npcID, curItemID, curItemID])
- return
-
- # 其他的装备判断
-# itemQuality = curItem.GetItemQuality()
-# isSuite = curItem.GetIsSuite()
-# plusLV = curItem.GetItemStarLV()
-# # 卓越广播,套装广播,星级广播
-# if not ((itemQuality >= notifyQuality) or isSuite or plusLV >= notifyStarLV):
-# return
-
- msgList = ['%s' % playerName,
- '%s' % mapID,
- '%s' % npcID,
- #'%s' % 0,
- ] + GetNotifySuperItemInfo(curPlayer, curItem)
-
- notifyMark = notifyMark if notifyMark else "GeRen_admin_671654"
- PlayerControl.WorldNotify(0, notifyMark , msgList)
- return
-
-def GetNotifySuperItemInfo(curPlayer, curItem, place=None):
+def GetNotifySuperItemInfo(curPlayer, curEquip, place=None):
'''装备提示超链接信息汇总
- <a><Word info=item id=%s0/>|showitem=%s0 isbind=%s1 itemcnt=%s2 stone=%s3 userdata=%s4 place=%s5 equippartsuite=%s6 strengthenlv=%s7 equipwash=%s8 equipitems=%s9</a>
- isbind:是否绑定
- itemcnt:物品数量
- stone:宝石信息 [stoneItemID, ...]
- userdata:传奇属性
- place:装备位
- equippartsuite:套装信息 同查看玩家
- strengthenlv:强化等级
- equipwash:洗练信息 同查看玩家,单部位
- equipitems:各部位物品id [[装备位,物品id] ...]
+ <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, ...]}
'''
- if place == None:
- place = curItem.GetEquipPlace()
+
+ packType = curEquip.GetItemPlaceType()
+ packIndex = curEquip.GetItemPlaceIndex()
+ if packType != IPY_GameWorld.rptEquip:
+ return "{}"
+
+ classLV = GetItemClassLV(curEquip)
+ if not classLV:
+ return "{}"
+
+ packType = IPY_GameWorld.rptEquip
+ itemDict = {}
+ itemDict["ItemID"] = curEquip.GetItemTypeID()
+ userData = curEquip.GetUserData()
+ if userData and userData != "{}":
+ itemDict["UserData"] = userData
- notifyList = [""] * 10
- notifyList[0] = curItem.GetItemTypeID()
- notifyList[1] = curItem.GetIsBind()
- notifyList[2] = curItem.GetCount()
- notifyList[3] = "%s" % Operate_EquipStone.GetEquipIndexStoneIDList(curPlayer, place)
- userData = curItem.GetUserData()
- notifyList[4] = userData if (userData and userData != "{}") else ""
- notifyList[5] = place
- notifyList[6] = ""
- notifyList[7] = ChEquip.GetEquipPartPlusLV(curPlayer, IPY_GameWorld.rptEquip, place)
-
- # 单部位洗练信息
- washLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipWashLV % place) + 1
- valueList = [curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipWashValue % (place, attrNum)) \
- for attrNum in xrange(1, Operate_EquipWash.Def_EquipWashMaxAttrCount + 1)]
- notifyList[8] = "%s" % {"Place":place, "LV":washLV, "Value":valueList}
-
- # 身上所穿装备ID信息
- equipItems = []
- playerEquip = curPlayer.GetItemManager().GetPack(IPY_GameWorld.rptEquip)
- for equipIndex in xrange(playerEquip.GetCount()):
- if equipIndex not in ShareDefine.RoleEquipType :
- continue
- curEquip = playerEquip.GetAt(equipIndex)
- if not curEquip or curEquip.IsEmpty():
- continue
- equipItems.append([curEquip.GetItemPlaceIndex(), curEquip.GetItemTypeID()])
- notifyList[9] = "%s" % equipItems
-
- return notifyList
+ #部位升星数据
+ 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
+
+ #部位宝石数据
+ 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
+ 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()
+ equipStar = ChEquip.GetEquipPartStarByRank(curPlayer, index, classEquip)
+ classItems.append([equipID, equipStar])
+ if classItems:
+ itemDict["Equips"] = classItems
+
+ return json.dumps(itemDict, ensure_ascii=False).replace(" ", "")
+
## 使用物品的特殊提示
# @param curPlayer 当前玩家
--
Gitblit v1.8.0