hxp
2025-06-03 887a4882a958e29923e58805bf552f3f13499693
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
#!/usr/bin/python
# -*- coding: GBK -*-
 
##@package GameDebug
# µ÷ÊÔÐÅÏ¢
#
# @author eggxp
# @date 2010-4-28
# @version 1.1
#
# ÐÞ¸Äʱ¼ä ÐÞ¸ÄÈË ÐÞ¸ÄÄÚÈÝ
# @change: "2010-11-24 09:10" Alee ½Ó¿Ú´íÎó
#
# Ä£¿éÏêϸ˵Ã÷
#
#---------------------------------------------------------------------
"""Version = 2010-11-24 09:10"""
#---------------------------------------------------------------------
import GameWorld
import GameObj
 
#---------------------------------------------------------------------
## Êä³öÍæ¼ÒÐÅÏ¢
#  @param 
#  @return None
#  @remarks º¯ÊýÏêϸ˵Ã÷.
def DumpPlayerInfo():
    GameWorld.Log("----------------PlayerInfo-----------------------")
    GameWorld.Log("----------------PlayerInfo-----------------------")
    GameWorld.Log("PlayerCount = %d"%GameWorld.GetPlayerManager().GetPlayerCount())
    GameWorld.Log("")
    for i in range(0, GameWorld.GetPlayerManager().GetPlayerCount()):
        curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(i)
        GameWorld.Log("PlayerIndex = %d, PlayerID = %d, PlayerHP = %d, PlayerPos = (%d,%d)"%(i,
                            curPlayer.GetPlayerID(), GameObj.GetHP(curPlayer),
                            curPlayer.GetPosX(), curPlayer.GetPosY()))
 
## Êä³önpcÐÅÏ¢
#  @param 
#  @return None
#  @remarks º¯ÊýÏêϸ˵Ã÷.
def DumpNPCInfo():
    GameWorld.Log("----------------NPCInfo-----------------------")
    GameWorld.Log("NPCCount = %d"%GameWorld.GetNPCManager().GetNPCCount())
    GameWorld.Log("")
    for i in range(0, GameWorld.GetNPCManager().GetNPCCount()):
        curNPC = GameWorld.GetNPCManager().GetNPCByIndex(i)
        GameWorld.Log("NPCIndex = %d, NPCID = %d, NPCHP = %d, NPCPos = (%d,%d)"%(i,
                            curNPC.GetNPCID(), GameObj.GetHP(curNPC),
                            curNPC.GetPosX(), curNPC.GetPosY()))
 
## Êä³öµØÍ¼ÎïÆ·ÐÅÏ¢
#  @param 
#  @return None
#  @remarks º¯ÊýÏêϸ˵Ã÷.
def DumpMapItemInfo():
    GameWorld.Log("----------------MapInfo-----------------------")
    GameWorld.Log("MapItemCount = %d"%GameWorld.GetMapItemManager().GetMapItemCount())
    GameWorld.Log("")
    for i in range(0, GameWorld.GetMapItemManager().GetMapItemCount()):
        curMapItem = GameWorld.GetMapItemManager().GetMapItemByIndex(i)
        GameWorld.Log("MapItemIndex = %d, ItemID = %d, NPCPos = (%d,%d)"%(i,
                            curMapItem.GetID(), 
                            curMapItem.GetPosX(), curMapItem.GetPosY()))
 
## Êä³öËùÓÐÐÅÏ¢
#  @param 
#  @return None
#  @remarks º¯ÊýÏêϸ˵Ã÷.
def DumpAll():
    DumpPlayerInfo()
    DumpNPCInfo()
    DumpMapItemInfo()
 
def test():
    return