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
:,9hc@sxddlZddlZddlZddlZddlZddlZddlZddlZddlZddl    Z    ddl
Z
ddl Z ddl Z ddl Z ddlZddlZddlZddd„ƒ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((srD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\BossHurtMng.pyt__init__Cs
            cCs|j|7_dS(N(R(Rtvalue((srD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\BossHurtMng.pyt AddHurtValueMs(t__name__t
__module__RR    (((srD:\SG_ServerCode\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((srD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\BossHurtMng.pyRYscCs(||_||_g|_g|_dS(N(RRthurtListtqueryPlayerIDList(RRR((srD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\BossHurtMng.pyR as
                cCs'||jkrdS|jj|ƒdS(N(Rtappend(RR((srD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\BossHurtMng.pytAddQueryPlayerlsc 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((srD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\BossHurtMng.pytAddPlayerHurtValueus6          
          cCsJt}x*|jD]}|j|krt}PqqW|s=dS|j}|S(Ni(RRRRR(RRR)R*R0((srD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\BossHurtMng.pytGetPlayerHurtValues    cCs.t|jdtjdƒdtƒ|_|jS(NR-Rtreverse(tsortedRtoperatort
attrgetterR(R((srD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\BossHurtMng.pytGetSortHurtList¬s'(R
R RR RR1R2R7(((srD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\BossHurtMng.pyR Ts                      (    t HurtValueMngcBsPeZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z    RS(cCsi|_tjdƒdS(NsHurtValueMng 222__init__£¡(tobjHurtListDictRR(R((srD:\SG_ServerCode\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-((srD:\SG_ServerCode\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((srD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\BossHurtMng.pytFindBossHurtListÌs cCs#tjƒjƒ}d|||fS(Ns%s_%s_%s(Rt GetGameWorldt    GetLineID(RRRtlineID((srD:\SG_ServerCode\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((srD:\SG_ServerCode\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((srD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\BossHurtMng.pytGetPlayerBossHurtös    c#    Cs|jƒ}|jƒ}tjd||fƒ|j||ƒ}|jƒ}t|ƒdkr’|d}|j}|jt    j
||f|ƒn|jt    j
||fdƒtj ƒ}t j dƒ}    |    j|ƒ}
|
dkrHt j dƒ} | \} } }|
jƒ}|jƒtjƒjƒtjk}d}x |D]}xñt||ƒD]à}|t|ƒdkrštjd|t|ƒ||fƒPn||}|j}|d}| ||f}|
|}tjd||t|ƒ|fƒ|rWtj ƒj|ƒ}|r7tj|||j||ƒq7qWqWW|}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 krqøn|j$|dƒ|dkr?qøn||    krø|    |}PqøqøWx’|D]Š}|j}|j|ƒ}|sŽqdn|rdtj%|ƒ}|rîx?|D]4\} }!}"t&j'|| |!dtj(tj)gƒq°WqîqdqdWtj*|||ƒ|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 GetMapFBTypeRDtfbtNulltrangeRtstrtFindPlayerByIDtFBLogictOnHurtValueOrderRRtGetBossHurtListPackRt NetPackCommont SendFakePackR?titemstGetGameWorldDictByKeytGetResultByRandomListt ItemControlertGivePlayerItemtrptItemt rptAnyWheretOnBossKilledHurtListR (#RRIRRRLt sortHurtListt maxHurtPlayerRt    playerMngt bossAwardDictt    awardDicttbossAwardMailInfottitletcontenttgetDaystprizeOrderListtisFBtpreOrdert
prizeOrdert
prizeIndexR*tordert mailContentt giveItemListR(tqueryPlayerListtsendPacktactionRandAwardListt gameWorldMgrtbossActionAwardDicttkeyInfot randAwardListtitemIDtitemCnttisBind((srD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\BossHurtMng.pytDoLogicOnBossKilled sŒ   
        
     
    
 
    &        
     3cCs|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((srD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\BossHurtMng.pyRbts*     
                         !(
R
R RR<R>R:RMRNRˆRb(((srD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\BossHurtMng.pyR8³s             
                icCs't|ƒsdStj|||ƒdS(N(t__CheckIsNeedProcessBosstg_hurtValueMngRM(R(RIR((srD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\BossHurtMng.pyRM’s cCs t|ƒsdStj||ƒS(Ni(R˜R™RN(R(RI((srD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\BossHurtMng.pyRNs cCs!t|ƒsdStj|ƒdS(N(R˜R™Rˆ(RI((srD:\SG_ServerCode\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>RRRbRRRcRd(R(t
clientDataRRRLR((srD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\BossHurtMng.pytOnQueryBossHurtList²s         cCsmt|ƒsdS|jƒ}|jƒ}tj||ƒ}|jƒ}tj|||ƒtj||ƒdS(N(    R˜RGRHR™R>R7R`tOnBossHurtListClearR<(tcurNPCRRRLRm((srD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\BossHurtMng.pytClearHurtValueListÂs    cCsL|jƒ}|tjkrtStj|ƒs2tSt|jƒƒsHtStS(s ¼ì²éÊÇ·ñΪÐèÒª´¦ÀíµÄboss (    RCRDRFRRt
IsGameBossR›RHR(RIRK((srD:\SG_ServerCode\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?ReRSRfR(RRpRR‚Rƒ((srD:\SG_ServerCode\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 IpyGameDataPYtGetFuncEvalCfgReR!tDef_PDict_Boss_KillCntt Def_PDict_Boss_KillCntItemAddCnttDef_PDict_Boss_KillCntBuyCntt ShareDefinetDef_Boss_Func_DogztupdateR$tCrossRealmPlayertSetCrossPlayerNomalDict(R(t setCrossDicttkillBossCntLimitDicttindexR,tkillCnt((srD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\BossHurtMng.pytOnDay÷s
cCst|ƒdS(N(R$(R(((srD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\BossHurtMng.pytOnLogins
c    Cs6tjƒ}|jƒg|_tjddiƒ}xÙ|jƒD]Ë}|dkre||kreqAn|jtj    |dƒ}|jtj
|dƒ}|jtj |dƒ}tj ƒ}||_ ||_||_||_|jtj|dƒ|_|jj|ƒqAWt|jƒ|_tj||ƒdS(NR¢iiÿÿÿÿi(R‰ttagMCBOSSAttactCntR‹tKillCntInfoListR£R¤RXR!RR¥R§R¦ttagMCBossCntInfotBossTypetKillCntt
ItemAddCnttBuyCnttDef_PDict_Boss_KillCntTotalt KillCntTotalRRStCntRcRd(    R(t
limitIndextpackdataR®R¯R°t    hasBuyCntt
itemAddCnttinfoPack((srD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\BossHurtMng.pyR$s( 
                     cCsÝ|jtj|dƒ}|jtj|dƒ}|jtj|dƒ}tjddiƒj|dƒ}|r‡tj    ||ƒ}n!tjddiƒj|dƒ}|t
j ||ƒ7}t d||||ƒ|fS(NiR¢ii( R!RR¥R¦R§R£R¤R=t    PlayerViptGetPrivilegeValuetPlayerGoldInvestt GetAddBossCnttmax(R(t bossFuncIndext
hasKillCnttitemAddKillCntR¿tkillLimitPrivilegeR,((srD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\BossHurtMng.pytGetCanKillBossCnt5s!!(((( RRRDRcR"R‰R&R£RhR«R¨RR`RÂRÄR5tjsonRR R8R™RMRNRšRR R˜R›R±R²R$RË(((srD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\BossHurtMng.pyt<module>'s>                 _Ù