hxp
2025-12-12 9686b06e1a3c883f14ecb4e5dd44a4e4c8456ed3
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
‚ª;ic@s¶ddlTddlmZddlmZddlZddlZddlZddlZddlZddl    m
Z
ddl m Z ddl TddlmZmZddlmZmZmZmZmZddlZddlZddlZddlZd    „Zed
ƒdad „Zd „Zd „Z d„Z!e"d„Z#d„Z$d„Z%ddd„ƒYZ&ddd„ƒYZ'd„Z(d„Z)d„Z*ddd„Z+d„Z,dS(iÿÿÿÿ(t*(tGlobalFunctions(tGMCommonN(tfix_incomingText(tDataServerPlayerData(t
CommFuncExtmylog(t
MMORPGPacktRecvPackProtocoltSendPackProtocoltMergeServerRecvProtocoltMergeServerSendProtocolc    Csôtjƒ}xátjd||fƒD]Æ\}}}x´|D]¬}tjj||ƒ}|j|dƒ}|dt|ƒ!}|jdƒdkr—q<n|j    dƒ}|d}|d}|d
krÌq<n|jd    dƒ}t
|ƒq<Wq&WdS( Ns%s\%stit__init__is.tpyctpys\(Rspy( Rt
getAppPathtostwalktpathtjointreplacetlentfindtsplitt
__import__(    t    importDirtcurPathtroottdirstfilestfiletfileNamet curFileListtext((s‡D:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\GMToolLogicProcess\ProjSpecialProcess.pytImportCommandAll8s ) 
 
 sGMToolLogicProcess\Commandsc Cs»tjdƒtjƒ}|j|jƒƒ|j}|j}|j}|j    }|j
}|j }tjd||fƒd}yÜt |ƒ}    |    j tjdƒ}|dkrÆt||    tjƒdSt|    ƒ}
|
ikrõt||    tjƒdStƒ} |
| _|| _|| _|| _tj|ƒ| _|    | _tƒj|| ƒ| j ƒWnLt!k
r©tjdt"j#ƒƒtƒj$|ƒt||tj%ƒdSXtjdƒdS(Ns%ProjSpecialProcess OnGMToolCommand INsGM Tool Cmd->%s,orderId->%sR sGM cmd error - > %ss'ProjSpecialProcess OnGMToolCommand Done(&RtinfoRt tagGMCommandtReadDatat    getBuffertOrderLentOrderIdtCmdLentCmdt UserDataLentUserDatatevaltgetRtDef_GMKey_TypetNonetGMCommandResultt Def_GMCmdNonetChangeEncodIngtDef_EncodeFailt GMCmdMangert    gmCmdDicttfuncNametorderIdtuserDatatcopytdeepcopytpacktgmCmdDictUnEncodet GetGMOrderMgrtAddCmdt GMToolCommandt BaseExceptiont    tracebackt
format_exctPopCmdtDef_GMDBEntranceFail( R=trecvPacktorderLenR9tcmdLentcmdt
uerDataLenR:R8R7tcmdDictt gmCmdManger((s‡D:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\GMToolLogicProcess\ProjSpecialProcess.pytOnGMToolCommandUsJ                                                        cCs#tjƒ}|j|jƒƒ|S(N(R    ttagGMCommandResultR&t    GetBuffer(R=tsendpack((s‡D:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\GMToolLogicProcess\ProjSpecialProcess.pytOnGMToolCommandResults c Cs¨|jddƒ}|jdƒ}|s4tjdfSg}|jtjdƒ}|tjtjgkrx|D]}|tjkr˜tjj    |ƒ}n'|tjkrntjj
|ƒ}nqn|sÜtj dt |ƒfS|jddƒ}|j |ƒqnWn†|tjkrˆtjƒ}xht|ƒD]W}tj|ƒ}|j|ƒ}    |    sktjd|ƒq*n|    jƒ}
||
7}q*Wn|s›tjdfStj|fS(sºǫ́GM¹¤¾ßÍæ¼ÒÁбíÃüÁîͨÓÃÑéÖ¤
    @param gmCmdDict: ÃüÁî²ÎÊý×Öµä
    @return: GMCommon.Def_xxx, idList or errorInfo
                                ·Ç Def_Success µÄ´íÎóÀàÐÍ        -    ´ú±í´íÎ󣬿ÉÖ±½Ó·µ»Ø¸øºǫ́
            Def_Success, playerIDList    -  ´ý´¦ÀíµÄÍæ¼ÒIDÁбí
    t
playerListR s,s%s can not found!uPlayerIDis    not family %s(R/RRt Def_ParamErrtDef_GMKey_QueryTypetDef_GMKey_PlayerNametDef_GMKey_PlayerAccIDt
PyGameDatat g_usrCtrlDBtfindDBPlayerByNametfindDBPlayerByAccIDt    Def_NoTagtstrtappendtDef_GMKey_FamilyIDt    DBDataMgrt GetFamilyMgrR.t    GameWorldtToIntDeft
FindFamilytDebugLogtGetMemberIDListt Def_Success( R7RSt playerIDListt    queryTypet
playerFindtrectplayerIDt    familyMgrtfamilyIDtfamilyt memberIDList((s‡D:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\GMToolLogicProcess\ProjSpecialProcess.pytGMCmdPlayerListValidationIDŸs<     cCsÐ|jtjdƒ}|jtjdƒ}t|ƒdkrItjdfS|tjkrmtj    j
|ƒ}n1|tj kr‘tj    j |ƒ}n tjdfS|s±tj dfS|jddƒ}tj|fS(sºǫ́GM¹¤¾ßÍæ¼ÒÃüÁîͨÓÃÑéÖ¤
    @param gmCmdDict: ÃüÁî²ÎÊý×Öµä
    @return: GMCommon.Def_xxx, playerID
                                ·Ç Def_Success µÄ´íÎóÀàÐÍ        -    ´ú±í´íÎ󣬿ÉÖ±½Ó·µ»Ø¸øºǫ́
            Def_Success, playerID    -    ±¾·þÍæ¼ÒID
    R iuPlayerIDN(R/RRUtDef_GMKey_PlayerFindRRTR1RVRXRYRZRWR[R\Rg(R7RiRjRkRl((s‡D:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\GMToolLogicProcess\ProjSpecialProcess.pytGMCmdPlayerValidationIDÎs   cCs(|jtjdƒ}|jtjdƒ}t|ƒdkrItjdfS|tjkrptj    j
|t ƒ}n4|tj kr—tj    j |t ƒ}n tjdfS|s·tjdfS|j}tjƒj|ƒ}| sè|jƒr|rtj|d|ƒtjdfStj|fStj|fS(sºǫ́GM¹¤¾ßÍæ¼ÒÃüÁîͨÓÃÑéÖ¤
    @param gmCmdDict: ÃüÁî²ÎÊý×Öµä
    @param offlineSupport: ÀëÏßÍæ¼ÒÊÇ·ñÖ§³Ö¸ÃÃüÁĬÈÏÖ§³Ö£¬µ±Íæ¼ÒÀëÏßʱ£¬»áÔÚÉÏÏߺóÖ´ÐиÃÃüÁî
    @return: GMCommon.Def_xxx, curPlayer
                                ·Ç Def_Success µÄ´íÎóÀàÐÍ        -    ´ú±í´íÎ󣬿ÉÖ±½Ó·µ»Ø¸øºǫ́
            Def_Success, curPlayer    -    curPlayerΪ¿Õʱ´ú±íÍæ¼ÒÀëÏß״̬£¬×¢£ºÀëÏß״̬ÇÒÐèÒªÖ§³ÖÀëÏß´¦ÀíµÄ²Å·µ»Ø (Def_Success, None)
            GMCommon.Def_PlayerOfLine, dbPlayer    -    ²»ÐèÒªÖ§³ÖÀëÏß´¦Àíʱ£¬·µ»ØÀëÏ߸ú dbPlayer
    R it    GMToolCMDN(R/RRURrRRTR1RVRXRYRZtTrueRWR[R\tPlayerIDRbtGetPlayerManagertFindPlayerByIDtIsEmptytPlayerOfflineSupporttAddOfflineUnprocessedRgtDef_PlayerOfLine(R7tofflineSupportRiRjtdbPlayerRlt    curPlayer((s‡D:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\GMToolLogicProcess\ProjSpecialProcess.pytGMCmdPlayerValidationës&
         cCstj|dtƒdS(NRt(RztDoOfflineUnprocessedt__doOfflineGMToolCMD(R((s‡D:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\GMToolLogicProcess\ProjSpecialProcess.pytGMCmdPlayerLoginscCsl|}| st|tƒ r!dS|jtjdƒ}ttd|dfƒ}|dkrh||ƒndS(NR s%s.%stOnExec(t
isinstancetdictR/RR0t GetExecFunctCommandsR1(RtrecDatat    eventNamet    eventDataR7R8tcallFunc((s‡D:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\GMToolLogicProcess\ProjSpecialProcess.pyR‚s  R6cBs#eZd„Zd„Zd„ZRS(cCs|jƒdS(N(tClear(tself((s‡D:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\GMToolLogicProcess\ProjSpecialProcess.pyR )s
cCs:i|_d|_d|_d|_d|_i|_dS(NR i(R7R8R9R1R:R=R>(RŽ((s‡D:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\GMToolLogicProcess\ProjSpecialProcess.pyR1s                        cCsÔttd|jdfƒ}tj}d}|dkr‡||jƒ}t|tƒr^|}q¤t|t    ƒr¤|d}|d}q¤nt
j d|jƒtj }t ƒj|jƒt|j|j||ƒdS(Ns%s.%sR„R iisno gm cmd -> %s(R‡RˆR8Rt
Def_UnknowR1R7R…tintttupleRR$R3R?RER9R2(RŽRŒtexecTypetexecInfotret((s‡D:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\GMToolLogicProcess\ProjSpecialProcess.pyRA=s         
    (t__name__t
__module__R RRA(((s‡D:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\GMToolLogicProcess\ProjSpecialProcess.pyR6$s         t GMCmdOrderMgrcBs,eZd„Zd„Zd„Zd„ZRS(cCs i|_dS(N(t_GMCmdOrderMgr__CmdOrderdict(RŽ((s‡D:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\GMToolLogicProcess\ProjSpecialProcess.pyR Zs    cCsD||jjƒkr3tjd||jfƒtS||j|<tS(Ns(orderId = %s already exists,New cmd = %d(R˜tkeysRtwarningR8tFalseRu(RŽR9t    cmdManger((s‡D:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\GMToolLogicProcess\ProjSpecialProcess.pyR@cs
 cCs|jj|dƒS(N(R˜tpopR1(RŽR9((s‡D:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\GMToolLogicProcess\ProjSpecialProcess.pyREpscCs|jj|dƒS(N(R˜R/R1(RŽR9((s‡D:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\GMToolLogicProcess\ProjSpecialProcess.pytGetCmdws(R•R–R R@RERž(((s‡D:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\GMToolLogicProcess\ProjSpecialProcess.pyR—Us                 cCstdkrtStƒatS(N(t_GMCmdOrderMgrR1R—(((s‡D:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\GMToolLogicProcess\ProjSpecialProcess.pyR?}s     cCsb|jdƒ}t|ƒdkr%dSx6|D].}t||ƒtkrKdSt||ƒ}q,W|S(Ns.i(RRR1thasattrRutgetattr(t
curCallObjtcallNametcallListt curCallName((s‡D:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\GMToolLogicProcess\ProjSpecialProcess.pytParseNameGetObj‹s cCs9t||ƒ}|dkrdSt|ƒtkr5dS|S(N(R¦R1tcallableRu(R¢R£((s‡D:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\GMToolLogicProcess\ProjSpecialProcess.pyR‡žs  R cCs[i|tj6|tj6|tj6}tj|dtƒ}tjd|ƒt    ||ƒdS(Nt ensure_asciis gm result:%s(
RR0tDef_GMKey_ResultTypetDef_GMKey_ResultMsgtjsontdumpsR›RR$tSendToGMToolCommandResult(R9tgmCmdt
resultTypetstrMsgtuseDatat
resultDcitt    resultMsg((s‡D:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\GMToolLogicProcess\ProjSpecialProcess.pyR2²s 
  cCsÑi}|jddƒ}|dkr(|Sx¢|jƒD]”\}}t|tƒsVq5nyG|jddƒ}|jddƒ}td|ƒ}|j|ƒ}Wntjdt    |ƒƒ|SX|||<q5W|S(    NtcodingR s
s`rs's\'su'%s's translateStr error! srcStr = %s (
R/titemsR…R]RR.tencodeRR$trepr(R7RLR´tkeytvaluet translateStr((s‡D:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\GMToolLogicProcess\ProjSpecialProcess.pyR4Ás" (((-tGMToolPyInterfacetDBCommonRRˆRR;RRCR«t MangoDBCommonRt CollectionsRtCollections.CollectionDefinetCommonRRtProtocolRRR    R
R RzRXRbR`R#R1RŸRNRRRqRsRuR€RƒR‚R6R—R?R¦R‡R2R4(((s‡D:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\GMToolLogicProcess\ProjSpecialProcess.pyt<module>sB
 
(            
    :        /     '        1(