hxp
2025-08-25 b7154533a3f9db72d0dfc28f21b19ee4aadf1b51
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
9¬hc    @sPddlZddlZddlZddlZddlZddlZddlZddlZddlZddl    Z    ddl
Z
ddl Z ddl Z ddl Z ddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl!Z!ddl"Z"ddl#Z#ddl$Z$ddl%Z%ddl&Z&ddl'Z'ddl(Z(ddl)Z)ddl*Z*ddl+Z+ddl,Z,ddl-Z-ddl.Z.ddl/Z/ddl0Z0ddl1Z1ddl2Z2ddl3Z3ddl4Z4ddl5Z5ddl6Z6e7Z8e9dƒ\Z:Z;Z<Z=Z>Z?d„Z@e7d„ZAd„ZBd„ZCd„ZDd„ZEd    „ZFd
„ZGd „ZHd „ZId „ZJd„ZKd„ZLd„ZMd„ZNd„ZOd„ZPeQd„ZRd„ZSe7e7eQgdgdeQd„ZTddeUdgd„ZVdZWe7e7e7e7e7dd„ZXd„ZYd„ZZd „Z[d!„Z\d"„Z]d#„Z^d$„Z_d%„Z`d&„Zad'„Zbd(„Zcd)„Zdd*„Zed+„ZfeQeUd,„ZgeUd-„Zhdddddd.„Zid/„Zjd0„Zkd1„Zlddd2„Zmd3„Znd4„ZoeUgd5„Zpd6„Zqd7„Zrd8fd9„ƒYZsd:„Ztd;„Zud<„Zvd=„Zwd>„Zxd?„Zyd@„ZzdA„Z{dB„Z|dC„Z}dD„Z~dE„ZdF„Z€dG„ZdH„Z‚deQeQdI„ZƒddJ„Z„e7dK„Z…dL„Z†dM„Z‡gdN„ZˆdO„Z‰dP„ZŠe7dQ„Z‹dR„ZŒgdS„ZdT„ZŽdU„ZdV„ZdW„Z‘dX„Z’dY„Z“ddZ„Z”d[„Z•d\„Z–d]„Z—d^„Z˜dS(_iÿÿÿÿNicCsrtjtd|jƒdfƒ}|dkrG|jƒjtjƒn
||ƒ|j    t
ƒ|j tj ƒdS(Ns AIType_%d.%stDoInit( t    GameWorldt GetExecFunctNPCAIt    GetAITypetNonet GetNPCAngrytInittChConfigtDef_Default_NPC_Angry_CounttSetIsNeedProcesstFalsetSetTickTypeCounttTYPE_NPC_Tick_Count(tcurNPCtcallFunc((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytInitNPC^s" 
 cCs“t|dƒr(t|jƒ|jƒƒS|r‰tj|ƒr‰|jƒ}tjtj|ƒƒ}tj    d||ƒ}|r‰|jƒSn|jƒS(NtGetCurLVtNPCRealmStrengthen(
thasattrtmaxRtGetLVt PlayerControltGetRealmDifficultytGetNPCIDtGetDifficultyRealmLVt IpyGameDataPYtGetIpyGameDataNotLog(Rt    curPlayertnpcIDt needRealmLVtrealmNPCIpyData((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGetNPCLVms  cCs5tjd|ƒ}|s1tr-tjƒ}n|S|S(NtNPC(RRR tIPY_NPC(Rt    npcDataEx((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt GetNPCDataPyys cCs
|jƒS(N(t
GetMAtkMin(R((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt
GetRealmLV‚scCs |j|ƒS(N(t
SetMAtkMin(RtrealmLV((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt
SetRealmLVƒscCs
|jƒS(N(t
GetWindDef(R((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGetIsLVSuppress„scCsdS(Ni((R((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGetFightPowerLackAtkLimit…scCsdS(Ni((R((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGetSuppressFightPower‡scCs|jt|tjƒƒS(N(t SetThunderDeftmint ShareDefinetDef_UpperLimit_DWord(Rtvalue((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytSetSuppressFightPower‰scCs
|jƒS(N(t
GetFireDef(R((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGetCommendFightPowerŠscCs
|jƒS(N(t GetThunderAtk(R((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGetDropOwnerType‹scCs tj|ƒS(N(tGameObjt
GetFaction(R((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR9ŒscCs
|jƒS(N(t GetPoisionAtk(R((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGetSkillAtkRatescCs
|jƒS(N(t
GetFireAtk(R((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt GetFinalHurtŽscCs |j|ƒS(N(t
SetFireAtk(Rthurt((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt SetFinalHurtscCs
|jƒS(N(t
GetWindAtk(R((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGetSkillEnhancescCs
|jƒS(N(t GetPoisionDef(R((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt GetNPCSeries‘scCs&|jƒ}tjd|ƒ}|s(dSd}d}tjƒ}|jƒr||jtjƒ}|s|tj    d|ƒdSn|j
ƒ}|dkr¯tj ƒj t jƒ}nÛ|dkrÐ|jtjƒ}nº|dkrñ|jtjƒ}n™|dkr6|jtjƒ}    |jtjƒ}
tj|    |
ƒ}nT|d    krŠtj|jƒƒ} tjd
|| ƒ} | r| jƒ}qŠd}n|dkr|jƒtjtjgkrd} |jtjƒ}|rêtj|tj ƒ} n| r| jƒ}qn|j!ƒr&t"||jƒƒ}n|dkrT| rTtj    d ||fƒdSt#j$||ƒ}d |kr|d }ni}|j%|ƒ|sœdS|rÇ|j&ƒ|krÇ|j'|t(ƒnt)j*|ƒ}t)j+|ƒ}x—|j,ƒD]‰\}}t-|d |ƒs3|dkròt.||ƒqòqòn|dkrRt)j/||ƒqòt0|tj1ƒ}t2|d |ƒ|ƒqòWt)j*|ƒ}||kr÷|r³t)j3||ƒq÷|r÷t4|||ƒ}t)j3||ƒ|j5ƒ|j6ƒq÷n|r"|jƒtj7kr"t8||ƒndS(s½NPCÊôÐÔÔöÇ¿, NPCÊôÐԳɳ¤ÓÉÁ½¸öÒòËØ¾ö¶¨
    1.NPC³É³¤µÈ¼¶£¬³É³¤µÈ¼¶¾ö¶¨³É³¤ÊôÐÔ£¬Óë³É³¤±í½áºÏʹÓÃ
            ¿ÉÉèÖõØÍ¼NPCµÈ¼¶¶¯Ì¬³É³¤£¬µ«ÊÇÒѾ­Ë¢Ð³öÀ´µÄNPCµÈ¼¶²»±ä£¬¶¯Ì¬µÈ¼¶±ä¸üºóˢеÄNPCµÈ¼¶²Å»áʹÓÃ×îеȼ¶
            
    2.Íæ¼ÒÈËÊýÒòËØ£¬¾ö¶¨NPCÊôÐԵĶîÍâ³É³¤ÏµÊý£¬¿Éµ¥¶ÀʹÓ㬻òÕߺÍ1Ò»ÆðʹÓÃ
            ¿ÉÉèÖÃÂíÉÏË¢ÐÂNPCÊôÐÔ
            ³ýѪÁ¿Í⣬ÆäËûÊôÐÔ»á¸ù¾Ý¶¯Ì¬ÒòËØÖ±½Ó±ä¸ü
            ÑªÁ¿»á¸ù¾ÝѪÁ¿°Ù·Ö±È¶¯Ì¬±ä¸üÖÁÏàÓ¦µÄ°Ù·Ö±È
    t NPCStrengthenNisCNPCÅäÖÃÁ˰´Íæ¼ÒÈËÊý³É³¤ÀàÐÍ£¬µ«ÊÇÎÞ·¨»ñÈ¡µ½¶ÔÓ¦µÄÍæ¼ÒÈËÊý£¡npcID=%siiiiiRsSNPCÅäÖÃÁ˳ɳ¤µÈ¼¶ÀàÐÍ£¬µ«ÊÇÎÞ·¨»ñÈ¡µ½¶ÔÓ¦µÄ³É³¤µÈ¼¶Öµ£¡npcID=%s,lvStrengthenType=%stLVsSet%st
FightPowertMaxHP(ii(ii(9RRRRt    GetGameFBtGetIsStrengthenByPlayerCounttGetGameFBDictByKeyRtDef_FB_NPCStrengthenPlayerCnttErrLogtGetLVStrengthenTypet GetGameWorldtGetGameWorldDictByKeyR0t"Def_Notify_WorldKey_WorldAverageLvtDef_FB_NPCStrengthenMaxLVtDef_FB_NPCStrengthenAverageLVtDef_FB_NPCStrengthenMinLVtrandomtrandintRRt GetSightLevelRtGetTypetntPriWoodPilePVEtntPriWoodPilePVPRt GetDictByKeyt Def_NPC_Dict_PriWoodPilePlayerIDtGetObjt IPY_GameWorldt    gotPlayertGetCmpNPCBaseLVRtFBLogictGetFBNPCStrengthenAttrtupdateRtSetCurLVR R8tGetMaxHPtGetHPtitemsRR3tSetMaxHPR/R1tgetattrtSetHPtintt    Notify_HPt Notify_MaxHPtntRobott__OnFBRobotReborn(RtisReborntisDynRtstrengthenIpyDatat strengthenLVtstrengthenPlayerCnttgameFBtlvStrengthenTypet    randMinLVt    randMaxLVR(RtownertsummonPlayerIDt npcFBAttrDicttattrDicttbefMaxHPtbefHPtattrKeytstrengthenValuetaftMaxHPtaftHP((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytDoNPCAttrStrengthen“s’
            *       
c Cs:tjƒjƒ}|jƒ}tjddƒ}tj|jƒƒ}t    j
j |iƒ}|||<|t    j
|<||}g}x[|j ƒD]M\}    }
||
kr¬qŽnt |    tƒrË|j|    ƒqŽ|t|    ƒ7}qŽWtjd||||fƒ|jƒ} x|D]} | j| ƒqWtj||ƒdS(Nt
FBRobotCfgis2¸ø»úÆ÷ÈËNPC¼¼ÄÜ: objID=%s,robotJob=%s,npcLV=%s, %s(RROt    GetLineIDtGetIDRtGetFuncEvalCfgRUtchoicetkeyst
PyGameDatatg_fbRobotJobDicttgetRgt
isinstanceRktappendtlisttDebugLogtGetSkillManagertLearnSkillByIDRatOnRandomRobotJob( RtnpcLVtlineIDtobjIDt jobSkillDicttrobotJobtlineRobotJobDictt skillInfoDictt skillIDListt    skillInfotneedLVt skillManagertskillID((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRos* 
 
   iic Csd} d} g} | | | fS(s¸øÍæ¼Ò»÷ɱNPCµôÂä½±Àø
    @param mapID: »÷ɱµÄNPCËùÔÚµØÍ¼ID£¬×¢Òâ´ÎµØÍ¼²¢²»Ò»¶¨ÊÇÍæ¼Òµ±Ç°µØÍ¼
    @param npcCountDict: Ö´Ðе¥´ÎʱËù»÷ɱµÄnpcÊýÁ¿×Öµä {npcID:count, ...}
    @param exp_rate: »÷ɱ¹ÖÎïÏíÊܵľ­Ñé±ÈÀý
    @param mailTypeKey: »ñÈ¡ÎïÆ·±³°ü¿Õ¼ä²»×ãʱ·¢Ë͵ÄÓʼþÄ£°åkey
    @param isMail: ÊÇ·ñÇ¿ÖÆ·¢ËÍÓʼþ£¬ÈôÊÇÔò²»¿¼ÂDZ³°ü¿Õ¼ä£¬·ñµÄ»°Ö»ÔÚ±³°ü¿Õ¼ä²»×ãʱ²Å·¢ËÍÓʼþ
    @param extraItemList: ¹Ì¶¨¸½¼ÓÎïÆ·ÁÐ±í£¬Èç¹ûÐèÖ´Ðжà´Î£¬Ôò´Ë¹Ì¶¨²ú³öÁбíÐèÔÚÍâ²ã´¦ÀíºÃ£¬Äڲ㲻×ö¶à´ÎÖ´Ðд¦Àí¡£[[itemID, itemCount, isAuctionItem], ...]
    @param prizeMultiple: ½±Àø±¶Öµ, ¶ÔËùÓн±ÀøÓÐЧ£¬µÈÓÚ»÷ɱ¶à´ÎNPC£¬¶à±¶¸½¼ÓÎïÆ·
    @param dropItemMapInfo: µôÂ䵨°åÐÅÏ¢ [dropPosX, dropPosY, ÊÇ·ñ½ö×Ô¼º¿É¼û, ¶ÑµþÎïÆ·ÊÇ·ñÉ¢¿ª]
    @param curGrade: ÆÀ¼¶
    @param isVirtualDrop: ÊÇ·ñ¸øÎïÆ·ÐéÄâµôÂä±íÏÖ
    i((RtmapIDt npcCountDicttexp_ratet mailTypeKeytisMailt extraItemListt prizeMultipletdropItemMapInfotcurGradet isVirtualDropttotalExpt
totalMoneyt jsonItemList((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGiveKillNPCDropPrizest ItemNoPickUpcCsdS(N((Rt giveItemListRtdropPosXtdropPosYtisDropDisperseR£textraVirtualItemList((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytDoGiveItemByVirtualDrop2si@BR!c    Cs’tjstjdƒgSd||f}|tjkrItj|}nfi}tjƒ}    x'tjjƒD]}
x |
D]} |    j    | ƒxït
|    j ƒƒD]Û} |    j | ƒ} | j ƒsÅqžn|dkrìtj| ƒ|krìqžn|dkr| jƒ|krqžn| jƒ}| jƒ}| jƒ}| jƒ}||krYg||<n||}|j|||gƒqžWqxWqkW|tj|<tjd||tjfƒg}x§|jƒD]™\}}|ræ||kræqÂnxr|D]j}|\}}}|r |r ||kr qín|dk}|dkrJ||krJqín|j|ƒqíWqÂW|sŽtjd|||||||fƒn|S(NsµØÍ¼»¹Î´Æô¶¯ºÃÔØÎïÆ·!s%s_%ss(»º´æ²ú³ö×°±¸ID: classLV_color=%s, %s, %sisWÕÒ²»µ½¿É²ú³öµÄ×°±¸ID: %sID=%s,classLV=%s,color=%s,isSuit=%s,placeList=%s,itemJobList=%s(RŠt
InitPyItemRRMtg_filterEquipDictt GetGameDataRtDef_PlaceEquipTypetvaluestFilterItemByTypetxrangetGetFilterItemCountt GetFilterItemt GetCanNPCDropRt
ItemCommontGetItemClassLVt GetItemColort
GetSuiteIDt GetJobLimitt GetEquipPlacet GetItemTypeIDRŽtLogRg(tfindIDtclassLVtcolortisSuitt    placeListt itemJobListtfindTypetkeytfilterItemIDDicttgameDatat itemTypeListtitemTypetititemDatatsuiteIDtitemJobt    itemPlacetitemIDt placeItemListt
itemIDListtitemInfot    curIsSuit((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__GetEquipIDList9sZ         !      
"        cCs>tjddƒ}|dkr"dS|||dkr:dSdS(Niii ièi(RURV(tcurTicktlastActionTicktcurTime((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytIsInActionTime~s  cCs|jƒtjkrtStS(N(tGetGameNPCObjTypeR^t
gnotSummontTrueR (R((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt IsSummonNPCscCsIxBtd|jƒƒD]+}|j|ƒ}|jƒ}|jƒqWdS(Ni(trangetGetSummonCounttGetSummonNPCAtRtClear(RRÓt    summonNPCtangry((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytClearSummonAngry_Player˜s cCsD| st|dƒ rdS|jƒ}|dkr7dStj|ƒS(NtGetOwner(RRíRRt GetObjDetail(RêtcurSummonOwner((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGetSummonOwnerDetel¢s   cCs3t|ƒ}|stS|jƒtjkr/tStS(N(tGetNpcObjOwnerDetailR tGetGameObjTypeR^R_Rä(tnpcObjt ownerDetail((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGetNpcObjOwnerIsPlayer³s  cCsU|jƒ}d}|tjkr0t|ƒ}n!|tjkrQtj|ƒ}n|S(N(RâRR^RãRðtgnotPett
PetControlt GetPetOwner(Rót
npcObjTypeRô((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRñÄs cCs±|dkrdSt|dƒsN|jtjƒ}|rJtj|tjƒSdS|j    ƒ}|dkrjdStj|j
ƒ|ƒ}|dkr­|tjkr­|j ƒr­dS|S(NRí( RRR[Rt!Def_NPC_Dict_SummonMapNPCPlayerIDRR]R^R_RíR†tIsEmpty(t
curobjTypet    curSummonRzRïtcurSummonOwnerDetel((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGetSummonNPCOwnerØs   'c
CsÜtjƒ}|jƒ}|jƒ}d}x«|D]£}|j||d||dƒ}|seq1nxltd|jƒƒD]U}|j|ƒ}    tj    |    ƒdkr«q{n|    j
ƒt j krÆq{n|d7}q{Wq1W|S(Nii( RtGetMaptGetPosXtGetPosYt    GetPosObjRæt GetObjCountt GetObjByIndexR8RfRòR^R_(
RtmatrixtgameMaptsrcPosXtsrcPosYtcurPlayerCounttcurPostmapObjRÓtcurObj((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGetPlayerCountInSightByMatrixùs     "cCsèg}|jƒ}xÏtd|ƒD]¾}|j|ƒ}|dkrIq"n|jƒtkraq"n|jƒ}|tjkr‚q"n|j    ƒr”q"nt
j |ƒdkr¯q"nt j |jƒ|ƒ}|sÓq"n|j|ƒq"W|S(Ni(tGetInSightObjCountRætGetInSightObjByIndexRt
GetVisibleR RòR^R_RûR8RfRR]R†RŽ(RtplayListt seeObjCountRÓtseeObjt
seeObjTypet curTagPlayer((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGetInSightPlayerList_NPCs(    c Cssg}|jƒ}xZtd|ƒD]I}|j|ƒ}|dkrIq"n|jƒtkraq"n|jƒ}|tjkr‚q"n|j    ƒr”q"nt
j |ƒdkr¯q"n|j ƒ}||j ƒkrà|j |ƒq"n|sìq"n|jƒ}    tj||ƒ}
|
sq"n|
jƒ} |    dks"| dkr@q"n|    jƒ| jƒkr^q"n|j |
ƒq"W|S(Ni(RRæRRRR RòR^R_RûR8RfR†RŽtGetTeamRR]t    GetTeamID( RRêt    checkTeamRtseePlayerCountRÓRRtseeObjIDt curPlayTeamRt
curTagTeam((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGetInSightPlayerList_SummonNPCEs@        c Csªd}d}|dks$|dkr(tSx{td|jƒƒD]d}|j|ƒ}|dkreq>ntj|ƒdkr€q>n|jƒs’q>ntj    ||ƒrªq>ntj
|j ƒ|j ƒ|j ƒ|j ƒƒ}||krìq>ntj |jƒ|jƒƒ}    |    dkr3tjd|jƒƒq>ntj||    ƒsKq>ntj||    d|ƒd}
|
tjkr|q>n|d7}||ksž||kr>tSq>WtS(Nii s&curNPC = %s ²éÕÒ¶ÔÏó, »ñµÃ¶ÔÏóʵÀýʧ°Üi(RäRæRRRR8RfRRt    IsSameObjtGetDistRRR]R†RòRÆRt AttackCommontCheckCanAttackTagt
BaseAttacktGetTagRelationRtType_Relation_EnemyR ( Rt    checkDistt
checkCounttticktcounttmaxCountRÓRttagDistt seeObjDetailtrelation((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt&CheckCanAttackTagLimitCountInSight_NPCƒs<  0  
cCsgS(N((((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGetDefaultMaxAngryNPCIDListàscCs9|jƒtjkrdS|jƒs5|jtƒndS(N(t GetCurActionR^tlaNPCDietGetIsNeedProcessR
Rä(R((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytSetNPCInBattleStateès
 cCsp|jƒg}|jƒ}xHt|jƒƒD]4}|j|ƒ}|sOq.n|j|jƒƒq.Wt|ƒS(N(t
GetAtkDistR‘Ræt GetSkillCounttGetSkillByIndexRŽR(RtdistListRžtindextskill((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGetNPCMaxAtkDistüs cCs»|jƒtg|jƒtg|jƒtg|jƒtgg}|rd|j|jƒtgƒn|jƒtj    kr•|j|j
ƒt gƒn|r·|j|j ƒtgƒn|S(N( t GetBuffStateR tGetDeBuffStatetGetProcessBuffStatetGetProcessDeBuffStateRŽtGetAuraRâR^Röt GetPassiveBufRätGetActionBuffManager(Rt getActionBufft getAuraBufftbuffRefreshList((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGetNPCBuffRefreshLists$cCsN|jƒ|krdS|jƒ}|jƒ}|tjkr‘|j|ƒ|t|dƒkr|jtj    ƒ r|j
t|dƒƒndS|tj krè|j|ƒ||dkrä|jtj    ƒ rä|j
|dƒndS|tj kr-|jtj ƒ|jtj    ƒs)|j
|ƒndSt jd||jƒfƒdS(Nis.ChangeNPCMoveType unKnowType = %s, curNPC = %s(tGetCurMoveTypetGetSpeedt GetOrgSpeedR^tmtRuntSetCurMoveTypeRkR[RtDef_NPC_Dict_SpeedPertSetSpeedtmtSlowtmtNormalRRMR(Rt changMoveTypetchangeSuperSpeedt curNPCSpeedtcurNPCBaseSpeed((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytChangeNPCMoveType+s*   ) #c
CsOtjƒjƒ}|sdStjƒjƒ}    |j|ƒ|j|    ƒ|dkrd|j|ƒnt|ƒ|dkrŠ|j    |ƒn|dkr¬|j
t j |ƒn|dkrÈ|j |ƒn|dkrê|j
t j|ƒn|jƒt jkrt||jƒƒn|j||tƒt|ƒj|    ƒtj||    ƒ|S(Ni(Rt GetNPCManagertAddPlayerSummonNPCROtGetTickt SetNPCTypeIDt SetBornTimet    SetAITypeRt SetLastTimetSetDictRRút SetSightLeveltDef_NPC_Dict_SummonRefreshIDRXRnRoRtRebornR t
NPCControltDoNPCRebornCommLogicRatDoFBRebornSummonNPC(
tnpcIdtrebornXtrebornYtaiTypetlastTimetplayerIDt
sightLevelt    refreshIDRýR)((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt SummonMapNpcXs.   
    cCs‰tjƒ}|jƒ||_||_||_tjƒ}xEt|j    ƒƒD]1}|j
|ƒ}|sqqPnt j ||ƒqPWdS(N( tChPyNetSendPackttagMCSummonMapNPCRétNPCIDtPosXtPosYRtGetMapCopyPlayerManagerRætGetPlayerCounttGetPlayerByIndext NetPackCommont SendFakePack(tsummonIDt
rebornPosXt
rebornPosYtmapNPCt playerManagerR9R((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__NotifyMapPlayerSummonMapNPC€s 
             cCstjƒj|ƒ}|j}tj|ƒ}|s7dS|jƒtjtjgkrYdS|j    tj
ƒ}|j ƒ|krdSt |ƒdS(N( RtGetPlayerManagerRstObjIDt FindNPCByIDRXRRYRZR[R\t GetPlayerIDt    SetDeadEx(R9t
clientDataR)RR–RRz((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytOnRecyclePriWoodPile—s    
cCsStjƒj|ƒ}|j}|j}|j}|j}t|||||ƒdS(N(RR|RsRntCounttHPtHPExtSummonPriWoodPile(R9RR)RRR*thpthpEx((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytOnSummonPriWoodPile°s                c    Cs.tj|ƒ}tj|ƒ}|rctj|||||ƒsctjd||||fƒdSn|dkr~d\}}n|jƒ}|tj    kr©gtj    |<ntj    |}d}    t
|ƒ}
t ||    |
ƒ} tj d|||    |
| ||fƒ| dkrdStj ƒ} x
t| ƒD]ü} | jƒ}|j|ƒ|j|jƒƒt|ƒ|jtj|ƒtj|jƒ|jƒdƒ}|j|jƒ|jƒtƒt|ƒjdtƒ|sÛ|r|t j!|}t"j#||ƒt"j$||ƒn|j%ƒ|j&|ƒq*WdS(    s ÕÙ»½Ë½ÓÐרÊôľ׮¹Ö
    s3ÎÞ·¨ÕÙ»½Ä¾×®¹Ö!mapID=%s,lineID=%s,npcID=%s,count=%sNiiisPÕÙ»½Ä¾×®: npcID=%s,count=%s,maxCount=%s,nowCount=%s,summonCount=%s,hp=%s,hpEx=%sRp(ii('RtGetCustomMapIDtGetCustomLineIDRatOnCanSummonPriWoodPileRRMRRŠtg_playerPriWoodPileNPCDicttlenR/RRUR»RVRXR]RWRR\RR\tGameMaptGetEmptyPlaceInAreaRRR_R R`t ResetNPC_InitRäR0tDef_PerPointValueR8RjRht NotifyAppearRŽ(RRR*R‡RˆR R•RhtplayerPriWoodNPCListR+tnowCountt summonCountt
npcManagert_Rêt    summonPosthpTotal((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR†¹sH            
! 
cCs\|jƒ}|tjkrdStjj|ƒ}x$|D]}|sJq8nt|ƒq8WdS(N(RRŠRtpopR€(RRhR”Rê((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytClearPriWoodPileñs  cCsg}|jƒ}|jƒ}tjd||fƒx6t|jƒƒD]"}|j|ƒ}|j|ƒqHWx|D]}t|ƒquW|j    ƒt
j kr®t j |ƒn|jtjƒ}|dkrâ|jtjdƒntj|ƒ}|r|jtjƒjƒƒntj|ƒrÉtjd|ƒ}    |    r‘|    jƒtjtjgkr‘t|dƒtjƒjtj |tjƒjƒƒnt!j"|ƒ|tj#ddƒkrÉt$j%|ƒqÉnt&j'|ƒ|j(ƒtj)kr8tjƒj*ƒ}
t+j,j-|
iƒ} | j.|jƒdƒ| t+j,|
<n|jtj/ƒ} | dkrÎ| t+j0krÎt+j0| } xY| D]N}|ry|jƒ|jƒkry| j1|ƒ| sÃt+j0j.| ƒnPqyqyWnt2}|j|jtj3ƒ|jtj4ƒ|jtj5ƒ|ƒdS(NsSetDeadEx objID=%s,npcID=%sitBOSSInfotCrossYaomoBossi(6R†RRRRæRçRèRŽR€RòR^tgotNPCRat DoFB_NPCDeadR[RRúR\tNPCRealmRefreshtGetTagNPCRefreshtSetDeadRORWt
IsGameBossRRtGetMapIDtDef_FBMapID_SealDemontDef_FBMapID_ZhuXianBosstGameServe_GameWorldBossStateRIt SetGameFBDicttMap_NPC_WorldBossDeadTicktChNPCt OnNPCSetDeadt
GetFuncCfgtPlayerCrossYaomoBosstOnCrossYaomoBossDeadR"tClearTeamPlayerHurtValueRXRnR…RŠR‹RŒR›R\RtremoveRätDef_NPCDead_ReasontDef_NPCDead_KillerTypetDef_NPCDead_KillerID(Rt summon_ListR–tnpcidR9t curSummonNPCRêRzt
refreshObjtipyDataR•R™tpriWoodPilePlayerIDtpriWoodPileNPCListt
priWoodNPCt notifyClient((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR€sZ    $ ,      
c        Cs¦tjƒjƒ}tjƒjƒ}tjƒjƒ}t||||||||gƒ}tjƒjdddd|t|ƒƒtj    d|||||fƒdS(NitKillGameWorldBosssHBoss±»»÷ɱ: bossID=%s,mapID=%s,realMapID=%s,copyMapID=%s,killerIDList=%s(
RROR¥t GetRealMapIDt GetCopyMapIDtstrR|tGameServer_QueryPlayerResultRŽR(    tbossIDtkillPlayerNamet    hurtValuetisNotifyt killerIDListR t    realMapIDt    copyMapIDtkillMsg((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGameServer_KillGameWorldBossJs$( c    Csœtjƒjƒ}tjƒjƒ}tjƒjƒ}t|||||gƒ}tjƒjddddd|t|ƒƒtj    d|||||fƒ|s˜|t
j kr7t
j |}tjƒjƒ}tjƒjƒ}t j ||||ƒ}|sdS|jƒ}tjƒjtj||fdƒq˜|t
jkrxtjƒ}tjƒjtj||fdƒq˜tjƒjtj|dƒndS(NitGameWorldBossStates%ssEBoss״̬±ä¸ü: bossID=%s,isAlive=%s,mapID=%s,realMapID=%s,copyMapID=%s(RROR¥R¿RÀRÁR|RÂRŽRRtDef_CrossZoneMapTableNameRtGetIpyGameDatat    GetZoneIDtSetGameWorldDictR0t,Def_Notify_WorldKey_GameWorldBossRebornCrosstDef_CrossDynamicLineMaptFBCommontGetCrossDynamicLineMapZoneIDt'Def_Notify_WorldKey_GameWorldBossReborn(    RÃtisAliveR RÈRÉtstateMsgt    tableNamet zoneIpyDatatzoneID((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR¨Ss,,      & & c Cstjƒj|ƒ}|sdStjddƒ}tj||ƒ}|dkretj|}t    |j
|dƒdtj ƒ}t j |||ƒtj|}    |j
|    dƒd}
t j ||    |
ƒtjd||
|f|jƒƒi|d6|d6|
d6|d6|jƒd    6|jƒd
6} tjd | |ƒtj|tjd|gƒtj|ƒn|rodS|tjkrZtj|tjdƒtj|tjdƒtj |tj!ƒt"j#|tj$dƒt%j&|tj'dƒt(j)|tj*dƒt+j,|tj-dƒt.j/|tj0dƒt1j2|t1j3dƒt4j5|tj6dƒn©|tj7krtj|tj8dƒtj|tj9dƒtj |tj:ƒt"j#|tj;dƒt%j&|tj<dƒt(j)|tj=dƒt.j/|tj>dƒn|tj?krjtj |tj@ƒtj|tjAdƒtj|tjBdƒt.j/|tjCdƒng|tjDkrÑtj |tjEƒtj|tjFdƒtj|tjGdƒt.j/|tjHdƒn|tj?tjDgkrtIjJ|tjKƒt4j5|tjLdƒn|jMƒtjNkr@tIjJ|tjOƒntjPd |ƒ} | rktQjR||ƒntSjT||ƒdS( NtKillBossCntLimitiis4¸üл÷ɱBoss´ÎÊý: index=%s, todayCnt=%s, totalCnt=%sR–RÃttouchCntttotalCnttAccIDtPlayerIDtAddKillBossCntt BOSSFirstKill(URR·tFindNPCDataByIDRR­tGetDictValueByKeyRRtDef_PDict_Boss_KillCntTotalR/tNomalDictGetPropertyR1RtNomalDictSetPropertytDef_PDict_Boss_KillCntRRtGetAccIDtDataRecordPackt SendEventPackt PlayerSuccesstDoAddSuccessProgressR0tSuccType_FeastRedPack_KillBosst PlayerStatetSetBossStateExittDef_Boss_Func_WorldtSuccType_KillWorldBosst PlayerGubaotAddGubaoItemEffValuetGubaoEffType_KillWorldBosstPlayerActivitytAddDailyActionFinishCnttDailyActionID_WorldBOSStPlayerBossReborntAddBossRebornActionCnttDef_BRAct_WorldBOSStPlayerWeekPartytAddWeekPartyActionCnttDef_WPAct_WorldBOSStPlayerFeastTraveltAddFeastTravelTaskValuetDef_FeastTravel_WorldBosstPlayerActLogintAddLoginAwardActionCnttDef_LoginAct_WorldBOSSt PlayerActTasktAddActTaskValuetActTaskType_WorldBosstPlayerZhanlingtAddZhanlingValuetZhanlingType_HuanjinggetPlayerTongTianLingtAddTongTianTaskValuetTTLTaskType_WorldBosstDef_Boss_Func_HometSuccType_KillBossHomeBosstGubaoEffType_KillBossHometDailyActionID_BOSSHometDef_BRAct_BOSSHometDef_WPAct_BOSSHometDef_FeastTravel_BossHometActTaskType_BossHometDef_FBMapID_CrossPenglaitDailyActionID_CrossPenglaitSuccType_KillCrossPenglaiBosst!GubaoEffType_KillCrossPenglaiBosstActTaskType_CrossPenglaiBosstDef_FBMapID_CrossDemonLandtDailyActionID_CrossDemonLandtSuccType_KillCrossDemonLandBosst#GubaoEffType_KillCrossDemonLandBosstActTaskType_CrossDemonLandBosstPlayerActGarbageSortingtAddActGarbageTaskProgresstDef_GarbageTask_CrossBosstTTLTaskType_CrossBosst    GetIsBosstDef_NPCType_Boss_DarktDef_GarbageTask_KillBossRtGY_Query_BossFirstKilltSetPlayerFirstKillBosstPlayerGoldInvestt
OnKillBoss( RRR t isCrossServertnpcDatatkillBossCntLimitDictt
limitIndexttotalKeyRÝRÎtnewCnttdataDictR¹((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytOnPlayerKillBosslsv  " #R`cBsJeZdTZd„Zed„Zed„Zd„Zdd„Z    dd„Z
dd„Z d    „Z d
„Z d „Zed „Zd „Zeed„Zd„Zd„Zd„Zejed„Zd„Zd„Zd„Zd„Zd„Zed„Zed„Zed„Z d„Z!d„Z"d„Z#d„Z$d„Z%d „Z&d!„Z'd"„Z(d#„Z)d$„Z*d%„Z+d&„Z,d'„Z-d(„Z.d)„Z/d*„Z0d+„Z1eed,„Z2d-„Z3eed.„Z4d/„Z5d0„Z6d1„Z7d2„Z8d3„Z9d4„Z:d5„Z;d6„Z<ged7„Z=d8„Z>d9„Z?d:„Z@d;„ZAd<„ZBd=„ZCd>„ZDd?„ZEeed@„ZFdA„ZGdB„ZHdC„ZIdD„ZJedE„ZKdF„ZLdG„ZMedTdH„ZNeddI„ZOdJ„ZPdKeedL„ZQdM„ZRdN„ZSddedO„ZTdP„ZUdQ„ZVdR„ZWdS„ZXRS(UcCsL||_d|_d|_i|_g|_g|_d|_d|_dS(Ni(    t_NPCControl__InstanceRt_NPCControl__LastHurtPlayert_NPCControl__Killert_NPCControl__AllKillerDictt_NPCControl__FeelPlayerListt_NPCControl__ownerPlayerListt_NPCControl__OwnerHurtTypet_NPCControl__OwnerHurtID(tselftiNPC((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__init__Æs                                cCsú|j}|jƒ}|jƒ}||}||}    t|ƒ|kr^|t|ƒ|}nt|    ƒ|kr‡|    t|    ƒ|}    n||}
||    } tjƒ} | j|
| ƒ rð|rðtj|||ƒ} | jƒ}
| jƒ} n|
| fS(N(    R2RRtabsRRtCanMoveRR(R:tdestXtdestYtdisttfixPosRtposXtposYtdirXtdirYt    moveDestXt    moveDestYRt    resultPos((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGetMoveNearPosÙs"      
 
 
 
  c Cs¡|j}|jƒ}|jƒ}tj|||||ƒ\}}    tjƒ}
|
j||    ƒ r—|r—tj||    dƒ} | jƒ}| jƒ}    n||    fS(Ni(    R2RRRtPosInLineByDistRR>RR( R:tplayerXtplayerYRARBRRCRDRGRHRRI((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGetMoveNearPosExòs      !  cCsR|j}tj||ƒ}|sEtjd|jƒ||fƒdS|j|ƒS(Ns.NPCÒÆ¶¯µ½Ä¿±êʧ°Ü,NPCID = %s Ä¿±êID=%d,Type=%d(R2RR]RÆtGetNametMoveToObj_Detel(R:R–tobjTypeRt tagObjDetel((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt    MoveToObjs      icCs•|j}|jƒ|jƒ}}tj||||ƒ}||kr|dkr|||||}|||||}n|j||ƒdS(Ni(R2RRRR!tMove(R:tdestPosXtdestPosYt sigleMoveDisRtcurPosXtcurPosYtcurDis((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytMoveToPosStepBySteps    ic Cs½|j}tj|tjtjƒs(dS|jƒ}|jƒ}|jƒ}|jƒ}|dkr€t    |j
ƒddƒ}n|j ƒdkr
|j |j ƒƒ}|s±dStj|||jƒ|jƒƒ}    |jƒdkr
|    |jƒkr
|jƒdSn|j|||ƒ\}
} tj|
| dƒ} | jƒ}
| jƒ} |jƒtjkrtjƒjƒ|jƒdkr|j|
| ƒdSt|tjƒ|j|
| ƒS(Niii (R2tOperControlManagertIsObjCanDoActionRtDef_Obj_ActState_ServerActR^toalMoveRRRR5tGetRefreshPosCounttGetRefreshPosAttGetCurRefreshPointIndexRR!t GetMoveDisttMoveBackRNRRR1t    laNPCMoveRORWt GetActionTickt
SetDestPosRTRORT( R:RRt moveAreaDistRRCRDR?R@t curRefreshPostmoveDistRGRHRI((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRP(s:              $$
   " cCsÉ|j}tj|tjtjƒs(dStjƒ}|j    ƒ}|j
ƒ}|j ||ƒ}|sht S|j ƒdkr~t Sx«t|j ƒƒD]—}    |j|    ƒ}
|
jƒ} | tjkrÇq‘ntj|
jƒ| ƒ} | sëq‘n| jƒtjkr‘| jƒr‘| jƒ|jƒkr‘t Sq‘W||krH||krHt S|dkrlt|jƒdƒ}ntj|||ƒ} | j    ƒ}| j
ƒ}||ks±||krÅ|j||ƒtSt S(Niii(R2R\R]RR^R^R_RRRRRR RR»RRòRŸR]R†RâRãRíR/R5RRRTRä(R:RCRDt fixAreaDistRRtnpcPosXtnpcPosYR RÓR t
curObjTypetcurTagRIRGRH((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt    FixTagPosssD             9   cCs|j}|jƒ}|jƒ}tj||ƒ}|dkrFtjS|jƒdkr_tjStj    |||jƒ|jƒƒS(Ni(
R2RRRR]RRtDef_NPCErrorMaxDistR†R!(R:ttagIDttagTypeRRCRDttagObj((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt
GetTagDist±s       c
Cs%|j}|jƒ}|tjkr(tStj||ƒr>tS|jƒ}|jƒ}|j    ||ƒ}|dkrt j |ƒdkrtStj ||ƒ}|dkrÆtjd|jƒƒtStj||ƒsÜtStj||ƒsòtStj||d|ƒd}    |    tjkr!tStS(Nis&curNPC = %s ²éÕÒ¶ÔÏó, »ñµÃ¶ÔÏóʵÀýʧ°Ü(R2RòR^tgotItemR RR R†Rt FindNPCAngryRR8t GetAngryValueR]RÆRR"tCanAttackByPathR#R$R%RR&Rä(
R:RR)RRRtnpcAngryt
angryValueR-R.((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__CheckAddToAngryListÅs.       ! cCsC|j}tj|ƒ r?t|ƒ r?|jƒtjkr?tStS(N(R2RR¤R9RXRnR Rä(R:R((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt GetIsBossViewôs    2cCs|j}t}|jƒdkr%|S|jƒjdƒ}| rT|j|ƒrT|Stjƒjƒ}tjƒj    ƒ}|j
ƒs7t j |ƒ}t jddƒ}    ||    kr¾|    |}
n*|tjkrât jddƒ}
nd}
|jƒ} x¢td| ƒD],} |j| ƒ} | dkr+qntj| ƒdkrFqn| jƒsXqn|j| |ƒspqntj|jƒ|jƒ| jƒ| jƒƒ}||jƒkr¸qntjtj |}| j!ƒtj"kr|
rÿ| j#ƒ|
krÿqn|tj$7}n|j%| |ttƒrt&}qqWnb|j'|j(ƒƒ}|j)ƒ} x>td| ƒD]-} |j*| ƒ} | dkrqhntj| ƒdkrªqhn| jƒs¼qhn|j| |ƒsÔqhntj+|ƒr |j,| jƒ| jƒ|ƒ r qhntj|jƒ|jƒ| jƒ| jƒƒ}tjtj |}| j!ƒtj"krt|tj$7}n|j%| |ttƒrht&}qhqhW|S(Niit AngryNPCCounti(-R2R t
GetAtkTypeRtGetAngryValueTagt_NPCControl__IsValidAngryObjRRt GetMapFBTypeR¥R}RÓtGetRecordMapIDRR‡R^tfbtNullR­tGetAttentionPlayersCountRætGetAttentionPlayerByIndexRR8RfRt _NPCControl__CheckAddToAngryListR!RRtGetSightRtDef_NPCFirstSightAngryValuetDef_Screen_AreaRòR_tGetAngryNPCCounttDef_NPC_SeePlayerAddAngrytAddObjToAngryListRäRaRbRRR¤tGetIsInRefreshPoint(R:R)t
isUpdAngryRt
needResorttcurAngrytmapTypeR t recordMapIDtmapAngryNPCCountDicttangryNPCCountLimitRRÓRRAt addAngryValuet refreshPoint((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytAddInSightObjToAngryListsv          0   10 cCsq|s
dS|jƒtjkr8|jƒtjkr8dS|}|dkr]||jƒ7}n|j||ƒdS(N(RòR^RŸRXtntFairyRt GetSkillAngryR(R:tobjDetelRÅtuseSkilltaddAngry((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytAddObjDetelToAngryList_ByAttackqs c
Cs|j}tj||ƒrtStj|ƒs2tS|jƒ}|jƒ}|rg|j||ƒ rgtSd}|t
j krßt |ƒt jkrßtj||ƒ}    |    rÜ|    jƒdkrÜtjƒj|    jƒƒ}qÜqßnt|dƒ}|jƒ}
|rËtjd|jƒ|fƒxÄt|jƒƒD]”} |j| ƒ} | dks0| jƒdkriq0n| jƒ} | |kr‹|dn|}tjd| | |fƒ|j|
| |||ƒq0Wn|j|
||||ƒtj|ƒdkr|jƒ r|jtƒntS(Niis,NPCÌí¼Ó¶ÓÎé³ðºÞ: teamID=%s,plusAngryValue=%ss%    i=%s,playerID=%s,addAngryValue=%s( R2RR R R"tCheckObjCanDoLogicRòR†t_NPCControl__CheckCanAddAngryRR^R_R7RtDropOwnerType_MaxAngryR]RtGetTeamManagertFindTeamRRRR»tGetMemberCountt    GetMemberRt_NPCControl__AddAngryValueR8RfR3R
Rä(R:R tplusAngryValuetcanPiletcheckRRntcurObjIDt addAngryTeamRRzRÓt curTeamPlayert teamPlayerIDR–((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR‘s>      $   "cCsŠ|j||ƒ}|dks3tj|ƒdkrZ|j|||tj|tjƒn,|r†tj|ƒ|}tj||ƒndS(Ni(RwRR8RxtAddAngryR0R’t SetAngryValue(R:RzRªRnR§R¨R{t updAngryValue((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__AddAngryValueÅs!'c    Csp|j}tj||ƒ}|s<tjd||fƒtStj||ddƒd}|tj    krktS|j
ƒt j kr„t Stj|jƒt jƒ}tt j|ƒ}|s»t S|t jkrùtj||ƒràtStj||ƒsltSns|t jkrl|j
ƒt j kr!t Stt j|ƒ}|s=t Stj||ƒrStStj||ƒsltSnt S(Ns&###Ìí¼Ó³ðºÞ,ÎÞ·¨²éÕÒÄ¿±êʵÀý = %s , %si(R2RR]RÆR R$R%RRR&RâR^RãRäR†RŸRÿR_R R"tCheckPlayerAttackMode_Player(    R:RªRnRt curObjDetelR.t curNPCDetelt curNPCOwnert curObjOwner((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__CheckCanAddAngryÙs<    cCs{|j}|jƒ}tƒ}t}|j|jƒƒ}x;td|jƒƒD]$}|j|ƒ}|j    ƒ}    |j
ƒ}
|    sˆqOnt j |    |
ƒ} | s¼|j |    |
ƒt}qOn|
tjkræ| jƒ|kræqOqæntj|| ƒs|j |    |
ƒt}qOn|j| jƒ| jƒ|ƒsQ|j |    |
ƒt}qOnt j| jƒ| jƒ|jƒ|jƒƒ} | |jƒkr¯|j |    |
ƒt}qOn|jƒs|j| ƒsæ|j |    |
ƒt}qOn| t|ƒkr|j |    |
ƒt}qOqnt j|ƒr,qOntj|| d|ƒ} | dt j!krO|j |    |
ƒt}qOqOqOW|S(Ni("R2RR0R RaRbRæt GetAngryCountR€tGetObjIDt
GetObjTypeRR]t DeleteAngryRäR^RŸRR"R#RŽRRR!RˆRHt CanSeeOtherR;tGetNPC_Is_GateR$R%RRR&(R:R)RRztdefaultMaxAngryNPCIDListRR—RÓR{tangryIDt    angryTypeR RAR.((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytRemoveDeathInAngryListsb               !0     
c    Csß|j}|jƒ}||jƒ}||kr5dS|j|ƒ}|j||ƒpY|}|r²|jƒdkr²tj|ƒr²t    |ƒ r²|j
ƒdkr²|j ƒq²n|s¾|rÎ|j |ƒn |j |ƒdS(Ni(R2RtGetLastResortTickRÁR˜tGetMaxAngryTagRR8RfR9RHRdtResorttSetLastResortTick(    R:R)trefreshIntervalRRRztlastTickt removeRsortR((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytRefreshAngryListks      4  cCs^|j}|jƒ}xBtd|jƒƒD]+}|j|ƒ}|j|ƒsUq+n|SWdS(Ni(R2RRæR¸R€RR(R:Rt angryManagerRÓR‘((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRÃŽs     cCsU|dks|jƒdkr"dStj|ƒ}|dkrAdS|jƒrQdS|S(Ni(RR¹R8Rxt GetIsDisable(R:R‘t curAngryValue((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__IsValidAngryObj£s  cCs#|j}|jƒ}|jƒtS(N(R2RRéRä(R:RR‘((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt ClearNPCAngry·s     
cCs#|j}|jƒ}|jƒtS(N(R2tGetPlayerHurtListRéRä(R:Rt npcHurtList((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytClearNPCHurtListÂs     
cCs|j}|jtjƒS(s¯NPCÊÇ·ñÉËѪ±£»¤ÖÐ
        ÒòΪÊÖÓαȽϻá³öÏÖÍøÂçÇл»µÄÇé¿ö£¬´Ëʱ»á¿ÉÄÜ»áÒýÆðµôÏßÖØÁ¬
        ËùÒÔÕë¶ÔÊÖÓÎ×öÁ˵ôÏß3·ÖÖÓÄÚÉËѪ±£»¤£¬·ÀÖ¹Íæ¼ÒÖØÁ¬ºóÉËѪ±»Çå¿Õ£¬ÌåÑé²»ºÃ£»
        (R2R[RtDef_NPC_Dict_InHurtProtect(R:R((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytIsInHurtProtectÉs    cCs@|j}t|t|ƒ}x|D]\}}|jƒq"WdS(N(R2RFRäRé(R:tisClearAuraBuffRREt    buffStatet    canPileup((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt ClearAllBuffÖs
    cCs.|jƒ|jƒ|j|ƒ|j}tS(N(RÎRÑR×R2Rä(R:RÔR((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__ClearNPCAllStateäs
 
 
     cCsx|j}|jtƒ|s:tj|ƒtj|ƒkrQ|jƒ|jƒn|jd|ƒ|st|j    ƒnt
S(NRp( R2t_NPCControl__ClearNPCAllStateR R8RfRet_NPCControl__InitNPCSummont_NPCControl__NormalNPCInItCDtRefreshNPCStateRlRä(R:RpR((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR‘ós     $
  cCs~|j}|jdƒ|jdƒ|jƒ}xHt|jƒƒD]4}|j|ƒ}|dkriqBn|jdƒqBWdS(Ni(    R2t SetAttackTicktSetUseSkillTickR‘RæR6R7RtSetLastUseTick(R:Rt curNPCManagerRÓt curNPCSkill((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__NormalNPCInItCDs        cCsg|j}g}x6t|jƒƒD]"}|j|ƒ}|j|ƒq"Wx|D]}t|ƒqOWdS(N(R2RæRçRèRŽR€(R:RtcurNPC_Summon_ListR9RêR·((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__InitNPCSummon#s     c    CsW|j}|jƒ}|j|ƒ}|jƒ}|jƒ}|jƒ}|jƒ}|jƒtjkr¥||ks||kr¥t|tj    ƒ|j
||ƒdSt ||j ƒƒs¾dS|d}||j ƒkrãd}n|j|ƒ|j|ƒ}|jƒ}|jƒ}||kr3||kr3dSt|tjƒ|j
||ƒdS(Nii(R2tGetCurPatrolIndextGetPatrolPosAtRRRGR^RNRTRJRTRáRftGetPatrolPosCounttSetCurPatrolIndex(    R:R)Rt patrolIndext    patrolPost
patrolPosXt
patrolPosYt curNPC_PosXt curNPC_PosY((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt __PatrolMove6s4         
       cCsÞ|j}|jƒdkr,|j|ƒdS|j|jƒƒ}|sKdSt|jƒdƒ}|jƒ}|jƒ}||}||}||}    ||}
|jƒ} |jƒ} |j    ƒ} t
|| | ƒ}t|| | ƒ}t
|    | | ƒ}    t|
| | ƒ}
||kr*|j ƒdS|    |
krD|j ƒdSt ||j ƒƒs]dStj||ƒ}tj|    |
ƒ}t|tjƒtjƒj|jƒ|jƒ||dƒ}|j|jƒ|jƒƒdS(Nii(R2Rçt_NPCControl__PatrolMoveRaRbR/t GetMoveAreaRRtGetAreaRRdRáRfRURVRTR^RNRRt LineNearToPosRT(R:R)RtPosMaptmoveAreaRCRDt minMovePosXt maxMovePosXt minMovePosYt maxMovePosYtposMapXtposMapYt
posMapAreatnewPoint((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytDoNormalNPCMovelsH       
 
 
 
 
 
cCstj|jƒƒS(N(Rt GetPsycoFunct)_NPCControl__Func_GetRandPosInRefreshArea(R:((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGetRandPosInRefreshArea¬scCs¿|j}|jƒ}|s6tjd|jƒƒdS|jƒ}|jƒ}|jƒtj    krld}n |j
ƒ}t j |||ƒ\}}|dkrµ|dkrµ||gS||fS(NsK__Func_GetRandPosInRefreshArea GetRefreshPosAt error: return None! npcID=%si( R2tGetRefreshPointRRMRRRRXR^t ntFunctionNPCRòRtGetNearbyPosByDis(R:RtposMapRúRûRüRCtpoxY((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__Func_GetRandPosInRefreshArea³s            
cCsF|j}tj|ƒ}|r-|jƒ}n|j|jƒƒ}|S(N(R2R¡R¢RRaRb(R:RR¸R—((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRÌs     cCs|j}|jƒ}|j|jƒ|jƒ|ƒr:tS|jƒtjkrŒ|j    ƒtj
krŒ|j|j ƒ|j ƒ|ƒrŒtSnt S(N(R2RRŽRRRäR1R^ReRGRJt GetDestPosXt GetDestPosYR (R:RR—((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytIsInRefreshAreaÙs     !!cCs‚|s
tS||jƒ|jƒkr~||jƒ|jƒkr~||jƒ|jƒkr~||jƒ|jƒkr~tStS(N(R RRcRRä(R:RXRYR—((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRŽòscCs³|j}|jƒ}|dkratjd|dƒ}|j|ƒ}|jƒ}|jƒ}n|jƒ\}}|jƒsŒ|j    ƒnt
|t j t ƒ|j||ƒdS(Nii(R2RçRURVRæRRRRÓR‘RTR^RJRäRT(R:Rt patrolCountRéRêRCRD((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRd    s         cCsb|j}|jtjd|jƒdƒƒ|jƒ\}}|j||tƒ|j|ƒdS(Nii(    R2tSetCurRefreshPointIndexRURVR`RR_R Ra(R:R)RRCRD((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt DoNPCReborn"    s     # cCs’|j}|jtƒtj|tj|ƒƒ|jƒj|ƒ|jƒ|j    t
j dƒ|j    t
j dƒt j|ƒtj||ƒ|jƒ}t
j|ƒrÕtjd|ƒ}|rÕt|dƒqÕn|jƒ}x t|jƒƒD]Œ}|j|ƒ}| s"|jƒdkr&Pn|jƒt
jkrAqôntjd|jƒ|jƒ|j ƒfƒt!j"|||ƒqôW|j#ƒdS(NiRis/NPC¸´»î£¬Ì×ÉϹ⻷: objID=%s,npcID=%s,skillID=%s($R2R‘RäR8RjReRRÅt RebornNotifyR\RtDef_NPC_Dict_HPPerLogicMarkt!Def_NPC_Dict_RebornPreNotifyIndexR«t OnNPCRebornRat DoFBRebornNPCRR¤RRR¨R‘R»R6R7tGetSkillTypeIDt GetSkillTypetDef_SkillType_AuraRRR†t
GetSkillIDt
SkillShellt NPCUseSkillt_NPCControl__notifyAppear(R:R)RtcurNPCIDR¹RžR9Rœ((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRa.    s2     
   ,
cCsdS(N((R:((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__notifyAppearX    s cCsdS(N((R:((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRi    sc Csû|j}|jƒ}tjddiƒ}tj||ƒ}|sFdS|\}}t|dtƒ}tj    |ƒdtj
|ƒ}    |j t j ƒ}
||
} xA| D]9} |    | kr½Pntjd||| gƒ|
d7}
q§W|jt j |
ƒdS(NtBossHPInformationitreverseidi(R2RRR‡RRãtsortedRäR8RfReR[RRRt WorldNotifyR\( R:tdropTypetownerIDRRthpPerLogicNPCIDDictthpPerLogicListt    hpPerListtsysMarktnowHPPerthpPerLogicMarktlogicHPPerListthpPer((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt DoHPPerLogicx    s$       
  cCs“|j}|jƒdkrdS|jƒdkrXtjd|jƒƒ|j|ƒn|jƒ||jƒ}|dkr‚dS|j|ƒdS(Nis¼ì²âµ½NPC¿ìËÙ¸´»î %si(R2tGetRefreshTimeRfRRR†t SetActionTickR (R:R)Rt
remainTime((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytDieTick¡    s      c     Csè|jƒ}tjdƒ}||kr+dS||\}}|jtjƒ}|t|ƒkrcdSttj    |dƒƒ}||}    ||    kr–dS|j
tj|dƒt j ƒj ƒ}
tjd||||    |
||gƒdS(NtRebornPreNotifyNPCgLí@ii(Rt ReadChConfigtGetEvalChConfigR[RRRŽRktmathtceilR\RROR¥RR( R:RR-RtpreRebornNotifyNPCDicttnotifyMinuteListt
notifyMarkt notifyIndextreaminMt notifyMinuteR ((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__DoNPCRebornPreNotifyµ    s   
 %cCsG|j}|jtjƒr)|jƒdS|j||ƒ|jƒdS(N(R2R[RtDef_Obj_Dict_TurnFightPosInfotRefreshTurnfightNPCAttrtRefreshNPCAttrStatetRefreshNPCActionState(R:t canSyncClientRpR((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRÜÏ    s     
cCsb|j}|jtjƒ}i}|rU|jidtj6dtj6dtj6ƒnYt|j    ƒƒ}|sqdS|ji|j
ƒtj6|j ƒtj6|j ƒtj6ƒt jd|jƒ|j    ƒ|fƒtj|ƒ|jƒ|j|jtjdƒƒ|j|jtjdƒƒ|j|jtjdƒƒtj||jtjdƒƒdS(NieÍi€ðúl^ esheroAttrDict: ID:%s,NPCID:%s,%si(R2R[RtDef_Obj_Dict_LineupPlayerIDRct
AttrID_Atkt
AttrID_Deft AttrID_MaxHPR$RtGetAtktGetDefReRRR†R8tClearBattleEffecttResetNPCBattleStatet    SetMinAtkRŒt    SetMaxAtktSetDefRh(R:RtlineupPlayerIDt heroAttrDictR#((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR<Ú    s.        
 
    & 
cCs™|j}|jƒ|jƒ|j|jƒƒ|j|jƒƒ|jƒtj    krlt
j ||ƒdSt ||ƒt j|ƒ}|j|ƒdS(N(R2RFRGRMRItSetAtkIntervaltGetBaseAtkIntervalRâR^RöR÷tRefurbishPetAttrRƒRtCalcBuffer_NPCBattleEffecttRefreshNPCSpeed(R:R?RpRt allAttrList((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR=ÿ    s    
 
 
  cCs­|j}|tjjtjdƒ}|sV|jtjƒr©|jtjdƒq©nSt|j    ƒt
j t dt t
j |ƒƒƒ}|j|ƒ|jtj|ƒdS(NigY@(R2RtCalcAttr_BattleNolineRŒtTYPE_Calc_AttrSpeedR[RLR\RkRHR0tDef_MaxRateValueRtfloatRM(R:RRRtspeedPertspeed((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRQ'
s    3 cCs'|j}tj|ƒtj|ƒdS(N(R2R\tClearObjActionStateRtCalcBuffer_ActionState(R:R((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR>9
s     cCs;|j|ƒ}|j|ƒ}|s*|r7|jƒndS(N(tRefreshBuffStateNoTimelytRefreshBuffStateTimelyR=(R:R)trefreshAtrefreshB((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytRefreshBuffStateG
s cCsù|j}||jtjƒtjtjkr3dS|jtj|ƒt}tj||j    ƒ|ƒ}|pt|d}tj||j
ƒ|ƒ}|pŸ|d}tj||j ƒ|ƒ}|pÊ|d}t j ||ƒt j||ƒ}|pø|S(Ni(R2t GetTickByTypeRtTYPE_NPC_Tick_BufftTYPE_NPC_Tick_Timet SetTickByTypeR t    BuffSkillt RefreshBuffR<R=R@t SkillCommontCheckAddAuraSkilltCheckAuraSkill(R:R)Rtrefreshtresult((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR[V
s    &cCsÂ|j}||jtjƒtjtjkr3dS|jtj|ƒtj||jƒ|ƒtj||j    ƒ|ƒtj||j
ƒ|ƒ}|drª|j ƒnt j ||ƒ|dS(Nii(R2R`RtTYPE_NPC_Tick_Buff_TimelyRbRcRdReR>R?RBR>RtProcessPersistBuff(R:R)RRj((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR\u
s    
 cCs|j}|jƒ}|jƒ|jƒ|jƒtjƒjƒ}|jsTdn |jj    ƒ}t
j d|ƒ}|rÔ|t j t jgkrÔg|jD]}|jƒ^q}t|jƒ|dt|ƒn|t
jddƒkr tjdd|jƒgƒn|jƒjƒdS(NtRitBossRebornServerBossitBossRebornBossKilled(R2Rt!_NPCControl__SetFeelNPCPlayerListt_NPCControl__GiveObjPrizet_NPCControl__EventKillNpcRRR¥R4t GetPlayerNameRtGetIpyGameDataListNotLogRR§R¦R7RRËRäR­RRRRé(R:RRR t
killerNamet bossIpyDatatplayerRÇ((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt __KillLogic“
s     
 
 
"c Cs|j}g|_g}|s-|jƒ}ng}xÔt|jƒƒD]À}|j|ƒ}|j|ƒ}|svqFn|d}|d}|r¯||kr¯|j|ƒq¯n|rFtj    ||j
ƒ|j ƒƒ}    x-|    D]"}
|
|krÝ|j|
ƒqÝqÝWqFqFW||_dS(Nii( R2R6RÏR»t GetHurtCountt    GetHurtAtt_NPCControl__GetTagByHurtObjRŽRtGetAreaTeamMemberRR( R:RRÐteventPlayerListR9thurtObjt hurtObjTypeRtcurTeamt
playerlistt
teamPlayer((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__SetFeelNPCPlayerList°
s.        
 
 !      cCsn|jr|j|jƒnxK|jD]@}|jrV|jjƒ|jƒkrVq&n|j|tƒq&WdS(N(R4t_NPCControl__MissionOnKillNPCR6RRä(R:t eventPlayer((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__EventKillNpcÚ
s    $cCsdS(N((R:t
dropPlayerthurtTypethurtIDtownerPlayerListt isOnlySelfSee((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt __NPCDropItemì
scCst|j}|jƒtj|dƒ|jƒ|jƒ}|tjkrYtj    |ƒdS|j
t ƒt |ƒdS(Ni( R2t_NPCControl__KillLogicR8RjRÙRâR^RöR÷t
SetPetDeadR
R R€(R:RtcurNPC_GameNPCObjType((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt    SetKilledó
s    
 
 
cCs |j}|jƒ}|stStj|ƒ}tj|ƒ|krZ|jtjdƒtS|j    ƒt
j krst S|j ƒrƒt S|jƒ}| s³||jƒtjdkrÈ|j|dƒt S||jƒtjkråt St||dƒ}tj|d|tƒ|j|ƒt S(NiiiÐgˆÃ@(R2t GetHPRestoreR R8ReRfR\RRR1R^t    laNPCNullRäRÓtGetRestoreTimetDef_NPC_ProcessHP_TicktSetRestoreTimeRkRft
SkillAddHP(R:R)Rt hpRestoreRatet curNPCMaxHPtlastRestoreTimet restoreValue((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytProcessHPRestore s,       $ cCsdS(N((R:R)((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytProcessBattleHPRestoreA sc    Cs¤|j}|jƒ}|jƒ|_tj|ƒ}|j|ƒ\|_}}}|||_|_    |r‡t
j d|||fƒn|j ƒt |jƒdkrd}d}g}    x8|jjƒD]'}
|jsã|
|_n|jsø|
|_n||
jƒkr|
jƒ}|
}n|rÕ|
jƒt|ƒkrÕtjd|
jƒƒ} tjdt|ƒƒ} | r| jƒnd} | r—| jƒnd}|| krÕt
j d| ||f|
jƒƒqÈqÕn|j|
ƒ|    j|
ƒqÈW|    |_|rn|tjtjtjgkrnt |    ƒdk}xX|    D].}
|j|
tj|
jƒ|
gd|ƒq9Wq÷|r÷|j||||    ƒq÷ng|dkr²|j|||ƒnE|tj krÔ|j!||ƒn#|r÷t
j"d|||fƒn|r‡i|j#ƒd6|d    6t
j$ƒj%ƒd
6t
j&ƒj'ƒd 6|rL|j(ƒndd 6|jj)ƒd 6|d6|d6}t*j+d|ƒnt,r t,|||ƒndS(Ns-__GiveObjPrize npcID=%s,hurtType=%s,hurtID=%sitRealmsWÍæ¼Ò´ó¾³½ç²»×㣬ÎÞ·¨»ñµÃBoss¹éÊô½±Àø! playerRealmLVLarge=%s,npcID=%s,npcRealmLVLarge=%siR‹s*NPC¹éÊôÒì³£:npcID=%s,hurtType=%s,hurtID=%sR–RÃR R•tteamIDtkillerIDRˆR‰tKillBossRecord(-R2Rt"_NPCControl__FindLastTimeHurtObjExR3RR¤t_NPCControl__FindNPCKillerInfoR5R8R9RRÆt _NPCControl__DoLastTimeHurtLogicRŽRR¹R4RtGetOfficialRankR&RRt
GetLvLargeRt#_NPCControl__KilledByPlayerSetPrizeRŽR7tDef_NPCHurtTypePlayertDef_NPCHurtTypeTeamtDef_NPCHurtTypeSpecialt_NPCControl__NPCDropItemt!_NPCControl__KilledByTeamSetPrizetDef_NPCHurtTypeFamilyt#_NPCControl__KilledByFamilySetPrizeRMR†RR¥ROR…RR‰RéRêtOnNPCDie(R:RRt
isGameBossR€RˆR‰R‡t maxPlayerLVRŠRtplayerRealmIpyDatatnpcRealmIpyDatatplayerRealmLVLargetnpcRealmLVLargeR‹R0((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__GiveObjPrizeb sj     
                             $ / *,!cCs?|j}|sdS|jƒ}|tjkr2dS|j}dS(N(R3RòR^R_R2(R:tlastHurtPlayerRnR((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__DoLastTimeHurtLogic¯ s         cCsÉ|j}|jƒ}|jƒ}tjƒjƒ||f}|tjkr·tjj|ƒ\}}}}    |r{|j    ƒnd}
tj
d||j ƒ|
||    fƒ||||    fSd}d}    i}d}t |ƒ} |rûtj
d|| fƒn| tjkrœ|jƒ} | jƒ|r@tj
d| jƒƒnxËt| jƒƒD]B} | j| ƒ}|r—tj
d| |jƒ|jƒfƒn|j|d|ƒ\}}|dkræ|dkræ|rStj
dƒqSqSn|rG|jƒ}||kr|||<n|r4tj
d|| |fƒn|dtj|fS|rS|}|r|tj
d    || |j    ƒfƒn||tj|j    ƒfSqSWnr| tjkr|jƒ\}}|rÜ||tj|j    ƒfS|r|||jƒ<|dtj|jƒfSn|jrœ|jjƒ}|jj    ƒ}
|rXtj
d
|||
fƒn|
rvtjƒj|
ƒ}n| rœ||krœ|j||<qœn| tj krÑtj!}|r*tj
d |ƒq*nY| tj"kr*t#j$|ƒ}|dkr*tj%}|}    |r'tj
d |ƒq'q*n|dkr¹|rttj}|j    ƒ}    |r¶tj
d ||    fƒq¶q¹|r¹tj}|j ƒd}    |r¶tj
d||    fƒq¶q¹n||||    fS(NisKNPC±»»÷ɱ£¬¹éÊôÐÅÏ¢: key=%s,playerIDList=%s,teamID=%s,hurtType=%s,hurtID=%ss"NPC±»»÷ɱ, key=%s,dropOwnerType=%ss hurtCount=%ss(hurtIndex=%s,hurtValueType=%s,valueID=%stisLogs&    µ±Ç°ÉËѪ¶ÔÏ󳬳öÖ¸¶¨·¶Î§»òÒѾ­ËÀÍös;    ¹éÊô×î´óÉËÑªÍæ¼Ò: npcID=%s,dropOwnerType=%s,playerID=%ss9    ¹éÊô×î´óÉËѪ¶ÓÎé: npcID=%s,dropOwnerType=%s,teamID=%ss8    ¹éÊô×îºóÒ»»÷£¬npcID=%s,lastHurtPlayerID=%s,teamID=%ss    ÎÞ¹éÊô...npcID=%ss    ÕóÓª¹éÊô...factionID=%ss$    ¹éÊôĬÈ϶ÓÎé, npcID=%s,teamID=%ss&    ¹éÊôĬÈÏÍæ¼Ò, npcID=%s,playerID=%s(&R2RR†RROR…RŠtg_npcKillerInfoR›RRÆR‰RR7RtDropOwnerType_MaxHurtRÏtSortRyR»Rzt GetValueTypet
GetValueIDR{RR§R¨R¡t_NPCControl__GetMaxAngryInfoR3R¢R£tDropOwnerType_AlltDef_NPCHurtTypeAlltDropOwnerType_FactionRatGetNPCItemProtectFactiontDef_NPCHurtTypeFaction(R:R¯RRR–RÎt
killerDicttkillTeamRˆR‰Ržt dropOwnerTypeRÐRÓt
maxHurtObjRR€RhtmaxAngryPlayert maxAngryTeamtlastHurtPlayerIDtprotectFaction((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__FindNPCKillerInfo¿ s¤            
)   #                         cCs’|jƒ}|sdS|jƒ}|jƒ}|tjkrAdStj||ƒ}|s]dS|jƒ}|sy|dfS|tj    ƒj
|ƒfS(s  »ñÈ¡×î´ó³ðºÞËù¹éÊôµÄÍæ¼Ò, ¶ÓÎé N(NN(NN(NN( RÃRR¹RºR^R_RR]RR¢R£(R:R‘R¿t angryObjTypeRoRž((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__GetMaxAngryInfo- s    
cCs>|j}|jtjƒ}tjƒj|ƒ}|s:dS|S(N(R2R[RtDef_PlayerKey_LastHurtRR|tFindPlayerByIDR(R:RRhR((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__FindLastTimeHurtObjExH s     c Cs|j}|jƒ}d}|dkrBtjd|jƒƒ|S|j|jƒƒ}|jƒ}|tj    krtj
|j ƒt j ƒ}    |    dkrÃ|r¿tjd||j ƒfƒn|Stj|    ƒdksí|    jƒt jkr|rtjd||j ƒfƒn|S|r}|j|    jƒ|    jƒ|ƒs|rvtjd||j ƒ|    jƒ|    jƒfƒn|Sn‡tj|jƒ|jƒ|    jƒ|    jƒƒtjkr|rtjd||j ƒ|jƒ|jƒ|    jƒ|    jƒfƒn|S|    df}|    dfS|tjkrv|j ƒ}
tjƒj|
ƒ} |rjtjd||
fƒn| dkr”|rtjd|
ƒn|S|r´tjd    | jƒƒnx»t| jƒƒD]§} | j| ƒ} | dksú| jƒdkr|rÇtjd
| ƒqÇqÇntj| ƒdksD| jƒt jkrp|rÇtjd | | jƒfƒqÇqÇn|rØ|j| jƒ| jƒ|ƒsa|rÇtjd | | jƒ| jƒ| jƒfƒqÇqÇqan‰tj|jƒ|jƒ| jƒ| jƒƒtjkra|rÇtjd | | jƒ|jƒ|jƒ| jƒ| jƒfƒqÇqÇnd| f}|SW|S|tjkr‰|S|S(NsÉËѪ¶ÔÏó´íÎó,npcID=%ss*ÕÒ²»µ½¸ÃÄ¿±êÉËÑªÍæ¼Ò: npcID=%s,playerID=%sis*¸ÃÄ¿±êÉËÑªÍæ¼ÒÒÑËÀÍö: npcID=%s,playerID=%ss<¸ÃÄ¿±êÉËÑªÍæ¼Ò²»ÔÚNPCÇøÓòÄÚ: npcID=%s,playerID=%s,pos(%s,%s)sO¸ÃÄ¿±êÉËÑªÍæ¼Ò³¬³öÖ¸¶¨¾àÀë: npcID=%s,playerID=%s,npcPos(%s,%s),playerPos(%s,%s)s Ä¿±êÉËѪ¶ÓÎé: npcID=%s,teamID=%ssÕÒ²»µ½Ä¿±ê¶ÓÎé, teamID=%ss¶ÓÎé³ÉÔ±Êý: GetMemberCount=%ss    i=%s, Î޸öÓÔ±£¡s$    i=%s, ¶ÓÔ±ÒÑËÀÍö£¡memPlayerID=%ss6    i=%s, ¶ÓÔ±²»ÔÚNPCÇøÓòÄÚ£¡memPlayerID=%s,pos(%s,%s)sI    i=%s, ¶ÓÔ±³¬³öÖ¸¶¨¾àÀ룡memPlayerID=%s,npcPos(%s,%s),playerPos(%s,%s)(NN( R2RRRRRaRbR¼RR§R]R½R^R_RÆR8RftGetPlayerActiontpaDieRŽRRR!tDef_Team_GetExpScreenDistR¨R¢R£R¤R»R¥RtDef_NPCHurtTypeNPC(R:RÇtisCheckRefreshAreaR¸RRt hurtObjTupleR—tmaxHurtValueTypeRRžR€RÓR¬((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__GetTagByHurtObjX sŽ         * !    )!    ; 
  * !    )    !    ; cCs¥|j}|j|jƒt|ƒ}d}|jtjƒ|jƒkr]|jtjƒ}nt    j    |ƒ}|j
