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
 –Fgc@sôddlZddlZddlZddlZddlZddlZddlZddlZddlZddl    Z    ddl
Z
d„Z d„Z d„Z d„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((spE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerGoldInvest.pytOnLogin s
cCsËxÄtjD]¹}|jtj|ƒs,q
n|tjkr¶|jtj|dfƒ}t|ƒ}|r¶||kr¶|d7}tj|tj|df|ƒt    j
d|ƒq¶nt ||ƒq
WdS(Niis¸üеǼͶ×Ê¿ÉÁì½±ÌìÊý½ø¶È: %s( RRRRtInvestType_LogintDef_PDict_InvestProgresst__GetInvestMaxDayst PlayerControltNomalDictSetPropertyt    GameWorldtDebugLogR(RRt progressValuetmaxDays((spE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerGoldInvest.pytOnDay(s 
 cCsO|jtj|ƒ}|s dSttjƒƒ}tdtj||ƒdƒS(Nii(RRRtintttimetmaxR t GetDiff_Day(RRt
investTimetcurTime((spE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerGoldInvest.pyt__GetInvestPassDays9s
cCs+tjddiƒ}|jt|ƒdƒS(Nt InvestMaxDayii(t IpyGameDataPYtGetFuncEvalCfgtgettstr(RtinvestMaxDayDict((spE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerGoldInvest.pyR
AscCs$|jtj|ƒ}|s dSdS(Nii(RRR(RRR((spE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerGoldInvest.pytGetInvestStateFscCsdS(N((tindext
clientDatattick((spE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerGoldInvest.pyt OnGoldInvestUscCsYtjddiƒ}x=|jƒD]/\}}||kr"t|t|ƒƒPq"q"WdS(Nt
InvestCosti(RRtitemst__DoLogicInvestR(RtctgIDt ctgInvestDictRt    ctgIDList((spE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerGoldInvest.pyt InvestByCTGZs  cCsgt||ƒdkr*tjd|ƒdSttjƒƒ}tj|tj||ƒxWt    tj
ƒD]F}tj|tj ||fdƒtj|tj ||fdƒqfW|tj krâtj|tj |dfdƒntjddiƒj|dƒ}|rtj||ƒntjdd||jƒt|ƒgƒtjd|ƒt||ƒdS(Nis#ÒÑͶ×Ê£¬ÎÞ·¨Öظ´Í¶×Ê! investType=%sitInvestRedPackAwards BuyInvest_%ssͶ×ÊÀí²Æ³É¹¦: investType=%s(RR RRRR R RRtrangetDef_PDict_InvestKeyCounttDef_PDict_InvestRewardR    RRRRtPlayerFamilyRedPackettCreatRedPacketByIDt WorldNotifytGetNamet__GetTotalGetGoldR(RRRtkeyNumt redPacketID((spE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerGoldInvest.pyR&cs" $#!) c
Cs°d}tjƒ}x—t|jƒƒD]ƒ}|j|ƒ}|jƒ|krRq%n|jƒ}xG|jƒD]9}x0|D](\}}}    |dkrx||7}qxqxWqkWq%W|S(Niii(ii(RtIPY_DatatxrangetGetInvestCounttGetInvestByIndextGetTypet    GetRewardtvalues(
Rt    totalGoldt
ipyDataMgrR tipyDatat
rewardDictt
rewardInfotitemIDt    itemCountt_((spE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerGoldInvest.pyR3s   c Csˆt|tjƒdkrdSd}tj|ƒ}|sÜi}tjƒ}xlt|jƒƒD]X}|j|ƒ}|j    ƒtjkrŒq\n|j
ƒsžq\n|j ƒ||j
ƒ<q\Wtj ||ƒt jd|ƒn||krìdS||}|d|d}}    t j|tj|    t|gƒr0dSt j|tj|    dt|gƒ\}
} t||ƒt jd||    |
| fƒdS(NitBossInvestNPCIDDicts»º´æbossͶ×ʶÔÓ¦¹ØÏµ: %sidsNÉèÖÃɱ¹ýͶ×Êboss: npcID=%s,rewardIndex=%s,progressValue=%s,updProgressValue=%s(RRtInvestType_BossRt GetConfigExR6R7R8R9R:t GetNeedNPCIDtGetIDt SetConfigExR tLogtGetDictValueByBitR    tTruetSetDictValueByBitRR( RtnpcIDtkeyRER>R R?tinvestIDRt rewardIndexRtupdProgressValue((spE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerGoldInvest.pyt
OnKillBossŽs6   
!*     c Cs‚tjƒj|ƒ}|j}|j}tjd||fƒ|tjkrQdSt||ƒdkrwtjdƒdSt    j
d|d|ƒ}|s›dS|j ƒ}|rÔ|j ƒ|krÔtjd|ƒdStj |tj|t|gƒr
tjd|ƒdS|jƒ}|jƒ}    tj |tj|t|gƒ}
|tjtjgkršt||ƒ} || kr2tjd|jƒ| fƒdSn˜|tjkrï|jtj|d    fƒ} || kr2tjd
|| fƒdSnC|tjkrn1|tjkr.|
s2tjd |ƒdSndS|s<dSd } |    jt| ƒgƒ}|sddStj||ƒszdStj|tj|dt|gƒ\}}t||ƒtjd |||fƒxE|D]=\}}}tj ||||t!j"gddt#igƒqÒWtj$||dƒt%j&||||ƒt'|ƒ}t    j(ddƒ}|dkr~||kr~t}xet)|ddƒD]Q}t    j*d|d|ƒs±q‹ntj |tj|t|gƒs‹t#}Pq‹q‹W|r~t+j,|tj-|d    ƒxWt)tj.ƒD]F}t+j,|tj||fd    ƒt+j,|tj||fd    ƒqWt||ƒtjd|ƒq~ndS(Ns.ÁìȡͶ×ÊÀí²Æ»Ø±¨£ºinvestType=%s,rewardIndex=%sis    Î´Í¶×Ê»òÒѹýÆÚ£¬ÎÞ·¨Áì½±!tInvestids!    µÈ¼¶²»×㣬ÎÞ·¨Áì½±! needLV=%ss&    ÒÑÁìÈ¡¹ý¸ÃË÷Òý½±Àø! rewardIndex=%ss4    Í¶×ÊÌìÊý²»×㣬ÎÞ·¨ÁìÈ¡! needDay=%s > passDays=%sis9    µÇ¼Ͷ×ÊÌìÊý²»×㣬ÎÞ·¨ÁìÈ¡! needDay=%s > loginDays=%ss6    BossͶ×ÊÎÞ²ÎÓë»÷ɱ¸Ãboss£¬ÎÞ·¨ÁìÈ¡! rewardIndex=%st1s6    rewardValue=%s,updRewardValue=%s,rewardItemList=%steventRiiÿÿÿÿs'    ÁìÍê½±ÀøÁË£¬ÖØÖÃͶ×Ê! investType=%s(/R tGetPlayerManagertGetPlayerByIndext
InvestTypet RewardIndexRRRRRtGetIpyGameDatat    GetNeedLVtGetLVRLR.RMt
GetNeedDayR;R    tInvestType_NewMonthtInvestType_Month1RRRt InvestType_LVRFRRt ItemControlertCheckPackSpaceEnoughRNRtGivePlayerItemt IPY_GameWorldtrptItemtFalsetNotifyGiveAwardInfotDataRecordPacktDR_GetGoldInvestRewardR
RR,tGetIpyGameDataNotLogR R RR-(R R!R"RRRRR?tneedLVtneedDayRAtindexProgressStatetpassDayst    loginDayst    rewardKeytrewardItemListt rewardValuetupdRewardValueRBRCt isAuctionItemRtcanRepetBuyTypeListt isAllDayGettiR4((spE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerGoldInvest.pytOnGetInvestReward¸s’          !  !  *  ! $ cCs³tjƒ}||_t||ƒ|_xcttjƒD]R}|jj    |j
tj ||fƒƒ|j j    |j
tj ||fƒƒq7Wt|jƒ|_tj||ƒdS(N(tChPyNetSendPackttagMCInvestInfoRZRtCurDayR,RR-t RewardValuetappendRR.t ProgressValueR    tlent
ValueCountt NetPackCommont SendFakePack(RRtinvestInfoPackR4((spE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerGoldInvest.pyR#s     &*(R RRƒRjR{R/RcR RfRRRRRR
RR#R*R&R3RTRzR(((spE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerGoldInvest.pyt<module>s,                                                       *    k