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
Ö pic@s.ddlZddlZddlZddlZddlZddlZddlZddlZddlZddl    Z    ddl
Z
ddl Z e ddƒZ \ZZZZZZZZeegZd„Zd„Zd„Zdd„Zd„Zdd    „Zd
„Zd „Zd „Z dd „Z!dS(iÿÿÿÿNiicCs/x(tD] }t||ƒt||ƒqWdS(N(tZhanlingTypeListtCheckZhanlingAllFinishtSyncZhanlingInfo(t    curPlayert zhanlingType((smD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerZhanling.pyt OnPlayerLogin/s  cCsðtjddiƒ}xÔ|jƒD]Æ\}}t|ƒ}|jtj|ƒ}|svtjd||j    ƒƒq"ntj
tt j ƒƒ|ƒ}||krÕtjd|||tj |ƒf|j    ƒƒq"nt |t|ƒƒq"WdS(NtZhanlingis+Õ½Áî½±ÀøÎ´È«²¿ÁìÈ¡£¬²»ÖØÖÃ! zhanlingType=%ssIÕ½ÁîÖØÖÃCDÌìδµ½£¬²»ÖØÖÃ! zhanlingType=%s,passDays=%s < %s, finishTime=%s(t IpyGameDataPYtGetFuncEvalCfgtitemstinttNomalDictGetPropertytChConfigtDef_PDict_ZhanlingFinishTimet    GameWorldtDebugLogt GetPlayerIDt GetDiff_DayttimetChangeTimeNumToStrt ResetZhanling(RtresetZhanlingDicttzhanlingTypeStrtcdDaysRt
finishTimetpassDays((smD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerZhanling.pytOnDay;s      &c    Csžtjddƒ}x¸|jƒD]ª\}}||kr=qnt|ƒ}|jtjƒ}|td|ƒ@rrPn|td|ƒB}tj    |tj|ƒt
||ƒt j d||f|j ƒƒPqWtjddƒ}x¸|jƒD]ª\}}||kr
qìnt|ƒ}|jtjƒ}|td|ƒ@r?Pn|td|ƒB}tj    |tj|ƒt
||ƒt j d||f|j ƒƒPqìWdS(NRiis)¼¤»îÕ½ÁîÆÕͨ: zhanlingType=%s,updState=%sis)¼¤»îÕ½Áî¸ß¼¶: zhanlingType=%s,updState=%s(RRR    R
R R tDef_PDict_ZhanlingStatetpowt PlayerControltNomalDictSetPropertyRRtLogRtDef_PDict_ZhanlingStateH(    RtctgIDtzhanlingCTGIDDictRt    ctgIDListRtstatetupdStatetzhanlingCTGIDDictH((smD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerZhanling.pytOnActiviteByCTGIDLs6        c     Cs>|jtjƒ}|jtjƒ}tj||dƒ}tj||dƒ}tj|tj|ƒtj|tj|ƒ|tkr¹|jtj    |ƒ}tj|tj    |dƒntj
d||||||f|j ƒƒ|rt ||||t d|ƒ@|t d|ƒ@ƒnxttdƒD]f}tj|tj||fdƒtj|tj||fdƒtj|tj||fdƒq+Wtj|tj|dƒt||ƒg}tjddƒ}    tjddƒ}
||    jt|ƒgƒ7}||
jt|ƒgƒ7}|r:tj|d|ƒnd    S(
sr ÖØÖÃÕ½Áî
    @param zhanlingType: Õ½ÁîÀàÐÍ 
    @param backValue: ÖØÖÃÕ½ÁîʱµÄÕ½Áî½±ÀøÖµ£¬ÓÃÓÚ·µ»¹Î´ÁìÈ¡½±Àø
    isIÖØÖÃÕ½Áî: zhanlingType=%s,backValue=%s,state=(%s to %s) stateH=(%s to %s)ii
RiiRN(R R RR Rt SetBitValueRRtZhanlingValue1TypeListtDef_PDict_ZhanlingValue1RRt__giveUngetAwardRtrangetDef_PDict_ZhanlingRewardtDef_PDict_ZhanlingRewardHtDef_PDict_ZhanlingRewardFreeR RRRtgettstrt
PlayerCointDoResetCTGCountByIDList( RRt    backValueR$tstateHR%t    updStateHtkeyNumtresetCTGIDListR"R&((smD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerZhanling.pyRms6     #3  $ c    CsÍtjdi|d6tƒ}|s&dS|s0dS|jƒ}tjd||||f|ƒi}xå|D]Ý}|jƒ}    |jƒ}
||    kr—Pntj|t    j
|
t|gƒs"|j ƒ} x8| D]0} | d \} }|j | dƒ||| <qËWtjd|
|    | |f|ƒn|r´tj|t    j |
t|gƒ r´|jƒ} x8| D]0} | d \} }|j | dƒ||| <q]Wtjd|
|    | |f|ƒn|ritj|t    j|
t|gƒ ri|jƒ} x8| D]0} | d \} }|j | dƒ||| <qïWtjd|
|    | |f|ƒqiqiW|sTdS|g}g}x0|jƒD]"\} }|j| |dgƒqpWtjd    ||f|ƒtjd
|g||ƒdS( NRt ZhanlingTypesQ´¦ÀíÕ½ÁîÖØÖò¹·¢½±Àø: zhanlingType=%s,backValue=%s,activeState=%s,activeStateH=%siis8    Õ½Áî²¹·¢Ãâ·Ñ½±Àø: rewardIndex=%s,needValue=%s,%s, %ss8    Õ½Áî²¹·¢ÆÕͨ½±Àø: rewardIndex=%s,needValue=%s,%s, %ss8    Õ½Áî²¹·¢¸ß¼¶½±Àø: rewardIndex=%s,needValue=%s,%s, %ss    Õ½Áî²¹·¢½±Àø»ã×Ü: %s, %stZhanlingRewardUnget(RtGetIpyGameDataByConditiontTrueRRRt GetNeedValuetGetRewardIndextGetDictValueByBitR R/tGetFreeRewardItemListR0R-tGetZLRewardItemListR.tGetZLRewardItemListHR    tappendRt SendMailByKey(RRR4t activeStatet activeStateHt ipyDataListtplayerIDt ungetItemDicttipyDatat    needValuet rewardIndextrewardItemListtitemInfotitemIDt    itemCountt    paramListtitemList((smD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerZhanling.pyR+—sR         !  #(  #(  '    cCs|tkrdS|jtj|ƒ}ttj||ƒ}tj|tj||ƒtj    d||||f|j
ƒƒt ||gƒ|S(NsAÔö¼ÓÕ½Áî½ø¶È: zhanlingType=%s,addValue=%s,curValue=%s,updValue=%s( R)R R R*tmintDef_UpperLimit_DWordRRRRRR(RRtaddValuetcurValuetupdValue((smD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerZhanling.pytAddZhanlingValueÇs     cCs^|tkrdStj|tj||ƒtjd||f|jƒƒt||gƒ|S(Ns'ÉèÖÃÕ½Áî½ø¶È: zhanlingType=%s,value1=%s(    R)RRR R*RRRR(RRtvalue1((smD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerZhanling.pytSetZhanlingValueÒs   cCsÅtj|ƒ}|d|d}}|jƒ}tjd||ƒ}|sOdSd}|tkrp|jƒ}nÝ|tkr‘|jt    j
ƒ}n¼|t t gkrÊ|}t j||ƒrÁ|nd}nƒ|tkr|}    tj|t    j|    ƒrú|    nd}nJ|tkr$tj||ƒ}n)|tkrI|jt    j|ƒ}ndS||krztjd|||f|ƒdS|jƒ}
|jƒ} t    j} |dkr|jƒ} t    j} |jt    jƒ} | td|ƒ@sitjd|| f|ƒdSng|dkri|j ƒ} t    j!} |jt    j"ƒ} | td|ƒ@sitjd|| f|ƒdSn| stjd    |||f|ƒdStj#|| |
t$|gƒrÏtjd
|||f|ƒdSt%j&|| ƒsådStj'|| |
dt$|gƒt(|||gƒtjd |||| f|ƒd}x=| D]5}|d \}}t%j)||||t*j+gƒqDWt%j,|| dƒt-|ƒtj.dd iƒkrÁt/||ƒndS( Ni
Ris:Õ½ÁîËùÐèÖµ²»×㣬ÎÞ·¨Áì½±: zhanlingType=%s,curValue=%s < %siis:ÆÕͨսÁîδ¼¤»î£¬ÎÞ·¨ÁìȡսÁî½±Àø: zhanlingType=%s,state=%ss:¸ß¼¶Õ½Áîδ¼¤»î£¬ÎÞ·¨ÁìȡսÁî½±Àø: zhanlingType=%s,state=%ss:ûÓиÃÕ½Áî½±Àø! zhanlingType=%s,needValue=%s,rewardType=%ss@ÒѾ­ÁìÈ¡¹ý¸ÃÕ½Áî½±Àø! zhanlingType=%s,needValue=%s,rewardType=%ssDÁìȡսÁî½±Àø: zhanlingType=%s,needValue=%s,rewardType=%s,itemList=%si(0RtToIntDefRRtGetIpyGameDatatZhanlingType_LVtGetLVtZhanlingType_TreeLVR R tDef_PDict_TreeLVtZhanlingType_MainLeveltZhanlingType_MainLevelPlusRtIsMainLevelPasstZhanlingType_DingjungeLVIDtFBCommontIsFBPasstDef_FBMapID_DingjungetZhanlingType_GubaoCntt PlayerGubaotGetGubaoTotalCntR)R*RR>R@R/RAR-RRRBR.R R?R<t ItemControlertCheckPackSpaceEnoughtSetDictValueByBitRtGivePlayerItemt IPY_GameWorldtrptItemtNotifyGiveAwardInfoR1RR(RRtrewardIDRKt
rewardTypeRHRJRVtlvIDtlineIDRLRRt    rewardKeyR$t isAuctionItemRNRORP((smD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerZhanling.pytGetZhanlingRewardÚsz   ! '                       #!c
Cs¤|jtj|ƒrtStjdi|d6tƒ}|s@dSx|D]}|jƒ}|jƒr«tj    |tj
|t|gƒ r«tj d||f|j ƒƒdS|j ƒrýtj    |tj|t|gƒ rýtj d||f|j ƒƒdS|jƒrGtj    |tj|t|gƒ rGtj d||f|j ƒƒdSqGWtj|tj|ttjƒƒƒt||ƒtj d||j ƒƒtS(NRR9s6»¹Óи߼¶Õ½Áî½±ÀøÎ´ÁìÈ¡! zhanlingType=%s,rewardIndex=%ss6»¹ÓÐÆÕͨսÁî½±ÀøÎ´ÁìÈ¡! zhanlingType=%s,rewardIndex=%ss6»¹ÓÐÃâ·ÑÕ½Áî½±ÀøÎ´ÁìÈ¡! zhanlingType=%s,rewardIndex=%ss'ÉèÖÃÕ½ÁîÒÑÈ«²¿ÁìÈ¡Íê±Ï! zhanlingType=%s(R R R R<RR;R>RBRR?R.RRRAR-R@R/RRR
RR(RRRGRJRL((smD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerZhanling.pyR-s(  . . . & cCsö|dkr5tjdi|d6tƒ}|s5dSng}xÜ|D]Ô}|jƒ}tjƒ}|jƒ|jƒ|_    t
j |t j |t|gƒr dnd|_t
j |t j|t|gƒrÐdnd|_t
j |t j|t|gƒrdnd|_|j|ƒqBWtjƒ}|jƒ||_|jt jƒtd|ƒ@r^dnd|_|jt jƒtd|ƒ@rŒdnd|_|jt j|ƒ|_|jt j|ƒ|_||_ t!|j ƒ|_"t#j$||ƒdS(NRR9iii(%tNoneRR;R<R>tChPyNetSendPackt tagMCZhanlingtClearR=t    NeedValueRR?R R/tFreeRewardStateR-t ZLRewardStateR.tZLRewardStateHRCttagMCZhanlingInfoR9R RRt
IsActiviteR t IsActiviteHR t AllFinishTimeR*tValue1t
RewardListtlent RewardCountt NetPackCommont SendFakePack(RRRGt
rewardListRJRLtrewardt
clientPack((smD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerZhanling.pyRKs2    
000 
    ..    i    ("ReRR‰RRRzRkRoRiR2R RR,RR]R_RaRhtZhanlingType_ArenaCnttZhanlingType_WeekActivityRbRdR)RRR'RyRR+RXRZRxRR(((smD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerZhanling.pyt<module>s.            +              ! *    0         S