|t j d|ƒ|j |||jƒtƒdS(Nit
addSkillID(R2t_NPCControl__GetExpRR R[RR´R†R²RtAddExpR0tDef_ViewExpType_KillNPCt_NPCControl__KillNPCFuncExR(R:RRtadd_ExpRÚt playerControl((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__KilledByPlayerSetPrize s    c    Cs÷|j}tj||jƒ|jƒd|jƒƒ}|sitjd|jƒ|j    ƒ||fƒdS|j
s‚|d|_
n|j s›|d|_ n|dj ƒ}d}d}g}    |jƒ}
tj|ƒ} x|D]} | r›| jƒt|ƒkr›tjd| jƒƒ} tjdt|ƒƒ}| rE| jƒnd}|r]|jƒnd}||kr›tjd||
|f| j ƒƒqßq›n| jƒ}||krÂ|}| }n|    j| ƒ|j| ƒ|j| ||tƒqßW|    |_tj|ƒ}|dkrb|\}    }xÊ|    D].} |j| tj| j ƒ| gd|ƒq-Wn‘| rÔ|tjtj tj!gkrÔt"|    ƒdk}xX|    D].} |j| tj| j ƒ| gd|ƒqŸWn|ró|j||||    ƒndS(NR¸sS½±Àø¹éÊô¶ÓÎ飬µ«ÊDz»´æÔÚ¿É»ñµÃ¸Ã½±ÀøµÄ¶ÓÔ±!npcID=%s,teamID=%s,hurtType=%s,hurtID=%siRs[¶ÓÔ±Íæ¼Ò´ó¾³½ç²»×㣬ÎÞ·¨»ñµÃBoss¹éÊô½±Àø! playerRealmLVLarge=%s,npcID=%s,npcRealmLVLarge=%sR‹i(#R2RR|RRt_NPCControl__GetIsLogRRMRRR3R4RRRR¤R¤R&RRR¥RÆRRŽt_NPCControl__DoNormalTeamExpRÞRäR7RatGetFBEveryoneDropInfoRªR§R¨R©RŽ(R:R€RˆR‰RRt    maxHurtIDt    teamMaxLVR‡RŠRR¯RR±R²R³R´t curPlayerLVt fbOwnerInfoR‹((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__KilledByTeamSetPrizeß s\    -                                       /$ /cCsÇ|j}d}d}g}|j|jƒƒ}tjƒ}x£t|jƒƒD]}    |j|    ƒ}
|
spqOn|
j    ƒ|ksO|j
|
j ƒ|
j ƒ|ƒ rªqOn|
j ƒ} || krÑ| }|
}n|j|
ƒqOW||_|stjd|jƒ||fƒn|s&|j}n|sPtjd|jƒ||fƒdS|jse||_n|jsz||_n|jƒ} x$|D]} |j| || tƒqW|j||||ƒdS(NisI½±Àø¹éÊôÏÉÃË£¬µ«ÊDz»´æÔÚ¿É»ñµÃ¸Ã½±ÀøµÄ³ÉÔ±!npcID=%s,hurtType=%s,hurtID=%ss;½±Àø¹éÊôÏÉÃË£¬ÕÒ²»µ½µôÂäÍæ¼Ò!npcID=%s,hurtType=%s,hurtID=%s(R2RRaRbRRqR»RrRst GetFamilyIDRŽRRRRŽR7RÆRR3RMR4RRÞR Rª(R:RˆR‰RtmaxLVR‡RŠR—t copyPlayerMgrR9RwRçRåR((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__KilledByFamilySetPrize sH     4                               c    Csw|jƒ}|jƒ}tjƒjƒ}tjtjƒjƒƒ}|tj    krXdStj
ƒr¯|tj kr†t j ||ƒntj|ƒr«t|||tƒndS|tj krÑt j ||ƒn}t|ƒ|jƒtjdƒkr2tj|tjƒtj|tjƒtj|tjƒnt j!|tj"d|gƒtj|ƒrst|||t#ƒndS(NtDailyQuestKillMonsteri($RRòRRR‚RÓRƒR¥R^RŸt IsCrossServerR„RatDoFB_DropOwnerRR¤R1RäR RRR­RõRöR0tDailyActionID_KillNPCRR tDef_GarbageTask_KillNPCRRtActTaskType_KillNPCRëRìt%SuccType_FeastRedPack_KillSpecificNPCR (    R:RRRŸt
isTeamKillRt
defObjTypet    mapFBTypeR ((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__KillNPCFuncExR s,   %cCs‚|j}|jƒ}|tjkrCttj|ƒ}|rVdSn|tjkrVdS|jƒ}tj    |t
j d|gƒdS(Ni( R2RâR^RãRÿR_t
gnotNormalRRëRìR0tSuccType_KillSpecificNPC(R:RtisFeelRRùRµR((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__MissionOnKillNPC| s      cCstj|jƒS(N(RR¤R2(R:((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt
__GetIsLog scCs“|j}|j|jƒt|ƒ}|s.dSd}|jtjƒ|jƒkrg|jtjƒ}nt    j    |ƒ}|j
|t j d|ƒdS(NiRÚ( R2RÛRRäR[RR´R†R²RRÜR0RÝ(R:RRRßRÚRà((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__DoNormalTeamExpž s    c CsG|j}d}tjƒjƒtjkr?tj||ƒ}n|dkrO|S|jƒ}t    j
|j ƒƒ}t j d||ƒ}|r¦|jƒ}|jƒ}    n|jƒ}|jƒ}    |dkrÎdS|sÚdn    |jƒ}
|r|södStj||ƒ} | sdS|| 9}nttjdt jddƒƒƒ} | S(NiRtExpAttenuationi(R2RRR‚R^R„Rat OnGetNPCExpRRRRWRRtGetExpRRR"tGetTeamPlayerHurtPertevaltFormulaControltGetCompileFormulaR­( R:tplayerLVtisTeamRwRtbaseExpRR(RR”RhthurtPertexp((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__GetExp¶ s4           $c Csä|s
dS|j}|jƒ}    tj|ƒs4dn|    }
|tjkrkg|jD]} | jƒ^qSng} tj|||d||| gd|
d|d|ƒ} | dkrÄt
j dƒdS| j |j ƒ|jƒƒdS(Nit    ownerInfot    dropNPCIDR‹RisµôÂäÎïÆ·,ÎÞ·¨ÕÒµ½µØÍ¼µôÂäÎïÆ·(R2RRR¤R©R7RtChItemtAddMapDropItemRRRÆtSetByObjRòR†(R:tcurItemRCRDR R!R‹RiRRR RwtspecOwnerIDListt
curMapItem((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__MapCreateItemé s     76  cCs)tj|||d|ƒ}|s%dS|S(NR(t ItemControlertGetOutPutItemObj(R:RRØR*t isAuctionItemR‡R((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__CreateDropItem    si¸ c
Csˆ|j}d}d\}}t|ƒ}    |retjdtjƒjƒ|jƒ|jƒ|    fƒn|r£tjdtjƒjƒ|jƒ|jƒ|    fƒnO|    t    j
krµn=|    t    j krò|j ƒ}|ròt    j |jƒ}}qòn|sþ|r-tjd|||sdn    |jƒfƒn|snd    \}
} |j||dtƒ|jƒ} | r½| jƒ} | jƒ}
tj| |
ƒ} |s|r½tjd| |
| fƒq½n| }|
tjkrE| rE| rE|    t    j krt    j | jƒ}}qE| jƒr,t    j| jƒ}}qEt    j | jƒ}}n|sQ|rntjd||fƒqnn|j||||ƒ|S(
Nis6BossËÀÍö: lineID=%s,objID=%s,npcID=%s,dropOwnerType=%ss:¼ì²éBossËÀÍö: lineID=%s,objID=%s,npcID=%s,dropOwnerType=%ss%ownerType=%s, ownerID=%s, tagObjID=%sRs+×î´ó³ðºÞÄ¿±ê: ID=%s, Type=%s,maxAngryObj=%ss"angryObj, ownerType=%s, ownerID=%s(ii(NN(R2RR7RRÆROR…R†RRtDropOwnerType_FamilytDropOwnerType_Contendt _NPCControl__RefreshContendOwnerR§RRÉRäRÃR¹RºR]R^R_RR¨tUpdateDropOwner(R:R)RÆtisDeadt checkCanDeadRRtt    ownerTypeR!RÆRÍt maxAngryObjtmaxAngryR¿((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytRefreshDropOwnersN          /    /  /        cCs|j}|jtjƒ}|jtjƒ}| sC|tjkrGdStj|tj    ƒ}|sfdS|j
ƒs‡tj d|ƒdSt j |ƒdks±|jƒtjkrÆtj d|ƒdS|j|jƒƒ}|j|jƒ|jƒ|ƒstj d|ƒdS|S(Ns(¾ºÕù¹éÊôÍæ¼Ò²»¿É¼û£¬ÒƳý¹éÊô!playerID=%sis&¾ºÕù¹éÊôÍæ¼ÒËÀÍö£¬ÒƳý¹éÊô!playerID=%ss0¾ºÕù¹éÊôÍæ¼Ò²»ÔÚboss·¶Î§Àï£¬ÒÆ³ý¹éÊô!playerID=%s(R2R[RtDef_NPC_Dict_LastDropOwnerIDtDef_NPC_Dict_LastDropOwnerTypeR§RR]R^R_RRR8RfRÒRÓRaRbRŽRR(R:RR!RRyR—((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__RefreshContendOwnerMs&     *!cCs·|j}tjƒj|ƒ}|r¢|j|jƒƒ}|r_tjd||jƒfƒnxQt|jƒƒD])}|j    |ƒ}|dks¥|j ƒdkrÅ|rrtjd|ƒqrqrnt j |ƒdkr|rrtjd||j ƒfƒqrqrn|jƒs>|rrtjd||j ƒfƒqrqrn|rvtjd||jƒ|jƒ|j ƒfƒn|j|jƒ|jƒ|ƒrr|SqrWntjd|ƒdS(Ns$¶ÓÎé³ÉÔ±Êý: teamID=%s,memberCount=%sis    i=%s, ¶ÓԱΪ¿Õ!s&    i=%s, ¶ÓԱѪÁ¿Îª0!, memPlayerID=%ss%    i=%s, ¶ÓÔ±²»¿É¼û!, memPlayerID=%ss*    i=%s, ¶ÓÔ±×ø±ê(%s, %s)! memPlayerID=%ssÕÒ²»µ½¸Ã¶ÓÎé: teamID=%s(R2RR¢R£RaRbRÆR¤R»R¥RRR8RfRRRRŽRM(R:RžRRR€R—RÓR¬((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__GetMaxHurtTeamPlayerjs4        2! cCs|j}|jƒ}t|ƒ}|tjtjtjtjgkrIdS|jtj    ƒ}|jtj
ƒ}    t j ƒj ƒ|jƒ|f}
|rå|    |ks¬||kråt jd|
|||    |fƒ|j||    ||ƒnidddf\} } } }|jtj    |ƒ|jtj
|ƒ|rLt jd|
||fƒng}|tjkrt j|tjƒ}|rU|jƒ}| sž|j|ƒrötj|} }|| |<|j||ƒ|tjkr|jtj|jƒƒqqtj|tj|d|ƒqUn=|tjkrDt jƒj |ƒ} | rUtj!d} }|rrt jd| j"ƒƒn|j#|j$ƒƒ}x·t%| j"ƒƒD] }| j&|ƒ}|dksÍ|jƒdkrí|ršt jd|ƒqšqšn|j'ƒt j ƒj'ƒkr£| s'|j|jƒƒr£t(j)||t*ƒr£|j+ƒr£|j||ƒ|| |jƒ<|r:t jd||jƒt,j-|tj.ƒfƒq:qštj|tj|d|ƒ}|rçt j/d||jƒfƒn|ršt jd    ||jƒ|j'ƒ|j0ƒ|j1ƒt(j)||t*ƒfƒqšqšWqUn|tj2krUtj2|} }|j#|j$ƒƒ}t j3ƒ}xÎt%|j4ƒƒD]·}|j5|ƒ}|s¸q—n|j6ƒ|kr
|j7|j0ƒ|j1ƒ|ƒr
|j+ƒr
|j||ƒq—tj|tj|d|ƒ}|r—t j/d
||jƒfƒq—q—Wn|r | rm| j8ƒnd}|tjkr´| d| |ft9j:|
<| sßt jd ƒqßn+|tj2krßid| |ft9j:|
<nt jd ||
| j;ƒ|| |fƒndS( Ns\¹éÊô±ä¸ü, Çå³ý¾É¹éÊô! key=%s,ownerType=%s,ownerID=%s,lastDropOwnerType=%s,lastDropOwnerID=%sis(Boss¹éÊô: key=%s,ownerType=%s,ownerID=%st    buffOwners¶ÓÎé³ÉÔ±Êý: %ss    i=%s, ³ÉÔ±²»´æÔÚ!s6    i=%s, ³ÉÔ±ÓйéÊôȨ! memPlayerID=%s,±³°üÊ£Óà¿Õ¸ñ=%ss'ɾ³ý¹éÊô¶ÓÔ±buff: teamID=%s,playerID=%ssS    i=%s, ³ÉÔ±ÎÞ¹éÊôȨ! memPlayerID=%s,copyMapID=%s,pos(%s,%s),CheckKillNPCByCnt=%ss-ɾ³ý·Ç¹éÊôÏÉÃ˳ÉÔ±buff: teamID=%s,playerID=%ssÉËѪ¹éÊôbossûÓйéÊôÍæ¼Ò!sKBoss±»»÷ɱ: npcID=%s,key=%s,playerIDList=%s,teamID=%s,hurtType=%s,hurtID=%s(<R2RR7RRºR¡RRR[R#R$RROR…R†RÆt_NPCControl__DelDropOwnerBuffRR\R§R]R^R_Rt HaveHurtValuet#_NPCControl__AddDropOwnerPlayerBufftDef_PlayerKey_ContendNPCObjIDRdtDelBuffBySkillIDtDef_SkillID_DropOwnerBuffR¨R¢R£R©R¤RaRbR»R¥RÀR"tCheckKillNPCByCntR RR¿tGetItemPackSpacetrptItemRRRR¬RqRrRsRêRŽRRŠR¹R‰(R:R)RR!RRRRÆtlastDropOwnerIDtlastDropOwnerTypeRÎRÄR€RˆR‰thurtListRRhR—RÓR¬tisOkRìR9RwRž((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR‰s¤      $!     
"!    ,     ' ?'    #cCsb|j}tj|tjƒd}|s^tj|tj|d|ƒtjd|jƒƒndS(NiR'sÌí¼Ó¹éÊôbuff: playerID=%s(    R2Rft FindBuffByIDRR-tAddBuffBySkillType_NoRefurbishRRR(R:RR)RtfindBuff((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__AddDropOwnerPlayerBufføs     c
Cs>|j}|tjkrŒtj|tjƒ}|s7dStjd|ƒtj    |tj
|d|ƒ|tj kr:|j tj dƒq:n®|tjkr:tjƒj|ƒ}|sºdStjd|ƒxlt|jƒƒD]U}|j|ƒ}    |    dksÞ|    jƒdkrqÞntj    |    tj
|d|ƒqÞWndS(Nsɾ³ý¹éÊôÍæ¼Òbuff: playerID=%sR'isɾ³ý¹éÊô¶ÓÎébuff: teamID=%s(R2RR§RR]R^R_RRdR,R-RR\R+R¨R¢R£R»R¤R¥RR(
R:RÆRR!R)RRR€RÓR¬((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__DelDropOwnerBuffs(    #c Cs`|j}|jtjƒ}|jtjƒ}|tjkrktj|tj    ƒ}|s[dS|j
|ƒnñ|tj krùtj ƒj |ƒ}|s™dSxÀt|jƒƒD]F}|j|ƒ}|dks¬|jƒdkråq¬n|j
|ƒq¬Wnc|tjkr\tjƒ}xEt|jƒƒD].}    |j|    ƒ}
|
sHq'n|j
|
ƒq'WndS(s ÑÓ³ÙµôÂä¹éÊôbuffÏûʧʱ¼ä Ni(R2R[RR#R$R§RR]R^R_t*_NPCControl__SetDropOwnerBuffDisappearTimeR¨R¢R£R»R¤R¥RRR¬RqRrRs( R:RR!RRR€RÓR¬RìR9Rw((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytDelayDropOwnerBuffDisappearTimes2     c Cs"|j}tjƒjtjƒ}|s+dStj|ƒ}tj||ƒ}|dkr\dSd}tj    ƒj
ƒ}|d}xt |j ƒƒD]‰}    |j |    ƒ}
|
jƒ} | jƒtjkrÍq‘n|jƒ|
jƒkréPn|
j|ƒ|
j|ƒ|j|    |
jƒƒPq‘WdS(s ÉèÖõôÂä¹éÊôbuffÏûʧʱ¼ä Ni'i((R2RR·tGetSkillBySkillIDRR-Rft GetBuffTypetGetBuffManagerByBuffTypeRORWR»t GetBuffCounttGetBufftGetSkillRR†t
GetOwnerIDtSetCalcStartTickt SetRemainTimetSync_RefreshBufft GetRemainTime( R:RRt    findSkilltbuffTypet    buffTuplet
RemainTimeR)tbuffStateManagerR9tcurBufft    buffSkill((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__SetDropOwnerBuffDisappearTime8s.     
   N(Yt__name__t
__module__RR2R<RäRJRNRSR[RPRpRuR‡R}R R˜RžRR¦R RÁRt Def_NPCRefreshAngryValueIntervalRÉRÃRRÎRÑRÓR×RÙR‘RÛRÚRðRþRRRR
RŽRdR RaRRR*R.t!_NPCControl__DoNPCRebornPreNotifyRÜR<R=RQR>R_R[R\RRpRrRªRR›RœRqR£R¢R¾R¡R{R¦R«R­RÞR„RâRãRÛt_NPCControl__MapCreateItemt_NPCControl__CreateDropItemR"Rt!_NPCControl__GetMaxHurtTeamPlayerRR*R(R;R:(((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR`¾s¤            K >        /     o     4        @    R#                                    6    @                                  *            )             %(                            *        #    +    !    M        n        j        ;    8    *         3         ;        o             cCs±|jtjƒ}|r­tj|ƒ}|s1dSt|ƒ}|tjkrPdS|jƒ}tjd|jƒ||j    ƒf|ƒt
|ƒ}|j |tj |t ƒndS(Ns>Íæ¼Ò»÷ɱ¾ºÕù¹éÊôÕß! defPlayerID=%s,contendNPCObjID=%s,npcID=%s(R[RR+RR~R7RRRRR`RR§R (RtdefenderR)tcontendNPCObjIDRRÆRht
npcControl((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytOnPlayerKillNPCPlayer^s        cCsVtjƒ}||_||_||_||_t|jƒ|_tj    ||ƒdS(N(
RlttagMCVirtualItemDropt
ItemTypeIDRoRptUserDataRŽt UserDataLenRtRu(RwRØRCRDt userDataStrt    vItemDrop((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytSendVirtualItemDropqs                 cCsŸtjƒj|ƒ}|sdStjtj|ƒƒ}tjd||ƒ}|ra|jƒ}n |jƒ}|swdS|j    ƒ}|j    ƒ}t
|||ƒS(NiR( RR·RâRRRRRRRt
CalcNPCExp(RRR+RRRR”R((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt    GetNPCExp|s   cCs(ttjdtjddƒƒƒ}|S(NRÿi(RRRRR­(RRR”R
((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRaŒs$cCsFtjtd|jƒdfƒ}|dkr2dS||||ƒdS(Ns AIType_%d.%stOnAttackDieByPlayer(RRRRR(RRR:R((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytOnPlayerAttackNPCDie—s" cCs—tjƒrtS|jƒ}|dkr]t||ƒ|kr]tj||jƒ|gƒtS|j    ƒr“t
j |t j ƒ r“tj|dƒtStS(NitGeRen_lhs_202580(RRïRätGetMaxCollectCounttGetTodayCollectCountRt
NotifyCodetGetCollectCountLimitNotifyR tGetCollectAwardR¿tCheckPackHasSpaceR^R0(RRtcollectNPCIpyDatat limitMaxTime((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytCheckCanCollectByNPCIDŸs  !"cCs{d}tjddƒ}xL|D]D}||kr7qnx(|D] }||jtj|ƒ7}q>W|SW|jtj|ƒS(Nit
CollectNPCi(RR‡RåRtDef_PDict_CollNpcIDCollTime(RRt todayCollTimetcollectTimeShareIDListt    npcIDListt    collNPCID((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRg³s   cCsÌ|jƒ}tjd|ƒ}|s(tS|jƒr8tSt|||ƒsNtSd}t|ƒ}| rµ|dkrµ||jƒkrµt    j
dƒd}|r±t j ||ƒntSt ||||ƒtS(NRoiis²»ÔÊÐíͬʱ²É¼¯£¡tGeRen_liubo_436832(RRRR tGetIsMissionCollectNPCRnRätGetCollectNPCPlayerIDRRRRRhtDoCollectNPCBegin(RRR)RRltcanCollTogethertcollectPlayerIDR%((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytOnCollectNPCBegin¿s$   % cCsòd}| r.t||ƒ r.tjdƒdS|jtj|jƒƒ|jƒd}|jƒt    j
krut    j nt    j }t j|||d|jƒƒ|jƒr¿|jtj|ƒntj||jƒtjdƒtj||ƒdS(NisSetCollectNPC fail!ièt    prepareID(t SetCollectNPCRRMR\RtDef_PlayerKey_CollectNPCObjIDR†tGetPrepareTimeRXR^t ntCollectiont pstCollectingtpstMissionCollectingRtSync_PrepareBegint GetLostHPPertDef_PlayerKey_CollectLostHPTickR"t AddHurtValueRR§RatOnBeginCollect(RRRlR)Ryt prepareTimet prepareType((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRxÛs ' cCs•|jƒ}|jƒ}|jtjƒ}|rktjƒj|ƒ}|rk||krktjdƒt    Sn|j
tj|ƒ|j
tj |ƒt S(Ns?SetNPCColleced ÓÐÈËÔڲɼ¯ÇÒ²»ÊÇͬһ¸öÈË£¬Ôò²»¿ÉÖØÐÂÉèÖòɼ¯¶ÔÏó( RR†R[RtDef_NPC_Dict_CollectPlayerIDRR|RÐRR R\R~Rä(RRt curPlayerIDt curNPCObjIDtcurCollectPlayerIDtcurCollectPlayer((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR}ðs   cCsi|jtjƒ}|dkr"dStjƒj|ƒ}|setjd|ƒ|jtjdƒdS|S(Nis>GetCollectNPCID ÓÐcurCollectPlayerID=%s£¬µ«ÕÒ²»µ½¸ÃÍæ¼Ò£¬ÖØÖÃ!(R[RRŠRR|RÐRR\(RRRŽ((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRws     cCst|jtjƒ}|dkr"dStj|ƒ}|rM|jtjdƒn|jtjdƒtj||ƒdS(Ni(    R[RR~RR~R\RŠRat OnExitCollect(RtcollectNPCObjIDR((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytClearCollectNPCs cCsÜtjd|ƒ}|s-tjd|ƒdS|jƒr=dStj|||tƒtjƒr«t    j
|ƒ}idd6|j ƒd6|d6}tj t j||gƒnt|||ƒtj|||ƒt|ƒtS(NRos    ·ÇÌØ¶¨²É¼¯NPC...npcID=%sitResultRßRn(RRÎRRRvRîtDoCollectingLostHPRäRïRtGetPlayerServerGroupIDRtSendMsgToClientServerR0tCrossServerMsg_CollectNPCOKtDoGiveCollectNPCAwardRat OnCollectOKR‘(RRR)Rlt serverGroupIDtmsgInfo((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytDoCollectNPCOK(s  !
cCsM|dsdS|d}tjd|ƒ}|rIt|||dtƒndS(NR’RnRotcrossCollectOK(RRÎR—Rä(RtmsgDataRRl((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR–Bs
 
c    Cs tjƒj|ƒ}|jƒ}|j}|jtjƒsPtjd|ƒdSt    j
|ƒ}t    j |ƒ}tj d|||f|ƒ|s¥tjd|ƒdSt j||||ƒsÞtjd|||f|ƒdStjd|ƒ}|r    t|||ƒndS(Ns%·Ç×Ô¶¨Ò峡¾°ÖУ¬ÎÞ·¨»ñÈ¡¶¨Òå²É¼¯½±Àø!s)ǰ¶Ë³¡¾°²É¼¯: mapID=%s,lineID=%s,npcID=%ssÎÞ×Ô¶¨Ò峡¾°µØÍ¼ID£¬²»ÔÊÐí²É¼¯!s5×Ô¶¨Ò峡¾°µØÍ¼²»ÔÊÐí²É¼¯! mapID=%s,lineID=%s,npcID=%sRo(RR|RsRRnR[RtDef_PlayerKey_ClientCustomSceneRMRRŠR‹RÆRatOnCustomSceneCollectOKRRR—(    R9RR)RRhRR R•Rl((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytOnGetCustomSceneCollectAwardSs&     cCsdS(N((RRRlt
collectCntRœtisSweep((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR—jscCsdS(N((RtaddExptaddMoneyt    addZhenQitsyncItemInfoListt collectNPCID((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytSyncCollectionItemInfopsc CsIt}|dkr{g}t}tjƒ}xNt|jƒƒD]7}|j|ƒ}|jƒr=|j    |j
ƒƒq=q=Wn|s…dSg}xl|D]d}|j t j |ƒ}|rÁ| rÁq’ntjƒ}    |    jƒ||    _||    _|j    |    ƒq’W|sdStjƒ}
|
jƒ||
_t|
jƒ|
_tj||
ƒdS(N(R RRäRtIPY_DataR»tGetCollectNPCCounttGetCollectNPCByIndexRfRŽRRåRRpRlttagMCNPCIDCollectionCntRéRnt CollectionCntttagMCNPCIDCollectionCntInfotNPCCollCntListRŽt
CollNPCCntRtRu( RRst    isSyncAllt
ipyDataMgrR9R¹tsyncListRt    collCountt collCntInfot npcIDCollInfo((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytSyncCollNPCTimess:      
         
    cCs¨t|ƒi}xG|jƒD]9}|jtj|ƒrtj|tj|dƒqqWxGtdƒD]9}|jtj|ƒrgtj|tj|dƒqgqgWdS(Nii(    tCollNPCTimeOnDayR‰RåRtDef_PDict_DropCountTodayRRæRætDef_PDict_DropColorToday(RtitemDropLimitDayInfoRØRÉ((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt PlayerOnDay˜s
!!cCst|dgƒdS(Ni(tDoResetCollectNPCTimeByType(R((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR¸¤scCs×g}tjƒ}x¨t|jƒƒD]”}|j|ƒ}|jƒ}|rd|jƒ|krdq%n|jƒsvq%n|jt    j
|ƒs’q%nt j |t    j
|dƒ|j |ƒq%W|rÓt||ƒndS(s_ÖØÖòɼ¯Îï²É¼¯´ÎÊý
            ÖØÖÃÀàÐÍ: 0-²»ÖØÖã¬1-ÿÈÕ5µã£¬12-Áé²ÝÔ°ÖØÖã¬14-ÏɲÝÔ°ÖØÖÃ
    iN(RR©R»RªR«RtGetCollectResetTypeRfRåRRpRRæRŽR·(Rt resetTypeListtresetNPCIDListR²R9R¹R((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR½©s    c    Cs i}|s|Stjƒ}tjdt|ƒƒg}xIt|jƒƒD]5}|j|ƒ}|jƒ}|dkrqLn|jƒ}||krqLn|j    |ƒd}    t
j |ƒ}
|j ƒ} |j ƒ} t
j|ƒ} d}|jƒtjks|jƒ rbd}    |jƒ}|dkrbtd||jƒƒ}td||ƒd}qbn||
| | | |    |g||<qLWtjdt|ƒƒ|S(NsGetNPCInfo...queryNPCIDList=%siiiès    npcInfoDict=%s(RRURRÁRæt GetNPCCountt GetNPCByIndexR†RRŽR8RfRRReR1R^R2tIsAliveR+RRf(tqueryNPCIDListR)t npcInfoDicttgameNPCManagert findNPCIDListR9RtcurIDRRÖtcurHPRCRDtmaxHPtrefreshRemaindSecondt refreshTimetpassTick((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt
GetNPCInfoÅs<        "  #cCsýtjƒ}|jƒ||_||_g|_x£|jƒD]•\}}|\}}}    }
} } } tjƒ}|jƒ||_||_    ||_
|    |_ |
|_ | |_ | |_| |_|jj|ƒq>Wt|jƒ|_tj||ƒdS(N(RlttagMCNPCInfoListRétMapIDt    PlayerCntt NPCInfoListRgt tagMCNPCInfoR}RntNPCHPRHRoRptIsActivet RefreshSecondRŽRŽt
NPCInfoCntRtRu(RR t    playerCntRÅt npcInfoPackRÈtnpcInfoRRÉRÊRCRDRÖRË((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt SyncNPCInfoôs* 
             
                                c    Cs¼i}tjƒ}tjdt|ƒƒt|tƒrñxft|j|ƒƒD]œ}|j||ƒ}|j    ƒ}|dkr„qNn|j
ƒ}|r¨||kr¨qNn|j ƒt j ksN|jƒ rÐqNn|j|dƒd||<qNWn°x­t|jƒƒD]™}|j|ƒ}|j    ƒ}|dkr7qn|j
ƒ}|r[||kr[qn|j ƒt j ks|jƒ rƒqn|j|dƒd||<qWtjdt|ƒƒ|S(Ns!GetNPCCntInfo...queryNPCIDList=%siis    npcCntDict=%s(RRURRÁRRkR»tGetNPCCountByGWIndextGetNPCByIndexByGWIndexR†RR1R^R2RÃRŒRÁRÂ(    RÄR)RÉt
npcCntDictRÆR9RRÈR((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt GetNPCCntInfos8    "!   "cCs£tjƒ}|jƒ||_g|_xR|jƒD]D\}}tjƒ}|jƒ||_||_|jj    |ƒq5Wt
|jƒ|_ t j ||ƒdS(N(RlttagMCNPCCntListRéRÐRÒRgttagMCNPCCntInfoRntCntRŽRŽR×RtRu(RR RÞRÙR¶tnpcCntRÚ((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytSyncNPCCntInfoAs 
         
        cCsdS(N((RR R•RRØt    equipInfo((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytSendGameServerGoodItemRecordRscCsdS(N((R9RR)((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytOnBuyCollectionCnt`scCsåtjƒj|ƒ}|j}tjddiƒj|ƒ}|sFdSd}|tj||ƒ7}|j    t
j |dƒ}|j ƒ}||kr±tj d||f|ƒdStjddiƒj|ƒ}    |    sCtjddiƒjt|ƒgƒ}
|
stj d|ƒdS|t|
ƒkr6|
d}    qC|
|}    n|    sMdStjdd    iƒjt|ƒtjƒ} i|d
6|t
j6} tj|| |    t
j| ƒ} | s¶dStj|t
j ||dƒtj|ƒdS( NtKillBossCntLimit1iisH¹ºÂòBOSS¿É»÷ɱ´ÎÊý, ÒÑ´ïµ½½ñÈÕ×î´ó¿É¹ºÂò´ÎÊý£¬hasBuyCnt=%s, canBuyCnt=%siis5ûÓÐÅäÖÿɹºÂòboss´ÎÊýÏûºÄ£¬ÎÞ·¨¹ºÂò! killBossMark=%siÿÿÿÿiR9(RR|Rst KillBossMarkRR‡RŒR(tGetAddBossBuyCntRåRtDef_PDict_Boss_KillCntBuyCntRRRÁRŽR^tTYPE_Price_Gold_MoneytDef_Cost_Reason_SonKeyRtPayMoneytDef_Cost_BuyKillBossCntRætCrossPlayerDatatSendMergePlayerDataNow(R9RR)Rt killBossMarktbuyTimesVIPPriIDt    canBuyCntt    hasBuyCntRhtcostGoldt costGoldListt    moneyTypetinfoDicttisOK((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytOnBuyKillBossCntks>      '  * cCss|j}|j}tjƒjtj|ƒ}|s8dStjƒjtj|dƒtjd|||fƒdS(Nis,ClientNPCShowEnd npcID=%s,endType=%s,tick=%s(    RntEndTypeRRIRKRtDef_FBDict_NPCShowEndTickR©R(R9RR)RtendTypetendTick((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt OnNPCShowEndœs        cCsZtjddƒ}tjƒjtjƒd}||krVtjddƒ}||kStS(Nt    BossShuntii(    RR­RRORPR0tDef_Notify_WorldKey_ServerDayR‡R (R tbossShuntMaxServerDayt openServerDaytbossShuntMapIDList((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytIsMapNeedBossShunt¦s  
cCs^||f}tjj|iƒ}||jƒ|g||jƒ<|tj|<t||ƒdS(N(RŠtg_bossShuntPlayerInfoRŒRRtGameServer_WorldBossShuntInfo(RR R•RR)RÎtshuntPlayerDict((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytAddBossShuntRelatedPlayer¯s    cCs||f}tjj|iƒ}t|||gƒ}tjƒjdddd|t|ƒƒtjd|||f|ƒdS(NitWorldBossShuntInfosE֪ͨGameServerµØÍ¼Boss·ÖÁ÷ÐÅÏ¢: mapID=%s,lineID=%s,shuntPlayerDict=%s(    RŠRRŒRÁRR|RÂRŽR(R R•RÎR    tmsgStr((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR¸s  (cCs|s
dSdS(N((RRt attackCountR+((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytUpdateNPCAttackCountÀscCs5|d}|d}|d}t||||ƒdS(NRnt AttackCounttMaxCount(R(RRRR R+((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytCrossServerMsg_NPCAttackCountÆs
 
 
 
cCs‘|s
dStjƒ}xR|D]J}|jtj|ƒ}tjƒ}||_||_|jj    |ƒqWt
|jƒ|_ t j ||ƒdS(N(RlttagMCNPCAttackCountInfoRåRtDef_PDict_NPCAttackCountttagMCNPCAttackCountRnRtNPCAttackCountListRŽRŽRƒRtRu(RRst
clientPackRR t atkCountObj((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytSyncNPCAttackCountÎs           cCst||ƒdS(N(t__OnAttackedDropItem(tatkObjRR:R)((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt OnNPCAttackedßs cCsdS(N((RR((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRès(™R^RRRRRRdR$t ChNetSendPackRfR"RR¿RaR0R÷RR\R0RRlRéRtRÓRõRëtPlayerPrestigeSysR&RRøR®tPlayerActCollectWordsRtPlayerActBossTrialR
RðtPlayerFeastWishRþR(RûR¡RRRRRòRît
TurnAttackRŠR8R«RUR2ttimetcopyRR®RætNPCAttr_ParamDicttNPCAttr_AttrStrengthenListtNPCAttr_PlayerCntCoefficienttNPCAttr_NPCPlayerCntCoefficienttNPCAttr_DynNPCLVMaptNPCAttr_DynPCCoefficientMapRR R$R&R)R+R,R-R3R5R7R9R;R=R@RBRDR RƒRoR­RäR´tDef_NPCMaxDropRateRÝRáRåRìRðRõRñRÿRRRR/R0R4R;RFRTRkR{R‚R‰R†RœR€RËR¨R1R`RYR`RbRaRdRnRgR{RxR}RwR‘R›R–R R—R¨R·R¼R¸R½RÎRÛRßRäRæRçRûRRR
RRRRRR(((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt<module>s4                                                       
                                                                      t        E             
                !    !    +    >    ]             -(                8        J            Rÿÿÿÿÿÿÿÿÿÿª                                                                 %              /     .              1