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
0aic@sddlZddlZddlZddlZddlZddlZddlZddlZddlZddl    Z    d„Z
d„Z d„Z d„Z d„Zd„Zd„Zd    „Zd
„Zd „Zd „Zd „Zd„Zd„Zd„Zd„Zd„ZdS(iÿÿÿÿNcCsAx:tjD]/}|jtj|ƒs,q
nt||ƒq
WdS(N(tChConfigtInvestTypeListtNomalDictGetPropertytDef_PDict_InvestTimetSync_InvestInfo(t    curPlayert
investType((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerGoldInvest.pytOnLogins
cCs…tjddiƒ}xitjD]^}|jtj|ƒsAqnt|ƒ|krpt|||t|ƒƒnt||ƒqWdS(Nt    InvestDayi(    t IpyGameDataPYtGetFuncEvalCfgRRRRtstrt__GiveUnGetPerDayRewardR(Rt dayAwardDictR((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerGoldInvest.pytOnDay&scCs    |s
dS|jƒ}|jtj|ƒ}|s_|jtj|ƒ}|sRdS|d }nttjƒƒ}tj||ƒ}t    ||ƒs|}|jtj
|ƒ}    |    s¸dStj|    |ƒ}
|
dkrÚdStj d|
|ƒ||
kr8|
}tj d||ƒq8n|d}tj d||ƒ|dkrbtj d||f|ƒdS|d } g} x9|D]1} | d}| d}| j |||gƒqyWtj d    ||| | f|ƒt j|tj|| ƒtjd
||| |gƒdS( NiiisÒѹýÆÚ: ×î´ó»¹¿É½±ÀøÌìÊý: %ssÐÞÕý×î´ó»¹¿É²¹·¢µÄ½±ÀøÌìÊý: %sisδ¹ýÆÚ: rewardDays=%ss3²»Óò¹·¢Í¶×Ê¿¨Ã¿ÈÕ½±Àø: investType=%s,rewardDays=%ssWÓʼþ²¹·¢Í¶×Ê¿¨Ã¿ÈÕ½±Àø! investType=%s, rewardDays=%s, updRewardTime=%s, mailItemList=%ssInvestDayReward_%si€Qi€Q(t GetPlayerIDRRtDef_PDict_InvestRewardTimeRtintttimet    GameWorldt GetDiff_DaytGetInvestStatetDef_PDict_InvestEndTimetDebugLogtappendt PlayerControltNomalDictSetPropertyt
PlayerMailt SendMailByKey(RRtdayAwardItemListtplayerIDtlastRewardTimet
investTimetcurTimetpassDayst
rewardDaystendTimet rewardDayMaxt updRewardTimet mailItemListtitemInfotitemIDt    itemCount((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerGoldInvest.pyR 4sN    
 
 
 
    cCsO|jtj|ƒ}|s dSttjƒƒ}tdtj||ƒdƒS(Nii(RRRRRtmaxRR(RRR R!((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerGoldInvest.pyt__GetInvestPassDaysgs
cCsq|jtj|ƒ}|s dS|jtj|ƒ}|rmtjttjƒƒ|ƒ}|dkrmdSndS(Nii(RRRRRRRR(RRR R$t expiredDays((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerGoldInvest.pyRos cCsdS(N((tindext
clientDatattick((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerGoldInvest.pyt OnGoldInvestƒscCsYtjddiƒ}x=|jƒD]/\}}||kr"t|t|ƒƒPq"q"WdS(Nt
InvestCosti(R    R
titemst DoLogicInvestR(RtctgIDt ctgInvestDictRt    ctgIDList((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerGoldInvest.pyt InvestByCTGˆs  cCs´tjddiƒ}|jt|ƒdƒ}t||ƒ}tjd|||fƒttjƒƒ}|s¿t    j
|t j ||ƒt    j
|t j |dƒt    j
|t j|dƒn|dkrÔd}n¤|dkrx|jt j |ƒ}||krC||dd}tjd|tj|ƒtj|ƒfƒqxtj||ƒ}tjd|tj|ƒfƒnt    j
|t j ||ƒtjd    |ƒt||ƒdS(
NRiis.¹ºÂòͶ×Ê: investType=%s,buyDays=%s,curState=%siis4    ÀÛ¼Óʱ³¤: investType=%s,endTime=%s,updEndTime=%ss)    ÖØÐ¼¤»î: investType=%s,updEndTime=%ssͶ×ÊÀí²Æ³É¹¦: investType=%s(R    R
tgetR RRRRRRRRRRRRtLogtChangeTimeNumToStrtGetEndTimeByZeroTimeR(RRt buyDaysDicttbuyDaystcurStateR!t
updEndTimeR$((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerGoldInvest.pyR4‘s.           &# cCs
d}|S(Ni((RtmapIDtaddFBCnt((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerGoldInvest.pyt GetAddFBCnt´scCs…d}tjddiƒ}xc|jƒD]U\}}|jt|ƒdƒ}|sXq(nt|t|ƒƒssq(n||7}q(W|S(Nit InvestPoweri(R    R
R3R9R RR(RRAt addFBBuyCnttaddFBBuyCntDictRtfbMapIDAddDicttaddCnt((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerGoldInvest.pytGetAddFBBuyCnt¹scCsdtjddiƒ}xH|jƒD]:\}}||kr@q"nt|t|ƒƒs[q"ntSWtS(NRDi(R    R
R3RRtTruetFalse(RRAt freeSweepDictRt fbMapIDList((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerGoldInvest.pytIsFBCntBuyFreeÆs cCsad}tjddiƒ}x?|jƒD]1\}}t|t|ƒƒsOq(n||7}q(W|S(NiRDi(R    R
R3RR(RtaddMaxt arenaCntDictRRH((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerGoldInvest.pytGetArenaTicketMaxÑscCsad}tjddiƒ}x?|jƒD]1\}}t|t|ƒƒsOq(n||7}q(W|S(NiRDi(R    R
R3RR(RRORPRRH((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerGoldInvest.pytGetTreeEnergyAddÛscCsad}tjddiƒ}x?|jƒD]1\}}t|t|ƒƒsOq(n||7}q(W|S(NiRDi(R    R
R3RR(RROtaddDictRtaddValue((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerGoldInvest.pytGetTravelEnergyAddåscCs~tjƒj|ƒ}|j}|j}tjd||fƒ|tjkrQdSt||ƒdkrwtjdƒdSt    t
j
ƒƒ}g}|dkr(|j tj |ƒ}|rçtj ||ƒdkrçtjd|ƒdSntjddiƒ}    t|ƒ|    kr(||    t|ƒ7}q(n|s2dSitjtj6tjtj6}
||
kr|
|} g} d} xu|D]m}|d     \}}tj|| |ƒ}|s²q{nt    ||d
ƒ}|sÒq{n| j||| gƒq{W| r|| 7}qn|dkr7tj|tj |t    t
j
ƒƒƒntjd ||fƒt||ƒtj||d d tigƒdS(Ns.ÁìȡͶ×ÊÀí²Æ»Ø±¨£ºinvestType=%s,rewardIndex=%sis    Î´Í¶×Ê»òÒѹýÆÚ£¬ÎÞ·¨Áì½±!is&    ÒÑÁìÈ¡¹ý¸ÃË÷Òý½±Àø! rewardIndex=%sRii
igY@s)¸üÐÂÁì½±£ºinvestType=%s,rewardItemList=%steventtInvest(RtGetPlayerManagertGetPlayerByIndext
InvestTypet RewardIndexRRRRRRRRRR    R
R t PlayerGubaot"GubaoPowerType_InvestMonthAwardPertInvestType_Montht!GubaoPowerType_InvestLifeAwardPertInvestType_LifetGetGubaoPowerValueRRRRt ItemControlertGivePlayerItemOrMailRK(R.R/R0RRt rewardIndexR!trewardItemListRR texItemGubaoPowerDicttgubaoPowerTypet
exItemListt gubaoExSignR(R)R*taddPertcountEx((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerGoldInvest.pytOnGetInvestReward÷sZ           
  ) cCsK|jtj|ƒ}|rGtjttjƒƒ|ƒdkrGdSndS(Nii(RRRRRRR(RRR((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerGoldInvest.pyt__todayAwardState0s
$cCsmtjƒ}||_|jtj|ƒ|_|jtj|ƒ|_t    ||ƒ|_
t j ||ƒdS(N( tChPyNetSendPackttagSCInvestInfoRZRRRt InvestBuyTimeRt InvestEndTimeRmt
AwardStatet NetPackCommont SendFakePack(RRt
clientPack((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerGoldInvest.pyR7s     (RR    RsRnRbRR\RRRRRR R,RR1R8R4RCRIRNRQRRRURlRmR(((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerGoldInvest.pyt<module>s4                      3                        #                  
    
        9