cehua_lgq
2018-08-10 0dbedbc2c2023bb8d4fb7f9da675dfe256a72c42
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
ýg[c@s3ddlZddlZddlZddlZddlZddlZddlZddlZddlZddl    Z    ddl
Z
ddl Z ddl Z e dƒ\ZZd„Zed„Zd„Zd„Zdd„Zed    „Zd
„Zd „Zd „Zd „Zd„Zgd„Zd„ZdS(iÿÿÿÿNicCst|ƒdS(N(tSync_AttrFruitEatCnt(t    curPlayer((sn.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerAttrFruit.pytAttrFruitOnLogin6s
cCs*|rtjd|ƒStjd|ƒSdS(Nt    AttrFruit(t IpyGameDataPYtGetIpyGameDatatGetIpyGameDataNotLog(titemIDt    isShowLog((sn.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerAttrFruit.pytGetAttrFruitIpyData;sc
CsVtjƒj|ƒ}|j}|j}| sFt|ƒt|ƒkrJdSd}g}|jƒjtj    ƒ}x¬t
|ƒD]ž\}    }
||    } |j |
ƒ} t j | ƒsµq{nt| | jƒƒ} | dkrÜq{n| jƒ} t| ƒ}|sq{n|jƒ}tj| }t}|tkr;tj| }n|j|ƒ}||kr|tjd||f|jƒƒq{n|jƒ}|s”q{n||| 7}|ji| jƒd6| d6| d6|
d6ƒt j|| | ttj ƒtjd| ||| ||f|jƒƒq{W|rRi|d6}t!j"|t#j$|tj%|ƒndS(    Nis4δ´ïµ½Ê¹ÓøöÊýÉÏÏÞ£¬²»¿É»ØÊÕ£¡eatCnt=%s,maxEatCnt=%stGUIDtItemIDt    ItemCounttIndexsW»ØÊÕ»êʯ itemID=%s,maxEatCnt=%s,eatCnt=%s,recycleCount=%s,recycleMoney=%s,totalMoney=%strecycleItemList(&t    GameWorldtGetPlayerManagertGetPlayerByIndext    IndexListtRecycleCountListtlentGetItemManagertGetPackt IPY_GameWorldtrptItemt    enumeratetGetAtt
ItemCommontCheckItemCanUsetmintGetCountt GetItemTypeIDR    t GetMaxUseCnttChConfigtDef_PDict_AttrFruitEatCnttDef_LimitType_CnttDef_LimitType_AttrtDef_PDict_AttrFruitAddValuetNomalDictGetPropertytDebugLogt GetPlayerIDtGetRecycleMoneytappendtGetGUIDtDelItemtTruetItemDel_AttrFruitt PlayerControlt    GiveMoneyt ShareDefinetTYPE_Price_DanjingtDef_GiveMoney_UseItem(tindextpackDatattickRt    indexListtrecycleCountListt
totalMoneyRtbackPacktit    itemIndext recycleCounttcurItemRtipyDatat    maxEatCntt    eatCntKeyt    limitTypeteatCntt recycleMoneyt addDataDict((sn.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerAttrFruit.pytOnRecycleAttrFruitKsR        
         /    ' "cCs†tjƒj|ƒ}|j}|tjkr>tjdƒdSi}|jƒjt    j
ƒ}x t |j ƒƒD]Œ}|j |ƒ}|dkso|jƒr¢qon|jƒ}    t|||j ƒtƒ\}
} |
dkráqon|j|    dƒ|
||    <qoWtjd|ƒ|sdSt||jƒƒxE|jƒD]7\} }
t| ƒ} | jƒ}t|| ||
ƒq:Wt||ƒdS(Ns¸ÃÊôÐÔ¹ûʵ¹¦ÄÜ먦·Å£¡is"OnEatAllFruitItem addValueDict=%s!(RRRt    FuncIndexR1tDef_AttrFruitFuncListtErrLogRRRRtrangeRRtNonetIsEmptyRt__DoEatFruitItemtFalsetgetR'RtkeystitemsR    t    GetFuncIDt__AddFruitAttrt __RefreshAttr(R4R5R6Rt    funcIndext addValueDicttcurPackR;titemRtaddValuet    hasUseCnttitemidR?((sn.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerAttrFruit.pytOnEatAllFruitItem‰s4      !    icCs¢|jƒ}td|ƒ}t|tƒ}|s4dS|jƒ}t|||ƒ\}}|sht|fSt||gƒt||||ƒt||ƒt    |fS(Niiÿÿÿÿ(
RtmaxR    RNRRRMRRSRTR-(RR>tuseCntRR?RURYRZ((sn.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerAttrFruit.pytDoPlayerEatFruitItemµs  
 cCsl|jƒ}d}t|ƒ}|s(|S|jƒ}t}|jƒ}    |tjkrjtjd|ƒ|St    j
