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
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
¬
“gc    @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@ddlAZAddlBZBddlCZCddlDZDeEZFeGdƒ\ZHZIZJZKZLZMd„ZNeEd„ZOd„ZPd„ZQd„ZRd„ZSd    „ZTd
„ZUd „ZVd „ZWd „ZXd„ZYd„ZZd„Z[d„Z\d„Z]d„Z^e_d„Z`d„Zad„ZbddeEd„ZceEeEe_gdgde_d„Zdeeeed„Zfddeedgd„ZgdZhd„Zid „ZjgeEeeeedd!„Zkd"„Zld#„Zmd$„Znd%„Zod&„Zpd'„Zqd(„Zrd)„Zsd*d+„Ztd,„Zudd-„Zvd.„Zwd/„Zxd0„Zyd1„Zzd2„Z{d3„Z|d4„Z}d5„Z~d6„Zd7„Z€d8„Zd9„Z‚d:„Zƒd;„Z„d<„Z…d=„Z†e_eed>„Z‡eed?„ZˆddddddeEeEd@„Z‰eEdA„ZŠdB„Z‹dC„ZŒdD„ZdddE„ZŽdF„ZdG„ZeegdH„Z‘dI„Z’dJ„Z“dKfdL„ƒYZ”dM„Z•dN„Z–dO„Z—dP„Z˜dQ„Z™dR„ZšdS„Z›dT„ZœdU„ZdV„ZždW„ZŸdX„Z dY„Z¡dZ„Z¢d[„Z£de_e_d\„Z¤dd]„Z¥eEd^„Z¦d_„Z§d`„Z¨gda„Z©db„Zªdc„Z«eEdd„Z¬de„Z­gdf„Z®dg„Z¯dh„Z°di„Z±dj„Z²dk„Z³dl„Z´ddm„Zµdn„Z¶do„Z·dp„Z¸dq„Z¹dS(riÿÿÿÿ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((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytInitNPCls" 
 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((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGetNPCLV{s  cCs5tjd|ƒ}|s1tr-tjƒ}n|S|S(NtNPCEx(RRR t    IPY_NPCEx(Rt    npcDataEx((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt GetNPCDataEx‡s cCs
|jƒS(N(t
GetMAtkMin(R((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt
GetRealmLVscCs |j|ƒS(N(t
SetMAtkMin(RtrealmLV((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt
SetRealmLV‘scCs
|jƒS(N(t
GetWindDef(R((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGetIsLVSuppress’scCs&t|jƒƒ}|r"|jƒSdS(Ni(R$RtGetFightPowerLackAtkLimit(RR#((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR,“scCs,t|jƒƒ}|r"|jƒS|jƒS(N(R$RtGetSuppressFightPowert GetThunderDef(RR#((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR-–scCs|jt|tjƒƒS(N(t SetThunderDeftmint ShareDefinetDef_UpperLimit_DWord(Rtvalue((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytSetSuppressFightPower™scCs
|jƒS(N(t
GetFireDef(R((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGetCommendFightPoweršscCs
|jƒS(N(t GetThunderAtk(R((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGetDropOwnerType›scCs tj|ƒS(N(tGameObjt
GetFaction(R((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR:œscCs
|jƒS(N(t GetPoisionAtk(R((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGetSkillAtkRatescCs
|jƒS(N(t
GetFireAtk(R((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt GetFinalHurtžscCs |j|ƒS(N(t
SetFireAtk(Rthurt((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt SetFinalHurtŸscCs
|jƒS(N(t
GetWindAtk(R((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGetSkillEnhance scCs
|jƒS(N(t GetPoisionDef(R((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt GetNPCSeries¡scCs_|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 }nt(||||ƒ}|j)|ƒ|sÕdS|r|j*ƒ|kr|j+|t,ƒnt-j.|ƒ}t-j/|ƒ}x—|j0ƒD]‰\}}t1|d |ƒsl|dkr+t2||ƒq+q+n|dkr‹t-j3||ƒq+t4|t j5ƒ}t6|d |ƒ|ƒq+Wt-j.|ƒ}||kr0|rìt-j7||ƒq0|r0t8|||ƒ}t-j7||ƒ|j9ƒ|j:ƒq0n|r[|jƒt j;kr[t<||ƒ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 GetGameWorldtGetGameWorldDictByKeyR1t.Def_Notify_WorldKey_HorsePetRobBossPlayerCounttGetGameFBDictByKeyRtDef_FB_NPCStrengthenPlayerCnttErrLogtGetLVStrengthenTypet"Def_Notify_WorldKey_WorldAverageLvtDef_FB_NPCStrengthenMaxLVtDef_FB_NPCStrengthenAverageLVtDef_FB_NPCStrengthenMinLVtrandomtrandintRRt GetSightLevelRtGetTypetntPriWoodPilePVEtntPriWoodPilePVPRt GetDictByKeyt Def_NPC_Dict_PriWoodPilePlayerIDtGetObjt IPY_GameWorldt    gotPlayertGetCmpNPCBaseLVRtFBLogictGetFBNPCStrengthenAttrtGetNPCStrengthenAttrDicttupdateRtSetCurLVR R9tGetMaxHPtGetHPtitemsRR4tSetMaxHPR0R2tgetattrtSetHPtintt    Notify_HPt Notify_MaxHPtntRobott__OnFBRobotReborn(RtisReborntisDynRtstrengthenIpyDatat strengthenLVtstrengthenPlayerCnttgameFBtlvStrengthenTypet    randMinLVt    randMaxLVR(RtownertsummonPlayerIDt npcFBAttrDicttattrDicttbefMaxHPtbefHPtattrKeytstrengthenValuetaftMaxHPtaftHP((sfE:\SnxxServerCode\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(RRNt    GetLineIDtGetIDRtGetFuncEvalCfgRYtchoicetkeyst
PyGameDatatg_fbRobotJobDicttgetRlt
isinstanceRptappendtlisttDebugLogtGetSkillManagertLearnSkillByIDRetOnRandomRobotJob( RtnpcLVtlineIDtobjIDt jobSkillDicttrobotJobtlineRobotJobDictt skillInfoDictt skillIDListt    skillInfotneedLVt skillManagertskillID((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRts* 
 
   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ŒRlR’RpR“R”RR•R—(
RtjobR™R£RœRŸR R¡R¢R¤((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__DoGiveVSPlayerNPCSkill3s   
  icBCs| r| riStjƒj|ƒ}|s1iStjdƒ}|sJiSi}|t}|t}|t}    |t}
t    j
|ƒ} |rs|s¨t j d|ƒ}n|s²iSt j|ƒ} | sËiSt|ƒ} t|ƒ}| jƒ}| jƒ}| jƒ}| jƒ}| jƒ}| jƒ}| jƒ}| jƒ}| jƒ}| jƒ}| jƒ}| jƒ}| jƒ}| jƒ}| jƒ}| j ƒ}| j!ƒ}| j"ƒ} | j#ƒ}!| j$ƒ}"| j%ƒ}#| j&ƒ}$| j'ƒ}%|j(ƒ}&|j)ƒ}'|j*ƒ}(|j+ƒ})|j,ƒ}*|j-ƒ}+|j.ƒ},|j/ƒ}-|j0ƒ}.|j1ƒ}/|j2ƒ}0|j3ƒ}1t4t5j6d|dƒƒ}2t4t5j6d|dƒƒ}3t4t5j6d|dƒƒ}4|j7ƒ}5|j8|5gƒ}6xS|6D]K\}7}8t9t4t5j6d    |7|5f|8ƒƒƒ}9|9t:ƒ|7<|9||7<qW|1rst9|%|1d
ƒ|d <qsn|rýtj;ƒj<ƒ}:t=j>|:ƒ};d |:}<|    j8|:iƒ}=|= rà|;|    krà|    |;}=d |;}<n||
kr|
|}=d |}<nx÷|=j?ƒD]æ\}7}>|7|kr5||7}?nF|7dkrJ| }?n1d|7}@t@||@ƒsiqntA||@ƒƒ}?tB|>tCƒr¢tjD|>|dƒ}An@tB|>tEƒrÜd|<|7f}<t4t5j6|<|>ƒƒ}And}At9|?|Aƒ||7<qWn|S(NtNPCAttrStrengthenRFtNPCParam_AtkReplyCoefficienttAtkReplyCoefficienttNPCParam_MonterHurtt
MonterHurttNPCParam_LostHPPerSecondtLostHPPerSecondsNPCStrengthen_%s_%sgˆÃ@RHsMapCoefficient_%ssNPCCoefficient_%sRIsGet%sis%s_%s(FRt GetGameDatatFindNPCDataByIDt ReadChConfigtGetEvalChConfigtNPCAttr_ParamDicttNPCAttr_AttrStrengthenListtNPCAttr_PlayerCntCoefficienttNPCAttr_NPCPlayerCntCoefficientR9RkRRRtGetPlayerLVIpyDataR<R>t
GetReMaxHPtGetReAtktGetReDeftGetReHitt    GetReMisst GetReAtkSpeedtGetReSkillAtkRatetGetReDamagePertGetReDamReducetGetReIgnoreDefRatetGetReLuckyHitRatet GetReLuckyHittGetReBleedDamaget GetReIceAtkt GetReIceDeft GetRePetAtktGetRePetSkillAtkRatetGetRePetDamPertGetReFinalHurttGetReFinalHurtReducetGetRePotionReplyt GetRePotionCDtGetReFightPowert
GetHitTimetGetDefCoefficienttGetAtkCoefficienttGetAdjustCoefficienttGetAtkIntervalt
GetHitRatet GetMissRatet GetMonterNumtGetIceAtkCoefficienttGetIceDefCoefficienttGetMaxEnduranceTimetGetFightPowerCoefficienttevaltFormulaControltGetCompileFormulatGetLVStrengthenMarkR‘RptlocalstGetMaptGetMapIDtFBCommontGetRecordMapIDRlRRnR’tdicttGetDictValueByRangeKeytstr(BRRxRyRwtnpcDatatattrStrengthenInfoRt    paramDicttattrStrengthenDicttplayerCntCoefficienttnpcIDPlayerCntCoefficientt    baseMaxHPtplayerCurLVIpyDatat SkillAtkRatet    FinalHurttReMaxHPtReAtktReDeftReHittReMisst
ReAtkSpeedtReSkillAtkRatet ReDamagePert ReDamReducetReIgnoreDefRatetReLuckyHitRatet
ReLuckyHitt ReBleedDamagetReIceAtktReIceDeftRePetAtktRePetSkillAtkRatet RePetDamPert ReFinalHurttReFinalHurtReducet RePotionReplyt
RePotionCDt ReFightPowertHitTimetDefCoefficienttAtkCoefficienttAdjustCoefficientt AtkIntervaltHitRatetMissRatet    MonterNumtIceAtkCoefficienttIceDefCoefficienttMaxEnduranceTimetFightPowerCoefficientRªR¬R®tLVStrengthenMarktattrStrengthenListR„tstrengthenFormatR…tmapIDt    dataMapIDt
formulaKeytplayerCntAttrCoefficienttcoefficientDictt    attrValuet attrFuncNamet coefficient((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRgGsÆ
 
 
 
                                       ( 
 
 
        
ic 5
Cs|stj|ƒ}nd} d} d} i}g}|dkrÕgg}}tjddƒ}tjddƒ}tjddƒ}tjdƒ}i}x8|jƒD]'\}}x|D]}|||<qºWq§Wnxƒ|jƒD]u\} }t|| ƒ}t||ttj    ƒƒ}||}| ||7} x"t
d|dƒD] }|dk}t ||| d|d|    ƒ} | s‚qFn| \}!}"}#}$| |#|$7} x®|!D]¦}|dkr t j ƒj|ƒ}%|%sÜq©n|%jƒ}&|j|ƒ}||krÀtj|%ƒrJ|&|kr½|&|kr½t jd    ||&fƒq©q½qÀ|dkrŽ||kr½||kr½t jd
||fƒq©q½qÀ||krÀ||krÀt jd |ƒq©qÀn|&râ|&|krâ|j|&ƒn|dkr ||kr |j|ƒq n|j|dƒd||<||"kr©||kr©|j|ƒq©q©WqFWqâWxW|D]O\}}'}(|j|dƒ|'|||<|(rb||krb|j|ƒqbqbWd})g}*g}+x:|jƒD],\}}'t j ƒj|ƒ}%|%sqÔn||k}(tj|%ƒr‡x¼t
|'ƒD]W},tj|d|(d |ƒ}-|-r)|)d7})|*j|-ƒ|+jtj|-ƒƒq)q)WnT|)tjtj|%|'|(ƒ7})|*j||'|(gƒ|+jtj||'|(gƒƒ|sÔtj|tj|'|gƒqÔqÔW|r¢|d \}.}/t |ƒdkr6|dnt!}0t |ƒdkrX|dnt!}1|
rƒt"||*| |.|/|1|ƒqt#||*| |.|/|1|0ƒnc|sÆ|)tj$|tj|)ƒkrAg}2xM|*D]E}3t%|3t&ƒrø|2j|3ƒqÓ|2jtj'|3ƒƒ|3j(ƒqÓWtj)||j*ƒg|2d | ƒnÄtj+t!i| d6g}4xj|*D]b}3t%|3t&ƒr­|3\}}'}(tj,|||'|(tjgd|4ƒqatj-||3d|4ƒqaW| rætj|ƒj.| ƒn| rtj/|tj0| ƒn|+| | 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: ÊÇ·ñ¸øÎïÆ·ÐéÄâµôÂä±íÏÖ
    iitSealDemonDoubleDropiitJobItemDropSetstisKillCountDroptcurGrades4    ¶à±¶½±Àø²»ÄܸøµÄÎïÆ·²¿Î»: itemID=%s,itemPlace=%ss4    ¶à±¶½±Àø²»ÄܸøµÄÎïÆ·ID¼¯ºÏ: itemID=%s,itemKey=%ss%    ¶à±¶½±Àø²»ÄܸøµÄÎïÆ·ID: itemID=%sRtsilvertNPCIDteventN(1RtGetPlayerExpRateRRŒRlt    GetNPCExpRptfloatRtDef_MaxRateValuetxrangetGetNPCDropInfoRR¯tGetItemByTypeIDt GetEquipPlaceR‘t
ItemCommont
GetIsEquipR•RR“t ItemControlertGetOutPutItemObjt GetJsonItemtGetItemNeedPackCountRbtrptItemt PlayerSuccesstDoAddSuccessProgressR1tSuccType_PickUpItemtlenR tDoGiveItemByVirtualDroptDoMapDropPrizeItemtGetItemPackSpaceR’R”tGetMailItemDicttCleart SendMailByKeyt GetPlayerIDtItemGive_NPCDroptGivePlayerItemtDoLogic_PutItemInPacktAddExpt    GiveMoneytTYPE_Price_Silver_Money(5RRt npcCountDicttexp_ratet mailTypeKeytisMailt extraItemListt prizeMultipletdropItemMapInfoR"t isVirtualDropRttotalExpt
totalMoneyt itemCountDicttauctionItemIDListthadDropItemKeyListthadDropItemPlaceListtmPrizeItemIDListtmPrizePlaceListtmPrizeItemKeyListt itemKeyDictt itemIDKeyDicttitemKeyt
itemIDListtitemIDtcounttbaseExptaddExpt
totalCounttdCountR!tdropInfot
dropIDListt auctionIDListt dropMoneyCntt
moneyValuetitemDatat    itemPlacet    itemCountt isAuctionItemt    needSpacet prizeItemListt jsonItemListt_tcurItemtdropPosXtdropPosYt isOnlySelfSeetisDropDisperset mailItemListt    prizeItemR%((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGiveKillNPCDropPrizeÃsÔ   
                   
  #""$ % 
c Cs¢|r{g}xr|D]a}t|tƒrg|\}    }
} x:t|
ƒD]} |j|    d| gƒqDWq|j|ƒqWn|}d} |jƒ}tjƒ}tj|ƒ}xít    j
D]â\}}||}||}|j ||ƒsðq¸n| t |ƒdkr
Pn|| }| d7} t|tƒrZ|\}    }
} t j|    |
| d|ƒ}n|sfq¸ntj|||dt    j|gd|d|d|ƒq¸WdS(NiiRt    ownerInfot    dropNPCIDRqt
sightLevel(R’R”R*R“R?RRàRtGetMapRealmDifficultyRtDef_DropItemAreaMatrixtCanMoveR8R0R1tChItemtAddMapDropItemtDef_NPCHurtTypePlayer(RRkRRoRpRrRqt dropItemListtitemInfoR[RhRiRmtindextplayerIDtgameMapRxtposXtposYtresultXtresultYRn((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR:cs<   
 
 
 
!t ItemNoPickUpc 
Csß|s
dStj|ƒ}tj|ƒ}    |sCtjƒjƒ}n|jƒ}
g} g} tj|ƒ} x    |D]}t    |t
ƒs•t    |t ƒrÎ|\}}}tj |||d|ƒ}|sqqqnBt |dƒrq|}|jƒ}|jƒ}tj|ƒ}nqqtj|ƒ}| j|ƒ|r_x=t|ƒD]}| j||gƒq?Wqq| j||gƒqqW|r%x¦|D]›}|\}}}tj |||d|ƒ}|s¿qƒntj|ƒ}|rx=t|ƒD]}| j||gƒqáWn| j||gƒ|jƒqƒWntjƒ}d}x¨tjD]\}}|sY|rˆ||}||}|j||ƒs”qAq”n d\}}|t| ƒdkr®Pn| |\}}|d7}t|||||ƒqAWg}xË| D]Ã}|jƒ}tj|ƒ}|jƒtj|ƒ|j ƒ|j!ƒ|j"ƒg}tj#|ƒ}| j$||dtj%t&i|d6gƒs|j|ƒn|rït'|||    |||ƒqïqïW|rÛtj(||
g||gƒndS(NRt GetItemTypeIDiiR%R$(ii()RtGetCustomMapIDtGetCustomLineIDRRNRáR?R0tPlayerItemControlerR’R”ttupleR1RR‰tGetCounttGetIsAuctionItemR|tGetMapDropItemDataStrR“R*R=RàRRzR{R8tSendVirtualItemDropR.R<R-tGetItemClassLVt GetItemColort
GetSuiteIDt GetUserDatatGetItemPackTypet    PutInItemtItemGive_PickupR tSendGameServerGoodItemRecordR>( Rt giveItemListRRoRpRrRHtextraVirtualItemListRRšR‚tgiveItemObjListtvirtualItemDropListt itemControlR€R[RhRiRntdropItemDataStrRmRƒRR„R…R†R‡RstitemObjtmailItemt    equipInfot    packIndex((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR9sˆ            
 
     
  + i@BcCstjd|ƒ}|s-tjd|ƒdSd}d}tjƒjtjƒ}t    |ƒdkr¬|d}|j
ƒ}|r||krtjd|||fƒdSnWx0|D](}|j
ƒ}||kr³|}Pq³q³W|stjd|||fƒdS|S(Nt NPCDropItems¸ÃNPCûÅäÖõôÂ䣡npcID=%siisF¸ÃNPCµ±Ç°ÊÀ½çµÈ¼¶ÎÞ·¨µôÂäÎïÆ·!npcID=%s,curWorldLV(%s) > maxWorldLV(%s)sB¸ÃNPCµ±Ç°ÊÀ½çµÈ¼¶ÎÞ·¨µôÂäÎïÆ·!npcID=%s,curWorldLV=%s,maxWorldLV=%s( RtGetIpyGameDataListNotLogRR•RRNROR1RUR8t GetMaxWorldLV(Rt ipyDataListtipyDropt
maxWorldLVt
curWorldLVtipyData((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGetNPCDropIpyDataês,
    c=Csût|ƒ}|sdSd}tjddƒ}tj|ƒ}||krv|rvtj|ƒ}tjd||ƒ}n|jƒ}    t    j
