cehua_lgq
2018-10-25 dba71efb14fd175d39e7545270eb1a67163e6f18
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
8Ð[c
@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,e-Z.e/dƒ\Z0Z1Z2Z3Z4Z5d„Z6d„Z7d„Z8d„Z9d„Z:d„Z;d    „Z<d
„Z=d „Z>d „Z?d „Z@d„ZAd„ZBd„ZCd„ZDeEd„ZFdde-d„ZGe-e-eEgdgd„ZHdZId„ZJd„ZKge-eLeLd„ZMd„ZNd„ZOd„ZPd„ZQd„ZRe-d „ZSd!„ZTd"„ZUd#„ZVd$„ZWd%„ZXd&„ZYd'„ZZd(„Z[d)„Z\d*„Z]d+„Z^d,„Z_d-„Z`d.„Zad/„Zbd0„Zcd1„Zdd2„ZeeEeLd3„ZfeLd4„Zgdddd5„Zhd6„Zid7„ZjeLd8„Zkd9fd:„ƒYZld;„Zmd<„Znd=„Zod>„Zpd?Zqe/eqƒ\
ZrZsZtZuZvZwZxZyZzZ{d@„Z|dA„Z}dB„Z~dC„ZdD„Z€dE„ZdF„Z‚eEde-eEdG„ZƒdH„Z„ddI„Z…dJ„Z†ggdK„Z‡gdL„ZˆdM„Z‰dN„ZŠdO„Z‹dP„ZŒgdQ„ZdR„ZŽdS„ZdT„ZdU„Z‘dV„Z’dW„Z“dS(XiÿÿÿÿNicCs‚tjtd|jƒdfƒ}|dkrG|jƒjtjƒn
||ƒ|j    t
ƒ|j tj ƒ|j tjƒdS(Ns AIType_%d.%stDoInit(t    GameWorldt GetExecFunctNPCAIt    GetAITypetNonet GetNPCAngrytInittChConfigtDef_Default_NPC_Angry_CounttSetIsNeedProcesstFalset SetSuperHittDef_SuperHitPercenttSetTickTypeCounttTYPE_NPC_Tick_Count(tcurNPCtcallFunc((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytInitNPCUs" 
 cCs2t|dƒr(t|jƒ|jƒƒS|jƒS(NtGetCurLV(thasattrtmaxRtGetLV(R((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGetNPCLVfscCs
|jƒS(N(t
GetMAtkMin(R((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt
GetRealmLVlscCs |j|ƒS(N(t
SetMAtkMin(RtrealmLV((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt
SetRealmLVmscCs
|jƒS(N(t
GetWindDef(R((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGetIsLVSuppressnscCs
|jƒS(N(t GetThunderDef(R((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGetSuppressFightPoweroscCs |j|ƒS(N(t SetThunderDef(Rtvalue((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytSetSuppressFightPowerpscCs
|jƒS(N(t
GetFireDef(R((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGetCommendFightPowerqscCs
|jƒS(N(t GetThunderAtk(R((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGetDropOwnerTyperscCs
|jƒS(N(t
GetCountry(R((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt
GetFactionsscCs
|jƒS(N(t GetPoisionAtk(R((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGetSkillAtkRatetscCs
|jƒS(N(t
GetFireAtk(R((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt GetFinalHurtuscCs |j|ƒS(N(t
SetFireAtk(Rthurt((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt SetFinalHurtvscCs
|jƒS(N(t
GetWindAtk(R((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGetSkillEnhancewscCs
|jƒS(N(t GetPoisionDef(R((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt GetNPCSeriesxscCs#|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ƒ}nB|dkrú|j t jƒ}n!|dkr|j t jƒ}n|jƒr?t||jƒƒ}n|d krm| rmtjd||fƒdStj||ƒ}    d    |    kr˜|    d    }nt||||ƒ}
|
j|    ƒ|
sÄdS|rï|jƒ|krï|j|tƒntj|ƒ} tj |ƒ} x—|
j!ƒD]‰\} }t"|d
| ƒs[| d krt#||ƒqqn| d krztj$||ƒqt%|t j&ƒ}t'|d
| ƒ|ƒqWtj|ƒ}| |kr|rÛtj(||ƒq|rt)|| | ƒ}tj(||ƒ|j*ƒ|j+ƒqndS(s½NPCÊôÐÔÔöÇ¿, NPCÊôÐԳɳ¤ÓÉÁ½¸öÒòËØ¾ö¶¨
    1.NPC³É³¤µÈ¼¶£¬³É³¤µÈ¼¶¾ö¶¨³É³¤ÊôÐÔ£¬Óë³É³¤±í½áºÏʹÓÃ
            ¿ÉÉèÖõØÍ¼NPCµÈ¼¶¶¯Ì¬³É³¤£¬µ«ÊÇÒѾ­Ë¢Ð³öÀ´µÄNPCµÈ¼¶²»±ä£¬¶¯Ì¬µÈ¼¶±ä¸üºóˢеÄNPCµÈ¼¶²Å»áʹÓÃ×îеȼ¶
            
    2.Íæ¼ÒÈËÊýÒòËØ£¬¾ö¶¨NPCÊôÐԵĶîÍâ³É³¤ÏµÊý£¬¿Éµ¥¶ÀʹÓ㬻òÕߺÍ1Ò»ÆðʹÓÃ
            ¿ÉÉèÖÃÂíÉÏË¢ÐÂNPCÊôÐÔ
            ³ýѪÁ¿Í⣬ÆäËûÊôÐÔ»á¸ù¾Ý¶¯Ì¬ÒòËØÖ±½Ó±ä¸ü
            ÑªÁ¿»á¸ù¾ÝѪÁ¿°Ù·Ö±È¶¯Ì¬±ä¸üÖÁÏàÓ¦µÄ°Ù·Ö±È
    t NPCStrengthenNisCNPCÅäÖÃÁ˰´Íæ¼ÒÈËÊý³É³¤ÀàÐÍ£¬µ«ÊÇÎÞ·¨»ñÈ¡µ½¶ÔÓ¦µÄÍæ¼ÒÈËÊý£¡npcID=%siiisSNPCÅäÖÃÁ˳ɳ¤µÈ¼¶ÀàÐÍ£¬µ«ÊÇÎÞ·¨»ñÈ¡µ½¶ÔÓ¦µÄ³É³¤µÈ¼¶Öµ£¡npcID=%s,lvStrengthenType=%stLVsSet%st
FightPowertMaxHP(ii(,tGetNPCIDt IpyGameDataPYtGetIpyGameDataNotLogRt    GetGameFBtGetIsStrengthenByPlayerCountt FamilyRobBosstIsHorsePetRobBosst GetGameWorldtGetGameWorldDictByKeyt ShareDefinet.Def_Notify_WorldKey_HorsePetRobBossPlayerCounttGetGameFBDictByKeyRtDef_FB_NPCStrengthenPlayerCnttErrLogtGetLVStrengthenTypet"Def_Notify_WorldKey_WorldAverageLvtDef_FB_NPCStrengthenMaxLVtDef_FB_NPCStrengthenAverageLVtGetCmpNPCBaseLVRRtFBLogictGetFBNPCStrengthenAttrtGetNPCStrengthenAttrDicttupdateRtSetCurLVR tGameObjtGetMaxHPtGetHPtitemsRR#tSetMaxHPtmintDef_UpperLimit_DWordtgetattrtSetHPtintt Notify_HPExtNotify_MaxHPEx(RtisReborntisDyntnpcIDtstrengthenIpyDatat strengthenLVtstrengthenPlayerCnttgameFBtlvStrengthenTypet npcFBAttrDicttattrDicttbefMaxHPtbefHPtattrKeytstrengthenValuetaftMaxHPtaftHP((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytDoNPCAttrStrengthenzsp
 
ic@Csë| r| riStjƒj|ƒ}|s1iStjdƒ}|sJiSi}|t}|t}|t}    |t}
|j    ƒt
j |j ƒ} |r]|s¶t jd|ƒ}n|sÀiStj|ƒ} | 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/ƒ}+|j0ƒ},|j1ƒ}-|j2ƒ}.|j3ƒ}/|j4ƒ}0|j5ƒ}1t6t7j8d|dƒƒ}2t6t7j8d|dƒƒ}3t6t7j8d|dƒƒ}4xM|D]E\}5}6t9t6t7j8d    |5|6ƒƒƒ}7|7t:ƒ|5<|7||5<qðW|1r]t9|%|1d
ƒ|d <q]n|rçtj;ƒj<ƒ}8t=j>|8ƒ}9d |8}:|    j?|8iƒ};|; rÊ|9|    krÊ|    |9};d |9}:n||
krí|
|};d |}:nx÷|;j@ƒD]æ\}5}<|5|kr||5}=nF|5dkr4| }=n1d|5}>tA||>ƒsSqúntB||>ƒƒ}=tC|<tDƒrŒtjE|<|dƒ}?n@tC|<tFƒrÆd|:|5f}:t6t7j8|:|<ƒƒ}?nd}?t9|=|?ƒ||5<qúWn|S(NtNPCAttrStrengthenR5tNPCParam_AtkReplyCoefficienttAtkReplyCoefficienttNPCParam_MonterHurtt
MonterHurttNPCParam_LostHPPerSecondtLostHPPerSecondsNPCStrengthen_%sgˆÃ@R7sMapCoefficient_%ssNPCCoefficient_%sR8sGet%sis%s_%s(GRt GetGameDatatFindNPCDataByIDt ReadChConfigtGetEvalChConfigtNPCAttr_ParamDicttNPCAttr_AttrStrengthenListtNPCAttr_PlayerCntCoefficienttNPCAttr_NPCPlayerCntCoefficienttGetHPExRBtDef_PerPointValueRSR:R;t PlayerControltGetPlayerLVIpyDataR+R-t
GetReMaxHPtGetReAtktGetReDeftGetReHitt    GetReMisst GetReAtkSpeedtGetReSkillAtkRatetGetReDamagePertGetReDamReducetGetReIgnoreDefRatetGetReLuckyHitRatet GetReLuckyHittGetReBleedDamaget GetReIceAtkt GetReIceDeft GetRePetAtktGetRePetSkillAtkRatetGetRePetDamPertGetReFinalHurttGetReFinalHurtReducetGetRePotionReplyt GetRePotionCDtGetReFightPowert
GetHitTimetGetDefCoefficienttGetAtkCoefficienttGetAdjustCoefficienttGetAtkIntervalt
GetHitRatet GetMissRatet GetMonterNumtGetIceAtkCoefficienttGetIceDefCoefficienttGetMaxEnduranceTimetGetFightPowerCoefficienttevaltFormulaControltGetCompileFormulaRZtlocalstGetMaptGetMapIDtFBCommontGetRecordMapIDtgetRTRRXt
isinstancetdicttGetDictValueByRangeKeytstr(@R_RaRbR`tnpcDatatattrStrengthenInfoRft    paramDicttattrStrengthenListtplayerCntCoefficienttnpcIDPlayerCntCoefficientt    baseMaxHPtplayerCurLVIpyDatat SkillAtkRatet    FinalHurttReMaxHPtReAtktReDeftReHittReMisst
ReAtkSpeedtReSkillAtkRatet ReDamagePert ReDamReducetReIgnoreDefRatetReLuckyHitRatet
ReLuckyHitt ReBleedDamagetReIceAtktReIceDeftRePetAtktRePetSkillAtkRatet RePetDamPert ReFinalHurttReFinalHurtReducet RePotionReplyt
RePotionCDt ReFightPowertHitTimetDefCoefficienttAtkCoefficienttAdjustCoefficientt AtkIntervaltHitRatetMissRatet    MonterNumtIceAtkCoefficienttIceDefCoefficienttMaxEnduranceTimetFightPowerCoefficientRpRrRtRitstrengthenFormatRjtmapIDt    dataMapIDt
formulaKeytplayerCntAttrCoefficienttcoefficientDictt    attrValuet attrFuncNamet coefficient((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRNÖsÂ
 
 
 
                                      " 
 
 
        
ic    9 Csh|stj|ƒ}nd}    d}
d} i} i} |dkrÕgg}}tjddƒ}tjddƒ}tjddƒ}tjdƒ}i}x8|jƒD]'\}}x|D]}|||<qºWq§Wnxk|jƒD]]\}    }t||    ƒ}t||ttj    ƒƒ}||}|
||7}
x
t
d|dƒD]õ}|dk}t |||    d|ƒ}|s|qFn|\}} }!}"| |!|"7} xœ|D]”}|dkrt j ƒj|ƒ}#|#sÖq£n|#jƒ}$|j|ƒ}||krºtj|#ƒrD|$|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|ƒqn| j|dƒd| |<| j|dƒ| |<q£WqFWqâWx?|D]7\}}%}&| j|dƒ|%|| |<|&| |<qJWd}'g}(g})xD| jƒD]6\}}%t j ƒj|ƒ}#|#sÑq¤n| j|dƒ}&tj|#ƒrWxÀt
|%ƒD]Q}*tj|d |&ƒ}+|+rÿ|'d7}'|(j|+ƒ|)jtj|+ƒƒqÿqÿWn^|'ttj|%t|#jƒƒƒƒ7}'|(j||%|&gƒ|)jtj||%|&gƒƒ|s¤tj|tj|%|gƒq¤q¤W|rø|\},}-}.d}/|j ƒ}0t j!ƒ}1xGtj"D]Ö\}2}3|,|2}4|-|3}5|1j#|4|5ƒsSqn|/t$|(ƒdkrmPn|(|/}+|/d7}/t%|+t&ƒr·|+\}}%}&tj||%|&ƒ}+n|+sÃqnt'j(|4|5|+d tj)|0gd |    d|.ƒqWnc|s|'tj*|t+j,|'ƒkr—g}6xM|(D]E}7t%|7t&ƒrN|6j|7ƒq)|6jtj-|7ƒƒ|7j.ƒq)Wtj/||j ƒg|6d| ƒnÄtj0t1i|    d6g}8xj|(D]b}7t%|7t&ƒr|7\}}%}&tj2|||%|&t+j,gd|8ƒq·tj3||7d|8ƒq·W|
r<tj|ƒj4|
ƒn| r[tj5|t+j6| ƒ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, isBind], ...]
    @param prizeMultiple: ½±Àø±¶Öµ, ¶ÔËùÓн±ÀøÓÐЧ£¬µÈÓÚ»÷ɱ¶à´ÎNPC£¬¶à±¶¸½¼ÓÎïÆ·
    iitSealDemonDoubleDropiitJobItemDropSetstisKillCountDropEquipExs4    ¶à±¶½±Àø²»ÄܸøµÄÎïÆ·²¿Î»: itemID=%s,itemPlace=%ss4    ¶à±¶½±Àø²»ÄܸøµÄÎïÆ·ID¼¯ºÏ: itemID=%s,itemKey=%ss%    ¶à±¶½±Àø²»ÄܸøµÄÎïÆ·ID: itemID=%stisBindt    ownerInfot    dropNPCIDt isOnlySelfSeetsilvertNPCIDteventN(7RtGetPlayerExpRateR:tGetFuncEvalCfgRTt    GetNPCExpRZtfloatRtDef_MaxRateValuetxrangetGetNPCDropInfoRRutGetItemByTypeIDt GetEquipPlaceR¬t
ItemCommont
GetIsEquiptDebugLogRtappendt ItemControlertGetOutPutItemObjt GetJsonItemtmathtceilt GetPackCountt PlayerSuccesstDoAddSuccessProgressRBtSuccType_PickUpItemt GetPlayerIDR¨tDef_DropItemAreaMatrixtCanMovetlenR­tlisttChItemtAddMapDropItemtDef_NPCHurtTypePlayertGetItemPackSpacet IPY_GameWorldtrptItemtGetMailItemDicttCleart SendMailByKeytItemGive_NPCDropR tGivePlayerItemtDoLogic_PutItemInPacktAddExpt    GiveMoneytTYPE_Price_Silver_Money(9t    curPlayerRßt npcCountDicttexp_ratet mailTypeKeytisMailt extraItemListt prizeMultipletdropItemMapInfoR_ttotalExpt
totalMoneyt itemCountDictt itemBindDictthadDropItemKeyListthadDropItemPlaceListtmPrizeItemIDListtmPrizePlaceListtmPrizeItemKeyListt itemKeyDictt itemIDKeyDicttitemKeyt
itemIDListtitemIDtcounttbaseExptaddExpt
totalCounttdCountRétdropInfot
dropIDListtdropIDBindDictt dropMoneyCntt
moneyValuetitemDatat    itemPlacet    itemCountRêt    needSpacet prizeItemListt jsonItemListt_tcurItemtdropPosXtdropPosYRítindextplayerIDtgameMaptposXtposYtresultXtresultYt mailItemListt    prizeItemRð((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGiveKillNPCDropPrizeQsì    
                  "
  )#  
 
 
 
!$ % 
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( R:tGetIpyGameDataListNotLogRRüRR@RARBRHR
t GetMaxWorldLV(R_t ipyDataListtipyDropt
maxWorldLVt
curWorldLVtipyData((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGetNPCDropIpyDatas,
    c9CsÜt|ƒ}|sdS|jƒ}|jƒ}|r^||kr^tjd|||fƒdS|jƒ}tjƒj|ƒ}|s‰dSg}    |jƒrª|j    ƒgnt
j ddƒ}
t j |ƒ} t j|ƒ} |jƒ} | tddƒ@sd} n| tddƒ@sd} nd}tj}tjd|||
| | | f|ƒg}|jƒ}|r|jƒrt||| |ƒ}||9}|jƒ}| rØtj|| ƒ}tjd|| f|ƒn|}d}|d    d}tjd
||f|ƒxÚ|D]Ò}|\}}||}|s9Pn|}|sKqn|\}}}||}||}||}tj||ƒr—|d7}ntjd |||||||f|ƒ|sÌqn|j||||gƒqWtjd ||f|ƒnt
jd dƒ} i}!|jƒ}"xˆ|D]€\}}}}|| krltjd||fƒq1ni}#| |}$||"krØ|"|}%xit|ƒD]2}&tj|%dƒ}'|#j|'dƒd|#|'<qŸWn&|tjkrô||#d<n
||#d<x°|#j ƒD]¢\}'}(t!||||$|'|
ƒ})|)s>q nxlt|(ƒD]^}&t"j#|)ƒ}*|    j|*ƒ||g|!|*<tjd||*|||'||
|)f|ƒqKWq Wq1W|j$ƒ}+|j%ƒ},xÅ|+j ƒD]·\}-}.|.sòqÚn|,j|-dƒ}/t|/||ƒ}/|/|9}/|.|/}||}||}tj|t&ƒr]|d7}n|    |-g|7}    tjd|-|.|/||f|ƒqÚWt'|    t
jddƒƒ}    tj(|ƒ}0t)||0|    |!ƒ}1|j*ƒ}2|j+ƒ}3|3|2|}4|4tj,}5tj|4tj,tj,ƒr0|5d7}5nd}6|5rrt-||ƒ|5}6tjd|3|4|5|6f|ƒni}7x(|    D] }8|7j|8dƒd|7|8<qW|7rÏtjd|||7|1|6f|ƒn|7|1|6fS(sTÍÑ»ú¹Òɱ¹ÖµôÂäרÓú¯Êý
    Ö»Ëã: 1.±ýͼװ±¸µôÂä + 2.Ö¸¶¨ÎïÆ·IDµôÂä + 3.½ð±ÒµôÂä
    NsE³¬¹ý×î´ó¿ÉµôÂäµÈ¼¶£¬²»µôÂäÎïÆ·£¡npcID=%s,playerLV(%s) > maxDropLV(%s)tOpenJobiiisvÍÑ»ú¹Òɱ¹ÖµôÂä: npcID=%s,killCount=%s,itemJobList=%s,dropRatePlusValue=%s,equipDropRatePlus=%s,equipDropDoCountPlus=%ss)    ×°±¸ÅäÖñýͼ: %s,equipDropRatePlus=%siÿÿÿÿs    ×°±¸µôÂä±ýͼ: %s,maxRate=%ss\    ×°±¸µôÂÊ: curRate=%s,totalRate=%s,rateEx=%s,dropCount=%s,classLV=%s,color=%s,placeKey=%ss9    ×°±¸µôÂä½á¹û: killCount=%s,[½×,ÑÕÉ«,²¿Î»¼¯ºÏ,¼þÊý]=%stEquipDropPartSetss&²¿Î»¼¯ºÏkey²»´æÔÚ!npcID=%s,placeKey=%ssj    µôÂä×°±¸: npcID=%s,itemID=%s,classLV=%s,color=%s,star=%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=%ssU    ×îÖÕµôÂä: npcID=%s,killCount=%s,dropIDCountDict=%s,dropIDBindDict=%s,dropMoney=%s(.RWRt GetMaxDropLVRRüRRuRvtGetIsDropJobSelftGetJobR:RòRtGetDropEquipPertGetDropEquipDoCounttGetCanDropRatePlustpowRRõtGetPieRateDoCnttGetPieRateDropt__GetNPCDropDoCountChangetGetPlusPieListt    CanHappenRýt
GetFuncCfgtGetEquipStarInfoRFRötGetResultByRandomListR¬tDef_Quality_OrangeRTt__GetEquipIDListtrandomtchoicetGetItemIDDropRatetGetItemIDMaxDropCounttDef_NPCMaxDropRatet__RemoveMutexDropIDt
IsGameBosst__GetNPCDropItemBindInfotGetDropMoneyDoCnttGetDropMoneyRatetDef_NPCMapDropRatet__GetDropMoneyValue(9t
dropPlayerRßR_t    killCountRStplayerLVt    maxDropLVRFR±R7t itemJobListtequipDropRatePlustequipDropDoCountPlustdropRatePlusValuet
doCountAddt doCountRatetdropEquipInfoListt pieRateDoCnttpieRateDropListt dropRateListtpreRatetmaxRatetrateInfotratet    equipInfotcurRatetclassLVtcolortplaceKeyt    totalRatet    dropCounttrateExt    placeDicttdropEquipIDDicttcolorStarRateDictt starCountDictt    placeListtcolorStarRateListRAtstartcurStarDropCounttrandEquipIDListt
randItemIDtitemIDDropRateDicttitemIDDropMaxCntDictR0tdropRatetdoCntt
isGameBossR8tdropMoneyDoCntt dropMoneyRatetmoneyTotalRateR9t    dropMoneytdropIDCountDicttdropID((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGetNPCDropInfoTJGsô    -                  
 
 
 
 
        
 
! 
     /  
 
 
 
                  c[Cs- |st|ƒ}|sdSn|s1|g}n|jƒ}|jƒ}|jƒ}    |    r…||    kr…tjd|||    fƒdStjƒj|ƒ}
|
s¸tjd||ƒdSg} i} d\} }g}|j    ƒ}|r@|r@|\}}}}t
||||ƒ}x(|D]}| j |ƒ|| |<qWn|j ƒr[|j ƒgntjddƒ}tjƒ}|jtjƒ}|jtjƒ}|s¯tj}nd}d}d}xs|D]k}|jtj|ƒd}|sô|n t||ƒ}t|tj|ƒƒ}t|tj|ƒƒ}qÈW|jƒ}|tddƒ@s_d}n|tddƒ@s{d}ng} |jƒ}!|!rÂt |!|||ƒ}!| t!||!|ƒ7} n|j"ƒ}"|"rt |"|||ƒ}"| t#||"|ƒ7} ntj$ddƒ}#|j%ƒ|j&ƒ}$}%|o=|$p=|%}|rt|$rt||$dkrt|$\}&}'}(})}*nX|r¨|%r¨||%dkr¨|%\}&}'}(})}*n$dddgdf\}&}'}(})}*|&}+|)rûtj'|)dƒ},|)dd}-n d},d}-|*|#krgn|#|*}.d}/d}0t)}1gg}2}3x¿|D]·}|j*ƒj+t,j-ƒ}4|'rš|(rš|.ršxt.|4j/ƒƒD]}5|5|.kr¤qŒn|4j0|5ƒ}6|6j1ƒrÅqŒnt2j3|6ƒ}7|6j4ƒ}8|6j5ƒ}9t2j6|6ƒ}:|7|'krG|8|(krG|9|-krG|2j |8|7|9|:|5|j ƒgƒqŒ|7|'ksk|8|(ksk|9|-krŒ|3j |8|7|9|:|5|j ƒgƒqŒqŒWn|jtj|ƒd};|;|+krItj7|tj||;ƒtjd    ||;|+f|jƒƒqIqIW|2j8ƒ|3j8ƒ|rgtjd
|t9|2ƒ|2f|ƒtjd |t9|3ƒ|3f|ƒn|2ss|3r‹tj$d dƒ}<|<r×|2|37}2|2rˆ|2dd }/|2dd}0tjd|/|0f|ƒqˆq‹tj$d dƒ}=t9|2ƒ|=kr|2|37}2ntjd|=|ƒt:j;dt9|2ƒdƒ}>tjd|>|2f|ƒ|2|>d }/|2|>d}0tjd|/|0f|ƒn|rÃtjd|||&|'|(|,|-|/|0f    |ƒni}?|j<ƒ}@i}Atjddƒ}B||Bkr|B|}Atjƒjtj=ƒ}Cni}D|j>ƒ}ExN| D]F\}F}G}H|G|Ekr«|E|G}I|Dj?|Gdƒ}J|J|Ikrštjd|G|If|ƒq7n|Jd|D|G<n|(|Gkrd    |'rd    |,dkrd    |/rd    |1 rd    t@}1tA||'|(|.|,|0g|/ƒ}K|Ks        q7nt:jB|Kƒ}L| j |Lƒ|(|*g|?|L<tjd||L|'|(|/|,|0|Kf|ƒq7|H|#kr    tjd||Hfƒq7n|#|H}M|G|@krà    |@|G}N|ArË    tC|G|N|A|Cƒ}Nntj'|Ndƒ}On|GtjDkrø    d}Ond}OtA||F|G|M|O|ƒ}K|Ks%
q7nt:jB|Kƒ}L| j |Lƒ|G|Hg|?|L<tjd||L|F|G|O|H||Kf|ƒq7W|1 r+ |'r+ |(r+ |,dkr+ |/r+ tA||'|(|.|,|0g|/ƒ}K|Kr+ t:jB|Kƒ}L| j |Lƒ|(|*g|?|L<tjd||L|'|(|,|/|0|Kf|ƒq+ n| tE|||||ƒ7} tF| tj$ddƒƒ} tjG|
ƒ}PtH||P| |?ƒ} |rF tjddƒ}Q||Qkr |Q|}Rtjƒjtj=ƒ}C|Rj?|Cgƒ}Sg}Tx4|SD]\}U}V|T|Ug|V7}Tqë Wn |jIƒ}Tx(|TD]}W| j |Wƒd| |W<q" Wn| rl tjd|| | f|ƒn|jJƒ}X|jKƒ}Y|YtjLkrœ |X} n?d} x6t.|XƒD](}ZtjM|YtjLƒr¯ | d7} q¯ q¯ W| ró tN||ƒ}n| r |Pr tjd||jƒƒn| | | |fS(s»ñÈ¡NPCµôÂäÐÅÏ¢, »÷ɱ¼°É¨µ´Í¨Ó㬵÷Óøú¯Êý»ñµÃµôÂäÐÅÏ¢£¬È»ºóÔÙ¿´µôÂ䵨°åÉÏ»¹ÊÇÖ±½Ó·ÅÈë±³°ü
        @param dropPlayer: ÓÃÓÚÅжϵ÷ÓÃÏà¹ØÓõÄÍæ¼ÒʾÀý£¬¸ÃÍæ¼Ò²¢²»Ò»¶¨ÊÇ»÷ɱÕߣ¬Ö»Êǰ´Ò»¶¨¹æÔòÉ趨µÄµôÂäÅжÏÒÀ¾ÝµÄÍæ¼Ò
                            Èç¶ÓÎ飬ȡµÈ¼¶×î´óµÄÍæ¼Ò£¬¸ÃÍæ¼Ò²¢²»Ò»¶¨ÊÇ»÷ɱÕß
        @param mapID: µôÂäÎïÆ·ËùÊôµØÍ¼£¬×¢Òâ´ËµØÍ¼²¢²»Ò»¶¨Êǵ±Ç°µØÍ¼£¬Èçɨµ´Ê±ÐèʹÓÃÄ¿±ê¸±±¾µØÍ¼
        @param npcID: µôÂäÎïÆ·µÄNPCID
        @param ownerPlayerList: ÓйéÊôµÄÍæ¼ÒÁбí
        @param isSingle: ÊÇ·ñÖ»´¦Àíµ¥¶ÀÍæ¼ÒµôÂäÂß¼­£¬Ò»°ã¶¼Ä¬ÈÏTrue£¬Ä¿Ç°Ö»Óг¡¾°É±¹ÖµôÂäÐèÒª¿¼ÂÇÃþ¹ÖµÄÇé¿öϲÅΪFalse£¨Íâ²ãÌØÊâ´¦Àí£©
        @return: dropIDList, dropIDBindDict, dropMoneyCnt, moneyValue
                None-ûÓеôÂä
                ---------------
                dropIDList        -    µôÂäµÄÎïÆ·IDÁбí, Í¬¸öitemID¿ÉÄÜÔÚÁбíÖÐÓжà¸ö [itemID, itemID, ...]
                dropIDBindDict    -    µôÂäµÄÎïÆ·ID°ó¶¨ÐÅÏ¢ {itemID:ÊÇ·ñ°ó¶¨, ...}
                dropMoneyCnt      -    µôÂä½ð±ÒλÖÃÊý
                moneyValue        -    Ã¿¸öλÖõĽð±ÒÊýÁ¿
    NsE³¬¹ý×î´ó¿ÉµôÂäµÈ¼¶£¬²»µôÂäÎïÆ·£¡npcID=%s,playerLV(%s) > maxDropLV(%s)s&»ñÈ¡NPCµôÂäÅäÖôíÎó!±í²»´æÔÚ¸ÃNPCID=%siRXiiRYs9Íæ¼Ò»÷ɱ´ÎÊý: npcID=%s,killCount=%s,maxRecordKillCount=%ssM¶¼²»Âú×ãÄ¿±ê×°±¸µÄÓÅÏȼ¶ÐÅÏ¢: npcID=%s, ÊýÁ¿=%s, ÑÕÉ«,½×,ÐÇ,ÆÀ·Ö,²¿Î»,Ö°Òµ=%ssM²¿·ÖÂú×ãÄ¿±ê×°±¸µÄÓÅÏȼ¶ÐÅÏ¢: npcID=%s, ÊýÁ¿=%s, ÑÕÉ«,½×,ÐÇ,ÆÀ·Ö,²¿Î»,Ö°Òµ=%stDropEquipPlaceModeiþÿÿÿiÿÿÿÿs+µôÂäÄ¿±ê²¿Î»È¡×îÓŽâ: tagPlace=%s,tagJob=%ss1ÓÅÏÈËæ»ú¶¼²»Âú×ãÄ¿±ê×°±¸µÄ,randPlaceCountLimit=%ssAµôÂäÄ¿±ê²¿Î»Ëæ»ú, randPlaceIndex=%s, ÑÕÉ«,½×,ÐÇ,ÆÀ·Ö,²¿Î»,Ö°Òµ=%ss3µôÂäÄ¿±ê²¿Î»Ëæ»ú²»Âú×ãÌõ¼þµÄ: tagPlace=%s,tagJob=%ss¸½¼ÓµôÂäÖ¸¶¨Ä¿±ê×°±¸ÐÅÏ¢: npcID=%s,Íæ¼Ò×îÉٵĻ÷ɱ´ÎÊý=%s,Ä¿±ê»÷ɱÊý=%s,tagClassLV=%s,tagColor=%s,tagStar=%s,tagStarMin=%s,tagPlace=%s,tagJob=%stFBGradeEquipDropRates6Òѳ¬¹ý¸ÃÑÕɫװ±¸×î´óµôÂäÊý£¬²»µô£¡color=%s,maxCount=%ssrÌæ»»Ö¸¶¨ÑÕɫװ±¸: npcID=%s,itemID=%s,tagClassLV=%s,tagColor=%s,tagPlace=%s,tagStar=%s,tagJob=%s,randEquipIDList=%ss&²¿Î»¼¯ºÏkey²»´æÔÚ!npcID=%s,placeKey=%ssfµôÂä×°±¸: npcID=%s,itemID=%s,classLV=%s,color=%s,star=%s,placeKey=%s,itemJobList=%s,randEquipIDList=%ssrµôÂäÖ¸¶¨Ä¿±ê×°±¸: npcID=%s,itemID=%s,tagClassLV=%s,tagColor=%s,tagStar=%s,tagPlace=%s,tagJob=%s,randEquipIDList=%sRZis6×îÖÕµôÂäÎïÆ·: npcID=%s,dropIDList=%s,dropIDBindDict=%ssBossûÓеôÂäÎïÆ·,NPCID=%s(ii(ORWRRR[RRüRuRvRFtGetKillCountDroptGetKillCountDropItemListRýR\R]R:RòR<RDRtDef_FB_DropDoCountAddtDef_FB_DropDoCountRateRõtNomalDictGetPropertytDef_PDict_NPCKillCountRVRRR^R_R`RaRbRdt__GetNPCPieRateEquipDroptGetIndepRateDoCntt__GetNPCIndepRateEquipDropRgtGetKillCountDropEquipExtGetKillCountDropEquipEx2RiRR tGetItemManagertGetPackRtrptEquipRötGetCounttGetAttIsEmptyRútGetItemClassLVt GetItemColortGetItemQualitytGetEquipGearScoretNomalDictSetPropertytsortR
RltrandintRht Def_FB_GradetGetIndepRateMaxDropCountR¬tTrueRkRmt__GetFBGradeColorStarRateListRjt__GetAppointDropItemIDListRqRrRstGetPriItemIDDropRtRuRvRfRw([RxRßR_townerPlayerListRStisSingleRéRFRzR{R±R7R8R9R:tkillCountDropIDListtkillCountDropInfot needKillCounttisDropInItemPackRêtkillDropItemListt kDropItemIDR|RcR€RtdropEquipExKillCountR}R~t ownerPlayertownerKillCountRR‚RƒtindepRateDoCntR’tkillCountDropEquipExtkillCountDropEquipEx2t tagKillCountt
tagClassLVttagColorttagStarRateListt tagPlaceKeytmaxRecordKillCountttagStart
tagStarMint tagPlaceListttagPlacettagJobttagItemReplaceStatettagPlaceSortListttagPlaceSortList2t playerEquipt
equipIndextcurEquiptcurEquipClassLVt curEquipColort curEquipStartequipGSRytisOptimalPlacetrandPlaceCountLimittrandPlaceIndexR“R”tgradeColorStarRateDicttfbGradeColorStarRateDicttcurGradetcolorDropCntDicttcolorMaxDropCntDictRŒRRŽtmaxCountRRšR›R–R—R˜R tfbGradePriItemIDDropDicttgradePriItemIDDropDicttpriDropInfoListt priDropIDListt    priItemIDt priItemCountt    priDropIDR¡R¢RA((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR÷µs           -              $      $($/     !
 
#& 
      )  
 
 +!     & 
 
         '%!     ) 
           cCs„g}|df}xkt|ƒD]]\}}|\}}    |dkrL|}
n|||dd}
||    f} |    s}|
} nÄ| |krÜ|| } |dks±|t| ƒkr·dn | |d}t|
|dƒ} ne||kr;||} |dks|t| ƒkrdn | |d}t|
|dƒ} n|
} |s]|j| |    gƒq|j|dd| |    gƒqW|S(Niii'gˆÃ@iÿÿÿÿ(t    enumerateR
RZRý(RR—RîRðt newRateListtcommKeytiRˆR‰R˜tsrcRatetkeytnewRatet starRateListtstarRate((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRÅßs.             
2 
2#cCs—tj|ƒ}tjddƒ}tjddƒ}tjddƒ}tjddƒ}tjddƒ}tjddƒ}    tjd    dƒ}
|j|dƒ} |    j|gƒ} |
j|gƒ} i}xÇ|D]¿}||krèqÐn||kr||\}}||ko||k}n`|| kr4t}nK|| krIt}n6| dkr^| }n!|rs||k}n ||k}t|ƒ||<qÐW|S(
NtEquipDropBindingRuleiitBossDropBindingRuleitMonsterDropBindingRuletMapDropBindRuletMapDropItemNoBindtMapDropItemBind(    RªR«R:RgR¬RRÄR RZ(RßR R7R“tunBindEquipPlaceKeyListtdefaultMaxBindColortbossDropBindIDListtmonsterDropNoBindIDListtmapDropBindDicttmapDropItemNoBindDicttmapDropItemBindDicttmapDropItemIsBindtmapDropItemNoBindListtmapDropItemBindListR8t
dropItemIDRRŽRê((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRss:                   cCsO|tjkr/tdt||dƒƒ}n|rKtd||ƒ}n|S(NigˆÃ@(RRõRRZ(tdoCountRR€((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRd0s
 cCs¶x¯|D]§}t}x˜|D]}||kr2qn|sŠt}|j|ƒ}|dkrx(t|dƒD]}|j|ƒqjWqqnx||kr©|j|ƒqWqWqW|S(Ni(R RÄR1Rötremove(R7t mutexDropInfot mutexDropListtisMutextmutexIDt curDropIDCntRA((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRq8s    c0
Csg}|jƒ}tjddƒ}|jƒ}|jƒ}    |    r\x|    jƒD]\}
} |
|krmqOn||
} t| ƒ|kr©tjd||
|fƒqOn| t    } | t    } | }|j
|
dƒ}t |||ƒ}x9t |ƒD]+}tj | dt    ƒsqôn|d7}qôW| |d}x!t |ƒD]}|j|ƒq>WqOWn|jƒ}|r›x*|jƒD]\}
} |
|kr™q{n||
} t| ƒ|krÕtjd||
|fƒq{n|
|    krçq{n| t    } | t    } | }|j
|
dƒ}t |||ƒ}x9t |ƒD]+}tj | dt    ƒsSq2n|d7}q2Wx0t |ƒD]"}tj| ƒ}|j|ƒqnWq{Wn|jƒ}|jƒ}tjddƒ}tjddƒ}tjƒ}x}|jƒD]o\}} | sqðn||krqðn|j
|dƒ}||kr±ttjƒƒ}|jtj|ƒ}||d}|||}|dkrÃtjd    |||||fƒqðqÃnt |||ƒ}x™t |ƒD]‹}tj | dt    ƒsñqÐn|j|ƒ||krÐt||gƒ}tjƒjdddd|t|ƒƒtj|||ƒPqÐqÐWqðWxþ|jƒD]ð\}}|\} }!|| kršqpn|jtj |ƒ}"t!t"j#d
||!ƒƒ} tj | dt    ƒ}#|#r|j|ƒtj$||||"| ƒn|#rdn|"d}$t||$gƒ}tjƒjdddd |t|ƒƒqpWtj%dd ƒ}%||%krŒ|%|}&t&|jtj'|ƒdtj(ƒ}'tjd |'ƒt||'gƒ}tjƒjdddd|t|ƒƒ|'|&krŒ|&|'\}(})}*x•|)D]}|(r’tj)ƒj*|ƒ}+|+sPq#n|+j+ƒd},|,r’|,|jƒkr’tjd|ƒq#q’n|j|ƒtjd|ƒq#W|*r‰|(rVg}-x{|*D]s}.tj)ƒj*|.ƒ}+|+sôqÍn|+j+ƒd},|,r3|,|jƒkr3tjd|.ƒqÍn|-j|.ƒqÍWtj|-ƒ}/ntj|*ƒ}/|j|/ƒtjd|/ƒq‰qŒn|S(NRèis@Ö°ÒµÎïÆ·¼¯ºÏkeyûÓÐÅäÖöÔÓ¦Ö°ÒµID: npcID=%s,jobItemKey=%s,job=%sR‡t GlobalDropCDtNPCGlobalDropRatei<isT¸ÃÎïÆ·È«¾ÖµôÂäCDÖУ¬²»µôÂ䣡itemID=%s,cdTime=%s,curTime=%s,lastDrop=%s,remainTime=%ssKilledCntDropRate_%stGlobalDropRateis¸üÐÂÈ«·þ»÷ɱ´ÎÊý£º %stGlobalKillCountids1È«·þ»÷ɱ´ÎÊý±Øµô£¬·Ç±¾Ö°Òµ¿ÉÓ㬲»µôÂä! itemID=%ssÈ«·þ»÷ɱ´ÎÊý±ØµôÎïÆ·: itemID=%ss6È«·þ»÷ɱ´ÎÊý±ØµôËæ»ú£¬·Ç±¾Ö°Òµ¿ÉÓ㬲»µôÂä! rItemID=%ss'È«·þ»÷ɱ´ÎÊý±ØµôËæ»úÎïÆ·: randItemID=%s(,R]R:RgtGetItemKeyMaxDropCounttGetItemKeyDropRateJobRTR
RRFRpR¬RdRöRfRýtGetItemKeyDropRateRlRmRnRoR@RZttimeRARBt Def_Notify_WorldKey_LastDropTimeRüR°tGetPlayerManagertGameServer_QueryPlayerResulttDataRecordPacktDR_GlobalDropCDt$Def_Notify_WorldKey_DropNPCKilledCntR¤R¥R¦tDR_GlobalDropRateRòRVt"Def_Notify_WorldKey_NPCKilledCountRWRuRøt GetJobLimit(0RR_RSRR€tdropItemIDListtjobRètItemKeyMaxDropCountDicttItemKeyDropRateJobDictt
jobItemKeyRžt jobItemListt mustDropCountt canDropCountRŸRAt    jobItemIDtItemKeyDropRateDictt randJobItemIDRœRtglobalDropCDDicttglobalDropRateDicttgwR0tcurTimet lastDropTimetcdTimet
remainTimetmsgInfoR6t    npcIDListt
rateFormatt    killedCnttisDropt updKilledCnttglobalKillDropDicttkillCountDropDicttupdNPCKilledCountt
isJobLimitR/trandItemIDListR;titemJobtrandJobItemListtrItemIDR›((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRÆNs    
 
 
 
 
 
                (    , 
&(         c    Csd|||f}|tjkr2tj|}n/i}tjƒ}    xðtjjƒD]ß}
xÖ|
D]Î} |    j| ƒx¸t|    j    ƒƒD]¤} |    j
| ƒ} | j ƒs®q‡nt j | ƒ|krÉq‡n| jƒ|kráq‡n| jƒ|krùq‡n| jƒd}| jƒ}| jƒ|||f<q‡WqaWqTW|tj|<tjd||tjfƒg}x{|jƒD]m\}}|\}}|r¤||kr¤qtn||kr¶qtn|dkrÔ||krÔqtn|j|ƒqtW|stjd|||||||fƒn|S(Ns%s_%s_%sids-»º´æµôÂä×°±¸ID: classLV_color_star=%s, %s, %ssbÕÒ²»µ½¿ÉµôÂäµÄ×°±¸ID: npcID=%s,classLV=%s,color=%s,star=%s,placeList=%s,tagPlace=%s,itemJobList=%s(t
PyGameDatatg_filterEquipDictRRuRtDef_PlaceEquipTypetvaluestFilterItemByTypeRötGetFilterItemCountt GetFilterItemt GetCanNPCDropRúR»R¼R½R,Rùt GetItemTypeIDtLogRTRRýRF(R_RŒRR–R˜R|RßRtfilterItemIDDicttgameDatat itemTypeListtitemTypeRþR;RJR<R/t itemJobPlaceR0((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRkùsJ     "        cCspg}|jƒ}|s|ntj||ƒ}x9t|ƒD]+}tj|ƒ}|r=|j|ƒq=q=W|S(N(RcRReRöRiRý(RSRŸt equipDropPlusR‚R„R…RAR6((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR°,s cCsž|jƒ}|jƒ}i}tjddƒ}||kra||}tjƒjtjƒ}ng}x0t    |ƒD]"}    x|j
ƒD] \}
} | } |
d} | |kr|| }|dks×|t |ƒkrÝdn ||d}t | |dƒ} n|s| n| t | |dƒ} | t }| t } |}tj| dt ƒrb|d7}n|snq‡nx!t    |ƒD]}    |j|
ƒq{Wq‡WqtW|S(NR©iii'gˆÃ@R‡(R9tGetIndepRateDropR:RòRR<RDRRÂRöt    iteritemsR
RZRpRfRý(RSRŸR\R_t indepRateDicttgradeColorRateDicttfbGradeColorRateDictRðR‚RAR6R‰RžRt colorRateListt    colorRateR3t curDropCount((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR²:s6   
 
 
2$
 
 cCsøtj|ƒ}|dkr<tj|jƒ|jƒƒ}n|dkrLdS|}|dkrÓd}t|jƒ|ƒt    j
}t |||ƒ}tj |ƒ}|dkrÓt ||tt    j
ƒƒ}qÓn|dkrôtjddƒ}n|S(Niiÿÿièýiúÿ( RLtOnGetNPCDropMoneyRlRÁtGetDropMoneyMintGetDropMoneyMaxRRôtGetGoldFoundRateRBRõRZtOnGetOuterMoneyRate(RRSt    baseMoneyR:t    addRateExtaddRatetouterMoneyRate((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRwns  !   # c Cs |jtj|ƒ}|d}|dr.gS|d7}g}||kråd}x|D]y}tjƒj|ƒ}    |    stjd|ƒqWn|    jƒd}
|rÃ|
rÃ|
|jƒkrÃqWn|j    |ƒqWW|dd} n
|d} t
j |tj|| ƒ|S(Ni
isµôÂäÎïÆ·ID²»´æÔÚ, dropItemID=%sid( R®RtDef_PDict_NPCKillCountDropRRuRøRFR,R]RýRR¿( RR_RÌRÎt
dropRecordRyt jobDropInfoRHRR;RJt recordValue((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR«ˆs*
 
 
 
cCs>tjddƒ}|dkr"dS|||dkr:dSdS(Niii ièi(RlRÁ(tcurTicktlastActionTickR;((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytIsInActionTime²s  cCs|jƒtjkrtStS(N(tGetGameNPCObjTypeRt
gnotSummonRÄR (R((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt IsSummonNPCÁscCsIxBtd|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 cCs)|jƒ}|dkrdStj|ƒS(N(tGetOwnerRRt GetObjDetail(R{tcurSummonOwner((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGetSummonOwnerDetelÖs  cCs3t|ƒ}|stS|jƒtjkr/tStS(N(tGetNpcObjOwnerDetailR tGetGameObjTypeRt    gotPlayerRÄ(tnpcObjt ownerDetail((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGetNpcObjOwnerIsPlayeräs  cCsU|jƒ}d}|tjkr0t|ƒ}n!|tjkrQtj|ƒ}n|S(N(RuRRRvRtgnotPett
PetControlt GetPetOwner(R…t
npcObjTypeR†((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR‚õs cCs±|dkrdSt|dƒsN|jtjƒ}|rJtj|tjƒSdS|j    ƒ}|dkrjdStj|j
ƒ|ƒ}|dkr­|tjkr­|j ƒr­dS|S(NR~( RRt GetDictByKeyRt!Def_NPC_Dict_SummonMapNPCPlayerIDRtGetObjRR„R~tGetIDRº(t
curobjTypet    curSummontsummonPlayerIDR€tcurSummonOwnerDetel((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGetSummonNPCOwner    s   'c
CsÜtjƒ}|jƒ}|jƒ}d}x«|D]£}|j||d||dƒ}|seq1nxltd|jƒƒD]U}|j|ƒ}    tj    |    ƒdkr«q{n|    j
ƒt j krÆq{n|d7}q{Wq1W|S(Nii( RR¨tGetPosXtGetPosYt    GetPosObjRxt GetObjCountt GetObjByIndexRQRSRƒRR„(
RtmatrixRGtsrcPosXtsrcPosYtcurPlayerCounttcurPostmapObjRþ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(tGetInSightObjCountRxtGetInSightObjByIndexRt
GetVisibleR RƒRR„RºRQRSRRŽRRý(RtplayListt seeObjCountRþtseeObjt
seeObjTypet curTagPlayer((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGetInSightPlayerList_NPCKs(    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(R¢RxR£RR¤R RƒRR„RºRQRSRRýtGetTeamRRŽt    GetTeamID( RR{t    checkTeamR¥tseePlayerCountRþR§R¨tseeObjIDt curPlayTeamR©t
curTagTeam((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGetInSightPlayerList_SummonNPCvs@        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ÄRxR¢R£RRQRSR¤Rt    IsSameObjtGetDistR•R–RŽRRƒRVR9t AttackCommontCheckCanAttackTagt
BaseAttacktGetTagRelationRtType_Relation_EnemyR ( Rt    checkDistt
checkCountttickR1RóRþR§ttagDistt seeObjDetailtrelation((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt&CheckCanAttackTagLimitCountInSight_NPC´s<  0  
cCs
tjƒS(N(tGameLogic_FamilyInvadetGetDefaultMaxAngryNPCIDList(((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRÂscCs9|jƒtjkrdS|jƒs5|jtƒndS(N(t GetCurActionRtlaNPCDietGetIsNeedProcessR
RÄ(R((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytSetNPCInBattleStates
 cCsp|jƒg}|jƒ}xHt|jƒƒD]4}|j|ƒ}|sOq.n|j|jƒƒq.Wt|ƒS(N(t
GetAtkDisttGetSkillManagerRxt GetSkillCounttGetSkillByIndexRýR(RtdistListt skillManagerREtskill((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ýtGetAuraRuRRˆt GetPassiveBufRÄtGetActionBuffManager(Rt getActionBufft getAuraBufftbuffRefreshList((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGetNPCBuffRefreshListBs$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 GetOrgSpeedRtmtRuntSetCurMoveTypeRZRŒRtDef_NPC_Dict_SpeedPertSetSpeedtmtSlowtmtNormalRRFR9(Rt changMoveTypetchangeSuperSpeedt curNPCSpeedtcurNPCBaseSpeed((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytChangeNPCMoveType\s*   ) #cCsàtjƒjƒ}|sdStjƒjƒ}|j|ƒ|j||ƒ|j|ƒ|dkrt|j|ƒnt    |ƒ|dkrš|j
|ƒn|dkr¼|j t j |ƒntj||ƒt|||ƒ|S(Ni(Rt GetNPCManagertAddPlayerSummonNPCR@tGetTickt SetNPCTypeIDtRebornt SetBornTimet    SetAITypeRt SetLastTimetSetDictRRRLtDoFBRebornSummonNPCt__NotifyMapPlayerSummonMapNPC(tnpcIdtrebornXtrebornYtaiTypetlastTimeRFR‘R¼((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt SummonMapNpc‰s"   
  cCs‰tjƒ}|jƒ||_||_||_tjƒ}xEt|j    ƒƒD]1}|j
|ƒ}|sqqPnt j ||ƒqPWdS(N( tChPyNetSendPackttagMCSummonMapNPCRRïtPosXtPosYRtGetMapCopyPlayerManagerRxtGetPlayerCounttGetPlayerByIndext NetPackCommont SendFakePack(tsummonIDt
rebornPosXt
rebornPosYtmapNPCt playerManagerRER((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRò¦s 
             c CsDg}|jƒ}x6t|jƒƒD]"}|j|ƒ}|j|ƒq%Wx|D]}t|ƒqRW|jƒtjkr |j    ƒtj
kr t j |ƒn|j tjƒ}|dkrÔ|jtjdƒntj|ƒrütjd|ƒ}|rì|jƒtjkrìtjƒjƒ}tjƒjƒ}    |d||    g}
tjƒjddddd|
tt|
ƒƒƒtj|} tjƒj | dƒtj!ƒj"tj#|tjƒj$ƒƒt%|ƒtj&krìt'j(|ƒqìnt)j*|ƒnt+j,|ƒ|j-|j tj.ƒ|j tj/ƒ|j tj0ƒƒdS(NitBOSSInfotGameWorldBossStates%s(1R9RxRyRzRýt    SetDeadExRƒRtgotNPCRuRvRLtDoFB_SummonNPCDeadRŒRRRðRrR:R;R©tDef_FBMapID_SealDemonRR¨R@t    GetLineIDR%R&R
R°RBt'Def_Notify_WorldKey_GameWorldBossReborntSetGameWorldDictR<t SetGameFBDicttMap_NPC_WorldBossDeadTickRêR'tDropOwnerType_FamilyR>tClearFamilyOwnerBossHurttChNPCt OnNPCSetDeadRµtClearTeamPlayerHurtValuetSetDeadtDef_NPCDead_ReasontDef_NPCDead_KillerTypetDef_NPCDead_KillerID( Rt summon_ListtnpcidREt curSummonNPCR{R’RVRßtlineIDtmsgListtbosskey((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR    ¹s@    ) cCsbd}tjƒjƒ}t||||||gƒ}tjƒjdddd|t|ƒƒdS(NitKillGameWorldBoss(RR¨R©R°R%R&R
(tbossIDt
killerNamet    hurtValuetisNotifyt isAddKillCntRßtkillMsg((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGameServer_KillGameWorldBossís
(t
NPCControlcBsSeZdWZd„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„Zd„Zd„Z dd„Z!d„Z"d„Z#d„Z$ed „Z%ed!„Z&ed"„Z'd#„Z(d$„Z)d%„Z*d&„Z+d'„Z,d(„Z-d)„Z.d*„Z/d+„Z0d,„Z1d-„Z2d.„Z3d/„Z4d0„Z5ej6d1„Z7d2„Z8d3„Z9eed4„Z:eed5„Z;d6„Z<d7„Z=d8„Z>d9„Z?d:„Z@d;„ZAd<„ZBd=„ZCd>„ZDd?„ZEd@„ZFgdA„ZGdB„ZHdC„ZIdD„ZJdE„ZKdF„ZLdG„ZMdH„ZNdI„ZOdJ„ZPdK„ZQeedL„ZRdM„ZSdN„ZTdO„ZUdP„ZVedQ„ZWdR„ZXdS„ZYedWdT„ZZdU„Z[dV„Z\RS(XcCsL||_d|_d|_d|_i|_g|_d|_d|_dS(Ni(    t_NPCControl__InstanceRt_NPCControl__MaxHurtPlayert_NPCControl__LastHurtPlayert_NPCControl__Killert_NPCControl__AllKillerDictt_NPCControl__FeelPlayerListt_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(    R*R•R–tabsRR¨R    tGameMaptGetEmptyPlaceInArea(R2tdestXtdestYtdisttfixPosRRHRItdirXtdirYt    moveDestXt    moveDestYRGt    resultPos((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGetMoveNearPoss"      
 
 
 
  c Cs¡|j}|jƒ}|jƒ}tj|||||ƒ\}}    tjƒ}
|
j||    ƒ r—|r—tj||    dƒ} | jƒ}| jƒ}    n||    fS(Ni(    R*R•R–RtPosInLineByDistR¨R    R6R7( R2tplayerXtplayerYR:R;RRHRIR>R?RGR@((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(R*RRŽRVtGetNametMoveToObj_Detel(R2tobjIDtobjTypeRt 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(R*R•R–RR´tMove(R2tdestPosXtdestPosYt sigleMoveDisRtcurPosXtcurPosYtcurDis((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytMoveToPosStepByStepRs    ic Cs³|j}tj|tjtjƒs(dS|jƒ}|jƒ}|jƒ}|jƒ}|dkr€t    |j
ƒddƒ}n|j ƒdkr|j |j ƒƒ}tj|||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°(R*tOperControlManagertIsObjCanDoActionRtDef_Obj_ActState_ServerActRtoalMoveR•R–RRÇtGetRefreshPosCounttGetRefreshPosAttGetCurRefreshPointIndexRR´t GetMoveDisttMoveBackRER6R7RÃt    laNPCMoveR@Rêt GetActionTickt
SetDestPosRçRâRL( R2RJt moveAreaDistRRHRIR8R9t curRefreshPostmoveDistR>R?R@((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRGbs6              $$
   " 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(R*RTRURRVRRWRR¨R•R–R—R R˜RöR™RƒR
RŽRRuRvR~RVRÇR6R7RLRÄ(R2RHRIt fixAreaDistRRGtnpcPosXtnpcPosYRŸRþR t
curObjTypetcurTagR@R>R?((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt    FixTagPosªsD             9   cCs|j}|jƒ}|jƒ}tj||ƒ}|dkrFtjS|jƒdkr_tjStj    |||jƒ|jƒƒS(Ni(
R*R•R–RRŽRRtDef_NPCErrorMaxDistRR´(R2ttagIDttagTypeRRHRIttagObj((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt
GetTagDistès       c
Cs8|j}|jƒ}|tjkr(tStj||ƒr>tS|jƒ}|jƒ}|j    ||ƒ}|dkrŠ|j ƒdkrŠtStj ||ƒ}|dkrÃtj d|jƒƒtS|j||ƒrÙtStj||ƒsïtStj||ƒstStj||d|ƒd}    |    tjkr4tStS(Nis&curNPC = %s ²éÕÒ¶ÔÏó, »ñµÃ¶ÔÏóʵÀýʧ°Ü(R*RƒRtgotItemR RR³RRt FindNPCAngryRt GetAngryValueRŽRVR9t_NPCControl__GuaedAttackTruckRÄRµtCanAttackByPathR¶R·R¸RR¹(
R2R§R¼RR¨R¯tnpcAngryt
angryValueR¾R¿((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(R*tGetTypeRtntGuardRƒR
Rut    gnotTruckRÛR·t GetCanAttackRR¸RR¹RÄ(R2R§R¼RR¿((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__GuaedAttackTruck6    s    +cCs.|j}tj|ƒ r*t|ƒ r*tStS(N(R*RRrR)R RÄ(R2R((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt GetIsBossViewN    s    cCs|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(-R*R t
GetAtkTypeRtGetAngryValueTagt_NPCControl__IsValidAngryObjRR¨t GetMapFBTypeR©R{RªR«R:RòRtfbtNullRgtGetAttentionPlayersCountRxtGetAttentionPlayerByIndexRRQRSR¤t _NPCControl__CheckAddToAngryListR´R•R–tGetSightRtDef_NPCFirstSightAngryValuetDef_Screen_AreaRƒR„tGetAngryNPCCounttDef_NPC_SeePlayerAddAngrytAddObjToAngryListRÄRYRZR¢R£RrtGetIsInRefreshPoint(R2R¼t
isUpdAngryRt
needResorttcurAngrytmapTypeRßt recordMapIDtmapAngryNPCCountDicttangryNPCCountLimitR®RþR§R:t 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( RƒRR
RvtntFairyRt GetSkillAngryR„Rt GetAddAngryRŠ(R2tobjDetelR$tuseSkilltaddAngry((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytAddObjDetelToAngryList_ByAttackË    s c
Cs/|j}tj||ƒrtStj|ƒs2tS|jƒ}|jƒ}|rg|j||ƒ rgtSd}|t
j krßt |ƒt jkrßtj||ƒ}    |    rÜ|    jƒdkrÜtjƒj|    jƒƒ}qÜqßnt|jƒ|ƒ}t|dƒ}|jƒ}
|ràtjd|jƒ|fƒxÄt|jƒƒD]”} |j| ƒ} | dksE| jƒdkr~qEn| jƒ} | |kr |dn|}tjd| | |fƒ|j|
| |||ƒqEWn|j|
||||ƒtj|ƒdkr+|jƒ r+|j t!ƒnt!S(Niis,NPCÌí¼Ó¶ÓÎé³ðºÞ: teamID=%s,plusAngryValue=%ss%    i=%s,playerID=%s,addAngryValue=%s("R*RR³R RµtCheckObjCanDoLogicRƒRt_NPCControl__CheckCanAddAngryRRR„R'RtDropOwnerType_MaxAngryRŽR¬tGetTeamManagertFindTeamtFixValueByValueExt
GetMaxHPExRRRüRötGetMemberCountt    GetMemberRt_NPCControl__AddAngryValueRQRSRÅR
RÄ(R2R tplusAngryValuetcanPiletcheckRRftcurObjIDt addAngryTeamRRsRþt curTeamPlayert teamPlayerIDR“((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRŠë    s@      $   "cCsv|j||ƒ}|dks0|jƒdkrF|j|||ƒn,|rr|jt|jƒ|tjƒƒndS(Ni(RoRRptAddAngryt SetAngryValueRVRRW(R2RsRªRfR§R¨Rt((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(R*RRŽRVR R·R¸RRR¹RuRRvRÄRR
R”R„R³RµtCheckPlayerAttackMode_Player(    R2RªRfRt curObjDetelR¿t curNPCDetelt curNPCOwnert curObjOwner((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__CheckCanAddAngry5
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("R*RRÂR RYRZRxt GetAngryCountR~tGetObjIDt
GetObjTypeRRŽt DeleteAngryRÄRR
R9RµR¶R‹R•R–R´R…RÛt CanSeeOtherRÎtGetNPC_Is_GateR·R¸RRR¹(R2R¼RRstdefaultMaxAngryNPCIDListRR”RþRttangryIDt    angryTypeR R:R¿((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytRemoveDeathInAngryListu
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(R*RtGetLastResortTickRÀR•tGetMaxAngryTagRRQRSR)RÛR\tResorttSetLastResortTick(    R2R¼trefreshIntervalRŒRRstlastTickt removeRsortR((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytRefreshAngryListÇ
s      4  cCs^|j}|jƒ}xBtd|jƒƒD]+}|j|ƒ}|j|ƒsUq+n|SWdS(Ni(R*RRxR·R~RR(R2Rt angryManagerRþRŽ((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRÂê
s     cCsR|dks|jƒdkr"dS|jƒ}|dkr>dS|jƒrNdS|S(Ni(RR¸Rpt GetIsDisable(R2RŽt curAngryValue((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__IsValidAngryObjÿ
s   cCs#|j}|jƒ}|jƒtS(N(R*RRRÄ(R2RRŽ((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt ClearNPCAngry s     
cCs#|j}|jƒ}|jƒtS(N(R*tGetPlayerHurtListRRÄ(R2Rt npcHurtList((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytClearNPCHurtList s     
cCs®tj|ƒ}tj|ƒ}| s,| rAtjd|ƒtS||tjkrrtjd|||fƒtS|j|d|d|ƒsªtjd||fƒtSt    S(Ns3Íæ¼Ò²»ÔÚ±¾µØÍ¼»òÒѳ¤¾ÃÀëÏߣ¡Çå³ý¸ÃÉËѪ£¡playerID=%ssH±¾µØÍ¼ÀëÏßÍæ¼Ò³¬¹ý±£»¤Ê±³¤£¡Çå³ý¸ÃÉËѪ£¡playerID=%s,tick=%s,leaveTick=%siis5±¾µØÍ¼ÀëÏßÍæ¼Ò²»ÔÚ±£»¤ÇøÓòÄÚ£¡playerID=%s,leavePos=%s(
RtGetPlayerLeaveServerTicktGetPlayerLeaveServerPosRRüR RtDef_PlayerOfflineProtectTimeR‹RÄ(R2R”RFR¼t    leaveTicktleavePos((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__IsBossHurtOfflineProtect% scCsÕ|dkr)|j|||ƒs%tStS|j|jƒ|jƒ|ƒs_tjd|ƒtS|j    ƒrotS|j
ƒdks–|j ƒt j krÑ|jtjƒ}tjƒ|tjddƒkrÑtSntS(Ns.ÉËÑªÍæ¼Ò²»ÔÚboss·¶Î§ÀÇå³ý¸ÃÉËѪ!playerID=%sit BossHurtValuei(Rt%_NPCControl__IsBossHurtOfflineProtectRÄR R‹R•R–RRüR¬RStGetPlayerActionRtpaDieR®RtDef_Player_Dict_DeadTimeR#R:Rg(R2t
hurtPlayerR”thurtIDR¼tdeadTime((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__IsClearPlayerHurt8 s ! '"c Csp|j}g}tjƒ}tjƒjƒ}tj|ƒ}x |D]}    |j|    ƒ}
|
r#|
jƒ|krvqCn|
jƒdks|
j    ƒt
j krÚ|
j t jƒ} tjƒ| tjddƒkrÚqCqÚn|j|
jƒ|
jƒ|ƒrHtj|
|tƒrH|j|    ƒqHqC|j||    |ƒrC|j|    ƒqCqCW|sltjd||fƒn|S(NiR×isOÉËѪ¶ÓÎéûÓлî×ŵĶÓÔ±ÔÚbossÇøÓòÄÚ£¬Çå³ý¸ÃÉËѪ!teamID=%s,mapTeamPlayerIDList=%s(R*RR%R@t GetCopyMapIDt
PlayerTeamtGetMapTeamPlayerIDListtFindPlayerByIDRSRÙRRÚR®RRÛR#R:RgR‹R•R–RµtCheckKillNPCByCntR RýRØRü( R2R”tteamIDR¼RtteamHurtPlayerIDListt    playerMgrt    copyMapIDtmapTeamPlayerIDListRFR¬RÞ((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__GetTeamHurtNPCPlayerIDListU s,      '"    !i¸ cCsz|j}|jƒ s+t|ƒtjkr/dS|jƒ}||jtjƒ|krt|jƒrp|j    |ƒSdS|j
tj|ƒi}|j |j ƒƒ}|jƒ}d}x[t |ƒD]M}    |j|    ƒ}
|
jƒ} |
jƒ} |
jƒ} | sqÁn| tjkr³tj| tjƒ}|j||| |ƒr |
jƒ|sXdn    |jƒ}|r°tjd| |fƒtj||tj| ƒq°qd}d|| <qÁ| tjkrÁ|j|| |ƒ}|sê|
jƒqd}x|D]}| ||<q÷WqÁqÁWtjƒj ƒ}t!|ƒrF|j"|||ƒn|j#ƒ|j
tj$|ƒ|rv|j    |ƒSdS(Nis7¼ÓÈë¶ÓÎé£¬Ö®ÆøµÄÉËÑª×ªÒÆµ½¶ÓÎéÖУ¡playerID=%s,teamID=%si(%R*t    GetIsBossR'RtDropOwnerType_MaxHurtRÎRŒt Def_NPC_Dict_LastRefreshHurtTickt GetHurtCountt _NPCControl__GetAtkObjByHurtListRðRYRZRöt    GetHurtAtt GetValueTypet
GetValueIDt GetHurtValueRRRŽRR„t_NPCControl__IsClearPlayerHurtRR¬RüRµt AddHurtValuetDef_NPCHurtTypeTeamt'_NPCControl__GetTeamHurtNPCPlayerIDListR¨R©tIsMapNeedBossShuntt_NPCControl__UpdBossShuntInfotSorttDef_NPC_Dict_InHurtProtect(R2R¼RÅRRÏthurtPlayerDictR”t    hurtCounttisInHurtREthurtObjthurtTypeRÝR$RÜRåRæt    tPlayerIDRß((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytRefreshHurtListy sZ    "       
 
 cCsG|j}|jƒ}tjƒjƒ}||f}tjj|iƒ}t}    x |j    ƒD]\}
} | \} } }| |krˆq[n|
|kr+||
}|| kræ||dg||
<t
}    tj d|
|| |f|ƒqm|rm||dg||
<t
}    tj d|
|| |f|ƒqmq[|s[|| |g||
<t
}    tj d|
|| |f|ƒq[q[Wx¬|j    ƒD]ž\}
} |
|krÏ|| dg||
<t
}    tj d|
|| f|ƒq~||
d|kr~|| dg||
<t
}    tj d|
|| f|ƒq~q~W|    rC|tj|<t ||ƒndS(NisRboss·ÖÁ÷ -> Íæ¼Ò¶Ô¸ÃbossµÄÉ˺¦±ä¸ü¶ÓÎé!playerID=%s,npcID=%s,teamID=%s,newTeamID=%ssZboss·ÖÁ÷ -> Íæ¼Ò¶Ô¸ÃbossµÄ¹ØÁª×´Ì¬×ªÎªÉ˺¦×´Ì¬!playerID=%s,npcID=%s,teamID=%s,newTeamID=%ssWboss·ÖÁ÷ -> Íæ¼Ò²»ÔÚ¸ÃbossÉËѪÖУ¬ÉèÖÃΪ¹ØÁª×´Ì¬!playerID=%s,npcID=%s,teamID=%s,tick=%ss=boss·ÖÁ÷ -> ÐÂÔöÍæ¼Ò¶ÔbossÉ˺¦!playerID=%s,npcID=%s,teamID=%ss=boss·ÖÁ÷ -> É˺¦×ªÒƵ½±¾bossÉÏ!playerID=%s,npcID=%s,teamID=%s( R*R9RR@R RMtg_bossShuntPlayerInfoR¬R RTRÄRütGameServer_WorldBossShuntInfo(R2RßRüR¼RR_RRtshuntPlayerDictt shuntChangeRFt    shuntInfoR"Råt relatedTickt    newTeamID((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__UpdBossShuntInfo¹ sP        
               $ cCsXxQt|jƒƒD]=}|j|ƒ}|j|tƒ\}}|sL|r|SqWdS(sÙµÚÒ»¸ö¿É¹¥»÷µÄ×î´óÉËѪ¶ÔÏó£¬Ò²ÊÇʵ¼ÊµÄ¹éÊôÕß»ò¶ÓÎé
        ÒòÎªÍæ¼ÒÉËѪµôÏß¡¢ËÀÍöÓÐÒ»¶¨Ê±¼äµÄ±£Áô»úÖÆ£¬¹Ê×î´óÉËѪ²»Ò»¶¨Êǿɹ¥»÷Ä¿±ê(¹éÊôÕß)
        ×¢Òâ: ¸Ã¹æÔò±ØÐëÓë×îÖÕËã¹éÊôµÄ¹æÔòÒ»Ö£¬²»È»¿ÉÄܵ¼Ö¹éÊô´íÂÒ
        N(RöRîRðt_NPCControl__GetTagByHurtObjRÄ(R2RÏRERÿRtcurTeam((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__GetAtkObjByHurtListî s  cCs|j}|jtjƒS(s¯NPCÊÇ·ñÉËѪ±£»¤ÖÐ
        ÒòΪÊÖÓαȽϻá³öÏÖÍøÂçÇл»µÄÇé¿ö£¬´Ëʱ»á¿ÉÄÜ»áÒýÆðµôÏßÖØÁ¬
        ËùÒÔÕë¶ÔÊÖÓÎ×öÁ˵ôÏß3·ÖÖÓÄÚÉËѪ±£»¤£¬·ÀÖ¹Íæ¼ÒÖØÁ¬ºóÉËѪ±»Çå¿Õ£¬ÌåÑé²»ºÃ£»
        (R*RŒRRû(R2R((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytIsInHurtProtectý s    cCs@|j}t|t|ƒ}x|D]\}}|jƒq"WdS(N(R*RÙRÄR(R2tisClearAuraBuffRRØt    buffStatet    canPileup((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt ClearAllBuff
s
    cCs%|jƒ|jƒ|j|ƒtS(N(RÍRÐRRÄ(R2R((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(NR]( R*t_NPCControl__ClearNPCAllStateR RQRSRRt_NPCControl__InitNPCSummont_NPCControl__NormalNPCInItCDtRefreshNPCStateR[RÄ(R2R]R((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt ResetNPC_Init& s     $
  cCs~|j}|jdƒ|jdƒ|jƒ}xHt|jƒƒD]4}|j|ƒ}|dkriqBn|jdƒqBWdS(Ni(    R*t SetAttackTicktSetUseSkillTickRÈRxRÉRÊRtSetLastUseTick(R2Rt curNPCManagerRþt curNPCSkill((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__NormalNPCInItCDA s        cCsg|j}g}x6t|jƒƒD]"}|j|ƒ}|j|ƒq"Wx|D]}t|ƒqOWdS(N(R*RxRyRzRýR    (R2RtcurNPC_Summon_ListRER{R((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__InitNPCSummonV 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(R*tGetCurPatrolIndextGetPatrolPosAtR•R–RÚRRáRçRÝRLRtR^tGetPatrolPosCounttSetCurPatrolIndex(    R2R¼Rt patrolIndext    patrolPost
patrolPosXt
patrolPosYt curNPC_PosXt curNPC_PosY((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt __PatrolMovei s4         
       cCsÔ|j}|jƒdkr,|j|ƒdS|j|jƒƒ}t|jƒdƒ}|jƒ}|jƒ}||}||}||}    ||}
|jƒ} |jƒ} |j    ƒ} t
|| | ƒ}t|| | ƒ}t
|    | | ƒ}    t|
| | ƒ}
||kr |j ƒdS|    |
kr:|j ƒdSt ||j ƒƒsSdStj||ƒ}tj|    |
ƒ}t|tjƒtjƒj|jƒ|jƒ||dƒ}|j|jƒ|jƒƒdS(Nii(R*R#t_NPCControl__PatrolMoveRYRZRVt GetMoveAreaR•R–tGetAreaRR\RtR^RlRÁRçRRáRR¨t LineNearToPosRL(R2R¼RtPosMaptmoveAreaRHRIt minMovePosXt maxMovePosXt minMovePosYt maxMovePosYtposMapXtposMapYt
posMapAreatnewPoint((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytDoNormalNPCMoveŸ sD       
 
 
 
 
 
cCstj|jƒƒS(N(Rt GetPsycoFunct)_NPCControl__Func_GetRandPosInRefreshArea(R2((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGetRandPosInRefreshAreaÞ scCs‰|j}|j|jƒƒ}|jƒ}|jƒ}|jƒ}tj|||ƒ\}}|dkr|dkr||gS||fS(Ni(R*RYRZR•R–R.R6tGetNearbyPosByDis(R2RtposMapR6R7R8RHtpoxY((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__Func_GetRandPosInRefreshAreaå s       
cCs™|j}|j|jƒƒ}|j|jƒ|jƒ|ƒrCtS|jƒtj    kr•|j
ƒtj kr•|j|j ƒ|j ƒ|ƒr•tSntS(N(R*RYRZR‹R•R–RÄRÃRR]RÚRÝt GetDestPosXt GetDestPosYR (R2RR”((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Ä(R2RPRQR”((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(R*R#RlRÁR"R•R–R=RRRçRRÝRÄRL(R2Rt patrolCountR%R&RHRI((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR\$ s         cCsb|j}|jtjd|jƒdƒƒ|jƒ\}}|j||tƒ|j|ƒdS(Nii(    R*tSetCurRefreshPointIndexRlRÁRXR=RìR tDoNPCRebornCommLogic(R2R¼RRHRI((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt DoNPCRebornC s     # c     Cs"|j}|jtƒtj|tj|ƒƒ|jƒj|ƒ|jƒ|j    t
j dƒ|j    t
j dƒt j|ƒtj||ƒ|jƒ}t
j|ƒrUtjd|ƒ}|rUtjƒjƒ}tjƒjƒ}|d||g}tjƒjddddd|tt|ƒƒƒt|ƒt
jkrRt j!|ƒqRqUn|j"ƒ}x t#|j$ƒƒD]Œ}    |j%|    ƒ}
|
s¢|
j&ƒdkr¦Pn|
j'ƒt
j(krÁqtntj)d|j*ƒ|jƒ|
j+ƒfƒt,j-||
|ƒqtW|j.ƒ|j/||ƒdS(NiRiRs%ss/NPC¸´»î£¬Ì×ÉϹ⻷: objID=%s,npcID=%s,skillID=%s(0R*RRÄRQRYRRRRÄt RebornNotifyRðRtDef_NPC_Dict_HPPerLogicMarkt!Def_NPC_Dict_RebornPreNotifyIndexRt OnNPCRebornRLt DoFBRebornNPCR9RrR:R;RR¨R©R@R R%R&R
R°R'RR>tFamilyOwnerBossOnRebornRÈRöRÉRÊtGetSkillTypeIDt GetSkillTypetDef_SkillType_AuraRüRt
GetSkillIDt
SkillShellt NPCUseSkillt NotifyAppeart NotifyNPCShow( R2R¼RtcurNPCIDRVRßRRRÌRERš((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRGO s@     
   ,
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©R:R;t GetShowTypeR<RDRtDef_FBDict_NPCShowEndTicktGetProtectTimeRRùt tagMCNPCShowRïRýRöRþRÿRRRRü(
R2R_R¼RßtnpcShowIpyDatatendTickt npcShowPackRREtplayer((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRV s*        cCsdS(N((R2((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRI¦ scCsC|j}|jƒ}tjdƒ}||kr4dStjd|ƒ}t|jƒdtƒ}tj|ƒdtj    |ƒ}|j
t j ƒ}    ||    }
xŽ|
D]†} || kr¸Pn|| \} } }| rüt jddtjƒjƒ|| gƒn|dkr|j|t jƒn|    d7}    q¢W|jt j |    ƒdS(    NtHPPerLogicNPCIDLists HPPerLogic_%streverseidit
FB_liubo_0ti(R*R9RwRxtsortedtkeysRÄRQRSRRRŒRRJRt WorldNotifyRR¨R©t%_NPCControl__GiveNearbyPlayerPrestigetDef_Matrix_SixRð(R2tdropTypetownerIDRRWthpPerLogicNPCIDListthpPerLogicDictt    hpPerListtnowHPPerthpPerLogicMarktlogicHPPerListthpPerR%tdropItemTemplatetaddPrestigeFormat((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt DoHPPerLogicµ s*       
  + cCsdS(N((R2RtRš((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(R*tGetRefreshTimeR^RRüRt SetActionTickRH(R2R¼RR>((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(R9RwRxRŒRRKR
RZRRRðRR@R©RRg( R2RR>R_tpreRebornNotifyNPCDicttnotifyMinuteListt
notifyMarkt notifyIndextreaminMt notifyMinuteRß((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__DoNPCRebornPreNotify!s   
 %cCs|j||ƒ|jƒdS(N(tRefreshNPCAttrStatetRefreshNPCActionState(R2t canSyncClientR]((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR;scCs¸|j}tj|ƒ}|jƒ|jƒ|j|jƒƒ|jtj    ƒ|j
|j ƒƒ|j ƒt jkr‹tj||ƒdSt||ƒtj|ƒ}|j|ƒdS(N(R*RQRRtClearBattleEffecttResetNPCBattleStateRàRÜR RR tSetAtkIntervaltGetBaseAtkIntervalRuRRˆR‰tRefurbishPetAttrRmRStCalcBuffer_NPCBattleEffecttRefreshNPCSpeed(R2R„R]RtcurNPCMaxHP_Beforet allAttrList((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR‚Gs    
 
 
  cCs®|j}|tjjtjdƒ}|sW|jtjƒrS|jtjdƒndSt|j    ƒt
j t dt t
j |ƒƒƒ}|j|ƒ|jtj|ƒdS(NigY@(R*RtCalcAttr_BattleNolineR¬tTYPE_Calc_AttrSpeedRŒRßRðRZRÛRBRõRRôRà(R2RRtspeedPertspeed((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR‹qs    3 cCs'|j}tj|ƒtj|ƒdS(N(R*RTtClearObjActionStateRStCalcBuffer_ActionState(R2R((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRƒ„s     cCs;|j|ƒ}|j|ƒ}|s*|r7|jƒndS(N(tRefreshBuffStateNoTimelytRefreshBuffStateTimelyR‚(R2R¼trefreshAtrefreshB((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(R*t GetTickByTypeRtTYPE_NPC_Tick_BufftTYPE_NPC_Tick_Timet SetTickByTypeR t    BuffSkillt RefreshBuffRÏRÐRÓt SkillCommontCheckAddAuraSkilltCheckAuraSkill(R2R¼Rtrefreshtresult((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(R*R™RtTYPE_NPC_Tick_Buff_TimelyR›RœRRžRÑRÒRÕRƒRStProcessPersistBuff(R2R¼RR£((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR•Ás    
 cCsÃ|j}|jƒ}|jƒ|jƒ|jƒ|jsBdn |jjƒ}tjd|ƒ}|r¯t    |ƒt
j kr–t j ||jƒ}nt|jƒ|dƒn|jƒjƒdS(NRdRi(R*R9t!_NPCControl__SetFeelNPCPlayerListt_NPCControl__GiveObjPrizet_NPCControl__EventKillNpcR-t GetPlayerNameR:RPR'RRR>tFamilyOwnerBossOnKilledR1R(RR(R2RR_R#t bossIpyData((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt __KillLogicßs    
 
 
c Cs|j}g|_|jƒ}g}xÔt|jƒƒD]À}|j|ƒ}|j|ƒ}|sgq7n|d}|d}|r ||kr |j|ƒq n|r7tj    ||j
ƒ|j ƒƒ}    x-|    D]"}
|
|krÎ|j|
ƒqÎqÎWq7q7W||_dS(Nii( R*R/RÎRöRîRðR RýRtGetAreaTeamMemberR•R–( R2RRÏteventPlayerListRERÿt hurtObjTypeRR t
playerlistt
teamPlayer((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__SetFeelNPCPlayerLists*         
 
 !      cCsn|jr|j|jƒnxK|jD]@}|jrV|jjƒ|jƒkrVq&n|j|tƒq&WdS(N(R-t_NPCControl__MissionOnKillNPCR/RRÄ(R2t eventPlayer((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__EventKillNpc8s    $cCsY|s
dStjddƒ}|s&dSx$|D]\}}||kr-|Sq-W|ddS(Nit    GoldModeliiÿÿÿÿ(R:Rò(R2R:t moneyItemListR1tmoneyID((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__GetDropMoneyModelIDFs c    CsŒ|j}|jƒ}g}tjddƒ}||krž||}tjƒjtjƒ}|j    |gƒ}    g}
x4|    D]\} } |
| g| 7}
qzWn |j
ƒ}
|j ƒ} | rMxŽ|j D]€}| \}}}}t ||||ƒ}xP|D]H}|j||||gƒtjd|||||f|jƒƒqúWqÆWnx8|D]0}x'|
D]}|j||dtgƒqaWqTW|S(s›ÌØÊâµôÂä (˽ÓÐÌØÊâµôÂä + »÷ɱ´ÎÊýÌØÊâµôÂä), Ö§³ÖÃþ¹Ö
        @return: None
        @return: [[ownerPlayer, itemID, isBind, isDropInItemPack], ...]
        R©is[»÷ɱ´ÎÊý±Øµô(¿ÉÃþ¹Ö): npcID=%s,dropItemID=%s,needKillCount=%s,isDropInItemPack=%s,isBind=%si(R*R9R:RòRR<RDRRÂR¬RÇRªR/R«RýRüRR (R2RÈRSRR_tspecDropItemListRôRõRðRöR÷RøRùRËt
feelPlayerRÌRÍRêRÎtkillCountDropItemListRRÑ((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__NPCSpecialDropItemRs2      
       +  !cCsø|j}|jƒ}|sdSi}g}xª|D]¢}t|||d|ƒ}    |    s\q2n|    \}
} } } |j| ƒ}| r—|
|g| 7}
n|jƒ}x!|
D]}|j||gƒqªW|j| ƒq2Wtj|ƒt    j
ƒ}|j ƒ|j ƒ}}d}xát jD]Ö\}}||}||}|j||ƒsRqn|t|ƒdkrlPn||\}}|d7}||kr˜| nd}|j|dƒ}|j||||ƒ}|sÔqn|j|||t j|ƒqWdS(s%NPCµôÂäÎïÆ·, ¶àÍæ¼ÒÿÈËÒ»·Ý, »ìºÏµôÂäNRSii(R*R9R÷t _NPCControl__GetDropMoneyModelIDRRýRORltshuffleRR¨R•R–RRR    R
R¬t_NPCControl__CreateDropItemt_NPCControl__MapCreateItemR(R2tdropPlayerListRßRSRR_tdropItemBindDictt dropItemListRxR6R7R8R9R:R¸t dropPlayerIDR¦RGRCRDRERHRIRJRKR0RktitemCntRêRB((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__NPCDropItemByPlayers{sL          
 
 
 c% Csâ|s
dS|j}|jƒ}tjƒjƒ}tj|ƒ}tj|ƒ}|rutj    d||j
ƒfƒn|tj krˆdSt |ƒ}    |    sÖ|rÒtj ƒjtjƒ}
tjd||
fƒndSgiddf\} } } }t|||||    tƒ}|r*|\} } } }n|j|ƒ}|rY| rY| |g| 7} nd}|j||    ƒ}| |gt|ƒ7} t| ƒdkr·tj|ƒtj| ƒntjƒ}|jƒ|jƒ}}d}xùtjD]î\}}||}||}|j||ƒs$qìn|t| ƒdkr>Pnt}| |}|d7}||kr¯|spqìnd}|d\}}}}tj|j
ƒ} }!|d}n=|}||} }!||krÔ|nd}| j|dƒ}|j||||ƒ}"|"sqìn|rÁ|"j tj!tj"ƒt#j$|"ƒ}#t%j&||"t't'ddti|d    6gƒrÚt(j)ƒ}$||$_*||$_+||$_,|#|$_-t|$j-ƒ|$_.t/j0||$ƒqÚqì|j1|"||| |!ƒqìWdS(
Ns%NPC¿ªÊ¼µôÂä: npcID=%s,dropPlayerID=%ss(È¡²»µ½NPCµôÂäÐÅÏ¢!npcID=%s,curWorldLV=%sitSpecItemiiRðtNPCDropR_(2R*R9RR¨R©RªR«RRrRVRtDef_FBMapID_MunekadoTrialRWR@RARBRHRFR÷R R¾t_NPCControl__NPCSpecialDropItemR
RlR¿R•R–RR    RR¬RÀt SetUserAttrtDef_IudetSourcetItem_Source_VirtualItemDropR tGetMapDropItemDataStrRþRRÄRùttagMCVirtualItemDropt
ItemTypeIDRûRütUserDatat UserDataLenRRRÁ(%R2RxRRÝRÈRR_RßR RSRUR7R8R9R:R6R¸t specItemSigntplayerSpecDropListRGRCRDRERHRIRJRKRÍR0RÆRÑRêt    ownerTypeRkRBtdropItemDataStrt    vItemDrop((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt __NPCDropItemµsŽ          
 
 
 
                    cCs‡|j}|jƒtj|dƒ|jƒ|jƒ}|tjkrLdS|tjkrlt    j
|ƒdS|j t ƒt |ƒdS(Ni(R*t_NPCControl__KillLogicRQRYRRuRRxRˆR‰t
SetPetDeadR
R R    (R2RtcurNPC_GameNPCObjType((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt    SetKilleds    
 
 
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ˆÃ@(R*t GetHPRestoreR RQRRRSRðRRJRÃRt    laNPCNullRÄRtGetRestoreTimetDef_NPC_ProcessHP_TicktSetRestoreTimeRZRŸt
SkillAddHP(R2R¼Rt hpRestoreRatet curNPCMaxHPtlastRestoreTimet restoreValue((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytProcessHPRestoreks,       $ cCsdS(N((R2R¼((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytProcessBattleHPRestore–sc CsÎ|j}|jƒ}|jƒ|_|jƒ|_tj|ƒ}|j|ƒ\|_    }}}|||_
|_ |r–t j d|||fƒn|jƒt|j    ƒdkrzd}d}g}    x—|j    jƒD]†}
|jsò|
|_n|js|
|_n|js|
|_n||
jƒkrC|
jƒ}|
}n|j|
ƒ|    j|
ƒq×W|j||||    ƒng|dkrœ|j|||ƒnE|tjkr¾|j||ƒn#|rát jd|||fƒn|rqi|jƒd6|d6t jƒjƒd6t jƒjƒd6|r6|j ƒndd6|j    j!ƒd    6|d
6|d 6} t"j#d | ƒnt$rŠt$|||ƒn|j%ƒ} | ddkrº| d dkrºdSt&j'| |ƒdS(Ns-__GiveObjPrize npcID=%s,hurtType=%s,hurtID=%sis*NPC¹éÊôÒì³£:npcID=%s,hurtType=%s,hurtID=%sRHR"RßRRåtkillerIDRRÝtKillBossRecordi((R*R9t"_NPCControl__FindLastTimeHurtObjExR,t_NPCControl__FindBossMaxHurtObjR+RRrt_NPCControl__FindNPCKillerInfoR.R0R1RRVt _NPCControl__DoLastTimeHurtLogicR
RRPR-Rt#_NPCControl__KilledByPlayerSetPrizeRýt_NPCControl__NPCDropItemt!_NPCControl__KilledByTeamSetPrizetDef_NPCHurtTypeFamilyt#_NPCControl__KilledByFamilySetPrizeRFRR¨R©R@R R¬RfR't SendEventPacktOnNPCDiet _NPCControl__FindLastTimeHurtObjt PlayerActiontGetAwardOnKillNPC( R2RR_R R RRÝRxt maxPlayerLVRÈRtdataDicttlastTimeHurtObj((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__GiveObjPrize·sZ     
                      *,!  cCse|j}|sdS|jƒ}|tjkr2dS|j}tj||ƒtj||j    ƒƒdS(N(
R,RƒRR„R*t    PlayerViptDoAddVIPKillLVExpRtAddZhenQiByKillNPCtGetSP(R2tlastHurtPlayerRfR((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    ƒfSqSWnË| tjkrõ|jrg|jjƒ}||krò|j||<|dtj|fSqgnr| tjkrg|jƒ\}}|r5||tj|j    ƒfS|rg|||jƒ<|dtj|jƒfSn|jrõ|jjƒ}|jj    ƒ}
|r±tj
d
|||
fƒn|
rÏtj ƒ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|rÍtj}|j    ƒ}    |rtj
d ||    fƒqq|rtj}|j ƒd}    |rtj
d||    fƒqqn||||    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((R*R9RRR@R RMtg_npcKillerInfotpopR¬RVRfRR'RRìRÎRúRîRöRðRñRòR RRRötDropOwnerType_MaxHurtPlayerR+RŸt_NPCControl__GetMaxAngryInfoR,R R¡tDropOwnerType_AlltDef_NPCHurtTypeAlltDropOwnerType_FactionRLtGetNPCItemProtectFactiontDef_NPCHurtTypeFaction(R2R RR_RHRt
killerDicttkillTeamRRÝRåt dropOwnerTypeRÏRþt
maxHurtObjRR RFtmaxHurtPlayerIDtmaxAngryPlayert maxAngryTeamtlastHurtPlayerIDtprotectFaction((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¹RR„RRŽR¬R R¡(R2RŽR¾t angryObjTypeRgRå((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__GetMaxAngryInfo¥s    
cCsD|j}|jƒ}|jƒdkr+dS|jƒ}|j|ƒS(Ni(NN(R*RÎRîRtGetLastTimeHurtValueR (R2RRÏR((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__FindLastTimeHurtObjÀs       cCs>|j}|jtjƒ}tjƒj|ƒ}|s:dS|S(N(R*RŒRtDef_PlayerKey_LastHurtRR%RãR(R2RRFR((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__FindLastTimeHurtObjExÍs     cCsT|j}|jtj|jƒ|jƒfƒ}tjƒj|ƒ}|sPdS|S(N(
R*RŒRtDef_NPC_Dict_BossMaxHurtIDRR9RR%RãR(R2Rt    maxHurtIDR((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__FindBossMaxHurtObj×s     (c Cs‡|j}|jƒ}d}|dkrBtjd|jƒƒ|S|j|jƒƒ}|jƒ}|tj    krtj
|j ƒt j ƒ}    |    dkrÃ|r¿tjd||j ƒfƒn|S|    jƒdksê|    jƒt jkr|rtjd||j ƒfƒn|S|rz|j|    jƒ|    jƒ|ƒs|rstjd||j ƒ|    jƒ|    jƒfƒn|Sn‡tj|jƒ|jƒ|    jƒ|    jƒƒtjkr|rýtjd||j ƒ|jƒ|jƒ|    jƒ|    jƒfƒn|S|    df}|    dfS|tjkrp|j ƒ}
tjƒj|
ƒ} |rgtjd||
fƒn| dkr‘|rtjd|
ƒn|S|r±tjd    | jƒƒnx¸t| jƒƒD]¤} | j| ƒ} | dks÷| jƒdkr|rÄtjd
| ƒqÄqÄn| jƒdks>| jƒt jkrj|rÄtjd | | jƒfƒqÄqÄn|rÒ|j| jƒ| jƒ|ƒs[|rÄtjd | | jƒ| jƒ| jƒfƒqÄqÄq[n‰tj|jƒ|jƒ| jƒ| jƒƒtjkr[|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(R*R9RRRüRYRZRñRRRŽRòRR„RVRSRÙRÚR‹R•R–R´tDef_Team_GetExpScreenDistRöR R¡R¤RöR¥RtDef_NPCHurtTypeNPC(R2RtisCheckRefreshAreaRRR_t hurtObjTupleR”tmaxHurtValueTypeRRåR RþR¬((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__GetTagByHurtObjèsŽ         ' !    )!    ; 
  ' !    )    !    ; cCsf|j}|j|jƒt|ƒ}tj|ƒ}|j|tjƒ|j|||j    ƒtƒdS(N(
R*t_NPCControl__GetExpRR RRRBtDef_ViewExpType_KillNPCt_NPCControl__KillNPCFuncExR(R2RRtadd_Expt playerControl((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__KilledByPlayerSetPrizeRs     c CsX|j}tj||jƒ|jƒd|jƒƒ}|sitjd|jƒ|j    ƒ||fƒdS|j
s‚|d|_
n|j s›|d|_ n|j s´|d|_ n|dj ƒ}d}d}g}    xe|D]]}
|
jƒ} || kr
| }|
}n|    j|
ƒ|j|
ƒ|j|
||tƒqÝW|j||||    ƒdS(NRsS½±Àø¹éÊô¶ÓÎ飬µ«ÊDz»´æÔÚ¿É»ñµÃ¸Ã½±ÀøµÄ¶ÓÔ±!npcID=%s,teamID=%s,hurtType=%s,hurtID=%si(R*RR­R•R–t_NPCControl__GetIsLogRRFR9R¬R,R+R-RRRRýt_NPCControl__DoNormalTeamExpR)RÄRñ( R2R RRÝRR°Rt    teamMaxLVRxRÈRt curPlayerLV((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__KilledByTeamSetPrizels4    -                          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|s tjd|jƒ||fƒn|s|j}n|sGtjd|jƒ||fƒdS|js\||_n|jsq||_n|js†||_n|jƒ} x$|D]} |j| || tƒq™W|j||||ƒdS(NisI½±Àø¹éÊôÏÉÃË£¬µ«ÊDz»´æÔÚ¿É»ñµÃ¸Ã½±ÀøµÄ³ÉÔ±!npcID=%s,hurtType=%s,hurtID=%ss;½±Àø¹éÊôÏÉÃË£¬ÕÒ²»µ½µôÂäÍæ¼Ò!npcID=%s,hurtType=%s,hurtID=%s(R*RRYRZRRýRöRþRÿt GetFamilyIDR‹R•R–RRýRVR9R,RFR+R-RR)R Rñ(R2RRÝRtmaxLVRxRÈR”t copyPlayerMgrRER`R0RR((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__KilledByFamilySetPrize’sJ     4                                cCsg|jƒ}|jƒ}tjƒjƒ}tjƒjƒ}|jƒ}    |tjkrc|tj    kryt
j ||ƒn;|j ƒ|j ƒt jdƒkr´tj|tjƒnt jddƒ}
tj|
|ƒ} | dkrctj| } |j| dƒd} tj|| | ƒtj|| ƒtjd|jƒ| fƒi|jƒd6|d6| d6|jƒd    6|jƒd
6}tj d ||ƒ| dkrùt!j"|tj#dƒtj|tj$ƒt%j&|tj'dƒt(j)|tj*dƒq`| dkr`t!j"|tj+dƒtj|tj,ƒt%j&|tj-dƒt(j)|tj.dƒq`qcndS( NtDailyQuestKillMonstertKillBossCntLimitiis$½ñÈÕɱ¹Ö´ÎÊý  playerID=%s, newCnt=%sRHR"ttouchCnttAccIDtPlayerIDtAddKillBossCnt(/R9RƒRR¨R€R©RRR
RRLtDoFB_DropOwnerRR:RgtPlayerActivitytAddDailyActionFinishCntRBtDailyActionID_KillNPCtGetDictValueByKeyRRtDef_PDict_Boss_KillCntR®RR¿t BossHurtMngtNotifyAttackBossCntRüRtGetAccIDR'RõRRtSuccType_KillWorldBosstDailyActionID_WorldBOSStPlayerBossReborntAddBossRebornActionCnttDef_BRAct_WorldBOSStPlayerFairyCeremonytAddFCPartyActionCnttDef_PPAct_WorldBosstSuccType_KillBossHomeBosstDailyActionID_BOSSHometDef_BRAct_BOSSHometDef_PPAct_BossHome(R2RRRêt
isTeamKillR_t
defObjTypet    mapFBTypeRßRFtkillBossCntLimitDictt
limitIndexRtnewCntRû((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 ||ƒ}|dk}    |rÁt j ||ƒ|    rçt j|ƒqçn&t j||ƒ|    rçt j|ƒntj|tjd|gƒdS(NR7ii(R*RuRRvR”R„t
gnotNormalR9R:RgRR@t
EventShelltEventRespons_OnKillByFeelt EventRespons_KillWorldBossByFeeltEventRespons_OnKillByIdtEventRespons_KillWorldBossRRRBtSuccType_KillSpecificNPC(
R2RtisFeelRR‹R´R_RTRUt isWorldBoos((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__MissionOnKillNPCs*       cCstj|jƒS(N(RRrR*(R2((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt
__GetIsLog scCsT|j}|j|jƒt|ƒ}|s.dStj|ƒ}|j|tjƒdS(N(R*R'RRÄRRRBR((R2RRR*R+((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__DoNormalTeamExp0s    c
Csð|j}d}tjƒjƒtjkr?tj||ƒ}n|dkrO|S|jƒ}|dkrkdS|swdn    |j    ƒ}|r¼|s“dSt
j ||ƒ}|s¯dS||9}n|j ƒ}t tjdtjddƒƒƒ}    |    S(NitExpAttenuationi(R*RR¨R€RRRLt OnGetNPCExptGetExpRRµtGetTeamPlayerHurtPerRR¤R¥R¦R:Rg(
R2RztisTeamR`RR2RFthurtPertnpcLVtexp((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__GetExpEs(         $c     Cs×|s
dS|j}|jƒ}|jƒs1dn|}t|jƒdks[|tjkrj|jjƒng}    tj    |||d|||    gd|ƒ}
|
dkr·t j dƒdS|
j |jƒ|jƒƒdS(NiiRëRìsµôÂäÎïÆ·,ÎÞ·¨ÕÒµ½µØÍ¼µôÂäÎïÆ·(R*R9RëR
R.RtDef_NPCHurtTypeSpecialRfR R RRRVtSetByObjRƒR( R2RBRHRIRjRkRRWRìtspecOwnerIDListt
curMapItem((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__MapCreateItemps     9*  cCsXtj|ƒ}|sdStjƒjƒ}tj|ƒ}|j|ƒ|j|ƒ|S(N(    RþRÿRR¨R©RªR«tSetCountt    SetIsBind(R2RR0R1RêRBtcurMapID((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__CreateDropItems  N(]t__name__t
__module__RR*R4RÄRARERKRSRGRhRmR„RqR{R R•RœRŠR¦RžRÀRt Def_NPCRefreshAngryValueIntervalRÈRÂRRÍRÐRØRôR÷RRùRïRRRRRRR,R:R=R<RDR‹R\RHRGRVRIRutDef_Matrix_ThreeRhRyt!_NPCControl__DoNPCRebornPreNotifyRR‚R‹RƒR˜R”R•RÚR¦R¨R¾RËt!_NPCControl__NPCDropItemByPlayersRñRÝRèRéR§RïRîRR÷RìRíR RðRòRôR)R³R-R.R'RÁRÀ(((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR)øsª            H >        :         o     7        @    R#                             $ @    5                       6    ?                             2    %        .*         *                        1    (             )    : b    T    +    !    E    3    v             
    j        &    9    5          +     cCs]tjƒj|ƒ}|sdS|jƒ}|s5dS|jƒ}|jƒ}t|||ƒS(Ni(RRuRvRfRt
CalcNPCExp(RR_R±R2RjRz((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRóŸs   cCs(ttjdtjddƒƒƒ}|S(NRdi(R¤R¥R¦R:Rg(R2RzRjRk((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR|ªs$cCsFtjtd|jƒdfƒ}|dkr2dS||||ƒdS(Ns AIType_%d.%stOnAttackDieByPlayer(RRRRR(RRRÍR((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytOnPlayerAttackNPCDieµs" cCs<|dkr|Stt|ƒƒ}t|td|ƒdƒS(Nii
i(R
R°RRa(tvalueExR"tnlen((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR¢¾s i
cCsY|jƒ}tjdƒ}||kr+tS||}t|ƒtkrKtS|t}|S(Nt CollectNPCCfg(R9RwRxRÄR
tDef_CollNPCCfg_LentDef_CollNPCCfg_CanTogether(RR_t collectNPCCfgtcollectNPCInfotcanCollTogether((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytCanNPCCollectTogetherÙs  
 
c Cs-|jƒ}tjdƒ}||kr8tjdƒtS||}t|ƒtkritjd|ƒt    S|t
j dƒk}|rÖt t j|ƒ}|s t    S|jƒ|jƒkrÖtjd|jƒƒt    Sn|t}t|ƒ}| rE|dkrE||jƒkrEtjdƒ|t}    |    rAtj||    ƒnt    Sd\}
} |jƒ} tjdƒ} | | krê|jƒ}t| | ƒ}
|jtj| ƒ}|jtj| ƒ} |
|7}
tjd    ||
| |fƒntjd
ƒ}||krC||d}
|jtj|ƒ} tjd |
| fƒn|
dkry| |
krytj||t|
gƒt    St    }|t}|r2|\}}|dkr2|j ƒj!t j"ƒ}t#j$|||ƒ\}}}}| r/| r/tjd |||fƒtj||t%|||gƒt    Sq2nt#j&|t j"ƒs[tj|d ƒt    S| rƒt'||ƒ rƒtjdƒt    S|t(}t)j*|tj+ƒ}|rØt,dt-|t.j/|t0t.j/ƒƒƒ}ntj1||t j2d|jƒƒt3j4||ƒt5j6||jƒtj7dƒdS(NRs"DoCollectNPCBegin ·ÇÌØ¶¨²É¼¯NPC...s#CollectNPCCfg.txtÅäÖôíÎó£¬npcID=%st RealmSitNPCIDs/²»Äܲɼ¯×Ô¼ºµÄ´ò×øÕÙ»½ÊÞ summonOwner.GetID()=%sis"DoCollectNPCBegin ²»ÔÊÐíͬʱ²É¼¯£¡tCollectNPCFuncTimeLimits4    vipLV=%s,maxTime=%s,todayTime=%s,todayBuyTime=%stCollectNPCIDTimeLimits    maxTime=%s,todayTime=%ss@DoCollectNPCLogic ²É¼¯ÏûºÄÎïÆ·²»×ã,npcID=%s,costItemID=%s,cnt=%stGeRen_lhs_202580s%DoCollectNPCBegin SetCollectNPC fail!ièt    prepareIDi(ii(8R9RwRxRRüR R
R‚RFRÄR:RgR”RR„RRƒtGetCollectNPCPlayerIDRtDef_CollNPCCfg_SysMsgMarkRt
NotifyCodetGetFunctionTypetGetVIPLvR¤R®RtDef_PDict_CollNpcBuyTimetDef_PDict_CollNpcCollTimetDef_PDict_CollNpcIDCollTimetDef_CollNPCCfg_LimitSysMsgMarktDef_CollNPCCfg_CostItemInfoRµR¶RRútGetItem_FromPack_ByID_ExExt Def_CollNPCCfg_NotCostItemNotifytCheckPackHasSpacet SetCollectNPCtDef_CollNPCCfg_PrepareTimeRþtGetPrivilegeValuetVIPPrivilege_CollTimeReduceRateRRZRBRõRôtSync_PrepareBegintpstMissionCollectingRLtOnBeginCollectRµRõR(RRR_R„R…t isSitCollectt summonOwnerR†tcollectPlayerIDtsysMarkt limitMaxTimet todayCollTimet npcFuncTypetnpcFuncCollectCntLimitDicttvipLVt todayBuyTimetnpcIDCollectCntLimitDictt    isAutoBuyt costItemInfot
costItemIDt costItemCnttitemPacktenought    indexListthasBindtlackCntt prepareTimetcollTimeReduceRate((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytDoCollectNPCBeginês   
 
 % 
 
  
      
 
0 cCs•|jƒ}|jƒ}|jtjƒ}|rktjƒj|ƒ}|rk||krktjdƒt    Sn|j
tj|ƒ|j
tj |ƒt S(Ns?SetNPCColleced ÓÐÈËÔڲɼ¯ÇÒ²»ÊÇͬһ¸öÈË£¬Ôò²»¿ÉÖØÐÂÉèÖòɼ¯¶ÔÏó( RRRŒRtDef_NPC_Dict_CollectPlayerIDRR%RãRüR RðtDef_PlayerKey_CollectNPCObjIDRÄ(RRt curPlayerIDt curNPCObjIDtcurCollectPlayerIDtcurCollectPlayer((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRšPs   cCsi|jtjƒ}|dkr"dStjƒj|ƒ}|setjd|ƒ|jtjdƒdS|S(Nis>GetCollectNPCID ÓÐcurCollectPlayerID=%s£¬µ«ÕÒ²»µ½¸ÃÍæ¼Ò£¬ÖØÖÃ!(RŒRR¸RR%RãRüRð(RR¼R½((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRcs     cCsd|jtjƒ}|dkr"dStj|ƒ}|rM|jtjdƒn|jtjdƒdS(Ni(RŒRR¹Rt FindNPCByIDRðR¸(RtcollectNPCObjIDR((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytClearCollectNPCvs cCs#t||tdƒ}t|ƒ|S(Ni(tDoGetCollectionNPCAwardLogicRÄRÀ(RR_tisOK((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytDoCollectNPCOK‰s
c
Cs©|j}|j}|j}|j}|j}tjdƒ}||kr]tjd|ƒdStj    ƒj
|ƒ}    tjd|||fƒt |    |||||ƒdS(NRŠs.¸ÃNPC²»ÊÇ×Ô¶¨Òå²É¼¯NPCÏä×Ó, ²»¿É¿ªÆô! npcID=%ss3OnOpenCollNPCBox...npcID=%s,openCnt=%s,isAutoBuy=%s( tMapIDRïtOpenCntt    IsAutoBuyt
IsOnlyGoldRwRxRRüR%RÿRÁ(
REt
clientDataR¼RßR_topenCntR¬t
isOnlyGoldR«R((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytOnOpenCollNPCBox™s                     c4 Cs•tjd||fƒtjdƒ}||krGtjd|ƒtS|dkrWtS||}t|ƒtkrˆtjd|ƒtSd\}}    |t    }
|
rÅt|
ƒdkrÅ|
\}}    ntj
ƒj |ƒ} | sätS| j ƒ} tjdƒ} d}d}| | krL|j ƒ}|jtj| ƒ}t| | ƒ}ntjdƒ}||krŽ||d}|jtj|ƒ}n|dkrætd||ƒ}t||ƒ}|dkrætjd    ||fƒtSn|    |}d}|dkr|dkrtj||ƒ\}}}|sFtd|||ƒn|}d}d}|dkr²| r²tjd
|||    |||fƒtj||t|||    gƒtS|dkrtj|tjƒ}||}|dkrítStj|tj|tƒstSqng}t||t ƒ}|d \}}t|ƒdkrW|dng}|sxtj!ƒj"ƒ}nd}|sŠ|r xkt#|ƒD]]} ||kr¯d nd}!t$||||!|||ƒ}"|"sÝPn|j%|"ƒ|d 7}q—W|dkrtSn|}|j&ƒ}#tj'|ƒ}$tj(|ƒ}%t|t)ƒ|}&t|t*ƒ|}'|t+|}(tj|ƒ})|)j,|&ƒi|tj-6}*tj.|tj/|'tj0|*ƒtj1||(ttd ƒtjd ||&|'|(fƒ|dkrœ|dkrœ|}+|s|\},}-|j2ƒj3tj4ƒ}.|dkr¡|+|krX|n|+}/|+|/8}+tj5||.|,|/tdƒtjd|/|j6ƒƒn|+dkr|dkr|+|krË|n|+}0|+|08}+tj5||.|-|0tdƒtjd|0|j6ƒƒqn|+dkrœt7|+|ƒ}1i|d6|+d6|tj86}2tj9|tj|1tj:|2|+ƒtjd|+||1f|j6ƒƒqœn|dkrx||}3| j ƒ} tjdƒ} | | krtj;|tj| |3ƒt<|| gƒn||krBtj;|tj||3ƒt<|d|gƒntjd||3fƒt=j>|t?j@||gƒntA||&|'|(||ƒtS(Ns5DoGetCollectionNPCAwardLogic...npcID=%s,collectCnt=%sRs    ·ÇÌØ¶¨²É¼¯NPC...npcID=%sis#CollectNPCCfg.txtÅäÖôíÎó£¬npcID=%siR‰RŠs=    ¸ÃNPCÒÑ´ïµ½×î´ó²É¼¯´ÎÊý: todayCollTime=%s,limitMaxTime=%ssW    ²É¼¯ÏûºÄÎïÆ·²»×ã,npcID=%s,costItemID=%s,costItemCnt=%s,collectCnt=%s,hasCnt=(%s+%s)it
Collections4    successCnt=%s,addExp=%s,addMoney=%s,addZhenQi=%st
CollectNPCs        ¿Û³ý°ó¶¨µÀ¾ß: %ss        ¿Û³ýδ°óµÀ¾ß: %stPerGoldt    unCostCnts;        ¿Û³ýÏûºÄ×êʯ: unCostCnt=%s,perGold=%s,reduceGold=%sR@s9        Ôö¼Óµ±Èղɼ¯´ÎÊý: todayCollTime=%s,updCollTime=%s(ii(BRRüRwRxR RÄR
R‚RFR–RuRvRR‘R®RR“R¤R”RRVRútGetPackItemBindStateIndexInfoRRR˜tPlayerSuperMarkettGetStoreItemPriceRtTYPE_Price_Gold_Moneyt    HaveMoneyt__GetGiveCollectItemInfotDef_CollNPCCfg_GiveItemModeIDR¨R©Röt __DoGiveCollectionNPCSingleAwardtextendRtGetPlayerReExptGetPlayerReMoneytDef_CollNPCCfg_ExpFormattDef_CollNPCCfg_MoneyFormattDef_CollNPCCfg_ZhenQiRtDef_Give_Reason_SonKeyRRtDef_GiveMoney_CollectNPCtPlayerAddZhenQiRµR¶Rt
ReduceItemRRZtDef_Cost_Reason_SonKeytPayMoneytDef_Cost_BuyStoreItemR¿tSyncCollNPCTimeRRRBtSuccType_CollecttSyncCollectionItemInfo(4RR_R¬t
collectCntRßRÊR„R…R®R¯R­RR§R¨R¥R¦R©R«t canCollectCnttcostItemCntTotaltbindCnttcostItemIndexListt    unBindCntR´tlackCosttitemGoldtgiveItemInfoListt    prizeInfot pieRandomListtrandomAllInfoListtbesureInfoListt
successCntRþRêt getItemInfotreLVtreExptreMoneyR3taddMoneyt    addZhenQiR+t addDataDictRÏt bindIndexListtunBindIndexListR°t bindCostCntt unBindCostCntt
reduceGoldtinfoDictt updCollTime((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRÁ©sø  
 
 
#     
 
"            
 
        
   cCsg}|r+tj|ƒ}|j|ƒn|r|\}    }
g} xv|
D]n} | d} | d}| tjkr|j|ƒ|    d8}    qJntj| tjƒs«qJn| j|ƒqJW|    dkr| rt|    t| ƒƒ}|jt    j
| |ƒƒqn|r£|j t j |ƒ}|\}}||kr\|g}tjd|||fƒn||kr£|d7}tj|t j ||ƒtjd|ƒq£ntjd|ƒg}xÏ|D]Ç\}}}tj|tjƒséPn|pò|}tj|ƒ}|jƒ}|j|ƒ|j|ƒtj|||ƒtj||ttddti|d6gƒsoPn|j||||gƒqÁW|S(    Niis7    ´Ë´Î±Ø³öÎïÆ·, npcID=%s,besureCnt=%s,collTotalCnt=%ss    ¸üвɼ¯×Ü´ÎÊý: %ss%    ×îÖտɵõ½ÎïÆ·giveItemInfoList=%sRðRÍR_(RRiRýRBRõRfRVR
RØRltsampleR®RtDef_PDict_CollNpcCollTotalCntRüRR¿RúR™RRRþRÿt GetUserDataRrRstNotifyItemDropByKillRRÄR (RRßR_tsetBindRòRóRôRðtpieRandomItemInfot maxRandomCnttrandomInfoListtrandomInfoListExtitemInfotgiveRatetappendItemInfot getRandomCntt collTotalCntt    besureCnttbesureItemInfotsyncItemInfoListR0RÆRêt
getItemObjtuserData((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR×Hs\  
 
 
       
    c    Cs«dS|dkr3|dkr3|dkr3| r3dStjƒ}|jƒ||_||_||_||_g|_x |D]}d\}}    }
} } t|ƒdkr¼|\}    }
} nQt|ƒdkrã|\}}    }
} n*t|ƒdkr |\}}    }
} } n|    dkrq}ntj    ƒ} | jƒ|| _
|    | _ |
| _ | | _ t| ƒ| _| | _|jj| ƒq}Wt|jƒ|_tj||ƒdS(NiRdiii(iiiis(RùttagMCCollectionItemInfoRRïtExpt SilverMoneytZhenQit CollItemListR
ttagMCCollectionItemtItemTypetItemIDtItemCnttIsBindt ItemInfoLentItemInfoRýt CollItemIDCntRR(RR3RúRûRt collectNPCIDt collItemInfot syncItemInfoRZR0RÆRêR tcollItem((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRç£s@+ 
                       
                    c
Cs5|sgggSd}|jƒ}xH|jƒD]:\}}|d|koZ|dknr/|}Pq/q/W|s}gggStjd|ƒ}|s gggSd}|jƒ}x*|jƒD]}    ||    kr¿|    }Pq¿q¿W||kr tjd||fƒgggStjd|||||fƒ||S(NRdiisCollectItemInfo_%ss+CollectItemInfo_%s.txt can not find key=%s!s@    __GetGiveCollectItemInfo job=%s,modeID=%s,key=%s,itemList=%s((    RRTRwRxR]RfRRFRü(
Rt lvModeIDDicttmodeIDRztlvKeytmIDStrtcollectItemInfoDicttinfoKeyR.R((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRÕÎs2
 $
 
 
    cCsï|s$tjdƒ}|jƒ}n|sHtjdƒ}|jƒ}n|rëtjƒ}|jƒg|_xV|D]N}tjƒ}|jƒ||_|j    t
