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
ð²ac@slddlZddlZddlZddlZddlZddlZddlZddlZddlZddl    Z    ddl
Z
ddl Z ddl Z ddl Z ddlZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd    „Zd
„Zd „Zd „Zd „Zd„Zd„Zd„Zd„Zd„Zd„Z d„Z!d„Z"dS(iÿÿÿÿNcCsjtjƒ}|j|ƒ}|j}ttjƒ}|jƒ|krYtj    |dƒdSt
|t |j ƒƒs‚tj dƒdSd}d}|jdkr¯|j|ƒ}n2|j|jƒ}|dkrátj    |dƒdS|stj|ƒ}    |    stj    |dƒdS|    j}n |jƒ}||krHtj    |dƒdS|j ƒ}
|
|krqtj dƒdStjƒj|
||ƒrtj dƒdSt|
ƒ} | j|ƒ} | dkrØtj    |dƒdSt||ƒtj||tjƒ|rVtj ƒ} |
| _!|j"ƒ| _#|jƒ| _|j$ƒ| _%t&j'|| ƒntj    |d    ƒdS(
NtLvErrs ºÃÓÑÒѾ­ÂúÁËitFriend_OffLinetFriend_OtherLessLvs²»ÔÊÐíÌí¼Ó×Ô¼ºs
ºÚÃûµ¥¼ì²étFriend_YetFriendtFriend_ApplyFriend((t    GameWorldtGetPlayerManagertGetPlayerByIndextTagIDtGetFuncLimitLVt ShareDefinetGameFuncID_FriendtGetLVt PlayerControlt
NotifyCodetCheckFriendCounttTruetGetIDtDebugLogtNonetFindPlayerByIDtFindPlayerByNametTagNametPlayerViewCachet FindViewCachetLVt PyDataManagertGetBlacklistManagertCheckBlacklistBothtGetFriendStructtFindt__CheckAddFriendt PlayerRequestt PYAddRequesttIPY_GameServert    reqFriendtChPyNetSendPackttagGCFriendAskIfJointAskIDtGetNametNametGetOfficialRanktRealmLVt NetPackCommont SendFakePack(tindext
clientDatattickt playerManagert    curPlayertcurTagPlayerIDtlimitLVt    tagPlayerttagLVtcurCachet curPlayerIDtcurPlayerFriendStructt    tagFriendt askFriendPack((sWE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\Player\PlayerFriend.pyt    AddFriend1sf                      cCs8tjƒj|ƒ}|dkr%|Stjƒj|ƒS(N(RtGetFriendManagert
GetFriendsRt
AddFriends(tplayerIDt
curFriends((sWE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\Player\PlayerFriend.pyRŽs cCs2tjƒj|ƒ}|stS|j|ƒdkS(N(RR<R=tFalseRR(R?t tagPlayerIDR@((sWE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\Player\PlayerFriend.pytIsFriend–scCsÍ|jƒ}t|ƒ}|j|ƒ}t|ƒ}|j|ƒ}|dkr^|dkr^dS|dkrz|dkrzdStjd||fƒ|dkr­|j|ƒn|dkrÉ|j|ƒndS(Ns-AddFriend, (%s, %s)ºÃÓÑÒì³£, É¾³ýË«·½ºÃÓѹØϵ(RRRRRtErrLogt    DelFriend(R1R2R7R8tcurPlayerHasThisFriendttagPlayerFriendStructttagPlayerHasThisFriend((sWE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\Player\PlayerFriend.pyR£s     c Csƒtjƒj|ƒ}|jƒ}tjƒj|ƒ}|dkrVtjd|ƒdS|j    }|j
|ƒ}|dkrŽtjd|ƒdStj ƒj |ƒ}|rÒ|j |ƒ|krÒtj|dƒdStjƒj||ƒtj|dƒtjƒj|ƒ}    |    dkr8tj|    d|jƒgƒntj||tƒtjddƒ}
|
rtjƒj|||
ƒndS(Ns#DeleteFriend -> ·â°üÒì³£ ->ûÓкÃÓÑs'DeleteFriend -> ·â°üÒì³£ ->ûÓÐÕâ¸öÍæ¼ÒtDelFriendCoupleLimittFriend_DeleteFriendtFriend_DeleteFriend2tIntimacyReducei(RRRt GetPlayerIDRR<R=RtLogtFriendIDRtGetDBPyCoupleManagert    GetCouplet GetCoupleIDR Rt DelFriendBothRR't
PlayerTeamtOnTeamMemFriendChangeRAt IpyGameDataPYt
GetFuncCfgtGetIntimacyManagertDelIntimacyBothPer( R-R.R/R1R?R@tfriendIDt    curFriendtcoupleR4tdecIntimacyPer((sWE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\Player\PlayerFriend.pyt DeleteFriendÊs2        cCsatjƒj|ƒ}|dkr%tS|jƒtjdƒkr]|rYtj    |dƒnt
StS(Nt FriendMaxCnttFriend_FullList( RR<R=RRtGetCountRVRWR RRA(R1tisNotifyR?R@((sWE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\Player\PlayerFriend.pyRös c CsRtjƒ}|j|ƒ}|j}|j|ƒ}|dkr[tj|ƒ}|s[dSn|jƒ}||kr‡tj    d|ƒdSt
j ||t j ƒs³tj    d|ƒdS|jså|rátj|d|jƒgƒndStjƒj|||ƒrdSt|t|jƒƒs-tjdƒdStdt|ƒsStj|dƒdStjƒj|ƒ}    |    dkrŒtjƒj|ƒ}    n|    j|ƒ}
|
dkr»tj    d|ƒdStjƒj||ƒ|rtj|d|jƒgƒtj|d|jƒgƒn)tj|ƒ} tj|d| dgƒt j!||tƒdS(    Ns1JoinFriendAnswer -> ·â°üÒì³£ ->²»ÄܼÓÈë×Ô¼ºÎªºÃÓÑs/JoinFriendAnswer -> ·â°üÒì³£ ->Íæ¼ÒûÓÐÕâ¸öÇëÇótFriend_RejectFriends#×Ô¼ºµÄºÃÓÑÂúÔ±tFriend_OtherFullLists=JoinFriendAnswer -> ·â°üÒì³£ ->Õâ¸öºÃÓÑÒѾ­ÔÚ×Ô¼ºµÄºÃÓÑÁбíÖÐtFriend_MakeFriendR(("RRRRRRRRRMRNR tPYCheckRequestR"R#tAnswerR RR'RRRRRRRRAR<R=R>Rt AddFriendBothtGetCachePropDataDictRTRU( R-R.R/R0R1t srcPlayerIDt    srcPlayerR6R?R@R9t    cacheDict((sWE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\Player\PlayerFriend.pytJoinFriendAnswersT               cCs»tjƒj|ƒ}tjƒ}|jƒ}|jƒ}tjƒj    |ƒ}|rg|j
|ƒrgdStj ƒj |ƒ}|r¡|j ƒtjdƒkr¡dStj ƒj||ƒdS(Nt EnemiesMaxCnt(RRRR"t IPY_GAddEnemyt
GetEnemyIDRMRR<R=RtGetEnemyManagert
GetEnemiesRaRVRWtAddEnemy(R-R/R1tpackttagIDR?tfriendstenemies((sWE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\Player\PlayerFriend.pytMapServer_AddEnemyjs   !c Cs“tjƒj|ƒ}|j}tjƒj|jƒƒ}|rn|j|jƒƒ|krnt    j
|dƒdStjƒj |ƒ}|s¾t j |ƒ}|s¢dSt j|ƒ}|d}    n |jƒ}    tjƒj|jƒƒ}
|
dkr#|
jƒtjdƒkr#t    j
|dƒtSntjƒj|jƒ|ƒt    j
|d|    gƒtjddƒ} | rtjƒj|jƒ|| ƒndS(NtAddBlackCoupleLimitR(tBlacklistMaxCntt BlacklistFullt AddBlackListRLi(RRRRRRPRQRRRR RRRRRiR'Rt GetBlacklistRRaRVRWRAt JoinBlacklistRMRXRY( R-R.R/R1RuR\R4R6Rlt
playerNametplayersR]((sWE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\Player\PlayerFriend.pyR|ˆs2    
!   "cCsHtjƒj|ƒ}tjƒj|jƒ|jƒtj    |dƒdS(NtDelBlackSuccess(
RRRRRt DelBlacklistRMRR R(R-R.R/R1((sWE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\Player\PlayerFriend.pyt DelBlackListÀscCsVtjƒj|jƒƒ}|dkr+dS|j|ƒ|j|ƒtj|ƒdS(N(    RR<R=RRtSync_SocialsInfotMapServer_SyncFriendInfoR tSync_LoginRequest(R1R/R@((sWE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\Player\PlayerFriend.pyt__OnPlayerLoginFriendÉs    cCs<tjƒj|jƒƒ}|dkr+dS|j|ƒdS(N(RRqRrRRR„(R1R/R€((sWE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\Player\PlayerFriend.pyt__OnPlayerLoginEnemyØs
  cCs<tjƒj|jƒƒ}|dkr+dS|j|ƒdS(N(RtGetContactsManagert GetContactsRRR„(R1R/R€((sWE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\Player\PlayerFriend.pyt__OnPlayerLoginContactsâs
  cCs<tjƒj|jƒƒ}|dkr+dS|j|ƒdS(N(RRR}RRR„(R1R/R€((sWE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\Player\PlayerFriend.pyt__OnPlayerLoginBlacklistës
  cCs<tjƒj|jƒƒ}|dkr+dS|j|ƒdS(N(RRXt GetIntimacysRRR„(R1R/t    intimacys((sWE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\Player\PlayerFriend.pyt__OnPlayerLoginIntimacylistôs
  cCs¤tjƒj|jƒƒ}|r3tj|j_nt||ƒt    ||ƒt
||ƒt ||ƒt ||ƒt j|ƒt j|jƒtjtjƒdS(N(RtGetPersonalSocialManagertGetSocialPlayerRtChConfigt
Def_Onlinet
playerInfot
OnlineTypeR‡RˆR‹RŒRt PlayerSocialtSync_AllSocialsInfot
Notify_AlltDef_CDBPlayerRefresh_Online(R1R/t socialPlayer((sWE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\Player\PlayerFriend.pyt OnPlayerLogins      cCsptj|ƒrdStjƒj|jƒƒ}|dkr>dStj|j    _
t j |jƒtj tjƒdS(N(R tGetIsTJGRRR‘RRR’t Def_OfflineR”R•R–R˜R™(R1R/Rš((sWE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\Player\PlayerFriend.pytOnPlayerDisconnects c    Cstjƒj|ƒ}tjtjdƒƒ}tjdƒ}|jƒ}|j    ƒ}t
|ƒ}t t j ƒ}    ||    krdStƒ}
tjƒ} xÉtd| jƒƒD]²} | j| ƒ} | dksª| jƒ rÞqªn| j    ƒ}||krüqªntj| ƒrqªn|j|ƒ}|dkr2qªntjƒj||ƒr]tjdƒqªntj||tjƒr{qªn| jƒ}||    kr™qªnx³|D]«}|dd}|dd}|||koá||kno|||ko||knsq nt|ƒdkr6|dj gƒn|ddj |ƒq W|
j!|ƒqªWtjd|fƒg}xzt"|dƒD]h} tj#|ƒ}t|ƒdkr¸q‹nt$j%|dƒ}||krÝq‹nt|ƒ|kr‹Pq‹q‹W|t|ƒ}|dkrTt&|
t|ƒƒ}|j't$j(|t)|t|ƒƒƒƒnt*j+ƒ}t|ƒ|_,g|_-xŠ|D]‚}| j.|ƒ}|s qnt*j/ƒ}||_0|j1ƒ|_2|jƒ|_3|j4ƒ|_5|j6ƒ|_7|j-j |ƒqWt8j9||ƒdS(NtrecommendFriendtSerchFriendCntis
ºÚÃûµ¥¼ì²éiisrecommendFriend %s(:RRRtcopytdeepcopyRVtGetFuncEvalCfgRWR RMRR    R
R tsettrangetGetActivePlayerCounttGetActivePlayerAtRt    GetInitOKR RœRRRRRR t IsRequestingR"R#tlentappendtaddtxrangetGetResultByRandomListtrandomtchoicetlisttextendtsampletminR$ttagGCRecommendFriendsInfotCntt FriendsListRttagRecommendFriendsDatatIDR'R(RtGetJobtJobR)R*R+R,(R-R.R/R1RŸtneedCnttplayerLVR7R8R3t allPlayerIDR0tit
findPlayerR2R9tfindLVt    recommendtminLVtmaxLVtplayeIDstlvlimitR?tfixCnttfixListtsendPackR4trceFriendsData((sWE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\Player\PlayerFriend.pytClient_RecommendFriends.s                $$  +           cCsÕtjƒj|ƒ}|j}ttjƒ}|jƒ|krCdSg}t|j    ƒƒ}tjƒ}xÊt
d|j ƒƒD]³}    |j |    ƒ}
|
dks}|
jƒ r±q}n|
j    ƒ} |j    ƒ| krÕq}n|j| ƒ} | dkröq}n|
jƒ|krq}n||
jƒkr}|j|
ƒq}q}Wtjƒ} t|ƒ| _g| _xf|D]^}tjƒ}|jƒ|_|jƒ|_|jƒ|_|jƒ|_| jj|ƒq_Wtj|| ƒdS(Ni(RRRR(R    R
R R RRMR¥R¦R§RR¨RR'R«R$RµRªR¶R·R¸RR¹RRºR»R+R,(R-R.R/R1tfindNameR3R€R8R0R¿RÀR2R9RÉR4RÊ((sWE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\Player\PlayerFriend.pytFuzzySearchPlayer¦sD              cCs&tjd|ƒ}|sdS|jƒS(Nt
FuncOpenLVi(RVtGetIpyGameDatat
GetLimitLV(tfuncIDtipyData((sWE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\Player\PlayerFriend.pyR    Ùs(#R"RR’R R R$R+R
RRVR¯R–R¡RRTR;RRCRR^RRmRxR|RƒR‡RˆR‹RŒRR›RžRËRÍR    (((sWE:\SnxxServerCode\ServerPython\CoreServerGroup\GameServer\Script\Player\PlayerFriend.pyt<module>sD                   ]             '    ,        [        8                
                                 x    3