cehua_ZWJ
2019-01-30 6afaa4408f4e09e3e95dbd92f0d1cd5a1fb2942b
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
3<\c@slddlZddlZddlZddlZddlZddlZddlZddlZddlZddl    Z    ddl
Z
ddl Z ddl Z ddl Z ddlZddlZddd„ƒYZddd„ƒYZddd„ƒYZeƒZd„Zd    „Zd
„Zd „Zd „Zd „Zd„Zd„Zd„Zdd„Zd„ZdS(iÿÿÿÿNt
HurtPlayercBseZd„Zd„ZRS(cCs6||_||_d|_tjd||fƒdS(Nis.HurtPlayer __init__ playerID=%s, playerName=%s(tplayerIDt
playerNamet    hurtValuet    GameWorldtDebugLog(tselfRR((ssE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\BossHurtMng.pyt__init__Bs
            cCs|j|7_dS(N(R(Rtvalue((ssE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\BossHurtMng.pyt AddHurtValueLs(t__name__t
__module__RR    (((ssE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\BossHurtMng.pyR=s    
tBossHurtValueListcBs>eZd„Zd„Zd„Zd„Zd„Zd„ZRS(cCs+|j||ƒtjd||fƒdS(Ns.BossHurtValueList __init__ objID=%s, bossID=%s(tClearHurtValueRR(RtobjIDtbossID((ssE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\BossHurtMng.pyRXscCs(||_||_g|_g|_dS(N(RRthurtListtqueryPlayerIDList(RRR((ssE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\BossHurtMng.pyR `s
                cCs'||jkrdS|jj|ƒdS(N(Rtappend(RR((ssE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\BossHurtMng.pytAddQueryPlayerksc Cs§|jƒ}|jƒ}t}x*|jD]}|j|kr(t}Pq(q(W|sdt||ƒ}|jj|ƒtj    d|j
|j |||fƒt j dƒ\}}|j |kr–tj}    |j|    dƒd}
tj||    |
ƒt|ƒtj    d|||
fƒi|j
d6|j d6|
d6|jƒd    6|jƒd
6} tjd | |ƒq–n2|j} tj    d |j
|j ||| |fƒ|j|ƒdS( NsAÐÂÔöBossÉËÑªÍæ¼Ò, objID=%s,bossID=%s,playerID=%s,name=%s,value=%stAttackBossCntLimitiis3½ñÈÕÃþ¹Ö´ÎÊý  playerID=%s, playerName=%s, newCnt=%sRRttouchCnttAccIDtPlayerIDtAddTouchBossCntsLÀÛ¼ÓBossÉËѪ, objID=%s,bossID=%s,playerID=%s,name=%s,curValue=%s,addValue=%s(t GetPlayerIDt GetPlayerNametFalseRRtTrueRRRRRRt ReadChConfigtGetEvalChConfigtChConfigtDef_PDict_WorldBoss_HurtCnttNomalDictGetPropertyt PlayerControltNomalDictSetPropertytNotifyAttackBossCnttGetAccIDtDataRecordPackt SendEventPackRR    ( Rt    curPlayerRRRtisFindt
hurtPlayertlimitBossIDListtlimitCnttkeytnewCnttdataDicttcurValue((ssE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\BossHurtMng.pytAddPlayerHurtValuets6          
          cCsJt}x*|jD]}|j|krt}PqqW|s=dS|j}|S(Ni(RRRRR(RRR)R*R0((ssE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\BossHurtMng.pytGetPlayerHurtValueœs    cCs.t|jdtjdƒdtƒ|_|jS(NR-Rtreverse(tsortedRtoperatort
attrgetterR(R((ssE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\BossHurtMng.pytGetSortHurtList«s'(R
R RR RR1R2R7(((ssE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\BossHurtMng.pyR Ss                      (    t HurtValueMngcBsPeZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z    RS(cCsi|_tjdƒdS(NsHurtValueMng 222__init__£¡(tobjHurtListDictRR(R((ssE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\BossHurtMng.pyR·s     cCsJ|j||ƒ}||jkr%dS|jj|ƒtjd|ƒtS(NsClearBossHurtList key=%s(t$_HurtValueMng__GetObjHurtListDictKeyR9tpopRRR(RRRR-((ssE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\BossHurtMng.pytClearBossHurtList¿s cCs^|j||ƒ}|jj|ƒ}|sZt||ƒ}||j|<tjd|ƒn|S(NsAddBossHurtList key=%s(R:R9tgetR RR(RRRR-R((ssE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\BossHurtMng.pytFindBossHurtListËs cCs#tjƒjƒ}d|||fS(Ns%s_%s_%s(Rt GetGameWorldt    GetLineID(RRRtlineID((ssE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\BossHurtMng.pyt__GetObjHurtListDictKeyÕsc    Csž|dkrdS| s| r"dS|jƒ}|tjkrAdS|jƒ}|tjkr`dS|jƒ}|jƒ}|j||ƒ}|j||ƒdS(Ni(tGetGameObjTypet IPY_GameWorldt    gotPlayertgotNPCtGetIDtGetNPCIDR>R1(    RR(tcurBossRt
curObjTypet curBossTypeRRt bossHurtList((ssE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\BossHurtMng.pytBossAddPlayerInHurtListÜs     cCs| s| rdS|jƒ}|tjkr1dS|jƒ}|tjkrPdS|jƒ}|jƒ}|j||ƒ}|j|jƒƒS(Ni(    RCRDRERFRGRHR>R2R(RR(RIRJRKRRRL((ssE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\BossHurtMng.pytGetPlayerBossHurtõs    c#    Cs8|jƒ}|jƒ}tjd||fƒ|j||ƒ}|jƒ}t|ƒdkr’|d}|j}|jt    j
||f|ƒn|jt    j
||fdƒtj ƒ}t j dƒ}    |    j|ƒ}
|
dkrdt j dƒ} | \} } }|
jƒ}|jƒtjƒjƒtjk}d}x'|D]}x t||ƒD]ü}|t|ƒdkrštjd|t|ƒ||fƒPn||}|j}|d}| ||f}|
|}tj| |||g|ƒtjd||t|ƒ|fƒ|rWtj ƒj|ƒ}|rStj|||j||ƒqSqWqWW|}qAWn|j}|j |||t!ƒ}tjdt|ƒƒxG|D]?}|j|ƒ}|r£tjd    |ƒt"j#||ƒq£q£Wg}tj$ƒ}t j d
ƒ}xo|j%ƒD]a\}}    t|ƒd kr8qn|j&|dƒ|dkr[qn||    kr|    |}PqqWx•|D]}|j}|j|ƒ}|sªq€n|r€tj'|ƒ}|r xB|D]7\} }!}"t(j)|| |!|"tj*tj+gt!ƒqÌWq q€q€Wtj,|||ƒ|j-||ƒdS( Ns6HurtValueMng __DoLogicOnBossKilled objID=%s, bossID=%sitGameWorldBossAwardtGameWorldBossAwardMailis2½±ÀøË÷Òý(%s)´óÓÚ ÉËѪÁбílen=%s break range(%s,%s)s9    SendMail order=%s,playerID=%s,giveItemList=%s,isFB=%ss3ͬ²½×îÖÕ½á¹û¸ø²éѯ¹ý¸ÃbossµÄÍæ¼Ò queryPlayerList=%ss    playerID=%stGameWorldBossActionAwardi(.RGRHRtLogR>R7tlenRtSetDictRtDef_NPC_Dict_BossMaxHurtIDtGetPlayerManagerRRR=tNonetkeystsorttGetMapt GetMapFBTypeRDtfbtNulltrangeRR"tSendMailtstrtFindPlayerByIDtFBLogictOnHurtValueOrderRRtGetBossHurtListPackRt NetPackCommont SendFakePackR?titemstGetGameWorldDictByKeytGetResultByRandomListt ItemControlertGivePlayerItemtrptItemt rptAnyWheretOnBossKilledHurtListR (#RRIRRRLt sortHurtListt maxHurtPlayerRt    playerMngt bossAwardDictt    awardDicttbossAwardMailInfottitletcontenttgetDaystprizeOrderListtisFBtpreOrdert
prizeOrdert
prizeIndexR*tordert mailContentt giveItemListR(tqueryPlayerListtsendPacktactionRandAwardListt gameWorldMgrtbossActionAwardDicttkeyInfot randAwardListtitemIDtitemCnttisBind((ssE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\BossHurtMng.pytDoLogicOnBossKilled
s   
        
     
    
 
    &        
     $cCs|r&tjd||||fƒntjƒ}|jƒ||_||_||_g|_xŒ|D]„}tj    ƒ}|j
|_ |j |_ t|j ƒ|_|j|_|jj|ƒ|rgtjd|j
|j |jfƒqgqgWt|jƒ|_|S(Ns6BossÉËѪÁÐ±í£ºobjID=%s,bossID=%s,isSort=%s,hurtList=%ss*    playerID=%s,playerName=%s,hurtValue=%s(RRtChPyNetSendPackttagMCBossHurtListtCleartObjIDtBossIDtIsSorttHurtPlayerListttagMCHurtPlayerRRRt
PlayerNameRStNameLenRt    HurtValueRtHurtCnt(RRRRtisSortt bossHurtPackR*thPlayer((ssE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\BossHurtMng.pyRcts*     
                         !(
R
R RR<R>R:RMRNR‰Rc(((ssE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\BossHurtMng.pyR8²s             
                jcCs't|ƒsdStj|||ƒdS(N(t__CheckIsNeedProcessBosstg_hurtValueMngRM(R(RIR((ssE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\BossHurtMng.pyRM’s cCs t|ƒsdStj||ƒS(Ni(R™RšRN(R(RI((ssE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\BossHurtMng.pyRNs cCs!t|ƒsdStj|ƒdS(N(R™RšR‰(RI((ssE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\BossHurtMng.pyt BossOnKilled§s  cCsv|j}|j}t|ƒs"dStj||ƒ}|j|jƒƒtj|||jt    ƒ}t
j ||ƒdS(N( RRŽt__IsNeedProcessRšR>RRRcRRRdRe(R(t
clientDataRRRLR€((ssE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\BossHurtMng.pytOnQueryBossHurtList²s         cCsmt|ƒsdS|jƒ}|jƒ}tj||ƒ}|jƒ}tj|||ƒtj||ƒdS(N(    R™RGRHRšR>R7RatOnBossHurtListClearR<(tcurNPCRRRLRn((ssE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\BossHurtMng.pytClearHurtValueListÂs    cCsL|jƒ}|tjkrtStj|ƒs2tSt|jƒƒsHtStS(s ¼ì²éÊÇ·ñΪÐèÒª´¦ÀíµÄboss (    RCRDRFRRt
IsGameBossRœRHR(RIRK((ssE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\BossHurtMng.pyR™Ðs cCs¦tjdƒ}||krtStjƒ}tjdƒ}xe|jƒD]W\}}t|ƒdkrkqGn|j|dƒ|dkrŽqGn||krGtSqGWtS(NRORQiii(    RRRRR?RfRSRgR(RRqR‚RƒR„((ssE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\BossHurtMng.pyRœâs   cCsi}tj|tjdƒtjddiƒ}xÊ|jƒD]¼\}}|jtj|dƒ}tj|tj    |dƒtj|tj|dƒtj|tj
|dƒ|t j kr>|j idtj    |6dtj|6dtj
|6ƒq>q>Wt|ƒtj||ƒdS(NitKillBossCntLimiti(R"R#RR t IpyGameDataPYtGetFuncEvalCfgRfR!tDef_PDict_Boss_KillCntt Def_PDict_Boss_KillCntItemAddCnttDef_PDict_Boss_KillCntBuyCntt ShareDefinetDef_Boss_Func_DogztupdateR$tCrossRealmPlayertSetCrossPlayerNomalDict(R(t setCrossDicttkillBossCntLimitDicttindexR,tkillCnt((ssE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\BossHurtMng.pytOnDay÷s
cCst|ƒdS(N(R$(R(((ssE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\BossHurtMng.pytOnLogins
cCsøtjƒ}|jƒg|_tjddiƒ}x›|jƒD]}|dkre||kreqAn|jtj    |dƒ}|jtj
|dƒ}tj ƒ}||_ ||_ ||_|jj|ƒqAWt|jƒ|_tj||ƒdS(NR£iiÿÿÿÿi(RŠttagMCBOSSAttactCntRŒtKillCntInfoListR¤R¥RXR!RR¦R§ttagMCBossCntInfotBossTypetKillCntt
ItemAddCntRRStCntRdRe(R(t
limitIndextpackdataR¯R°R±t
itemAddCnttinfoPack((ssE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\BossHurtMng.pyR$s" 
                 cCs¤|jtj|dƒ}|jtj|dƒ}tjddiƒj|dƒ}|rntj||ƒ}n!tjddiƒj|dƒ}t    |||dƒS(NiR£ii(
R!RR¦R§R¤R¥R=t    PlayerViptGetPrivilegeValuetmax(R(t bossFuncIndext
hasKillCnttitemAddKillCnttkillLimitPrivilegeR,((ssE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\BossHurtMng.pytGetCanKillBossCnt3s!!((((RRRDRdR"RŠR&R¤RiR¬R©RRaR¿R5tjsonRR R8RšRMRNR›RžR¡R™RœR²R³R$RÆ(((ssE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\BossHurtMng.pyt<module>'s<                _Ú