cehua_lyf
2019-03-06 3c8ee0a8a524a6251d7d5aae2372e76fd8a99b9c
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
5¼c\c@sîddlZddlZddlZddlZddlZddlZddlZddlZddlZddl    Z    ddl
Z
ddl Z d„Z d„Z d„Zd„Zd„Zd„Zd„Zd    „Zd
„Zd „ZdS( iÿÿÿÿNcCsn|dks|dkrdStjd|ƒ}|s8dS|jƒ}|t|ƒkr`|dn||}|S(NitActTotalRechargeiÿÿÿÿ(tNonet IpyGameDataPYtGetIpyGameDatatGetTemplateIDListtlen(tcfgIDtdayIndextipyDatattemplateIDListt
templateID((sf.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActTotalRecharge.pyt GetTemplateIDs &cCsZt|ƒ}|sVtjjtjiƒ}|jtjƒrVt|ƒt|ƒqVndS(N(    t __CheckPlayerTotalRechargeActiont
PyGameDatatg_operationActionDicttgett ShareDefinet!OperationActionName_TotalRecharget ActKey_StatetSync_TotalRechargeActionInfotSync_TotalRechargeInfo(t    curPlayertisResettactTotalRechargeInfo((sf.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActTotalRecharge.pyt OnPlayerLogin)s 
cCs^tjƒ}xKt|jƒƒD]7}|j|ƒ}|jƒdkrLqnt|ƒqWdS(Ni(t    GameWorldtGetPlayerManagertxrangetGetPlayerCounttGetPlayerByIndextGetIDR (t playerManagertindexR((sf.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActTotalRecharge.pytRefreshTotalRechargeActionInfo3s c
Cs|jƒ}tjjtjiƒ}|jtjdƒ}|jtjdƒ}|jt    j
ƒ}||krpdS|jtj dƒ}|jt    j ƒ}t |jtjdƒ|jtjdƒƒ}|jt    jƒ}    tjd|||||    f|ƒt||    |ƒtj|t    j
|ƒtj|t    j|ƒtj|t    j |ƒtj|t    jdƒtj|t    jdƒt|ƒt|ƒtS(NisdÀۼƳäÖµÖØÖÃ! TotalRechargeID=%s,playerTotalRechargeID=%s,state=%s,templateID=%s,playerTemplateID=%s(t GetPlayerIDR RRRRt    ActKey_IDRtNomalDictGetPropertytChConfigtDef_PDict_TotalRechargeIDtActKey_WorldLVtDef_PDict_TotalRechargeWorldLVR t ActKey_CfgIDtActKey_DayIndext!Def_PDict_TotalRechargeTemplateIDRtDebugLogt__SendTotalRechargeMailt PlayerControltNomalDictSetPropertytDef_PDict_TotalRechargeGoldt"Def_PDict_TotalRechargeAwardRecordRRtTrue(
RtplayerIDRtTotalRechargeIDtstatetplayerTotalRechargeIDt
actWorldLVt playerWorldLVR
tplayerTemplateID((sf.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActTotalRecharge.pyR =s,  -    
 
cCse|s
dS|jtjƒ}|s&dStjd|ƒ}|sBdS|jƒ}ggg}}}|jtjƒ}    |jƒ}
x©|D]¡} | jƒ} |    t    d| ƒ@r²q‡n| j
ƒ} || krÐq‡n|    t    d| ƒO}    t | j ƒ|
|ƒ}|j |gƒ|j |ƒ|j | gƒq‡W|ratj|tj|    ƒtjd|||ƒndS(NtTotalRechargeTemplateitTotalRechargeMail(R$R%R0RtGetIpyGameDataListR"R1tGetJobt GetAwardIndextpowt GetNeedGoldt __GetItemListt GetAwardItemtappendR.R/t SendMailBatch(RR9R8tcurRechargeGoldt ipyDataListR3tbatchPlayerIDListtbatchAddItemListtbatchParamListt awardRecordtjobRt
awardIndextneedGoldt awardItemList((sf.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActTotalRecharge.pyR-as8       cCsTtj||iƒ}t|ƒ|krBtjd||fƒgS|t|ƒSdS(Ns*ÀۼƳäÖµ½±ÀøÎ´ÅäÖøÃÖ°ÒµitemDict=%s,job=%s(RtGetDictValueByRangeKeytstrtErrLog(titemDictRKtworldLVt itemInfoDict((sf.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActTotalRecharge.pyRAˆs
cCsQ|dkrdStjjtjiƒ}|jtjƒsKtjdƒdS|jtjƒ}t    |jtj
dƒ|jtj dƒƒ}| s˜| r¼tj d||f|j ƒƒdStj|tj|ƒtj|tj|ƒ|jtjƒ}||}tj|tj|ƒt|ƒtjd|||||f|j ƒƒdS(NisÀۼƳäÖµ»î¶¯µ±Ç°Î´¿ªÆô!s+ÀۼƳäÖµ»î¶¯Êý¾ÝÒì³£!actID=%s,templateID=%ssYÍæ¼ÒÀۼƳäÖµ»î¶¯: actID=%s,templateID=%s,curRechargeGold=%s,addGold=%s,updRechargeGold=%s(R RRRRRRR,R#R R)R*RQR"R.R/R%R&R+R$R0R(RtaddGoldRtactIDR
REtupdRechargeGold((sf.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActTotalRecharge.pytAddTotalRechargeGold’s(  - 
 
     cCs |jƒ}tjjtjiƒ}|jtjdƒ}|jtjdƒ}t|jtj    dƒ|jtj
dƒƒ}| s‰| r§t j d||f|ƒdS|j tjƒ}||krÉdS|j tjƒ}|td|ƒ@rt j d||ƒdStjd|ƒ}    |    s"dSd}
x*|    D]"} | jƒ|kr/| }
Pq/q/W|
syt j d||f|ƒdS|
jƒ} |jtjdƒ} t| jƒ|jƒ| ƒ}|j tjƒ}|| krút j d||| |f|ƒdSt|ƒ}tj|tj |ƒ}||kr.dS|td|ƒO}t!j"|tj|ƒt#|ƒ|
j$ƒ}|r•t!j%d||j&ƒ| gƒnx6|D].\}}}t'j(||||tj gƒqœWi|d6| d    6|d
6t)|ƒd 6}t*j+|d |ƒdS( Nis2ûÓÐÀۼƳäÖµ»î¶¯£¬ÎÞ·¨Áì½±£¡state=%s,templateID=%sis*ÒѾ­ÁìÈ¡¹ý¸ÃÀۼƳäÖµ»î¶¯½±Àø!awardIndex=%sR:s8ÕÒ²»µ½¸Ã·µÀû»î¶¯µµÎ»Ë÷Òý½±Àø!templateID=%s,awardIndex=%ssWËùÐè³äÖµÏÉÓñÊý²»×㣬ÎÞ·¨ÁìÈ¡!templateID=%s,awardIndex=%s,needGold=%s,curRechargeGold=%st
TemplateIDtNeedGoldt
AwardIndextItemListtTotalRechargeAward(,R"R RRRRR#RR R)R*RR,R$R%R&R1R?RR<RR>R@R'RARBR=R0Rt
ItemCommontGetItemPackSpacet IPY_GameWorldtrptItemR.R/Rt GetNotifyKeyt WorldNotifyt GetPlayerNamet ItemControlertGivePlayerItemRPtDataRecordPacktDR_FuncGiveItem(RRLR3RR4R5R
R6RJRFt awardIpyDataRRMR7RNREt    needSpacet    packSpacet    notifyKeytitemIDt    itemCounttisBindt addDataDict((sf.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActTotalRecharge.pytOnGetTotalRechargeAward¬sd -          
 "#cCsJtjƒ}|jtjƒ|_|jtjƒ|_tj    ||ƒdS(N(
tChPyNetSendPackttagMCTotalRechargePlayerInfoR$R%R0t    GoldTotalR1t AwardRecordt NetPackCommont SendFakePack(Rt playerActInfo((sf.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActTotalRecharge.pyRïs
 cCs}tjjtjiƒ}|s"dS|jtjƒs8dS|jtjƒ}tjd|ƒ}|sfdS|j    ƒ}|s|dS|j
ƒ}|jtj dƒ}t j ƒjtjƒd}tjƒ}t j|jƒ|ƒ|_t j|jƒ|ƒ|_|jƒ|_|jƒ|_g|_x2|D]*}    tjd|    ƒ}
|
sMq)ntjƒ} g| _xÌ|
D]Ä}tjƒ} |j ƒ| _!|j"ƒ| _#g| _$t%|j&ƒ||ƒ} xN| D]F\}}}tj'ƒ}||_(||_)||_*| j$j+|ƒqÁWt,| j$ƒ| _-| jj+| ƒqiWt,| jƒ| _.|jj+| ƒq)Wt,|jƒ|_/t0j1||ƒdS(NRiiR:(2R RRRRRR)RRRR=R'Rt GetGameWorldtGetGameWorldDictByKeytDef_Notify_WorldKey_ServerDayRrttagMCActTotalRechargeInfotGetOperationActionDateStrt GetStartDatet    StartDatet
GetEndDatetEndtDatet
GetLVLimittLimitLVt GetIsDayResett
IsDayResett AwardDayInfoR<ttagMCTotalRechargeAwardDayt    AwardInfottagMCTotalRechargeAwardR>R[R@RZt    AwardItemRARBttagMCTotalRechargeAwardItemtItemIDt    ItemCounttIsBindRCRtAwardItemCountt
AwardCountt    AwardDaysRvRw(RRRRR    RKR7t openServerDaytactInfoR
RFtdayInfot    awardInfoRNRmRnRot    awardItem((sf.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActTotalRecharge.pyR÷s\                                (R RR.RReRrRgR`RvR^RR%R RR!R R-RARXRqRR(((sf.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActTotalRecharge.pyt<module>s*                
    
    
    $    '    
        C