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
Eèic@sýddlZddlZddlZddlZddlZddlZddlZddlZddlZddl    Z    ddl
Z
ddl Z ddl Z ddl Z d„Zd„Zd„Zd„Zd„Zd„Zd„Zd    „Zd
„ZdS( iÿÿÿÿNc Cs‚x{tjjtjiƒjƒD][}|jtjƒs=qn|jtjdƒ}|jtjƒ}t    j
d|ƒ}|s‚qn|dks|dks|j ƒdkr²qn|j ƒ}|dkrÐqn|j ƒ}|jƒ}tjƒ}|dtjƒjƒ}    tjƒjtjƒd}
tjd|
|    f|ƒtjƒ} d} d} xˆtdd|
ƒD]s}| tjd    ||
ƒ}d
|j|j|jf}t j!j"|    |d |ƒ}t j!j#|ƒsútjd ||f|ƒqpntjd ||f|ƒt$}t%|dƒ}|j&ƒ}|j'ƒxz|D]r}||kr^qFnt(|ƒ}|jddƒ|krˆqFn|jdd|ƒ} t)}tjd| |ƒqFW|rp| d7} tjd| |ƒqpqpW| s| rûqntj*| ƒ}t+j,|tj-||ƒt+j,|tj.|| ƒt/||ƒtj0d||| tj1|ƒf|j ƒƒqWdS(NitActTotDayRechargeii
t1s\EventServerPY\EventData\S%ss#ÉÏÏß´¦ÀíÀÛ³äÌì»î¶¯! ServerDay=%s,%sttdayss %d-%02d-%02ds CTGOK_%s.txts²»´æÔÚ¸ÃÁ÷Ïò: day=%s,%ss½âÎöÁ÷Ïò: day=%s,%strtPlayerIDttimes %s 00:00:00s    ¸üÐÂ×îºóÒ»´Î³äֵʱ¼ä: %ss    ¸üÐÂÀÛ³äÌì: %ss_¿ª·þÀÛ³äÌì»î¶¯¸üкóÀÏ·þÍæ¼ÒÊ׵ǻ¹ÔڻʱÐÞÕýÀÛ³äÌìÖµ: actNum=%s,cfgID=%s,updDay=%s,updTime=%s(2t
PyGameDatatg_operationActionDicttgett ShareDefinet"OperationActionName_TotDayRechargetvaluest ActKey_Statet ActKey_ActNumt ActKey_CfgIDt IpyGameDataPYtGetIpyGameDatat GetStartDatetGetChangeCoinPointTotalt GetPlayerIDtGetAccIDtChConfigtGetServerRootPatht    GameWorldt GetGameWorldt GetServerIDt    DBDataMgrtGetEventTrigMgrtGetValuet Def_ServerDaytDebugLogtGetCurrentTimetrangetdatetimet    timedeltatyeartmonthtdaytostpathtjointisfiletFalsetopent    readlinestclosetevaltTruetChangeTimeStrToNumt PlayerControltNomalDictSetPropertytDef_PDict_ActTotDayRechargeTimetDef_PDict_ActTotDayRechargeDaystSync_TotDayRechargePlayerInfotLogtChangeTimeNumToStr(t    curPlayertactInfotactNumtcfgIDtipyDatat    coinTotaltplayerIDtaccIDtrootPatht
drRootPatht    ServerDayt curDatetimet lastTimeStrtupdDayR&tdayDatet
dayDateStrtdrPaththasCointftlinestlinetdrDicttupdTime((svD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActTotDayRecharge.pytFixOSATotDayRecharge"sn%*       
 
     *cCs‰x‚tjjtjiƒjƒD]b}|jtjdƒ}t||ƒ}|s|jtjƒrt    ||ƒt