ƒj |ƒ}
|
s¡dSg} |j ƒrÂ|j ƒgntjddƒ} tj|ƒ} tj|ƒ}|jƒ}|tddƒ@sd} n|tddƒ@s6d}nd}tj}t    jd||| || |f|    ƒg}|jƒ}|r|jƒrt||||ƒ}||9}|jƒ}| rðt    j|| ƒ}t    jd    || f|    ƒn|}d}|d
d}t    jd ||f|    ƒxÑ|D]É}|\}}||}|sQPn|}|scq+n|\}}||}||}||} t    j| |ƒr¬|d7}nt    jd ||| |||f|    ƒ|sÞq+n|j|||gƒq+Wt    jd ||f|    ƒn|jƒ}!|jƒ}"i}#xÓ|D]Ë\}}}|rr|jƒ}t    jd||    ƒni}$||!kr×|!|}%xPt|ƒD]5}&t    j|%dtƒ}'|$j |'dƒd|$|'<q›Wn
||$d<x!|$j!ƒD]\}'}(||'f})|)|"kr2t    j"d|||'fƒqîn|"|)}*t#|*ƒ}+|+skt    j"d||*fƒqînt$||||'|+| ƒ},|,s’qînxlt|(ƒD]^}&t%j&|,ƒ}-| j|-ƒ||*g|#|-<t    jd||-|||'|*| |,f|    ƒqŸWqîWq:W|j'ƒ}.|j(ƒ}/xÅ|.j!ƒD]·\}0}1|1sFq.n|/j |0dƒ}2t|2||ƒ}2|2|9}2|1|2}|t}|t} t    j| tƒr±|d7}n| |0g|7} t    jd|0|1|2||f|    ƒq.Wt)| tj*ddƒƒ} |j+ƒ}3|j,ƒ}4|4|3|}5|5tj-}6t    j|5tj-tj-ƒr`|6d7}6nd}7|6r¥t.|||ƒ|6}7t    jd|4|5|6|7f|    ƒni}8x(| D] }9|8j |9dƒd|8|9<q²Wt/j0||
|ƒ}:x4|:j!ƒD]&\}9}|8j |9dƒ||8|9<qøWt1j2|tj3|dt4ƒ};x1|;D])\}9}}&|8j |9dƒ||8|9<qGWg}<|j5ƒrÂx9|8j6ƒD](}9tjd|9ƒr“|<j|9ƒq“q“Wn|8rît    jd|||8|<|7f|    ƒn|8|<|7fS(sTÍÑ»ú¹Òɱ¹ÖµôÂäרÓú¯Êý
    Ö»Ëã: 1.±ýͼװ±¸µôÂä + 2.Ö¸¶¨ÎïÆ·IDµôÂä + 3.½ð±ÒµôÂä
    NtRealmDifficultyiRtOpenJobiisvÍÑ»ú¹Òɱ¹ÖµôÂä: npcID=%s,killCount=%s,itemJobList=%s,dropRatePlusValue=%s,equipDropRatePlus=%s,equipDropDoCountPlus=%ss)    ×°±¸ÅäÖñýͼ: %s,equipDropRatePlus=%siÿÿÿÿs    ×°±¸µôÂä±ýͼ: %s,maxRate=%ssP    ×°±¸µôÂÊ: curRate=%s,totalRate=%s,rateEx=%s,dropCount=%s,classLV=%s,color=%ss0    ×°±¸µôÂä½á¹û: killCount=%s,[½×,ÑÕÉ«,¼þÊý]=%ss(    ÍÑ»úµôÂä¶ÔÓ¦ÄѶȾ³½ç×°±¸: classLV=%stmaxRates>δÅäÖÃÑÕÉ«ÊÇ·ñÌ××°¶ÔÓ¦²¿Î»¼¯ºÏkey! npcID=%s,color=%s,isSuit=%ss&²¿Î»¼¯ºÏkey²»´æÔÚ!npcID=%s,placeKey=%ssl    µôÂä×°±¸: npcID=%s,itemID=%s,classLV=%s,color=%s,isSuit=%s,placeKey=%s,itemJobList=%s,randEquipIDList=%ssJ    Ö¸¶¨ÎïÆ·µôÂä: itemID=%s,dropRate=%s,doCnt=%s,totalRate=%s,dropCount=%st    MutexDropsM    ½ð±ÒµôÂÊ: dropMoneyRate=%s,moneyTotalRate=%s,dropMoneyCnt=%s,dropMoney=%stisTJGt AuctionItemsT    ×îÖÕµôÂä: npcID=%s,killCount=%s,dropIDCountDict=%s,auctionIDList=%s,dropMoney=%s(7R¬RRRŒRRRRR?RR¯R°tGetIsDropJobSelftGetJobtGetDropEquipPertGetDropEquipDoCounttGetCanDropRatePlustpowRR)R•tGetPieRateDoCnttGetPieRateDropt__GetNPCDropDoCountChangetGetPlusPieListt    CanHappenR“tGetEquipColorSuitInfotGetEquipPartKeyRateInfotGetEquipClassLVR*tDef_NPCMaxDropRateR‘RlRStGetEquipPlaceByPlaceKeyt__GetEquipIDListRYRtGetItemIDDropRatetGetItemIDMaxDropCountt__RemoveMutexDropIDt
GetFuncCfgtGetDropMoneyDoCnttGetDropMoneyRatetDef_NPCMapDropRatet__GetDropMoneyValuetPlayerActCollectWordstOnGetDropWordsItemDicttPlayerActGarbageSortingtAddActGarbageTaskProgresstDef_GarbageTask_KillNPCtTruetGetAucionItemCanSellRŽ(=t
dropPlayerRRt    killCountR¨RtrealmMapIDListtrealmDifficultyR(R‚RçRbt itemJobListtequipDropRatePlustequipDropDoCountPlustdropRatePlusValuet
doCountAddt doCountRatetdropEquipInfoListt pieRateDoCnttpieRateDropListt dropRateListtpreRateR¯trateInfotrateR¢tcurRatetclassLVtcolort    totalRatet    dropCounttrateExtcolorSuitRateDicttcolorSuitPlaceKeyInfoDicttdropEquipIDDictt suitCountDicttsuitRateRmtisSuitt curDropCountt colorSuitKeytplaceKeyt    placeListtrandEquipIDListt
randItemIDtitemIDDropRateDicttitemIDDropMaxCntDictR[tdropRatetdoCnttdropMoneyDoCntt dropMoneyRatetmoneyTotalRateRdt    dropMoneytdropIDCountDicttdropIDtdropWordsCountDicttgiveGarbageItemListRc((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGetNPCDropInfoTJGs  -                  
 
 
 
 
         
!
 
      /  
 
 
 
                   cpCs
|st|ƒ}|sdSn|s1|g}n|jƒ}|jƒ}    |jƒ}
d} tjddƒ} tj|ƒ} || krÊ| rÊtj    | ƒ}tj
d||ƒ} | rÊ| j ƒ}
qÊn|
rú|    |
krút j d||    |
fƒdSt jƒj|ƒ}|s-t jd||ƒdSt}tj|tjƒd}|rX|nt jƒjtjƒ}g}g}d(\}}|jƒr£|jƒgntjddƒ}t jƒ}|jtjƒ}|jtjƒ}|s÷tj}nd}d}d}d}d}xª|D]¢}|jtj|ƒ} | d    d}!| d
d    d}"||!kry|!}|jƒ}n||"krŽ|"}nt |tj!|ƒƒ}t |tj"|ƒƒ}qW|j#ƒ}#|#t$d dƒ@sêd}n|#t$d dƒ@sd}ng}$|j%ƒ}%|%rMt&|%|||ƒ}%|$t'||%|ƒ7}$n|j(ƒ}&|&r”t&|&|||ƒ}&|$t)|||&||ƒ7}$n|j*ƒ}'|rÚ|'rÚt+}t j,|'ƒ}(|(rÚ|$j-|(ƒqÚnd)\})}*}+},|j.ƒ}-|j/ƒ}.|-sdn    t |-ƒ}/|.s(dn    t |.ƒ}0|ró|-ró||-kró|-|\})}*}+},|)|*f|$kr–|$j0d|)|*|+|,|fƒn.|$j1|)|*fƒ}1|)|*|+|,|f|$|1<t j d |||)|*|+|,||$f|ƒn†|ry|.ry||.kry|.|\}2}3|2r.||27}n|3rSt2j3|3ƒ}4|j-|4ƒnt j d |||2|3|f|ƒnxæ|D]Þ}|jtj|ƒ} | d    }!| d
d    }"t}5|!|/krÙ|!d7}!t+}5n|"|0krø|"d7}"t+}5n|5r€| d
}6|6d
|"d    |!}7tj4|tj||7ƒt j d|| |7f|jƒƒq€q€Wi}8tjdd ƒ}9||9kr“|9|}8ntjddiƒ}:i};|j5ƒ}<|j6ƒ}=|j7ƒ}>|j8ƒ}?|?d|?d}@}Ad}BxØ|$D]Ð}C|Cd  \}D}E| r?| j9ƒ}Dt j d|D|ƒnd}F|E|:kr |:|E}G|jtj:|Eƒ}F|F|Gkr t j d|E|Gf|ƒqq n|E|<kr÷|<|E}H|;j;|Edƒ}I|I|Hkr÷t j d|E|Hf|ƒqq÷nt<|Cƒdkr(|Cd \}J}K}|g}Ln/d}J|E|=kr»|=|E}M|E|8kr£|8|E}N|dksx|t<|Nƒkr~d
n |N|d}Ot=|M|Odƒ}Mnt j>|Mdt?ƒ}Jn|E|Jf}P|P|>krót jd||E|Jfƒqn|>|P}K|E|@krQ    |J|AkrQ    |BdkrQ    t@|Kƒ}Q|QrQ    tA||D|@|A|Qƒ}BqQ    n|}L|Bdkr•    t j d|Bƒ|Bg}R|jƒg}Ld}Bn/tB|Kƒ}R|RsÄ    t jd||KfƒqntC||D|E|J|R|Lƒ}S|Ssë    qn|E|:kr
|Fd7}Ftj4|tj:|E|Fƒn|E|<kr;
|Id|;|E<n|Jre
t<|Lƒdkre
tD||Sƒ}Tnt2j3|Sƒ}T|j-|Tƒt j d||T|D|E|J|K|L|Sf|ƒ|Frt j d|E|Ff|ƒqqW|tE||||||ƒ7}|r |jFƒs |jGƒr t+}n|r |jHƒ}U|Urx |Ud  \}V}WtI|||V|Wƒ}Xx|XD]}Y|j-|Yƒq^ Wntjddƒ}Z||Zkrã |Z|}[|[j;|gƒ}\g}]x4|\D]\}^}_|]|^g|_7}]q¿ Wn |jJƒ}]x|]D]}`|j-|`ƒqö Wntjdd ƒ}a|r tK|ƒ|akr |atK|ƒ}b|bj;tK|ƒgƒ}cx(|cD]\}d}e||dg|e7}qi WntLjM||ƒ}f|frµ |jN|fƒntjOddƒ}g|tjPkrâ tjP}hnt jQ|g|ƒ}h|hdkrR tRjS||hƒ}i|irR |i\}j}kt j d |j|kfƒ||jg|k7}qR ntT|tjOd!dƒƒ}|jUƒ}l|jVƒ}m|mtjWkr |l}n?d}x6tX|lƒD](}nt j>|mtjWƒr° |d7}q° q° W|r÷ tY||| ƒ}n|rp|jZƒr?x3|D](}otj
d"|oƒr|j-|oƒqqWnt j d#||f|ƒt j d$||ƒn,tj[|ƒrœt jd%||jƒƒn|rú|rút j d&|j\ƒ|ƒt]j^||t |j\ƒddƒt+tjd't+ƒn||||fS(*s»ñÈ¡NPCµôÂäÐÅÏ¢, »÷ɱ¼°É¨µ´Í¨Ó㬵÷Óøú¯Êý»ñµÃµôÂäÐÅÏ¢£¬È»ºóÔÙ¿´µôÂ䵨°åÉÏ»¹ÊÇÖ±½Ó·ÅÈë±³°ü
        @param dropPlayer: ÓÃÓÚÅжϵ÷ÓÃÏà¹ØÓõÄÍæ¼ÒʾÀý£¬¸ÃÍæ¼Ò²¢²»Ò»¶¨ÊÇ»÷ɱÕߣ¬Ö»Êǰ´Ò»¶¨¹æÔòÉ趨µÄµôÂäÅжÏÒÀ¾ÝµÄÍæ¼Ò
                            Èç¶ÓÎ飬ȡµÈ¼¶×î´óµÄÍæ¼Ò£¬¸ÃÍæ¼Ò²¢²»Ò»¶¨ÊÇ»÷ɱÕß
        @param mapID: µôÂäÎïÆ·ËùÊôµØÍ¼£¬×¢Òâ´ËµØÍ¼²¢²»Ò»¶¨Êǵ±Ç°µØÍ¼£¬Èçɨµ´Ê±ÐèʹÓÃÄ¿±ê¸±±¾µØÍ¼
        @param npcID: µôÂäÎïÆ·µÄNPCID
        @param ownerPlayerList: ÓйéÊôµÄÍæ¼ÒÁбí
        @param isSingle: ÊÇ·ñÖ»´¦Àíµ¥¶ÀÍæ¼ÒµôÂäÂß¼­£¬Ò»°ã¶¼Ä¬ÈÏTrue£¬Ä¿Ç°Ö»Óг¡¾°É±¹ÖµôÂäÐèÒª¿¼ÂÇÃþ¹ÖµÄÇé¿öϲÅΪFalse£¨Íâ²ãÌØÊâ´¦Àí£©
        @return: dropIDList, auctionIDList, dropMoneyCnt, moneyValue
                None-ûÓеôÂä
                ---------------
                dropIDList        -    µôÂäµÄÎïÆ·IDÁбí, Í¬¸öitemID¿ÉÄÜÔÚÁбíÖÐÓжà¸ö [itemID, itemID, ...]
                auctionIDList    -    µôÂäµÄÅÄÆ·ÎïÆ·IDÁбí, [itemID, itemID, ...]
                dropMoneyCnt      -    µôÂä½ð±ÒλÖÃÊý
                moneyValue        -    Ã¿¸öλÖõĽð±ÒÊýÁ¿
    NR­iRsE³¬¹ý×î´ó¿ÉµôÂäµÈ¼¶£¬²»µôÂäÎïÆ·£¡npcID=%s,playerLV(%s) > maxDropLV(%s)s&»ñÈ¡NPCµôÂäÅäÖôíÎó!±í²»´æÔÚ¸ÃNPCID=%siR®idi'is}µÚ%s´Î»÷ɱµôÂäÖ¸¶¨Ä¿±ê×°±¸ÐÅÏ¢: npcID=%s,tagClassLV=%s,tagColor=%s,tagIsSuit=%s,tagPlaceKey=%s,tagJob=%s,dropEquipInfoList=%sshµÚ%s´Î»÷ɱµôÂäÖ¸¶¨Ä¿±êÎïÆ·ÐÅÏ¢: npcID=%s,killCountItemIDList=%s,killCountRandItemIDList=%s,dropIDList=%ssC¸üÐÂÍæ¼Ò»÷ɱ´ÎÊýÖµ: npcID=%s,killCountValue=%s,updKillCountValue=%stFBGradeEquipDropRatetItemDropCountLimiti
