hwj35
2025-06-23 aa0f971ae9a59f0fd98d57b6c1d1663a270be92c
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
¤9gc@s÷ddlZddlZddlZddlZddlZddlZddlZddlZddlZddl    Z    ddl
Z
d„Z d„Z d„Z d„Zd„Zd„Zd„Zd    „Zd
„Zd „Zd „Zd d„ZdS(iÿÿÿÿNcCs>tjtjkriStjtj}||kr6iS||S(N(t ShareDefinet OperationActionName_CollectWordst
PyGameDatatg_operationActionDict(tactNumt
actNumDict((suE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActCollectWords.pyt
GetActInfos  cCs‰x‚tjjtjiƒjƒD]b}|jtjdƒ}t||ƒ}|s|jtjƒrt    ||ƒt
||ƒqqqWdS(Ni( RRtgetRRtvaluest ActKey_ActNumt__CheckPlayerCollectWordsActiont ActKey_StatetSyncCollectWordsActionInfotSyncCollectWordsPlayerInfo(t    curPlayertactInfoRtisReset((suE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActCollectWords.pyt OnPlayerLogin&s% cCs^tjƒ}xKt|jƒƒD]7}|j|ƒ}tj|ƒsIqnt||ƒqWdS(N(t    GameWorldtGetPlayerManagertxrangetGetPlayerCounttGetPlayerByIndextIsNormalPlayerR
(Rt playerManagertindexR((suE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActCollectWords.pytRefreshActCollectWordsInfo4s c CsÆ|jƒ}t|ƒ}|jtjdƒ}|jtjdƒ}|jtj|ƒ}||krˆt    j
d||f|jƒƒdSd}|jtj dƒ}|rKt j d|ƒ}    |    sÇdn    |    jƒ}t jd|ƒ}
|
s t    jd|||f|ƒqKx=|
D]2} | jƒ} tj|tj|| fdƒqWntj|tj||ƒtj|tj|dƒt    j
d||||f|ƒ|rÂt||ƒt||ƒntS(Nis*¼¯×ֻID²»±ä£¬²»´¦Àí£¡actNum=%s,actID=%stActCollectWordstCollectWordsExchanges;¼¯×Ö¶Ò»»ÕÒ²»µ½¶Ò»»Ä£°åÅäÖÃ!actNum=%s,cfgID=%s,templateID=%ss7¼¯×Ö»î¶¯ÖØÖÃ! actNum=%s,cfgID=%s,templateID=%s,actID=%s(t GetPlayerIDRRRt    ActKey_IDR tNomalDictGetPropertytChConfigtDef_PDict_CollectWordsIDRtDebugLogt ActKey_CfgIDt IpyGameDataPYtGetIpyGameDatat GetTemplateIDtGetIpyGameDataListtErrLogtGetExchangeNumt PlayerControltNomalDictSetPropertyt#Def_PDict_CollectWordsExchangeCounttDef_PDict_CollectWordsGJSecondsR R tTrue( RRtplayerIDRtactIDtstatet playerActIDt
templateIDtcfgIDt
actIpyDatat exchangeListtexchangeIpyDatat exchangeNum((suE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActCollectWords.pyR
?s4       '  c    Cs}|jƒtjgkrdSxZtjjtjiƒjƒD]:}|jtj    dƒ}t
|||ƒ}|stq;nt |t ƒrxƒ|j ƒD]u\}}tj|ƒ}|dkr½qntjd||jƒ||fƒd}tj||||tjgƒqWq;ntj|ƒ}|s*q;ntjd||jƒ|fƒd}d}tj||||tjgƒq;WdS(NisH    ¼¯×ֻµôÂäÎïÆ· dict! actNum=%s,npcID=%s,dropItemID=%s,itemCount=%ss6    ¼¯×ֻµôÂäÎïÆ·! actNum=%s,npcID=%s,dropItemID=%si(tGetTypeR tntPriWoodPilePVPRRRRRRR    t__GetDropWordsItemRateListt
isinstancetdicttitemsRtGetResultByRandomListR"tGetNPCIDt ItemControlertGivePlayerItemt IPY_GameWorldtrptItem(    RtcurNPCRRtrandListt
dropItemIDt dropCountListt    itemCountt isAuctionItem((suE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActCollectWords.pyt OnKillNPCDropes0% ## #cCs‘|jtjƒsdS|jtjƒ}tjd|ƒ}|sDdStj|ƒ}|jƒ}ddl    }|j
||ƒ}|j ƒ}    | r¦|    r¦|    |kr¦dS|j ƒ}
| rÓ|
rÓ|||
krÓdS|j ƒ} | r5tj|ƒ\} } tjƒ}d|j|j|jf}|| kr5dSn|sE|jƒS|jƒ}|jƒ}tjddƒ}tj||ƒ}|j|gƒS(NRiÿÿÿÿs%d-%s-%stKillBossCntLimiti(RRR R#R$R%R t
IsGameBosstGetLVt    NPCCommontGetNPCLVt
GetLVLimittGetDropDiffLVLimittGetLastDayOnlyExchangeRtGetOperationActionDateStrtGetCurrentTimetyeartmonthtdaytGetDropItemRateListtGetDropItemRateListBossR@t
GetFuncCfgtGetDictValueByKey(RtnpcDataRR4tipyDatatisBosstplayerLVROtnpcLVtlimitLVtdropDiffLVLimittlastDayOnlyExchanget_t
endDateStrtcurDatet
curDateStrtbossDropRateListInfotnpcIDtkillBossCntLimitDictt
limitIndex((suE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActCollectWords.pyR;‡s<       
  cCsOi}xBtjjtjiƒjƒD]"}|jtjdƒ}t|||ƒ}|s^q%nt|t    ƒssq%nd}|dd}x½|D]µ}    |    \}
} |
|} | s´Pn|
}| sÆqŽn| |} | |}| |}t
j ||ƒr|d7}n|sqŽn|j| dƒ||| <t
j d|| |fƒqŽWq%W|S(Niiÿÿÿÿis:    ÍÑ»ú¼¯×ֻµô×Ö: actNum=%s,dropItemID=%s,dropCount=%s( RRRRRRR    R;R<tlistRt    CanHappenR"(RR]t    killCounttdropItemCountDictRRt dropRateListtpreRatetmaxRatetrateInfotrateRGtcurRatet    totalRatet    dropCounttrateEx((suE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActCollectWords.pytOnGetDropWordsItemDict³s8%  
 
 
 
 "c    Csmi}x`tjjtjiƒjƒD]@}|jtjdƒ}|jtjƒsXq%n|jtjƒ}t    j
d|ƒ}|sˆq%n|j ƒ}|s q%n|j ƒ}    |    s¸q%n|    \}
} |rH|j tj|ƒ} || 7}||
} | | }||
}tj|tj||ƒtjd||| || |fƒn1||
} | | }tjd||| |fƒ|dkr‹q%nd}|dd}xÃ|D]»}|\}}||}|sÌPn|}|sÞq¦n||}||}||}tj||ƒr|d7}n|s'q¦n|j|dƒ|||<tjd|||||fƒq¦Wq%W|S(NiRsc    ¹Ò»ú¼¯×ֻ: actNum=%s,awardSeconds=%s,canDoCount=%s,killCount=%s,unSeconds=%s,updUnSeconds=%ssF    ¹Ò»ú¼¯×ֻ: actNum=%s,awardSeconds=%s,canDoCount=%s,killCount=%siÿÿÿÿisR    ¹Ò»ú¼¯×ֻµô×Ö: actNum=%s,dropItemID=%s,dropCount=%s,curRate=%s,totalRate=%s(RRRRRRR    R R#R$R%RYtGetGuajiAwardSetRR R-R*R+RR"Rn(Rt awardSecondst useUnsecondRpRRR4R^Rqt guajiAwardSett    doSecondstdoCountt    unSecondst
canDoCountRot updUnSecondsRrRsRtRuRGRvRwRxRy((suE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActCollectWords.pytOnGetGuajiAwardItemDictØsh%   
 
 
 
    
 
       
 
 
 
     c Cst|j}|j}tjƒj|ƒ}tjd||fƒt|ƒ}|jtj    ƒsqtjd|ƒdS|jtj
