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
Cì:[c@soddlZddlZddlZddlZddlZddlZddlZddlZddlZddl    Z    ddl
Z
ddl Z ddl Z ddl Z ddlZddlZddlZddlZddlZedƒ\ZZdZd„Zd„Zd„Zd„Zd„Zd    „Zd
„Zd „Zd „Zd „Z d„Z!gd„Z"dS(iÿÿÿÿNiicCsOt|ƒtjƒ}tjt|ƒd tjƒ}tj|tj    |ƒdS(Ni
(
tAddRecoverTimest    GameWorldtGetCurrentTimetChangeTimeStrToNumtstrtChConfigtTYPE_Time_Format_Dayt PlayerControltNomalDictSetPropertytDef_PDict_RecoverGainLastTime(t    curPlayertcurTimet
curTimeNum((s].\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerRecover.pyt RecoverOnDay2s
 
 cCst|ƒdS(N(t__NotifyRecoverNum(R
((s].\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerRecover.pytRecoverOnLogin=s
c* Cs7|jƒ}|dkrdSt|ƒ}td|dƒ}tjd|ƒg}tjƒ}tjƒ}x¼t|j    ƒƒD]¨}|j
|ƒ}|j ƒ}|t kr°q}nt j|tj|dƒ|jƒ}    tjd|    ƒ}
|
sôq}n|
jƒ} | rtj|| ƒ rq}n|
jƒdkr |
jƒ} tj| ƒ} | sXq}n| jƒ}|spq}n|jtj| ƒ}| tjkr¢| r¢q}ntj|| ƒ\}}|\}}}}}|\}}}}}t|ƒdkr| rq}n| tjkrIt ||d| ƒ}|s4q}n||d|}n|||}|||}|}|} |||}!t j|tj!||ƒ|jtj"|dƒ}"t j|tj"|t#||"|dƒƒ|jtj$|dƒ}#t j|tj$|t#||#|dƒƒ|jtj%|dƒ}$t j|tj%|t#||$|dƒƒ|jtj&|dƒ}%t j|tj&|t#| |%|dƒƒ|jtj'|dƒ}&t j|tj'|t#|!|&|dƒƒtjd||||| |!fƒ|j(|ƒq}|
jƒdkr}|
jƒ}'t)j*||'ƒ\}(})|'t+j,kr}d})|(r}|)}(q}n|(|)kr–| r–q}n|)|(||)}|dkrºq}n|jtj"|dƒ}"t j|tj"|t#||"|)dƒƒ|j(|ƒtjd||fƒq}q}Wt-|ƒdS(Niis"    Ôö¼Ó¿ÉÕһشÎÊý lostOnDayNum=%st
DailyQuestis`Ôö¼ÓÕһشÎÊýindex=%s,addCommonCnt=%s,addExtraCnt=%s,addBuyCnt=%s,addItemAddCnt=%s,addnoBuyCnt=%ss$Ôö¼ÓÕһشÎÊýindex=%s,addCommonCnt=%s(.tGetLVt__GetLastRecoverPastDaytmaxRtDebugLogRt IpyGameDataPYtIPY_DatatxrangetGetResourcesBackCounttGetResourcesBackByIndextGetIDtDef_TJGRecoverIDRRRtDef_PDict_HaveRecovert GetRelatedIDtGetIpyGameDataNotLogtGetUnLockFuncIDt GameFuncCommt GetFuncCanUsetGetRelatedTypetFBCommont GetFBIpyDatat GetDayTimestNomalDictGetPropertyt Def_Player_Dict_FBHistoryMaxLinetDef_UnRecoverNoPassMaptGetFBDetailCntInfot
PyGameDatatFBEnterTimeLimiitMapIDt__GetLimitFBCnttDef_PDict_RecoverGainDatatDef_PDict_RecoverFBCommonCnttmintDef_PDict_RecoverFBExtraCnttDef_PDict_RecoverFBBuyCnttDef_PDict_RecoverFBItemAddCnttDef_PDict_RecoverFBNoBuyCnttappendtPlayerActivitytGetDailyActionFinishCntt ShareDefinetDailyActionID_DiceR(*R
tplayerLVt lostOnDayNumtrecoverNumListR t
ipyDataMgrtit recoverDatatindext    relatedIDtdailyQuestDatat unLockFuncIDt    dataMapIDt    fbIpyDatatmaxTimesthistoryMaxLinet
remainInfot    limitInfot
rCommonCntt    rExtraCnttrBuyCntt rItemAddCnttnoBuyCnttrCommonCntlimittrExtraCntlimitt rBuyCntlimittrItemAddCntlimitt noBuyCntlimitt    fbOpenCntt addCommonCntt addExtraCntt    addBuyCntt addItemAddCntt addnoBuyCntt curCommonCntt curExtraCntt    curBuyCntt curItemAddCntt curnoBuyCnttdailyIDt curDayTimest dayTimesLimit((s].\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerRecover.pyRCs®                       
cCsY|jtjdƒ}|sdStjtjƒƒ}td||ƒ}|dd}|S(Niii(R&RR    RRtGetCurrentDataTimeStrR(R
trecoverGainLastTimeR tpassTicktpastDay((s].\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerRecover.pyR®scCs‰|s
dStjƒ}d}xft|ƒD]X}|tjd|dƒ}d|j|jf}tj||ƒswq)n|d7}q)W|S(Nitdaysis%02d%02d(    RRtrangetdatetimet    timedeltatmonthtdayR#tGetFBHasOpenToday(R
RdRCR RStdiffDaysttimeDatatdayStr((s].\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerRecover.pyR,¸s c
CsBtjƒj|ƒ}tjd|jƒƒ|j}|d
krVtjd|ƒdS|jscdS|j}|j}i}i}g}    dddif\}
} } } xrt    |ƒD]d\}}|t
krÓd}n
||}t j d|ƒ}|sûq²nt ||||ƒ\}}|s"q²nx.|D]&\}}|j|dƒ|||<q)W|jƒr–|tkr–t|||ƒ}|r |    j|ƒq nvt||||ƒ\}}}}|
|7}
| |7} | |7} x4|jƒD]&\}}| j|dƒ|| |<qâW|||<q²W|s$dSi|tj6}x6|jƒD](\}}tj|||tj|ƒqAW|
dkr’tj|ƒj|
ƒn| dkr½tj|tj| tjƒn| dkråtj|| t t dƒn| r­t!j"|tj#ƒ}t$| ƒ|kr_g| jƒD]\}}||dg^q}tj%d|j&ƒg|ƒq­xK| jƒD]:\}}t'j(|||dtj#tj)gt dt ƒqlWnt
|krÉt*j+|ƒnt,j-||||
| | | ƒt.||ƒt/|ƒ|    rt0j1||    ƒntjd    ||||
| | | fƒdS( Ns0==[PlayerRecover]== In->OnRecoverGain(), Name:%siis&OnRecoverGain() hasn't recover way(%s)t ResourcesBacktRecovertt showSysInfos•==[PlayerRecover]== Out->OnRecoverGain() recoverWay=%s, costMoneyDict=%s, recoverCntDict=%s, totalExp=%s, totalMoney=%s, totalSP=%s, totalItemDict=%s(ii(2RtGetPlayerManagertGetPlayerByIndexRt GetPlayerNametTypetCntt    IndexListtRecoverCntListt    enumerateRRtGetIpyGameDatat__GetRecoverCosttgettGetCanBackTimest RecoverWay1t__DoLogicBackTimesR4t__GetRecoverGaintitemsRtDef_Cost_Reason_SonKeyRtPayMoneytDef_Cost_RecoverGaintAddExpt    GiveMoneyt IPY_GameWorldtTYPE_Price_Silver_MoneytDef_GiveMoney_RecovertPlayerAddZhenQitTruet
ItemCommontGetItemPackSpacetrptItemtlent SendMailByKeyt GetPlayerIDt ItemControlertGivePlayerItemt rptAnyWheret    PlayerTJGtResetTJGDeadInfotDataRecordPacktDR_PlayerRecovert__SetRecoverNumRR#tSync_FBPlayerFBInfoData(R?t
clientDatattickR
t
recoverWaytrecoverIndexListtrecoverCntListt costMoneyDicttrecoverCntDictt    mapIDInfottotalExpttotalSPt
totalMoneyt totalItemDictR=t
recoverCnttipyDatat costMoneyListt    moneyTypetmoneyCntRCtexptsptmoneytitemDicttitemIDtitemCnttinfoDictt
emptySpacet prizeItemList((s].\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerRecover.pyt OnRecoverGainÒs€                      
!
 
 
    .5  
&cCs…|jƒ}tjd|ƒ}|s(dS|jƒdkr}|jƒ}|jtj|ƒ}tj|tj|||ƒndS|S(NRii(    RRR{R"R&RtDef_Player_Dict_RecoverFbCntRR(R
R>R¨R@RARCt recoverFbCnt((s].\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerRecover.pyR€'s  !c Csd|jƒ}|tkrCt||ƒ\}}t|||ƒ}n|jtjƒ}|tkrå|jƒ}|j    ƒ}    |tkr¢t
||t dƒƒ}
n(t||ƒ||    t d||ƒ}
t j|tj|
ƒ} nu|jƒ} |tkrt
| |t dƒƒ}
n
|| }
t j|tj|
tƒrTtj|
gg} ng} | |fS(Nii(RRt__GetCanRecoverCntR/R&RtDef_PDict_TJGDeadPayTimeRtGetNormalCostJadetGetVipCostJadetinttfloatRRt HaveMoneyExR7tTYPE_Price_Gold_Paper_Moneyt GetCostCoppert    HaveMoneyRˆR‰tFalse( R
RžR¨R©R?t    commonCntt vipExtraCntt recoverSecondtnormalCostJadet vipCostJadet    costMoneyRªt
costCopper((s].\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerRecover.pyR|:s(      (  
cCs“|jtj|dƒ}|jtj|dƒ}|jtj|dƒ}|jtj|dƒ}|jtj|dƒ}|||||fS(Ni(R&RR.R0R1R2R3(R
R?RYRZR[R\R]((s].\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerRecover.pyR¹Us cCsôxí|jƒD]ß\}}|jtj|dƒ}|jtj|dƒ}|jtj|dƒ}|jtj|dƒ}|jtj|dƒ}|||||g}    tj    |    ƒ}
d} xKt
|    ƒD]=\} } | | 7} t d| |ƒ|
| <|| krÍPqÍqÍW|
\}}}}}t j |tj||ƒt j |tj||ƒt j |tj||ƒt j |tj||ƒt j |tj||ƒt |||||ƒdkr |tkr t j |tj|dƒq q WdS(Nii(R‚R&RR.R0R1R2R3tcopytdeepcopyRzRRRRR(R
R¢R?R¨RYRZR[R\R]tcntListt
newCntListtsumCntR=tcntt newCommonCntt    newBuyCntt newItemAddCntt newExtraCntt newnoBuyCnt((s].\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerRecover.pyRš^s.
 *!cCsI|jƒ}|jƒ}tj|ƒ}tj|tjƒ}|jtj|dƒ}d}    d}
d} d} i} |t    kr·|jtj
ƒ}|jtj ƒ}|tj |}    n|t krÏ|jƒn    |jƒ}|jddƒ}|r|ttjd||f|ƒƒ}
n|jddƒ}|r]|ttjd||f|ƒƒ} n|jddƒ}|rž|ttjd||f|ƒƒ} n|jd    gƒ}|r9x€|D]u}|jd
dƒ}|jd dƒ}|sóq½n|ttjd |||f|ƒƒ}|s(q½n|| |<q½Wn|
| | | fS( NiR­RqsResourcesBackEXP%s_%sR¯sResourcesBackMoney%s_%sR®sResourcesBacksp%s_%stitemtItemIDt    ItemCountsResourcesBackitem%s_%s_%s(RRRtGetPlayerReExptGetLimitExpRateRtExpRateLimitType_RecoverR&R-RtDef_PDict_TJGDeadExptDef_PDict_TJGDeadExp1tDef_PerPointValueRt GetJadeRewardtGetCopperRewardR}tevaltFormulaControltGetCompileFormula(R
RžR¨R©R?treLVtreExptexpRatet    extraDatattjgExpR­R®R¯R°tExptExp1t    awardDictt
expFormulat moneyFormulat    spFormulat itemInfoListtitemInfoR±titemcntFormulatitemcnt((s].\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerRecover.pyRƒsH   $))) )c CsGtjƒ}|jƒg|_tjƒ}xót|jƒƒD]ß}|j|ƒ}|j    ƒ}|rw||krwq>nt
||ƒ\}}|j t j |dƒ}    | rÀ| rÀ|     rÀq>ntjƒ}
|
jƒ||
_||
_||
_|j t j|dƒ|
_|jj|
ƒq>Wt|jƒ|_tj||ƒdS(Ni(tChPyNetSendPackttagMCRecoverNumtCleartNumInfoRRRRRRR¹R&RRttagMCRecoverNumInfotIndext
RecoverCnttExtraCntR-t    ExtraDataR4RtNumt NetPackCommont SendFakePack( R
R;tsendPackR<R=R>R?RÄRÅt haveRecovert numInfoPack((s].\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerRecover.pyR³s. 
       
            (#RRâRRRóRýRˆR7R“R˜RRR#R R–R5R*RËRgRfRt RecoverWay2RR RRRR,R¶R€R|R¹RšRR(((s].\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerRecover.pyt<module>s@                                k    
        U                    %    0