cehua_ZWJ
2019-01-30 6afaa4408f4e09e3e95dbd92f0d1cd5a1fb2942b
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
xM\c@s<ddlZddlZddlZddlZddlZddlZddlZddlZddlZddl    Z    ddl
Z
ddl Z ddl Z e dƒ\ZZd„Zed„Zd„Zd„Zdd„Zed    „Zd
„Zd „Zd „Zd „Zd„Zgd„Zd„Zd„ZdS(iÿÿÿÿNicCst|ƒdS(N(tSync_AttrFruitEatCnt(t    curPlayer((soE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerAttrFruit.pytAttrFruitOnLogin6s
cCs*|rtjd|ƒStjd|ƒSdS(Nt    AttrFruit(t IpyGameDataPYtGetIpyGameDatatGetIpyGameDataNotLog(titemIDt    isShowLog((soE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerAttrFruit.pytGetAttrFruitIpyData;sc
Csitjƒ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|rei|d6}t!j"|t#j$|tj%|ƒ|j&t#j'd    ƒndS(
Nis4δ´ïµ½Ê¹ÓøöÊýÉÏÏÞ£¬²»¿É»ØÊÕ£¡eatCnt=%s,maxEatCnt=%stGUIDtItemIDt    ItemCounttIndexsW»ØÊÕ»êʯ itemID=%s,maxEatCnt=%s,eatCnt=%s,recycleCount=%s,recycleMoney=%s,totalMoney=%strecycleItemListi((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_UseItemtSync_MakeItemAnswertDef_mitRecycleAttrFruit(tindextpackDatattickRt    indexListtrecycleCountListt
totalMoneyRtbackPacktit    itemIndext recycleCounttcurItemRtipyDatat    maxEatCntt    eatCntKeyt    limitTypeteatCntt recycleMoneyt addDataDict((soE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerAttrFruit.pytOnRecycleAttrFruitKsT        
         /    ' 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(R6R7R8Rt    funcIndext addValueDicttcurPackR=titemRtaddValuet    hasUseCnttitemidRA((soE:\SnxxServerCode\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    RPRTRORRURVR-(RR@tuseCntRRARWR[R\((soE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerAttrFruit.pytDoPlayerEatFruitItem¶s  
 cCs |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||
| ƒ|tjkrztj|tj| |jƒgƒntj||| tt    jƒ| | fS(Nis"¸ÃÊôÐÔ¹ûʵ¹¦ÄÜ먦·Å£¡funcIndex=%ss:ʹÓÃÊôÐÔ¹ûʵ itemID=%s,limitType=%s,maxEatCnt=%s,eatCnt=%ss+    ÒÑ´ïµ½¸ÃµÈ¼¶¶Î×î´ó¸öÊý/ÊôÐÔ£¬²»¿ÉʹÓã¡i(ii(RR    RTR#R R1RJRRKR!R"R$R%R&R'RLR/tNomalDictSetPropertytDef_AttrFruitFunc_Stovet PlayerSuccesstDoAddSuccessProgresstSuccType_UseStoveBylvtGetLVRR,R-R.(RRZR`t    isShowMsgRt DefaultReturnRARWRDRBRCRER\R[t_tcurValue((soE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerAttrFruit.pyROÑsD            
 
 %cCsw|tjkr"tj|tƒnQ|tjkrAtj|ƒn2|tjkrst    j
|ƒt j |ƒj ƒndS(N( R1tDef_AttrFruitFunc_Pett    PlayerPettRefreshPetItemAddAttrR-tDef_AttrFruitFunc_Horset PlayerHorsetRefreshHorseAttrRctPlayerRefineStovet CalcStoveAttrR/tRefreshPlayerAttrState(RRW((soE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerAttrFruit.pyRVs c Cs¥|dkrdStjƒj|ƒ}|s/dSt}tj|}|j|ƒ}t|ƒ}|sidn    |jƒ}    ||    |}|j    ||ƒtj
d||    ||fƒxît |j ƒƒD]Ú}
|j |
ƒ} | jƒ} | sÃ| tjkrqÃntj|| f} |j| ƒ}| jdƒ}| jdƒ}|tkr]|||}n
||}|j    | |ƒtj
d|| |||||fƒqÃWdS(NiisC    Add funcIndex=%s,addFightPowerEx=%s,addValue=%s,fightPowerEx=%ssJ    Add funcIndex=%s,effID=%s,curValue=%s,effA=%s,effB=%s,count=%s,updV=%s(Rt GetGameDatatGetItemByTypeIDR#R!tDef_PlayerKey_FruitFightPowerExt GetDictByKeyR    tGetFightPowerExtSetDictR'RLtGetEffectCounttGetEffectByIndext GetEffectIDtItemEffect_AttrDicttDef_PlayerKey_FruitAttrtGetEffectValue(Rt fruitItemIDRWR[titemDataRDtfightPowerExfigKeyt fightPowerExt fruitIpyDatataddFightPowerExR=t    curEffectteffectIDtattrKeyRkt    effValueAt    effValueBtupdValue((soE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerAttrFruit.pyRU!s:     
    !c Csç|jtjƒ}|rdStjdƒtjƒ}|jƒ}xŒt|ƒD]~}|j    |ƒ}|j
ƒ}|j ƒ}t }tj |}    |tkrªtj|}    n|j|    ƒ}
t||||
ƒqNW|jtjdƒdS(Nt__InitPlayerAttrFruiti(RxR!tDef_PlayerKey_HadInitFruitAttrRR'RtIPY_DatatGetAttrFruitCounttxrangetGetAttrFruitByIndextGetIDRTR#R"R$R%R&RURz( RthadInitt
ipyDataMgrtmaxCntR=RARRWRDRCRE((soE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerAttrFruit.pyRNs$       cCsŽt|ƒxgtjD]\}t|tƒs/qntj||f}|j|ƒ}|s]qntj|||ƒqW|jtj    |ƒ}|S(N(
RR!R~t
isinstancetintRRxR/tCalcAttrDict_TypeRw(Rt allAttrListRWRˆR‰R[R„((soE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerAttrFruit.pytCalcAttrFruitAddAtrrks
c CsÐtj||f}|j|ƒ}|dkr2dStjj|gƒ}|gkrWdS|d}xh|D]`}xW|jƒD]I\}    }
|    |kr™q{nt|
|tjƒ} |
| } | ||    <q{WqhWt    S(Ni(
R!RRxR~RQRSR˜R1tDef_MaxRateValueR-( RRWteffPerIDRšt
attrPerKeytaddPertattrInfot addAttrListtattrDictt    attrIndext    attrValuet addPerValueRŒ((soE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerAttrFruit.pytAddFuncPerValue†s   
 
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=RARRRCt
eatCntPack((soE:\SnxxServerCode\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=RARRCRE((soE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerAttrFruit.pytGetAttrFruitEatCntDictÌs     cCstt|ƒ}|sdS|jƒ}tj|}t}|tkrQtj|}n|j|ƒ}||krptSdS(N(    R    R R!R"R#R$R%R&R-(RRRARBRCRDRE((soE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerAttrFruit.pytIsFruitEatFullás     (R®R§R/R1RRpRR!RRRmRrRdRLR#R$RR-R    RHR^RaRORVRURR›R¦RRµR¶(((soE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerAttrFruit.pyt<module>s6                      ?    ,  B        -            " $