| #!/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 |