#!/usr/bin/python # -*- coding: GBK -*- #------------------------------------------------------------------------------- # ##@package GM.Commands.Assist # # @todo:ÏÔʾµ±Ç°Ð­ÖúÁбí # @author hxp # @date 2019-12-06 # @version 1.0 # # ÏêϸÃèÊö: ÏÔʾµ±Ç°Ð­ÖúÁбí # #------------------------------------------------------------------------------- #"""Version = 2019-12-06 21:00""" #------------------------------------------------------------------------------- import GameWorld import PyDataManager #--------------------------------------------------------------------- #È«¾Ö±äÁ¿ #--------------------------------------------------------------------- #--------------------------------------------------------------------- #Âß¼­ÊµÏÖ ## Ö´ÐÐÂß¼­ # @param curPlayer µ±Ç°Íæ¼Ò # @param gmList [cmdIndex gmAccID msg] # @return None # @remarks º¯ÊýÏêϸ˵Ã÷. def OnExec(curPlayer, gmList): if not gmList: GameWorld.DebugAnswer(curPlayer, "Çå³ý¸Ðл: Assist t0") isShowThanks = gmList[0] if len(gmList) > 0 else 0 assistMgr = PyDataManager.GetPlayerAssistPyManager() GameWorld.Log("---------- µ±Ç°×ÜЭÖúÌõÊý: %s" % len(assistMgr.allAssistDict)) for assist in assistMgr.allAssistDict.values(): GameWorld.DebugLog("%s" % assist.outputString()) GameWorld.DebugLog("IsSaveDB=%s,FamilyID=%s,ObjID=%s,AssistType=%s,AssistPlayerIDList=%s" % (assist.IsSaveDB, assist.FamilyID, assist.ObjID, assist.AssistType, assist.AssistPlayerIDList)) GameWorld.DebugLog("--- ") GameWorld.DebugLog("--- ") for playerID, assistList in assistMgr.playerAssistDict.items(): GameWorld.DebugLog("Íæ¼ÒЭÖúÁбí: %s, ÌõÊý: %s" % (playerID, len(assistList))) for assist in assistList: GameWorld.DebugLog(" %s" % assist.GUID) GameWorld.DebugLog("--- ") for playerID, assist in assistMgr.playerAssistingDict.items(): GameWorld.DebugLog("Íæ¼ÒЭÖúÖеÄ: %s, %s" % (playerID, assist.GUID)) GameWorld.DebugLog("-----------------------------------------") if not isShowThanks: return assistThanksMgr = PyDataManager.GetPlayerAssistThanksPyManager() if isShowThanks == "t0": assistThanksMgr.allAssistThanksList = [] assistThanksMgr.playerThanksDict = {} assistThanksMgr.assistPlayerThanksDict = {} GameWorld.DebugAnswer(curPlayer, "Çå³ýËùÓÐЭÖú¸Ðл!") GameWorld.Log("---------- δÍê½á×ܸÐлÌõÊý: %s" % len(assistThanksMgr.allAssistThanksList)) for playerID, thanksList in assistThanksMgr.playerThanksDict.items(): GameWorld.DebugLog("--- Íæ¼Òδ·¢Ë͸ÐлÊý: %s, %s" % (playerID, len(thanksList))) for i, thanks in enumerate(thanksList): GameWorld.DebugLog(" %s itemID=%s,map(%s,%s,%s), %s %s" % (i, thanks.ItemID, thanks.MapID, thanks.LineID, thanks.NPCID, thanks.TimeStr, thanks.GUID), thanks.PlayerID) GameWorld.DebugLog(" ThanksState=%s, %s" % (thanks.ThanksState, thanks.AssistPlayerDict), thanks.PlayerID) for playerID, thanksList in assistThanksMgr.assistPlayerThanksDict.items(): GameWorld.DebugLog("--- Íæ¼Òδ½ÓÊÕ¸ÐлÊý: %s, %s" % (playerID, len(thanksList))) for i, thanks in enumerate(thanksList): GameWorld.DebugLog(" %s itemID=%s,map(%s,%s,%s), %s %s" % (i, thanks.ItemID, thanks.MapID, thanks.LineID, thanks.NPCID, thanks.TimeStr, thanks.GUID), thanks.PlayerID) GameWorld.DebugLog(" ThanksState=%s, %s" % (thanks.ThanksState, thanks.AssistPlayerDict), thanks.PlayerID) GameWorld.DebugLog("-----------------------------------------") return