hwj35
2025-06-16 12bfd1cd414e0fa14310a800df8288a844d6489f
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
GAt_c@snddlZddlTddlZddlZddlmZddlmZmZddl    m
Z
ddl    m Z ddl    m Z ddl    m Z dd    l    mZdd
l    mZmZmZmZmZdd lmZdd lmZmZmZmZmZmZdd lmZddlmZddl Z ddl!Z!dZ"dZ#dZ$de%fd„ƒYZ&dS(iÿÿÿÿN(t*(tConfigIniReader(tMapEventPointReadert ChinMapReader(ttagCClientVersion(ttagCRoleLoginAsk(t tagCInitMapOK(t tagCNPCAnswer(ttagCCancelEvent(ttagCPlayerLoginttagCWorldTransfert tagCLeaveTeamttagCPlayerLogOutt
tagCExitFB(t
PlayerData(ttagCMLoginStatettagCMSightZoomt tagCMTJGnpcttagCGAutoMatchTeamttagCGCreateTeamttagCMWorldTick(t tagCMTJGDead(t
DataDefines2012-08-30 16:30i's@t
AILoginoutcBséeZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z    d„Z
d    „Z d
„Z d „Z d „Zd „Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„ZRS(cCs<tj||dttƒ|jtƒd|_t|_dS(Ni(tAIBaset__init__tFalset    SetActivetTruetMapIDt
RandMapYet(tselftrobot((s.\\AILoginout.pyR4s     cCsN|jd|jtƒ|jd|jtƒ|jd|jtƒ|jd|jtƒ|jd|jtƒ|jd|jtƒ|jd|j    tƒ|jd|j
tƒ|jd    |j tƒ|jd
|j tƒ|jd |j tƒ|jd |jtƒ|jd |jtƒ|jd|jtƒ|jd|jtƒdS(Niiii    iiiiiii    §i    i    i¹i (t    RegNetMsgtOnServerPreparedRtOnAskClientVersiontOnShowLoginFrmRtOnServerPrepareOKtOnNeedCreateRolet OnCDBPlayertOnPlayerMapInittOnPlayerLoginLoadOKtOnServerDisconnecttOnAttrt
OnAttrListt    LeaveTeamt    PlayerDiet TeamRefresht MissionDict(RtaiMgr((s.\\AILoginout.pyt_RegisterPacketAscCstƒ}|jj|ƒdS(N(RR tSendMapServerPYPack(RtpacktsendPack((s.\\AILoginout.pyR.Ts    cCs„|j|jjƒjƒkrJ|jjƒjƒdkrF|jƒndS|jjƒjdƒ|jjƒjdƒ|jƒdS(Nii(tPlayerIDR t GetPlayerInfot GetPlayerIDtGetTeamMemberLVtJoinTeamt    SetTeamIDtSetTeamMemberLV(RR4((s.\\AILoginout.pyR-]s 
cCsŒtjd|jjƒjƒƒ|jjƒj|jƒxL|jD]A}|j|jjƒjƒkrC|jjƒj    |j
ƒPqCqCWdS(NsTeamRefresh----%s( tloggingtdebugR R7R8R;tTeamIDt
MemberListR6R<tMemberLV(RR4tmember((s.\\AILoginout.pyR/is cCsm|j|jjƒjƒkr"dS|jdkr5dSx1t|jƒD] }|j|}|j|ƒqEWdS(Ni(    tObjIDR R7R8tObjTypetxrangetCountt RefreshTypetCalcAttr(RR4titlpack((s.\\AILoginout.pyR,ss cCsF|j|jjƒjƒkr"dS|jdkr5dS|j|ƒdS(Ni(RCR R7R8RDRH(RR4((s.\\AILoginout.pyR+s  cCs¬|jtjkrJ|jjƒj|jƒ|jjƒr¨|jƒq¨n^|jtj    krx|jjƒj
|jƒn0|jtj kr¦|jjƒj |jƒn|jtj krü|jjƒj|jƒ|jdkr¨|jjƒjdƒq¨n¬|jtjkrL|jjƒj|jƒ|jjƒr¨|j|jƒq¨n\|jtjkrz|jjƒj|jƒn.|jtjkr¨|jjƒj|jƒndS(Ni(RGRtCDBPlayerRefresh_LVR R7t SetPlayerLVtValuet GetIsLoginOKt RefreshPointtCDBPlayerRefresh_DEFt
SetDefensetCDBPlayerRefresh_GoldtSetGoldtCDBPlayerRefresh_TeamIDR;R<tCDBPlayerRefresh_HappyPointt
SetTJGTimetTJGLeavetCDBPlayerRefresh_Tickt SetWorldTicktCDBPlayerRefresh_FBIDtSetFBID(RR4((s.\\AILoginout.pyRH‹s(cCsV|dkrdStƒ}|jj|ƒtƒ}|jj|ƒ|jjtƒdS(Ni(R R tSendR t SetIsLoginOKR(RttjgTimeR5((s.\\AILoginout.pyRW¤s         cCs|jjƒjƒdkrdS|jdkr2dS|jdkrEdS|j}tjƒj|jjƒj    ƒ|ƒ}|jjƒj
|ƒdS(NiitOpenMap( R R7t GetMaxMapIDt    MissionIDtDictKeyt    DictValueRtGetChinMapDatat FindMaxMapIDt GetPlayerLVt SetMaxMapID(RR4tmaxfbIDtmaxMapID((s.\\AILoginout.pyR0²s    'cCsvtjd|jjƒjƒ|jfƒ|jjtƒ|jj|jƒddl    m
}|j ƒj |jƒdS(Ns.RobotCheckTT   serverdisconnect, %s reason:%s iÿÿÿÿ(tRobotMgr( R=tinfoR R7tGetAccIDtReasonR]RtSetLastDisconnectReasontRobotRjt GetRobotMgrtDisconnectServer(RtpackOnServerDisconnectRj((s.\\AILoginout.pyR*Ès )cCs|jƒrdSdS(N(t IsTokenLogOn(RtpackOnServerPrepared((s.\\AILoginout.pyR"Õs cCs|jjƒdjtƒ}|j|jjƒdƒ}|d}|d}tƒ}d|_||_dd|_t    j
ƒj ƒ|_ d|_ |jjƒd|_|jjƒd|_t|dƒ|_|jjƒd    |_t|ƒ|_||_|jj|ƒtS(
Niiþÿÿÿiÿÿÿÿt1i iÿiii(R tGetRobotConfigtsplittDef_AccID_Split_SigntGetPlatformAccIDR    tIDTypetAccIDtPasswordRt    GetConfigt GetVersionNotVersiontLineNOtMACtAppIDtinttServerIDtAdulttlentExtraLentExtraR\R(RtstrListtaccIDtspIDtsidt cAccessLogin((s.\\AILoginout.pyRsës$
 
                     cCs,|jtƒ}|d }tj|ƒ}|S(Niþÿÿÿ(RwRxtjoin(Rt    gameAccIDtinfoListt
paInfoListt platformAccID((s.\\AILoginout.pyRys
cCsmtƒ}tjƒjƒ|_t|jƒ|_tjd|j    j
ƒ|j|jfƒ|j    j |ƒdS(Ns2RobotCheckTT  peer:0x%08X OnAskClientVersion %s,%d( RRR}tGetClientVersionRR†t
VersionLenR=R>R t GetPeerValueR\(RtpackOnAskClientVersiontClientVersionPack((s.\\AILoginout.pyR#'s         cCs¢|jdkrOtƒ}d|_tjd|jjƒƒ|jj|ƒdS|jdkržtƒ}d|_tjd|jjƒƒ|jj|ƒdSdS(Nis*RobotCheckTT  peer:0x%08X OnShowLoginFrm 1is*RobotCheckTT  peer:0x%08X OnShowLoginFrm 2(tTypeRR=R>R R•R\(RtpackOnShowLoginFrmR4((s.\\AILoginout.pyR$5s                cCs{tƒ}|j|_|jj|ƒtƒ}d|_|jj|ƒ|jjƒjiƒt    j
d|jj ƒƒdS(Nis+RobotCheckTT  peer:0x%08X OnServerPrepareOK( RRR R\RtStateR3R7tSetRoundNpcDictR=R>R•(RtpackOnServerPrepareOKR4t
loginState((s.\\AILoginout.pyR%Ks             cCstjd|jjƒƒdS(Ns*RobotCheckTT  peer:0x%08X OnNeedCreateRole(R=R>R R•(RtpackOnNeedCreateRole((s.\\AILoginout.pyR&`sc
Csÿ|j|_|jjt|j|j|j|j|j|ji|j    ƒƒ|jj
ƒj |j ƒ|jj
ƒj |jƒ|jj
ƒj|jƒ|jj
ƒj|jƒ|jj
ƒj|jƒ|jj
ƒj|j    ƒ|jj
ƒj|jƒdS(N(RR t SetPlayerInfoRR{R6t
PlayerNametPosXtPosYtJobR7RLtLVRStGoldt    SetLineIDtLineIDRVt
HappyPointR[tFBIDtSetJobt SetPlayerID(RtpackOnCDBPlayer((s.\\AILoginout.pyR'js      "cCsutjd|jjƒƒ|j|_|jjƒj|jƒ|jjƒj|jƒ|jjƒj    |j
ƒdS(Ns.RobotCheckTT  peer:0x%08X ÈËÎïËùÔڵij¡¾°³õʼ»¯( R=R>R R•RR7tSetMapIDtSetPosXR¡tSetPosYR¢(RtpackOnPlayerMapInit((s.\\AILoginout.pyR(…s  cCstjd|jjƒƒ|jjtƒ|jjƒtƒ}|jj|ƒt    ƒ}d|_
|jj|ƒt j ƒj |jjƒjƒƒ}|jjƒjƒdkrÂ|jdƒdS|rô|jdkrôtƒ}|jj|ƒdS|jƒdS(Ns.RobotCheckTT  peer:0x%08X tagPlayerLoginLoadOKi(R=R>R R•R]RtClearDisconnectReasonRR3RtSightRRdt FindMapByIDR7tGetMapIDt
GetTJGTimeRWt    MapFBTypeR R\RO(RtpackOnPlayerLoginLoadOKR5t    sightPacktmapData((s.\\AILoginout.pyR)’s"             $     cCstjƒj|jƒ|jjƒjƒ}|s5dS|\}\}}}|dkrw|dkrwtjd|ƒdS|jjƒjƒ|krÑt    j
|||jjƒj ƒ|jjƒj ƒƒdkrÑnÔ|j rò|jjƒjƒ}ntjddƒ}t|_ tƒ}d|_||_|tjddƒ|_|tjddƒ|_||_|jj|ƒ|jjƒj|jƒ|jjƒj|jƒtƒ}||_|jj|ƒ||jjƒjƒkr tjd||jjƒjƒfƒdS|jƒdS(Nis¹Ò»úµã±í´íÎ󣡣¡£¡ npcID = %si
i    iisµØÍ¼Çл»¹Ò»ú----%s-%s( RtGetMapEventPointtFindNPCR R7t GetTJGPointR=RkR´tCommFunctGetDisttGetPosXtGetPosYRtGetFBIDtrandomtrandintRR
R˜RR¡R¢t    ExtField1R\R®R¯RtNPCIDR3R>R:(RtpointtmapIDtposXtposYtnpcIDtlineNOR5((s.\\AILoginout.pyRO³s@<                                &
cCs¬|jjƒjƒdkrdS|jjƒs2dStjd|jjƒjƒƒtƒ}|jj|ƒt    ƒ}d|_
d|_ d|_ d|_ |jj|ƒdS(Nis×é¶ÓÉêÇë----%si(R R7t    GetTeamIDRNR=R>R8RtSendGameServerPYPackRtTagMapIDtTagMapExtReqMinLVtReqMaxLV(RR5((s.\\AILoginout.pyR:çs                         cCs9tƒ}|jƒd|_d|_|jj|ƒdS(NitOK(RtCleart    AnswerLentAnswerR R\(Rt    NPCAnswer((s.\\AILoginout.pytSendEventAnswerüs
    
        cCs0tƒ}|jƒd|_|jj|ƒdS(Ni(RRÓR˜R R\(Rt    ExitEvent((s.\\AILoginout.pytSendExitEventAnswer
s    
    (t__name__t
__module__RR2R.R-R/R,R+RHRWR0R*R"RsRyR#R$R%R&R'R(R)ROR:R×RÙ(((s.\\AILoginout.pyR.s4                          
        
                         2    
                
             !    4            ('tbase64t    AI.AIBaseR=tostConfigurationReaderRt
DataReaderRRtProtocol.PacketsSendRRRRRR    R
R R R tRobot.PlayerDataRtProtocol.PacketsSendPYRRRRRRRRoRRÂR½tVERtDef_First_MapIDRxRR(((s.\\AILoginout.pyt<module>s* 
  (.