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
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
Œ\hc    @sæddlZddlZddlZddlZddlZddlZddlZddlZddlZddl    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/ddl0Z0ddl1Z1ddl2Z2ddl3Z3ddl4Z4ddl5Z5ddl6Z6ddl7Z7ddl8Z8ddl9Z9ddl:Z:ddl;Z;ddl<Z<ddl=Z=ddl>Z>ddl?Z?ddl@Z@ddlAZAeBZCeDdƒ\ZEZFZGZHZIZJd„ZKeBd„ZLd„ZMd„ZNd„ZOd„ZPd    „ZQd
„ZRd „ZSd „ZTd „ZUd„ZVd„ZWd„ZXd„ZYd„ZZd„Z[e\d„Z]d„Z^d„Z_eBeBe\gdgde\d„Z`ddeadgd„ZbdZceBeBeBeBeBdd„Zdd„Zed „Zfd!„Zgd"„Zhd#„Zid$„Zjd%„Zkd&„Zld'„Zmd(„Znd)„Zod*„Zpd+„Zqd,„Zre\ead-„Zsead.„Ztdddddd/„Zud0„Zvd1„Zwd2„Zxddd3„Zyd4„Zzd5„Z{eagd6„Z|d7„Z}d8„Z~d9fd:„ƒYZd;„Z€d<„Zd=„Z‚d>„Zƒd?„Z„d@„Z…dA„Z†dB„Z‡dC„ZˆdD„Z‰dE„ZŠdF„Z‹dG„ZŒdH„ZdI„ZŽde\e\dJ„ZddK„ZeBdL„Z‘dM„Z’dN„Z“gdO„Z”dP„Z•dQ„Z–eBdR„Z—dS„Z˜gdT„Z™dU„ZšdV„Z›dW„ZœdX„ZdY„ZždZ„ZŸd[„Z dd\„Z¡d]„Z¢d^„Z£d_„Z¤d`„Z¥dS(aiÿÿÿÿ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.pytInitNPCis" 
 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.pytGetNPCLVxs  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 GetNPCDataPy„s 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œscCsP|jƒ}tjd|ƒ}|s(dSd}d}tjƒ}|jƒr¦tj|ƒrvtjƒj    t