s µôÂä¶ÔÓ¦ÄѶȾ³½ç×°±¸: classLV=%ss?Òѳ¬¹ý¸ÃÑÕɫװ±¸½ñÈÕ×î´óµôÂäÊý£¬²»µô£¡color=%s,colorCountMax=%ss6Òѳ¬¹ý¸ÃÑÕɫװ±¸×î´óµôÂäÊý£¬²»µô£¡color=%s,maxCount=%sigˆÃ@R¯s>δÅäÖÃÑÕÉ«ÊÇ·ñÌ××°¶ÔÓ¦²¿Î»¼¯ºÏkey! npcID=%s,color=%s,isSuit=%ss    ×îÖÕÓÅÑ¡²¿Î»: %ss&²¿Î»¼¯ºÏkey²»´æÔÚ!npcID=%s,placeKey=%ssdµôÂä×°±¸: npcID=%s,itemID=%s,classLV=%s,color=%s,isSuit=%s,placeKey=%s,jobList=%s,randEquipIDList=%ss=    ¸üеôÂäÌØÊâÆ·ÖÊ×°±¸½ñÈÕ´ÎÊý: color=%s,colorCountToday=%sitFBGradeEquipDropRate2tKillBossCntLimits7µôÂäbossƾ֤: bossTrialItemID=%s, bossTrialItemCount=%sR°R²s$×îÖÕµôÂäÎïÆ·: npcID=%s,dropIDList=%ss    auctionIDList=%ssBossûÓеôÂäÎïÆ·,NPCID=%ss    È¥³ýÌìÐþµ¤buff: Layer=%stisSync(ii(iiii(_R¬R?Rt GetMaxDropLVRRRŒRRRRt GetMaxDrapLVRR•R¯R°RSR t SkillCommont FindBuffByIDRtDef_SkillID_TianxuanBuffRJRQt Def_FB_GradeR³R´tDef_FB_DropDoCountAddtDef_FB_DropDoCountRateR)tNomalDictGetPropertytDef_PDict_NPCKillCountRRµR¶R·R¸R¹R»t__GetNPCPieRateEquipDroptGetIndepRateDoCntt__GetNPCIndepRateEquipDroptGetTianxuanEquipRateListRÑtGetResultByRandomListR“tGetKillCountDropEquipPubtGetKillCountDropPubtinsertRRYRtNomalDictSetPropertytGetEquipColorMaxDropCountR¾R¿tGetColorSuitPartOptimizationRÀtDef_PDict_DropColorTodayR‘R8RpR½RÁtGetAllEquipPlaceByPlaceKeyt__GetOptimizationEquipPlaceRÂRÃt__GetRandDropSuitEquipIDt__GetAppointDropItemIDListtGetTianxuanItemKeyRatetGetTianxuanItemIDRatetGetKillCountDropPritGetKillCountDropItemListtGetPriItemIDDropRætPlayerFeastWishtGetFeastWishDropItemIDListtextendRÇtDef_FBMapID_PersonalBosstGetDictValueByKeytPlayerActBossTrialtGetBossTrialDropItemIDListRÆRÈRÉRÊR*RËRÒt
IsGameBosstGetLayert    BuffSkillt SetBuffLayer(pRÓRRtownerPlayerListR¨tisSingleR!R"R‚tplayerLVt    maxDropLVRRÕRÖR(Rçt tianxuanStatet tianxuanBuffRbRcRdReR×RzRÛRÜttagJobtdropEquipKillCountPubtdropItemIDKillCountPubRØRÙt ownerPlayertkillCountValuetequipPubKillCounttitemIDPubKillCountRÚRÝRÞtindepRateDoCntttianxuanEquipRateListRat
tagClassLVttagColort    tagIsSuitt tagPlaceKeytkillCountDropEquipPubtkillCountDropItemPubtmaxRecordDropEquipKillCountPubtmaxRecordDropItemIDKillCountPubttagIndextkillCountItemIDListtkillCountRandItemIDListtklllCountRandItemIDtisUpdtitemIDPriKillCounttupdKillCountValuetgradeColorSuitRateDicttfbGradeColorSuitRateDicttequipColorDropLimitDaytcolorDropCntDicttcolorMaxDropCntDictRêRëtcolorSuitPartOptimizationtoptColort    optIsSuittoptPlacet dropEquipInfoRåRætcolorCountTodayt colorCountMaxtmaxCountRèRïRòtjobListRîtsuitRateEffListt suitRateEffRñtallEquipPlaceListRóRôRõtkillCountDropInfot needKillCounttkillDropItemListtkillCountDropIDListt kDropItemIDtfbGradePriItemIDDropDicttgradePriItemIDDropDicttpriDropInfoListt priDropIDListt    priItemIDt priItemCountt    priDropIDtfbGradeDropItemExDicttgradeItemExDicttgradeItemExListt    gItemExIDt gItemExCounttfeastWishDropIDListtkillBossCntLimitDictt
limitIndext bossTrialDroptbossTrialItemIDtbossTrialItemCountRúRûRmRÿ((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR+¸sò     $ -                        "    &      
 
     
    
*         
      
       
 
2  
$            
      #!       
              8cCs}d}tjddƒd}xZt|ƒD]L}tj|ƒ}tjƒj|ƒ}|s_q)ntj    ||ƒr)Pq)q)W|S(Nit EquipSuitDropi(
RRÇR*RYRRR¯R,R.tCheckJob(RRôRõtsuitRandCountExRmRf((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR  scCsmtjddiƒ}||kr@g||D]}|d^q,Stjddiƒ}||kri||SgS(NtEquipDropPartSetsii(RRŒ(RòtplaceKeyRateListDictRâtplaceKeyListDict((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRs  cCsg}tjddiƒ}||krU||}tj|ƒ}|rU|g}qUn|sŒtjddiƒ}||krŒ||}qŒn|S(NR{ii(RRŒRR(RòRóR|t placeRateListtplaceR}((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRÂ#s 
 cCsd}d}|jƒjtjƒ}xë|D]ã}tjd||ƒ}    |    sRq+n|    jƒ}
|j|
ƒ} | s€| j    ƒr„|S| j
ƒ} | j ƒr¢dnd} | |krºq+n| |krØ| |krØq+nt j | ƒ}|dksÿ||kr+|}|}q+q+W|S(s™ »ñÈ¡µôÂäÓÅÑ¡²¿Î»
        ¼¸¸öĬÈϹæÔò
    1. ÑÕÉ«´óÓÚÖ¸¶¨ÓÅÑ¡ÑÕÉ«µÄ£¬ÎÞÂÛÊÇ·ñÌ××°¶¼²»¼ÆËãÔÚÄÚ
    2. ÑÕɫСÓÚÖ¸¶¨ÓÅÑ¡ÑÕÉ«µÄ£¬ÎÞÂÛÊÇ·ñÌ××°¶¼¼ÆËãÔÚÄÚ
    tEquipPlaceIndexMapiiN(RtGetItemManagertGetPackRbtrptEquipRtGetIpyGameDatat GetGridIndextGetAttIsEmptyR“R”R.tGetEquipGearScore(RÓRåRVRWt optPlaceListt
minGSPlacetminGSt    equipPackRXR«t
equipIndextcurEquiptcurColort    curIsSuittcurGS((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR6s,     cCsO|tjkr/tdt||dƒƒ}n|rKtd||ƒ}n|S(NigˆÃ@(RR)RRp(tdoCountRÜRÛ((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR»Zs
 cCs¶x¯|D]§}t}x˜|D]}||kr2qn|sŠt}|j|ƒ}|dkrx(t|dƒD]}|j|ƒqjWqqnx||kr©|j|ƒqWqWqW|S(Ni(R RÑR\R*tremove(Rbt mutexDropInfot mutexDropListtisMutextmutexIDt curDropIDCntRm((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRÆbs    c; CsÊg}tjddiƒ}|jƒ}tjddƒ}    tjddƒ}