ƒ}t j d|ƒ}|sŸdS|j ƒ}    |    sµdSt jd|    ƒ}
|
sÑdSd} x*|
D]"} || jƒkrÞ| } PqÞqÞW| s+tjd|||    |fƒdS| jƒ} |jtj||fƒ}| r†|| kr†tjd|    ||| fƒdSt| jƒ|jtjdƒƒ}t|ƒdkrÀdS|d}|d    }|d
}tj||||ggƒsdSg}| jƒ}xƒ|D]{\}}}tj|||ƒ\}}}|||kr{tjd |||||fƒdS|j||||gƒqW| rÕt j!|tj||f|d    ƒt"|||ƒnd}x6|D].\}}}}tj#||||||ƒqâWtj$||||t%j&gd |t'igƒ| j(ƒrpt j)dd|j*ƒ|gƒndS( Ns&¼¯×ֻ¶Ò»»£¡actNum=%s,exchangeNum=%ss!·Ç¼¯×ֻÖУ¬ÎÞ·¨¶Ò»»£¡actNum=%sRRsKÕÒ²»µ½¼¯×ֻ¶Ò»»ÅäÖÃÊý¾Ý£¡actNum=%s,cfgID=%s,templateID=%s,exchangeNum=%ssK³¬¹ý×î´ó¼¯×Ö¶Ò»»´ÎÊý£¡templateID=%s,exchangeNum=%s,curExchangeCount=%s > %siiiisG¼¯×Ö¶Ò»»ËùÐèÎïÆ·²»×㣡exchangeItemID=%s,needItemID=%s,needCount=%s > %stevent(+tActNumt ExchangeNumRRRR"RRRR R#R$R%R&R'tNoneR)R(tGetExchangeCountMaxRR R,t__GetExchangeItemInfotGetExchangeItemInfotActKey_WorldLVtlenRAtCheckPackSpaceEnoughtGetNeedItemListt
ItemCommontGetPackItemBindStateIndexInfotappendR*R+R tDelCostItemByBindRBRCRDtFalset GetNeedNotifyt WorldNotifyt GetPlayerName(Rt
clientDatattickRR8RRR4R^R3R6t findIpyDataR7texchangeCountMaxtcurExchangeCounttexchangeItemInfotexchangeItemIDt exchangeCounttexchangeIsBindt delItemListt needItemListt
needItemIDt    needCountRetcostItemIndexListtbindCntt    unBindCntt    eventName((suE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActCollectWords.pytOnActCollectWordsExchange#sx                    $
 
 
     $ . "cCs&t|tƒr"tj||gƒS|S(N(R<R=RtGetDictValueByRangeKey(tcfgExchangeItemInfotworldLV((suE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActCollectWords.pyRŠrscCst|ƒ}|jtjƒs"dS|jtjƒ}tjd|ƒ}|sPdS|jƒ}|sfdStj    |ƒ\}}t
j ƒ}||_ ||_ ||_|jƒ|_|jƒ|_g|_tjd|ƒ}    |    rïx |    D]}
t|
jƒ|jtjdƒƒ\} } } |
jƒ}t
jƒ}|
jƒ|_|
jƒ|_| |_| |_| |_ g|_!xN|D]F\}}}t
j"ƒ}||_||_||_ |j!j#|ƒq|Wt$|j!ƒ|_%|jj#|ƒqèWnt$|jƒ|_&t'j(||ƒdS(NRRi()RRRR R#R$R%R&RRTtChPyNetSendPackttagMCActCollectWordsInfoR†t    StartDatetEndtDateRQtLimitLVRStLastDayOnlyExchangetExchangeItemListR'RŠR‹RŒRt tagMCActCollectWordsExchangeItemR)R‡R‰tExchangeCountMaxtItemIDt    ItemCounttIsBindt NeedItemListttagMCActCollectWordsNeedItemR’Rt NeedItemCountt ExchangeCountt NetPackCommont SendFakePack(RRRR4R^R3t startDateStrRft
clientPackR6R7titemIDRItisBindR¢t exchangeItemR£R¤t
needIsBindtneedItem((suE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActCollectWords.pyR wsR                    -                               ic CsSt|ƒ}|sdS|jtjƒs,dS|jtjƒ}tjd|ƒ}|sZdS|jƒ}|spdStjd|ƒ}|sŒdSt    j
ƒ}||_ g|_ x€|D]x}    |    j ƒ}
|rÛ||
krÛq±nt    jƒ} |
| _|jtj||
fƒ| _|j j| ƒ|r±Pq±q±Wt|j ƒ|_tj||ƒdS(NRR(RRRR R#R$R%R&R'R­ttagMCActCollectWordsPlayerInfoR†tExchangeInfoListR)t tagMCActCollectWordsExchangeInfoR‡RR R,R¼R’RR½R¾( RRR8RR4R^R3R6RÀR7tipyExchangeNumt exchangeInfo((suE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActCollectWords.pyR ¬s>                  (RRRR*R R$R­R½RRARCRRRR
RKR;RzR„R©RŠR R (((suE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActCollectWords.pyt<module>s,                            &    "    ,    %    K    O        5