cehua_wcy
2018-08-31 b4ed2526ff1c3f21e04eb43fc6ede4a8040b97c8
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
83
òð‡[c@sAddlZddlZddlZddlZddlZddlZddlZddlZddlZddl    Z    ddl
Z
dZ dZ ddd„ƒYZ ddd„ƒYZdad„Zd    „Zd
„Zd „Zd „Zd „Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zdd„ZdS(iÿÿÿÿNiit FamilyHurtObjcBseZd„ZRS(cCsO||_||_||_||_d|_tjƒjƒ|_d|_    dS(Ni(
tfamilyIDtobjTypetobjIDtnamet    hurtValuet    GameWorldt GetGameWorldtGetTicktinitTicktstartProtectTick(tselfRRRR((suE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FamilyRobBoss.pyt__init__$s                        (t__name__t
__module__R (((suE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FamilyRobBoss.pyR"stFamilyOwnerBossHurtcBs#eZd„Zd„Zd„ZRS(cCsPi|_i|_i|_i|_i|_i|_d|_tjdƒdS(NisFamilyBossHurtMgr __init__(    tfamilyNowHurtSorttfamilyNowHurtDicttfamilyHisHurtDicttplayerHisHurtDicttfamilyPlayerIDDictt
bossHPInfot lastSortTickRtDebugLog(R ((suE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FamilyRobBoss.pyR 1s                             cCsl|jj|dƒ|jj|dƒ|jj|dƒ|jj|dƒ|jj|dƒi|_dS(Ni(RtpopRRRRR(R tkey((suE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FamilyRobBoss.pyt ClearNPCHurtBs    cCsdS(N((R ((suE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FamilyRobBoss.pytGetPlayerHisHurtDictKs(R RR RR(((suE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FamilyRobBoss.pyR/s            cCststƒantS(N(tg_familyOwnerBossHurtR(((suE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FamilyRobBoss.pytGetFamilyHurtMgrOs cCs|tjddƒkS(NtFairyGrabBossIDi(t IpyGameDataPYtGetFuncEvalCfg(tbossID((suE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FamilyRobBoss.pytIsHorsePetRobBossUscCs(tjƒjƒ}|jƒ}|jƒ}|||f}tj|d||tj|ƒtj|ƒfƒt    ƒ}|j
j |iƒ}|j j |iƒ}|j j |iƒ}    |jƒ}
|
jdtƒ|jƒ} | jdtƒ|    jƒ} | jdtƒtj|dt|
ƒƒx@t|
dƒD]/\} }tj|d| |j|jfƒq1Wtj|dt| ƒƒx@t| dƒD]/\} }tj|d| |j|jfƒqŽWtj|dt| ƒƒxFt| dƒD]5\} }tj|d| |j|j|jfƒqëWdS(    NsNPCID(%s,%s), HP: %s/%stcmpsʵʱÉËѪÏÉÃËÊý: %sis%s,ÏÉÃËID=%s,ÉËѪ=%ssÀúÊ·ÉËѪÏÉÃËÊý: %ssÀúÊ·ÉËÑªÍæ¼ÒÊý: %ss%s,Íæ¼ÒID=%s,ÉËѪ=%s,ÏÉÃËID=%s(RRt    GetLineIDtGetIDtGetNPCIDt DebugAnswertGameObjtGetHPtGetMaxHPRRtgetRRtvaluestsorttCmpFamilyOwnerBossHurtSorttlent    enumerateRRR(t    curPlayertcurNPCtlineIDRR!RthurtMgrtnpcFamilyNowHurtDicttnpcFamilyHisHurtDicttnpcPlayerHisHurtDicttnpcNowHurtFamilyListtnpcHisHurtFamilyListtnpcHisHurtPlayerListtithurtObj((suE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FamilyRobBoss.pytOnGMPrintFamilyOwnerBossHurtYs2  2       ''-c Cs$tjd|ƒ|dkr!dS| s/| r3dS|jƒ}|tjkrRdS|jƒ}|tjkrqdStj|ƒtj    krdStj
ƒj ƒ}|j ƒ}|j ƒ}|jƒ}|jƒ}    tjd||||    |f|ƒ|||f}
tƒ} t||| |
|ƒdS(Ns(OnPlayerHurtFamilyOwnerBoss hurtValue=%sisIÏÉÃËÇÀBossÔö¼ÓÉËѪ: lineID=%s,objID=%s,bossID=%s,familyID=%s,hurtValue=%s(RRtGetGameObjTypet IPY_GameWorldt    gotPlayertgotNPCt    NPCCommontGetDropOwnerTypetChConfigtDropOwnerType_FamilyRR$R%R&t GetPlayerIDt GetFamilyIDRtAddPlayerHurtFamilyOwnerBoss( R1tcurBossRt
curObjTypet curBossTypeR3RR!tplayerIDRRR4((suE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FamilyRobBoss.pytOnPlayerHurtFamilyOwnerBosss0               c    CsÎ|dkrdS|jƒ}|jƒ}|jƒ}|jƒ}i|jtgd6|jtgd6|jtgd6}    x)|    j    ƒD]\}
} | \} } || kr´i| |<n| |}| tkrÐ|n|}||kr| tkrô|n|}t
|| ||ƒ||<n||}| tkrl|j dkrl|rlt |j ƒƒrltj|tjƒqln|j |7_ tjd|
| ||j f|ƒqƒW|jj|iƒ}|j|gƒ}||krü|j|ƒ|||<||j|<ntj|ƒ}tj|ƒ}||g|j|<tjddƒ}|jtjƒ}||}|rÊt |d|ƒ}|d\}}||krÊ|j!tj|d    ƒt"j#d||j ƒgƒqÊndS(
Nit FamilyNowHurtt FamilyHisHurtt PlayerHisHurts2    ¸üÐÂÉËѪ%s: hurtType=%s,hurtID=%s,hurtValue=%st FairyGrabBossigY@i($RFRGt GetPlayerNamet GetFamilyNameRtFamilyHurtObjType_FamilyRRtFamilyHurtObjType_PlayertitemsRRR"R&tPlayerActivitytAddDailyActionFinishCntt ShareDefinetDailyActionID_FamilyRobBossRRRR+tappendR(R)R*RRR t GetDictByKeyRDtDef_NPC_Dict_HPPerLogicMarktinttSetDictt PlayerControlt WorldNotify(R1RIR4RRRLRt
playerNamet
familyNamet addHurtDicttmarkthurtInfothurtDictthurtTypet objHurtDictthurtIDthurtNameR<tnpcFamilyPlayerIDDicttnpcFamilyPlayerIDListtnpcHPtnpcMaxHPtnpcHPPerNotifyListthpPerLogicMarktlogicHPPerListtnpcHPPert    notifyPert    notifyKey((suE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FamilyRobBoss.pyRH£sX        
 
!      
 
 "cCsxtjƒjƒ}|jƒ}|jƒ}|||f}tƒ}|j|ƒtj|ƒtj    |ƒg|j
|<dS(N( RRR$R%R&RRR(R)R*R(RIR3RR!RR4((suE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FamilyRobBoss.pytFamilyOwnerBossOnRebornás       %c(Cs9tjƒjƒ}|jƒ}|jƒ}|||f}tj|ƒ}tjd|||||fƒtƒ}|j    j
|iƒ}|j j
|iƒ}    |j j
|iƒ}
d} ||    krñ|    |} | j } tjdd| |gƒn|jƒ} | jdtƒggg}}}tjddiƒ}|j
|iƒ}|rZt|ƒnd}d}g}x¬| D]¤}|j|krŽqsn|d7}tj||gƒ}|j|jgƒ|j|ƒ|j||gƒ|j|j ƒtjd||fƒ||krsPqsqsW|retjd    |||ƒtjj|ƒ}tjdd
||gƒntjdd ƒ}tjdd iƒ}|j
|gƒ}g}tjd ||fƒx‚|    jƒD]t\}}|j }t!|d|ƒ} |
j
|gƒ}!tjd||| |!fƒ| |kr2qÈn||!7}qÈW|retj"d||||gƒnt#||||dƒ}"tj$ƒ}#|j j
|iƒ}
xM|
jƒD]?}$x6|$D].}%|#j%|%ƒ}&|&r¸t&j'|&|"ƒq¸q¸Wq«Wt(id||| g|6ƒ}'tj)ƒj*dddd|'t+|'ƒƒ| S(s½ÏÉÃ˹éÊôboss±»»÷ɱ
                     ¹éÊôIDÓÉÍâ²ã¹éÊôËãºÃ´«È룬²»ÓÉÉËѪ¾ö¶¨£¬·ÀÖ¹¹éÊôÂß¼­ÐÞ¸Äʱ¸Äµ½Âß¼­
                     ÒòΪÓÐÉËѪ±£»¤£¬Èç¹ûÉËѪµÚÒ»²»Ëã¹éÊôµÄ»°£¬Âß¼­¾ÍÐèÒªÐÞ¸Ä
    sNFamilyOwnerBossOnKilled lineID=%s,objID=%s,bossID=%s,maxHP=%s,ownerFamilyID=%stitFairyGrabBossDeadR#RQis    ¹éÊôÏÉÃ˵Ú%sÃû¶îÍâ½±Àø: %stFairyGrabBoss2tFairyGrabBossRankiis*    ²ÎÓë½±ÐèÇóÉËѪ±ÈÀý: %s%%, ²ÎÓë½±Àø£º%sgY@s9    ÏÉÃËID=%s, ÀúÊ·ÉËѪ=%s, ÉËѪ±ÈÀý: %s%%, ²ÎÓëÍæ¼ÒID=%stFairyGrabBoss1tFamilyOwnerBossInfo(,RRR$R%R&R(R*tLogRRR+RRRR`RaR,R-R.RR tmaxRtGetDictValueByRangeKeyR[Rt SendMailBatchRYt    Def_Spacetjoint
