hxp
2025-05-29 f08058713e574c675579ca5ccbfabeb1e6702cf0
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
t8hc    @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@eAZBeCdƒ\ZDZEZFZGZHZId„ZJeAd„ZKd„ZLd„ZMd„ZNd„ZOd    „ZPd
„ZQd „ZRd „ZSd „ZTd„ZUd„ZVd„ZWd„ZXd„ZYd„ZZe[d„Z\d„Z]d„Z^ddeAd„Z_eAeAe[gdgde[d„Z`eaead„Zbddeadgd„ZcdZdd„ZegeAeaeadd „Zfd!„Zgd"„Zhd#„Zid$„Zjd%„Zkd&„Zld'„Zmd(„Znd)d*„Zod+„Zpdd,„Zqd-„Zrd.„Zsd/„Ztd0„Zud1„Zvd2„Zwd3„Zxd4„Zyd5„Zzd6„Z{d7„Z|d8„Z}d9„Z~d:„Zd;„Z€d<„Ze[ead=„Z‚ead>„Zƒdddddd?„Z„d@„Z…dA„Z†dB„Z‡dddC„ZˆdD„Z‰dE„ZŠeagdF„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ŸeAd\„Z d]„Z¡d^„Z¢gd_„Z£d`„Z¤da„Z¥eAdb„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.pytInitNPChs" 
 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.pytGetNPCLVws  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
|jƒS(N(t
GetCountry(R((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt
GetFaction˜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 tGameObjtGetMaxHPtGetHPtitemsRR4tSetMaxHPR0R2tgetattrtSetHPtintt    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_fbRobotJobDicttgetRmt
isinstanceRqtappendtlisttDebugLogtGetSkillManagertLearnSkillByIDRetOnRandomRobotJob( RtnpcLVtlineIDtobjIDt jobSkillDicttrobotJobtlineRobotJobDictt skillInfoDictt skillIDListt    skillInfotneedLVt skillManagertskillID((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRus* 
 
   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RmR“RqR”R•RR–R˜(
RtjobRšR¤RR R¡R¢R£R¥((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__DoGiveVSPlayerNPCSkill/s   
  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_NPCPlayerCntCoefficientRjRlRRRtGetPlayerLVIpyDataR<R>t
GetReMaxHPtGetReAtktGetReDeftGetReHitt    GetReMisst GetReAtkSpeedtGetReSkillAtkRatetGetReDamagePertGetReDamReducetGetReIgnoreDefRatetGetReLuckyHitRatet GetReLuckyHittGetReBleedDamaget GetReIceAtkt GetReIceDeft GetRePetAtktGetRePetSkillAtkRatetGetRePetDamPertGetReFinalHurttGetReFinalHurtReducetGetRePotionReplyt GetRePotionCDtGetReFightPowert
GetHitTimetGetDefCoefficienttGetAtkCoefficienttGetAdjustCoefficienttGetAtkIntervalt
GetHitRatet GetMissRatet GetMonterNumtGetIceAtkCoefficienttGetIceDefCoefficienttGetMaxEnduranceTimetGetFightPowerCoefficienttevaltFormulaControltGetCompileFormulatGetLVStrengthenMarkR’RqtlocalstGetMaptGetMapIDtFBCommontGetRecordMapIDRmRRoR“tdicttGetDictValueByRangeKeytstr(BRRyRzRxtnpcDatatattrStrengthenInfoR‚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.pyRgCsÆ
 
 
 
                                       ( 
 
 
        
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Rmt    GetNPCExpRqtfloatRtDef_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    dropNPCIDRrt
sightLevel(R“R•R+R”R@RRáRtGetMapRealmDifficultyRtDef_DropItemAreaMatrixtCanMoveR9R1R2tChItemtAddMapDropItemtDef_NPCHurtTypePlayer(RRlRRpRqRsRrt dropItemListtitemInfoR\RiRjRntindextplayerIDtgameMapRytposXtposYtresultXtresultYRo((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@R1tPlayerItemControlerR“R•ttupleR2RRŠtGetCounttGetIsAuctionItemR}tGetMapDropItemDataStrR”R+R>RáRR{R|R9tSendVirtualItemDropR/R=R.tGetItemClassLVt GetItemColort
GetSuiteIDt GetUserDatatGetItemPackTypet    PutInItemtItemGive_PickupR tSendGameServerGoodItemRecordR?( Rt giveItemListRRpRqRsRItextraVirtualItemListRR›RƒtgiveItemObjListtvirtualItemDropListt itemControlRR\RiRjRotdropItemDataStrRnR„R‚R…R†R‡RˆRttitemObjtmailItemt    equipInfot    packIndex((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR:‰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–RRNROR1RUR9t 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’R9Rqt    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 tianxuanBuffRcRdReRft itemJobListR{t
doCountAddt doCountRatettagJobtdropEquipKillCountPubtdropItemIDKillCountPubtequipDropRatePlustequipDropDoCountPlust ownerPlayertkillCountValuetequipPubKillCounttitemIDPubKillCounttdropRatePlusValuetdropEquipInfoListt pieRateDoCnttindepRateDoCntttianxuanEquipRateListRbt
tagClassLVttagColort    tagIsSuitt tagPlaceKeytkillCountDropEquipPubtkillCountDropItemPubtmaxRecordDropEquipKillCountPubtmaxRecordDropItemIDKillCountPubttagIndextkillCountItemIDListtkillCountRandItemIDListtklllCountRandItemIDtisUpdtitemIDPriKillCounttupdKillCountValuetgradeColorSuitRateDicttfbGradeColorSuitRateDicttequipColorDropLimitDaytcolorDropCntDicttcolorMaxDropCntDicttcolorSuitRateDicttcolorSuitPlaceKeyInfoDicttcolorSuitPartOptimizationtoptColort    optIsSuittoptPlacet dropEquipInfotclassLVtcolortcolorCountTodayt colorCountMaxtmaxCountt    dropCounttisSuittplaceKeytjobListtsuitRatetsuitRateEffListt suitRateEfft colorSuitKeytallEquipPlaceListt    placeListtrandEquipIDListt
randItemIDtkillCountDropInfot needKillCounttkillDropItemListtkillCountDropIDListt kDropItemIDtfbGradePriItemIDDropDicttgradePriItemIDDropDicttpriDropInfoListt priDropIDListt    priItemIDt priItemCountt    priDropIDtfbGradeDropItemExDicttgradeItemExDicttgradeItemExListt    gItemExIDt gItemExCounttfeastWishDropIDListtkillBossCntLimitDictt
limitIndext bossTrialDroptbossTrialItemIDtbossTrialItemCounttdropMoneyDoCntt dropMoneyRateRntdropID((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>tsuitRandCountExRnRg((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRàTscCsmtjddiƒ}||kr@g||D]}|d^q,Stjddiƒ}||kri||SgS(NtEquipDropPartSetsii(RR(R5tplaceKeyRateListDicttrateInfotplaceKeyListDict((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRÜas  cCsg}tjddiƒ}||krU||}tj|ƒ}|rU|g}qUn|sŒtjddiƒ}||krŒ||}qŒn|S(NR\ii(RRRRÏ(R5R<R]t placeRateListtplaceR_((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRÞjs 
 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*RRq(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(Rct mutexDropInfot mutexDropListtisMutextmutexIDt curDropIDCntRn((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êtGetItemKeyMaxDropCounttGetItemKeyDropRateJobRmR9RRSRÛR’RÉR+RÚR”tGetItemKeyDropRateRâtcopytdeepcopyRhR–RÏRYRŽt__dropIDCountLimitTodaytGetItemIDDropRatetGetItemIDMaxDropCountRãRNRqttimeROR1t 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 canDropCounttdoCntRnt    jobItemIDtItemKeyDropRateDictttianxuanItemKeyRateDictRZtrandItemRateListR>t randItemListtitemIDDropRateDicttitemIDDropMaxCntDictttianxuanItemIDRatetglobalDropCDDicttglobalDropRateDicttgwR\tcurTimet lastDropTimetcdTimet
remainTimetmsgInfoRbt    npcIDListt
rateFormatt    killedCnttisDropt updKilledCnttglobalKillDropDicttkillCountDropDicttupdNPCKilledCountt
isJobLimittitemIDCountDicttrandItemIDCountListRiRgtitemJobtrandJobItemListtrItemIDt
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Rm(tfindIDR.R/R4R<RtfindTypetkeytfilterItemIDDicttgameDatat itemTypeListtitemTypetiRgtsuiteIDR¹RhR\t placeItemListR[RRr((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 dropRateListRnRb((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çR9R+t    iteritemsRqRtDef_Quality_OrangeRÛRRÚR”(RR©RRÖR#Rt indepRateDicttgradeColorRateDicttfbGradeColorRateDicttorangeEquipPertfbGradeOrangeEquipPerDicttorangeEquipPerListRRnRbtrateR™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*RqtOnGetOuterMoneyRate(RR©Rt    baseMoneyRft    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@RAR t killCountPritupdRecordValuet jobDropInfoR¶t
dropItemIDRgR¹((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.pytIsInActionTimeTs  cCs|jƒtjkrtStS(N(tGetGameNPCObjTypeRbt
gnotSummonRÎR (R((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt IsSummonNPCcscCsIxBtd|jƒƒD]+}|j|ƒ}|jƒ}|jƒqWdS(Ni(trangetGetSummonCounttGetSummonNPCAtRR>(RRÑt    summonNPCtangry((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytClearSummonAngry_Playerns 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.pytGetSummonOwnerDetelxs   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ŒRi(t
curobjTypet    curSummonR€RtcurSummonOwnerDetel((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 GetObjByIndexRjRlRRbRc(
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 RRbRcRiRjRlRRaRŒ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ùRRR R RRbRcRiRjRlRŒ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ùRRRRjRlR Rt    IsSameObjtGetDistRRRaRŒRRRt AttackCommontCheckCanAttackTagt
BaseAttacktGetTagRelationRtType_Relation_EnemyR ( Rt    checkDistt
checkCountttickR]R2RÑR#ttagDistt seeObjDetailtrelation((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt&CheckCanAttackTagLimitCountInSight_NPCYs<  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 GetOrgSpeedRbtmtRuntSetCurMoveTypeRqR_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\RtRuRtRebornR t
NPCControltDoNPCRebornCommLogicRetDoFBRebornSummonNPC(
tnpcIdtrebornXtrebornYtaiTypetlastTimeRƒRyt    refreshIDRR8((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__NotifyMapPlayerSummonMapNPCVs 
             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
clientDataR8RRœRR€((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytOnRecyclePriWoodPilems    
cCsStjƒj|ƒ}|j}|j}|j}|j}t|||||ƒdS(N(RR‰R}R%tCounttHPtHPExtSummonPriWoodPile(R‚R‰R8RRR]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=%sRv(ii('RR‹RŒRetOnCanSummonPriWoodPileRRSR@Rtg_playerPriWoodPileNPCDictR9R0R–RbR+RcReRjR[RRiRR`tGameMaptGetEmptyPlaceInAreaRRRlR Rmt ResetNPC_InitRÎR1tDef_PerPointValueRjRpRnt NotifyAppearR”(RRR]RRRR›RƒtplayerPriWoodNPCListR2tnowCountt summonCountt
npcManagerRnRü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ƒ}x6t|jƒƒD]"}|j|ƒ}|j|ƒq%Wx|D]}t|ƒqRW|jƒtjkr‹t    j
|ƒn|j t j ƒ}|dkr¿|jt j dƒntj|ƒ}|rð|jtjƒjƒƒnt j|ƒrËtjd|ƒ}|r“|jƒt jt jgkr“t|dƒtjƒjt j|tjƒjƒƒt|ƒt j kr“t!j"|ƒq“nt#j$|ƒ|tj%ddƒkrËt&j'|ƒqËnt(j)|ƒt*j+|ƒt,j+|ƒ|j-ƒt j.krTtjƒj/ƒ}    t0j1j2|    iƒ}
|
j3|j4ƒdƒ|
t0j1|    <n|j t j5ƒ} | dkrê| t0j6krêt0j6| } xY| D]N} | r•| j4ƒ|j4ƒkr•| j7| ƒ| sßt0j6j3| ƒnPq•q•Wn|j|j t j8ƒ|j t j9ƒ|j t j:ƒƒdS(NitBOSSInfotCrossYaomoBossi(;RRùRúRûR”RˆRRbtgotNPCRet DoFB_NPCDeadR_RR RitNPCRealmRefreshtGetTagNPCRefreshtSetDeadRRNRdRõRRRâtDef_FBMapID_SealDemontDef_FBMapID_ZhuXianBosstGameServe_GameWorldBossStateRJt SetGameFBDicttMap_NPC_WorldBossDeadTickR8tDropOwnerType_FamilyRLtClearFamilyOwnerBossHurttChNPCt OnNPCSetDeadRêtPlayerCrossYaomoBosstOnCrossYaomoBossDeadR1tClearTeamPlayerHurtValuetNPCHurtManagertDeletePlayerHurtListt
NPCHurtMgrR\RtR‹RR‘R’RŸRŒR`R“RutDef_NPCDead_ReasontDef_NPCDead_KillerTypetDef_NPCDead_KillerID(Rt summon_ListtnpcidR‚t curSummonNPCRüR€t
refreshObjR¬R›RŸtpriWoodPilePlayerIDtpriWoodPileNPCListt
priWoodNPC((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRˆÖs\   $ )        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ŠR9R–(    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ŠR9R–RtDef_CrossZoneMapTableNameRRft    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ª#    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 SendEventPackR6R7R1tSuccType_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èRQRRttotalKeyRÛRÌtnewCnttdataDictR¬((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytOnPlayerKillBoss<    s€  " #RmcBs\eZdVZd„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,„Z2eed-„Z3d.„Z4d/„Z5d0„Z6d1„Z7d2„Z8d3„Z9d4„Z:d5„Z;d6„Z<d7„Z=d8„Z>ged9„Z?d:„Z@d;„ZAd<„ZBd=„ZCd>„ZDd?„ZEd@„ZFdA„ZGeedB„ZHdC„ZIdD„ZJdE„ZKdF„ZLedG„ZMdH„ZNdI„ZOedVdJ„ZPeddK„ZQdL„ZRdMeedN„ZSdO„ZTdP„ZUddedQ„ZVdR„ZWdS„ZXdT„ZYdU„ZZRS(WcCsL||_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(    R-RRtabsRRáR|R”R•(R5tdestXtdestYtdisttfixPosRR…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(    R-RRRtPosInLineByDistRáR|R”R•( R5tplayerXtplayerYR;R<RR…R†R?R@R„RA((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(R-RRaRtGetNametMoveToObj_Detel(R5Rœ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(R-RRRR0tMove(R5tdestPosXtdestPosYt 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 (R-tOperControlManagertIsObjCanDoActionRtDef_Obj_ActState_ServerActRbtoalMoveRRRRCtGetRefreshPosCounttGetRefreshPosAttGetCurRefreshPointIndexRR0t GetMoveDisttMoveBackRFR”R•R?t    laNPCMoveRNRdt GetActionTickt
SetDestPosRaR\RL( R5RJt moveAreaDistRR…R†R9R:t curRefreshPostmoveDistR?R@RA((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRHý    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(R-RTRURRVRbRWRRáRRRR RR+RRR£RaRŒRöR÷RÿR0RCR”R•RLRÎ(R5R…R†t fixAreaDistRR„tnpcPosXtnpcPosYRRÑRt
curObjTypetcurTagRAR?R@((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt    FixTagPosH
sD             9   cCs|j}|jƒ}|jƒ}tj||ƒ}|dkrFtjS|jƒdkr_tjStj    |||jƒ|jƒƒS(Ni(
R-RRRRaRRtDef_NPCErrorMaxDistRŒR0(R5ttagIDttagTypeRR…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 ²éÕÒ¶ÔÏó, »ñµÃ¶ÔÏóʵÀýʧ°Ü(R-RRbtgotItemR RR/RŒRt FindNPCAngryRRjt GetAngryValueRaRRR1tCanAttackByPathR2R3R4RR5RÎ(
R5R#R8RR$R+tnpcAngryt
angryValueR:R;((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__CheckAddToAngryListš
s.       ! cCsC|j}tj|ƒ r?t|ƒ r?|jƒtjkr?tStS(N(R-RRõR:R\RtR RÎ(R5R((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(-R-R t
GetAtkTypeRtGetAngryValueTagt_NPCControl__IsValidAngryObjRRát GetMapFBTypeRâRuRãRäRRRbtfbtNullRêtGetAttentionPlayersCountRùtGetAttentionPlayerByIndexRRjRlR t _NPCControl__CheckAddToAngryListR0RRtGetSightRtDef_NPCFirstSightAngryValuetDef_Screen_AreaRRctGetAngryNPCCounttDef_NPC_SeePlayerAddAngrytAddObjToAngryListRÎRYRZRRRõtGetIsInRefreshPoint(R5R8t
isUpdAngryRt
needResorttcurAngrytmapTypeRt recordMapIDtmapAngryNPCCountDicttangryNPCCountLimitR*RÑR#R;t 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„(R5tobjDetelRÆtuseSkilltaddAngry((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytAddObjDetelToAngryList_ByAttackF 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( R-RR/R R1tCheckObjCanDoLogicRRŒt_NPCControl__CheckCanAddAngryRRbRcR8RtDropOwnerType_MaxAngryRaR(tGetTeamManagertFindTeamRRR–R+tGetMemberCountt    GetMemberR@t_NPCControl__AddAngryValueRjRlRAR
RÎ(R5RtplusAngryValuetcanPiletcheckRRftcurObjIDt addAngryTeamRRrRÑt curTeamPlayert teamPlayerIDR((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR„f s>      $   "cCsŠ|j||ƒ}|dks3tj|ƒdkrZ|j|||tj|tjƒn,|r†tj|ƒ|}tj||ƒndS(Ni(RoRRjRptAddAngryR1R—t SetAngryValue(R5RrR¢RfRŸR Rst 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(R-RRaRR R3R4RRR5RöRbR÷RÎRŒR£RRcR/R1tCheckPlayerAttackMode_Player(    R5R¢RfRt 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("R-RR>R RYRZRùt GetAngryCountRxtGetObjIDt
GetObjTypeRRat DeleteAngryRÎRbR£RR1R2R…RRR0RRUt CanSeeOtherRHtGetNPC_Is_GateR3R4RRR5(R5R8RRrtdefaultMaxAngryNPCIDListR‡RŽRÑRstangryIDt    angryTypeRR;R;((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(R-RtGetLastResortTickR¹RtGetMaxAngryTagRRjRlR:RUR\tResorttSetLastResortTick(    R5R8trefreshIntervalR†RRrtlastTickt removeRsortR‡((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytRefreshAngryList@ s      4  cCs^|j}|jƒ}xBtd|jƒƒD]+}|j|ƒ}|j|ƒsUq+n|SWdS(Ni(R-RRùR°RxRyR(R5Rt angryManagerRÑRˆ((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR»c s     cCsU|dks|jƒdkr"dStj|ƒ}|dkrAdS|jƒrQdS|S(Ni(RR±RjRpt GetIsDisable(R5Rˆt curAngryValue((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__IsValidAngryObjx s  cCs#|j}|jƒ}|jƒtS(N(R-RR>RÎ(R5RRˆ((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt ClearNPCAngryŒ s     
cCs#|j}|jƒ}|jƒtS(N(R-tGetPlayerHurtListR>RÎ(R5Rt npcHurtList((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytClearNPCHurtList— s     
cCs|j}|jtjƒS(s¯NPCÊÇ·ñÉËѪ±£»¤ÖÐ
        ÒòΪÊÖÓαȽϻá³öÏÖÍøÂçÇл»µÄÇé¿ö£¬´Ëʱ»á¿ÉÄÜ»áÒýÆðµôÏßÖØÁ¬
        ËùÒÔÕë¶ÔÊÖÓÎ×öÁ˵ôÏß3·ÖÖÓÄÚÉËѪ±£»¤£¬·ÀÖ¹Íæ¼ÒÖØÁ¬ºóÉËѪ±»Çå¿Õ£¬ÌåÑé²»ºÃ£»
        (R-R_RtDef_NPC_Dict_InHurtProtect(R5R((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytIsInHurtProtectž s    cCs@|j}t|t|ƒ}x|D]\}}|jƒq"WdS(N(R-RSRÎR>(R5tisClearAuraBuffRRRt    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ÏR-R´tClearPlayerHurtListR¶RÎ(R5RÌ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(NRv( R-t_NPCControl__ClearNPCAllStateR RjRlRkt_NPCControl__InitNPCSummont_NPCControl__NormalNPCInItCDtRefreshNPCStateRrRÎ(R5RvR((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(    R-t SetAttackTicktSetUseSkillTickR—RùRDRERtSetLastUseTick(R5Rt 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(R-RùRúRûR”Rˆ(R5RtcurNPC_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(R-tGetCurPatrolIndextGetPatrolPosAtRRRTRbR[RaRWRLRõR^tGetPatrolPosCounttSetCurPatrolIndex(    R5R8Rt 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(R-Ràt_NPCControl__PatrolMoveRYRZR0t GetMoveAreaRRtGetAreaRR\RõR^RYRZRaRbR[RRát LineNearToPosRL(R5R8RtPosMaptmoveAreaR…R†t minMovePosXt maxMovePosXt minMovePosYt maxMovePosYtposMapXtposMapYt
posMapAreatnewPoint((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytDoNormalNPCMoveC sH       
 
 
 
 
 
cCstj|jƒƒS(N(Rt GetPsycoFunct)_NPCControl__Func_GetRandPosInRefreshArea(R5((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( R-tGetRefreshPointRRSRRRR\Rbt ntFunctionNPCRëR”tGetNearbyPosByDis(R5RtposMapRó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(R-R¥R¦RûRYRZ(R5RR½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(R-RûR…RRRÎR?RbR]RTRWt GetDestPosXt GetDestPosYR (R5RRŽ((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 RR[RRÎ(R5RPRQRŽ((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(R-RàRYRZRßRRRúRËR–RaRbRWRÎRL(R5Rt patrolCountRâRãR…R†((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR\Ú s         cCsb|j}|jtjd|jƒdƒƒ|jƒ\}}|j||tƒ|j|ƒdS(Nii(    R-tSetCurRefreshPointIndexRYRZRXRúRlR Rn(R5R8RR…R†((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt DoNPCRebornù s     # cCsÇ|j}|jtƒtj|tj|ƒƒ|jƒj|ƒ|jƒ|j    t
j dƒ|j    t
j dƒt j|ƒtj||ƒ|jƒ}t
j|ƒrútjd|ƒ}|rút|dƒt|ƒt
jkr÷tj|ƒq÷qún|jƒ}x t|jƒƒD]Œ}|j|ƒ}| sG|jƒdkrKPn|jƒt
j krfqnt!j"d|j#ƒ|jƒ|j$ƒfƒt%j&|||ƒqW|j'ƒ|j(||ƒdS(NiR¡is/NPC¸´»î£¬Ì×ÉϹ⻷: objID=%s,npcID=%s,skillID=%s()R-R–RÎRjRpRkRR½t RebornNotifyRiRtDef_NPC_Dict_HPPerLogicMarkt!Def_NPC_Dict_RebornPreNotifyIndexR¯t OnNPCRebornRet DoFBRebornNPCRRõRRRªR8R­RLtFamilyOwnerBossOnRebornR—R+RDREtGetSkillTypeIDt GetSkillTypetDef_SkillType_AuraRR–RŒt
GetSkillIDt
SkillShellt NPCUseSkillR˜t NotifyNPCShow(R5R8RtcurNPCIDR¬R¤R‚R”((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRns8     
    ,
c
Cs!tjƒjƒ}tjd||ƒ}|s1dS|jƒrAdStjƒjtj    |ƒ}|rgdS||j
ƒ}tjƒj tj    ||ƒt j ƒ}||_tjƒ}xKt|jƒƒD]7}|j|ƒ}    |    jƒsïqÈntj|    |ƒqÈWtjd|||fƒdS(NtNPCShows&¿ªÊ¼NPCÐã: npcID=%s,tick=%s,endTick=%s(RRáRâRRt GetShowTypeRJRQRtDef_FBDict_NPCShowEndTicktGetProtectTimeR«Rwt tagMCNPCShowR%R{R+R|R}R@R~RR–(
R5RR8RtnpcShowIpyDatatendTickt npcShowPackR„R‚tplayer((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR2s*        cCsdS(N((R5((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRWsc 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(R-RRRRRìtsortedRÎRjRlRkR_RRRt WorldNotifyRi( R5tdropTypetownerIDRRthpPerLogicNPCIDDictthpPerLogicListt    hpPerListtsysMarktnowHPPerthpPerLogicMarktlogicHPPerListthpPer((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt DoHPPerLogicfs$       
  cCs“|j}|jƒdkrdS|jƒdkrXtjd|jƒƒ|j|ƒn|jƒ||jƒ}|dkr‚dS|j|ƒdS(Nis¼ì²âµ½NPC¿ìËÙ¸´»î %si(R-tGetRefreshTimeR^RR–RŒt SetActionTickR(R5R8RR¬((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_RR    R9RqtmathtceilRiRRNRâRR!( R5RR¬RtpreRebornNotifyNPCDicttnotifyMinuteListt
notifyMarkt notifyIndextreaminMt notifyMinuteR((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__DoNPCRebornPreNotify£s   
 %cCs|j||ƒ|jƒdS(N(tRefreshNPCAttrStatetRefreshNPCActionState(R5t canSyncClientRv((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRÕ½scCs™|j}|jƒ|jƒ|j|jƒƒ|j|jƒƒ|jƒtj    krlt
j ||ƒdSt ||ƒt j|ƒ}|j|ƒdS(N(R-tClearBattleEffecttResetNPCBattleStateRZRVtSetAtkIntervaltGetBaseAtkIntervalRöRbRR    tRefurbishPetAttrR‰RtCalcBuffer_NPCBattleEffecttRefreshNPCSpeed(R5R<RvRt allAttrList((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR:És    
 
 
  c
Csö|j}tjtjƒjƒƒ}tjƒ}tjd||ƒ}|sOdSt    ||ƒ|j
ƒ}|j ƒ}|j ƒ}t ttjddƒƒƒ}    tjd|jƒ||    fƒtj||    ƒtj||    ƒ|jƒ|jƒdS(s¢ÖúÕ½»úÆ÷ÈËÖ»ÉèÖÃѪÁ¿ÊôÐÔ
                        ÑªÁ¿Ëã·¨£¬£¨ÖúÕ½Íæ¼Ò=ÖúÕ½»úÆ÷ÈË£©£ºÃ¿¸ö¸±±¾ÅäÖÃÉ˺¦*£¨ÖúÕ½Íæ¼ÒÕ½Á¦/¸±±¾¹æ¶¨Õ½Á¦£©*ϵÊýÖµ  ÏµÊýÖµÔݶ¨Îª50
        t FBHelpBattleNtHelpBattleRobotis3ÉèÖÃÖúÕ½»úÆ÷ÈËÊôÐÔ: objID=%s,fightPower=%s,maxHP=%s(R-RãRäRRáRâtGetFBPropertyMarkRRfR4tGetFightPowerMintGetRobotBaseHurttGetRobotHPCoefficientRqRÜtGetFuncCompileCfgR–RŒRjRnRpRrRs(
R5t
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@(R-RtCalcAttr_BattleNolineR’tTYPE_Calc_AttrSpeedR_RYRiRqRUR1R*RR)RZRRáRâtDef_FBMapID_GatherSoultNPCSpeedChangeNotify(R5RDRtspeedPertspeed((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRCs    3 cCs'|j}tj|ƒtj|ƒdS(N(R-RTtClearObjActionStateRtCalcBuffer_ActionState(R5R((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR;s     cCs;|j|ƒ}|j|ƒ}|s*|r7|jƒndS(N(tRefreshBuffStateNoTimelytRefreshBuffStateTimelyR:(R5R8trefreshAtrefreshB((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytRefreshBuffState+s cCsù|j}||jtjƒtjtjkr3dS|jtj|ƒt}tj||j    ƒ|ƒ}|pt|d}tj||j
ƒ|ƒ}|pŸ|d}tj||j ƒ|ƒ}|pÊ|d}t j ||ƒt j||ƒ}|pø|S(Ni(R-t GetTickByTypeRtTYPE_NPC_Tick_BufftTYPE_NPC_Tick_Timet SetTickByTypeR R÷t RefreshBuffRIRJRMRºtCheckAddAuraSkilltCheckAuraSkill(R5R8Rtrefreshtresult((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR[:s    &cCsÂ|j}||jtjƒtjtjkr3dS|jtj|ƒtj||jƒ|ƒtj||j    ƒ|ƒtj||j
ƒ|ƒ}|drª|j ƒnt j ||ƒ|dS(Nii(R-R`RtTYPE_NPC_Tick_Buff_TimelyRbRcR÷RdRKRLROR;RtProcessPersistBuff(R5R8RRh((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR\Ys    
 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(R-Rt!_NPCControl__SetFeelNPCPlayerListt_NPCControl__GiveObjPrizet_NPCControl__EventKillNpcRRáRâR/t GetPlayerNameRR¦RR©R¨R8R­RLtFamilyOwnerBossOnKilledR4R2R@RÌRÎRêRR!RR>(R5RRRt
killerNamet bossIpyDataRRÈ((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt __KillLogicws"     
 
 
"
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( R-R1R´RÇR+t GetHurtCountt    GetHurtAtt_NPCControl__GetTagByHurtObjR”RtGetAreaTeamMemberRR( R5RRÈ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(R/t_NPCControl__MissionOnKillNPCR1R@RÎ(R5t eventPlayer((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__EventKillNpcËs    $cCsY|s
dStjddƒ}|s&dSx$|D]\}}||kr-|Sq-W|ddS(Nit    GoldModeliiÿÿÿÿ(RR(R5Rft moneyItemListR]tmoneyID((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__GetDropMoneyModelIDÙs c
Csã|j}|jƒ}g}|jƒ}|jƒ}|rëx¯|jD]¡}    |\}
} } t|    ||
| ƒ} xt| D]l}|r˜tjd|ƒr˜dnd}|j|    ||| gƒt    j
d|||
| |f|    j ƒƒqtWqCWnt } tj ddƒ}||krt||}t    jƒjtjƒ}|j|gƒ}g}x4|D]\}}||g|7}qPWn |jƒ}x\|D]T}|r«tjd|ƒr«dnd}x'|D]}|j|||| gƒq¸Wq‡W|S(s¢ÌØÊâµôÂä (˽ÓÐÌØÊâµôÂä + »÷ɱ´ÎÊýÌØÊâµôÂä), Ö§³ÖÃþ¹Ö
        @return: None
        @return: [[ownerPlayer, itemID, isAuctionItem, isDropInItemPack], ...]
        R¶iisb»÷ɱ´ÎÊý±Øµô(¿ÉÃþ¹Ö): npcID=%s,dropItemID=%s,needKillCount=%s,isDropInItemPack=%s,isAuctionItem=%sR°i(R-RRôRäR1RåRRR”RR–R@R RRJRQRR½R’Ræ(R5RùRúR©RRtspecDropItemListtauctionItemCanSellR?t
feelPlayerR@RAtisDropInItemPacktkillCountDropItemListRòRjRDRER#RFRGRHRIR
((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__NPCSpecialDropItemås:        $    + 
  $ !c& CsÚ|s
dS|j}tj||ƒ|jƒtjtjgkrRtjdƒdS|j    ƒ}tj
ƒj ƒ}t j |ƒ}tj|ƒ}    |tjtjtjtjtjgkrÍtjd|ƒdS|    rütjd||jƒf|jƒƒnt|ƒ}
|
sJ|    rFtjƒjtjƒ} tjd|| fƒndSggddf\} } }}t|||||
tƒ}|rž|\} } }}n|j|ƒ}|rÍ|rÍ| |g|7} nd}g}|r|j|||
ƒ}| |gt |ƒ7} nt | ƒdkr=t!j"|ƒt!j"| ƒn| r‚|    r‚tjd|j#ƒ|
j$ƒ|
j%ƒf|jƒƒnt&j'|ƒ}tj
ƒ}|j(ƒ|j)ƒ}}d}xtj*D] \}}||}||}|j+||ƒsþqÆn|t | ƒd    krPnt}| |}|d    7}||kr‰|sJqÆnd    }|d\} }}!}tj,| jƒ}"}#|d    }n7|} ||}"}#||kr®|nd    }|| k}!|j-||||!|ƒ}$|$sçqÆn|tj.kr>t/j0|||!ƒt1j2|$ƒ}%t3| ||||%ƒ|$j4ƒqÆn|r­|$j5tj6tj7ƒt1j2|$ƒ}%t8j9| |$d
d ti|d 6gƒrÒt3| ||||%ƒqÒqÆ|j:|$|||"|#d |d|ƒqÆWdS(Nsľ׮¹Ö£¬²»µôÂäÎïÆ·£¡s$¸ÃµØÍ¼²»×ßÖ±½ÓµôÂäÎïÆ·Âß¼­£¡mapID=%ss%NPC¿ªÊ¼µôÂä: npcID=%s,dropPlayerID=%ss(È¡²»µ½NPCµôÂäÐÅÏ¢!npcID=%s,curWorldLV=%sitSpecItemis8BossûÓеôÂä: dropPlayerLV=%s,ipyWorldLV=%s,maxDropLV=%siR&tNPCDropRRrRy(;R-tPlayerActCollectWordst 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__NPCSpecialDropItemR9RYtshuffleRR§R¸RRzRRR{R|Rt_NPCControl__CreateDropItemRUtGameLogic_GatherSoultKillGatherSoulNPCDropAwardR}R‘R’R>t SetUserAttrtDef_IudetSourcetItem_Source_VirtualItemDropR1RCt_NPCControl__MapCreateItem(&R5RùthurtTypethurtIDRúRrRRRt
isGameBossR©R«RcRdReRfRbR†t specItemSigntplayerSpecDropListRyR„RpRqR‚R…R†R‡RˆR‹R\titemCntR
Rjt    ownerTypeR#RoR ((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt __NPCDropItems¤      )        / 
 
 
 
 
()cCst|j}|jƒtj|dƒ|jƒ|jƒ}|tjkrYtj    |ƒdS|j
t ƒt |ƒdS(Ni( R-t_NPCControl__KillLogicRjRpRÒRöRbRR    t
SetPetDeadR
R Rˆ(R5RtcurNPC_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ˆÃ@(R-t GetHPRestoreR RjRkRlRiRRR?Rbt    laNPCNullRÎRËtGetRestoreTimetDef_NPC_ProcessHP_TicktSetRestoreTimeRqRºt
SkillAddHP(R5R8Rt hpRestoreRatet curNPCMaxHPtlastRestoreTimet restoreValue((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytProcessHPRestore©s,       $ cCsdS(N((R5R8((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=%siRrs*NPC¹éÊôÒì³£:npcID=%s,hurtType=%s,hurtID=%sRœRÄRR›tteamIDtkillerIDRŸR tKillBossRecord(-R-Rt"_NPCControl__FindLastTimeHurtObjExR.RRõt_NPCControl__FindNPCKillerInfoR0R3R4RRt _NPCControl__DoLastTimeHurtLogicR9RRÅR/RtGetOfficialRankR&RRt
GetLvLargeR@t#_NPCControl__KilledByPlayerSetPrizeR”R2RtDef_NPCHurtTypeTeamtDef_NPCHurtTypeSpecialt_NPCControl__NPCDropItemt!_NPCControl__KilledByTeamSetPrizetDef_NPCHurtTypeFamilyt#_NPCControl__KilledByFamilySetPrizeRSRŒRáRâRNR‹R(RR‹RåtOnNPCDie(R5RRR¡R}RŸR Rùt maxPlayerLVRúRtplayerRealmIpyDatatnpcRealmIpyDatatplayerRealmLVLargetnpcRealmLVLargeRrR+((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( R.RRbRcR-t    PlayerViptDoAddVIPKillLVExpR RtAddZhenQiByKillNPCtGetSP(R5tlastHurtPlayerRfR((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__DoLastTimeHurtLogicBs         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(+R-RRŒRRNR‹Rtg_npcKillerInfoRŸR(RRRR8RtDropOwnerType_MaxHurtRÇtSortRvR+Rwt GetValueTypet
GetValueIDRxR@RRÁR™t_NPCControl__GetMaxAngryInfoR.RšR›tDropOwnerType_AlltDef_NPCHurtTypeAlltDropOwnerType_FactionRetGetNPCItemProtectFactiontDef_NPCHurtTypeFactionRáRâRURãtGetCurSingleFBPlayer(R5R¡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__FindNPCKillerInfoXs°            
)   #                          
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›(R5RˆR·t angryObjTypeRgR¸((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__GetMaxAngryInfoÍs    
cCs>|j}|jtjƒ}tjƒj|ƒ}|s:dS|S(N(R-R_RtDef_PlayerKey_LastHurtRR‰tFindPlayerByIDR(R5RRƒ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( R-RRRR–RYRZRØRRRaRÙRbRcRRjRltGetPlayerActiontpaDieR…RRR0tDef_Team_GetExpScreenDistRÁRšR›RœR+RR@tDef_NPCHurtTypeNPC(R5RätisCheckRefreshAreaRÔRRt hurtObjTupleRŽtmaxHurtValueTypeRR¸R}RÑR¤((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__GetTagByHurtObjøsŽ         * !    )!    ; 
  * !    )    !    ; cCs¥|j}|j|jƒt|ƒ}d}|jtjƒ|jƒkr]|jtjƒ}nt    j    |ƒ}|j
|t j d|ƒ|j |||jƒtƒdS(Nit
addSkillID(R-t_NPCControl__GetExpRR R_RR¹RŒR·RRDR1tDef_ViewExpType_KillNPCt_NPCControl__KillNPCFuncExR@(R5RRtadd_ExpR÷t playerControl((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__KilledByPlayerSetPrizebs    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=%sRri(#R-RRyRRt_NPCControl__GetIsLogRRSRR(R.R/R@RRRõR¾R&RRR¿RRR”t_NPCControl__DoNormalTeamExpRúRÎR2RetGetFBEveryoneDropInfoRÃRRÁRÂR9(R5R}RŸR RR~t    maxHurtIDt    teamMaxLVRùRúRR¡RRÉRÊRËRÌt curPlayerLVt fbOwnerInfoRr((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__KilledByTeamSetPrizes\    -                                       /$ /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(R-RRYRZRR{R+R|R}t GetFamilyIDR…RRRR”R2RRR.RSR/R@RúR RÃ(R5RŸR RtmaxLVRùRúRŽt copyPlayerMgrR‚RRRR((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áRzRãRäRâRbR£t IsCrossServerR{RetDoFB_DropOwnerRRõR,RÎR RRRêRîRïR1tDailyActionID_KillNPCRRtDef_GarbageTask_KillNPCRRtActTaskType_KillNPCR6R7t%SuccType_FeastRedPack_KillSpecificNPCR (    R5RRR¹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( R-RöRbR÷RRct
gnotNormalRR6R7R1tSuccType_KillSpecificNPC(R5RtisFeelRR R­R((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__MissionOnKillNPCs      cCstj|jƒS(N(RRõR-(R5((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt
__GetIsLog/scCs“|j}|j|jƒt|ƒ}|s.dSd}|jtjƒ|jƒkrg|jtjƒ}nt    j    |ƒ}|j
|t j d|ƒdS(NiR÷( R-RøRRÎR_RR¹RŒR·RRDR1Rù(R5RRRûR÷Rü((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__DoNormalTeamExp?s    c CsG|j}d}tjƒjƒtjkr?tj||ƒ}n|dkrO|S|jƒ}t    j
|j ƒƒ}t j d||ƒ}|r¦|jƒ}|jƒ}    n|jƒ}|jƒ}    |dkrÎdS|sÚdn    |jƒ}
|r|södStj||ƒ} | sdS|| 9}nttjdt jddƒƒƒ} | S(NiRtExpAttenuationi(R-RRáRzRbR{Ret OnGetNPCExpRRRR[RRtGetExpRR@R1tGetTeamPlayerHurtPerRÜRÝRÞRê( R5RütisTeamRRR^RR(RRšRƒthurtPertexp((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__GetExpWs4           $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(NiRwRxRrRysµôÂäÎïÆ·,ÎÞ·¨ÕÒµ½µØÍ¼µôÂäÎïÆ·(R-RRRõRÂR2R@R}R~RRRtSetByObjRRŒ(R5RoR…R†R"R#RrRyRRRxRtspecOwnerIDListt
curMapItem((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__MapCreateItemŠs     76  cCs)tj|||d|ƒ}|s%dS|S(NR(R1R2(R5RR\R]RjRùRo((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( R-RR8RRRNR‹RŒRR´tRefreshHurtListR¶RR­RLtRefreshFamilyOwnerNPCHurtRÅtDropOwnerType_Contendt _NPCControl__RefreshContendOwnerRR@RÁRÎR»R±R²RaRbRcR(RÁtUpdateDropOwner(R5R8R¾tisDeadt checkCanDeadRRlR¥R#Rãt maxHurtInfoRwt ownerFamilyIDRêt 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(R-R_RtDef_NPC_Dict_LastDropOwnerIDtDef_NPC_Dict_LastDropOwnerTypeRRRaRbRcR R–RjRlRïRðRYRZR…RR(R5RR#R¥RRŽ((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(R-RRšR›RYRZRRœR+RRR@RjRlR RRR…RS(R5R¸R-RR}RŽRÑR¤((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__GetMaxHurtTeamPlayers4        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(>R-RR8RRÖR™R­R*R_R4R5RRNR‹RŒRt_NPCControl__DelDropOwnerBuffRRiR´RÇRRaRbRcR@t HaveHurtValuet#_NPCControl__AddDropOwnerPlayerBufftDef_PlayerKey_ContendNPCObjIDR÷tDelBuffBySkillIDtDef_SkillID_DropOwnerBuffRÁRšR›RÂRœRYRZR+RRÃR1tCheckKillNPCByCntR R R/R<R5R–RRRÅR{R|R}RR…R(RRÕR(R5R8R¥R#R-RRRãtlastDropOwnerIDtlastDropOwnerTypeRÌRáR}RŸR thurtListRRƒRŽRÑR¤tisOkRR‚RR¸((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR,/s¤      $!     
"!    ,     ' ?'    #cCsb|j}tj|tjƒd}|s^tj|tj|d|ƒtjd|jƒƒndS(NiR8sÌí¼Ó¹éÊôbuff: playerID=%s(    R-RºR»RR>tAddBuffBySkillType_NoRefurbishRR–R@(R5RR8RtfindBuff((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=%sR8isɾ³ý¹éÊô¶ÓÎébuff: teamID=%s(R-RRRRaRbRcR–R÷R=R>R*RiR<RÁRšR›R+RœRRR@(
R5RãR¥R#R8RRR}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(R-R_RR4R5RRRaRbRct*_NPCControl__SetDropOwnerBuffDisappearTimeRÁRšR›R+RœRRR@RÅR{R|R}( R5RR#R¥RR}RÑR¤RR‚R((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytDelayDropOwnerBuffDisappearTime¾s2     c Cs"|j}tjƒjtjƒ}|s+dStj|ƒ}tj||ƒ}|dkr\dSd}tj    ƒj
ƒ}|d}xt |j ƒƒD]‰}    |j |    ƒ}
|
jƒ} | jƒtjkrÍq‘n|jƒ|
jƒkréPn|
j|ƒ|
j|ƒ|j|    |
jƒƒPq‘WdS(s ÉèÖõôÂä¹éÊôbuffÏûʧʱ¼ä Ni'i((R-RR°tGetSkillBySkillIDRR>Rºt GetBuffTypetGetBuffManagerByBuffTypeRNRdR+t GetBuffCounttGetBufftGetSkillR RŒt
GetOwnerIDtSetCalcStartTickt SetRemainTimetSync_RefreshBufft GetRemainTime( R5RRt    findSkilltbuffTypet    buffTuplet
RemainTimeR8tbuffStateManagerR‚tcurBufft    buffSkill((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt__SetDropOwnerBuffDisappearTimeÞs.     
   N([t__name__t
__module__RR-R7RÎRBRFRKRSRHRhRmR~RuR RR–R„RžR˜R¹Rt Def_NPCRefreshAngryValueIntervalRÁR»RyRÆRÉRËRÏRÒR–RÔRÓRéR÷RúRùRûRR…R\RRnRRR,R/t!_NPCControl__DoNPCRebornPreNotifyRÕR:RRRCR;R_R[R\R§RnRpR•R–RÃRªRµR¶RoR½R¼RÚR»RxRÀRÄRÆRúRRþRÿRøRžR˜R3R+t!_NPCControl__GetMaxHurtTeamPlayerR,R;R9RIRH(((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRm“    s¨            K >        /     o     4        @    R#                                    6    @                                  -    %        )         &                            *    *             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_RR<RR‡R8R*R@R–RRmR,RR (RtdefenderR8tcontendNPCObjIDRRãRƒt
npcControl((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytOnPlayerKillNPCPlayers        cCsVtjƒ}||_||_||_||_t|jƒ|_tj    ||ƒdS(N(
RwttagMCVirtualItemDropt
ItemTypeIDRyRztUserDataR9t UserDataLenR~R(RR\R…R†t userDataStrt    vItemDrop((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR’s                 cCsŸtjƒj|ƒ}|sdStjtj|ƒƒ}tjd||ƒ}|ra|jƒ}n |jƒ}|swdS|j    ƒ}|j    ƒ}t
|||ƒS(NiR( RR°R±RRRRRRRt
CalcNPCExp(RRRèRRR^RšRü((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR("s   cCs(ttjdtjddƒƒƒ}|S(NRi(RÜRÝRÞRRê(R^RüRšR!((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRl2s$cCsFtjtd|jƒdfƒ}|dkr2dS||||ƒdS(Ns AIType_%d.%stOnAttackDieByPlayer(RRRRR(RRRGR((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytOnPlayerAttackNPCDie=s" cCs—tjƒrtS|jƒ}|dkr]t||ƒ|kr]tj||jƒ|gƒtS|j    ƒr“t
j |t j ƒ r“tj|dƒtStS(NitGeRen_lhs_202580(RR RÎtGetMaxCollectCounttGetTodayCollectCountRt
NotifyCodetGetCollectCountLimitNotifyR tGetCollectAwardR/tCheckPackHasSpaceRbR5(RRtcollectNPCIpyDatat limitMaxTime((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytCheckCanCollectByNPCIDEs  !"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.pyRqYs   cCsÌ|jƒ}tjd|ƒ}|s(tS|jƒr8tSt|||ƒsNtSd}t|ƒ}| rµ|dkrµ||jƒkrµt    j
dƒd}|r±t j ||ƒntSt ||||ƒtS(NRyiis²»ÔÊÐíͬʱ²É¼¯£¡tGeRen_liubo_436832(RRRR tGetIsMissionCollectNPCRxRÎtGetCollectNPCPlayerIDR@RR–RRrtDoCollectNPCBegin(RRR8RRvtcanCollTogethertcollectPlayerIDR'((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytOnCollectNPCBegines$   % 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 SetCollectNPCRRSRiRtDef_PlayerKey_CollectNPCObjIDRŒtGetPrepareTimeRÎtGetPrivilegeValuetVIPPrivilege_CollTimeReduceRateRRqR1R*R)R\Rbt ntCollectiont pstCollectingtpstMissionCollectingRtSync_PrepareBegint GetLostHPPertDef_PlayerKey_CollectLostHPTickR1t AddHurtValueR@RRetOnBeginCollect(RRRvR8R‚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‰RíR–R RiR‡RÎ(RRt curPlayerIDt curNPCObjIDtcurCollectPlayerIDtcurCollectPlayer((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR†™s   cCsi|jtjƒ}|dkr"dStjƒj|ƒ}|setjd|ƒ|jtjdƒdS|S(Nis>GetCollectNPCID ÓÐcurCollectPlayerID=%s£¬µ«ÕÒ²»µ½¸ÃÍæ¼Ò£¬ÖØÖÃ!(R_RR–RR‰RíR–Ri(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‡RiR–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(NRys    ·ÇÌØ¶¨²É¼¯NPC...npcID=%sitResultRÝR%(RRfRR–RRçtDoCollectingLostHPRÎR RtGetPlayerServerGroupIDR@tSendMsgToClientServerR1tCrossServerMsg_CollectNPCOKtDoGiveCollectNPCAwardRet OnCollectOKR(RRR8Rvt serverGroupIDR­((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytDoCollectNPCOKÑs  !
cCsM|dsdS|d}tjd|ƒ}|rIt|||dtƒndS(NRžR%RytcrossCollectOK(RRfR£RÎ(RtmsgDataRRv((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=%sRy(RR‰R}R@R%R_RtDef_PlayerKey_ClientCustomSceneRSRR‹RŒRRetOnCustomSceneCollectOKRRR£(    R‚R‰R8RRƒRRR›Rv((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytOnGetCustomSceneCollectAwardüs&     cCsftjd|||fƒ|dkr*dS|jƒr:dSt}|jƒ}|dkr-t||ƒ}td||ƒ}    t||    ƒ}|dkr³tjd|||fƒdS|jt    j
|ƒ}
|
|} t j |t    j
|| ƒt ||gƒtjd|||
| fƒ|||k}ng} |jƒ} |jƒ}|rT|jƒd krÚ|jt    jƒ}|j|iƒ}|jt    j
|ƒ}
|
|kr½| j||
ƒntjd||
| fƒqTt|jt    j|ƒdt    jƒ}||kr | j||ƒnt j |t    j||ƒtjd    || fƒn| s½|jƒ}tj|| |ƒ}tjd
|| |fƒtj|ƒ}|r½| j|ƒq½ntjd | ƒg}| rêxZ| D]R\}}}tj||||tjgƒrá|jtj|||gƒƒqáqáW|sû|jƒrÔt j!ƒ}||_"xN| D]F\}}}t j#ƒ}||_$||_%||_&|j'j|ƒqeWt(|j'ƒ|_%t)j*||ƒnt+j,|| ƒqûntj-d |ƒt.j/|t0j1||gƒ|r3t2j3|t    j4ƒn|sbt+j5||ƒ|rbt+j6|ƒqbn|S(Ns4¸ø²É¼¯½±Àø: npcID=%s,collectCnt=%s,crossCollectOK=%sisF    ¸ÃNPCÒÑ´ïµ½×î´ó²É¼¯´ÎÊý: npcID=%s,todayCollTime=%s,limitMaxTime=%ssI    Ôö¼Ó²É¼¯´ÎÊý: npcID=%s,todayCollTime=%s,curCollTime=%s,updCollTime=%si isL    ²ÝÔ°²É¼¯¶¨Öƽ±Àø: fairyDomainVisitCnt=%s,curCollTime=%s,awardItemList=%sis7    ²É¼¯´ÎÊý¶¨Öƽ±Àø: collTotalTime=%s,awardItemList=%ssS    ³£¹æ²É¼¯ÎïÆ·È¨ÖØÁбí: alchemyDiffLV=%s,collectAwardCfg=%s,giveItemWeightList=%ss"    ×îÖղɼ¯½±Àø: awardItemList=%ss²É¼¯ÎïÆ·Ã»Óн±Àø£¡npcID=%s(i i(7RR–RR RpRqRR0RÂRRzRRÓtSyncCollNPCTimeRttGetCollectAppointAwardtGetCollectResetTypetDef_PDict_FairyDomainVisitCntR’R”t Def_PDict_CollNpcIDCollTimeTotalR2tGetAlchemyDiffLVR/t GetWeightItemListByAlchemyDiffLVtGetResultByWeightListR1RBRbR5R3tGetNotifyCollectResultRwttagMCCollectAwardItemInfot CollectNPCIDttagMCCollectAwardItemtItemIDR‹t IsAuctionItemt AwardItemListR9R~RtGameLogic_CrossGrasslandtRecordGrasslandAwardRSR6R7R1tSuccType_CollectRRtDef_GarbageTask_CrossCollecttDecCustomSceneNPCCounttDoCheckUpdateGrasslandEnd(RRRvt
collectCntR§tisSweept    isMaxTimeRwR{t canCollectCntt curCollTimet updCollTimet awardItemListtcollectAwardCfgtcollectAppointAwardCfgtfairyDomainVisitCnttgrasslandCollectAppointCfgt collTotalTimet alchemyDiffLVtgiveItemWeightListt giveItemInfoRmR\RiRjt    awardPackt    awardItem((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR£sŽ     
   &  !&                   cCsdS(N((RR_taddMoneyt    addZhenQitsyncItemInfoListt collectNPCID((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytSyncCollectionItemInfoosc 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+tGetCollectNPCCounttGetCollectNPCByIndexRpR”RRÂRRzRwttagMCNPCIDCollectionCntR>R%t CollectionCntttagMCNPCIDCollectionCntInfotNPCCollCntListR9t
CollNPCCntR~R( RR®t    isSyncAllt
ipyDataMgrR‚R¬tsyncListRt    collCountt collCntInfot npcIDCollInfo((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR¬rs:      
         
    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®RpRÂRRzRRÓ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(RRbR–RçRùt GetNPCCountt GetNPCByIndexRŒRR”RjRlRRRkR?RbR@tIsAliveR-RR^(tqueryNPCIDListR8t npcInfoDicttgameNPCManagert findNPCIDListR‚RtcurIDRRÕtcurHPR…R†RQtrefreshRemaindSecondt 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(RwttagMCNPCInfoListR>tMapIDt    PlayerCntt NPCInfoListRmt tagMCNPCInfoR†R%tNPCHPRIRyRztIsActivet RefreshSecondR”R9t
NPCInfoCntR~R(RRt    playerCntRît npcInfoPackRñtnpcInfoRRòRQR…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(RRbR–RçR“RqR+tGetNPCCountByGWIndextGetNPCByIndexByGWIndexRŒRR?RbR@RìR’RêRë(    RíR8RÊt
npcCntDictRïR‚RRñR((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt GetNPCCntInfos8    "!   "cCs£tjƒ}|jƒ||_g|_xR|jƒD]D\}}tjƒ}|jƒ||_||_|jj    |ƒq5Wt
|jƒ|_ t j ||ƒdS(N(RwttagMCNPCCntListR>RøRúRmttagMCNPCCntInfoR%tCntR”R9RÿR~R(RRRRR»tnpcCntR((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytSyncNPCCntInfo@s 
         
        c Csètjddƒ}||kr"dStjddiƒ}tjddƒ}tjddƒ}    t}
d} ||    kr‹t}
|    j|ƒ} n¼||kr³t}
|j|ƒd} n”|\} }}}} |rÔdnd}|d    |d
|} tj|| ƒ}|rG|\}}}||krG||krG||krGt}
qGn|
sQdS|jƒ}|jƒ}t    j
|ƒ}t ||||||| | ||j ƒg
ƒ}tj ƒjdddd |t|ƒƒtjd ||ƒdS( NtDropRecordBossIDitDropRecordEquipmenttDropRecordValuetDropRecordNormalRki'iièidtBossDropGoodItems$·¢ËÍGameServer¼Ç¼ʰȡµôÂäºÃÎïÆ·: %s(RRR RÎR‚RRìRŒRGRR RçRR‰RŠR9R–(RRR›RR\R£t recBossIDListtrecDropEquipInfoDicttrecSpecialItemIDListt recItemIDListt
needRecordt itemUserDatat weightValuet
equipPlacet itemClassLVt    itemColorRÒR4trecordConditiont needClassLVt needItemColort needItemSuiteRƒt
playerNameR¥t dropEquipMsg((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRšQs>   $   0(cCsdS(N((R‚R‰R8((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‰R&tGetAddBossBuyCntRÂRtDef_PDict_Boss_KillCntBuyCntR@R–RâtGetCanKillBossCntRçR9RbtTYPE_Price_Gold_MoneytDef_Cost_Reason_SonKeyRtPayMoneytDef_Cost_BuyKillBossCntRÓRãtCrossPlayerDatatSendMergePlayerDataNow(R‚R‰R8Rt 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%tEndTypeRRJRQRRR«R–(R‚R‰R8RtendTypeR((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.pytIsMapNeedBossShuntÎs  
cCs^||f}tjj|iƒ}||jƒ|g||jƒ<|tj|<t||ƒdS(N(Rtg_bossShuntPlayerInfoR’R(R@tGameServer_WorldBossShuntInfo(RRR›RR8RÌtshuntPlayerDict((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytAddBossShuntRelatedPlayer×s    cCs||f}tjj|iƒ}t|||gƒ}tjƒjdddd|t|ƒƒtjd|||f|ƒdS(NitWorldBossShuntInfosE֪ͨGameServerµØÍ¼Boss·ÖÁ÷ÐÅÏ¢: mapID=%s,lineID=%s,shuntPlayerDict=%s(    RRCR’RçRR‰RŠR9R–(RR›RÌREtmsgStr((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRDàs  (cCsitjƒ}|jƒ|jƒ|_|jƒ|_tj|_    ||_
|j |j ƒ|j ƒƒdS(N(t ChNetSendPackttagObjInfoRefreshR>RŒR†RtObjTypeRbtCDBPlayerRefresh_Speedt RefreshTypetValuet    NotifyAllt    GetBuffert    GetLength(RRXtsendPack((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRVès 
     cCsÓ|s
dStjd|||fƒtj|tj||ƒtjƒrtj|ƒ}i|jƒd6|d6|d6|d6}tj    t
j ||gƒn2t ||gƒ|rÏ||krÏt j|ƒndS(Ns8¸üÐÂÍæ¼Ò¹¥»÷NPC´ÎÊý: npcID=%s,attackCount=%s,maxCount=%sRÝR%t AttackCounttMaxCount(RR–RRÓRtDef_PDict_NPCAttackCountR R R@R¡R1tCrossServerMsg_NPCAttackCounttSyncNPCAttackCountR»RÀ(RRt attackCountR2R¥R­((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pytUpdateNPCAttackCountós (cCs5|d}|d}|d}t||||ƒdS(NR%RSRT(RY(RR¨RRXR2((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRVs
 
 
 
cCs‘|s
dStjƒ}xR|D]J}|jtj|ƒ}tjƒ}||_||_|jj    |ƒqWt
|jƒ|_ t j ||ƒdS(N(RwttagMCNPCAttackCountInfoRÂRRUttagMCNPCAttackCountR%RStNPCAttackCountListR”R9R‹R~R(RR®t
clientPackRRXt atkCountObj((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyRW s           cCst||ƒdS(N(t__OnAttackedDropItem(tatkObjRRGR8((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt OnNPCAttackeds c    Csqtj|ƒ\}}|rdS|s)dS|jƒ}tjd|ƒ}|sQdS|jƒ}|jƒ}|jƒ}|jƒ}    |j    ƒ}
g} |rýt
|ƒ} |j t j |ƒd} | | krý| |krä|| } nt||| | ƒqýn| rtj|| |
ƒ} n|r9tj|||
ƒ} ntj| ƒ}|sw|jƒ}|rstj||ƒndSg}|r“|j|ƒn|ró|    rótj|||
ƒ}x<t|    ƒD]+}tj|ƒ}|rÁ|j|ƒqÁqÁWn|sýdStj|ƒ}|r5t|||ƒtj||ƒn8|jƒ|jƒ}}tj|||||dt ƒdS(Nt TreasureNPCiRr(!R1tGetAttackPlayerRRRtGetAttackCountDropWeightInfotGetAttackDropWeightListtGetAttackDropWeightListExtGetDropCountExR±RRÂRRURYR/R²RR³tGetNotDropNotifyRRrR”R+R‹R:R»R¼RRR}t DoMapDropItemR (R`Rt attackPlayerR RR¬tattackCountDropWeightInfotattackDropWeightListtattackDropWeightListExt dropCountExRÍtmainItemWeightListR2RXt mainItemInfot notDropNotifyR€t weightListExRnRRRpRq((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyR_&sd            (µRbRRR”RRR÷R3RIRºR1R1R/ReR²R    RRTR1R}RwR‹R~RãRîR6RâtPlayerPrestigeSysR$R=R™RÝRñRôR±RR÷R»RRíRR,RçRûR&RøR¥R´RþRRRLRRëRçRt
PlayerTeamR¶RÎRjR¯RYR1R‡R‚RRÇRùR´RµR¶R·tNPCAttr_DynNPCLVMaptNPCAttr_DynPCCoefficientMapRR R$R&R)R+R,R-R4R6R8R:R<R>RARCRER R‰RuR¨RgRvRÎR;R:RÛR­R,RàRÜRÞRÝRÉRïRáR„RßRÊRÌRóRåRõRøRþRRRRRR&R.R<R>RBRHRSRaRvR…RŠR‘RŽR RˆRÌRªR,RmReR’R(RlRnRxRqR„RR†R€RR¦R¢R«R£RÖR¬RæRåRçRöRRR RšR"R9R<RBRFRDRVRYRVRWRaR_(((seD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\NPCCommon.pyt<module>sp                                                                 
                                                                      w        |    Ÿ*[    ÿV                     $            Å     :     /        +             
                !    !    +    >    ]             -(                8        D            Wÿÿÿÿÿÿÿÿÿÿÿ|                                                               \  %              /     .     2         6