hwj35
2025-07-02 be2004bc6492efa067d8fc7ab2a84dd61dba819f
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
„Qbhc    @sˆddlZddlZddlZddlZddlZddlZddlZddlZddlZddl    Z    ddl
Z
ddl Z ddl Z ddl Z ddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl!Z!ddl"Z"ddl#Z#ddl$Z$ddl%Z%ddl&Z&ddl'Z'ddl(Z(ddl)Z)ddl*Z*ddl+Z+ddl,Z,ddl-Z-ddl.Z.ddl/Z/ddl0Z0ddl1Z1ddl2Z2ddl3Z3ddl4Z4ddl5Z5ddl6Z6ddl7Z7ddl8Z8ddl9Z9ddl:Z:ddl;Z;ddl<Z<ddl=Z=ddl>Z>ddl?Z?ddl@Z@ddlAZAeBZCeDdƒ\ZEZFZGZHZIZJd„ZKeBd„ZLd„ZMd„ZNd„ZOd„ZPd    „ZQd
„ZRd „ZSd „ZTd „ZUd„ZVd„ZWd„ZXd„ZYd„ZZd„Z[e\d„Z]d„Z^d„Z_ddeBd„Z`eBeBe\gdgde\d„Zaebebd„Zcddebdgd„ZddZed„ZfgeBebebdd „Zgd!„Zhd"„Zid#„Zjd$„Zkd%„Zld&„Zmd'„Znd(„Zod)d*„Zpd+„Zqdd,„Zrd-„Zsd.„Ztd/„Zud0„Zvd1„Zwd2„Zxd3„Zyd4„Zzd5„Z{d6„Z|d7„Z}d8„Z~d9„Zd:„Z€d;„Zd<„Z‚e\ebd=„Zƒebd>„Z„dddddd?„Z…d@„Z†dA„Z‡dB„ZˆdddC„Z‰dD„ZŠdE„Z‹ebgdF„ZŒdG„ZdH„ZŽdIfdJ„ƒYZdK„ZdL„Z‘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žde\e\dZ„ZŸdd[„Z eBd\„Z¡d]„Z¢d^„Z£gd_„Z¤d`„Z¥da„Z¦eBdb„Z§dc„Z¨gdd„Z©de„Zªdf„Z«dg„Z¬dh„Z­di„Z®dj„Z¯dk„Z°ddl„Z±dm„Z²dn„Z³do„Z´dp„ZµdS(qiÿÿÿÿNicCsrtjtd|jƒdfƒ}|dkrG|jƒjtjƒn
||ƒ|j    t
ƒ|j tj ƒdS(Ns AIType_%d.%stDoInit( t    GameWorldt GetExecFunctNPCAIt    GetAITypetNonet GetNPCAngrytInittChConfigtDef_Default_NPC_Angry_CounttSetIsNeedProcesstFalsetSetTickTypeCounttTYPE_NPC_Tick_Count(tcurNPCtcallFunc((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytInitNPCis" 
 cCs“t|dƒr(t|jƒ|jƒƒS|r‰tj|ƒr‰|jƒ}tjtj|ƒƒ}tj    d||ƒ}|r‰|jƒSn|jƒS(NtGetCurLVtNPCRealmStrengthen(
thasattrtmaxRtGetLVt PlayerControltGetRealmDifficultytGetNPCIDtGetDifficultyRealmLVt IpyGameDataPYtGetIpyGameDataNotLog(Rt    curPlayertnpcIDt needRealmLVtrealmNPCIpyData((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGetNPCLVxs  cCs5tjd|ƒ}|s1tr-tjƒ}n|S|S(NtNPCEx(RRR t    IPY_NPCEx(Rt    npcDataEx((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt GetNPCDataEx„s cCs
|jƒS(N(t
GetMAtkMin(R((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt
GetRealmLVscCs |j|ƒS(N(t
SetMAtkMin(RtrealmLV((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt
SetRealmLVŽscCs
|jƒS(N(t
GetWindDef(R((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGetIsLVSuppressscCs&t|jƒƒ}|r"|jƒSdS(Ni(R$RtGetFightPowerLackAtkLimit(RR#((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR,scCs,t|jƒƒ}|r"|jƒS|jƒS(N(R$RtGetSuppressFightPowert GetThunderDef(RR#((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR-“scCs|jt|tjƒƒS(N(t SetThunderDeftmint ShareDefinetDef_UpperLimit_DWord(Rtvalue((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytSetSuppressFightPower–scCs
|jƒS(N(t
GetFireDef(R((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGetCommendFightPower—scCs
|jƒS(N(t GetThunderAtk(R((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGetDropOwnerType˜scCs tj|ƒS(N(tGameObjt
GetFaction(R((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR:™scCs
|jƒS(N(t GetPoisionAtk(R((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGetSkillAtkRatešscCs
|jƒS(N(t
GetFireAtk(R((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt GetFinalHurt›scCs |j|ƒS(N(t
SetFireAtk(Rthurt((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt SetFinalHurtœscCs
|jƒS(N(t
GetWindAtk(R((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGetSkillEnhancescCs
|jƒS(N(t GetPoisionDef(R((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt GetNPCSeriesžscCs_|jƒ}tjd|ƒ}|s(dSd}d}tjƒ}|jƒr¦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((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytDoNPCAttrStrengthen s–
            *       
c Cs:tjƒjƒ}|jƒ}tjddƒ}tj|jƒƒ}t    j
j |iƒ}|||<|t    j
|<||}g}x[|j ƒD]M\}    }
||
kr¬qŽnt |    tƒrË|j|    ƒqŽ|t|    ƒ7}qŽWtjd||||fƒ|jƒ} x|D]} | j| ƒqWtj||ƒdS(Nt
FBRobotCfgis2¸ø»úÆ÷ÈËNPC¼¼ÄÜ: objID=%s,robotJob=%s,npcLV=%s, %s(RRNt    GetLineIDtGetIDRtGetFuncEvalCfgRYtchoicetkeyst
PyGameDatatg_fbRobotJobDicttgetRlt
isinstanceRptappendtlisttDebugLogtGetSkillManagertLearnSkillByIDRetOnRandomRobotJob( RtnpcLVtlineIDtobjIDt jobSkillDicttrobotJobtlineRobotJobDictt skillInfoDictt skillIDListt    skillInfotneedLVt skillManagertskillID((seD:\SG_ServerCode\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¤((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__DoGiveVSPlayerNPCSkill0s   
  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((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRgDsÆ
 
 
 
                                       ( 
 
 
        
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%((seD:\SG_ServerCode\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((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR:`s<   
 
 
 
!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((seD:\SG_ServerCode\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((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGetNPCDropIpyDataçs,
    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        -    Ã¿¸öλÖõĽð±ÒÊýÁ¿
    NtRealmDifficultyiRsE³¬¹ý×î´ó¿ÉµôÂäµÈ¼¶£¬²»µôÂäÎïÆ·£¡npcID=%s,playerLV(%s) > maxDropLV(%s)s&»ñÈ¡NPCµôÂäÅäÖôíÎó!±í²»´æÔÚ¸ÃNPCID=%sitOpenJobidi'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ˆÃ@tmaxRates>δÅäÖÃÑÕÉ«ÊÇ·ñÌ××°¶ÔÓ¦²¿Î»¼¯ºÏ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=%st    MutexDropt AuctionItems$×îÖÕµôÂäÎïÆ·: 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_GradetGetIsDropJobSelftGetJobtDef_FB_DropDoCountAddtDef_FB_DropDoCountRateR)tNomalDictGetPropertytDef_PDict_NPCKillCountRtGetDropEquipPertGetDropEquipDoCounttGetCanDropRatePlustpowtGetPieRateDoCntt__GetNPCDropDoCountChanget__GetNPCPieRateEquipDroptGetIndepRateDoCntt__GetNPCIndepRateEquipDroptGetTianxuanEquipRateListtTruetGetResultByRandomListR“tGetKillCountDropEquipPubtGetKillCountDropPubtinsertRRYRtNomalDictSetPropertytGetEquipColorMaxDropCounttGetEquipColorSuitInfotGetEquipPartKeyRateInfotGetColorSuitPartOptimizationtGetEquipClassLVtDef_PDict_DropColorTodayR‘R8Rpt    CanHappentDef_NPCMaxDropRatetGetAllEquipPlaceByPlaceKeyt__GetOptimizationEquipPlacetGetEquipPlaceByPlaceKeyt__GetEquipIDListt__GetRandDropSuitEquipIDt__GetAppointDropItemIDListtGetTianxuanItemKeyRatetGetTianxuanItemIDRatetGetKillCountDropPritGetKillCountDropItemListtGetPriItemIDDropRætPlayerFeastWishtGetFeastWishDropItemIDListtextendt
GetFuncCfgtDef_FBMapID_PersonalBosstGetDictValueByKeytPlayerActBossTrialtGetBossTrialDropItemIDListt__RemoveMutexDropIDtGetDropMoneyDoCnttGetDropMoneyRatetDef_NPCMapDropRateR*t__GetDropMoneyValuetGetAucionItemCanSellt
IsGameBosstGetLayert    BuffSkillt SetBuffLayer(pt
dropPlayerRRtownerPlayerListR¨tisSingleR!R"R‚tplayerLVt    maxDropLVRtrealmMapIDListtrealmDifficultyR(Rçt tianxuanStatet tianxuanBuffRbRcRdRet itemJobListRzt
doCountAddt doCountRatettagJobtdropEquipKillCountPubtdropItemIDKillCountPubtequipDropRatePlustequipDropDoCountPlust ownerPlayertkillCountValuetequipPubKillCounttitemIDPubKillCounttdropRatePlusValuetdropEquipInfoListt pieRateDoCnttindepRateDoCntttianxuanEquipRateListRat
tagClassLVttagColort    tagIsSuitt tagPlaceKeytkillCountDropEquipPubtkillCountDropItemPubtmaxRecordDropEquipKillCountPubtmaxRecordDropItemIDKillCountPubttagIndextkillCountItemIDListtkillCountRandItemIDListtklllCountRandItemIDtisUpdtitemIDPriKillCounttupdKillCountValuetgradeColorSuitRateDicttfbGradeColorSuitRateDicttequipColorDropLimitDaytcolorDropCntDicttcolorMaxDropCntDicttcolorSuitRateDicttcolorSuitPlaceKeyInfoDicttcolorSuitPartOptimizationtoptColort    optIsSuittoptPlacet dropEquipInfotclassLVtcolortcolorCountTodayt colorCountMaxtmaxCountt    dropCounttisSuittplaceKeytjobListtsuitRatetsuitRateEffListt suitRateEfft colorSuitKeytallEquipPlaceListt    placeListtrandEquipIDListt
randItemIDtkillCountDropInfot needKillCounttkillDropItemListtkillCountDropIDListt kDropItemIDtfbGradePriItemIDDropDicttgradePriItemIDDropDicttpriDropInfoListt priDropIDListt    priItemIDt priItemCountt    priDropIDtfbGradeDropItemExDicttgradeItemExDicttgradeItemExListt    gItemExIDt gItemExCounttfeastWishDropIDListtkillBossCntLimitDictt
limitIndext bossTrialDroptbossTrialItemIDtbossTrialItemCounttdropMoneyDoCntt dropMoneyRateRmtdropID((seD:\SG_ServerCode\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((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRßUscCsmtjddiƒ}||kr@g||D]}|d^q,Stjddiƒ}||kri||SgS(NtEquipDropPartSetsii(RRŒ(R4tplaceKeyRateListDicttrateInfotplaceKeyListDict((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRÛbs  cCsg}tjddiƒ}||krU||}tj|ƒ}|rU|g}qUn|sŒtjddiƒ}||krŒ||}qŒn|S(NR[ii(RRŒRRÎ(R4R;R\t placeRateListtplaceR^((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRÝks 
 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-R)R*t optPlaceListt
minGSPlacetminGSt    equipPackR+R«t
equipIndextcurEquiptcurColort    curIsSuittcurGS((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRÜ~s,     cCsO|tjkr/tdt||dƒƒ}n|rKtd||ƒ}n|S(NigˆÃ@(RR)RRp(tdoCountRR((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRÈ¢s
 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((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRîªs    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(NR°iR 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•RÎRYRt__dropIDCountLimitTodaytGetItemIDDropRatetGetItemIDMaxDropCountRâRNRpttimeROR1t Def_Notify_WorldKey_LastDropTimeRætGetPlayerManagertGameServer_QueryPlayerResulttDataRecordPacktDR_GlobalDropCDt$Def_Notify_WorldKey_DropNPCKilledCntRÛRÜRÝtDR_GlobalDropRateR0t"Def_Notify_WorldKey_NPCKilledCountR2tLogR¯R,t GetJobLimit(;RRR¨RRRtdropItemIDListtitemDropLimitDayInfoR¦R t itemDropSetstitemDropRateSetstItemKeyMaxDropCountDicttItemKeyDropRateJobDictt
jobItemKeytdropRatet jobItemListt mustDropCountt canDropCounttdoCntRmt    jobItemIDtItemKeyDropRateDictttianxuanItemKeyRateDictRYtrandItemRateListR=t randItemListtitemIDDropRateDicttitemIDDropMaxCntDictttianxuanItemIDRatetglobalDropCDDicttglobalDropRateDicttgwR[tcurTimet lastDropTimetcdTimet
remainTimetmsgInfoRat    npcIDListt
rateFormatt    killedCnttisDropt updKilledCnttglobalKillDropDicttkillCountDropDicttupdNPCKilledCountt
isJobLimittitemIDCountDicttrandItemIDCountListRhRftitemJobtrandJobItemListtrItemIDt
rItemCountt randItemCount((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRàÀs(    
 
 
 
 
 
 
                  (    , 
&(        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 RÁRtDef_PDict_DropCountTodayRR•R?RÍRRÒ(RR[R’tdropCountTodayMaxtdropCountToday((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRƒ…s 
  
 tNPCc    Csntjstjdƒ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ªnxf|D]^}|\}}}|r|r||krqÕn|dk}||kr&qÕn|j|ƒqÕWqªW|sjtjd|||||||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Rl(tfindIDR-R.R3R;RtfindTypetkeytfilterItemIDDicttgameDatat itemTypeListtitemTypetiRftsuiteIDR¸RgR[t placeItemListRZR€Rq((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRÞ–sZ               
"         cCspg}|jƒ}|s|ntj||ƒ}x9t|ƒD]+}tj|ƒ}|r=|j|ƒq=q=W|S(N(tGetPieRateDropRtGetPlusPieListR*RÎR“(R¨Rœt equipDropPlusRtpieRateDropListt dropRateListRmRa((seD:\SG_ServerCode\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(    NR¯iiR²i'gˆÃ@gY@R±(RtGetIndepRateDropRRŒRæR8R*t    iteritemsRpRtDef_Quality_OrangeRÚRRÙR“(RR¨RœRÕR"Rt indepRateDicttgradeColorRateDicttfbGradeColorRateDicttorangeEquipPertfbGradeOrangeEquipPerDicttorangeEquipPerListRRmRatrateR˜R.t colorRateListt    colorRateRšt curDropCount((seD:\SG_ServerCode\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((seD:\SG_ServerCode\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(RÁRRÂRR¯R,RSRR¾R“R•R?RRÒ( RRR?R@R
t killCountPritupdRecordValuet jobDropInfoRµt
dropItemIDRfR¸((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRä*s.
 
       ##cCs>tjddƒ}|dkr"dS|||dkr:dSdS(Niii ièi(RYRZ(tcurTicktlastActionTickR¨((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytIsInActionTimeUs  cCs|jƒtjkrtStS(N(tGetGameNPCObjTypeRbt
gnotSummonRÍR (R((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt IsSummonNPCdscCsIxBtd|jƒƒD]+}|j|ƒ}|jƒ}|jƒqWdS(Ni(trangetGetSummonCounttGetSummonNPCAtRR=(RRÐt    summonNPCtangry((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytClearSummonAngry_Playeros cCsD| st|dƒ rdS|jƒ}|dkr7dStj|ƒS(NtGetOwner(RRþRRt GetObjDetail(RûtcurSummonOwner((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGetSummonOwnerDetelys   cCs3t|ƒ}|stS|jƒtjkr/tStS(N(tGetNpcObjOwnerDetailR tGetGameObjTypeRbRcRÍ(tnpcObjt ownerDetail((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGetNpcObjOwnerIsPlayerŠs  cCsU|jƒ}d}|tjkr0t|ƒ}n!|tjkrQtj|ƒ}n|S(N(RõRRbRöRtgnotPett
PetControlt GetPetOwner(Rt
npcObjTypeR((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR›s cCs±|dkrdSt|dƒsN|jtjƒ}|rJtj|tjƒSdS|j    ƒ}|dkrjdStj|j
ƒ|ƒ}|dkr­|tjkr­|j ƒr­dS|S(NRþ( RRR_Rt!Def_NPC_Dict_SummonMapNPCPlayerIDRRaRbRcRþR‹Rh(t
curobjTypet    curSummonRRtcurSummonOwnerDetel((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGetSummonNPCOwner¯s   'c
CsÜtjƒ}|jƒ}|jƒ}d}x«|D]£}|j||d||dƒ}|seq1nxltd|jƒƒD]U}|j|ƒ}    tj    |    ƒdkr«q{n|    j
ƒt j krÆq{n|d7}q{Wq1W|S(Nii( RRàtGetPosXtGetPosYt    GetPosObjRøt GetObjCountt GetObjByIndexR9RkRRbRc(
RtmatrixRƒtsrcPosXtsrcPosYtcurPlayerCounttcurPostmapObjRÐtcurObj((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGetPlayerCountInSightByMatrixÐs     "cCsèg}|jƒ}xÏtd|ƒD]¾}|j|ƒ}|dkrIq"n|jƒtkraq"n|jƒ}|tjkr‚q"n|j    ƒr”q"nt
j |ƒdkr¯q"nt j |jƒ|ƒ}|sÓq"n|j|ƒq"W|S(Ni(tGetInSightObjCountRøtGetInSightObjByIndexRt
GetVisibleR RRbRcRhR9RkRRaR‹R“(RtplayListt seeObjCountRÐtseeObjt
seeObjTypet curTagPlayer((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGetInSightPlayerList_NPCñs(    c Cssg}|jƒ}xZtd|ƒD]I}|j|ƒ}|dkrIq"n|jƒtkraq"n|jƒ}|tjkr‚q"n|j    ƒr”q"nt
j |ƒdkr¯q"n|j ƒ}||j ƒkrà|j |ƒq"n|sìq"n|jƒ}    tj||ƒ}
|
sq"n|
jƒ} |    dks"| dkr@q"n|    jƒ| jƒkr^q"n|j |
ƒq"W|S(Ni(RRøRRRR RRbRcRhR9RkR‹R“tGetTeamRRat    GetTeamID( RRût    checkTeamR tseePlayerCountRÐR"R#tseeObjIDt curPlayTeamR$t
curTagTeam((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGetInSightPlayerList_SummonNPCs@        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øRRRR9RkRRt    IsSameObjtGetDistRRRaR‹RRRt AttackCommontCheckCanAttackTagt
BaseAttacktGetTagRelationRtType_Relation_EnemyR ( Rt    checkDistt
checkCountttickR\R1RÐR"ttagDistt seeObjDetailtrelation((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt&CheckCanAttackTagLimitCountInSight_NPCZs<  0  
cCs
tjƒS(N(tGameLogic_FamilyInvadetGetDefaultMaxAngryNPCIDList(((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR=·scCs9|jƒtjkrdS|jƒs5|jtƒndS(N(t GetCurActionRbtlaNPCDietGetIsNeedProcessR
RÍ(R((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytSetNPCInBattleState¿s
 cCsp|jƒg}|jƒ}xHt|jƒƒD]4}|j|ƒ}|sOq.n|j|jƒƒq.Wt|ƒS(N(t
GetAtkDistR–Røt GetSkillCounttGetSkillByIndexR“R(RtdistListR£Rtskill((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGetNPCMaxAtkDistÓs cCs»|jƒtg|jƒtg|jƒtg|jƒtgg}|rd|j|jƒtgƒn|jƒtj    kr•|j|j
ƒt gƒn|r·|j|j ƒtgƒn|S(N( t GetBuffStateR tGetDeBuffStatetGetProcessBuffStatetGetProcessDeBuffStateR“tGetAuraRõRbRt GetPassiveBufRÍtGetActionBuffManager(Rt getActionBufft getAuraBufftbuffRefreshList((seD:\SG_ServerCode\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((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytChangeNPCMoveTypes*   ) #c
CsOtjƒjƒ}|sdStjƒjƒ}    |j|ƒ|j|    ƒ|dkrd|j|ƒnt|ƒ|dkrŠ|j    |ƒn|dkr¬|j
t j |ƒn|dkrÈ|j |ƒn|dkrê|j
t j|ƒn|jƒt jkrt||jƒƒn|j||tƒt|ƒj|    ƒtj||    ƒ|S(Ni(Rt GetNPCManagertAddPlayerSummonNPCRNtGetTickt SetNPCTypeIDt SetBornTimet    SetAITypeRt SetLastTimetSetDictRR t SetSightLeveltDef_NPC_Dict_SummonRefreshIDR\RsRtRtRebornR t
NPCControltDoNPCRebornCommLogicRetDoFBRebornSummonNPC(
tnpcIdtrebornXtrebornYtaiTypetlastTimeR‚Rxt    refreshIDR R7((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt SummonMapNpc/s.   
    cCs‰tjƒ}|jƒ||_||_||_tjƒ}xEt|j    ƒƒD]1}|j
|ƒ}|sqqPnt j ||ƒqPWdS(N( tChPyNetSendPackttagMCSummonMapNPCR=R$tPosXtPosYRtGetMapCopyPlayerManagerRøtGetPlayerCounttGetPlayerByIndext NetPackCommont SendFakePack(tsummonIDt
rebornPosXt
rebornPosYtmapNPCt playerManagerRR((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__NotifyMapPlayerSummonMapNPCWs 
             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
clientDataR7RR›RR((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytOnRecyclePriWoodPilens    
cCsStjƒj|ƒ}|j}|j}|j}|j}t|||||ƒdS(N(RRˆR|R$tCounttHPtHPExtSummonPriWoodPile(RRˆR7RRR\thpthpEx((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytOnSummonPriWoodPile‡s                c    Cs.tj|ƒ}tj|ƒ}|rctj|||||ƒsctjd||||fƒdSn|dkr~d\}}n|jƒ}|tj    kr©gtj    |<ntj    |}d}    t
|ƒ}
t ||    |
ƒ} tj d|||    |
| ||fƒ| dkrdStj ƒ} x
t| ƒD]ü} | jƒ}|j|ƒ|j|jƒƒt|ƒ|jtj|ƒtj|jƒ|jƒdƒ}|j|jƒ|jƒtƒt|ƒjdtƒ|sÛ|r|t j!|}t"j#||ƒt"j$||ƒn|j%ƒ|j&|ƒq*WdS(    s ÕÙ»½Ë½ÓÐרÊôľ׮¹Ö
    s3ÎÞ·¨ÕÙ»½Ä¾×®¹Ö!mapID=%s,lineID=%s,npcID=%s,count=%sNiiisPÕÙ»½Ä¾×®: npcID=%s,count=%s,maxCount=%s,nowCount=%s,summonCount=%s,hp=%s,hpEx=%sRu(ii('RRŠR‹RetOnCanSummonPriWoodPileRRSR?Rtg_playerPriWoodPileNPCDictR8R0R•RaR*RbRdRiR[RRhRR`tGameMaptGetEmptyPlaceInAreaRRRkR Rlt ResetNPC_InitRÍR1tDef_PerPointValueR9RoRmt NotifyAppearR“(RRR\RŽRRRšR‚tplayerPriWoodNPCListR1tnowCountt summonCountt
npcManagerRmRût    summonPosthpTotal((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRsH            
! 
cCs\|jƒ}|tjkrdStjj|ƒ}x$|D]}|sJq8nt|ƒq8WdS(N(R?RR’tpopR‡(RR‚R˜Rû((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytClearPriWoodPileÈs  cCs¿g}|jƒ}|jƒ}tjd||fƒx6t|jƒƒD]"}|j|ƒ}|j|ƒqHWx|D]}t|ƒquW|j    ƒt
j kr®t j |ƒn|jtjƒ}|dkrâ|jtjdƒntj|ƒ}|r|jtjƒjƒƒntj|ƒrîtjd|ƒ}    |    r¶|    jƒtjtjgkr¶t|dƒtjƒjtj |tjƒjƒƒt!|ƒtj"kr¶t#j$|ƒq¶nt%j&|ƒ|tj'ddƒkrît(j)|ƒqînt*j+|ƒt,j-|ƒt.j-|ƒ|j/ƒtj0krwtjƒj1ƒ}
t2j3j4|
iƒ} | j5|jƒdƒ| t2j3|
<n|jtj6ƒ} | dkr | t2j7kr t2j7| } xY| D]N}|r¸|jƒ|jƒkr¸| j8|ƒ| st2j7j5| ƒnPq¸q¸Wnt9}t:j;ƒ}|j<|ƒ}|rtt=}t>j?ƒ}|g|_@tA|j@ƒ|_B|jC|ƒn|j|jtjDƒ|jtjEƒ|jtjFƒ|ƒ|jG|ƒdS(NsSetDeadEx objID=%s,npcID=%sitBOSSInfotCrossYaomoBossi(HR‹RRR•RøRùRúR“R‡RRbtgotNPCRet DoFB_NPCDeadR_RR RhtNPCRealmRefreshtGetTagNPCRefreshtSetDeadRNRcRôRRRátDef_FBMapID_SealDemontDef_FBMapID_ZhuXianBosstGameServe_GameWorldBossStateRJt SetGameFBDicttMap_NPC_WorldBossDeadTickR8tDropOwnerType_FamilyRLtClearFamilyOwnerBossHurttChNPCt OnNPCSetDeadRétPlayerCrossYaomoBosstOnCrossYaomoBossDeadR0tClearTeamPlayerHurtValuetNPCHurtManagertDeletePlayerHurtListt
NPCHurtMgrR\RsRŠRRR‘RžR`R’RtRÍt
TurnAttacktGetTurnFightMgrtgetNPCTurnFightR t ChNetSendPackttagNPCDisappearR$R8RŠt
addBatPacktDef_NPCDead_ReasontDef_NPCDead_KillerTypetDef_NPCDead_KillerIDt
delNPCGUID(Rt summon_ListR›tnpcidRt curSummonNPCRûRt
refreshObjR«RšRžtpriWoodPilePlayerIDtpriWoodPileNPCListt
priWoodNPCt notifyClientttfMgrt    turnFightt
clientPack((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR‡×st    $ )            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((seD:\SG_ServerCode\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_CrossZoneMapTableNameRRet    GetZoneIDtSetGameWorldDictR1t,Def_Notify_WorldKey_GameWorldBossRebornCrosstDef_CrossDynamicLineMapRâtGetCrossDynamicLineMapZoneIDt'Def_Notify_WorldKey_GameWorldBossReborn(    RÎtisAliveRRÓRÔtstateMsgt    tableNamet zoneIpyDatatzoneID((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR©1    s,,      & & c Csçtjƒj|ƒ}|sdStjddƒ}tj||ƒ}|dkrutj|}t    |j
|dƒdtj ƒ}t j |||ƒtj|}    |j
|    dƒd}
t j ||    |
ƒtj||ƒtjd||
|f|jƒƒi|d6|d6|
d6|d6|jƒd    6|jƒd
6} tjd | |ƒtj|tjd|gƒtj|ƒn|rdS|tjkr–tj|tjdƒtj|tj dƒt!j"|tj#ƒt$j%|tj&dƒt'j(|tj)dƒt*j(|tj)dƒt+j,|tj-dƒt.j/|tj0dƒt1j2|tj3dƒt4j5|tj6dƒt7j8|t7j9dƒt:j;|tj<dƒnÕ|tj=krktj|tj>dƒtj|tj?dƒt!j"|tj@ƒt$j%|tjAdƒt'j(|tjBdƒt*j(|tjBdƒt+j,|tjCdƒt.j/|tjDdƒt4j5|tjEdƒn|tjFkrÒt!j"|tjGƒtj|tjHdƒtj|tjIdƒt4j5|tjJdƒng|tjKkr9t!j"|tjLƒtj|tjMdƒtj|tjNdƒt4j5|tjOdƒn|tjFtjKgkr}tPjQ|tjRƒt:j;|tjSdƒn|jTƒtjUkr¨tPjQ|tjVƒntjWd |ƒ} | rÓtXjY||ƒntZj[||ƒdS( NR³iis4¸üл÷ɱBoss´ÎÊý: index=%s, todayCnt=%s, totalCnt=%sR›RÎttouchCntttotalCnttAccIDtPlayerIDtAddKillBossCntt BOSSFirstKill(\RR¯R°RRéRëRRtDef_PDict_Boss_KillCntTotalR0RÁR2RRÒtDef_PDict_Boss_KillCntt BossHurtMngtNotifyAttackBossCntR•R?tGetAccIDRŠt SendEventPackR5R6R1tSuccType_FeastRedPack_KillBosst PlayerStatetSetBossStateExittDef_Boss_Func_WorldtSuccType_KillWorldBosst PlayerGubaotAddGubaoItemEffValuetGubaoEffType_KillWorldBosstPlayerActivitytAddDailyActionFinishCnttDailyActionID_WorldBOSStPlayerBossReborntAddBossRebornActionCnttDef_BRAct_WorldBOSStPlayerFairyCeremonytAddFCPartyActionCnttDef_PPAct_WorldBosstPlayerNewFairyCeremonytPlayerWeekPartytAddWeekPartyActionCnttDef_WPAct_WorldBOSStPlayerFeastTraveltAddFeastTravelTaskValuetDef_FeastTravel_WorldBosstPlayerActLogintAddLoginAwardActionCnttDef_LoginAct_WorldBOSSt PlayerActTasktAddActTaskValuetActTaskType_WorldBosstPlayerZhanlingtAddZhanlingValuetZhanlingType_HuanjinggetPlayerTongTianLingtAddTongTianTaskValuetTTLTaskType_WorldBosstDef_Boss_Func_HometSuccType_KillBossHomeBosstGubaoEffType_KillBossHometDailyActionID_BOSSHometDef_BRAct_BOSSHometDef_PPAct_BossHometDef_WPAct_BOSSHometDef_FeastTravel_BossHometActTaskType_BossHometDef_FBMapID_CrossPenglaitDailyActionID_CrossPenglaitSuccType_KillCrossPenglaiBosst!GubaoEffType_KillCrossPenglaiBosstActTaskType_CrossPenglaiBosstDef_FBMapID_CrossDemonLandtDailyActionID_CrossDemonLandtSuccType_KillCrossDemonLandBosst#GubaoEffType_KillCrossDemonLandBosstActTaskType_CrossDemonLandBosstPlayerActGarbageSortingtAddActGarbageTaskProgresstDef_GarbageTask_CrossBosstTTLTaskType_CrossBosst    GetIsBosstDef_NPCType_Boss_DarktDef_GarbageTask_KillBossRtGY_Query_BossFirstKilltSetPlayerFirstKillBosstPlayerGoldInvestt
OnKillBoss( RRRt isCrossServerRçRPRQttotalKeyRåRËtnewCnttdataDictR«((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytOnPlayerKillBossJ    s€  " #RlcBseeZdWZd„Zed„Zed„Zd„Zdd„Z    dd„Z
dd„Z d    „Z d
„Z d „Zed „Zd „Zeed„Zd„Zd„Zd„Zejed„Zd„Zd„Zd„Zd„Zd„Zed„Zed„Zed„Z d„Z!d„Z"d„Z#d„Z$d„Z%d „Z&d!„Z'd"„Z(d#„Z)d$„Z*d%„Z+d&„Z,d'„Z-d(„Z.d)„Z/d*„Z0d+„Z1eed,„Z2d-„Z3eed.„Z4d/„Z5d0„Z6d1„Z7d2„Z8d3„Z9d4„Z:d5„Z;d6„Z<d7„Z=d8„Z>d9„Z?ged:„Z@d;„ZAd<„ZBd=„ZCd>„ZDd?„ZEd@„ZFdA„ZGdB„ZHeedC„ZIdD„ZJdE„ZKdF„ZLdG„ZMedH„ZNdI„ZOdJ„ZPedWdK„ZQeddL„ZRdM„ZSdNeedO„ZTdP„ZUdQ„ZVddedR„ZWdS„ZXdT„ZYdU„ZZdV„Z[RS(XcCsL||_d|_d|_i|_g|_g|_d|_d|_dS(Ni(    t_NPCControl__InstanceRt_NPCControl__LastHurtPlayert_NPCControl__Killert_NPCControl__AllKillerDictt_NPCControl__FeelPlayerListt_NPCControl__ownerPlayerListt_NPCControl__OwnerHurtTypet_NPCControl__OwnerHurtID(tselftiNPC((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__init__©    s                                cCsú|j}|jƒ}|jƒ}||}||}    t|ƒ|kr^|t|ƒ|}nt|    ƒ|kr‡|    t|    ƒ|}    n||}
||    } tjƒ} | j|
| ƒ rð|rðtj|||ƒ} | jƒ}
| jƒ} n|
| fS(N(    R7RRtabsRRàR{R“R”(R?tdestXtdestYtdisttfixPosRR„R…tdirXtdirYt    moveDestXt    moveDestYRƒt    resultPos((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGetMoveNearPos¼    s"      
 
 
 
  c Cs¡|j}|jƒ}|jƒ}tj|||||ƒ\}}    tjƒ}
|
j||    ƒ r—|r—tj||    dƒ} | jƒ}| jƒ}    n||    fS(Ni(    R7RRRtPosInLineByDistRàR{R“R”( R?tplayerXtplayerYRERFRR„R…RIRJRƒRK((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGetMoveNearPosExÕ    s      !  cCsR|j}tj||ƒ}|sEtjd|jƒ||fƒdS|j|ƒS(Ns.NPCÒÆ¶¯µ½Ä¿±êʧ°Ü,NPCID = %s Ä¿±êID=%d,Type=%d(R7RRaRtGetNametMoveToObj_Detel(R?R›tobjTypeRt tagObjDetel((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt    MoveToObjé    s      icCs•|j}|jƒ|jƒ}}tj||||ƒ}||kr|dkr|||||}|||||}n|j||ƒdS(Ni(R7RRRR/tMove(R?tdestPosXtdestPosYt sigleMoveDisRtcurPosXtcurPosYtcurDis((seD:\SG_ServerCode\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 (R7tOperControlManagertIsObjCanDoActionRtDef_Obj_ActState_ServerActRbtoalMoveRRRRBtGetRefreshPosCounttGetRefreshPosAttGetCurRefreshPointIndexRR/t GetMoveDisttMoveBackRPR“R”R>t    laNPCMoveRNRct GetActionTickt
SetDestPosR`R[RV( R?RTt moveAreaDistRR„R…RCRDt curRefreshPostmoveDistRIRJRK((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRR
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(R7R^R_RR`RbRaRRàRRRR RR*RRR¢RaR‹RõRöRþR0RBR“R”RVRÍ(R?R„R…t fixAreaDistRRƒtnpcPosXtnpcPosYRRÐRt
curObjTypetcurTagRKRIRJ((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt    FixTagPosV
sD             9   cCs|j}|jƒ}|jƒ}tj||ƒ}|dkrFtjS|jƒdkr_tjStj    |||jƒ|jƒƒS(Ni(
R7RRRRaRRtDef_NPCErrorMaxDistR‹R/(R?ttagIDttagTypeRR„R…ttagObj((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt
GetTagDist”
s       c
Cs%|j}|jƒ}|tjkr(tStj||ƒr>tS|jƒ}|jƒ}|j    ||ƒ}|dkrt j |ƒdkrtStj ||ƒ}|dkrÆtjd|jƒƒtStj||ƒsÜtStj||ƒsòtStj||d|ƒd}    |    tjkr!tStS(Nis&curNPC = %s ²éÕÒ¶ÔÏó, »ñµÃ¶ÔÏóʵÀýʧ°Ü(R7RRbtgotItemR RR.R‹Rt FindNPCAngryRR9t GetAngryValueRaRRR0tCanAttackByPathR1R2R3RR4RÍ(
R?R"R7RR#R*tnpcAngryt
angryValueR9R:((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__CheckAddToAngryList¨
s.       ! cCsC|j}tj|ƒ r?t|ƒ r?|jƒtjkr?tStS(N(R7RRôR:R\RsR RÍ(R?R((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt GetIsBossView×
s    2cCs|j}t}|jƒdkr%|S|jƒjdƒ}| rT|j|ƒrT|Stjƒjƒ}tjƒj    ƒ}|j
ƒs7t j |ƒ}t jddƒ}    ||    kr¾|    |}
n*|tjkrât jddƒ}
nd}
|jƒ} x¢td| ƒD],} |j| ƒ} | dkr+qntj| ƒdkrFqn| jƒsXqn|j| |ƒspqntj|jƒ|jƒ| jƒ| jƒƒ}||jƒkr¸qntjtj |}| j!ƒtj"kr|
rÿ| j#ƒ|
krÿqn|tj$7}n|j%| |ttƒrt&}qqWnb|j'|j(ƒƒ}|j)ƒ} x>td| ƒD]-} |j*| ƒ} | dkrqhntj| ƒdkrªqhn| jƒs¼qhn|j| |ƒsÔqhntj+|ƒr |j,| jƒ| jƒ|ƒ r qhntj|jƒ|jƒ| jƒ| jƒƒ}tjtj |}| j!ƒtj"krt|tj$7}n|j%| |ttƒrht&}qhqhW|S(Niit AngryNPCCounti(-R7R t
GetAtkTypeRtGetAngryValueTagt_NPCControl__IsValidAngryObjRRàt GetMapFBTypeRáRRâRãRRŒRbtfbtNullRétGetAttentionPlayersCountRøtGetAttentionPlayerByIndexRR9RkRt _NPCControl__CheckAddToAngryListR/RRtGetSightRtDef_NPCFirstSightAngryValuetDef_Screen_AreaRRctGetAngryNPCCounttDef_NPC_SeePlayerAddAngrytAddObjToAngryListRÍRcRdRRRôtGetIsInRefreshPoint(R?R7t
isUpdAngryRt
needResorttcurAngrytmapTypeRt recordMapIDtmapAngryNPCCountDicttangryNPCCountLimitR)RÐR"REt addAngryValuet refreshPoint((seD:\SG_ServerCode\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ÐtuseSkilltaddAngry((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytAddObjDetelToAngryList_ByAttackT 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( R7RR.R R0tCheckObjCanDoLogicRR‹t_NPCControl__CheckCanAddAngryRRbRcR8RtDropOwnerType_MaxAngryRaR'tGetTeamManagertFindTeamRRR•R*tGetMemberCountt    GetMemberR?t_NPCControl__AddAngryValueR9RkR@R
RÍ(R?RtplusAngryValuetcanPiletcheckRRptcurObjIDt addAngryTeamRR|RÐt curTeamPlayert teamPlayerIDR—((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRŽt s>      $   "cCsŠ|j||ƒ}|dks3tj|ƒdkrZ|j|||tj|tjƒn,|r†tj|ƒ|}tj||ƒndS(Ni(RyRR9RztAddAngryR1R–t SetAngryValue(R?R|R¬RpR©RªR}t updAngryValue((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__AddAngryValue¨ s!'c    Csp|j}tj||ƒ}|s<tjd||fƒtStj||ddƒd}|tj    krktS|j
ƒt j kr„t Stj|jƒt jƒ}tt j|ƒ}|s»t S|t jkrùtj||ƒràtStj||ƒsltSns|t jkrl|j
ƒt j kr!t Stt j|ƒ}|s=t Stj||ƒrStStj||ƒsltSnt S(Ns&###Ìí¼Ó³ðºÞ,ÎÞ·¨²éÕÒÄ¿±êʵÀý = %s , %si(R7RRaRR R2R3RRR4RõRbRöRÍR‹R¢RRcR.R0tCheckPlayerAttackMode_Player(    R?R¬RpRt curObjDetelR:t curNPCDetelt curNPCOwnert curObjOwner((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__CheckCanAddAngry¼ s<    cCs{|j}|jƒ}tƒ}t}|j|jƒƒ}x;td|jƒƒD]$}|j|ƒ}|j    ƒ}    |j
ƒ}
|    sˆqOnt j |    |
ƒ} | s¼|j |    |
ƒt}qOn|
tjkræ| jƒ|kræqOqæntj|| ƒs|j |    |
ƒt}qOn|j| jƒ| jƒ|ƒsQ|j |    |
ƒt}qOnt j| jƒ| jƒ|jƒ|jƒƒ} | |jƒkr¯|j |    |
ƒt}qOn|jƒs|j| ƒsæ|j |    |
ƒt}qOn| t|ƒkr|j |    |
ƒt}qOqnt j|ƒr,qOntj|| d|ƒ} | dt j!krO|j |    |
ƒt}qOqOqOW|S(Ni("R7RR=R RcRdRøt GetAngryCountR‚tGetObjIDt
GetObjTypeRRat DeleteAngryRÍRbR¢RR0R1RRRR/R‰RTt CanSeeOtherRGtGetNPC_Is_GateR2R3RRR4(R?R7RR|tdefaultMaxAngryNPCIDListR‘R˜RÐR}tangryIDt    angryTypeRRER:((seD:\SG_ServerCode\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(R7RtGetLastResortTickRÃR™tGetMaxAngryTagRR9RkR:RTRftResorttSetLastResortTick(    R?R7trefreshIntervalRRR|tlastTickt removeRsortR‘((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytRefreshAngryListN s      4  cCs^|j}|jƒ}xBtd|jƒƒD]+}|j|ƒ}|j|ƒsUq+n|SWdS(Ni(R7RRøRºR‚RƒR(R?Rt angryManagerRÐR’((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRÅq s     cCsU|dks|jƒdkr"dStj|ƒ}|dkrAdS|jƒrQdS|S(Ni(RR»R9Rzt GetIsDisable(R?R’t curAngryValue((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__IsValidAngryObj† s  cCs#|j}|jƒ}|jƒtS(N(R7RR=RÍ(R?RR’((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt ClearNPCAngryš s     
cCs#|j}|jƒ}|jƒtS(N(R7tGetPlayerHurtListR=RÍ(R?Rt npcHurtList((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytClearNPCHurtList¥ s     
cCs|j}|jtjƒS(s¯NPCÊÇ·ñÉËѪ±£»¤ÖÐ
        ÒòΪÊÖÓαȽϻá³öÏÖÍøÂçÇл»µÄÇé¿ö£¬´Ëʱ»á¿ÉÄÜ»áÒýÆðµôÏßÖØÁ¬
        ËùÒÔÕë¶ÔÊÖÓÎ×öÁ˵ôÏß3·ÖÖÓÄÚÉËѪ±£»¤£¬·ÀÖ¹Íæ¼ÒÖØÁ¬ºóÉËѪ±»Çå¿Õ£¬ÌåÑé²»ºÃ£»
        (R7R_RtDef_NPC_Dict_InHurtProtect(R?R((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytIsInHurtProtect¬ s    cCs@|j}t|t|ƒ}x|D]\}}|jƒq"WdS(N(R7RRRÍR=(R?tisClearAuraBuffRRQt    buffStatet    canPileup((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt ClearAllBuff¹ s
    cCsH|jƒ|jƒ|j|ƒ|j}tj|ƒtj|ƒtS(N(RÐRÓRÙR7R³tClearPlayerHurtListRµRÍ(R?RÖR((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__ClearNPCAllStateÇ s
 
       cCsx|j}|jtƒ|s:tj|ƒtj|ƒkrQ|jƒ|jƒn|jd|ƒ|st|j    ƒnt
S(NRu( R7t_NPCControl__ClearNPCAllStateR R9RkRjt_NPCControl__InitNPCSummont_NPCControl__NormalNPCInItCDtRefreshNPCStateRqRÍ(R?RuR((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR•Ø s     $
  cCs~|j}|jdƒ|jdƒ|jƒ}xHt|jƒƒD]4}|j|ƒ}|dkriqBn|jdƒqBWdS(Ni(    R7t SetAttackTicktSetUseSkillTickR–RøRCRDRtSetLastUseTick(R?Rt curNPCManagerRÐt curNPCSkill((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__NormalNPCInItCDó s        cCsg|j}g}x6t|jƒƒD]"}|j|ƒ}|j|ƒq"Wx|D]}t|ƒqOWdS(N(R7RøRùRúR“R‡(R?RtcurNPC_Summon_ListRRûRÂ((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__InitNPCSummon s     c    CsW|j}|jƒ}|j|ƒ}|jƒ}|jƒ}|jƒ}|jƒ}|jƒtjkr¥||ks||kr¥t|tj    ƒ|j
||ƒdSt ||j ƒƒs¾dS|d}||j ƒkrãd}n|j|ƒ|j|ƒ}|jƒ}|jƒ}||kr3||kr3dSt|tjƒ|j
||ƒdS(Nii(R7tGetCurPatrolIndextGetPatrolPosAtRRRSRbRZR`RVRVRôRhtGetPatrolPosCounttSetCurPatrolIndex(    R?R7Rt patrolIndext    patrolPost
patrolPosXt
patrolPosYt curNPC_PosXt curNPC_PosY((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt __PatrolMove s4         
       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(R7Rêt_NPCControl__PatrolMoveRcRdR0t GetMoveAreaRRtGetAreaRRfRôRhRYRZR`RbRZRRàt LineNearToPosRV(R?R7RtPosMaptmoveAreaR„R…t minMovePosXt maxMovePosXt minMovePosYt maxMovePosYtposMapXtposMapYt
posMapAreatnewPoint((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytDoNormalNPCMoveQ sH       
 
 
 
 
 
cCstj|jƒƒS(N(Rt GetPsycoFunct)_NPCControl__Func_GetRandPosInRefreshArea(R?((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytGetRandPosInRefreshArea‘ scCs¿|j}|jƒ}|s6tjd|jƒƒdS|jƒ}|jƒ}|jƒtj    krld}n |j
ƒ}t j |||ƒ\}}|dkrµ|dkrµ||gS||fS(NsK__Func_GetRandPosInRefreshArea GetRefreshPosAt error: return None! npcID=%si( R7tGetRefreshPointRRSRRRR\Rbt ntFunctionNPCRõR“tGetNearbyPosByDis(R?RtposMapRýRþRÿR„tpoxY((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__Func_GetRandPosInRefreshArea˜ s            
cCsF|j}tj|ƒ}|r-|jƒ}n|j|jƒƒ}|S(N(R7R¤R¥RRcRd(R?RRÃR˜((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR± s     cCs|j}|jƒ}|j|jƒ|jƒ|ƒr:tS|jƒtjkrŒ|j    ƒtj
krŒ|j|j ƒ|j ƒ|ƒrŒtSnt S(N(R7RRRRRÍR>RbRgRSRVt GetDestPosXt GetDestPosYR (R?RR˜((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytIsInRefreshArea¾ s     !!cCs‚|s
tS||jƒ|jƒkr~||jƒ|jƒkr~||jƒ|jƒkr~||jƒ|jƒkr~tStS(N(R RReRRÍ(R?RZR[R˜((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR× scCs³|j}|jƒ}|dkratjd|dƒ}|j|ƒ}|jƒ}|jƒ}n|jƒ\}}|jƒsŒ|j    ƒnt
|t j t ƒ|j||ƒdS(Nii(R7RêRYRZRéRRRRÕR•R`RbRVRÍRV(R?Rt patrolCountRìRíR„R…((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRfè s         cCsb|j}|jtjd|jƒdƒƒ|jƒ\}}|j||tƒ|j|ƒdS(Nii(    R7tSetCurRefreshPointIndexRYRZRbRRkR Rm(R?R7RR„R…((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt DoNPCReborns     # cCs·|j}|jtƒtj|tj|ƒƒ|jƒj|ƒ|jƒ|j    t
j dƒ|j    t
j dƒt j|ƒtj||ƒ|jƒ}t
j|ƒrútjd|ƒ}|rút|dƒt|ƒt
jkr÷tj|ƒq÷qún|jƒ}x t|jƒƒD]Œ}|j|ƒ}| sG|jƒdkrKPn|jƒt
j krfqnt!j"d|j#ƒ|jƒ|j$ƒfƒt%j&|||ƒqW|j'ƒdS(NiR is/NPC¸´»î£¬Ì×ÉϹ⻷: objID=%s,npcID=%s,skillID=%s((R7R•RÍR9RoRjRRÇt RebornNotifyRhRtDef_NPC_Dict_HPPerLogicMarkt!Def_NPC_Dict_RebornPreNotifyIndexR®t OnNPCRebornRet DoFBRebornNPCRRôRRR©R8R¬RLtFamilyOwnerBossOnRebornR–R*RCRDtGetSkillTypeIDt GetSkillTypetDef_SkillType_AuraRR•R‹t
GetSkillIDt
SkillShellt NPCUseSkillt_NPCControl__notifyAppear(R?R7RtcurNPCIDR«R£RRž((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRms6     
    ,
cCsý|j}|jƒ}tjƒj|ƒ}|s>|jƒdS|jrùtjƒ}||_    |j
ƒ|_ |j ƒ|_ |jƒ|_|jƒ|_|jƒ|_|jƒ|_|jƒ|_|jƒ|_|jƒ|_tj|j|ƒndS(N(R7R‹R¶R·R¸R—RR¹t tagNPCAppearR…RR$RktNPCHPtGetHPExtNPCHPExRjRIt
GetMaxHPExtMaxHPExRtCurLVRRxRRyRTtSpeedR}R~(R?RR›RÉRÊ((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__notifyAppear?s(     
         cCsdS(N((R?((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR_sc Csû|j}|jƒ}tjddiƒ}tj||ƒ}|sFdS|\}}t|dtƒ}tj    |ƒdtj
|ƒ}    |j t j ƒ}
||
} xA| D]9} |    | kr½Pntjd||| gƒ|
d7}
q§W|jt j |
ƒdS(NtBossHPInformationitreverseidi(R7RRRŒRRëtsortedRÍR9RkRjR_RRRt WorldNotifyRh( R?tdropTypetownerIDRRthpPerLogicNPCIDDictthpPerLogicListt    hpPerListtsysMarktnowHPPerthpPerLogicMarktlogicHPPerListthpPer((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt DoHPPerLogicns$       
  cCs“|j}|jƒdkrdS|jƒdkrXtjd|jƒƒ|j|ƒn|jƒ||jƒ}|dkr‚dS|j|ƒdS(Nis¼ì²âµ½NPC¿ìËÙ¸´»î %si(R7tGetRefreshTimeRhRR•R‹t SetActionTickR(R?R7RR«((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytDieTick—s      c     Csè|jƒ}tjdƒ}||kr+dS||\}}|jtjƒ}|t|ƒkrcdSttj    |dƒƒ}||}    ||    kr–dS|j
tj|dƒt j ƒj ƒ}
tjd||||    |
||gƒdS(NtRebornPreNotifyNPCgLí@ii(RR±R²R_RRR8RptmathtceilRhRRNRáRR+( R?RR«RtpreRebornNotifyNPCDicttnotifyMinuteListt
notifyMarkt notifyIndextreaminMt notifyMinuteR((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__DoNPCRebornPreNotify«s   
 %cCsG|j}|jtjƒr)|jƒdS|j||ƒ|jƒdS(N(R7R_RtDef_Obj_Dict_TurnFightPosInfotRefreshTurnfightNPCAttrtRefreshNPCAttrStatetRefreshNPCActionState(R?t canSyncClientRuR((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRßÅs     
cCsb|j}|jtjƒ}i}|rU|jidtj6dtj6dtj6ƒnYt    |j
ƒƒ}|sqdS|ji|j ƒtj6|j ƒtj6|j ƒtj6ƒtjd|jƒ|j
ƒ|fƒtj|ƒ|jƒ|j|jtjdƒƒ|j|jtjdƒƒ|j|jtjdƒƒtj||jtjdƒƒdS(NieÍi€ðúl^ esheroAttrDict: ID:%s,NPCID:%s,%si(R7R_RtDef_Obj_Dict_LineupPlayerIDRhR1tDef_Effect_AtktDef_Effect_DeftDef_Effect_MaxHPR$RtGetAtktGetDefRjRR•R‹R9tClearBattleEffecttResetNPCBattleStatet    SetMinAtkR‘t    SetMaxAtktSetDefRm(R?RtlineupPlayerIDt heroAttrDictR#((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyREÐs.        
 
    & 
cCs™|j}|jƒ|jƒ|j|jƒƒ|j|jƒƒ|jƒtj    krlt
j ||ƒdSt ||ƒt j|ƒ}|j|ƒdS(N(R7RORPRYRUtSetAtkIntervaltGetBaseAtkIntervalRõRbRRtRefurbishPetAttrRˆRtCalcBuffer_NPCBattleEffecttRefreshNPCSpeed(R?RHRuRt allAttrList((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRFs    
 
 
  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(R7RâRãRRàRátGetFBPropertyMarkRReR4tGetFightPowerMintGetRobotBaseHurttGetRobotHPCoefficientRpRÛtGetFuncCompileCfgR•R‹R9RmRoRqRr(
R?t
fightPowerRRt
funcLineIDR«t fbFightPowertbaseHurtt hpCoefficienttmaxHP((seD:\SG_ServerCode\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Út||j    ƒƒndS(NigY@(R7RtCalcAttr_BattleNolineR‘tTYPE_Calc_AttrSpeedR_RXRhRpRTR1R)RR(RYRRàRátDef_FBMapID_GatherSoultNPCSpeedChangeNotify(R?R[RtspeedPertspeed((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRZAs    3 cCs'|j}tj|ƒtj|ƒdS(N(R7R^tClearObjActionStateRtCalcBuffer_ActionState(R?R((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRGVs     cCs;|j|ƒ}|j|ƒ}|s*|r7|jƒndS(N(tRefreshBuffStateNoTimelytRefreshBuffStateTimelyRF(R?R7trefreshAtrefreshB((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytRefreshBuffStateds 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(R7t GetTickByTypeRtTYPE_NPC_Tick_BufftTYPE_NPC_Tick_Timet SetTickByTypeR Röt RefreshBuffRHRIRLR¹tCheckAddAuraSkilltCheckAuraSkill(R?R7Rtrefreshtresult((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRrss    &cCsÂ|j}||jtjƒtjtjkr3dS|jtj|ƒtj||jƒ|ƒtj||j    ƒ|ƒtj||j
ƒ|ƒ}|drª|j ƒnt j ||ƒ|dS(Nii(R7RwRtTYPE_NPC_Tick_Buff_TimelyRyRzRöR{RJRKRNRGRtProcessPersistBuff(R?R7RR((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRs’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(R7Rt!_NPCControl__SetFeelNPCPlayerListt_NPCControl__GiveObjPrizet_NPCControl__EventKillNpcRRàRáR9t GetPlayerNameRR¥RR¨R§R8R¬RLtFamilyOwnerBossOnKilledR>R<R?RÖRÍRéRR+RR=(R?RRRt
killerNamet bossIpyDatatplayerRÒ((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt __KillLogic°s"     
 
 
"
c Cs |j}g|_tj|ƒ}|s6|jƒ}ng}xÔt|jƒƒD]À}|j|ƒ}|j|ƒ}|sqOn|d}|d}|r¸||kr¸|j|ƒq¸n|rOt    j
||j ƒ|j ƒƒ}    x-|    D]"}
|
|kræ|j|
ƒqæqæWqOqOW||_dS(Nii( R7R;R³RÑR*t GetHurtCountt    GetHurtAtt_NPCControl__GetTagByHurtObjR“RtGetAreaTeamMemberRR( R?RRÒteventPlayerListRthurtObjt hurtObjTypeRtcurTeamt
playerlistt
teamPlayer((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__SetFeelNPCPlayerListÚs.        
 
 !      cCsn|jr|j|jƒnxK|jD]@}|jrV|jjƒ|jƒkrVq&n|j|tƒq&WdS(N(R9t_NPCControl__MissionOnKillNPCR;R?RÍ(R?t eventPlayer((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__EventKillNpcs    $cCsY|s
dStjddƒ}|s&dSx$|D]\}}||kr-|Sq-W|ddS(Nit    GoldModeliiÿÿÿÿ(RRŒ(R?Ret moneyItemListR\tmoneyID((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__GetDropMoneyModelIDs 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=%sR¯i(R7RRóRãR;RäRRR“RR•R?R RŒRJRQRR¼R‘Rå(R?RøRùR¨RRtspecDropItemListtauctionItemCanSellR>t
feelPlayerR?R@tisDropInItemPacktkillCountDropItemListRñRiRCRDR"RERFRGRHR    ((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__NPCSpecialDropItems:        $    + 
  $ !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(;R7tPlayerActCollectWordst 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¦R·RRyRRRzR{R~t_NPCControl__CreateDropItemRltGameLogic_GatherSoultKillGatherSoulNPCDropAwardR|RR‘R=t SetUserAttrtDef_IudetSourcetItem_Source_VirtualItemDropR0RBt_NPCControl__MapCreateItem(&R?RøthurtTypethurtIDRùRqRRRt
isGameBossR¨RªRbRcRdReRaRžt specItemSigntplayerSpecDropListRxRƒRoRpRR„R…R†R‡R£R[titemCntR    Rit    ownerTypeR-RnRŸ((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt __NPCDropItemTs¤      )        / 
 
 
 
 
()cCst|j}|jƒtj|dƒ|jƒ|jƒ}|tjkrYtj    |ƒdS|j
t ƒt |ƒdS(Ni( R7t_NPCControl__KillLogicR9RoRÜRõRbRRt
SetPetDeadR
R R‡(R?RtcurNPC_GameNPCObjType((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt    SetKilled¿s    
 
 
cCs |j}|jƒ}|stStj|ƒ}tj|ƒ|krZ|jtjdƒtS|j    ƒt
j krst S|j ƒrƒt S|jƒ}| s³||jƒtjdkrÈ|j|dƒt S||jƒtjkråt St||dƒ}tj|d|tƒ|j|ƒt S(NiiiÐgˆÃ@(R7t GetHPRestoreR R9RjRkRhRRR>Rbt    laNPCNullRÍRÕtGetRestoreTimetDef_NPC_ProcessHP_TicktSetRestoreTimeRpR¹t
SkillAddHP(R?R7Rt hpRestoreRatet curNPCMaxHPtlastRestoreTimet restoreValue((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytProcessHPRestoreâs,       $ cCsdS(N((R?R7((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytProcessBattleHPRestore sc    Cs¤|j}|jƒ}|jƒ|_tj|ƒ}|j|ƒ\|_}}}|||_|_    |r‡t
j d|||fƒn|j ƒt |jƒdkrd}d}g}    x8|jjƒD]'}
|jsã|
|_n|jsø|
|_n||
jƒkr|
jƒ}|
}n|rÕ|
jƒt|ƒkrÕtjd|
jƒƒ} tjdt|ƒƒ} | r| jƒnd} | r—| jƒnd}|| krÕt
j d| ||f|
jƒƒqÈqÕn|j|
ƒ|    j|
ƒqÈW|    |_|rn|tjtjtjgkrnt |    ƒdk}xX|    D].}
|j|
tj|
jƒ|
gd|ƒq9Wq÷|r÷|j||||    ƒq÷ng|dkr²|j|||ƒnE|tj krÔ|j!||ƒn#|r÷t
j"d|||fƒn|r‡i|j#ƒd6|d    6t
j$ƒj%ƒd
6t
j&ƒj'ƒd 6|rL|j(ƒndd 6|jj)ƒd 6|d6|d6}t*j+d|ƒnt,r t,|||ƒndS(Ns-__GiveObjPrize npcID=%s,hurtType=%s,hurtID=%sitRealmsWÍæ¼Ò´ó¾³½ç²»×㣬ÎÞ·¨»ñµÃBoss¹éÊô½±Àø! playerRealmLVLarge=%s,npcID=%s,npcRealmLVLarge=%siRqs*NPC¹éÊôÒì³£:npcID=%s,hurtType=%s,hurtID=%sR›RÎRRštteamIDtkillerIDR·R¸tKillBossRecord(-R7Rt"_NPCControl__FindLastTimeHurtObjExR8RRôt_NPCControl__FindNPCKillerInfoR:R=R>RRt _NPCControl__DoLastTimeHurtLogicR8RRÄR9RtGetOfficialRankR&RRt
GetLvLargeR?t#_NPCControl__KilledByPlayerSetPrizeR“R<R~tDef_NPCHurtTypeTeamtDef_NPCHurtTypeSpecialt_NPCControl__NPCDropItemt!_NPCControl__KilledByTeamSetPrizetDef_NPCHurtTypeFamilyt#_NPCControl__KilledByFamilySetPrizeRSR‹RàRáRNRŠR'RŽRŠRïtOnNPCDie(R?RRR¹R•R·R¸Røt maxPlayerLVRùRtplayerRealmIpyDatatnpcRealmIpyDatatplayerRealmLVLargetnpcRealmLVLargeRqR5((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__GiveObjPrize.sj     
                             $ / *,!cCsk|j}|sdS|jƒ}|tjkr2dS|j}tj|t|ƒƒtj    ||j
ƒƒdS(N( R8RRbRcR7t    PlayerViptDoAddVIPKillLVExpR RtAddZhenQiByKillNPCtGetSP(R?tlastHurtPlayerRpR((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__DoLastTimeHurtLogic{s         cCs|j}|jƒ}|jƒ}tjƒjƒ||f}|tjkr·tjj|ƒ\}}}}    |r{|j    ƒnd}
tj
d||j ƒ|
||    fƒ||||    fSd}d}    i}d}t |ƒ} |rûtj
d|| fƒn| tjkrœ|jƒ} | jƒ|r@tj
d| jƒƒnxËt| jƒƒD]B} | j| ƒ}|r—tj
d| |jƒ|jƒfƒn|j|d|ƒ\}}|dkræ|dkræ|rStj
dƒqSqSn|rG|jƒ}||kr|||<n|r4tj
d|| |fƒn|dtj|fS|rS|}|r|tj
d    || |j    ƒfƒn||tj|j    ƒfSqSWnr| tjkr|jƒ\}}|rÜ||tj|j    ƒfS|r|||jƒ<|dtj|jƒfSn|jrœ|jjƒ}|jj    ƒ}
|rXtj
d
|||
fƒn|
rvtjƒj|
ƒ}n| rœ||krœ|j||<qœn| tj krÑtj!}|r*tj
d |ƒq*nY| tj"kr*t#j$|ƒ}|dkr*tj%}|}    |r'tj
d |ƒq'q*n|dkr |rttj}|j    ƒ}    |rtj
d ||    fƒqq |r¶tj}|j ƒd}    |rtj
d||    fƒqq tj&ƒj'ƒtj(kr t)j*ƒ}|r|jƒ}    |||    <tj}qq n||||    fS(NisKNPC±»»÷ɱ£¬¹éÊôÐÅÏ¢: key=%s,playerIDList=%s,teamID=%s,hurtType=%s,hurtID=%ss"NPC±»»÷ɱ, key=%s,dropOwnerType=%ss hurtCount=%ss(hurtIndex=%s,hurtValueType=%s,valueID=%stisLogs&    µ±Ç°ÉËѪ¶ÔÏ󳬳öÖ¸¶¨·¶Î§»òÒѾ­ËÀÍös;    ¹éÊô×î´óÉËÑªÍæ¼Ò: npcID=%s,dropOwnerType=%s,playerID=%ss9    ¹éÊô×î´óÉËѪ¶ÓÎé: npcID=%s,dropOwnerType=%s,teamID=%ss8    ¹éÊô×îºóÒ»»÷£¬npcID=%s,lastHurtPlayerID=%s,teamID=%ss    ÎÞ¹éÊô...npcID=%ss    ÕóÓª¹éÊô...factionID=%ss$    ¹éÊôĬÈ϶ÓÎé, npcID=%s,teamID=%ss&    ¹éÊôĬÈÏÍæ¼Ò, npcID=%s,playerID=%s(+R7RR‹RRNRŠRtg_npcKillerInfoRžR'RRŽRR8RtDropOwnerType_MaxHurtRÑtSortRŽR*Rt GetValueTypet
GetValueIDRR?R~RÙR£t_NPCControl__GetMaxAngryInfoR8R¤R¥tDropOwnerType_AlltDef_NPCHurtTypeAlltDropOwnerType_FactionRetGetNPCItemProtectFactiontDef_NPCHurtTypeFactionRàRáRlRâtGetCurSingleFBPlayer(R?R¹RRR›RËt
killerDicttkillTeamR·R¸RÐt dropOwnerTypeRÒRÐt
maxHurtObjRR•R‚tmaxAngryPlayert maxAngryTeamtlastHurtPlayerIDtprotectFactionRŒ((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__FindNPCKillerInfo‘s°            
)   #                          
cCs’|jƒ}|sdS|jƒ}|jƒ}|tjkrAdStj||ƒ}|s]dS|jƒ}|sy|dfS|tj    ƒj
|ƒfS(s  »ñÈ¡×î´ó³ðºÞËù¹éÊôµÄÍæ¼Ò, ¶ÓÎé N(NN(NN(NN( RÅRR»R¼RbRcRRaR'R¤R¥(R?R’RÁt angryObjTypeRqRÐ((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__GetMaxAngryInfos    
cCs>|j}|jtjƒ}tjƒj|ƒ}|s:dS|S(N(R7R_RtDef_PlayerKey_LastHurtRRˆtFindPlayerByIDR(R?RR‚R((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__FindLastTimeHurtObjEx!s     c Cs|j}|jƒ}d}|dkrBtjd|jƒƒ|S|j|jƒƒ}|jƒ}|tj    krtj
|j ƒt j ƒ}    |    dkrÃ|r¿tjd||j ƒfƒn|Stj|    ƒdksí|    jƒt jkr|rtjd||j ƒfƒn|S|r}|j|    jƒ|    jƒ|ƒs|rvtjd||j ƒ|    jƒ|    jƒfƒn|Sn‡tj|jƒ|jƒ|    jƒ|    jƒƒtjkr|rtjd||j ƒ|jƒ|jƒ|    jƒ|    jƒfƒn|S|    df}|    dfS|tjkrv|j ƒ}
tjƒj|
ƒ} |rjtjd||
fƒn| dkr”|rtjd|
ƒn|S|r´tjd    | jƒƒnx»t| jƒƒD]§} | j| ƒ} | dksú| jƒdkr|rÇtjd
| ƒqÇqÇntj| ƒdksD| jƒt jkrp|rÇtjd | | jƒfƒqÇqÇn|rØ|j| jƒ| jƒ|ƒsa|rÇtjd | | jƒ| jƒ| jƒfƒqÇqÇqan‰tj|jƒ|jƒ| jƒ| jƒƒtjkra|rÇtjd | | jƒ|jƒ|jƒ| jƒ| jƒfƒqÇqÇnd| f}|SW|S|tjkr‰|S|S(NsÉËѪ¶ÔÏó´íÎó,npcID=%ss*ÕÒ²»µ½¸ÃÄ¿±êÉËÑªÍæ¼Ò: npcID=%s,playerID=%sis*¸ÃÄ¿±êÉËÑªÍæ¼ÒÒÑËÀÍö: npcID=%s,playerID=%ss<¸ÃÄ¿±êÉËÑªÍæ¼Ò²»ÔÚNPCÇøÓòÄÚ: npcID=%s,playerID=%s,pos(%s,%s)sO¸ÃÄ¿±êÉËÑªÍæ¼Ò³¬³öÖ¸¶¨¾àÀë: npcID=%s,playerID=%s,npcPos(%s,%s),playerPos(%s,%s)s Ä¿±êÉËѪ¶ÓÎé: npcID=%s,teamID=%ssÕÒ²»µ½Ä¿±ê¶ÓÎé, teamID=%ss¶ÓÎé³ÉÔ±Êý: GetMemberCount=%ss    i=%s, Î޸öÓÔ±£¡s$    i=%s, ¶ÓÔ±ÒÑËÀÍö£¡memPlayerID=%ss6    i=%s, ¶ÓÔ±²»ÔÚNPCÇøÓòÄÚ£¡memPlayerID=%s,pos(%s,%s)sI    i=%s, ¶ÓÔ±³¬³öÖ¸¶¨¾àÀ룡memPlayerID=%s,npcPos(%s,%s),playerPos(%s,%s)(NN( R7RRRR•RcRdRðRR~RaRñRbRcRR9RktGetPlayerActiontpaDieRRRR/tDef_Team_GetExpScreenDistRÙR¤R¥R¦R*R§R?tDef_NPCHurtTypeNPC(R?RütisCheckRefreshAreaRìRRt hurtObjTupleR˜tmaxHurtValueTypeRRÐR•RÐR®((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__GetTagByHurtObj1sŽ         * !    )!    ; 
  * !    )    !    ; cCs¥|j}|j|jƒt|ƒ}d}|jtjƒ|jƒkr]|jtjƒ}nt    j    |ƒ}|j
|t j d|ƒ|j |||jƒtƒdS(Nit
addSkillID(R7t_NPCControl__GetExpRR R_RR¾R‹R¼RRCR1tDef_ViewExpType_KillNPCt_NPCControl__KillNPCFuncExR?(R?RRtadd_ExpRt playerControl((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__KilledByPlayerSetPrize›s    c    Cs÷|j}tj||jƒ|jƒd|jƒƒ}|sitjd|jƒ|j    ƒ||fƒdS|j
s‚|d|_
n|j s›|d|_ n|dj ƒ}d}d}g}    |jƒ}
tj|ƒ} x|D]} | r›| jƒt|ƒkr›tjd| jƒƒ} tjdt|ƒƒ}| rE| jƒnd}|r]|jƒnd}||kr›tjd||
|f| j ƒƒqßq›n| jƒ}||krÂ|}| }n|    j| ƒ|j| ƒ|j| ||tƒqßW|    |_tj|ƒ}|dkrb|\}    }xÊ|    D].} |j| tj| j ƒ| gd|ƒq-Wn‘| rÔ|tjtj tj!gkrÔt"|    ƒdk}xX|    D].} |j| tj| j ƒ| gd|ƒqŸWn|ró|j||||    ƒndS(NRìsS½±Àø¹éÊô¶ÓÎ飬µ«ÊDz»´æÔÚ¿É»ñµÃ¸Ã½±ÀøµÄ¶ÓÔ±!npcID=%s,teamID=%s,hurtType=%s,hurtID=%siRÏs[¶ÓÔ±Íæ¼Ò´ó¾³½ç²»×㣬ÎÞ·¨»ñµÃBoss¹éÊô½±Àø! playerRealmLVLarge=%s,npcID=%s,npcRealmLVLarge=%sRqi(#R7RR‘RRt_NPCControl__GetIsLogRRSRR'R8R9R?RRRôRÖR&RRR×RRR“t_NPCControl__DoNormalTeamExpRRÍR<RetGetFBEveryoneDropInfoRÛR~RÙRÚR8(R?R•R·R¸RR–t    maxHurtIDt    teamMaxLVRøRùRR¹RRáRâRãRät curPlayerLVt fbOwnerInfoRq((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__KilledByTeamSetPrize¸s\    -                                       /$ /cCsÇ|j}d}d}g}|j|jƒƒ}tjƒ}x£t|jƒƒD]}    |j|    ƒ}
|
spqOn|
j    ƒ|ksO|j
|
j ƒ|
j ƒ|ƒ rªqOn|
j ƒ} || krÑ| }|
}n|j|
ƒqOW||_|stjd|jƒ||fƒn|s&|j}n|sPtjd|jƒ||fƒdS|jse||_n|jsz||_n|jƒ} x$|D]} |j| || tƒqW|j||||ƒdS(NisI½±Àø¹éÊôÏÉÃË£¬µ«ÊDz»´æÔÚ¿É»ñµÃ¸Ã½±ÀøµÄ³ÉÔ±!npcID=%s,hurtType=%s,hurtID=%ss;½±Àø¹éÊôÏÉÃË£¬ÕÒ²»µ½µôÂäÍæ¼Ò!npcID=%s,hurtType=%s,hurtID=%s(R7RRcRdRRzR*R{R|t GetFamilyIDRRRRR“R<RRR8RSR9R?RR RÛ(R?R·R¸RtmaxLVRøRùR˜t copyPlayerMgrRRŒRRR((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__KilledByFamilySetPrizeósH     4                               c    Csw|jƒ}|jƒ}tjƒjƒ}tjtjƒjƒƒ}|tj    krXdStj
ƒr¯|tj kr†t j ||ƒntj|ƒr«t|||tƒndS|tj krÑt j ||ƒn}t|ƒ|jƒtjdƒkr2tj|tjƒtj|tjƒtj|tjƒnt j!|tj"d|gƒtj|ƒrst|||t#ƒndS(NtDailyQuestKillMonsteri($RRRRàR„RâRãRáRbR¢t IsCrossServerR…RetDoFB_DropOwnerRRôR6RÍR RRRéRøRùR1tDailyActionID_KillNPCR'R(tDef_GarbageTask_KillNPCR R tActTaskType_KillNPCR5R6t%SuccType_FeastRedPack_KillSpecificNPCR (    R?RRRÑt
isTeamKillRt
defObjTypet    mapFBTypeR((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__KillNPCFuncEx+s,   %cCs‚|j}|jƒ}|tjkrCttj|ƒ}|rVdSn|tjkrVdS|jƒ}tj    |t
j d|gƒdS(Ni( R7RõRbRöRRct
gnotNormalRR5R6R1tSuccType_KillSpecificNPC(R?RtisFeelRR
R·R((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__MissionOnKillNPCUs      cCstj|jƒS(N(RRôR7(R?((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt
__GetIsLoghscCs“|j}|j|jƒt|ƒ}|s.dSd}|jtjƒ|jƒkrg|jtjƒ}nt    j    |ƒ}|j
|t j d|ƒdS(NiR( R7RRRÍR_RR¾R‹R¼RRCR1R(R?RRRRR((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__DoNormalTeamExpxs    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(R7RRàR„RbR…Ret OnGetNPCExpRRRR[RRtGetExpRR?R0tGetTeamPlayerHurtPerRÛRÜRÝRé( R?RûtisTeamRŒRR]RR(RR™R‚thurtPertexp((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__GetExps4           $c Csä|s
dS|j}|jƒ}    tj|ƒs4dn|    }
|tjkrkg|jD]} | jƒ^qSng} tj|||d||| gd|
d|d|ƒ} | dkrÄt
j dƒdS| j |j ƒ|jƒƒdS(NiRvRwRqRxsµôÂäÎïÆ·,ÎÞ·¨ÕÒµ½µØÍ¼µôÂäÎïÆ·(R7RRRôRÚR<R?R|R}RRRtSetByObjRR‹(R?RnR„R…R,R-RqRxRRRwRŒtspecOwnerIDListt
curMapItem((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__MapCreateItemÃs     76  cCs)tj|||d|ƒ}|s%dS|S(NR(R0R1(R?RR[R\RiRøRn((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__CreateDropItemãsi¸ c
Cs|j}d}d\}}t|ƒ}    |retjdtjƒjƒ|jƒ|jƒ|    fƒn|r£tjdtjƒjƒ|jƒ|jƒ|    fƒ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( R7RR8RRRNRŠR‹RR³tRefreshHurtListRµRR¬RLtRefreshFamilyOwnerNPCHurtRÝtDropOwnerType_Contendt _NPCControl__RefreshContendOwnerR~R?RËRÍRÅR»R¼RaRbRcR'RÙtUpdateDropOwner(R?R7RÈtisDeadt checkCanDeadRRvR½R-Rût maxHurtInfoRvt ownerFamilyIDRt maxAngryObjtmaxAngryRÁ((seD:\SG_ServerCode\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(R7R_RtDef_NPC_Dict_LastDropOwnerIDtDef_NPC_Dict_LastDropOwnerTypeR~RRaRbRcRR•R9RkRRRcRdRRR(R?RR-R½R~R˜((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__RefreshContendOwner,s&     *!cCs·|j}tjƒj|ƒ}|r¢|j|jƒƒ}|r_tjd||jƒfƒnxQt|jƒƒD])}|j    |ƒ}|dks¥|j ƒdkrÅ|rrtjd|ƒqrqrnt j |ƒdkr|rrtjd||j ƒfƒqrqrn|jƒs>|rrtjd||j ƒfƒqrqrn|rvtjd||jƒ|jƒ|j ƒfƒn|j|jƒ|jƒ|ƒrr|SqrWntjd|ƒdS(Ns$¶ÓÎé³ÉÔ±Êý: teamID=%s,memberCount=%sis    i=%s, ¶ÓԱΪ¿Õ!s&    i=%s, ¶ÓԱѪÁ¿Îª0!, memPlayerID=%ss%    i=%s, ¶ÓÔ±²»¿É¼û!, memPlayerID=%ss*    i=%s, ¶ÓÔ±×ø±ê(%s, %s)! memPlayerID=%ssÕÒ²»µ½¸Ã¶ÓÎé: teamID=%s(R7RR¤R¥RcRdRR¦R*R§RR?R9RkRRRRRS(R?RÐRERR•R˜RÐR®((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__GetMaxHurtTeamPlayerIs4        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(>R7RR8RRîR£R¬RBR_RLRMRRNRŠR‹Rt_NPCControl__DelDropOwnerBuffRRhR³RÑR~RaRbRcR?t HaveHurtValuet#_NPCControl__AddDropOwnerPlayerBufftDef_PlayerKey_ContendNPCObjIDRötDelBuffBySkillIDtDef_SkillID_DropOwnerBuffRÙR¤R¥RÚR¦RcRdR*R§RÍR0tCheckKillNPCByCntR RR.R;R4R•RRRÝRzR{R|RRR'RRíRŽ(R?R7R½R-RERRRûtlastDropOwnerIDtlastDropOwnerTypeRËRùR•R·R¸thurtListRR‚R˜RÐR®tisOkR RRŒRÐ((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRDhs¤      $!     
"!    ,     ' ?'    #cCsb|j}tj|tjƒd}|s^tj|tj|d|ƒtjd|jƒƒndS(NiRPsÌí¼Ó¹éÊôbuff: playerID=%s(    R7R¹RºRRVtAddBuffBySkillType_NoRefurbishRR•R?(R?RR7RtfindBuff((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__AddDropOwnerPlayerBuff×s     c
Cs>|j}|tjkrŒtj|tjƒ}|s7dStjd|ƒtj    |tj
|d|ƒ|tj kr:|j tj dƒq:n®|tjkr:tjƒj|ƒ}|sºdStjd|ƒxlt|jƒƒD]U}|j|ƒ}    |    dksÞ|    jƒdkrqÞntj    |    tj
|d|ƒqÞWndS(Nsɾ³ý¹éÊôÍæ¼Òbuff: playerID=%sRPisɾ³ý¹éÊô¶ÓÎébuff: teamID=%s(R7RR~RRaRbRcR•RöRURVRBRhRTRÙR¤R¥R*R¦R§RR?(
R?RûR½R-R7RRR•RÐR®((seD:\SG_ServerCode\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(R7R_RRLRMR~RRaRbRct*_NPCControl__SetDropOwnerBuffDisappearTimeRÙR¤R¥R*R¦R§RR?RÝRzR{R|( R?RR-R½RR•RÐR®R RRŒ((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytDelayDropOwnerBuffDisappearTime÷s2     c Cs"|j}tjƒjtjƒ}|s+dStj|ƒ}tj||ƒ}|dkr\dSd}tj    ƒj
ƒ}|d}xt |j ƒƒD]‰}    |j |    ƒ}
|
jƒ} | jƒtjkrÍq‘n|jƒ|
jƒkréPn|
j|ƒ|
j|ƒ|j|    |
jƒƒPq‘WdS(s ÉèÖõôÂä¹éÊôbuffÏûʧʱ¼ä Ni'i((R7RR¯tGetSkillBySkillIDRRVR¹t GetBuffTypetGetBuffManagerByBuffTypeRNRcR*t GetBuffCounttGetBufftGetSkillRR‹t
GetOwnerIDtSetCalcStartTickt SetRemainTimetSync_RefreshBufft GetRemainTime( R?RRt    findSkilltbuffTypet    buffTuplet
RemainTimeR7tbuffStateManagerRtcurBufft    buffSkill((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__SetDropOwnerBuffDisappearTimes.     
   N(\t__name__t
__module__RR7RARÍRLRPRUR]RRRrRwRˆRR R™R RŽR¨R¢RÃRt Def_NPCRefreshAngryValueIntervalRËRÅRƒRÐRÓRÕRÙRÜR•RÞRÝRóRRRRR RRfRRmRRR6R9t!_NPCControl__DoNPCRebornPreNotifyRßRERFRiRZRGRvRrRsR¿R…R‡R­R®RÛRÂRÍRÎR†RÕRÔRòRÓRRØRÜRÞRR™RRRR¶R°RKRCt!_NPCControl__GetMaxHurtTeamPlayerRDRSRQRaR`(((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRl¡    sª            K >        /     o     4        @    R#                                    6    @                                  ,             )             2&                            *    *             6k    #    +    !    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_RRTRR†R8RBR?R•RRlRDR~R (RtdefenderR7tcontendNPCObjIDRRûR‚t
npcControl((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytOnPlayerKillNPCPlayer=s        cCsVtjƒ}||_||_||_||_t|jƒ|_tj    ||ƒdS(N(
RvttagMCVirtualItemDropt
ItemTypeIDRxRytUserDataR8t UserDataLenR}R~(RŒR[R„R…t userDataStrt    vItemDrop((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR‘Ps                 cCsŸtjƒj|ƒ}|sdStjtj|ƒƒ}tjd||ƒ}|ra|jƒ}n |jƒ}|swdS|j    ƒ}|j    ƒ}t
|||ƒS(NiR( RR¯R°RRRRRR5Rt
CalcNPCExp(RRRçRRR]R™Rû((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR'[s   cCs(ttjdtjddƒƒƒ}|S(NR3i(RÛRÜRÝRRé(R]RûR™R9((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR„ks$cCsFtjtd|jƒdfƒ}|dkr2dS||||ƒdS(Ns AIType_%d.%stOnAttackDieByPlayer(RRRRR(RRRFR((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytOnPlayerAttackNPCDievs" 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((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytCheckCanCollectByNPCID~s  !"cCs{d}tjddƒ}xL|D]D}||kr7qnx(|D] }||jtj|ƒ7}q>W|SW|jtj|ƒS(Nit
CollectNPCi(RRŒRÁRtDef_PDict_CollNpcIDCollTime(RRt todayCollTimetcollectTimeShareIDListR­t    collNPCID((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR‰’s   cCsÌ|jƒ}tjd|ƒ}|s(tS|jƒr8tSt|||ƒsNtSd}t|ƒ}| rµ|dkrµ||jƒkrµt    j
dƒd}|r±t j ||ƒntSt ||||ƒtS(NR‘iis²»ÔÊÐíͬʱ²É¼¯£¡tGeRen_liubo_436832(RRRR tGetIsMissionCollectNPCRRÍtGetCollectNPCPlayerIDR?RR•RRŠtDoCollectNPCBegin(RRR7RRŽtcanCollTogethertcollectPlayerIDR1((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytOnCollectNPCBeginžs$   % cCs=d}| r.t||ƒ r.tjdƒdS|jtj|jƒƒ|jƒd}tj    |tj
ƒ}|r¢t dt |t j|tt jƒƒƒ}n|jƒtjkrÀtjntj}tj|||d|jƒƒ|jƒr
|jtj|ƒntj||jƒtjdƒtj||ƒdS(NisSetCollectNPC fail!ièt    prepareID(t SetCollectNPCRRSRhRtDef_PlayerKey_CollectNPCObjIDR‹tGetPrepareTimeRætGetPrivilegeValuetVIPPrivilege_CollTimeReduceRateRRpR1R)R(R\Rbt ntCollectiont pstCollectingtpstMissionCollectingRtSync_PrepareBegint GetLostHPPertDef_PlayerKey_CollectLostHPTickR0t AddHurtValueR?R~RetOnBeginCollect(RRRŽR7Ršt prepareTimetcollTimeReduceRatet prepareType((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR™ºs  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ˆRR•R RhRŸRÍ(RRt curPlayerIDt curNPCObjIDtcurCollectPlayerIDtcurCollectPlayer((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRžÒs   cCsi|jtjƒ}|dkr"dStjƒj|ƒ}|setjd|ƒ|jtjdƒdS|S(Nis>GetCollectNPCID ÓÐcurCollectPlayerID=%s£¬µ«ÕÒ²»µ½¸ÃÍæ¼Ò£¬ÖØÖÃ!(R_RR®RRˆRR•Rh(RR±R²((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR˜æs     cCst|jtjƒ}|dkr"dStj|ƒ}|rM|jtjdƒn|jtjdƒtj||ƒdS(Ni(    R_RRŸRR†RhR®Ret OnExitCollect(RtcollectNPCObjIDR((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytClearCollectNPCùs cCsÜtjd|ƒ}|s-tjd|ƒdS|jƒr=dStj|||tƒtjƒr«t    j
|ƒ}idd6|j ƒd6|d6}tj t j||gƒnt|||ƒtj|||ƒt|ƒtS(NR‘s    ·ÇÌØ¶¨²É¼¯NPC...npcID=%sitResultRçR$(RReRR•R—RñtDoCollectingLostHPRÍR#RtGetPlayerServerGroupIDR?tSendMsgToClientServerR1tCrossServerMsg_CollectNPCOKtDoGiveCollectNPCAwardRet OnCollectOKRµ(RRR7RŽt serverGroupIDR¬((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytDoCollectNPCOK
s  !
cCsM|dsdS|d}tjd|ƒ}|rIt|||dtƒndS(NR¶R$R‘tcrossCollectOK(RReR»RÍ(RtmsgDataRRŽ((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRº$s
 
c    Cs tjƒj|ƒ}|jƒ}|j}|jtjƒsPtjd|ƒdSt    j
|ƒ}t    j |ƒ}tj d|||f|ƒ|s¥tjd|ƒdSt j||||ƒsÞtjd|||f|ƒdStjd|ƒ}|r    t|||ƒndS(Ns%·Ç×Ô¶¨Ò峡¾°ÖУ¬ÎÞ·¨»ñÈ¡¶¨Òå²É¼¯½±Àø!s)ǰ¶Ë³¡¾°²É¼¯: mapID=%s,lineID=%s,npcID=%ssÎÞ×Ô¶¨Ò峡¾°µØÍ¼ID£¬²»ÔÊÐí²É¼¯!s5×Ô¶¨Ò峡¾°µØÍ¼²»ÔÊÐí²É¼¯! mapID=%s,lineID=%s,npcID=%sR‘(RRˆR|R?R$R_RtDef_PlayerKey_ClientCustomSceneRSRRŠR‹RRetOnCustomSceneCollectOKRRR»(    RRˆR7RR‚RRRšRŽ((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytOnGetCustomSceneCollectAward5s&     cCsftjd|||fƒ|dkr*dS|jƒr:dSt}|jƒ}|dkr-t||ƒ}td||ƒ}    t||    ƒ}|dkr³tjd|||fƒdS|jt    j
|ƒ}
|
|} t j |t    j
|| ƒt ||gƒtjd|||
| fƒ|||k}ng} |jƒ} |jƒ}|rT|jƒd krÚ|jt    jƒ}|j|iƒ}|jt    j
|ƒ}
|
|kr½| j||
ƒntjd||
| fƒqTt|jt    j|ƒdt    jƒ}||kr | j||ƒnt j |t    j||ƒtjd    || fƒn| s½|jƒ}tj|| |ƒ}tjd
|| |fƒtj|ƒ}|r½| j|ƒq½ntjd | ƒg}| rêxZ| D]R\}}}tj||||tjgƒrá|jtj|||gƒƒqáqáW|sû|jƒrÔt j!ƒ}||_"xN| D]F\}}}t j#ƒ}||_$||_%||_&|j'j|ƒqeWt(|j'ƒ|_%t)j*||ƒnt+j,|| ƒqûntj-d |ƒt.j/|t0j1||gƒ|r3t2j3|t    j4ƒn|sbt+j5||ƒ|rbt+j6|ƒqbn|S(Ns4¸ø²É¼¯½±Àø: npcID=%s,collectCnt=%s,crossCollectOK=%sisF    ¸ÃNPCÒÑ´ïµ½×î´ó²É¼¯´ÎÊý: npcID=%s,todayCollTime=%s,limitMaxTime=%ssI    Ôö¼Ó²É¼¯´ÎÊý: npcID=%s,todayCollTime=%s,curCollTime=%s,updCollTime=%si isL    ²ÝÔ°²É¼¯¶¨Öƽ±Àø: fairyDomainVisitCnt=%s,curCollTime=%s,awardItemList=%sis7    ²É¼¯´ÎÊý¶¨Öƽ±Àø: collTotalTime=%s,awardItemList=%ssS    ³£¹æ²É¼¯ÎïÆ·È¨ÖØÁбí: alchemyDiffLV=%s,collectAwardCfg=%s,giveItemWeightList=%ss"    ×îÖղɼ¯½±Àø: awardItemList=%ss²É¼¯ÎïÆ·Ã»Óн±Àø£¡npcID=%s(i i(7RR•R—R RˆR‰RR0RÁRR’RRÒtSyncCollNPCTimeRŒtGetCollectAppointAwardtGetCollectResetTypetDef_PDict_FairyDomainVisitCntR‘R“t Def_PDict_CollNpcIDCollTimeTotalR2tGetAlchemyDiffLVR.t GetWeightItemListByAlchemyDiffLVtGetResultByWeightListR0RARbR4R2tGetNotifyCollectResultRvttagMCCollectAwardItemInfot CollectNPCIDttagMCCollectAwardItemtItemIDRŠt IsAuctionItemt AwardItemListR8R}R~tGameLogic_CrossGrasslandtRecordGrasslandAwardRSR5R6R1tSuccType_CollectR'R(tDef_GarbageTask_CrossCollecttDecCustomSceneNPCCounttDoCheckUpdateGrasslandEnd(RRRŽt
collectCntR¿tisSweept    isMaxTimeRR“t canCollectCntt curCollTimet updCollTimet awardItemListtcollectAwardCfgtcollectAppointAwardCfgtfairyDomainVisitCnttgrasslandCollectAppointCfgt collTotalTimet alchemyDiffLVtgiveItemWeightListt giveItemInfoRlR[RhRit    awardPackt    awardItem((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR»LsŽ     
   &  !&                   cCsdS(N((RR^taddMoneyt    addZhenQitsyncItemInfoListt collectNPCID((seD:\SG_ServerCode\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“RRÁRR’RvttagMCNPCIDCollectionCntR=R$t CollectionCntttagMCNPCIDCollectionCntInfotNPCCollCntListR8t
CollNPCCntR}R~( RR­t    isSyncAllt
ipyDataMgrRR«tsyncListRt    collCountt collCntInfot npcIDCollInfo((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRÄ«s:      
         
    cCs·t|ƒtjddiƒ}xG|jƒD]9}|jtj|ƒr,tj|tj|dƒq,q,WxGt    dƒD]9}|jtj
|ƒrvtj|tj
|dƒqvqvWdS(NR°iii( tCollNPCTimeOnDayRRŒRŽRÁRR½RRÒRøRØ(RR’R[R.((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt PlayerOnDayÐs
!!cCst|dgƒdS(Ni(tDoResetCollectNPCTimeByType(R((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRýÜscCs×g}tjƒ}x¨t|jƒƒD]”}|j|ƒ}|jƒ}|rd|jƒ|krdq%n|jƒsvq%n|jt    j
|ƒs’q%nt j |t    j
|dƒ|j |ƒq%W|rÓt||ƒndS(s_ÖØÖòɼ¯Îï²É¼¯´ÎÊý
            ÖØÖÃÀàÐÍ: 0-²»ÖØÖã¬1-ÿÈÕ5µã£¬12-Áé²ÝÔ°ÖØÖã¬14-ÏɲÝÔ°ÖØÖÃ
    iN(RRïR*RðRñRRÆRˆRÁRR’RRÒR“RÄ(Rt resetTypeListtresetNPCIDListRøRR«R((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRÿás    c    Cs i}|s|Stjƒ}tjdt|ƒƒg}xIt|jƒƒD]5}|j|ƒ}|jƒ}|dkrqLn|jƒ}||krqLn|j    |ƒd}    t
j |ƒ}
|j ƒ} |j ƒ} t
j|ƒ} d}|jƒtjks|jƒ rbd}    |jƒ}|dkrbtd||jƒƒ}td||ƒd}qbn||
| | | |    |g||<qLWtjdt|ƒƒ|S(NsGetNPCInfo...queryNPCIDList=%siiiès    npcInfoDict=%s(RRaR•RæRøt GetNPCCountt GetNPCByIndexR‹RR“R9RkRRRjR>RbR?tIsAliveR7RRh(tqueryNPCIDListR7t npcInfoDicttgameNPCManagert findNPCIDListRRtcurIDRRßtcurHPR„R…RhtrefreshRemaindSecondt refreshTimetpassTick((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt
GetNPCInfoýs<        "  #cCsýtjƒ}|jƒ||_||_g|_x£|jƒD]•\}}|\}}}    }
} } } tjƒ}|jƒ||_||_    ||_
|    |_ |
|_ | |_ | |_| |_|jj|ƒq>Wt|jƒ|_tj||ƒdS(N(RvttagMCNPCInfoListR=tMapIDt    PlayerCntt NPCInfoListRlt tagMCNPCInfoR…R$R RIRxRytIsActivet RefreshSecondR“R8t
NPCInfoCntR}R~(RRt    playerCntRt npcInfoPackR    tnpcInfoRR
RhR„R…RßR ((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt SyncNPCInfo,s* 
             
                                c    Cs¼i}tjƒ}tjdt|ƒƒt|tƒrñxft|j|ƒƒD]œ}|j||ƒ}|j    ƒ}|dkr„qNn|j
ƒ}|r¨||kr¨qNn|j ƒt j ksN|jƒ rÐqNn|j|dƒd||<qNWn°x­t|jƒƒD]™}|j|ƒ}|j    ƒ}|dkr7qn|j
ƒ}|r[||kr[qn|j ƒt j ks|jƒ rƒqn|j|dƒd||<qWtjdt|ƒƒ|S(Ns!GetNPCCntInfo...queryNPCIDList=%siis    npcCntDict=%s(RRaR•RæR’RpR*tGetNPCCountByGWIndextGetNPCByIndexByGWIndexR‹RR>RbR?RR‘RR(    RR7RÔt
npcCntDictRRRR    R((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt GetNPCCntInfoKs8    "!   "cCs£tjƒ}|jƒ||_g|_xR|jƒD]D\}}tjƒ}|jƒ||_||_|jj    |ƒq5Wt
|jƒ|_ t j ||ƒdS(N(RvttagMCNPCCntListR=RRRlttagMCNPCCntInfoR$tCntR“R8RR}R~(RRRRRÁtnpcCntR((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytSyncNPCCntInfoys 
         
        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‹RQRR¸RæRRˆR‰R8R•(RRRšRR[R¢t recBossIDListtrecDropEquipInfoDicttrecSpecialItemIDListt recItemIDListt
needRecordt itemUserDatat weightValuet
equipPlacet itemClassLVt    itemColorRÑR3trecordConditiont needClassLVt needItemColort needItemSuiteR‚t
playerNameR½t dropEquipMsg((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR™Šs>   $   0(cCsdS(N((RRˆR7((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytOnBuyCollectionCnt¼scCs=tjƒj|ƒ}|j}tjddiƒj|ƒ}|sFdStj||ƒ}|t    j
||ƒ7}|j t j |dƒ}|jƒ}||kr½tjd||f|ƒdStj||ƒ\}    }
|    |
krùtjd|    |ƒdStjddiƒj|ƒ} | s‹tjddiƒjt|ƒgƒ} | s_tjd|ƒdS|t| ƒkr~| d    } q‹| |} n| s•dStjdd
iƒjt|ƒtjƒ} i|d 6|t j6}tj|| | t j|ƒ}|sþdStj|t j ||dƒtj||ƒtj|ƒdS( NtKillBossCntLimit1iisH¹ºÂòBOSS¿É»÷ɱ´ÎÊý, ÒÑ´ïµ½½ñÈÕ×î´ó¿É¹ºÂò´ÎÊý£¬hasBuyCnt=%s, canBuyCnt=%ss1¹ºÂòBOSS¿É»÷ɱ´ÎÊý, Ê£Óà´ÎÊýÒÑÂú£¡£¬canKillCnt=%siis5ûÓÐÅäÖÿɹºÂòboss´ÎÊýÏûºÄ£¬ÎÞ·¨¹ºÂò! killBossMark=%siÿÿÿÿiR(RRˆR|t KillBossMarkRRŒR‘RæR¡R0tGetAddBossBuyCntRÁRtDef_PDict_Boss_KillCntBuyCntR?R•RìtGetCanKillBossCntRæR8RbtTYPE_Price_Gold_MoneytDef_Cost_Reason_SonKeyRtPayMoneytDef_Cost_BuyKillBossCntRÒRítCrossPlayerDatatSendMergePlayerDataNow(RRˆR7Rt killBossMarktbuyTimesVIPPriIDt    canBuyCntt    hasBuyCntR‚t
canKillCntt dayTimesLimittcostGoldt costGoldListt    moneyTypetinfoDicttisOK((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytOnBuyKillBossCntÇsH       '  * cCss|j}|j}tjƒjtj|ƒ}|s8dStjƒjtj|dƒtjd|||fƒdS(Nis,ClientNPCShowEnd npcID=%s,endType=%s,tick=%s(    R$tEndTypeRRJRQRtDef_FBDict_NPCShowEndTickRªR•(RRˆR7RtendTypetendTick((seD:\SG_ServerCode\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((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytIsMapNeedBossShunts  
cCs^||f}tjj|iƒ}||jƒ|g||jƒ<|tj|<t||ƒdS(N(Rtg_bossShuntPlayerInfoR‘R'R?tGameServer_WorldBossShuntInfo(RRRšRR7RËtshuntPlayerDict((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytAddBossShuntRelatedPlayers    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((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR]s  (cCstj|tj|ƒdS(N(R9tNotifyObjInfoRefreshRbtCDBPlayerRefresh_Speed(RRo((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRm!scCsÓ|s
dStjd|||fƒtj|tj||ƒtjƒrtj|ƒ}i|jƒd6|d6|d6|d6}tj    t
j ||gƒn2t ||gƒ|rÏ||krÏt j|ƒndS(Ns8¸üÐÂÍæ¼Ò¹¥»÷NPC´ÎÊý: npcID=%s,attackCount=%s,maxCount=%sRçR$t AttackCounttMaxCount(RR•RRÒRtDef_PDict_NPCAttackCountR#R¸R?R¹R1tCrossServerMsg_NPCAttackCounttSyncNPCAttackCountRÓRØ(RRt attackCountR1R½R¬((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytUpdateNPCAttackCount&s (cCs5|d}|d}|d}t||||ƒdS(NR$RdRe(Rj(RRÀRRiR1((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRg7s
 
 
 
cCs‘|s
dStjƒ}xR|D]J}|jtj|ƒ}tjƒ}||_||_|jj    |ƒqWt
|jƒ|_ t j ||ƒdS(N(RvttagMCNPCAttackCountInfoRÁRRfttagMCNPCAttackCountR$RdtNPCAttackCountListR“R8RŠR}R~(RR­RÊRRit atkCountObj((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRh?s           cCst||ƒdS(N(t__OnAttackedDropItem(tatkObjRRFR7((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt OnNPCAttackedPs 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(!R0tGetAttackPlayerRRRtGetAttackCountDropWeightInfotGetAttackDropWeightListtGetAttackDropWeightListExtGetDropCountExRÉRRÁRRfRjR.RÊRRËtGetNotDropNotifyRRŠR“R*RŠR9RÓRÔRRR|t DoMapDropItemR (RpRt attackPlayerR
RR«tattackCountDropWeightInfotattackDropWeightListtattackDropWeightListExt dropCountExRåtmainItemWeightListR1Rit mainItemInfot notDropNotifyRt weightListExRmR€RRoRp((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRoYsd            (¶RbRRR“RRRöR2R¹R¹R0R0R.ReR±RRR^R1R|RvRŠR}RâRøR5RìtPlayerPrestigeSysR.R<R±RÜRûRþR°R¨RRÓR'RìRRCRæRR0RR¤R³RR RRLRRõRñR¶Rt
PlayerTeamRµRæR9R®RYR;R†RRRßRøR³R´RµR¶tNPCAttr_DynNPCLVMaptNPCAttr_DynPCCoefficientMapRR R$R&R)R+R,R-R4R6R8R:R<R>RARCRER RˆRtR§RgRuRÍR:R9RÚR¬R+RßRÛRÝRÜRÈRîRàRƒRÞRÉRËRòRäRôR÷RýRRRRRR%R-R;R=RARGRRR`RuR„R‰RRRŸR‡RÖR©R6RlR}R‘R'R„R†RR‰RœR™RžR˜RµR¾RºRÃR»RîRÄRþRýRÿRRRR#R™R9RPRUR[R_R]RmRjRgRhRqRo(((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt<module>sr                                                                  
                                                                      w        |    Ÿ*[    ÿV                     $            Å     :     /        +             
                !    !    +    >    ]             -(                8        Q            Wÿÿÿÿÿÿÿÿÿÿÿ§                                                               \  %              /     .     2         6