GetFuncCfgRVRR^t SendMailByKeyt__GetFamilyOwnerBossHurtPacktGetMapCopyPlayerManagertFindPlayerByIDt NetPackCommont SendFakePacktstrtGetPlayerManagertGameServer_QueryPlayerResultR/((RIt ownerFamilyIDR3RR!RtmaxHPR4R7R6RltownerFamilyNametownerFamilyHisHurtR:tbatchPlayerIDListtbatchAddItemListtbatchParamListtownerFamilyPlayerOrderAwardDicttcurNPCPlayerOrderAwardDicttmaxOrdertcurOrdertorderPlayerNameListt
hurtPlayert awardItemListtorderPlayerNametjoinAwardNeedHurtHPPertjoinFamilyAwardDicttcurNPCJoinFamilyAwardListtjoinAwardPlayerIDListRt
hurtFamilyt familyHisHurtthurtPertfamilyPlayerIDListthurtPackt copyPlayerMngt playerIDListRLR1tsyncMsg((suE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FamilyRobBoss.pytFamilyOwnerBossOnKilledís„           
      
         (cCsntjƒjƒ}|jƒ}|jƒ}|||f}tƒ}|j|jƒƒ}    ||jt    j
ƒ|kr†t ||    ||ƒS|j t    j
|ƒ|j j|iƒ}
|jƒ} xÎt| ƒD]À} |j| ƒ} | dkrîqÇn| jƒsqÇn| jƒ}|tjkr!qÇntj| jƒ|ƒ}|jƒ|
krÇtjd||||jƒfƒt||||dƒqÇqÇW|jj|iƒ}|j j|iƒ}
|jj|iƒ}g}x|jƒD]}||krõqÝnt}||}xÅ|D]½}||
kr$q n|
|}tj|tjƒ}|r}|j|j ƒ|j!ƒ|    ƒr}t"}d|_#Pn|j#}|sŸ||_#t"}Pq ||t$j%ddƒdkr t"}Pq q W|sÝ|j&|ƒqÝqÝWxH|D]@}|j'|dƒ|j'|dƒtj(d|||fƒqîW|j)ƒ}|j*dt+ƒ||j,|<t ||    ||ƒS(NsJÏÉÃ˹éÊôBoss¿´µ½Íæ¼Ò£¬¼ÓÈëÉËѪ£¡lineID=%s, objID=%s, bossID=%s,playerID=%sit BossHurtValueiiès*Çå³ýÏÉÃËÉËѪ: lineID=%s,objID=%s,bossID=%sR#(-RRR$R%R&RtGetRefreshPosAttGetCurRefreshPointIndexR\RDt Def_NPC_Dict_LastRefreshHurtTicktGetFamilyOwnerAtkObjR_RR+tGetInSightObjCounttxrangetGetInSightObjByIndextNonet
GetVisibleR>R?R@tGetObjRFRRHRRtkeystFalsetGetIsInRefreshPointtGetPosXtGetPosYtTrueR
RRƒR[RR}R,R-R.R(t
npcControlR2tticktrefreshIntervalR3RR!RR4t refreshPointR7tseePlayerCountR;tseeObjt
seeObjTypet    seePlayerR5RltclearHurtFamilyIDListRt isInProtectR£RLt playerHurtObjR™R
tclearHurtFamilyIDR8((suE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FamilyRobBoss.pytRefreshFamilyOwnerNPCHurtGsz               
 
'                cCsNt|j|jƒ}|dkr%|St|j|jƒ}|dkrJ|SdS(Ni(R#RR    (thurtObj1thurtObj2tret((suE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FamilyRobBoss.pyR.©s  c Csô||jks||jkr"dS|j|}|j|}d}x«t|ƒD]\}}|j}    |dkry|    }n|    |kr‹qOn||    }
xT|
D]L} tj| tjƒ} | rœ|j| j    ƒ| j
ƒ|ƒrœ| |fSqœWqOWdS(sM»ñÈ¡ÏÉÃ˹éÊôboss¹¥»÷Ä¿±ê, ¹¥»÷ÔÚboss·¶Î§ÄڵĹéÊôÏÉÃ˳ÉÔ±£¬ÖÁÓÚ´òË­£¬Ëæ±ã
    Ni( RRR0RRR³R?R@R¶R·R¸( RºR½R4RtnpcFamilyNowHurtSortListRlRR;R RR£RLR™((suE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FamilyRobBoss.pyR­·s"            
 'cCs!tƒ}|jsdS|js,||_dS||jdkrCdS||_i}x”|jjƒD]ƒ\}}|\}}}|\}}    d}
d} |jj|gƒ} | rÏ| d} | j}
| j} n||    |
| g||<qbWt|ƒ}t    j
ƒj dddd|t |ƒƒdS(s. ÏÉÃ˹éÊôbossÉËѪ¶¨Ê±´¦Àí£¬Í¬²½GameServer
    Ni'iRwR|( RRRRVRR+RRRŠRR‹RŒR/(R»R4R§RRR3RR!tcurHPRŽt firstFamilyIDtfirstFamilyNamet nowHurtListtfirstFamilyHurtObj((suE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FamilyRobBoss.pytOnFamilyOwnerBossProcessÐs0                     
      (c    CsÑtjƒjƒ}|jƒ}|jƒ}|||f}tƒ}|jj|iƒ}t|ƒr¦|r¦t    ||gƒ}tj
