hxp
2024-11-25 878fef04122d1feaa0f42c429f364659931bc379
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
#!/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