j |ƒ|_ |jj |ƒqtWt|jƒ|_tj||ƒndS(NR‰RŠ(RwRxRfRùttagMCNPCIDCollectionCntInfoRtNPCCollCntListttagMCNPCIDCollectionCntRïR®RR”t CollectionCntRýR
t
CollNPCCntRR(Rt funcTypeListR@R¨tcollectNPCIDTimeLimitt npcIDCollInfoR_t collCntInfo((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRåós&  
      
    cCsÖtjdƒ}|s!|jƒn|}xB|D]:}tj|tj|dƒtj|tj|dƒq.Wtjdƒ}xJ|jƒD]<\}}|d}|sªqˆntj|tj    |dƒqˆWt
|ƒdS(NR‰iRŠi( RwRxRfRR¿RR“R’RTR”Rå(RR3R¨tfuncTypeR4R_R6t isResetOnDay((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytCollNPCTimeOnDays 
 
c    Cs i}|s|Stjƒ}tjdt|ƒƒg}xIt|jƒƒD]5}|j|ƒ}|jƒ}|dkrqLn|jƒ}||krqLn|j    |ƒd}    t
j |ƒ}
|j ƒ} |j ƒ} t
j|ƒ} d}|jƒtjks|jƒ rbd}    |jƒ}|dkrbtd||jƒƒ}td||ƒd}qbn||
| | | |    |g||<qLWtjdt|ƒƒ|S(NsGetNPCInfo...queryNPCIDList=%siiiès    npcInfoDict=%s(RRèRüR°Rxt GetNPCCountt GetNPCByIndexRR9RýRQRSR•R–RRRÃRRÄtIsAliveRwRR^(tqueryNPCIDListR¼t npcInfoDicttgameNPCManagert findNPCIDListRERtcurIDRWtisAlivetcurHPRHRItmaxHPtrefreshRemaindSecondt 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ùttagMCNPCInfoListRRÄt    PlayerCntt NPCInfoListRTt tagMCNPCInfotObjIDRïtNPCHPR8RûRütIsActivet RefreshSecondRýR
t
NPCInfoCntRR(RRßt    playerCntR>t npcInfoPackRAtnpcInfoRWRCRDRHRIRBRE((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt SyncNPCInfo]s* 
             
                                cCsøi}|s|Stjƒ}tjdt|ƒƒx§t|jƒƒD]“}|j|ƒ}|jƒ}|dkryqFn|jƒ}||kr—qFn|j    ƒt
