| #!/usr/bin/python  | 
| # -*- coding: GBK -*-  | 
| #-------------------------------------------------------------------------------  | 
| #  | 
| ##@package Player.RemoteQuery.GY_Query_AuctionHouseGiveItem  | 
| #  | 
| # @todo:ÅÄÂôÐÐÖ±½Ó¸øÍæ¼ÒÎïÆ·  | 
| # @author hxp  | 
| # @date 2019-10-29  | 
| # @version 1.0  | 
| #  | 
| # ÏêϸÃèÊö: ÅÄÂôÐÐÖ±½Ó¸øÍæ¼ÒÎïÆ·  | 
| #  | 
| #-------------------------------------------------------------------------------  | 
| #"""Version = 2019-10-29 19:00"""  | 
| #-------------------------------------------------------------------------------  | 
|   | 
| import GameWorld  | 
| import ItemCommon  | 
| import ItemControler  | 
| import IPY_GameWorld  | 
| import PlayerControl  | 
| import EventShell  | 
| import ChConfig  | 
|   | 
|   | 
| ## ÇëÇóÂß¼  | 
| #  @param query_Type ÇëÇóÀàÐÍ  | 
| #  @param query_ID ÇëÇóµÄÍæ¼ÒID  | 
| #  @param packCMDList ·¢°üÃüÁî [ ]  | 
| #  @param tick µ±Ç°Ê±¼ä  | 
| #  @return resultDisc  | 
| def DoLogic(query_Type, query_ID, packCMDList, tick):  | 
|     return  | 
|       | 
| #---------------------------------------------------------------------  | 
| ## Ö´Ðнá¹û  | 
| #  @param curPlayer ·¢³öÇëÇóµÄÍæ¼Ò  | 
| #  @param callFunName ¹¦ÄÜÃû³Æ  | 
| #  @param funResult ²éѯµÄ½á¹û  | 
| #  @param tick µ±Ç°Ê±¼ä  | 
| #  @return None  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| def DoResult(curPlayer, callFunName, funResult, tick):  | 
|     playerID = curPlayer.GetPlayerID()  | 
|     try:  | 
|         funResultList = eval(funResult)  | 
|     except:  | 
|         GameWorld.ErrLog("GY_Query_AuctionHouseGiveItem %s eval Error" % funResult, playerID)  | 
|         return  | 
|       | 
|     GameWorld.DebugLog("GY_Query_AuctionHouseGiveItem ResultList=%s" % funResult, playerID)  | 
|     itemGUID, itemID, itemCount, userData, mailInfo = funResultList  | 
|     curCreateItem = ItemCommon.CreateSingleItem(itemID, itemCount)  | 
|     if not curCreateItem:  | 
|         GameWorld.ErrLog("GY_Query_AuctionHouseGiveItem %s CreateSingleItem Error" % funResult, playerID)  | 
|         return  | 
|       | 
|     if userData:  | 
|         curCreateItem.SetUserData(userData, len(userData))  | 
|         ItemCommon.MakeEquipGS(curCreateItem)  | 
|           | 
|     if ItemCommon.CheckItemIsEquip(curCreateItem):  | 
|         EventShell.EventRespons_BuyAuctionEquip(curPlayer, curCreateItem.GetItemColor())  | 
|           | 
|     drDict = {"ItemGUID":itemGUID, "ItemID":itemID, "ItemCount":itemCount, "UserData":userData}  | 
|     isOK = ItemControler.DoLogic_PutItemInPack(curPlayer, curCreateItem, event=[ChConfig.ItemGive_BourseItem, True, drDict],   | 
|                                                packIndexList=[IPY_GameWorld.rptItem])  | 
|     if not isOK:  | 
|         mailTypeKey, addItemList, paramList, detail = mailInfo  | 
|         PlayerControl.SendMailByKey(mailTypeKey, [playerID], addItemList, paramList, detail=detail)  | 
|         PlayerControl.NotifyCode(curPlayer, "PaimaiGiveItemMail")  | 
|     else:  | 
|         PlayerControl.NotifyCode(curPlayer, "PaimaiGiveItemOK")  | 
|                   | 
|     return  | 
|   | 
|   | 
|   |