| #!/usr/bin/python  | 
| # -*- coding: GBK -*-  | 
| #  | 
| #  | 
| ##@package GetPlayerPet  | 
| # @todo: »ñµÃÍæ¼ÒËùÓгèÎïID  | 
| #  | 
| # @author chenxuewei  | 
| # @date 2010-06-22  | 
| # @version 1.5  | 
| #  | 
| # @change: "2010-06-26 14:30" chenxuewei Ôö¼Ó¸ÃGMÃüÁîÊä³öÐÅÏ¢  | 
| # @change: "2010-06-28 16:38" panwei Ôö¼Ó¸ÃGMÃüÁîÊä³öÐÅÏ¢  | 
| # @change: "2010-08-04 15:20" panwei ÐÂÔö³èÎïÔªËØÊôÐÔÊä³ö  | 
| # @change: "2010-08-30 17:50" panwei ÐÂÔöÂãÌåÊôÐÔÊä³ö  | 
| # @change: "2012-04-06 12:00" wdb ÐÂÔöÃüÖУ¬ÉÁ±ÜÊä³ö  | 
| #---------------------------------------------------------------------  | 
| """Version = 2012-04-06 12:00"""  | 
| #---------------------------------------------------------------------  | 
| import GameWorld  | 
| ## GMÃüÁîÖ´ÐÐÈë¿Ú  | 
| #  @param curPlayer µ±Ç°Íæ¼Ò  | 
| #  @param list ²ÎÊýÁбí [tagID£¬ExpValue]  | 
| #  @return None  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| def OnExec(curPlayer, list):  | 
|       | 
|     petMgr = curPlayer.GetPetMgr()  | 
|     petCount = petMgr.PetList_Cnt()  | 
|       | 
|     if petCount <= 0:  | 
|         GameWorld.DebugAnswer(curPlayer, 'Íæ¼ÒÎÞ³èÎï')  | 
|         return  | 
|       | 
|     GameWorld.DebugAnswer(curPlayer, 'Íæ¼ÒÒ»¹²ÓÐ%sÖ»³èÎï'%(petCount))  | 
|       | 
|     for i in range(petCount):  | 
|         petObj = petMgr.PetList_At(i)  | 
|           | 
|         if petObj == None:  | 
|             continue  | 
|           | 
|         petStruct = petObj.GetRolePet()  | 
|           | 
|         petID = petStruct.PetID  | 
|         petName = petStruct.Name  | 
|         GameWorld.DebugAnswer(curPlayer, '------------------')  | 
|         GameWorld.DebugAnswer(curPlayer, 'Íæ¼ÒµÚ%sÖ»³èÎïÐÅÏ¢ÈçÏÂ:'%(i + 1))  | 
|           | 
|         GameWorld.DebugAnswer(curPlayer, '³èÎïID = %s,Ãû×Ö = %s, Ç×ÃܶȠ= %s'%(petID, petName, petStruct.Friendliness))  | 
|           | 
|         GameWorld.DebugAnswer(curPlayer, 'Ê£ÓàÊôÐÔµãÊý = %s, ±¾ÈÕѵÁ·´ÎÊý = %s, Ê£ÓàѵÁ·Ê±¼ä = %s, Ô컯µ¤Ê¹ÓôÎÊý = %s'%(  | 
|                                 petObj.GetLeftPoints(), petStruct.DailyTrainCnt,   | 
|                                 petStruct.RemainTrainTime, petStruct.UseCreatorDrugCnt))  | 
|           | 
|           | 
|         GameWorld.DebugAnswer(curPlayer, "ÂãÁ¦Á¿ = %s, ÂãÕæÔª = %s, Âã½î¹Ç = %s, ÂãÌåÖÊ = %s"%(  | 
|                                 petStruct.STR, petStruct.PNE,   | 
|                                 petStruct.PHY, petStruct.CON))  | 
|           | 
|           | 
|         #»ñµÃ³èÎïÕ½¶·½á¹¹Ìå(±ä»¯µÄ) -> tagIPY_PetBattleProp  | 
|         rolePetBattleStruct = petObj.GetBattleProp()  | 
|           | 
|         GameWorld.DebugAnswer(curPlayer, "¼ÓÉÏBuffºó, ×ÜÁ¦Á¿ = %s,×ÜÕæÔª = %s, ×ܽî¹Ç = %s, ×ÜÌåÖÊ = %s"%(  | 
|                                 rolePetBattleStruct.STR, rolePetBattleStruct.PNE,   | 
|                                 rolePetBattleStruct.PHY, rolePetBattleStruct.CON))  | 
|         curHP = petObj.GetHP()  | 
|         curMaxHP = petObj.GetMaxHP()  | 
|           | 
|         curMaxAtk = petObj.GetMaxAtk()  | 
|         curMAtkMax = petObj.GetMAtkMax()  | 
|           | 
|         curDef = petObj.GetDef()  | 
|         curMDef = petObj.GetMDef()  | 
|           | 
|         isSummon = petObj.GetIsSummon()  | 
|           | 
|         curMiss = petObj.GetMiss()  | 
|         curHit = petObj.GetHit()  | 
|           | 
|         GameWorld.DebugAnswer(curPlayer, "ÊÇ·ñ³öÕ½ = %s,ѪÁ¿ = %s,×î´óѪÁ¿ = %s"%(isSummon, curHP, curMaxHP))  | 
|         GameWorld.DebugAnswer(curPlayer, "ÎïÀí¹¥»÷ = %s,½£ÆøÉ˺¦ = %s"%(curMaxAtk, curMAtkMax))  | 
|         GameWorld.DebugAnswer(curPlayer, "ÎïÀí·ÀÓù = %s,½£Æø·ÀÓù = %s"%(curDef, curMDef))  | 
|         GameWorld.DebugAnswer(curPlayer, "ÃüÖР= %s, ÉÁ±Ü = %s"%(curHit, curMiss))  | 
|         #---ÔªËØÊôÐÔ  | 
|         GameWorld.DebugAnswer(curPlayer, "¶¾¹¥%s / ¶¾¿¹%s"%(petObj.GetPoisionAtk(), petObj.GetPoisionDef()))  | 
|         GameWorld.DebugAnswer(curPlayer, "»ð¹¥%s / »ð¿¹%s"%(petObj.GetFireAtk(), petObj.GetFireDef()))  | 
|         GameWorld.DebugAnswer(curPlayer, "±ù¹¥%s / ±ù¿¹%s"%(petObj.GetIceAtk(), petObj.GetIceDef()))  | 
|         GameWorld.DebugAnswer(curPlayer, "À×¹¥%s / À׿¹%s"%(petObj.GetThunderAtk(), petObj.GetThunderDef()))  | 
|         GameWorld.DebugAnswer(curPlayer, "·ç¹¥%s / ·ç·À%s"%(petObj.GetWindAtk(), petObj.GetWindDef()))  | 
|         #---×ÊÖÊ  | 
|         hpTalent = petStruct.HPTalent  | 
|         physicAtkTalent = petStruct.PhysicAtkTalent  | 
|         physicDefTalent = petStruct.PhysicDefTalent  | 
|         magicAtkTalent = petStruct.MagicAtkTalent  | 
|         magicDefTalent = petStruct.MagicDefTalent  | 
|         #ÆÀ·Ö¼Ó³É  | 
|         petGrade = GameWorld.GetGameData().GetPetGradeByGrade(petObj.GetGrade())  | 
|         gradePercent = petGrade.GetIncPercent()  | 
|         #Ç×ÃÜ¼Ó³É  | 
|         petFriendliness = GameWorld.GetGameData().GetPetFriendlinessByFriendliness(petStruct.Friendliness)  | 
|         friendlinessPercent = petFriendliness.GetIncPercent()   | 
|           | 
|         GameWorld.DebugAnswer(curPlayer, "ÆøÑª×ÊÖÊ=%s,¹¥»÷×ÊÖÊ=%s,·ÀÓù×ÊÖÊ=%s,½£Æø×ÊÖÊ=%s,½£·À×ÊÖÊ=%s"%(  | 
|                                     hpTalent, physicAtkTalent, physicDefTalent, magicAtkTalent, magicDefTalent))  | 
|           | 
|         GameWorld.DebugAnswer(curPlayer, 'ÆÀ·Ö¼Ó³É = %s, Ç×Ãܼӳɠ= %s'%(gradePercent, friendlinessPercent))  | 
|         #---¼¼ÄÜ  | 
|         petData = petObj.GetPetData()  | 
|         maxSkillCount = petData.GetMaxSkillCount()  | 
|           | 
|         rolePetSkillManager = petObj.GetSkillManager()  | 
|         learnSkillCount = rolePetSkillManager.GetSkillCount()  | 
|           | 
|         GameWorld.DebugAnswer(curPlayer, "³èÎï×î¶àÓµÓм¼ÄÜ×ÜÊý = %s, µ±Ç°ÓµÓм¼ÄÜÊý = %s"%(  | 
|                                 maxSkillCount, learnSkillCount))  | 
|           | 
|           | 
|         for i in range(0, learnSkillCount):  | 
|             #learnSkill -> IPY_Skill  | 
|             learnSkill = rolePetSkillManager.GetSkillByIndex(i)  | 
|             GameWorld.DebugAnswer(curPlayer, "ÒÑѧ¼¼ÄÜ = %s, ID = %s"%(i + 1, learnSkill.GetSkillID()))  | 
|   | 
|         GameWorld.DebugAnswer(curPlayer, '------------------')  | 
|           | 
|           | 
|           | 
|           |