j ksF|j ƒ r¿qFn|j |dƒd||<qFWtjdt|ƒƒ|S(Ns!GetNPCCntInfo...queryNPCIDList=%siis    npcCntDict=%s(RRèRüR°RöR:R;RR9RÃRRÄR<R¬(R=R¼t
npcCntDictR?RERRARW((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt GetNPCCntInfo|s$     "cCs£tjƒ}|jƒ||_g|_xR|jƒD]D\}}tjƒ}|jƒ||_||_|jj    |ƒq5Wt
|jƒ|_ t j ||ƒdS(N(RùttagMCNPCCntListRRÄRKRTttagMCNPCCntInfoRïtCntRýR
RQRR(RRßRVRSRtnpcCntRT((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‚|\} }}}} |d|d    |} tj|| ƒ}|r5|\}}}||kr5||kr5||kr5t}
q5n|
s?dSt|||||| | gƒ}tjƒj    d
d
d
d |t
|ƒƒtj d ||ƒ|||||| g}t j d
d |ƒdS(NtDropRecordBossIDitDropRecordEquipmenttDropRecordValuetDropRecordNormalRdi'ièiditBossDropGoodItems$·¢ËÍGameServer¼Ç¼ʰȡµôÂäºÃÎïÆ·: %st
DropRecord(R:RòR RÄRERR@R°R%R&R
RüRRg(RßR_t
playerNameRFR0RŠt recBossIDListtrecDropEquipInfoDicttrecSpecialItemIDListt recItemIDListt
needRecordt itemUserDatat weightValuet
equipPlacet itemClassLVt    itemColort itemQualitytrecordConditiont needClassLVt needItemColortneedItemQualityt dropEquipMsgR((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytSendGameServerGoodItemRecord¬s:   $ !(cCsdS(N((RERÈR¼((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytOnBuyCollectionCntßs!cCsdS(N((RERÈR¼((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytOnBuyKillBossCnt
scCss|j}|j}tjƒjtj|ƒ}|s8dStjƒjtj|dƒtjd|||fƒdS(Nis,ClientNPCShowEnd npcID=%s,endType=%s,tick=%s(    RïtEndTypeRR<RDRRZRRü(RERÈR¼R_tendTypeR^((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt OnNPCShowEnd1s        cCsZtjddƒ}tjƒjtjƒd}||krVtjddƒ}||kStS(Nt    BossShuntii(    R:RgRR@RARBtDef_Notify_WorldKey_ServerDayRòR (RßtbossShuntMaxServerDayt openServerDaytbossShuntMapIDList((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRø;s  
cCs^||f}tjj|iƒ}||jƒ|g||jƒ<|tj|<t||ƒdS(N(RMRR¬R¬RR(RRßRR_R¼RR((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytAddBossShuntRelatedPlayerDs    cCs||f}tjj|iƒ}t|||gƒ}tjƒjdddd|t|ƒƒtjd|||f|ƒdS(NitWorldBossShuntInfosE֪ͨGameServerµØÍ¼Boss·ÖÁ÷ÐÅÏ¢: mapID=%s,lineID=%s,shuntPlayerDict=%s(    RMRR¬R°RR%R&R
Rü(RßRRRtmsgStr((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRMs  ((”RRRR6RRYRSRR·t PlayerTruckRŸRµRþRúRLRwR‰RRTRBR RøRùR'RRªR=RRBRÑRÁR¥tPlayerMagicWeaponRGRJR>R:RMRáRþRQRRlRR#RRöRxRyRzR{R|tNPCAttr_DynNPCLVMaptNPCAttr_DynPCCoefficientMapRRRRRR R#R%R'R)R+R-R0R2R4R RmRNRNRpRWR§RÄR÷RÅRsRdRqRÆRkR°R²RwR«RtRwR}RR‡R‚R”R¡RªR²RÀRÂRÆRÎRÙRçRøRòR    R(R)RóR|R~R¢R‚RƒRŽR–R›RÛRÜRÝRÖR˜R•R‡R·RšRRÀRÃRËRÁR×RçRÕRåR9RHRURWR\RtRuRvRyRøRR(((sfE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt<module>s                                             
                                                             \{    ­        ›ÿ+    $    -            « 3        4        *             
                !    !    +    >    ]             -        4 ÿÿÿÿÿÿÿÿÿÿÿ²                           *        f                    Ÿ    [ +    %%     /             3    +    '