hwj35
2025-06-23 aa0f971ae9a59f0fd98d57b6c1d1663a270be92c
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
Þtscc@s$ddlZddlZddlZddlZddlZddlZddlZddlZddlZddl    Z    ddl
Z
ddl Z ddl Z dfd„ƒYZ defd„ƒYZdefd„ƒYZd„Zd    „Zd
„Zd ed „Zd „Zd„Zd„ZdS(iÿÿÿÿNt HurtValueObjcBs_eZdZd„Zd„Zd„Zd„Zd„Zd„Zd„Z    d„Z
d    „Z RS(
s" ÉËѪ¶ÔÏ󣬿ÉÄÜÊÇÍæ¼Ò¡¢¶ÓÎéµÈ
    cCs+d|_tj|_d|_d|_dS(Nit(t_HurtValueObj__hurtIDtChConfigtDef_NPCHurtTypePlayert_HurtValueObj__hurtTypet_HurtValueObj__hurtNamet_HurtValueObj__hurtValue(tself((sgE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCHurtMgr.pyt__init__(s
             cCs|jS(N(R(R((sgE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCHurtMgr.pyt
GetValueID/scCs ||_dS(N(R(RthurtID((sgE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCHurtMgr.pyt
SetValueID0scCs|jS(N(R(R((sgE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCHurtMgr.pyt GetValueType1scCs ||_dS(N(R(RthurtType((sgE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCHurtMgr.pyt SetValueType2scCs|jS(N(R(R((sgE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCHurtMgr.pyt GetHurtName3scCs ||_dS(N(R(RthurtName((sgE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCHurtMgr.pyt SetHurtName4scCs|jS(N(R(R((sgE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCHurtMgr.pyt GetHurtValue5scCs ||_dS(N(R(Rt    hurtValue((sgE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCHurtMgr.pyt SetHurtValue6s( t__name__t
__module__t__doc__R    R
R R RRRRR(((sgE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCHurtMgr.pyR$s                                tHurtValueObjListcBs³eZdZd„Zd„Zd„Zdd„Zdd„Zd„Zd„Z    d    „Z
d
„Z d e d „Z d „Zd„Zd„Zd„Zd„Zd„Zd„ZRS(sU ÉËѪÁÐ±í¸¸À࣬ÀàËÆ IPY_GameObj.IPY_PlayerHurtList
                    Ö»×ö»ù´¡µÄÉËѪÀÛ¼Ó¡¢ÅÅÐòµÈ¹«¹²Âß¼­
                    
            ×¢Ò⣺
                Ô­Ð­ÖúÉ˺¦ÒòΪÊÇ×îÏÈ×öµÄÂß¼­£¬²âÊԱȽÏÂé·³£¬Ôݲ»Ð޸ļ̳иÃÀ࣬»¹ÊDZ£ÁôÔ­À´µÄµ¥¶À´¦Àí
                ºóÐøÐèÒªÔö¼ÓµÄ²»Í¬ÉËѪ¹æÔòÂß¼­¿ÉÖ±½Ó¼Ì³Ð¸ÃÀà½øÐÐÀ©Õ¹´¦Àí
                
    cCsztjd||ƒ||_||_||_tj|ƒ|_i|_g|_i|_    d|_ d|_ d|_ dS(Ns¼ÓÔØNPCÉËѪÁбí!(t    GameWorldtDebugLogtlineIDtobjIDtnpcIDt FindNPCByIDtcurNPCt!_HurtValueObjList__hurtPlayerDictt_HurtValueObjList__hurtSortListt_HurtValueObjList__hurtDicttNonetcheckHurtValidFunctgetHurtObjPlayerIDListFunct onKilledFunc(RRRR((sgE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCHurtMgr.pyR    Bs                                    cCsVtjd|j|jƒg|_i|_x$|jjƒD]}|jdƒq;WdS(NsÇå³ýNPCÉËѪÁбí!i(    RRRRR"R#R!tvaluesR(RthurtObj((sgE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCHurtMgr.pytClearSs         cCsdS(N((R((sgE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCHurtMgr.pytOnDelete]sRcCs•d}||f}||jkr„tjd||f|j|jƒtƒ}|j|ƒ|j|ƒ|j    |ƒ||j|<n|j|}|S(Ns'Ìí¼ÓÉËѪÁбí¶ÔÏó: hurtID=%s,hurtType=%s(
R$R#RRRRRR RR(RR RRR)thurtKey((sgE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCHurtMgr.pyt __GetHurtObj`s #        cCs…d}||jkr^tjd||f|j|jƒtƒ}|j|ƒ||j|<n|j|}|r|j|ƒn|S(Ns'Ìí¼ÓÉËÑªÍæ¼Ò: playerID=%s,playerName=%s(    R$R!RRRRRR R(RtplayerIDt
playerNamet
hurtPlayer((sgE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCHurtMgr.pyt__GetHurtPlayerns#      c Cs–|j|||ƒ}|jƒ}||}    |j|    ƒ|dkoM|    dk}
|j||ƒ} | jƒ|} | j| ƒ|
r’|jƒn|
S(s( Ìí¼ÓÉËѪ
        @param playerID: ¹±Ï×É˺¦µÄÍæ¼ÒID
        @param playerName: ¹±Ï×É˺¦µÄÍæ¼ÒÃû
        @param addValue: ¹±Ï×É˺¦Öµ
        @param hurtType: ÉËѪÍÅÌåʵÀýÀàÐÍ£¬¿ÉÄÜÊÇÍæ¼Ò¸öÈË¡¢¶ÓÎé¡¢¼Ò×å¡¢ÕóÓªµÈ
        @param hurtID: ÉËѪÍÅÌåʵÀýID
        @param hurtName: ÉËѪÍÅÌåʵÀýÃû
        i(t_HurtValueObjList__GetHurtObjRRt _HurtValueObjList__GetHurtPlayertSort( RR.R/taddValueRR RR)tbefValuetupdValuet    isNewHurtR0tupdHurtPlayerValue((sgE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCHurtMgr.pyt AddHurtValue}s
 
   cCs<|jƒ|jƒkrdS|jƒ|jƒkr8dSdS(Niiiÿÿÿÿ(R(RthurtObjAthurtObjB((sgE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCHurtMgr.pyt__CmpHurtValue›s
cCs+t|jjƒd|jdtƒ|_dS(Ntcmptreverse(tsortedR#R(t_HurtValueObjList__CmpHurtValuetTrueR"(R((sgE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCHurtMgr.pyR4£s'c Cskg}g}x¸|jD]­}|jƒ}|s4qn||j|ƒ7}tjƒ}|jƒ|_|jƒ|_|j    ƒ|_
|t j |_ |t j |_|j|ƒt|ƒdkrPqqW|sÑdStjƒ}|j|_||_t|ƒ|_|j}tjƒ}xN|D]F}    |j|    ƒ}
|
s>qn|
j|ƒsSqntj|
|ƒqWdS(Niú(R"Rt(_HurtValueObjList__GetHurtObjAllPlayerIDtChPyNetSendPackttagMCBossHurtValueR
tHurtIDR tHurtTypeRtHurtNamet ShareDefinetDef_PerPointValuet    HurtValuet HurtValueExtappendtlenttagMCBossHurtValueRankInfoRtObjIDt HurtValueListt    HurtCountR RtGetMapCopyPlayerManagertFindPlayerByIDt CanSeeOthert NetPackCommont SendFakePack( RtsyncPlayerIDListt hurtValueListR)Rt hurtValueObjtbossHurtInfoPackR tcopyPlayerManagerR.tplayer((sgE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCHurtMgr.pyt__SyncHurtList¨s@               i¸ cCsª|j}|sA|rA||jtjƒ|krA|j|ƒSn|jtj|ƒ|jrj|jƒn|jƒ|jƒ|r|j    r|j    ƒqn|j|ƒS(sBË¢ÐÂÉËѪÁбí
        @return: atkPlayer, hurtID, hurtType
        (
R t GetDictByKeyRt Def_NPC_Dict_LastRefreshHurtTickt_HurtValueObjList__GetAtkObjtSetDictR%R4t_HurtValueObjList__SyncHurtListR'(RtticktrefreshIntervaltisKilledR ((sgE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCHurtMgr.pytRefreshHurtListÒs    "     
 
    cCsøddl}d    \}}}|j}|j|jƒƒ}x¯t|jdƒD]›\}}    |    jƒ}
|    jƒ} |j    |    ƒ} i} d}x1| D])}t
j |t j ƒ}|dkr¿q’ntj|ƒdksé|jƒt jkrùd| |<q’n|jƒ s|j||ƒ r)d| |<q’n|j|jƒ|jƒ|ƒsZd| |<q’n||jkryd| |<q’n|j|}|jƒ}||kr’|}|| |
}}}q’q’W|rÒ|||fS|dkrL|rLqLqLW|||fS(
sPµÚÒ»¸ö¿É¹¥»÷µÄ×î´óÉËѪ¶ÔÏó
        @return: atkPlayer, hurtType, hurtID
        iÿÿÿÿNiitdeads"no visible or sightLevel differentsnot in boss areasno hurt(Nii(t AttackCommonR$R tGetRefreshPosAttGetCurRefreshPointIndext    enumerateR"R
R RCRtGetObjt IPY_GameWorldt    gotPlayertGameObjtGetHPtGetPlayerActiontpaDiet
GetVisibletCheckSightLeveltGetIsInRefreshPointtGetPosXtGetPosYR!R(RRfRit    atkPlayert atkHurtTypet    atkHurtIDR t refreshPointtrankR)R Rt playerIDListtplayerDisableReasont maxHurtValueR.R]R0R((sgE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCHurtMgr.pyt __GetAtkObjðsH         *
 
!
 
    cCsj|jƒ}|jƒ}|jr.|j|ƒS|tjkrD|gS|tjkrf|}tj|ƒSgS(N(R
R R&RRtDef_NPCHurtTypeTeamt
PlayerTeamtGetMapTeamPlayerIDList(RR)R RtteamID((sgE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCHurtMgr.pyt__GetHurtObjAllPlayerID%s        cCs‚|s
tS||jƒ|jƒkr~||jƒ|jƒkr~||jƒ|jƒkr~||jƒ|jƒkr~tStS(N(tFalseRwt GetMoveDistRxRB(RtcurPosXtcurPosYR|((sgE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCHurtMgr.pyRv6scCs t|jƒS(N(RNR"(R((sgE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCHurtMgr.pyt GetHurtCountBscCs |j|S(N(R"(Rtindex((sgE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCHurtMgr.pyt    GetHurtAtCscCs|js dS|jdS(Ni(R"R$(R((sgE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCHurtMgr.pytGetMaxHurtValueEscCsdS(N((R((sgE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCHurtMgr.pytGetLastTimeHurtValueFs(RRRR    R*R+R2R3R:RAR4RcR‡RgRaRCRvR‹RRŽR(((sgE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCHurtMgr.pyR8s$        
                      *    5                     tPlayerRankHurtListcBs2eZdZd„Zd„Zd„Zd„ZRS(s     ÅÅÐÐÉËѪÁбí×ÓÀà, ÀàËÆ IPY_GameObj.IPY_PlayerHurtList
                    ÉËѪÁÐ±í¹æÔò:
                            Í³¼Æ¹éÊôÀàÐÍΪ ChConfig.DropOwnerType_RankHurtPlayer
                            ²»Ö§³ÖЭÖú£¬½öͳ¼Æ¸öÈËÉ˺¦£¬²»ÇåÉËѪ£¬¸ù¾ÝÍæ¼ÒÅÅÃû·¢·ÅÓʼþ½±Àø
    cCs,tt|ƒj|||ƒ|j|_dS(N(tsuperRR    t'_PlayerRankHurtList__DoNPCOnKilledLogicR'(RRRR((sgE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCHurtMgr.pyR    Ps cCstjd|j|jƒdS(Ns²»ÇåNPCÉËѪÁбí!(RRRR(R((sgE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCHurtMgr.pyR*VscCsJ|jƒ}|jƒ}tj}tt|ƒj||||||ƒdS(N(t GetPlayerIDt GetPlayerNameRRR‘RR:(RRyR5R.R/R((sgE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCHurtMgr.pyR:\s
      %cCs<|jtjddƒkr+tj|ƒntj|ƒdS(NtBossRebornServerBossi(Rt IpyGameDataPYt
GetFuncCfgtPlayerBossRebornt#DoBossRebornActionBossOnKilledLogictPlayerActHorsePetFeasttDoActBossOnKilledLogic(R((sgE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCHurtMgr.pyt__DoNPCOnKilledLogicds (RRRR    R*R:R’(((sgE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCHurtMgr.pyRIs
            cCstjƒjƒS(N(Rt GetGameWorldt    GetLineID(R((sgE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCHurtMgr.pyt__GetBossLineIDpscCs`|jƒ}|jƒ}t|ƒ}|||f}|tjkr\tj|}|jƒndS(N(tGetIDtGetNPCIDRŸt
PyGameDatatg_npcHurtListDictR*(R RRRtkeythurtList((sgE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCHurtMgr.pytClearPlayerHurtListss     cCse|jƒ}|jƒ}t|ƒ}|||f}|tjkratjj|ƒ}|jƒndS(N(R R¡RŸR¢R£tpopR+(R RRRR¤R¥((sgE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCHurtMgr.pytDeletePlayerHurtLists    i¸ c    Csf|jƒ}|jƒ}t|ƒ}|||f}|tjkrFdStj|}|j|||ƒS(N(R R¡RŸR¢R£Rg(    R RdReRfRRRR¤R¥((sgE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCHurtMgr.pyRgs    cCsQtj|ƒsdStj|ƒtjkr=t|tƒ}ndS|j||ƒS(s Ìí¼ÓÉËѪ
    @param isBounce: ÊÇ·ñ·´µ¯É˺¦£¬·´µ¯É˺¦²»¼ÆÈë·ÇÖ÷¶¯¹¥»÷µÄÍæ¼ÒÉËѪ£¬ÒòΪ¹æ¶¨Íæ¼Ò¹¥»÷ÁíÒ»¸öbossÔòÒªÇå³ýͬµØÍ¼ÉÏÒ»¸öbossµÄ¸ÃÍæ¼ÒÉ˺¦
                                                        ·ÀÖ¹ËÀÍö»Ø¸´»îµãÅÜͼÖб»Ö÷¶¯ÐÍboss¹¥»÷¼ÆÈëÉËѪµ¼ÖÂÇå³ýͬµØÍ¼ÉÏÒ»¸öÖ÷¶¯¹¥»÷µÄbossÉËѪ
    N(Rt
IsGameBosst    NPCCommontGetDropOwnerTypetDropOwnerType_RankHurtPlayert__AddNewHurtListRR:(RytdefNPCtvaluetisBounceR¥((sgE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCHurtMgr.pyR:s cCsu|jƒ}|jƒ}t|ƒ}|||f}|tjkrd||||ƒ}|tj|<ntj|}|S(N(R R¡RŸR¢R£(R t    classNameRRRR¤R¥((sgE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCHurtMgr.pyR­±s    cCsdtj|ƒsdS|jƒ}|jƒ}t|ƒ}|||f}|tjkrYdStj|S(s »ñÈ¡ÉËѪÁÐ±í£¬¿ÉÄÜΪNone
    N(RR©R R¡RŸR¢R£(R RRRR¤((sgE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCHurtMgr.pytGetPlayerHurtList¼s   (RR¢RnR–R˜RšRDRVRIRƒRªRRpRtobjectRRRŸR¦R¨R‡RgR:R­R²(((sgE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCHurtMgr.pyt<module>s.             ÿ'