| #!/usr/bin/python  | 
| # -*- coding: GBK -*-  | 
| #---------------------------------------------------------------------  | 
| #  | 
| #---------------------------------------------------------------------  | 
| ##@package PetClear  | 
| # @todo: ·ÅÉúÍæ¼ÒËùÓгèÎï  | 
| #  | 
| # @author: panwei  | 
| # @date 2010-06-22  | 
| # @version 1.1  | 
| # @change: 2010-07-15 16:00 adaws ÐÞ¸´BUG³öÕ½³èÎïûÓÐÕٻأ¬ÔÚC++»á´æÒ»¸ö³öÕ½³èÎïµÄʵÀýµ¼ÖÂʹÓÃGMÃüÁîºó  | 
| # ²»ÄܳöÕ½ÆäËüµÄ³èÎ²¢ÇÒÈç¹û´Ëʱ½ÇÉ«ËÀÍöµÄ»°·þÎñÆ÷»á¹Òµô  | 
| # @note:   | 
| #---------------------------------------------------------------------  | 
| import ShareDefine  | 
| import PetControl  | 
| import PlayerPet  | 
| import PlayerControl  | 
| import ChConfig  | 
| import GameWorld  | 
| #------------------------------------------------------------------------------   | 
| ##·ÅÉúÍæ¼ÒËùÓгèÎï  | 
| # @param curPlayer Íæ¼ÒʵÀý  | 
| # @param cmdList ²ÎÊýÁÐ±í  | 
| # @return ·µ»ØÖµÎÞÒâÒå  | 
| # @remarks ·ÅÉúÍæ¼ÒËùÓгèÎï  | 
| def OnExec(curPlayer, cmdList):  | 
|       | 
|     #---Èç¹ûÓгöÕ½ÖеijèÎïÐèÒªÏÈÕÙ»Ø---  | 
|     PetControl.ReCallFightPet(curPlayer)  | 
|           | 
|     #»ñµÃÍæ¼Ò³èÎïÐÅÏ¢  | 
|     curPetMgr = curPlayer.GetPetMgr()  | 
|     petListCount = curPetMgr.PetList_Cnt()  | 
|   | 
|     #---ForÖÐɾ³ý, Ðè¹¹½¨PythonÁÙʱÁбí---  | 
|     petList = []  | 
|           | 
|     for i in range(0, petListCount):  | 
|         pet = curPetMgr.PetList_At(i)  | 
|         petList.append(pet)  | 
|       | 
|     for rolePet in petList:  | 
|         curPetMgr.PetList_SetFree(rolePet.GetRolePet().PetID)  | 
|       | 
|     # ³èÎïÊý¾ÝÎïÆ·±³°üÇå³ý  | 
|     petPack = curPlayer.GetItemManager().GetPack(ShareDefine.rptPet)  | 
|     for i in range(petPack.GetCount()):  | 
|         petItem = petPack.GetAt(i)  | 
|           | 
|         if not petItem or petItem.IsEmpty():  | 
|             continue  | 
|           | 
|         petItem.Clear()  | 
|       | 
|   | 
|   | 
|     #isOK = GameFuncComm.DoGMOpenFunc(curPlayer, ShareDefine.GameFuncID_Pet)  | 
|     GameWorld.DebugAnswer(curPlayer, "³èÎ﹦ÄÜÊÇ·ñ¿ªÆô!")  | 
|     return  |