||ƒqqqWdS(Ni( RRR    R
R R Rt!__CheckPlayerTotDayRechargeActionR tSync_TotDayRechargeActInfoR6(R9R:R;tisReset((svD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActTotDayRecharge.pyt OnPlayerLogines% cCs^tjƒ}xKt|jƒƒD]7}|j|ƒ}tj|ƒsIqnt||ƒqWdS(N(RtGetPlayerManagertxrangetGetPlayerCounttGetPlayerByIndextIsNormalPlayerRQ(R;t playerManagertindexR9((svD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActTotDayRecharge.pytRefreshTotDayRechargeActionInfors c    Cs‰|jƒ}tjtj|ƒ}|jtjdƒ}|jtjdƒ}|jtjdƒ}|j    t
j |ƒ}||kr£tj d|||f|ƒdS|j    t
j |ƒ}tj d|||||f|ƒt||ƒtj|t
j ||ƒtj|t
j ||ƒtj|t
j|dƒtj|t
j|dƒtj|t
j|dƒt||ƒt||ƒtS(Nis6ÀÛ³äÌì»î¶¯ID²»±ä£¬²»´¦Àí£¡ actNum=%s,cfgID=%s,actID=%ssIÀÛ³äÌì»î¶¯ÖØÖÃ! actNum=%s,actID=%s,playerActID=%s,state=%s,playerCfgID=%s(RRt
GetActInfoR
R R    t    ActKey_IDR RtNomalDictGetPropertyRtDef_PDict_ActTotDayRechargeIDRt Def_PDict_ActTotDayRechargeCfgIDt__SendTotDayRechargeMailR2R3t Def_PDict_ActTotDayRechargeAwardR5R4RRR6R0(    R9R;R?R:tactIDtstateR<t playerActIDt playerCfgID((svD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActTotDayRecharge.pyRQ{s*         cCsJ|s
dStjd|ƒ}|s&dS|jƒ}|jƒ}|jƒ}|jƒ}tjd|ƒ}| sv| rzdS|jtj    |ƒ}|jtj
|ƒ}    x|D]•}
|
j ƒ} |    t d| ƒ@rØq­n|| krêq­n|    t d| ƒO}    |
j ƒ} tj|tj
||    ƒ| g} tj||| | ƒq­WdS(NRtActTotDayRechargeTempi(RtGetIpyGameDataNotLogt    GetActNumRt GetTemplateIDt GetAwardMailtGetIpyGameDataListR_RR5Rct
GetNeedDaytpowtGetAwardItemListR2R3t
PlayerMailt SendMailByKey(R9Rgt
cfgIpyDataR;R?t
TemplateIDt    AwardMailt ipyDataListtcurDaystdayAwardRecordR=tneedDayt awardItemListt    paramList((svD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActTotDayRecharge.pyRbšs4            c
CsÞ|dkrdSxÇtjjtjiƒjƒD]§}|jtjdƒ}|jtjƒsstj    d|ƒq/n|jtj
dƒ}|s”q/nt j d|ƒ}|s²q/n|j ƒ}|td|ƒ@sútj    d|||f|jƒƒq/nttjƒƒ}|jtj|ƒ}    tj|tj||ƒ|jtj|ƒ}
} |     sptj|    |ƒ r—| d7} tj|tj|| ƒnt||ƒtj    d|||
| tj|    ƒf|jƒƒq/WdS(NisÀÛ³äÌì»î¶¯µ±Ç°Î´¿ªÆô! actNum=%sRisNÍæ¼ÒÀÛ³äÌì»î¶¯£¬³äÖµÀàÐͶԸûÎÞЧ! actNum=%s,coinType=%s,ctgTypeEffValue=%sisBÍæ¼ÒÀÛ³äÌì»î¶¯: actNum=%s,cfgID=%s,nowDay=%s,updDay=%s,lastTime=%s(RRR    R
R R RR RRRRRtGetCTGTypeEffValueRoRtintRR_RR4R2R3R5tCheckTimeIsSameDateR6R8( R9taddCointcoinTypeR:R;R<R=tctgTypeEffValuetcurTimetlastTimetnowDayRF((svD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActTotDayRecharge.pytAddTotDayRechargeCoin½s: %     
     -cCsmtj|dƒ}|dkr3tjd|ƒdS|jƒ}tjtj|ƒ}|jtjdƒ}|jtj    dƒ}| sŒ| rªtjd||f|ƒdSt
j d|ƒ}|sÆdS|j ƒ}t
j d|ƒ}    |    sîdS|jtj|ƒ}
|jtj|ƒ} | td|ƒ@rKtjd||f|ƒdSd} x*|    D]"} | jƒ|krX| } PqXqXW| s¨tjd    ||||f|ƒdS|
|krÛtjd
||||
|f|ƒdS| td|ƒO} | jƒ}tj|tj|| ƒt||ƒi|d 6|d 6|d 6|d6|d6}tj||ddt|gƒdS(sfÁìÈ¡ÀÛ³äÌì½±Àø
    @param awardDay ½±ÀøÌì
    @param actNum: »î¶¯±àºÅ£¬Èç11 »ò  12 ´ú±í²»Í¬µÄ»î¶¯
    is'ûÓÐÖ¸¶¨ÁìÈ¡µÄÀÛ³äÌì»î¶¯±àºÅ! actNum=%sNs.ÀÛ³äÌì»î¶¯·Ç»î¶¯ÖÐÎÞ·¨Áì½±£¡actNum=%s,state=%sRRhis3ÒѾ­ÁìÈ¡¹ý¸ÃÀÛ³äÌìÌì»î¶¯½±Àø! actNum=%s,awardDay=%ssLÕÒ²»µ½¸ÃÀÛ³äÌì»î¶¯µµÎ»Ë÷Òý½±Àø! actNum=%s,cfgID=%s,TemplateID=%s,awardDay=%ssHËùÐèÀÛ³äÌì²»×ãÎÞ·¨ÁìÈ¡! actNum=%s,cfgID=%s,TemplateID=%s,curDays=%s < %stActNumtCfgIDRttAwardDaytItemListteventtTotDayRecharge(RtToIntDefRRR]R
R R    R RRRRkRmR_RR5RcRotNoneRnRpR2R3R6t ItemControlertGivePlayerItemOrMailR0(R9tawardDayR;R?R:ReR<RsRtRvRwRxt awardIpyDataR=RzRN((svD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActTotDayRecharge.pytOnGetTotDayRechargeAwardåsR      #  )cCs´tjtj|ƒ}|jtjƒs+dS|jtjƒ}tjd|ƒ}|sYdSt    j
ƒ}||_ |j t j|ƒ|_|j t j|ƒ|_tj||ƒdS(NR(RR]R
R R    R RRRtChPyNetSendPackt tagSCActTotDayRechargePlayerInfoR†R_RR5t    TotalDaysRct AwardRecordt NetPackCommont SendFakePack(R9R;R:R<R=t
clientPack((svD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActTotDayRecharge.pyR6s     c    CsÇtjtj|ƒ}|jtjƒs+dS|jtjƒ}tjd|ƒ}|sYdStj    |ƒ\}}|jtj
|ƒ}t j ƒ}||_ ||_||_||_tj||ƒdS(NR(RR]R
R R    R RRRtGetOperationActionDateStrtActKey_StartDateSyncR“ttagSCActTotDayRechargeInfoR†t    StartDatetEndtDateR‡R—R˜(    R9R;R:R<R=t startDateStrt
endDateStrt startDateSyncR™((svD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActTotDayRecharge.pyRR1s                  (RRR
R2RR“RŽR—RqRRR"RR'RPRTR\RQRbR…R’R6RR(((svD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActTotDayRecharge.pyt<module>s,                  C                     #    (    9