j ƒ}q¦|j t jƒ}|s¦tjd|ƒdSn|jƒ}|dkrÙtjƒj    t
jƒ}nÛ|dkrú|j t jƒ}nº|dkr|j t jƒ}n™|dkr`|j t jƒ}    |j t jƒ}
tj|    |
ƒ}nT|d    kr´tj|jƒƒ} tjd
|| ƒ} | r«| jƒ}q´d}n|dkr,|jƒt jt jgkr,d} |jt j ƒ}|rtj!|t"j#ƒ} n| r,| jƒ}q,n|j$ƒrPt%||jƒƒ}n|dkr~| r~tjd ||fƒdSt&j'||ƒ}d |kr©|d }ni}|j(|ƒ|sÆdS|rñ|j)ƒ|krñ|j*|t+ƒnt,j-|ƒ}t,j.|ƒ}x—|j/ƒD]‰\}}t0|d |ƒs]|dkrt1||ƒqqn|dkr|t,j2||ƒqt3|t j4ƒ}t5|d |ƒ|ƒqWt,j-|ƒ}||kr!|rÝt,j6||ƒq!|r!t7|||ƒ}t,j6||ƒ|j8ƒ|j9ƒq!n|rL|jƒt j:krLt;||ƒ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(<RRRRt    GetGameFBtGetIsStrengthenByPlayerCountt FamilyRobBosstIsHorsePetRobBosst GetGameWorldtGetGameWorldDictByKeyR0t.Def_Notify_WorldKey_HorsePetRobBossPlayerCounttGetGameFBDictByKeyRtDef_FB_NPCStrengthenPlayerCnttErrLogtGetLVStrengthenTypet"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(RRMt    GetLineIDtGetIDRtGetFuncEvalCfgRXtchoicetkeyst
PyGameDatatg_fbRobotJobDicttgetRjt
isinstanceRntappendtlisttDebugLogtGetSkillManagertLearnSkillByIDRdtOnRandomRobotJob( RtnpcLVtlineIDtobjIDt jobSkillDicttrobotJobtlineRobotJobDictt skillInfoDictt skillIDListt    skillInfotneedLVt skillManagertskillID((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRrs* 
 
   c
CsØ|jƒ}tjddƒ}||kr.dS||}g}x[|jƒD]M\}}||kriqKnt|tƒrˆ|j|ƒqK|t|ƒ7}qKWtj    d|||fƒx|D]}    |j
|    ƒq½WdS(NtXMZZRobotSkillis¸øNPC¼¼ÄÜ: job=%s,npcLV=%s, %s( R”RRŠRjRRnR‘R’RR“R•(
RtjobR—R¡RšRRžRŸR R¢((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__DoGiveVSPlayerNPCSkill.s   
  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.pytGiveKillNPCDropPrizeBst ItemNoPickUpcCsdS(N((Rt giveItemListRtdropPosXtdropPosYtisDropDisperseR©textraVirtualItemList((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytDoGiveItemByVirtualDropUsi@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
InitPyItemRRRtg_filterEquipDictt GetGameDataRtDef_PlaceEquipTypetvaluestFilterItemByTypetxrangetGetFilterItemCountt GetFilterItemt GetCanNPCDropRt
ItemCommontGetItemClassLVt GetItemColort
GetSuiteIDt GetJobLimitt GetEquipPlacet GetItemTypeIDR‘tLogRj(tfindIDtclassLVtcolortisSuitt    placeListt itemJobListtfindTypetkeytfilterItemIDDicttgameDatat itemTypeListtitemTypetititemDatatsuiteIDtitemJobt    itemPlacetitemIDt placeItemListt
itemIDListtitemInfot    curIsSuit((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__GetEquipIDList\sZ         !      
"        cCs>tjddƒ}|dkr"dS|||dkr:dSdS(Niii ièi(RXRY(tcurTicktlastActionTicktcurTime((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytIsInActionTime¡s  cCs|jƒtjkrtStS(N(tGetGameNPCObjTypeRat
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 tGetGameObjTypeRaRbRê(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èRRaRé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`RaRbRóR‰tIsEmpty(t
curobjTypet    curSummonR}Rõ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 GetObjByIndexR8RiRøRaRb(
RtmatrixtgameMaptsrcPosXtsrcPosYtcurPlayerCounttcurPostmapObjRÙtcurObj((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGetPlayerCountInSightByMatrixs     "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øRaRbRR8RiRR`R‰R‘(RtplayListt seeObjCountRÙtseeObjt
seeObjTypet curTagPlayer((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGetInSightPlayerList_NPC=s(    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øRaRbRR8RiR‰R‘tGetTeamRR`t    GetTeamID( RRðt    checkTeamRtseePlayerCountRÙRRtseeObjIDt curPlayTeamRt
curTagTeam((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGetInSightPlayerList_SummonNPChs@        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ìRRRR8RiRRt    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  
cCs
tjƒS(N(tGameLogic_FamilyInvadetGetDefaultMaxAngryNPCIDList(((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR7scCs9|jƒtjkrdS|jƒs5|jtƒndS(N(t GetCurActionRatlaNPCDietGetIsNeedProcessR
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.pytGetNPCMaxAtkDists 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èRaRüt GetPassiveBufRêtGetActionBuffManager(Rt getActionBufft getAuraBufftbuffRefreshList((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGetNPCBuffRefreshList4s$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 GetOrgSpeedRatmtRuntSetCurMoveTypeRnR^RtDef_NPC_Dict_SpeedPertSetSpeedtmtSlowtmtNormalRRRR(Rt changMoveTypetchangeSuperSpeedt curNPCSpeedtcurNPCBaseSpeed((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytChangeNPCMoveTypeNs*   ) #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 GetNPCManagertAddPlayerSummonNPCRMtGetTickt SetNPCTypeIDt SetBornTimet    SetAITypeRt SetLastTimetSetDictRRt SetSightLeveltDef_NPC_Dict_SummonRefreshIDR[RqRrRtRebornR t
NPCControltDoNPCRebornCommLogicRdtDoFBRebornSummonNPC(
tnpcIdtrebornXtrebornYtaiTypetlastTimetplayerIDt
sightLevelt    refreshIDRR/((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt SummonMapNpc{s.   
    cCs‰tjƒ}|jƒ||_||_||_tjƒ}xEt|j    ƒƒD]1}|j
|ƒ}|sqqPnt j ||ƒqPWdS(N( tChPyNetSendPackttagMCSummonMapNPCRïtNPCIDtPosXtPosYRtGetMapCopyPlayerManagerRìtGetPlayerCounttGetPlayerByIndext NetPackCommont SendFakePack(tsummonIDt
rebornPosXt
rebornPosYtmapNPCt playerManagerR@R((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( RtGetPlayerManagerRztObjIDt FindNPCByIDR[RR\R]R^R_t GetPlayerIDt    SetDeadEx(R@t
clientDataR/RR™RR}((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytOnRecyclePriWoodPileºs    
cCsStjƒj|ƒ}|j}|j}|j}|j}t|||||ƒdS(N(RRƒRzRutCounttHPtHPExtSummonPriWoodPile(R@RˆR/RRR0thpthpEx((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=%sRs(ii('RtGetCustomMapIDtGetCustomLineIDRdtOnCanSummonPriWoodPileRRRR†Rtg_playerPriWoodPileNPCDicttlenR/R“R\RÁR]R_RdRZRRcRR_tGameMaptGetEmptyPlaceInAreaRRRfR Rgt ResetNPC_InitRêR0tDef_PerPointValueR8RmRkt NotifyAppearR‘(RRR0RŽRR¦R˜RotplayerPriWoodNPCListR1tnowCountt 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(R†RR”tpopR‡(RRoR›Rð((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytClearPriWoodPiles  cCsQg}|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ƒƒt!|ƒtj"kr¶t#j$|ƒq¶nt%j&|ƒ|tj'ddƒkrît(j)|ƒqînt*j+|ƒt,j-|ƒt.j-|ƒ|j/ƒtj0krwtjƒj1ƒ}
t2j3j4|
iƒ} | j5|jƒdƒ| t2j3|
<n|jtj6ƒ} | dkr | t2j7kr t2j7| } xY| D]N}|r¸|jƒ|jƒkr¸| j8|ƒ| st2j7j5| ƒnPq¸q¸Wnt9}|j|jtj:ƒ|jtj;ƒ|jtj<ƒ|ƒdS(NsSetDeadEx objID=%s,npcID=%sitBOSSInfotCrossYaomoBossi(=R‰RRR“RìRíRîR‘R‡RøRatgotNPCRdt DoFB_NPCDeadR^RRRctNPCRealmRefreshtGetTagNPCRefreshtSetDeadRMR^t
IsGameBossRRtGetMapIDtDef_FBMapID_SealDemontDef_FBMapID_ZhuXianBosstGameServe_GameWorldBossStateRIt SetGameFBDicttMap_NPC_WorldBossDeadTickR7tDropOwnerType_FamilyRKtClearFamilyOwnerBossHurttChNPCt OnNPCSetDeadt
GetFuncCfgtPlayerCrossYaomoBosstOnCrossYaomoBossDeadR(tClearTeamPlayerHurtValuetNPCHurtManagertDeletePlayerHurtListt
NPCHurtMgrR[RqRˆRRŽRR¢R_R”tremoveRêtDef_NPCDead_ReasontDef_NPCDead_KillerTypetDef_NPCDead_KillerID(Rt summon_ListR™tnpcidR@t curSummonNPCRðR}t
refreshObjtipyDataR˜RœtpriWoodPilePlayerIDtpriWoodPileNPCListt
priWoodNPCt notifyClient((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR‡#sb    $ )        
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(
RRMR¬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_KillGameWorldBossss$( 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(RRMR¬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¯|s,,      & & c Csçtjƒj|ƒ}|sdStjddƒ}tj||ƒ}|dkrutj|}t    |j
|dƒdtj ƒ}t j |||ƒtj|}    |j
|    dƒd}
t j ||    |
ƒtj||ƒtjd||
|f|jƒƒi|d6|d6|
d6|d6|jƒd    6|jƒd
6} tjd | |ƒtj|tjd|gƒtj|ƒn|rdS|tjkr–tj|tjdƒtj|tj dƒt!j"|tj#ƒt$j%|tj&dƒt'j(|tj)dƒt*j(|tj)dƒt+j,|tj-dƒt.j/|tj0dƒt1j2|tj3dƒt4j5|tj6dƒt7j8|t7j9dƒt:j;|tj<dƒnÕ|tj=krktj|tj>dƒtj|tj?dƒt!j"|tj@ƒt$j%|tjAdƒt'j(|tjBdƒt*j(|tjBdƒt+j,|tjCdƒt.j/|tjDdƒt4j5|tjEdƒn|tjFkrÒt!j"|tjGƒtj|tjHdƒtj|tjIdƒt4j5|tjJdƒng|tjKkr9t!j"|tjLƒtj|tjMdƒtj|tjNdƒt4j5|tjOdƒn|tjFtjKgkr}tPjQ|tjRƒt:j;|tjSdƒn|jTƒtjUkr¨tPjQ|tjVƒntjWd |ƒ} | rÓtXjY||ƒntZj[||ƒdS( NtKillBossCntLimitiis4¸üл÷ɱBoss´ÎÊý: index=%s, todayCnt=%s, totalCnt=%sR™RÏttouchCntttotalCnttAccIDtPlayerIDtAddKillBossCntt BOSSFirstKill(\RR½tFindNPCDataByIDRR¶tGetDictValueByKeyRRtDef_PDict_Boss_KillCntTotalR/tNomalDictGetPropertyR1RtNomalDictSetPropertytDef_PDict_Boss_KillCntt BossHurtMngtNotifyAttackBossCntR“R†tGetAccIDtDataRecordPackt SendEventPackt PlayerSuccesstDoAddSuccessProgressR0tSuccType_FeastRedPack_KillBosst PlayerStatetSetBossStateExittDef_Boss_Func_WorldtSuccType_KillWorldBosst PlayerGubaotAddGubaoItemEffValuetGubaoEffType_KillWorldBosstPlayerActivitytAddDailyActionFinishCnttDailyActionID_WorldBOSStPlayerBossReborntAddBossRebornActionCnttDef_BRAct_WorldBOSStPlayerFairyCeremonytAddFCPartyActionCnttDef_PPAct_WorldBosstPlayerNewFairyCeremonytPlayerWeekPartytAddWeekPartyActionCnttDef_WPAct_WorldBOSStPlayerFeastTraveltAddFeastTravelTaskValuetDef_FeastTravel_WorldBosstPlayerActLogintAddLoginAwardActionCnttDef_LoginAct_WorldBOSSt PlayerActTasktAddActTaskValuetActTaskType_WorldBosstPlayerZhanlingtAddZhanlingValuetZhanlingType_HuanjinggetPlayerTongTianLingtAddTongTianTaskValuetTTLTaskType_WorldBosstDef_Boss_Func_HometSuccType_KillBossHomeBosstGubaoEffType_KillBossHometDailyActionID_BOSSHometDef_BRAct_BOSSHometDef_PPAct_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.pytOnPlayerKillBoss•s€  " #RgcBsSeZdUZd„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<d7„Z=ged8„Z>d9„Z?d:„Z@d;„ZAd<„ZBd=„ZCd>„ZDd?„ZEd@„ZFeedA„ZGdB„ZHdC„ZIdD„ZJdE„ZKedF„ZLdG„ZMdH„ZNedUdI„ZOeddJ„ZPdK„ZQdLeedM„ZRdN„ZSdO„ZTddedP„ZUdQ„ZVdR„ZWdS„ZXdT„ZYRS(VcCsL||_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(    RERRtabsRRtCanMoveR–R—(RMtdestXtdestYtdisttfixPosRtposXtposYtdirXtdirYt    moveDestXt    moveDestYR t    resultPos((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGetMoveNearPoss"      
 
 
 
  c Cs¡|j}|jƒ}|jƒ}tj|||||ƒ\}}    tjƒ}
|
j||    ƒ r—|r—tj||    dƒ} | jƒ}| jƒ}    n||    fS(Ni(    RERRRtPosInLineByDistRRQR–R—( RMtplayerXtplayerYRTRURRVRWRZR[R R\((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(RERR`RÌtGetNametMoveToObj_Detel(RMR™tobjTypeRt tagObjDetel((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt    MoveToObj4s      icCs•|j}|jƒ|jƒ}}tj||||ƒ}||kr|dkr|||||}|||||}n|j||ƒdS(Ni(RERRRR'tMove(RMtdestPosXtdestPosYt sigleMoveDisRtcurPosXtcurPosYtcurDis((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytMoveToPosStepByStepFs    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 (REtOperControlManagertIsObjCanDoActionRtDef_Obj_ActState_ServerActRatoalMoveRRRR<tGetRefreshPosCounttGetRefreshPosAttGetCurRefreshPointIndexRR't GetMoveDisttMoveBackRaR–R—R8t    laNPCMoveRMR^t GetActionTickt
SetDestPosR[RVRg( RMRet moveAreaDistRRVRWRRRSt curRefreshPostmoveDistRZR[R\((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRcVs:              $$
   " 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(RERoRpRRqRaRrRRRRR    R R
RÁR RøR¦R`R‰RèRéRóR/R<R–R—RgRê(RMRVRWt fixAreaDistRR tnpcPosXtnpcPosYRRÙRt
curObjTypetcurTagR\RZR[((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt    FixTagPos¡sD             9   cCs|j}|jƒ}|jƒ}tj||ƒ}|dkrFtjS|jƒdkr_tjStj    |||jƒ|jƒƒS(Ni(
RERRRR`RRtDef_NPCErrorMaxDistR‰R'(RMttagIDttagTypeRRVRWttagObj((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 ²éÕÒ¶ÔÏó, »ñµÃ¶ÔÏóʵÀýʧ°Ü(RERøRatgotItemR RR&R‰Rt FindNPCAngryRR8t GetAngryValueR`RÌRR(tCanAttackByPathR)R*R+RR,Rê(
RMRR/RRR"tnpcAngryt
angryValueR3R4((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(RERR«R9R[RqR Rê(RMR((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(-RER t
GetAtkTypeRtGetAngryValueTagt_NPCControl__IsValidAngryObjRRt GetMapFBTypeR¬RRßtGetRecordMapIDRRŠRatfbtNullR¶tGetAttentionPlayersCountRìtGetAttentionPlayerByIndexRR8RiRt _NPCControl__CheckAddToAngryListR'RRtGetSightRtDef_NPCFirstSightAngryValuetDef_Screen_AreaRøRbtGetAngryNPCCounttDef_NPC_SeePlayerAddAngrytAddObjToAngryListRêRtRuRRR«tGetIsInRefreshPoint(RMR/t
isUpdAngryRt
needResorttcurAngrytmapTypeR¦t recordMapIDtmapAngryNPCCountDicttangryNPCCountLimitR!RÙRRTt addAngryValuet refreshPoint((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytAddInSightObjToAngryList0sv          0   10 cCsq|s
dS|jƒtjkr8|jƒtjkr8dS|}|dkr]||jƒ7}n|j||ƒdS(N(RøRaR¦R[tntFairyRt GetSkillAngryR (RMtobjDetelRÑtuseSkilltaddAngry((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytAddObjDetelToAngryList_ByAttackŸs 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( RERR&R R(tCheckObjCanDoLogicRøR‰t_NPCControl__CheckCanAddAngryRRaRbR7RtDropOwnerType_MaxAngryR`RtGetTeamManagertFindTeamRRR“RÁtGetMemberCountt    GetMemberR†t_NPCControl__AddAngryValueR8RiR:R
Rê(RMRtplusAngryValuetcanPiletcheckRRtcurObjIDt addAngryTeamRRRÙ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(RŠRR8R‹tAddAngryR0R™t SetAngryValue(RMRR½RRº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(RERR`RÌR R*R+RRR,RèRaRéRêR‰R¦RRbR&R(tCheckPlayerAttackMode_Player(    RMR½RRt curObjDetelR4t curNPCDetelt curNPCOwnert curObjOwner((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__CheckCanAddAngrys<    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("RERR7R RtRuRìt GetAngryCountR“tGetObjIDt
GetObjTypeRR`t DeleteAngryRêRaR¦RR(R)R¡RRR'R›ROt CanSeeOtherRBtGetNPC_Is_GateR*R+RRR,(RMR/RRtdefaultMaxAngryNPCIDListR£RªRÙRŽtangryIDt    angryTypeRRTR4((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytRemoveDeathInAngryListGsb               !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(RERtGetLastResortTickRÔR«tGetMaxAngryTagRR8RiR9RORwtResorttSetLastResortTick(    RMR/trefreshIntervalR¢RRtlastTickt removeRsortR£((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytRefreshAngryList™s      4  cCs^|j}|jƒ}xBtd|jƒƒD]+}|j|ƒ}|j|ƒsUq+n|SWdS(Ni(RERRìRËR“R”R(RMRt 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ÌR8R‹t GetIsDisable(RMR¤t curAngryValue((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__IsValidAngryObjÑs  cCs#|j}|jƒ}|jƒtS(N(RERRïRê(RMRR¤((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt ClearNPCAngryås     
cCs#|j}|jƒ}|jƒtS(N(REtGetPlayerHurtListRïRê(RMRt npcHurtList((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytClearNPCHurtListðs     
cCs|j}|jtjƒS(s¯NPCÊÇ·ñÉËѪ±£»¤ÖÐ
        ÒòΪÊÖÓαȽϻá³öÏÖÍøÂçÇл»µÄÇé¿ö£¬´Ëʱ»á¿ÉÄÜ»áÒýÆðµôÏßÖØÁ¬
        ËùÒÔÕë¶ÔÊÖÓÎ×öÁ˵ôÏß3·ÖÖÓÄÚÉËѪ±£»¤£¬·ÀÖ¹Íæ¼ÒÖØÁ¬ºóÉËѪ±»Çå¿Õ£¬ÌåÑé²»ºÃ£»
        (RER^RtDef_NPC_Dict_InHurtProtect(RMR((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytIsInHurtProtect÷s    cCs@|j}t|t|ƒ}x|D]\}}|jƒq"WdS(N(RERMRêRï(RMtisClearAuraBuffRRLt    buffStatet    canPileup((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt ClearAllBuffs
    cCsH|jƒ|jƒ|j|ƒ|j}tj|ƒtj|ƒtS(N(RáRäRêRERºtClearPlayerHurtListR¼Rê(RMRçR((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__ClearNPCAllStates
 
       cCsx|j}|jtƒ|s:tj|ƒtj|ƒkrQ|jƒ|jƒn|jd|ƒ|st|j    ƒnt
S(NRs( REt_NPCControl__ClearNPCAllStateR R8RiRht_NPCControl__InitNPCSummont_NPCControl__NormalNPCInItCDtRefreshNPCStateRoRê(RMRsR((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(    REt SetAttackTicktSetUseSkillTickR”RìR=R>RtSetLastUseTick(RMRt curNPCManagerRÙt curNPCSkill((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__NormalNPCInItCD>s        cCsg|j}g}x6t|jƒƒD]"}|j|ƒ}|j|ƒq"Wx|D]}t|ƒqOWdS(N(RERìRíRîR‘R‡(RMRtcurNPC_Summon_ListR@RðRÃ((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__InitNPCSummonSs     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(REtGetCurPatrolIndextGetPatrolPosAtRRRNRaRUR[RQRgRçRytGetPatrolPosCounttSetCurPatrolIndex(    RMR/Rt patrolIndext    patrolPost
patrolPosXt
patrolPosYt curNPC_PosXt curNPC_PosY((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt __PatrolMovefs4         
       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(RERût_NPCControl__PatrolMoveRtRuR/t GetMoveAreaRRtGetAreaRRwRçRyRXRYR[RaRURRt LineNearToPosRg(RMR/RtPosMaptmoveAreaRVRWt minMovePosXt maxMovePosXt minMovePosYt maxMovePosYtposMapXtposMapYt
posMapAreatnewPoint((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytDoNormalNPCMoveœsH       
 
 
 
 
 
cCstj|jƒƒS(N(Rt GetPsycoFunct)_NPCControl__Func_GetRandPosInRefreshArea(RM((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( REtGetRefreshPointRRRRRRR[Rat ntFunctionNPCRR–tGetNearbyPosByDis(RMRtposMapRRRRVtpoxY((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(RER¨R©RRtRu(RMRRÄ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(RERR¡RRRêR8RaRxRNRQt GetDestPosXt GetDestPosYR (RMRRª((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 RRvRRê(RMRkRlRª((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(RERûRXRYRúRRRRæR˜R[RaRQRêRg(RMRt patrolCountRýRþRVRW((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRw3    s         cCsb|j}|jtjd|jƒdƒƒ|jƒ\}}|j||tƒ|j|ƒdS(Nii(    REtSetCurRefreshPointIndexRXRYRsRRfR Rh(RMR/RRVRW((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt DoNPCRebornR    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ƒt|ƒt
jkr÷tj|ƒq÷qún|jƒ}x t|jƒƒD]Œ}|j|ƒ}| sG|jƒdkrKPn|jƒt
j krfqnt!j"d|j#ƒ|jƒ|j$ƒfƒt%j&|||ƒqW|j'ƒdS(NiR¤is/NPC¸´»î£¬Ì×ÉϹ⻷: objID=%s,npcID=%s,skillID=%s((RER˜RêR8RmRhRRØt RebornNotifyRcRtDef_NPC_Dict_HPPerLogicMarkt!Def_NPC_Dict_RebornPreNotifyIndexR´t OnNPCRebornRdt DoFBRebornNPCRR«RRR¯R7R²RKtFamilyOwnerBossOnRebornR”RÁR=R>tGetSkillTypeIDt GetSkillTypetDef_SkillType_AuraRR“R‰t
GetSkillIDt
SkillShellt NPCUseSkillt_NPCControl__notifyAppear(RMR/RtcurNPCIDRÅR¡R@R¯((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRh^    s6     
    ,
cCsdS(N((RM((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__notifyAppearŠ    s cCsdS(N((RM((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR"›    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(RERRRŠRRïtsortedRêR8RiRhR^RR#Rt WorldNotifyRc( RMtdropTypetownerIDRR/thpPerLogicNPCIDDictthpPerLogicListt    hpPerListtsysMarktnowHPPerthpPerLogicMarktlogicHPPerListthpPer((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt DoHPPerLogicª    s$       
  cCs“|j}|jƒdkrdS|jƒdkrXtjd|jƒƒ|j|ƒn|jƒ||jƒ}|dkr‚dS|j|ƒdS(Nis¼ì²âµ½NPC¿ìËÙ¸´»î %si(REtGetRefreshTimeRyRR“R‰t SetActionTickR!(RMR/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^RR$R•RntmathtceilRcRRMR¬RR4( RMRRBRtpreRebornNotifyNPCDicttnotifyMinuteListt
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(RER^RtDef_Obj_Dict_TurnFightPosInfotRefreshTurnfightNPCAttrtRefreshNPCAttrStatetRefreshNPCActionState(RMt canSyncClientRsR((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(RER^RtDef_Obj_Dict_LineupPlayerIDRft
AttrID_Atkt
AttrID_Deft AttrID_MaxHPR$RtGetAtktGetDefRhRR“R‰R8tClearBattleEffecttResetNPCBattleStatet    SetMinAtkRt    SetMaxAtktSetDefRk(RMRtlineupPlayerIDt heroAttrDictR#((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRQ
s.        
 
    & 
cCs™|j}|jƒ|jƒ|j|jƒƒ|j|jƒƒ|jƒtj    krlt
j ||ƒdSt ||ƒt j|ƒ}|j|ƒdS(N(RER[R\RTRPtSetAtkIntervaltGetBaseAtkIntervalRèRaRüRýtRefurbishPetAttrR†R,tCalcBuffer_NPCBattleEffecttRefreshNPCSpeed(RMRTRsRt allAttrList((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRR1
s    
 
 
  c
Csö|j}tjtjƒjƒƒ}tjƒ}tjd||ƒ}|sOdSt    ||ƒ|j
ƒ}|j ƒ}|j ƒ}t ttjddƒƒƒ}    tjd|jƒ||    fƒtj||    ƒtj||    ƒ|jƒ|jƒdS(s¢ÖúÕ½»úÆ÷ÈËÖ»ÉèÖÃѪÁ¿ÊôÐÔ
                        ÑªÁ¿Ëã·¨£¬£¨ÖúÕ½Íæ¼Ò=ÖúÕ½»úÆ÷ÈË£©£ºÃ¿¸ö¸±±¾ÅäÖÃÉ˺¦*£¨ÖúÕ½Íæ¼ÒÕ½Á¦/¸±±¾¹æ¶¨Õ½Á¦£©*ϵÊýÖµ  ÏµÊýÖµÔݶ¨Îª50
        t FBHelpBattleNtHelpBattleRobotis3ÉèÖÃÖúÕ½»úÆ÷ÈËÊôÐÔ: objID=%s,fightPower=%s,maxHP=%s(RERßR–RRR¬tGetFBPropertyMarkRRÚR3tGetFightPowerMintGetRobotBaseHurttGetRobotHPCoefficientRntevaltGetFuncCompileCfgR“R‰R8RkRmRoRp(
RMt
fightPowerRR¦t
funcLineIDRÅt fbFightPowertbaseHurtt hpCoefficienttmaxHP((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytSetHelpBattleRobotRebornAttrW
s"          
 
cCsÞ|j}|tjjtjdƒ}|sV|jtjƒr©|jtjdƒq©nSt|j    ƒt
j t dt t
j |ƒƒƒ}|j|ƒ|jtj|ƒtjƒjƒtjkrÚt||j    ƒƒndS(NigY@(RERtCalcAttr_BattleNolineRtTYPE_Calc_AttrSpeedR^RSRcRnROR0tDef_MaxRateValueRtfloatRTRRR¬tDef_FBMapID_GatherSoultNPCSpeedChangeNotify(RMRgRtspeedPertspeed((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRfp
s    3 cCs'|j}tj|ƒtj|ƒdS(N(RERotClearObjActionStateR,tCalcBuffer_ActionState(RMR((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRS…
s     cCs;|j|ƒ}|j|ƒ}|s*|r7|jƒndS(N(tRefreshBuffStateNoTimelytRefreshBuffStateTimelyRR(RMR/trefreshAtrefreshB((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytRefreshBuffState“
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(REt GetTickByTypeRtTYPE_NPC_Tick_BufftTYPE_NPC_Tick_Timet SetTickByTypeR t    BuffSkillt RefreshBuffRCRDRGt SkillCommontCheckAddAuraSkilltCheckAuraSkill(RMR/Rtrefreshtresult((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR¢
s    &cCsÂ|j}||jtjƒtjtjkr3dS|jtj|ƒtj||jƒ|ƒtj||j    ƒ|ƒtj||j
ƒ|ƒ}|drª|j ƒnt j ||ƒ|dS(Nii(RER†RtTYPE_NPC_Tick_Buff_TimelyRˆR‰RŠR‹RERFRIRSR,tProcessPersistBuff(RMR/RR((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR‚Á
s    
 cCsL|j}|jƒ}|jƒ|jƒ|jƒtjƒjƒ}|jsTdn |jj    ƒ}t
j d|ƒ}|r|t j t jgkrt|ƒt jkrÀtj||jƒ}ng|jD]}|jƒ^qÊ}t|jƒ|dt|ƒn|t
jddƒkr8tjdd|jƒgƒn|jƒjƒdS(NtR¤itBossRebornServerBossitBossRebornBossKilled(RERt!_NPCControl__SetFeelNPCPlayerListt_NPCControl__GiveObjPrizet_NPCControl__EventKillNpcRRR¬RGt GetPlayerNameRtGetIpyGameDataListNotLogRR®R­R7R²RKtFamilyOwnerBossOnKilledRLRJR†R×RêR¶RR4RRï(RMRRR¦t
killerNamet bossIpyDatatplayerRÓ((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt __KillLogicß
s"     
 
 
"
c Cs |j}g|_tj|ƒ}|s6|jƒ}ng}xÔt|jƒƒD]À}|j|ƒ}|j|ƒ}|sqOn|d}|d}|r¸||kr¸|j|ƒq¸n|rOt    j
||j ƒ|j ƒƒ}    x-|    D]"}
|
|kræ|j|
ƒqæqæWqOqOW||_dS(Nii( RERIRºRâRÁt GetHurtCountt    GetHurtAtt_NPCControl__GetTagByHurtObjR‘RtGetAreaTeamMemberRR( RMRRãteventPlayerListR@thurtObjt 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(RGt_NPCControl__MissionOnKillNPCRIR†Rê(RMt eventPlayer((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__EventKillNpc3 s    $cCsdS(N((RMt
dropPlayerthurtTypethurtIDtownerPlayerListt isOnlySelfSee((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt __NPCDropItemE scCst|j}|jƒtj|dƒ|jƒ|jƒ}|tjkrYtj    |ƒdS|j
t ƒt |ƒdS(Ni( REt_NPCControl__KillLogicR8RmRíRèRaRüRýt
SetPetDeadR
R R‡(RMRtcurNPC_GameNPCObjType((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt    SetKilledL 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ˆÃ@(REt GetHPRestoreR R8RhRiRcRR#R8Rat    laNPCNullRêRætGetRestoreTimetDef_NPC_ProcessHP_TicktSetRestoreTimeRnRŒt
SkillAddHP(RMR/Rt hpRestoreRatet curNPCMaxHPtlastRestoreTimet restoreValue((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytProcessHPRestoreo s,       $ cCsdS(N((RMR/((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytProcessBattleHPRestoreš 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(-RERt"_NPCControl__FindLastTimeHurtObjExRFRR«t_NPCControl__FindNPCKillerInfoRHRKRLRRÌt _NPCControl__DoLastTimeHurtLogicR•RR¿RGRtGetOfficialRankR&RRt
GetLvLargeR†t#_NPCControl__KilledByPlayerSetPrizeR‘RJtDef_NPCHurtTypePlayertDef_NPCHurtTypeTeamtDef_NPCHurtTypeSpecialt_NPCControl__NPCDropItemt!_NPCControl__KilledByTeamSetPrizetDef_NPCHurtTypeFamilyt#_NPCControl__KilledByFamilySetPrizeRRR‰RR¬RMRˆRRŒR÷RøtOnNPCDie(RMRRt
isGameBossR§R¯R°R®t maxPlayerLVR±RtplayerRealmIpyDatatnpcRealmIpyDatatplayerRealmLVLargetnpcRealmLVLargeR²RC((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__GiveObjPrize» sj     
                             $ / *,!cCsU|j}|sdS|jƒ}|tjkr2dS|j}tj|t|ƒƒdS(N(RFRøRaRbREt    PlayerViptDoAddVIPKillLVExpR (RMtlastHurtPlayerRR((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    ƒ}    |rtj
d ||    fƒqq |r¶tj}|j ƒd}    |rtj
d||    fƒqq tj&ƒj'ƒtj(kr t)j*ƒ}|r|jƒ}    |||    <tj}qq 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(+RERR‰RRMRˆRtg_npcKillerInfoR¢RRÌRŒRR7RtDropOwnerType_MaxHurtRâtSortR RÁR¡t GetValueTypet
GetValueIDR¢R†RÎRÏR´t_NPCControl__GetMaxAngryInfoRFRµR¶tDropOwnerType_AlltDef_NPCHurtTypeAlltDropOwnerType_FactionRdtGetNPCItemProtectFactiontDef_NPCHurtTypeFactionRR¬R{RßtGetCurSingleFBPlayer(RMRÖRRR™RÔt
killerDicttkillTeamR¯R°RÅt dropOwnerTypeRãRÙt
maxHurtObjRR§RotmaxAngryPlayert maxAngryTeamtlastHurtPlayerIDtprotectFactionRž((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ÍRaRbRR`RRµR¶(RMR¤RÒt angryObjTypeR‚RÅ((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__GetMaxAngryInfo“ s    
cCs>|j}|jtjƒ}tjƒj|ƒ}|s:dS|S(N(RER^RtDef_PlayerKey_LastHurtRRƒtFindPlayerByIDR(RMRRoR((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__FindLastTimeHurtObjEx® 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( RERRRR“RtRuRåRRÎR`RæRaRbRÌR8RitGetPlayerActiontpaDieR¡RRR'tDef_Team_GetExpScreenDistRÏRµR¶R·RÁR¸R†tDef_NPCHurtTypeNPC(RMRñtisCheckRefreshAreaRáRRt hurtObjTupleRªtmaxHurtValueTypeRRÅR§RÙR¿((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__GetTagByHurtObj¾ sŽ         * !    )!    ; 
  * !    )    !    ; cCs¥|j}|j|jƒt|ƒ}d}|jtjƒ|jƒkr]|jtjƒ}nt    j    |ƒ}|j
|t j d|ƒ|j |||jƒtƒdS(Nit
addSkillID(REt_NPCControl__GetExpRR R^RRÀR‰R¾RtAddExpR0tDef_ViewExpType_KillNPCt_NPCControl__KillNPCFuncExR†(RMRRtadd_ExpRt 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(#RERR£RRt_NPCControl__GetIsLogRRRRRRFRGR†RRR«RËR&RRRÌRÌRR‘t_NPCControl__DoNormalTeamExpRRêRJRdtGetFBEveryoneDropInfoRÑRÎRÏRÐR•(RMR§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__KilledByTeamSetPrizeE 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(RERRtRuRRxRÁRyRzt GetFamilyIDR¡RRRR‘RJRÌRRFRRRGR†RR RÑ(RMR¯R°RtmaxLVR®R±Rªt copyPlayerMgrR@RžRRR((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¬RaR¦t IsCrossServerR—RdtDoFB_DropOwnerRR«RDRêR RRR¶RRR0tDailyActionID_KillNPCR2R3tDef_GarbageTask_KillNPCRRtActTaskType_KillNPCRùRút%SuccType_FeastRedPack_KillSpecificNPCR (    RMRRRÆt
isTeamKillRt
defObjTypet    mapFBTypeR¦((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__KillNPCFuncEx¸ s,   %cCs‚|j}|jƒ}|tjkrCttj|ƒ}|rVdSn|tjkrVdS|jƒ}tj    |t
j d|gƒdS(Ni( RERèRaRéRRbt
gnotNormalRRùRúR0tSuccType_KillSpecificNPC(RMRtisFeelRRÿRÈR((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__MissionOnKillNPCâ s      cCstj|jƒS(N(RR«RE(RM((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( RERRRêR^RRÀR‰R¾RRR0R(RMRRR    RR
((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__DoNormalTeamExps    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(RERRR•RaR—Rdt OnGetNPCExpRRRRZRRtGetExpRR†R(tGetTeamPlayerHurtPerRntFormulaControltGetCompileFormulaR¶( RMtplayerLVtisTeamRžRtbaseExpRR(RR—RothurtPertexp((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__GetExps4           $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²RpsµôÂäÎïÆ·,ÎÞ·¨ÕÒµ½µØÍ¼µôÂäÎïÆ·(RERRR«RÐRJR†tChItemtAddMapDropItemRRRÌtSetByObjRøR‰(RMtcurItemRVRWR5R6R²RpRR/R6RžtspecOwnerIDListt
curMapItem((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__MapCreateItemPs     76  cCs)tj|||d|ƒ}|s%dS|S(NR(t ItemControlertGetOutPutItemObj(RMRRÞR0t isAuctionItemR®R:((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__CreateDropItempsi¸ c
Cs|j}d}d\}}t|ƒ}    |retjdtjƒjƒ|jƒ|jƒ|    fƒn|r£tjdtjƒjƒ|jƒ|jƒ|    fƒnt    j
|||||ƒ}
|
sßt j
||||ƒ}
n|
r÷|
\}}}nŒ|    t j krFtj||||ƒ} | rƒ| \}} t j| }}qƒn=|    t jkrƒ|jƒ}|rƒt j|jƒ}}qƒn|s|r¾tjd|||sªdn    |jƒfƒn|sÿd    \} }|j||dtƒ|jƒ}|rN|jƒ}|jƒ} tj|| ƒ}|s.|rNtjd|| |fƒqNn|}| tjkrÖ|rÖ| rÖ|    t jkr˜t j|jƒ}}qÖ|jƒr½t j|jƒ}}qÖt j|jƒ}}n|sâ|rÿtjd||fƒqÿn|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( RERR7RRÌRMRˆR‰RRºtRefreshHurtListR¼RR²RKtRefreshFamilyOwnerNPCHurtRÓtDropOwnerType_Contendt _NPCControl__RefreshContendOwnerRÎR†RÜRêRÖRÌRÍR`RaRbRRÏtUpdateDropOwner(RMR/RÙtisDeadt checkCanDeadRR‡t    ownerTypeR6Rðt maxHurtInfoR5t ownerFamilyIDR÷t maxAngryObjtmaxAngryRÒ((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytRefreshDropOwnerys^          /    /   /        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(RER^RtDef_NPC_Dict_LastDropOwnerIDtDef_NPC_Dict_LastDropOwnerTypeRÎRR`RaRbRR“R8RiRüRýRtRuR¡RR(RMRR6RIR|Rª((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__RefreshContendOwner¹s&     *!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(RERRµR¶RtRuRÌR·RÁR¸RR†R8RiRRRR¡RR(RMRÅRGRR§RªRÙR¿((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__GetMaxHurtTeamPlayerÖs4        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ƒntj|ƒ}|tjkr!t j|tjƒ}|r^|jƒ}| s§|j|ƒrÿtj|} }|| |<|j||ƒ|tjkr|jtj|jƒƒqqtj|tj|d|ƒq^n=|tj krMt j!ƒj"|ƒ} | r^tj#d} }|r{t jd| j$ƒƒn|j%|j&ƒƒ}x·t'| j$ƒƒD] }| j(|ƒ}|dksÖ|jƒdkrö|r£t jd|ƒq£q£n|j)ƒt j ƒj)ƒkr¬| s0|j|jƒƒr¬t*j+||t,ƒr¬|j-ƒr¬|j||ƒ|| |jƒ<|rCt jd||jƒt.j/|tj0ƒfƒqCq£tj|tj|d|ƒ}|rðt j1d||jƒfƒn|r£t jd    ||jƒ|j)ƒ|j2ƒ|j3ƒt*j+||t,ƒfƒq£q£Wq^n|tj4kr^tj4|} }|j%|j&ƒƒ}t j5ƒ}xÎt'|j6ƒƒD]·}|j7|ƒ}|sÁq n|j8ƒ|kr|j9|j2ƒ|j3ƒ|ƒr|j-ƒr|j||ƒq tj|tj|d|ƒ}|r t j1d
||jƒfƒq q Wn|r| rv| j:ƒnd}|tjkr½| d| |ft;j<|
<| sèt jd ƒqèn+|tj4krèid| |ft;j<|
<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(>RERR7RRãR´R²RDR^RORPRRMRˆR‰RÌt_NPCControl__DelDropOwnerBuffRRcRºRâRÎR`RaRbR†t HaveHurtValuet#_NPCControl__AddDropOwnerPlayerBufftDef_PlayerKey_ContendNPCObjIDRŠtDelBuffBySkillIDtDef_SkillID_DropOwnerBuffRÏRµR¶RÐR·RtRuRÁR¸RÌR(tCheckKillNPCByCntR RRÅtGetItemPackSpacetrptItemR“RRRÓRxRyRzRR¡RRRâRŒ(RMR/RIR6RGRRRðtlastDropOwnerIDtlastDropOwnerTypeRÔRîR§R¯R°thurtListRRoRªRÙR¿tisOkRR@RžRÅ((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRFõs¤      $!     
"!    ,     ' ?'    #cCsb|j}tj|tjƒd}|s^tj|tj|d|ƒtjd|jƒƒndS(NiRSsÌí¼Ó¹éÊôbuff: playerID=%s(    RERŒt FindBuffByIDRRYtAddBuffBySkillType_NoRefurbishRR“R†(RMRR/RtfindBuff((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__AddDropOwnerPlayerBuffds     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=%sRSisɾ³ý¹éÊô¶ÓÎébuff: teamID=%s(RERRÎRR`RaRbR“RŠRXRYRDRcRWRÏRµR¶RÁR·R¸RR†(
RMRðRIR6R/RRR§RÙR¿((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__DelDropOwnerBuffls(    #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(RER^RRORPRÎRR`RaRbt*_NPCControl__SetDropOwnerBuffDisappearTimeRÏRµR¶RÁR·R¸RR†RÓRxRyRz( RMRR6RIRR§RÙR¿RR@Rž((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytDelayDropOwnerBuffDisappearTime„s2     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((RERR½tGetSkillBySkillIDRRYRŒt GetBuffTypetGetBuffManagerByBuffTypeRMR^RÁt GetBuffCounttGetBufftGetSkillR(R‰t
GetOwnerIDtSetCalcStartTickt SetRemainTimetSync_RefreshBufft GetRemainTime( RMRRt    findSkilltbuffTypet    buffTuplet
RemainTimeR/tbuffStateManagerR@tcurBufft    buffSkill((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__SetDropOwnerBuffDisappearTime¤s.     
   N(Zt__name__t
__module__RRERORêR]RaRfRnRcRƒRˆRšRR R«R±R R¹R³RÔRt Def_NPCRefreshAngryValueIntervalRÜRÖR”RáRäRæRêRíR˜RïRîRRRRRRR¡RwR!RhR.R"R?RCt!_NPCControl__DoNPCRebornPreNotifyRðRQRRRvRfRSR…RR‚R´R–R˜RÑR·RÂRÃR—RÊRÉRçRÈR¢RÍRÒRÔRR«R R Rt_NPCControl__MapCreateItemt_NPCControl__CreateDropItemRNREt!_NPCControl__GetMaxHurtTeamPlayerRFRVRTRgRf(((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRgìs¦            K >        /     o     4        @    R#                                    6    @                                  ,            )             %&                            *    *        #    +    !    M        u        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^RRWRR…R7RDR†R“RRgRFRÎR (RtdefenderR/tcontendNPCObjIDRRðRot
npcControl((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytOnPlayerKillNPCPlayerÊs        cCsVtjƒ}||_||_||_||_t|jƒ|_tj    ||ƒdS(N(
RsttagMCVirtualItemDropt
ItemTypeIDRvRwtUserDataR•t UserDataLenR{R|(RžRÞRVRWt userDataStrt    vItemDrop((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytSendVirtualItemDropÝs                 cCsŸtjƒj|ƒ}|sdStjtj|ƒƒ}tjd||ƒ}|ra|jƒ}n |jƒ}|swdS|j    ƒ}|j    ƒ}t
|||ƒS(NiR( RR½RîRRRRRR+Rt
CalcNPCExp(RRR>RRR1R—R/((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt    GetNPCExpès   cCs(ttjdtjddƒƒƒ}|S(NR)i(RnR-R.RR¶(R1R/R—R3((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRøs$cCsFtjtd|jƒdfƒ}|dkr2dS||||ƒdS(Ns AIType_%d.%stOnAttackDieByPlayer(RRRRR(RRRAR((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytOnPlayerAttackNPCDies" cCs—tjƒrtS|jƒ}|dkr]t||ƒ|kr]tj||jƒ|gƒtS|j    ƒr“t
j |t j ƒ r“tj|dƒtStS(NitGeRen_lhs_202580(RRRêtGetMaxCollectCounttGetTodayCollectCountRt
NotifyCodetGetCollectCountLimitNotifyR tGetCollectAwardRÅtCheckPackHasSpaceRaR\(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.pyR“s   cCsÌ|jƒ}tjd|ƒ}|s(tS|jƒr8tSt|||ƒsNtSd}t|ƒ}| rµ|dkrµ||jƒkrµt    j
dƒd}|r±t j ||ƒntSt ||||ƒtS(NR›iis²»ÔÊÐíͬʱ²É¼¯£¡tGeRen_liubo_436832(RRRR tGetIsMissionCollectNPCRšRêtGetCollectNPCPlayerIDR†RR“RR”tDoCollectNPCBegin(RRR/RR˜tcanCollTogethertcollectPlayerIDR:((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}tj    |tj
ƒ}|r¢t dt |t j|tt jƒƒƒ}n|jƒtjkrÀtjntj}tj|||d|jƒƒ|jƒr
|jtj|ƒntj||jƒtjdƒtj||ƒdS(NisSetCollectNPC fail!ièt    prepareID(t SetCollectNPCRRRRcRtDef_PlayerKey_CollectNPCObjIDR‰tGetPrepareTimeRÝtGetPrivilegeValuetVIPPrivilege_CollTimeReduceRateRRnR0RyRzR[Rat ntCollectiont pstCollectingtpstMissionCollectingRtSync_PrepareBegint GetLostHPPertDef_PlayerKey_CollectLostHPTickR(t AddHurtValueR†RÎRdtOnBeginCollect(RRR˜R/R¥t prepareTimetcollTimeReduceRatet prepareType((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR¤Gs  0' cCs•|jƒ}|jƒ}|jtjƒ}|rktjƒj|ƒ}|rk||krktjdƒt    Sn|j
tj|ƒ|j
tj |ƒt S(Ns?SetNPCColleced ÓÐÈËÔڲɼ¯ÇÒ²»ÊÇͬһ¸öÈË£¬Ôò²»¿ÉÖØÐÂÉèÖòɼ¯¶ÔÏó( R†R‰R^RtDef_NPC_Dict_CollectPlayerIDRRƒRúR“R RcRª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“Rc(RR¼R½((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR£ss     cCst|jtjƒ}|dkr"dStj|ƒ}|rM|jtjdƒn|jtjdƒtj||ƒdS(Ni(    R^RRªRR…RcR¹Rdt OnExitCollect(RtcollectNPCObjIDR((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytClearCollectNPC†s 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(NR›s    ·ÇÌØ¶¨²É¼¯NPC...npcID=%sitResultRëRu(RRÚRR“R¢RütDoCollectingLostHPRêRRtGetPlayerServerGroupIDR†tSendMsgToClientServerR0tCrossServerMsg_CollectNPCOKtDoGiveCollectNPCAwardRdt OnCollectOKRÀ(RRR/R˜t serverGroupIDtmsgInfo((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytDoCollectNPCOK—s  !
cCsM|dsdS|d}tjd|ƒ}|rIt|||dtƒndS(NRÁRuR›tcrossCollectOK(RRÚRÆRê(RtmsgDataRR˜((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRűs
 
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=%sR›(RRƒRzR†RuR^RtDef_PlayerKey_ClientCustomSceneRRRR‘R’RÌRdtOnCustomSceneCollectOKRRRÆ(    R@RˆR/RRoRR¦R˜R˜((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytOnGetCustomSceneCollectAwardÂs&     cCsftjd|||fƒ|dkr*dS|jƒr:dSt}|jƒ}|dkr-t||ƒ}td||ƒ}    t||    ƒ}|dkr³tjd|||fƒdS|jt    j
|ƒ}
|
|} t j |t    j
|| ƒt ||gƒtjd|||
| fƒ|||k}ng} |jƒ} |jƒ}|rT|jƒd krÚ|jt    jƒ}|j|iƒ}|jt    j
|ƒ}
|
|kr½| j||
ƒntjd||
| fƒqTt|jt    j|ƒdt    jƒ}||kr | j||ƒnt j |t    j||ƒtjd    || fƒn| s½|jƒ}tj|| |ƒ}tjd
|| |fƒtj|ƒ}|r½| j|ƒq½ntjd | ƒg}| rêxZ| D]R\}}}tj||||tjgƒrá|jtj|||gƒƒqáqáW|sû|jƒrÔt j!ƒ}||_"xN| D]F\}}}t j#ƒ}||_$||_%||_&|j'j|ƒqeWt(|j'ƒ|_%t)j*||ƒnt+j,|| ƒqûntj-d |ƒt.j/|t0j1||gƒ|r3t2j3|t    j4ƒn|sbt+j5||ƒ|rbt+j6|ƒqbn|S(Ns4¸ø²É¼¯½±Àø: npcID=%s,collectCnt=%s,crossCollectOK=%sisF    ¸ÃNPCÒÑ´ïµ½×î´ó²É¼¯´ÎÊý: npcID=%s,todayCollTime=%s,limitMaxTime=%ssI    Ôö¼Ó²É¼¯´ÎÊý: npcID=%s,todayCollTime=%s,curCollTime=%s,updCollTime=%si isL    ²ÝÔ°²É¼¯¶¨Öƽ±Àø: fairyDomainVisitCnt=%s,curCollTime=%s,awardItemList=%sis7    ²É¼¯´ÎÊý¶¨Öƽ±Àø: collTotalTime=%s,awardItemList=%ssS    ³£¹æ²É¼¯ÎïÆ·È¨ÖØÁбí: alchemyDiffLV=%s,collectAwardCfg=%s,giveItemWeightList=%ss"    ×îÖղɼ¯½±Àø: awardItemList=%ss²É¼¯ÎïÆ·Ã»Óн±Àø£¡npcID=%s(i i(7RR“R¢R R’R“RR/RñRRœRRòtSyncCollNPCTimeR–tGetCollectAppointAwardtGetCollectResetTypetDef_PDict_FairyDomainVisitCntRR‘t Def_PDict_CollNpcIDCollTimeTotalR1tGetAlchemyDiffLVRÅt GetWeightItemListByAlchemyDiffLVtGetResultByWeightListR>tGivePlayerItemRaR\t GetJsonItemtGetNotifyCollectResultRsttagMCCollectAwardItemInfot CollectNPCIDttagMCCollectAwardItemtItemIDRŠt IsAuctionItemt AwardItemListR•R{R|tGameLogic_CrossGrasslandtRecordGrasslandAwardRRRùRúR0tSuccType_CollectR2R3tDef_GarbageTask_CrossCollecttDecCustomSceneNPCCounttDoCheckUpdateGrasslandEnd(RRR˜t
collectCntRËtisSweept    isMaxTimeR™Rt canCollectCntt curCollTimet updCollTimet awardItemListtcollectAwardCfgtcollectAppointAwardCfgtfairyDomainVisitCnttgrasslandCollectAppointCfgt collTotalTimet alchemyDiffLVtgiveItemWeightListt giveItemInfoR²RÞt    itemCountR@t    awardPackt    awardItem((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRÆÙsŽ     
   &  !&                   cCsdS(N((RtaddExptaddMoneyt    addZhenQitsyncItemInfoListt collectNPCID((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytSyncCollectionItemInfo5sc 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ÁtGetCollectNPCCounttGetCollectNPCByIndexR’R‘RRñRRœRsttagMCNPCIDCollectionCntRïRut CollectionCntttagMCNPCIDCollectionCntInfotNPCCollCntListR•t
CollNPCCntR{R|( RRŸt    isSyncAllt
ipyDataMgrR@RÅtsyncListRt    collCountt collCntInfot npcIDCollInfo((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRÐ8s:      
         
    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 iscCs×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ÁRRRRÒR’RñRRœRRòR‘RÐ(Rt resetTypeListtresetNPCIDListRR@RÅR((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRns    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(RR\R“RÍRìt GetNPCCountt GetNPCByIndexR‰RR‘R8RiRRRhR8RaR9tIsAliveR@RRy(tqueryNPCIDListR/t npcInfoDicttgameNPCManagert findNPCIDListR@RtcurIDR/RâtcurHPRVRWRutrefreshRemaindSecondt 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(RsttagMCNPCInfoListRïtMapIDt    PlayerCntt NPCInfoListRjt tagMCNPCInfoR„RutNPCHPRHRvRwtIsActivet RefreshSecondR‘R•t
NPCInfoCntR{R|(RR¦t    playerCntRt npcInfoPackRtnpcInfoR/RRuRVRWRâ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(RR\R“RÍRRnRÁtGetNPCCountByGWIndextGetNPCByIndexByGWIndexR‰RR8RaR9RRRR(    RR/RÕt
npcCntDictRR@RRR/((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt GetNPCCntInfoØs8    "!   "cCs£tjƒ}|jƒ||_g|_xR|jƒD]D\}}tjƒ}|jƒ||_||_|jj    |ƒq5Wt
|jƒ|_ t j ||ƒdS(N(RsttagMCNPCCntListRïR#R%RjttagMCNPCCntInfoRutCntR‘R•R*R{R|(RR¦R1R,RÂtnpcCntR-((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytSyncNPCCntInfos 
         
        cCsdS(N((RR¦R˜RRÞt    equipInfo((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytSendGameServerGoodItemRecordscCsdS(N((R@RˆR/((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytOnBuyCollectionCnt%scCs=tjƒj|ƒ}|j}tjddiƒj|ƒ}|sFdStj||ƒ}|t    j
||ƒ7}|j t j |dƒ}|jƒ}||kr½tjd||f|ƒdStj||ƒ\}    }
|    |
krùtjd|    |ƒdStjddiƒj|ƒ} | s‹tjddiƒjt|ƒgƒ} | s_tjd|ƒdS|t| ƒkr~| d    } q‹| |} n| s•dStjdd
iƒjt|ƒtjƒ} i|d 6|t j6}tj|| | t j|ƒ}|sþdStj|t j ||dƒtj||ƒtj|ƒdS( NtKillBossCntLimit1iisH¹ºÂòBOSS¿É»÷ɱ´ÎÊý, ÒÑ´ïµ½½ñÈÕ×î´ó¿É¹ºÂò´ÎÊý£¬hasBuyCnt=%s, canBuyCnt=%ss1¹ºÂòBOSS¿É»÷ɱ´ÎÊý, Ê£Óà´ÎÊýÒÑÂú£¡£¬canKillCnt=%siis5ûÓÐÅäÖÿɹºÂòboss´ÎÊýÏûºÄ£¬ÎÞ·¨¹ºÂò! killBossMark=%siÿÿÿÿiR@(RRƒRzt KillBossMarkRRŠRRÝR¬R;tGetAddBossBuyCntRñRtDef_PDict_Boss_KillCntBuyCntR†R“RôtGetCanKillBossCntRÍR•RatTYPE_Price_Gold_MoneytDef_Cost_Reason_SonKeyRtPayMoneytDef_Cost_BuyKillBossCntRòRõtCrossPlayerDatatSendMergePlayerDataNow(R@RˆR/Rt killBossMarktbuyTimesVIPPriIDt    canBuyCntt    hasBuyCntRot
canKillCntt dayTimesLimittcostGoldt costGoldListt    moneyTypetinfoDicttisOK((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytOnBuyKillBossCnt0sH       '  * cCss|j}|j}tjƒjtj|ƒ}|s8dStjƒjtj|dƒtjd|||fƒdS(Nis,ClientNPCShowEnd npcID=%s,endType=%s,tick=%s(    RutEndTypeRRIRPRtDef_FBDict_NPCShowEndTickR°R“(R@RˆR/RtendTypetendTick((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt OnNPCShowEndfs        cCsZtjddƒ}tjƒjtjƒd}||krVtjddƒ}||kStS(Nt    BossShuntii(    RR¶RRMRNR0tDef_Notify_WorldKey_ServerDayRŠR (R¦tbossShuntMaxServerDayt openServerDaytbossShuntMapIDList((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytIsMapNeedBossShuntps  
cCs^||f}tjj|iƒ}||jƒ|g||jƒ<|tj|<t||ƒdS(N(Rtg_bossShuntPlayerInfoRRR†tGameServer_WorldBossShuntInfo(RR¦R˜RR/RÔtshuntPlayerDict((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytAddBossShuntRelatedPlayerys    cCs||f}tjj|iƒ}t|||gƒ}tjƒjdddd|t|ƒƒtjd|||f|ƒdS(NitWorldBossShuntInfosE֪ͨGameServerµØÍ¼Boss·ÖÁ÷ÐÅÏ¢: mapID=%s,lineID=%s,shuntPlayerDict=%s(    RR]RRÍRRƒRÎR•R“(R¦R˜RÔR_tmsgStr((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR^‚s  (cCstj|tj|ƒdS(N(R8tNotifyObjInfoRefreshRatCDBPlayerRefresh_Speed(RR~((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR|ŠscCsÓ|s
dStjd|||fƒtj|tj||ƒtjƒrtj|ƒ}i|jƒd6|d6|d6|d6}tj    t
j ||gƒn2t ||gƒ|rÏ||krÏt j|ƒndS(Ns8¸üÐÂÍæ¼Ò¹¥»÷NPC´ÎÊý: npcID=%s,attackCount=%s,maxCount=%sRëRut AttackCounttMaxCount(RR“RRòRtDef_PDict_NPCAttackCountRRÃR†RÄR0tCrossServerMsg_NPCAttackCounttSyncNPCAttackCountRáRæ(RRt attackCountR1RÈRÉ((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytUpdateNPCAttackCounts (cCs5|d}|d}|d}t||||ƒdS(NRuReRf(Rk(RRÌRRjR1((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRh s
 
 
 
cCs‘|s
dStjƒ}xR|D]J}|jtj|ƒ}tjƒ}||_||_|jj    |ƒqWt
|jƒ|_ t j ||ƒdS(N(RsttagMCNPCAttackCountInfoRñRRgttagMCNPCAttackCountRuRetNPCAttackCountListR‘R•RŠR{R|(RRŸt
clientPackRRjt atkCountObj((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRi¨s           cCst||ƒdS(N(t__OnAttackedDropItem(tatkObjRRAR/((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt OnNPCAttacked¹s c    Csqtj|ƒ\}}|rdS|s)dS|jƒ}tjd|ƒ}|sQdS|jƒ}|jƒ}|jƒ}|jƒ}    |j    ƒ}
g} |rýt
|ƒ} |j t j |ƒd} | | krý| |krä|| } nt||| | ƒqýn| rtj|| |
ƒ} n|r9tj|||
ƒ} ntj| ƒ}|sw|jƒ}|rstj||ƒndSg}|r“|j|ƒn|ró|    rótj|||
ƒ}x<t|    ƒD]+}tj|ƒ}|rÁ|j|ƒqÁqÁWn|sýdStj|ƒ}|r5t|||ƒtj||ƒn8|jƒ|jƒ}}tj|||||dt ƒdS(Nt TreasureNPCiR²(!R(tGetAttackPlayerRRRtGetAttackCountDropWeightInfotGetAttackDropWeightListtGetAttackDropWeightListExtGetDropCountExRÕRRñRRgRkRÅRÖRR×tGetNotDropNotifyRR”R‘RÁR‘RºRáRâRRR7t DoMapDropItemR (RrRt attackPlayerRÿRRÅtattackCountDropWeightInfotattackDropWeightListtattackDropWeightListExt dropCountExRótmainItemWeightListR1Rjt mainItemInfot notDropNotifyt dropItemListt weightListExRŸRáR¦R¶R·((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRqÂsd            (¦RaRRR–RR,RŠR*t ChNetSendPackRŒR(R>RÅRdRERýRRoR0R7RsR÷R{RßRRùRôtPlayerPrestigeSysR9R6tGameLogic_GatherSoulR-RR    R·tPlayerActCollectWordsR RáR2tPlayerActBossTrialRRDtPlayerFeastWishRR;R R¨RºRRRRKRRRüt
TurnAttackRt
PlayerTeamR¼RÝR8R´RXRGttimetcopyRRÕRìtNPCAttr_ParamDicttNPCAttr_AttrStrengthenListtNPCAttr_PlayerCntCoefficienttNPCAttr_NPCPlayerCntCoefficienttNPCAttr_DynNPCLVMaptNPCAttr_DynPCCoefficientMapRR R$R&R)R+R,R-R3R5R7R9R;R=R@RBRDR R†RrR¥R³RêRºtDef_NPCMaxDropRateRãRçRëRòRöRûR÷RRRR%R5R7R;RBRMR[RrR‚R‰RRR£R‡R×R¯RDRgR…RŒRŽRRRšR“R§R¤R©R£RÀRÊRÅRÏRÆRþRÐRR RR!R.R2R7R9R:RQRVR\R`R^R|RkRhRiRsRq(((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt<module>sN                                                                  
                                                                      w            E             
                !    !    +    >    ]             -(                8        P            Wÿÿÿÿÿÿÿÿÿÿè                                                               \  %              /     .              6