tjddƒ} |jƒ} |jƒ} | r•x| jƒD]\}}||    kr¦qˆn|    |}t|ƒ|krâtj    d|||fƒqˆn|t
}|t
}|}| j |dƒ}t |||ƒ}x9t |ƒD]+}tj|dt
ƒsNq-n|d7}q-W||d}x!t |ƒD]}|j|ƒqwWqˆWn|jƒ}|jƒ}|rØ|rØtj|ƒ}|j|ƒn|r6tjd|ƒxD|jƒD]3\}}|| krqün|t
}|t
}|}| j |dƒ}t |||ƒ}x9t |ƒD]+}tj|dt
ƒs†qen|d7}qeWx˜t |ƒD]Š}|| krÏ| |}tj|ƒ}n+||
kr¡|
|}tj|ƒ}nq¡|sq¡nt|||ƒrq¡n|j|ƒq¡WqüWn|jƒ}|jƒ}|jƒ}|r…|r…tj|ƒ}|j|ƒntjd    dƒ}tjd
dƒ} tjƒ}!|rÏtjd |ƒnx•|jƒD]‡\}"}|sôqÜn|"| krqÜn|j |"dƒ}|"|krttjƒƒ}#|!j t!j"|"ƒ}$||"d }%|%|#|$}&|&d kr¯tjd|"|%|#|$|&fƒqÜq¯nt |||ƒ}x±t |ƒD]£}tj|dt
ƒsÝq¼nt||"|ƒrõq¼n|j|"ƒ|"|kr¼t#|"|#gƒ}'tj$ƒj%d d d d    |'t|'ƒƒt&j'|||"ƒPq¼q¼WqÜWxþ| jƒD]ð\}"}(|(\})}*||)kržqtn|!j t!j(|"ƒ}+t)t*j+d|"|*ƒƒ}tj|dt
ƒ},|,r|j|"ƒt&j,|||"|+|ƒn|,r d n|+d}-t#|"|-gƒ}'tj$ƒj%d d d d|'t|'ƒƒqtWtjd    dƒ}.||.krÆ|.|}/t-|!j t!j.|ƒdt!j/ƒ}0tj0d||0fƒt#||0gƒ}'tj$ƒj%d d d d|'t|'ƒƒ|0|/krÆ|/|0\}1}2}3x§|2jƒD]™\}"}4|1r¤tj1ƒj2|"ƒ}5|5sfq3n|5j3ƒ}6|6r¤|6|jƒkr¤tjd|"ƒq3q¤n||"g|47}tj0d|"|4fƒq3W|3rÃ|1r€g}7xƒ|3D]{\}8}9tj1ƒj2|8ƒ}5|5sqén|5j3ƒ}6|6rQ|6|jƒkrQtjd|8ƒqén|7j|8|9gƒqéWtj|7ƒ\}}:ntj|3ƒ\}}:||g|:7}tj0d||:fƒqÃqÆn|S(NRiR iis@Ö°ÒµÎïÆ·¼¯ºÏkeyûÓÐÅäÖöÔÓ¦Ö°ÒµID: npcID=%s,jobItemKey=%s,job=%sR¯sItemKeyDropRateDict:%st GlobalDropCDtNPCGlobalDropRatesitemIDDropRateDict=%si<isT¸ÃÎïÆ·È«¾ÖµôÂäCDÖУ¬²»µôÂ䣡itemID=%s,cdTime=%s,curTime=%s,lastDrop=%s,remainTime=%ssKilledCntDropRate_%stGlobalDropRates¸üÐÂÈ«·þ»÷ɱ´ÎÊý£ºnpcID=%s, %stGlobalKillCounts1È«·þ»÷ɱ´ÎÊý±Øµô£¬·Ç±¾Ö°Òµ¿ÉÓ㬲»µôÂä! itemID=%ss,È«·þ»÷ɱ´ÎÊý±ØµôÎïÆ·: itemID=%s,itemCount=%ss6È«·þ»÷ɱ´ÎÊý±ØµôËæ»ú£¬·Ç±¾Ö°Òµ¿ÉÓ㬲»µôÂä! rItemID=%ss8È«·þ»÷ɱ´ÎÊý±ØµôËæ»úÎïÆ·: randItemID=%s,randItemCount=%s(4RRŒR´RÇtGetItemKeyMaxDropCounttGetItemKeyDropRateJobRlR8RRSRÁR‘R»R*R½R“tGetItemKeyDropRateR"tcopytdeepcopyRhR•RRYRt__dropIDCountLimitTodayRÄRÅR#RNRpttimeROR1t Def_Notify_WorldKey_LastDropTimeRætGetPlayerManagertGameServer_QueryPlayerResulttDataRecordPacktDR_GlobalDropCDt$Def_Notify_WorldKey_DropNPCKilledCntRÛRÜRÝtDR_GlobalDropRateR0t"Def_Notify_WorldKey_NPCKilledCountR2tLogR¯R,t GetJobLimit(;RRR¨RÜRÛR7tdropItemIDListtitemDropLimitDayInfoR¦R t itemDropSetstitemDropRateSetstItemKeyMaxDropCountDicttItemKeyDropRateJobDictt
jobItemKeyRøt jobItemListt mustDropCountt canDropCountRùRmt    jobItemIDtItemKeyDropRateDictttianxuanItemKeyRateDictRYtrandItemRateListRõt randItemListRöR÷ttianxuanItemIDRatetglobalDropCDDicttglobalDropRateDicttgwR[tcurTimet lastDropTimetcdTimet
remainTimetmsgInfoRat    npcIDListt
rateFormatt    killedCnttisDropt updKilledCnttglobalKillDropDicttkillCountDropDicttupdNPCKilledCountt
isJobLimittitemIDCountDicttrandItemIDCountListRhRftitemJobtrandJobItemListtrItemIDt
rItemCountt randItemCount((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR!xs(    
 
 
 
 
 
 
                  (    , 
&(        cCs²||krtS||}|s$tS|jtj|ƒ}||krjtjd||f|jƒƒtS|d7}tj    |tj||ƒtjd||f|jƒƒtS(Ns;    ÎïÆ·ID½ñÈÕµôÂä´ÎÊýÒÑ´ïÉÏÏÞ: itemID=%s,dropCountToday=%sis7    ¸üÐÂÎïÆ·ID½ñÈÕµôÂä´ÎÊý: itemID=%s,dropCountToday=%s(
R RRtDef_PDict_DropCountTodayRR•R?RÑRR(RR[R¯tdropCountTodayMaxtdropCountToday((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR¢=s 
  
 tNPCc    CsztjstjdƒgSd||f}|tjkrItj|}nNi}tjƒ}    xtjjƒD]þ}
xõ|
D]í} |    j    | ƒx×t
|    j ƒƒD]Ã} |    j | ƒ} | j ƒsÅqžntj| ƒ|kràqžn| jƒ|krøqžn| jƒ}| jƒ}| jƒ}| jƒ}||krAg||<n||}|j|||gƒqžWqxWqkW|tj|<tjd||tjfƒg}x§|jƒD]™\}}|rÎ||krÎqªnxr|D]j}|\}}}|r|r||krqÕn|dk}||kr2|dkr2qÕn|j|ƒqÕWqªW|svtjd|||||||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
InitPyItemRRStg_filterEquipDictR¯RtDef_PlaceEquipTypetvaluestFilterItemByTypeR*tGetFilterItemCountt GetFilterItemt GetCanNPCDropR.R’R“R”R­R-R‰R“R¬RlR(tfindIDRåRæRïRóR×tfindTypetkeytfilterItemIDDicttgameDatat itemTypeListtitemTypetiRftsuiteIDRÑRgR[t placeItemListRZR€R((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRÃNsZ               
"        cCspg}|jƒ}|s|ntj||ƒ}x9t|ƒD]+}tj|ƒ}|r=|j|ƒq=q=W|S(N(RºRR¼R*RR“(R¨Rùt equipDropPlusRÝRßRàRmRa((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRˆs c
Cs'|jƒ}|jƒ}i}tjddƒ}||krI||}nd}    tjddƒ}
t|ƒ|
kr¾|r¾|
t|ƒ} |dks§|t| ƒkr­dn | |d}    ng} x\t|ƒD]N} xE|jƒD]7\}}|}|d}||kr_||}|dks4|t|ƒkr:dn ||d}t||dƒ}n|t    j
kr‹|    r‹t||    dƒ}n|s—|n|t||dƒ}|t }|t }|}t j |dt ƒrë|d7}n|s÷qänx!t|ƒD]} | j|ƒqWqäWqÑW| S(    NRiiRi'gˆÃ@gY@R¯(RtGetIndepRateDropRRŒRæR8R*t    iteritemsRpRtDef_Quality_OrangeRÁRR½R“(RR¨RùRìR"Rt indepRateDicttgradeColorRateDicttfbGradeColorRateDicttorangeEquipPertfbGradeOrangeEquipPerDicttorangeEquipPerListRÝRmRaRãRøRæt colorRateListt    colorRateR¶Rð((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR–sB    5
 
2$
 
 cCstj|ƒ}|dkrc|rBtj|jƒ|jƒƒ}qctj|jƒ|jƒƒ}n|dkrsdS|}|dkrúd}t|jƒ|ƒt    j
}t |||ƒ}tj |ƒ}|dkrút ||tt    j
ƒƒ}qún|dkrtjddƒ}n|S(Niiÿÿièýiúÿ( RetOnGetNPCDropMoneyRYRZtGetDropMoneyMintGetDropMoneyMaxRR(tGetGoldFoundRateR1R)RptOnGetOuterMoneyRate(RR¨Rt    baseMoneyRet    addRateExtaddRatetouterMoneyRate((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRËÅs$ !!   # c CsQ|jtj|ƒ}|d}||kr0gS|d7}|d|d}g}||krd}x}|D]u}    tjƒj|    ƒ}
|
s£tjd|    ƒqkn|
jƒ} |rÓ| rÓ| |jƒkrÓqkn|j    |    ƒqkWtj
d|||||f|j ƒƒnt j |tj||ƒtj
d|||f|j ƒƒ|S(Ni'isµôÂäÎïÆ·ID²»´æÔÚ, dropItemID=%ss^»÷ɱ´ÎÊý±ØµôÂä! npcID=%s,needKillCount=%s,jobDropInfo=%s,killDropItemList=%s,updRecordValue=%ssI¸üл÷ɱ´ÎÊý±ÈµôÂäÖµ: killCountValue=%s,killCountPri=%s,updRecordValue=%s(RRRRR¯R,RSR­R´R“R•R?RR( RRRbRcR<t killCountPritupdRecordValuet jobDropInfoRÎt
dropItemIDRfRÑ((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR%âs.
 
       ##cCs>tjddƒ}|dkr"dS|||dkr:dSdS(Niii ièi(RYRZ(tcurTicktlastActionTickRÁ((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytIsInActionTime s  cCs|jƒtjkrtStS(N(tGetGameNPCObjTypeRbt
gnotSummonRÑR (R((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt IsSummonNPCscCsIxBtd|jƒƒD]+}|j|ƒ}|jƒ}|jƒqWdS(Ni(trangetGetSummonCounttGetSummonNPCAtRR=(RRét    summonNPCtangry((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytClearSummonAngry_Player's cCsD| st|dƒ rdS|jƒ}|dkr7dStj|ƒS(NtGetOwner(RRRRt GetObjDetail(RtcurSummonOwner((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGetSummonOwnerDetel1s   cCs3t|ƒ}|stS|jƒtjkr/tStS(N(tGetNpcObjOwnerDetailR tGetGameObjTypeRbRcRÑ(tnpcObjt ownerDetail((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGetNpcObjOwnerIsPlayerBs  cCsU|jƒ}d}|tjkr0t|ƒ}n!|tjkrQtj|ƒ}n|S(N(RRRbR    RtgnotPett
PetControlt GetPetOwner(Rt
npcObjTypeR((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRSs cCs±|dkrdSt|dƒsN|jtjƒ}|rJtj|tjƒSdS|j    ƒ}|dkrjdStj|j
ƒ|ƒ}|dkr­|tjkr­|j ƒr­dS|S(NR( RRR_Rt!Def_NPC_Dict_SummonMapNPCPlayerIDRRaRbRcRR‹R‡(t
curobjTypet    curSummonRRtcurSummonOwnerDetel((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGetSummonNPCOwnergs   '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( RRàtGetPosXtGetPosYt    GetPosObjR t GetObjCountt GetObjByIndexR9RkRRbRc(
RtmatrixRƒtsrcPosXtsrcPosYtcurPlayerCounttcurPostmapObjRétcurObj((sfE:\SnxxServerCode\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 RRbRcR‡R9RkRRaR‹R“(RtplayListt seeObjCountRétseeObjt
seeObjTypet curTagPlayer((sfE:\SnxxServerCode\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(R0R R1RR2R RRbRcR‡R9RkR‹R“tGetTeamRRat    GetTeamID( RRt    checkTeamR3tseePlayerCountRéR5R6tseeObjIDt curPlayTeamR7t
curTagTeam((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGetInSightPlayerList_SummonNPCÔs@        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 R0R1RR9RkR2Rt    IsSameObjtGetDistR#R$RaR‹RR¬Rt AttackCommontCheckCanAttackTagt
BaseAttacktGetTagRelationRtType_Relation_EnemyR ( Rt    checkDistt
checkCountttickR\R\RéR5ttagDistt seeObjDetailtrelation((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt&CheckCanAttackTagLimitCountInSight_NPCs<  0  
cCs
tjƒS(N(tGameLogic_FamilyInvadetGetDefaultMaxAngryNPCIDList(((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRPoscCs9|jƒtjkrdS|jƒs5|jtƒndS(N(t GetCurActionRbtlaNPCDietGetIsNeedProcessR
RÑ(R((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytSetNPCInBattleStatews
 cCsp|jƒg}|jƒ}xHt|jƒƒD]4}|j|ƒ}|sOq.n|j|jƒƒq.Wt|ƒS(N(t
GetAtkDistR–R t GetSkillCounttGetSkillByIndexR“R(RtdistListR£Rtskill((sfE:\SnxxServerCode\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“tGetAuraRRbRt GetPassiveBufRÑtGetActionBuffManager(Rt getActionBufft getAuraBufftbuffRefreshList((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGetNPCBuffRefreshList s$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 GetOrgSpeedRbtmtRuntSetCurMoveTypeRpR_RtDef_NPC_Dict_SpeedPertSetSpeedtmtSlowtmtNormalRRSR(Rt changMoveTypetchangeSuperSpeedt curNPCSpeedtcurNPCBaseSpeed((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytChangeNPCMoveTypeºs*   ) #c Csˆtjƒj|ƒ} | s0tjd|ƒdStjƒjƒ} | sLdStjƒjƒ} | j|ƒ| j    | ƒ|dkr”| j
|ƒnt | ƒ|dkrº| j |ƒn|dkrÜ| j tj|ƒn|dkrø| j|ƒn|dkr| j tj|ƒn| jƒtjkrEt| | jƒƒn|ra| j tj|ƒn| j||tƒ| jƒ}|    r±|jƒx|    D]}|j|ƒq—Wn|
rêx0|
D]%}|j|ƒs¾|j|ƒq¾q¾Wnt| ƒj| ƒtj | | ƒ|    s|
r„g}x?t!d|j"ƒƒD](}|j#|ƒ}|j$|j%ƒƒq5Wtj&d| j'ƒ||fƒn| S(NsÕÒ²»µ½¸ÃNPCID: %sis-ÕÙ»½µÄNPCËùÓм¼ÄÜ: curID=%s,npcID=%s,skill=%s((RR¯R°RSt GetNPCManagertAddPlayerSummonNPCRNtGetTickt SetNPCTypeIDt SetBornTimet    SetAITypeRt SetLastTimetSetDictRRt SetSightLeveltDef_NPC_Dict_SummonRefreshIDR\RsRtRtDef_NPC_Dict_MirrorPlayerIDtRebornR R–t
ResetSkillt LVUPSkillByIDtFindSkillBySkillIDt
NPCControltDoNPCRebornCommLogicRetDoFBRebornSummonNPCR RVRWR“t
GetSkillIDR•R‹(tnpcIdtrebornXtrebornYtaiTypetlastTimeR‚Rxt    refreshIDtmirrorPlayerIDR t skillIDExListRçR RJR£R¤tlearnSkillIDListRtuseSkill((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt SummonMapNpcçsX   
 
   #c CsÄtjƒj|ƒ}|s0tjd|ƒdS|jƒtjkr|jƒ}|j|j    ƒƒ|j
|j ƒƒ|j ƒj tjƒ|j|ƒnTd\}}|j|||ƒsÂdS|jƒd}    |    dkrâdS|j|    ƒ}|sûdStjƒjƒ}
|j|ƒ|j|
ƒt|ƒ|j|jƒƒtj|tj|ƒƒ|j||tƒ|r­|j ƒ} | j!ƒx|D]} | j"| ƒq“Wnt#|ƒj$|
ƒ|S(s" Ä³¸öʵÀý½øÐÐÕÙ»½£¬ÓдÓÊô¹ØÏµ
    sÕÒ²»µ½¸ÃNPCID: %sNiii(ii(%RR¯R°RSRRbRct SummonNewNPCtSetLVRt
SetCountryt
GetCountryRRRtDef_SummonNPC_Angry_CounttSetOwnertAddSummonCountR R RNRvRwRxRR|R[R9t
SetFactionR:RR R–R€RRƒR„( tgameObjRRˆR‰R RçR tsumCountt
angryCountRRJt skillMangerR¤((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt    SummonNPC#    sB     
 
 cCs‰tjƒ}|jƒ||_||_||_tjƒ}xEt|j    ƒƒD]1}|j
|ƒ}|sqqPnt j ||ƒqPWdS(N( tChPyNetSendPackttagMCSummonMapNPCR=R$tPosXtPosYRtGetMapCopyPlayerManagerR tGetPlayerCounttGetPlayerByIndext NetPackCommont SendFakePack(tsummonIDt
rebornPosXt
rebornPosYtmapNPCt playerManagerRR((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__NotifyMapPlayerSummonMapNPCU    s 
             cCstjƒj|ƒ}|j}tj|ƒ}|s7dS|jƒtjtjgkrYdS|j    tj
ƒ}|j ƒ|krdSt |ƒdS(N( RR¥R¥tObjIDt FindNPCByIDR\RR]R^R_R`R?t    SetDeadEx(Rt
clientDataRJRR›RR((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytOnRecyclePriWoodPilel    s    
cCsStjƒj|ƒ}|j}|j}|j}|j}t|||||ƒdS(N(RR¥R¥R$tCounttHPtHPExtSummonPriWoodPile(RR±RJRRR\thpthpEx((sfE:\SnxxServerCode\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=%sRu(ii('RRŠR‹RetOnCanSummonPriWoodPileRRSR?Rtg_playerPriWoodPileNPCDictR8R0R•RtR*RuRwR|R[RR{RR`tGameMaptGetEmptyPlaceInAreaR#R$RR Rƒt ResetNPC_InitRÑR1tDef_PerPointValueR9RoRmt NotifyAppearR“(RRR\R·R¸RRšR‚tplayerPriWoodNPCListR\tnowCountt summonCountt
npcManagerRmRt    summonPosthpTotal((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR¶Ž    sH            
! 
cCs\|jƒ}|tjkrdStjj|ƒ}x$|D]}|sJq8nt|ƒq8WdS(N(R?RR»tpopR°(RR‚RÁR((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytClearPriWoodPileÆ    s  cCsog}|jƒ}x6t|jƒƒD]"}|j|ƒ}|j|ƒq%Wx|D]}t|ƒqRW|jƒtjkr‹t    j
|ƒn|j t j ƒ}|dkr¿|jt j dƒn|j t jƒrç|jt jdƒntj|ƒ}|r|jtjƒjƒƒnt j|ƒrótjd|ƒ}|r»|jƒt jt jgkr»t|dƒtjƒjt j|tjƒjƒƒt |ƒt j!kr»t"j#|ƒq»nt$j%|ƒ|tj&ddƒkrót'j(|ƒqónt)j*|ƒt+j,|ƒt-j,|ƒ|j.ƒt j/kr|tjƒj0ƒ}    t1j2j3|    iƒ}
|
j4|j5ƒdƒ|
t1j2|    <n|j t j6ƒ} | dkr| t1j7krt1j7| } xY| D]N} | r½| j5ƒ|j5ƒkr½| j8| ƒ| st1j7j4| ƒnPq½q½Wnt9j:ƒj;|j5ƒtjfƒ|j|j t j<ƒ|j t j=ƒ|j t j>ƒƒdS(NitBOSSInfotCrossYaomoBossi(?RR R R R“R°RRbtgotNPCRet DoFB_NPCDeadR_RRR{R~tNPCRealmRefreshtGetTagNPCRefreshtSetDeadRRNRvR.RRRátDef_FBMapID_SealDemontDef_FBMapID_ZhuXianBosstGameServe_GameWorldBossStateRJt SetGameFBDicttMap_NPC_WorldBossDeadTickR8tDropOwnerType_FamilyRLtClearFamilyOwnerBossHurttChNPCt OnNPCSetDeadRÇtPlayerCrossYaomoBosstOnCrossYaomoBossDeadRCtClearTeamPlayerHurtValuetNPCHurtManagertDeletePlayerHurtListt
NPCHurtMgrR\RsRŠRRR‘RÇR‹R`R»R“tPassiveBuffEffMngtGetPassiveEffManagertRemovePassiveEfftDef_NPCDead_ReasontDef_NPCDead_KillerTypetDef_NPCDead_KillerID(Rt summon_ListtnpcidRt curSummonNPCRRt
refreshObjR«RšRžtpriWoodPilePlayerIDtpriWoodPileNPCListt
priWoodNPC((sfE:\SnxxServerCode\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(
RRNRát GetRealMapIDt GetCopyMapIDRæR¥R¦R8R•(    tbossIDtkillPlayerNamet    hurtValuetisNotifyt killerIDListRt    realMapIDt    copyMapIDtkillMsg((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGameServer_KillGameWorldBoss
s$( 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(RRNRáRíRîRæR¥R¦R8R•RtDef_CrossZoneMapTableNameRR„t    GetZoneIDtSetGameWorldDictR1t,Def_Notify_WorldKey_GameWorldBossRebornCrosstDef_CrossDynamicLineMapRâtGetCrossDynamicLineMapZoneIDt'Def_Notify_WorldKey_GameWorldBossReborn(    RïtisAliveRRôRõtstateMsgt    tableNamet zoneIpyDatatzoneID((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRÒ'
s,,      & & c Cs÷tjƒj|ƒ}|sdStjddƒ}tj||ƒ}|dkr…tj|}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||ƒtj|ƒn|rdS|tjkr¦tj|tjdƒt j!|t j"dƒt#j$|tj%ƒt&j'|tj(dƒt)j*|tj+dƒt,j*|tj+dƒt-j.|tj/dƒt0j1|tj2dƒt3j4|tj5dƒt6j7|tj8dƒt9j:|t9j;dƒt<j=|tj>dƒnÕ|tj?kr{tj|tj@dƒt j!|t jAdƒt#j$|tjBƒt&j'|tjCdƒt)j*|tjDdƒt,j*|tjDdƒt-j.|tjEdƒt0j1|tjFdƒt6j7|tjGdƒn|tjHkrât#j$|tjIƒtj|tjJdƒt j!|t jKdƒt6j7|tjLdƒng|tjMkrIt#j$|tjNƒtj|tjOdƒt j!|t jPdƒt6j7|tjQdƒn|tjHtjMgkrtRjS|tjTƒt<j=|tjUdƒn|jVƒtjWkr¸tRjS|tjXƒntjYd |ƒ} | rãtZj[||ƒnt\j]||ƒdS( NRiis4¸üл÷ɱBoss´ÎÊý: index=%s, todayCnt=%s, totalCnt=%sR›RïttouchCntttotalCnttAccIDtPlayerIDtAddKillBossCntt BOSSFirstKill(^RR¯R°RRÇR+RRtDef_PDict_Boss_KillCntTotalR0RR2RRtDef_PDict_Boss_KillCntt BossHurtMngtNotifyAttackBossCntR•R?tGetAccIDR§t SendEventPackR5R6R1tSuccType_FeastRedPack_KillBosst
EventShelltEventRespons_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_CrossDemonLandBossRÎRÏtDef_GarbageTask_CrossBosstTTLTaskType_CrossBosst    GetIsBosstDef_NPCType_Boss_DarktDef_GarbageTask_KillBossRtGY_Query_BossFirstKilltSetPlayerFirstKillBosstPlayerGoldInvestt
OnKillBoss( RRRt isCrossServerRçRsRtttotalKeyRRätnewCnttdataDictR«((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytOnPlayerKillBoss@
s‚  " #RƒcBs}eZdYZd„Zed„Zed„Zd„Zdd„Z    dd„Z
dd„Z d    „Z d
„Z d „Zd „Zed „Zd„Zeed„Zd„Zd„Zd„Zejed„Zd„Zd„Zd„Zd„Zd„Zed„Zed„Z ed„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*„Z0ej1d+„Z2d,„Z3d-„Z4eed.„Z5eed/„Z6d0„Z7d1„Z8d2„Z9d3„Z:d4„Z;d5„Z<d6„Z=d7„Z>d8„Z?d9„Z@d:„ZAd;„ZBged<„ZCd=„ZDd>„ZEd?„ZFd@„ZGdA„ZHdB„ZIdC„ZJdD„ZKeedE„ZLdF„ZMdG„ZNdH„ZOdI„ZPedJ„ZQdK„ZRdL„ZSedYdM„ZTeddN„ZUdO„ZVdPeedQ„ZWdR„ZXdS„ZYddedT„ZZdU„Z[dV„Z\dW„Z]dX„Z^RS(ZcCsL||_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((sfE:\SnxxServerCode\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(    RXR#R$tabsRRàR{R¼R½(R`tdestXtdestYtdisttfixPosRR„R…tdirXtdirYt    moveDestXt    moveDestYRƒt    resultPos((sfE:\SnxxServerCode\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(    RXR#R$RtPosInLineByDistRàR{R¼R½( R`tplayerXtplayerYRfRgRR„R…RjRkRƒRl((sfE:\SnxxServerCode\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(RXRRaR¬tGetNametMoveToObj_Detel(R`R›tobjTypeRt tagObjDetel((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt    MoveToObjà
s      icCs•|j}|jƒ|jƒ}}tj||||ƒ}||kr|dkr|||||}|||||}n|j||ƒdS(Ni(RXR#R$RRBtMove(R`tdestPosXtdestPosYt sigleMoveDisRtcurPosXtcurPosYtcurDis((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytMoveToPosStepByStepò
s    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 (RXtOperControlManagertIsObjCanDoActionRtDef_Obj_ActState_ServerActRbtoalMoveR#R$RRUtGetRefreshPosCounttGetRefreshPosAttGetCurRefreshPointIndexRRBt GetMoveDisttMoveBackRqR¼R½RQt    laNPCMoveRNRvt GetActionTickt
SetDestPosRsRnRw( R`Rut moveAreaDistRR„R…RdRet curRefreshPostmoveDistRjRkRl((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRs 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(RXRR€RRRbR‚RRàR#R$R%R R&R*R'RRËRaR‹RR    RR0RUR¼R½RwRÑ(R`R„R…t fixAreaDistRRƒtnpcPosXtnpcPosYR-RéR.t
curObjTypetcurTagRlRjRk((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt    FixTagPosM sD             9   cCs|j}|jƒ}|jƒ}tj||ƒ}|dkrFtjS|jƒdkr_tjStj    |||jƒ|jƒƒS(Ni(
RXR#R$RRaRRtDef_NPCErrorMaxDistR‹RB(R`ttagIDttagTypeRR„R…ttagObj((sfE:\SnxxServerCode\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ƒƒtS|j||ƒrÜtStj||ƒsòtStj||ƒstStj||d|ƒd}    |    tjkr7tStS(Nis&curNPC = %s ²éÕÒ¶ÔÏó, »ñµÃ¶ÔÏóʵÀýʧ°Ü(RXRRbtgotItemR RRAR‹Rt FindNPCAngryRR9t GetAngryValueRaR¬Rt_NPCControl__GuaedAttackTruckRÑRCtCanAttackByPathRDRERFRRG(
R`R5RJRR6R=tnpcAngryt
angryValueRLRM((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__CheckAddToAngryListŸ s2       ! cCs²|j}|jƒtjkr"dS|jƒtjksL|jƒtjkrPdS|jƒdkrt    j
||d|ƒ rdSt    j ||d|ƒd}|t jkr®dStS(Ni(RXR\RbtntGuardRRËRt    gnotTruckRgREt GetCanAttackRRFRRGRÑ(R`R5RJRRM((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__GuaedAttackTruckÙ s    +cCsC|j}tj|ƒ r?t|ƒ r?|jƒtjkr?tStS(N(RXRR.R:R\RsR RÑ(R`R((sfE:\SnxxServerCode\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(-RXR t
GetAtkTypeRtGetAngryValueTagt_NPCControl__IsValidAngryObjRRàt GetMapFBTypeRáR¥RâRãRRŒRbtfbtNullRÇtGetAttentionPlayersCountR tGetAttentionPlayerByIndexRR9RkR2t _NPCControl__CheckAddToAngryListRBR#R$tGetSightRtDef_NPCFirstSightAngryValuetDef_Screen_AreaRRctGetAngryNPCCounttDef_NPC_SeePlayerAddAngrytAddObjToAngryListRÑR„R…R0R1R.tGetIsInRefreshPoint(R`RJt
isUpdAngryRt
needResorttcurAngrytmapTypeRt recordMapIDtmapAngryNPCCountDicttangryNPCCountLimitR<RéR5Rft addAngryValuet refreshPoint((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytAddInSightObjToAngryListÿ sv          0   10 cCsœ|s
dS|jƒtjkr8|jƒtjkr8dS|}|dkr]||jƒ7}n|jƒtjkrˆ|tj    |ƒ7}n|j
||ƒdS(N( RRbRËR\tntFairyRt GetSkillAngryRcRt GetAddAngryR´(R`tobjDetelRñRtaddAngry((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytAddObjDetelToAngryList_ByAttackn 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( RXRRAR RCtCheckObjCanDoLogicRR‹t_NPCControl__CheckCanAddAngryRRbRcR8RtDropOwnerType_MaxAngryRaR:tGetTeamManagertFindTeamRRR•R*tGetMemberCountt    GetMemberR?t_NPCControl__AddAngryValueR9RkRSR
RÑ(R`R.tplusAngryValuetcanPiletcheckRR‘tcurObjIDt addAngryTeamRRžRét curTeamPlayert teamPlayerIDR½((sfE:\SnxxServerCode\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šRR9R›tAddAngryR1R¿t SetAngryValue(R`RžRÑR‘RÎRÏRŸt updAngryValue((sfE:\SnxxServerCode\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(RXRRaR¬R RERFRRRGRRbR    RÑR‹RËR"RcRARCtCheckPlayerAttackMode_Player(    R`RÑR‘Rt curObjDetelRMt curNPCDetelt curNPCOwnert curObjOwner((sfE:\SnxxServerCode\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("RXRRPR R„R…R t GetAngryCountR¨tGetObjIDt
GetObjTypeRRat DeleteAngryRÑRbRËRRCRDRµR#R$RBR¯Rgt CanSeeOtherRZtGetNPC_Is_GateRERFRRRG(R`RJRRžtdefaultMaxAngryNPCIDListR·R¾RéRŸtangryIDt    angryTypeR.RfRM((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytRemoveDeathInAngryList sb               !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(RXRtGetLastResortTickRèR¿tGetMaxAngryTagRR9RkR:RgR‡tResorttSetLastResortTick(    R`RJtrefreshIntervalR¶RRžtlastTickt removeRsortR·((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytRefreshAngryListh s      4  cCs^|j}|jƒ}xBtd|jƒƒD]+}|j|ƒ}|j|ƒsUq+n|SWdS(Ni(RXRR RßR¨R©R(R`Rt angryManagerRéR¸((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRê‹ s     cCsU|dks|jƒdkr"dStj|ƒ}|dkrAdS|jƒrQdS|S(Ni(RRàR9R›t GetIsDisable(R`R¸t curAngryValue((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__IsValidAngryObj  s  cCs#|j}|jƒ}|jƒtS(N(RXRR=RÑ(R`RR¸((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt ClearNPCAngry´ s     
cCs#|j}|jƒ}|jƒtS(N(RXtGetPlayerHurtListR=RÑ(R`Rt npcHurtList((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytClearNPCHurtList¿ s     
cCs|j}|jtjƒS(s¯NPCÊÇ·ñÉËѪ±£»¤ÖÐ
        ÒòΪÊÖÓαȽϻá³öÏÖÍøÂçÇл»µÄÇé¿ö£¬´Ëʱ»á¿ÉÄÜ»áÒýÆðµôÏßÖØÁ¬
        ËùÒÔÕë¶ÔÊÖÓÎ×öÁ˵ôÏß3·ÖÖÓÄÚÉËѪ±£»¤£¬·ÀÖ¹Íæ¼ÒÖØÁ¬ºóÉËѪ±»Çå¿Õ£¬ÌåÑé²»ºÃ£»
        (RXR_RtDef_NPC_Dict_InHurtProtect(R`R((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytIsInHurtProtectÆ s    cCs@|j}t|t|ƒ}x|D]\}}|jƒq"WdS(N(RXReRÑR=(R`tisClearAuraBuffRRdt    buffStatet    canPileup((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt ClearAllBuffÓ s
    cCsH|jƒ|jƒ|j|ƒ|j}tj|ƒtj|ƒtS(N(RõRøRþRXRÜtClearPlayerHurtListRÞRÑ(R`RûR((sfE:\SnxxServerCode\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(NRu( RXt_NPCControl__ClearNPCAllStateR R9RkRjt_NPCControl__InitNPCSummont_NPCControl__NormalNPCInItCDtRefreshNPCStateRqRÑ(R`RuR((sfE:\SnxxServerCode\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(    RXt SetAttackTicktSetUseSkillTickR–R RVRWRtSetLastUseTick(R`Rt curNPCManagerRét curNPCSkill((sfE:\SnxxServerCode\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(RXR R R R“R°(R`RtcurNPC_Summon_ListRRRç((sfE:\SnxxServerCode\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(RXtGetCurPatrolIndextGetPatrolPosAtR#R$RfRbRmRsRiRwRR‰tGetPatrolPosCounttSetCurPatrolIndex(    R`RJRt patrolIndext    patrolPost
patrolPosXt
patrolPosYt curNPC_PosXt curNPC_PosY((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt __PatrolMove5s4         
       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(RXRt_NPCControl__PatrolMoveR„R…R0t GetMoveAreaR#R$tGetAreaRR‡RR‰RYRZRsRbRmRRàt LineNearToPosRw(R`RJRtPosMaptmoveAreaR„R…t minMovePosXt maxMovePosXt minMovePosYt maxMovePosYtposMapXtposMapYt
posMapAreatnewPoint((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytDoNormalNPCMoveksH       
 
 
 
 
 
cCstj|jƒƒS(N(Rt GetPsycoFunct)_NPCControl__Func_GetRandPosInRefreshArea(R`((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGetRandPosInRefreshArea«scCsÑ|j}|jƒ}|sHtjd|jƒƒ|jƒ|jƒfS|jƒ}|jƒ}|jƒtj    kr~d}n |j
ƒ}t j |||ƒ\}}|dkrÇ|dkrÇ||gS||fS(NsK__Func_GetRandPosInRefreshArea GetRefreshPosAt error: return None! npcID=%si( RXtGetRefreshPointRRSRR#R$R\Rbt ntFunctionNPCRR¼tGetNearbyPosByDis(R`RtposMapR"R#R$R„tpoxY((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__Func_GetRandPosInRefreshArea²s            
cCsF|j}tj|ƒ}|r-|jƒ}n|j|jƒƒ}|S(N(RXRÍRÎR*R„R…(R`RRèR¾((sfE:\SnxxServerCode\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(RXR*RµR#R$RÑRQRbRˆRfRit GetDestPosXt GetDestPosYR (R`RR¾((sfE:\SnxxServerCode\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 R#R†R$RÑ(R`R{R|R¾((sfE:\SnxxServerCode\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(RXRRYRZRR#R$R)RúR¾RsRbRiRÑRw(R`Rt patrolCountRRR„R…((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR‡s         cCsb|j}|jtjd|jƒdƒƒ|jƒ\}}|j||tƒ|j|ƒdS(Nii(    RXtSetCurRefreshPointIndexRYRZRƒR)RR R„(R`RJRR„R…((sfE:\SnxxServerCode\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ƒ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'ƒ|j(||ƒdS(NiRÉis/NPC¸´»î£¬Ì×ÉϹ⻷: objID=%s,npcID=%s,skillID=%s()RXR¾RÑR9RoRjRRìt RebornNotifyR{RtDef_NPC_Dict_HPPerLogicMarkt!Def_NPC_Dict_RebornPreNotifyIndexR×t OnNPCRebornRet DoFBRebornNPCRR.RRRÒR8RÕRLtFamilyOwnerBossOnRebornR–R*RVRWtGetSkillTypeIDt GetSkillTypetDef_SkillType_AuraRR•R‹R†t
SkillShellt NPCUseSkillRÀt NotifyNPCShow(R`RJRtcurNPCIDR«R£RR((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR„-s8     
    ,
c
Cs!tjƒjƒ}tjd||ƒ}|s1dS|jƒrAdStjƒjtj    |ƒ}|rgdS||j
ƒ}tjƒj tj    ||ƒt j ƒ}||_tjƒ}xKt|jƒƒD]7}|j|ƒ}    |    jƒsïqÈntj|    |ƒqÈWtjd|||fƒdS(NtNPCShows&¿ªÊ¼NPCÐã: npcID=%s,tick=%s,endTick=%s(RRàRáRRt GetShowTypeRJRQRtDef_FBDict_NPCShowEndTicktGetProtectTimeRÓRŸt tagMCNPCShowR$R£R*R¤R¥R?R¦R§R•(
R`RRJRtnpcShowIpyDatatendTickt npcShowPackR¬Rtplayer((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRAZs*        cCsdS(N((R`((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR6sc 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(RXRRRŒRR+tsortedRÑR9RkRjR_RR7Rt WorldNotifyR{( R`tdropTypetownerIDRRBthpPerLogicNPCIDDictthpPerLogicListt    hpPerListtsysMarktnowHPPerthpPerLogicMarktlogicHPPerListthpPer((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt DoHPPerLogicŽs$       
  cCsdS(N((R`taddPrestigeFormatR(((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__GiveNearbyPlayerPrestige·s"cCs“|j}|jƒdkrdS|jƒdkrXtjd|jƒƒ|j|ƒn|jƒ||jƒ}|dkr‚dS|j|ƒdS(Nis¼ì²âµ½NPC¿ìËÙ¸´»î %si(RXtGetRefreshTimeR‰RR•R‹t SetActionTickR5(R`RJRRÄ((sfE:\SnxxServerCode\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(RR±R²R_RR8R8RptmathtceilR{RRNRáRRO( R`RRÄRtpreRebornNotifyNPCDicttnotifyMinuteListt
notifyMarkt notifyIndextreaminMt notifyMinuteR((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__DoNPCRebornPreNotifyõs   
 %cCs|j||ƒ|jƒdS(N(tRefreshNPCAttrStatetRefreshNPCActionState(R`t canSyncClientRu((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRscCsL|j}tj|ƒ}tj|ƒ|jƒ|j|jƒƒ|j|jƒƒt    |j
ƒƒ}|rÝ|j |j ƒƒ|j |jƒƒ|j|jƒƒtj||jƒƒtj||jƒƒtj||jƒƒtj||jƒƒtj||jƒƒtj||jƒƒtj||jƒƒtj||jƒƒtj ||j!ƒƒtj"||j#ƒƒtj$||j%ƒƒtj&||j'ƒƒtj(||j)ƒƒtj*||j+ƒƒnt,j-|ƒ}|j.t/j0ƒ}|rt,j1|ƒn&|r-|j2||ƒn t3||ƒgt4dƒD] }i^qG}    t5j6|ƒ}
xA|
j7ƒD]3\} } | su| r•qunt8j9| | |    ƒquWt:j;||    t/j<ƒt=j>||    t/j?ƒt@jA|ƒ} |jB| ƒtCjDƒjE|ƒtj|ƒ|}|dkrHtjF|tjG|ƒ|ƒndS(Nii(HRXR9RjtClearBattleEffecttResetNPCBattleStateRlRhtSetAtkIntervaltGetBaseAtkIntervalR$Rt    SetMinAtkt    GetMinAtkt    SetMaxAtkt    GetMaxAtktSetDeftGetDefRmt SetAtkSpeedt GetAtkSpeedt SetMissRateRÕtSetMissDefRatetGetMissDefRatetSetSuperHitRatetGetSuperHitRatetSetSuperHitRateReducetGetSuperHitRateReducet SetFaintRatet GetFaintRatetSetFaintDefRatetGetFaintDefRatet SetComboRatet GetComboRatetSetComboDefRatetGetComboDefRatetSetAtkBackRatetGetAtkBackRatetSetAtkBackDefRatetGetAtkBackDefRatet SetSuckHPPert GetSuckHPPertSetSuckHPDefPertGetSuckHPDefPerRtIsPetNPCR_RR~tRefurbishPetAttrtSetMirrorPlayerNPCAttrRˆR RetCalcFBNPCPlusAttrRlRtCalcAttrDict_TypetCalcNoLineEffecttChangeNPCAttrInNoLineEffectListtCalcAttr_BattleNolinetCalcLineEffecttChangeNPCAttrInLineEffectListtCalcAttr_BattleR?tCalcBuffer_NPCBattleEffecttRefreshNPCSpeedRßRàtRegistPassiveEffRoRk(R`RlRuRtmaxHPBefR#tisPetNPCRRmt otherAttrListt plusAttrDicttattrIDRt allAttrListtmaxHPAdd((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRjs^     
        cCsßtj|ƒ\}}|sdS|j}|j|dtƒ|j|dƒ|j|dƒ|j|dƒtj    ||dƒtj
||j ddƒƒtj ||dƒtj ||d    ƒtj||d
ƒtj||d ƒtj||d ƒtj||d ƒtj||j ddƒƒtj||j ddƒƒtj||j ddƒƒtj||j ddƒƒtj||j ddƒƒtj||j ddƒƒtj||j ddƒƒtj||j ddƒƒtj||j ddƒƒtj||j ddƒƒtj||j ddƒƒtj||j ddƒƒtj||j ddƒƒtj||j ddƒƒ|s©dSt j!d|j"ƒ|j#ƒ|tj$|ƒfƒdS(NRGtMinAtktMaxAtktDefRItAtkSpeeditMisstHitt SuperHitRatetSuperHitRateReducet    FaintRatet FaintDefRatet    ComboRatet ComboDefRatet AtkBackRatetAtkBackDefRatet    SuckHPPert SuckHPDefPertCurePert
CureDefPertPetStrengthenPert PetWeakenPertSuperHitHurtPertSuperHitHurtDefPert FinalHurtPertFinalHurtReducePers:ÉèÖþµÏñÍæ¼Ò: objID=%s,NPCID=%s,mirrorPlayerID=%s,maxHP=%s(%tPlayerViewCacheTubetGetPlayerPropPlusDictByIDRXRiR RqRsRuR9RmRwR‘RyRzR|R~R€R‚R„R†RˆRŠRŒRŽt
SetCurePert SetCureDefPertSetPetStrengthenPertSetPetWeakenPertSetSuperHitHurtPertSetSuperHitHurtDefPertSetFinalHurtPertSetFinalHurtReducePerRR•R‹RRj(R`RRutPropDictRmR((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR’lsF        )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(RXRâRãRRàRátGetFBPropertyMarkRR„R4tGetFightPowerMintGetRobotBaseHurttGetRobotHPCoefficientRpRÛtGetFuncCompileCfgR•R‹R9RmRoRqRr(
R`t
fightPowerRRt
funcLineIDR«t fbFightPowertbaseHurtt hpCoefficienttmaxHP((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytSetHelpBattleRobotRebornAttr•s"          
 
cCsç|j}|tjjtjdƒ}|sV|jtjƒr©|jtjdƒq©nSt|j    ƒt
j t dt t
j |ƒƒƒ}|j|ƒ|jtj|ƒtjƒjƒtjkrãtj|tj|j    ƒƒndS(NigY@(RXRR—R‘tTYPE_Calc_AttrSpeedR_RkR{RpRgR1R)RR(RlRRàRátDef_FBMapID_GatherSoulR9tNotifyObjInfoRefreshRbtCDBPlayerRefresh_Speed(R`R£RtspeedPertspeed((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRœ®s    3 cCs'|j}tj|ƒtj|ƒdS(N(RXRtClearObjActionStateR?tCalcBuffer_ActionState(R`R((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRkÃs     cCs;|j|ƒ}|j|ƒ}|s*|r7|jƒndS(N(tRefreshBuffStateNoTimelytRefreshBuffStateTimelyRj(R`RJtrefreshAtrefreshB((sfE:\SnxxServerCode\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(RXt GetTickByTypeRtTYPE_NPC_Tick_BufftTYPE_NPC_Tick_Timet SetTickByTypeR R0t RefreshBuffR[R\R_R
tCheckAddAuraSkilltCheckAuraSkill(R`RJRtrefreshtresult((sfE:\SnxxServerCode\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(RXRãRtTYPE_NPC_Tick_Buff_TimelyRåRæR0RçR]R^RaRkR?tProcessPersistBuff(R`RJRRë((sfE:\SnxxServerCode\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(RXRt!_NPCControl__SetFeelNPCPlayerListt_NPCControl__GiveObjPrizet_NPCControl__EventKillNpcRRàRáRZt GetPlayerNameRR¥RRÑRÐR8RÕRLtFamilyOwnerBossOnKilledR_R]R?R÷RÑRÇRRORR=(R`RRRt
killerNamet bossIpyDataRKRó((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt __KillLogics"    
 
 
"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( RXR\RÜRöR*t GetHurtCountt    GetHurtAtt_NPCControl__GetTagByHurtObjR“RtGetAreaTeamMemberR#R$( R`RR÷teventPlayerListRthurtObjt hurtObjTypeRtcurTeamt
playerlistt
teamPlayer((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__SetFeelNPCPlayerListSs.        
 
 !      cCsn|jr|j|jƒnxK|jD]@}|jrV|jjƒ|jƒkrVq&n|j|tƒq&WdS(N(RZt_NPCControl__MissionOnKillNPCR\R?RÑ(R`t eventPlayer((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__EventKillNpc}s    $cCsY|s
dStjddƒ}|s&dSx$|D]\}}||kr-|Sq-W|ddS(Nit    GoldModeliiÿÿÿÿ(RRŒ(R`Ret moneyItemListR\tmoneyID((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__GetDropMoneyModelID‹s c
Csã|j}|jƒ}g}|jƒ}|jƒ}|rëx¯|jD]¡}    |\}
} } t|    ||
| ƒ} xt| D]l}|r˜tjd|ƒr˜dnd}|j|    ||| gƒt    j
d|||
| |f|    j ƒƒqtWqCWnt } tj ddƒ}||krt||}t    jƒjtjƒ}|j|gƒ}g}x4|D]\}}||g|7}qPWn |jƒ}x\|D]T}|r«tjd|ƒr«dnd}x'|D]}|j|||| gƒq¸Wq‡W|S(s¢ÌØÊâµôÂä (˽ÓÐÌØÊâµôÂä + »÷ɱ´ÎÊýÌØÊâµôÂä), Ö§³ÖÃþ¹Ö
        @return: None
        @return: [[ownerPlayer, itemID, isAuctionItem, isDropInItemPack], ...]
        R²iisb»÷ɱ´ÎÊý±Øµô(¿ÉÃþ¹Ö): npcID=%s,dropItemID=%s,needKillCount=%s,isDropInItemPack=%s,isAuctionItem=%sRi(RXRRÒR$R\R%RRR“RR•R?R RŒRJRQRR R‘R&(R`RÓR2R¨RRtspecDropItemListtauctionItemCanSellRat
feelPlayerRbRctisDropInItemPacktkillCountDropItemListRRiRfRgR"RhRiRjRkR;((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__NPCSpecialDropItem—s:        $    + 
  $ !c& CsÚ|s
dS|j}tj||ƒ|jƒtjtjgkrRtjdƒdS|j    ƒ}tj
ƒj ƒ}t j |ƒ}tj|ƒ}    |tjtjtjtjtjgkrÍtjd|ƒdS|    rütjd||jƒf|jƒƒnt|ƒ}
|
sJ|    rFtjƒjtjƒ} tjd|| fƒndSggddf\} } }}t|||||
tƒ}|rž|\} } }}n|j|ƒ}|rÍ|rÍ| |g|7} nd}g}|r|j|||
ƒ}| |gt |ƒ7} nt | ƒdkr=t!j"|ƒt!j"| ƒn| r‚|    r‚tjd|j#ƒ|
j$ƒ|
j%ƒf|jƒƒnt&j'|ƒ}tj
ƒ}|j(ƒ|j)ƒ}}d}xtj*D] \}}||}||}|j+||ƒsþqÆn|t | ƒd    krPnt}| |}|d    7}||kr‰|sJqÆnd    }|d\} }}!}tj,| jƒ}"}#|d    }n7|} ||}"}#||kr®|nd    }|| k}!|j-||||!|ƒ}$|$sçqÆn|tj.kr>t/j0|||!ƒt1j2|$ƒ}%t3| ||||%ƒ|$j4ƒqÆn|r­|$j5tj6tj7ƒt1j2|$ƒ}%t8j9| |$d
d ti|d 6gƒrÒt3| ||||%ƒqÒqÆ|j:|$|||"|#d |d|ƒqÆWdS(Nsľ׮¹Ö£¬²»µôÂäÎïÆ·£¡s$¸ÃµØÍ¼²»×ßÖ±½ÓµôÂäÎïÆ·Âß¼­£¡mapID=%ss%NPC¿ªÊ¼µôÂä: npcID=%s,dropPlayerID=%ss(È¡²»µ½NPCµôÂäÐÅÏ¢!npcID=%s,curWorldLV=%sitSpecItemis8BossûÓеôÂä: dropPlayerLV=%s,ipyWorldLV=%s,maxDropLV=%siR%tNPCDropRRqRx(;RXRÌt OnKillNPCDropR\RR]R^RR•RRàRáRâRãR.tDef_FBMapID_MunekadoTrialtDef_FBMapID_DemonKingRÐRÑtDef_FBMapID_KillDevilR¬R?R¬RNROR1RURSR+R t _NPCControl__GetDropMoneyModelIDt_NPCControl__NPCSpecialDropItemR8RYtshuffleRR¦RRRyR#R$RzR{R~t_NPCControl__CreateDropItemR×tGameLogic_GatherSoultKillGatherSoulNPCDropAwardR|RR‘R=t SetUserAttrtDef_IudetSourcetItem_Source_VirtualItemDropR0RBt_NPCControl__MapCreateItem(&R`RÓthurtTypethurtIDR2RqRRRt
isGameBossR¨RªRbRcRdReRaR    t specItemSigntplayerSpecDropListRxRƒRoRpRR„R…R†R‡RR[titemCntR;Rit    ownerTypeRQRnRŸ((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt __NPCDropItemÍs¤      )        / 
 
 
 
 
()cCsg|j}|jƒtj|dƒ|jƒ|jƒ}|tjkrLdS|jt    ƒt
|ƒdS(Ni( RXt_NPCControl__KillLogicR9RoRRRbR¢R
R R°(R`RtcurNPC_GameNPCObjType((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt    SetKilled8s    
 
 
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ˆÃ@(RXt GetHPRestoreR R9RjRkR{RR7RQRbt    laNPCNullRÑRútGetRestoreTimetDef_NPC_ProcessHP_TicktSetRestoreTimeRpR
t
SkillAddHP(R`RJRt hpRestoreRatet curNPCMaxHPtlastRestoreTimet restoreValue((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytProcessHPRestoreŒs,       $ cCsdS(N((R`RJ((sfE:\SnxxServerCode\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=%siRqs*NPC¹éÊôÒì³£:npcID=%s,hurtType=%s,hurtID=%sR›RïRRštteamIDtkillerIDR!R"tKillBossRecord(-RXRt"_NPCControl__FindLastTimeHurtObjExRYRR.t_NPCControl__FindNPCKillerInfoR[R^R_RR¬t _NPCControl__DoLastTimeHurtLogicR8RRÝRZRtGetOfficialRankR&RRt
GetLvLargeR?t#_NPCControl__KilledByPlayerSetPrizeR“R]R~tDef_NPCHurtTypeTeamtDef_NPCHurtTypeSpecialt_NPCControl__NPCDropItemt!_NPCControl__KilledByTeamSetPrizetDef_NPCHurtTypeFamilyt#_NPCControl__KilledByFamilySetPrizeRSR‹RàRáRNRŠR:RŽR§RtOnNPCDie(R`RRR#RR!R"RÓt maxPlayerLVR2RtplayerRealmIpyDatatnpcRealmIpyDatatplayerRealmLVLargetnpcRealmLVLargeRqRV((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__GiveObjPrizeØsj     
                             $ / *,!cCsk|j}|sdS|jƒ}|tjkr2dS|j}tj|t|ƒƒtj    ||j
ƒƒdS(N( RYRRbRcRXt    PlayerViptDoAddVIPKillLVExpR RtAddZhenQiByKillNPCtGetSP(R`tlastHurtPlayerR‘R((sfE:\SnxxServerCode\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(+RXRR‹RRNRŠRtg_npcKillerInfoRÇR:R¬RŽRR8RtDropOwnerType_MaxHurtRötSortRùR*Rút GetValueTypet
GetValueIDRûR?R~RBRÈt_NPCControl__GetMaxAngryInfoRYRÉRÊtDropOwnerType_AlltDef_NPCHurtTypeAlltDropOwnerType_FactionRetGetNPCItemProtectFactiontDef_NPCHurtTypeFactionRàRáR×RâtGetCurSingleFBPlayer(R`R#RRR›Rät
killerDicttkillTeamR!R"R9t dropOwnerTypeR÷Rét
maxHurtObjRRR‚tmaxAngryPlayert maxAngryTeamtlastHurtPlayerIDtprotectFactionRK((sfE:\SnxxServerCode\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áRbRcRRaR:RÉRÊ(R`R¸Ræt angryObjTypeR’R9((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__GetMaxAngryInfo°s    
cCs>|j}|jtjƒ}tjƒj|ƒ}|s:dS|S(N(RXR_RtDef_PlayerKey_LastHurtRR¥tFindPlayerByIDR(R`RR‚R((sfE:\SnxxServerCode\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( RXRRRR•R„R…RYRR~RaRZRbRcR¬R9RktGetPlayerActiontpaDieRµR#R$RBtDef_Team_GetExpScreenDistRBRÉRÊRËR*RÌR?tDef_NPCHurtTypeNPC(R`RetisCheckRefreshAreaRURRt hurtObjTupleR¾tmaxHurtValueTypeRR9RRéRÓ((sfE:\SnxxServerCode\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(RXt_NPCControl__GetExpRR R_RRäR‹RâRRCR1tDef_ViewExpType_KillNPCt_NPCControl__KillNPCFuncExR?(R`RRtadd_ExpRxt playerControl((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__KilledByPlayerSetPrizeEs    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(NRUsS½±Àø¹éÊô¶ÓÎ飬µ«ÊDz»´æÔÚ¿É»ñµÃ¸Ã½±ÀøµÄ¶ÓÔ±!npcID=%s,teamID=%s,hurtType=%s,hurtID=%siR8s[¶ÓÔ±Íæ¼Ò´ó¾³½ç²»×㣬ÎÞ·¨»ñµÃBoss¹éÊô½±Àø! playerRealmLVLarge=%s,npcID=%s,npcRealmLVLarge=%sRqi(#RXRRüR#R$t_NPCControl__GetIsLogRRSRR:RYRZR?RRR.R?R&RRR@R¬RR“t_NPCControl__DoNormalTeamExpR{RÑR]RetGetFBEveryoneDropInfoRDR~RBRCR8(R`RR!R"RRt    maxHurtIDt    teamMaxLVRÓR2RR#RRJRKRLRMt curPlayerLVt fbOwnerInfoRq((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__KilledByTeamSetPrizebs\    -                                       /$ /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(RXRR„R…RR£R*R¤R¥t GetFamilyIDRµR#R$RR“R]R¬RRYRSRZR?R{R RD(R`R!R"RtmaxLVRÓR2R¾t copyPlayerMgrRRKR„R‚R((sfE:\SnxxServerCode\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($RRRRàRªRâRãRáRbRËt IsCrossServerR«RetDoFB_DropOwnerRR.RWRÑR RRRÇRRR1tDailyActionID_KillNPCRÎRÏRÐR.R/tActTaskType_KillNPCR5R6t%SuccType_FeastRedPack_KillSpecificNPCR (    R`RRR:t
isTeamKillRt
defObjTypet    mapFBTypeR((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__KillNPCFuncExÕs,   %c
Cs
|j}|jƒ}|tjkrCttj|ƒ}|rVdSn|tjkrVdS|jƒ}tj    ddƒ}t
j ||ƒ}|t j k}    |rÄtj||ƒ|    rêtj|ƒqên&tj||ƒ|    rêtj|ƒntj|t jd|gƒdS(NRi(RXRRbR    R"Rct
gnotNormalRRRÇRR+R1RRtEventRespons_OnKillByFeelt EventRespons_KillWorldBossByFeeltEventRespons_OnKillByIdtEventRespons_KillWorldBossR5R6tSuccType_KillSpecificNPC(
R`RtisFeelRRRÜRRsRtt isWorldBoos((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__MissionOnKillNPCþs*      cCstj|jƒS(N(RR.RX(R`((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt
__GetIsLogscCs“|j}|j|jƒt|ƒ}|s.dSd}|jtjƒ|jƒkrg|jtjƒ}nt    j    |ƒ}|j
|t j d|ƒdS(NiRx( RXRyRRÑR_RRäR‹RâRRCR1Rz(R`RRR|RxR}((sfE:\SnxxServerCode\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(RXRRàRªRbR«Ret OnGetNPCExpRRRR[RRtGetExpRR?RCtGetTeamPlayerHurtPerRÛRÜRÝRÇ( R`R4tisTeamRKRR]RR(RR™R‚thurtPertexp((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__GetExpFs4           $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(NiRvRwRqRxsµôÂäÎïÆ·,ÎÞ·¨ÕÒµ½µØÍ¼µôÂäÎïÆ·(RXRRR.RCR]R?R|R}RRR¬tSetByObjRR‹(R`RnR„R…RPRQRqRxRRBRwRKtspecOwnerIDListt
curMapItem((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__MapCreateItemys     76  cCs)tj|||d|ƒ}|s%dS|S(NR(R0R1(R`RR[R\RiRÓRn((sfE:\SnxxServerCode\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ƒ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( RXRR8RR¬RNRŠR‹RRÜtRefreshHurtListRÞRRÕRLtRefreshFamilyOwnerNPCHurtRFtDropOwnerType_Contendt _NPCControl__RefreshContendOwnerR~R?RðRÑRêRàRáRaRbRcR:RBtUpdateDropOwner(R`RJRítisDeadt checkCanDeadRR—R'RQRdt maxHurtInfoRvt ownerFamilyIDRkt maxAngryObjtmaxAngryRæ((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytRefreshDropOwner¢s^          /    /   /        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(RXR_RtDef_NPC_Dict_LastDropOwnerIDtDef_NPC_Dict_LastDropOwnerTypeR~RRaRbRcR2R•R9RkRpRqR„R…RµR#R$(R`RRQR'R~R¾((sfE:\SnxxServerCode\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(RXRRÉRÊR„R…R¬RËR*RÌRR?R9RkR2R#R$RµRS(R`R9R²RRR¾RéRÓ((sfE:\SnxxServerCode\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(>RXRR8RRWRÈRÕR¯R_R¹RºRRNRŠR‹R¬t_NPCControl__DelDropOwnerBuffRR{RÜRöR~RaRbRcR?t HaveHurtValuet#_NPCControl__AddDropOwnerPlayerBufftDef_PlayerKey_ContendNPCObjIDR0tDelBuffBySkillIDtDef_SkillID_DropOwnerBuffRBRÉRÊRCRËR„R…R*RÌRîRCtCheckKillNPCByCntR R2R.R;R4R•R#R$RFR£R¤R¥R‡RµR:RRVRŽ(R`RJR'RQR²RRRdtlastDropOwnerIDtlastDropOwnerTypeRäRbRR!R"thurtListRR‚R¾RéRÓtisOkR‰RRKR9((sfE:\SnxxServerCode\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(    RXR
R RRÃtAddBuffBySkillType_NoRefurbishRR•R?(R`RRJRtfindBuff((sfE:\SnxxServerCode\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(RXRR~RRaRbRcR•R0RÂRÃR¯R{RÁRBRÉRÊR*RËRÌRR?(
R`RdR'RQRJRRRRéRÓ((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__DelDropOwnerBuff•s(    #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(RXR_RR¹RºR~RRaRbRct*_NPCControl__SetDropOwnerBuffDisappearTimeRBRÉRÊR*RËRÌRR?RFR£R¤R¥( R`RRQR'RRRéRÓR‰RRK((sfE:\SnxxServerCode\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((RXRR¯tGetSkillBySkillIDRRÃR
t GetBuffTypetGetBuffManagerByBuffTypeRNRvR*t GetBuffCounttGetBufftGetSkillR<R‹t
GetOwnerIDtSetCalcStartTickt SetRemainTimetSync_RefreshBufft GetRemainTime( R`RRt    findSkilltbuffTypet    buffTuplet
RemainTimeRJtbuffStateManagerRtcurBufft    buffSkill((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__SetDropOwnerBuffDisappearTimeÍs.     
   N(_t__name__t
__module__RRXRbRÑRmRqRvR~RsR“R˜R®RœR¥R R¿RÅR´RÍRÇRèRt Def_NPCRefreshAngryValueIntervalRðRêR©RõRøRúRþRR¾RRRR&R)R(R*R2RµR‡R5R„RAR6RZtDef_Matrix_Threet%_NPCControl__GiveNearbyPlayerPrestigeR_t!_NPCControl__DoNPCRebornPreNotifyRRjR’RÕRœRkRâRÞRßR)RñRóRRRDR+R6R7RòR>R=R[R<RûRARERGR{RRR€RyR RR¸R°t!_NPCControl__GetMaxHurtTeamPlayerR±RÀR¾RÎRÍ(((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRƒ˜
s®            K >        :         o     4        @    R#                                    6    @                                  -    %        )*         Q    )                            6    *             6k    T    +    !    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_RRÁRR¯R8R¯R?R•RRƒR±R~R (RtdefenderRJtcontendNPCObjIDRRdR‚t
npcControl((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytOnPlayerKillNPCPlayerós        cCsVtjƒ}||_||_||_||_t|jƒ|_tj    ||ƒdS(N(
RŸttagMCVirtualItemDropt
ItemTypeIDR¡R¢tUserDataR8t UserDataLenR¦R§(RKR[R„R…t userDataStrt    vItemDrop((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR‘s                 cCsŸtjƒj|ƒ}|sdStjtj|ƒƒ}tjd||ƒ}|ra|jƒ}n |jƒ}|swdS|j    ƒ}|j    ƒ}t
|||ƒS(NiR( RR¯R°RRRRRR¢Rt
CalcNPCExp(RRRçRRR]R™R4((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR's   cCs(ttjdtjddƒƒƒ}|S(NR i(RÛRÜRÝRRÇ(R]R4R™R¦((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRó!s$cCsFtjtd|jƒdfƒ}|dkr2dS||||ƒdS(Ns AIType_%d.%stOnAttackDieByPlayer(RRRRR(RRRYR((sfE:\SnxxServerCode\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.tCheckPackHasSpaceRbR4(RRtcollectNPCIpyDatat limitMaxTime((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytCheckCanCollectByNPCID4s  !"cCs{d}tjddƒ}xL|D]D}||kr7qnx(|D] }||jtj|ƒ7}q>W|SW|jtj|ƒS(Nit
CollectNPCi(RRŒRRtDef_PDict_CollNpcIDCollTime(RRt todayCollTimetcollectTimeShareIDListRÆt    collNPCID((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRøHs   cCsÌ|jƒ}tjd|ƒ}|s(tS|jƒr8tSt|||ƒsNtSd}t|ƒ}| rµ|dkrµ||jƒkrµt    j
dƒd}|r±t j ||ƒntSt ||||ƒtS(NRiis²»ÔÊÐíͬʱ²É¼¯£¡tGeRen_liubo_436832(RRRR tGetIsMissionCollectNPCRÿRÑtGetCollectNPCPlayerIDR?RR•RRùtDoCollectNPCBegin(RRRJRRýtcanCollTogethertcollectPlayerIDRU((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytOnCollectNPCBeginTs$   % 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 SetCollectNPCRRSR{RtDef_PlayerKey_CollectNPCObjIDR‹tGetPrepareTimeROtGetPrivilegeValuetVIPPrivilege_CollTimeReduceRateRRpR1R)R(R\Rbt ntCollectiont pstCollectingtpstMissionCollectingRtSync_PrepareBegint GetLostHPPertDef_PlayerKey_CollectLostHPTickRCt AddHurtValueR?R~RetOnBeginCollect(RRRýRJR    t prepareTimetcollTimeReduceRatet prepareType((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRps  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¥RnR•R R{RRÑ(RRt curPlayerIDt curNPCObjIDtcurCollectPlayerIDtcurCollectPlayer((sfE:\SnxxServerCode\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_RRRR¥RnR•R{(RR R!((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRœs     cCst|jtjƒ}|dkr"dStj|ƒ}|rM|jtjdƒn|jtjdƒtj||ƒdS(Ni(    R_RRRR¯R{RRet OnExitCollect(RtcollectNPCObjIDR((sfE:\SnxxServerCode\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(NRs    ·ÇÌØ¶¨²É¼¯NPC...npcID=%sitResultRR$(RR„RR•RRtDoCollectingLostHPRÑRŒRtGetPlayerServerGroupIDR?tSendMsgToClientServerR1tCrossServerMsg_CollectNPCOKtDoGiveCollectNPCAwardRet OnCollectOKR$(RRRJRýt serverGroupIDRÅ((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytDoCollectNPCOKÀs  !
cCsM|dsdS|d}tjd|ƒ}|rIt|||dtƒndS(NR%R$RtcrossCollectOK(RR„R*RÑ(RtmsgDataRRý((sfE:\SnxxServerCode\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¥R¥R?R$R_RtDef_PlayerKey_ClientCustomSceneRSRRŠR‹R¬RetOnCustomSceneCollectOKRRR*(    RR±RJRR‚RRRšRý((sfE:\SnxxServerCode\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•RR R÷RøRR0RRRRRtSyncCollNPCTimeRûtGetCollectAppointAwardtGetCollectResetTypetDef_PDict_FairyDomainVisitCntR‘R“t Def_PDict_CollNpcIDCollTimeTotalR2tGetAlchemyDiffLVR.t GetWeightItemListByAlchemyDiffLVtGetResultByWeightListR0RARbR4R2tGetNotifyCollectResultRŸttagMCCollectAwardItemInfot CollectNPCIDttagMCCollectAwardItemtItemIDR³t IsAuctionItemt AwardItemListR8R¦R§tGameLogic_CrossGrasslandtRecordGrasslandAwardRSR5R6R1tSuccType_CollectRÎRÏtDef_GarbageTask_CrossCollecttDecCustomSceneNPCCounttDoCheckUpdateGrasslandEnd(RRRýt
collectCntR.tisSweept    isMaxTimeRþRt canCollectCntt curCollTimet updCollTimet awardItemListtcollectAwardCfgtcollectAppointAwardCfgtfairyDomainVisitCnttgrasslandCollectAppointCfgt collTotalTimet alchemyDiffLVtgiveItemWeightListt giveItemInfoRlR[RhRit    awardPackt    awardItem((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR*sŽ     
   &  !&                   cCsdS(N((RR^taddMoneyt    addZhenQitsyncItemInfoListt collectNPCID((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytSyncCollectionItemInfo^sc 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“RRRRRŸttagMCNPCIDCollectionCntR=R$t CollectionCntttagMCNPCIDCollectionCntInfotNPCCollCntListR8t
CollNPCCntR¦R§( RRÆt    isSyncAllt
ipyDataMgrRR«tsyncListRt    collCountt collCntInfot npcIDCollInfo((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR3as:      
         
    cCs·t|ƒtjddiƒ}xG|jƒD]9}|jtj|ƒr,tj|tj|dƒq,q,WxGt    dƒD]9}|jtj
|ƒrvtj|tj
|dƒqvqvWdS(NRiii( tCollNPCTimeOnDayRRŒRŽRRRÖRRR R(RR¯R[Ræ((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt PlayerOnDay†s
!!cCst|dgƒdS(Ni(tDoResetCollectNPCTimeByType(R((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRl’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`RR5R÷RRRRRR“R3(Rt resetTypeListtresetNPCIDListRgRR«R((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRn—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(RRtR•RæR t GetNPCCountt GetNPCByIndexR‹RR“R9RkR#R$RjRQRbRRtIsAliveR]RR‰(tqueryNPCIDListRJt npcInfoDicttgameNPCManagert findNPCIDListRRtcurIDRBRtcurHPR„R…RÔtrefreshRemaindSecondt refreshTimetpassTick((sfE:\SnxxServerCode\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(RŸttagMCNPCInfoListR=tMapIDt    PlayerCntt NPCInfoListRlt tagMCNPCInfoR®R$tNPCHPRIR¡R¢tIsActivet RefreshSecondR“R8t
NPCInfoCntR¦R§(RRt    playerCntRut npcInfoPackRxtnpcInfoRBRyRÔR„R…RRz((sfE:\SnxxServerCode\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(RRtR•RæR’RpR*tGetNPCCountByGWIndextGetNPCByIndexByGWIndexR‹RRQRbRRRsR‘RqRr(    RtRJRõt
npcCntDictRvRRRxRB((sfE:\SnxxServerCode\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(RŸttagMCNPCCntListR=RRRlttagMCNPCCntInfoR$tCntR“R8R†R¦R§(RRRRˆRætnpcCntR‰((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytSyncNPCCntInfo/s 
         
        c Csètjddƒ}||kr"dStjddiƒ}tjddƒ}tjddƒ}    t}
d} ||    kr‹t}
|    j|ƒ} n¼||kr³t}
|j|ƒd} n”|\} }}}} |rÔdnd}|d    |d
|} tj|| ƒ}|rG|\}}}||krG||krG||krGt}
qGn|
sQdS|jƒ}|jƒ}t    j
|ƒ}t ||||||| | ||j ƒg
ƒ}tj ƒjdddd |t|ƒƒtjd ||ƒdS( NtDropRecordBossIDitDropRecordEquipmenttDropRecordValuetDropRecordNormalRîi'iièidtBossDropGoodItems$·¢ËÍGameServer¼Ç¼ʰȡµôÂäºÃÎïÆ·: %s(RRŒR RÑRRR+R‹RrRR'RæRR¥R¦R8R•(RRRšRR[R¢t recBossIDListtrecDropEquipInfoDicttrecSpecialItemIDListt recItemIDListt
needRecordt itemUserDatat weightValuet
equipPlacet itemClassLVt    itemColorRêRïtrecordConditiont needClassLVt needItemColort needItemSuiteR‚t
playerNameR,t dropEquipMsg((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR™@s>   $   0(cCsdS(N((RR±RJ((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytOnBuyCollectionCntrscCs'tjƒj|ƒ}|j}tjddiƒj|ƒ}|sFdStj||ƒ}|j    t
j |dƒ}|j ƒ}||kr§tj d||f|ƒdStj||ƒ\}    }
|    |
krãtj d|    |ƒdStjddiƒj|ƒ} | sutjddiƒjt|ƒgƒ} | sItj d|ƒdS|t| ƒkrh| d    } qu| |} n| sdStjdd
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¥R¥t KillBossMarkRRŒR‘RORRRtDef_PDict_Boss_KillCntBuyCntR?R•R tGetCanKillBossCntRæR8RbtTYPE_Price_Gold_MoneytDef_Cost_Reason_SonKeyRtPayMoneytDef_Cost_BuyKillBossCntRRtCrossPlayerDatatSendMergePlayerDataNow(RR±RJRt killBossMarktbuyTimesVIPPriIDt    canBuyCntt    hasBuyCntR‚t
canKillCntt dayTimesLimittcostGoldt costGoldListt    moneyTypetinfoDicttisOK((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytOnBuyKillBossCnt}sF       '  * cCss|j}|j}tjƒjtj|ƒ}|s8dStjƒjtj|dƒtjd|||fƒdS(Nis,ClientNPCShowEnd npcID=%s,endType=%s,tick=%s(    R$tEndTypeRRJRQRRERÓR•(RR±RJRtendTypeRI((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt OnNPCShowEnd²s        cCsZtjddƒ}tjƒjtjƒd}||krVtjddƒ}||kStS(Nt    BossShuntii(    RRÇRRNROR1tDef_Notify_WorldKey_ServerDayRŒR (RtbossShuntMaxServerDayt openServerDaytbossShuntMapIDList((sfE:\SnxxServerCode\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‘R:R?tGameServer_WorldBossShuntInfo(RRRšRRJRätshuntPlayerDict((sfE:\SnxxServerCode\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RÉR‘RæRR¥R¦R8R•(RRšRäRËtmsgStr((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRÊÎs  (cCsÓ|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=%sRR$t AttackCounttMaxCount(RR•RRRtDef_PDict_NPCAttackCountRŒR'R?R(R1tCrossServerMsg_NPCAttackCounttSyncNPCAttackCountRBRG(RRt attackCountR\R,RÅ((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytUpdateNPCAttackCountÖs (cCs5|d}|d}|d}t||||ƒdS(NR$RÏRÐ(RÕ(RR/RRÔR\((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRÒçs
 
 
 
cCs‘|s
dStjƒ}xR|D]J}|jtj|ƒ}tjƒ}||_||_|jj    |ƒqWt
|jƒ|_ t j ||ƒdS(N(RŸttagMCNPCAttackCountInfoRRRÑttagMCNPCAttackCountR$RÏtNPCAttackCountListR“R8R³R¦R§(RRÆt
clientPackRRÔt atkCountObj((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRÓïs           cCst||ƒdS(N(t__OnAttackedDropItem(tatkObjRRYRJ((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt OnNPCAttackeds 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 TreasureNPCiRq(!RCtGetAttackPlayerRRRtGetAttackCountDropWeightInfotGetAttackDropWeightListtGetAttackDropWeightListExtGetDropCountExR8RRRRÑRÕR.R9RR:tGetNotDropNotifyRRùR“R*RŠR9RBRCR#R$R|t DoMapDropItemR (RÜRt attackPlayerRRR«tattackCountDropWeightInfotattackDropWeightListtattackDropWeightListExt dropCountExRTtmainItemWeightListR\RÔt mainItemInfot notDropNotifyRt weightListExRmR€RRoRp((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRÛ    sd            (ºRbRRR¼RRR?R0REt ChNetSendPackR
RCR0R.ReR±RRRR1R|RŸR§R¦RâRR5R RORORRÜRR!RÙRÌR$RBRÎR½R,R4R²R'R(RQR%RÍRÜR+R.R1RLRRRRt
PlayerTeamRÞROR9R×RßR•R˜RYRaR£R RRHR R³R´RµR¶tNPCAttr_DynNPCLVMaptNPCAttr_DynPCCoefficientMapRR R$R&R)R+R,R-R4R6R8R:R<R>RARCRER RˆRtR§RgRuRÑR:R9RÁR¬RR+R RRÂRR»RÆR!R¢RÃRRRËR%RR
RRRRR"R/R8R@RNRPRTRZReRsR‘RžR­R²R¹R¶RÈR°R÷RÒRWRƒRìR‘R'RóRõRÿRøR RR RR$R-R)R2R*R]R3RmRlRnR}RŠRŽR“R™R©R¿RÂRÈRÌRÊRÕRÒRÓRÝRÛ(((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt<module>s|                                                                     
                                                                      w        |    Ÿ*[        µÿV                     $            Å     :     /        +             
                !    !    +    >    ]             -!< 2                8        I            Xÿÿÿÿÿÿÿÿÿÿÿÿg                                                               \  %              /     .     2         5