|}
|t kr“t    j |}
n|j |
ƒ} tjd|||    | fƒd} d} xUt|ƒD]G}| |    krûtjdƒPnd}| |7} | d7} | |7} qØW| dkr3|Stj||
| ƒtj||| tt    jƒ| | fS(Nis"¸ÃÊôÐÔ¹ûʵ¹¦ÄÜ먦·Å£¡funcIndex=%ss:ʹÓÃÊôÐÔ¹ûʵ itemID=%s,limitType=%s,maxEatCnt=%s,eatCnt=%ss+    ÒÑ´ïµ½¸ÃµÈ¼¶¶Î×î´ó¸öÊý/ÊôÐÔ£¬²»¿ÉʹÓã¡i(ii(RR    RRR#R R1RHRRIR!R"R$R%R&R'RJR/tNomalDictSetPropertyRR,R-R.(RRXR^t    isShowMsgRt DefaultReturnR?RURBR@RARCRZRYt_tcurValue((sn.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerAttrFruit.pyRMÐs@            
 
 cCsw|tjkr"tj|tƒnQ|tjkrAtj|ƒn2|tjkrst    j
|ƒt j |ƒj ƒndS(N( R1tDef_AttrFruitFunc_Pett    PlayerPettRefreshPetItemAddAttrR-tDef_AttrFruitFunc_Horset PlayerHorsetRefreshHorseAttrtDef_AttrFruitFunc_StovetPlayerRefineStovet CalcStoveAttrR/tRefreshPlayerAttrState(RRU((sn.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerAttrFruit.pyRTs c Cs*|dkrdStjƒj|ƒ}|s/dSt}xît|jƒƒD]Ú}|j|ƒ}|jƒ}| sH|tj    kr…qHntj
||f}    |j |    ƒ}
|j dƒ} |j dƒ} |tkrâ|
| |} n
|
|} |j |    | ƒtjd|||
| | || fƒqHWdS(NiisJ    Add funcIndex=%s,effID=%s,curValue=%s,effA=%s,effB=%s,count=%s,updV=%s(Rt GetGameDatatGetItemByTypeIDR#RJtGetEffectCounttGetEffectByIndext GetEffectIDR!tItemEffect_AttrDicttDef_PlayerKey_FruitAttrt GetDictByKeytGetEffectValuetSetDictR'(Rt fruitItemIDRURYtitemDataRBR;t    curEffectteffectIDtattrKeyRdt    effValueAt    effValueBtupdValue((sn.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerAttrFruit.pyRSs,   
    !c Csç|jtjƒ}|rdStjdƒtjƒ}|jƒ}xŒt|ƒD]~}|j    |ƒ}|j
ƒ}|j ƒ}t }tj |}    |tkrªtj|}    n|j|    ƒ}
t||||
ƒqNW|jtjdƒdS(Nt__InitPlayerAttrFruiti(RvR!tDef_PlayerKey_HadInitFruitAttrRR'RtIPY_DatatGetAttrFruitCounttxrangetGetAttrFruitByIndextGetIDRRR#R"R$R%R&RSRx( RthadInitt
ipyDataMgrtmaxCntR;R?RyRURBRARC((sn.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerAttrFruit.pyRBs$       cCsxt|ƒxgtjD]\}t|tƒs/qntj||f}|j|ƒ}|s]qntj|||ƒqWdS(N(    RR!Rtt
isinstancetintRuRvR/tCalcAttrDict_Type(Rt allAttrListRUR|R}RY((sn.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerAttrFruit.pytCalcAttrFruitAddAtrr_s
c CsÐtj||f}|j|ƒ}|dkr2dStjj|gƒ}|gkrWdS|d}xh|D]`}xW|jƒD]I\}    }
|    |kr™q{nt|
|tjƒ} |
| } | ||    <q{WqhWt    S(Ni(
R!RuRvRtRORQRŒR1tDef_MaxRateValueR-( RRUteffPerIDRŽt
attrPerKeytaddPertattrInfot addAttrListtattrDictt    attrIndext    attrValuet addPerValueR€((sn.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerAttrFruit.pytAddFuncPerValueys   
 
c Cstjƒ}|jƒg|_|gkr‹g}tjƒ}|jƒ}xEt|ƒD].}|j|ƒ}|j    ƒ}|j
|ƒqVWn|}x\|D]T}    t j |    }
tj ƒ} | jƒ|    | _|j|
ƒ| _|jj
| ƒq˜Wt|jƒ|_tj||ƒdS(N(tChPyNetSendPackttagMCAttrFruitEatCntListtCleart
EatCntListRRƒR„R…R†R‡R*R!R"ttagMCAttrFruitEatCntR R&tEatCntRtcountt NetPackCommont SendFakePack( RtfruitItemIDListteatPackt
itemidListR‰RŠR;R?RRyRAt
eatCntPack((sn.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerAttrFruit.pyR›s, 
           
    c    CsŒi}tjƒ}|jƒ}xgt|ƒD]Y}|j|ƒ}|jƒ}tj|}|j|ƒ}|dkrzq+n|||<q+W|S(Ni(    RRƒR„R…R†R‡R!R"R&(    Rt
eatCntDictR‰RŠR;R?RyRARC((sn.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerAttrFruit.pytGetAttrFruitEatCntDict¿s     (R¢R›R/R1RRiRR!RRRfRlt PlayerSuccessRJR#R$RR-R    RFR\R_RMRTRSRRRšRR©(((sn.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerAttrFruit.pyt<module>s4                      >    ,  @        $            " $