1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
#!/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, '------------------')