| #!/usr/bin/python  | 
| # -*- coding: GBK -*-  | 
| #-------------------------------------------------------------------------------  | 
| #  | 
| ##@package GameWorldItem  | 
| #  | 
| # @todo:ÊÀ½çÎïÆ·¹ÜÀí  | 
| # @author hxp  | 
| # @date 2019-05-11  | 
| # @version 1.0  | 
| #  | 
| # ÏêϸÃèÊö: ÊÀ½çÎïÆ·¹ÜÀí  | 
| #  | 
| #-------------------------------------------------------------------------------  | 
| #"""Version = 2019-05-11 10:30"""  | 
| #-------------------------------------------------------------------------------  | 
|   | 
| import GameWorld  | 
| import PlayerControl  | 
| import ChPyNetSendPack  | 
| import NetPackCommon  | 
|   | 
| MaxCacheNotifyEquipCount = 100 # ×î´ó»º´æ¸öÊý  | 
| g_notifyEquipDetailInfoCache = {} # ×°±¸¹ã²¥ÏêϸÐÅÏ¢»º´æ  | 
| g_notifyEquipDetailGUIDList = []  | 
|   | 
| def OnCacheNotifyEquipDetailInfo(cacheInfo, tick):  | 
|     ## ×°±¸¹ã²¥ÏêϸÐÅÏ¢»º´æ  | 
|     global g_notifyEquipDetailGUIDList  | 
|     global g_notifyEquipDetailInfoCache  | 
|       | 
|     guid = cacheInfo[0]  | 
|     if guid in g_notifyEquipDetailGUIDList:  | 
|         g_notifyEquipDetailGUIDList.remove(guid)  | 
|     g_notifyEquipDetailGUIDList.append(guid)  | 
|     g_notifyEquipDetailInfoCache[guid] = cacheInfo[1:]  | 
|       | 
|     if len(g_notifyEquipDetailGUIDList) > MaxCacheNotifyEquipCount:  | 
|         removeGUID = g_notifyEquipDetailGUIDList[0]  | 
|         g_notifyEquipDetailGUIDList.remove(removeGUID)  | 
|         g_notifyEquipDetailInfoCache.pop(removeGUID, None)  | 
|           | 
|     return  | 
|   | 
| #// A9 05 ²éѯ¹ã²¥×°±¸ÏêϸÐÅÏ¢ #tagCGQueryNotifyEquipDetailInfo  | 
| #  | 
| #struct    tagCGQueryNotifyEquipDetailInfo  | 
| #{  | 
| #    tagHead        Head;  | 
| #    char        ItemGUID[40];  | 
| #};  | 
| def OnQueryNotifyEquipDetailInfo(index, clientData, tick):  | 
|     curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)  | 
|     guid = clientData.ItemGUID  | 
|     if guid not in g_notifyEquipDetailInfoCache:  | 
|         PlayerControl.NotifyCode(curPlayer, "CheckEquip")  | 
|         return  | 
|     itemID, equipStar, plusLV, plusEvolveLV, washLV, washValueList, stoneIDList, classItems = g_notifyEquipDetailInfoCache[guid]  | 
|     equipDetail = ChPyNetSendPack.tagGCNotifyEquipDetailInfo()  | 
|     equipDetail.ItemGUID = guid  | 
|     equipDetail.ItemID = itemID  | 
|     equipDetail.Star = equipStar  | 
|     equipDetail.PlusLV = plusLV  | 
|     equipDetail.EvolveLV = plusEvolveLV  | 
|     equipDetail.WashLV = washLV  | 
|     equipDetail.WashValueList = washValueList  | 
|     equipDetail.WashValueCount = len(equipDetail.WashValueList)  | 
|     equipDetail.StoneIDList = stoneIDList  | 
|     equipDetail.StoneIDCount = len(equipDetail.StoneIDList)  | 
|     for classItemID, classStar in classItems:  | 
|         classEquip = ChPyNetSendPack.tagGCNotifyEquipClassEquip()  | 
|         classEquip.ItemID = classItemID  | 
|         classEquip.Star = classStar  | 
|         equipDetail.ClassEquipList.append(classEquip)  | 
|     equipDetail.ClassEquipCount = len(equipDetail.ClassEquipList)  | 
|     NetPackCommon.SendFakePack(curPlayer, equipDetail)  | 
|     return  | 
|   | 
|   |