hxp
2025-06-04 5e48c5269182c00a594debe5b5475c0ca6d95729
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
sÁ>hc@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|tjkrmtj    j
|ƒ}n1|tj kr‘tj    j |ƒ}n tjdfS|s±tj dfS|jddƒ}tjƒj|ƒ}| së|jƒr|rtj|d|ƒtjdfStjdfStj|fS(swºǫ́GM¹¤¾ßÍæ¼ÒÃüÁîͨÓÃÑéÖ¤
    @param gmCmdDict: ÃüÁî²ÎÊý×Öµä
    @param offlineSupport: ÀëÏßÍæ¼ÒÊÇ·ñÖ§³Ö¸ÃÃüÁĬÈÏÖ§³Ö£¬µ±Íæ¼ÒÀëÏßʱ£¬»áÔÚÉÏÏߺóÖ´ÐиÃÃüÁî
    @return: GMCommon.Def_xxx, curPlayer
                                ·Ç Def_Success µÄ´íÎóÀàÐÍ        -    ´ú±í´íÎ󣬿ÉÖ±½Ó·µ»Ø¸øºǫ́
            Def_Success, curPlayer    -    curPlayerΪ¿Õʱ´ú±íÍæ¼ÒÀëÏß״̬
    R iuPlayerIDt    GMToolCMDN(R/RRURrRRTR1RVRXRYRZRWR[R\RbtGetPlayerManagertFindPlayerByIDtIsEmptytPlayerOfflineSupporttAddOfflineUnprocessedRgtDef_PlayerOfLine(R7tofflineSupportRiRjRkRlt    curPlayer((s‡D:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\GMToolLogicProcess\ProjSpecialProcess.pytGMCmdPlayerValidationës&         cCstj|dtƒdS(NRt(RxtDoOfflineUnprocessedt__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(R|trecDatat    eventNamet    eventDataR7R8tcallFunc((s‡D:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\GMToolLogicProcess\ProjSpecialProcess.pyRs  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Š0s                        cCs·ttd|jdfƒ}tj}d}|dkr‡||jƒ}t|tƒr^|}q‡t|t    ƒr‡|d}|d}q‡nt
ƒj |j ƒt |j |j||ƒdS(Ns%s.%sRR ii(R„R…R8Rt
Def_UnknowR1R7R‚tintttupleR?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 Vs    cCsD||jjƒkr3tjd||jfƒtS||j|<tS(Ns(orderId = %s already exists,New cmd = %d(R•tkeysRtwarningR8tFalsetTrue(R‹R9t    cmdManger((s‡D:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\GMToolLogicProcess\ProjSpecialProcess.pyR@_s
 cCs|jj|dƒS(N(R•tpopR1(R‹R9((s‡D:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\GMToolLogicProcess\ProjSpecialProcess.pyRElscCs|jj|dƒS(N(R•R/R1(R‹R9((s‡D:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\GMToolLogicProcess\ProjSpecialProcess.pytGetCmdss(R’R“R R@RERœ(((s‡D:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\GMToolLogicProcess\ProjSpecialProcess.pyR”Qs                 cCstdkrtStƒatS(N(t_GMCmdOrderMgrR1R”(((s‡D:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\GMToolLogicProcess\ProjSpecialProcess.pyR?ys     cCsb|jdƒ}t|ƒdkr%dSx6|D].}t||ƒtkrKdSt||ƒ}q,W|S(Ns.i(RRR1thasattrR™tgetattr(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¤R1tcallableR™(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 RxRXRbR`R#R1RRNRRRqRsR™R}R€RR6R”R?R¤R„R2R4(((s‡D:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\PyMongoDB\GMToolLogicProcess\ProjSpecialProcess.pyt<module>sB
 
(            
    :        /     &        .(