ƒj dddd|t |ƒƒn|j |ƒtjd|||fƒdS(NitHorsePetRobBossHurtPlayers7ClearFamilyOwnerBossHurt lineID=%s, objID=%s, bossID=%s(RRR$R%R&RRR+R"RŠR‹RŒR/RR(RIR3RR!RR4tfamilyHurtPlayerIDListDictR§((suE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FamilyRobBoss.pytClearFamilyOwnerBossHurt÷s      + c Cstjƒj|ƒ}tjƒjƒ}|j}|j}|j}|||f}tƒ}    t    |    ||||ƒ}
|
r‹t
j ||
ƒndS(N( RR‹tGetPlayerByIndexRR$tObjIDtNPCIDt    QueryTypeRR…RˆR‰( tindext
clientDataR»R1R3RtnpcIDt    queryTypeRR4R¤((suE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FamilyRobBoss.pytOnQueryFamilyBossHurts                ic
Cs"d}|dkr0|jj|gƒ}d}ndStjƒ}|jƒ||_||_||_||_g|_    x’|D]Š}tj
ƒ}    |j |    _ |j |    _|j|    _t|    jƒ|    _|j|    _|jtj|    _|jtj|    _|j    j|    ƒq~Wt|j    ƒ|_|S(Nii(RR+tChPyNetSendPackttagMCFamilyBossHurtListtClearRÕRÖtHurtTypetIsSorttHurtListttagMCFamilyBossHurtRtFamilyIDRtHurtIDRtHurtNameR/tNameLenR    tInitTickRRYtDef_PerPointValuet    HurtValuet HurtValueExR[t    HurtCount(
R4RRRÚRÛtisSortt hurtObjListR¤R<Rf((suE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FamilyRobBoss.pyR…%s0      
                          (((RRYR?RˆRÝRWR`RRBRDR(RTRURRR±RRR"R=RMRHRvR¨RÆR.R­RÐRÓRÜR…(((suE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FamilyRobBoss.pyt<module>s:                        &    $    >         Z    b            '