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
ìñ?ic@s?ddlZddlZddlZddlZddlZddlZddlZddlZddlZddl    Z    ddl
Z
d„Z e d„Z d„Zd„Zd„Ze e d„Ze e d„Zd    „Zd
„Zgd „Zd „Ze d „Zge d„Zd„Zded„Zged„ZdS(iÿÿÿÿNcCstj|tj|ƒS(N(t    GameWorldtGetDictValueByBittChConfigtDef_PDict_SuccessAward(t    curPlayertsuccID((slD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerSuccess.pyt GetSuccHasGotscCstj|tj||ƒdS(N(RtSetDictValueByBitRR(RRthasGot((slD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerSuccess.pyt SetSuccHasGot!scCsK|s dn"tt|ƒƒjddƒdd!}|jtj||fƒS(Nts iiÿÿÿÿ(tstrtlisttreplacetNomalDictGetPropertyRtDef_PDict_SuccessValue(RtsuccTypetcondst    condition((slD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerSuccess.pyt GetSuccValue&s1cCsU|s dn"tt|ƒƒjddƒdd!}tj|tj||f|ƒdS(NR
s iiÿÿÿÿ(R R R t PlayerControltNomalDictSetPropertyRR(RRRtvalueR((slD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerSuccess.pyt SetSuccValue)s1 cCst|ƒt|ƒdS(N(tSyncSuccessInfotSyncSuccessAwardRecord(R((slD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerSuccess.pyt SuccOnLogin.s
 
cCs(x!|D]}t||||ƒqWdS(N(tResetSuccessByType(Rt succTypeListt ignoreFinishtisNotifyR((slD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerSuccess.pytResetSuccessByTypes3s c
Csýtjd|ƒ}|sdSg}g}x™|D]‘}|jƒ}|r\t||ƒr\q/n|jƒ}    t|||    dƒt||dƒ|j|ƒ||    g|kr/|j||    gƒq/q/W|rù|oßt||t    ƒ|oõt
||t    ƒndS(NtSuccessi( t IpyGameDataPYtGetIpyGameDataListNotLogt    GetSuccIDRt GetConditionRR    tappendRtTrueR(
RRRRt ipyDataListt
succIDListtsyncTypeCondListtipyDataRR((slD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerSuccess.pyR9s&    cCsÎi}|jƒjtjƒ}x–tjD]‹}|d}|dks(||jƒkr\q(n|j|ƒ}| s(|jƒr„q(n|j    ƒ}|f}|j
|dƒd||<q(Wt |t j |ƒdS(Nii(tGetItemManagertGetPackt IPY_GameWorldtrptEquipRtDef_MainEquipPlacestGetCounttGetAttIsEmptyt GetItemColortgett!UpdateSuccessProgressByConditionst ShareDefinetSuccType_OSAEquipColor(RtcolorCountDictt    equipPackt
equipPlacet
equipIndextcurEquipt    itemColortcondKey((slD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerSuccess.pytUpdateEquipSuccessOs
     cCsA|tjkr+tj|ƒdkr+dSntjd|ƒ}|sGdSg}g}i}x'|jƒD]\}}g}    x|D]ü}
|
jƒ} |
jƒ} |
j    ƒ} t
| ƒ}||kr×| ddg||<n||}|d| krþ| |d<nt ||
t |ƒƒsqn| |krE|j | ƒ|j |
ƒn||    kr|    j |ƒ||d|||d<qqWqfW|sdSg}x‘|jƒD]ƒ\} }}|s»q nt||ƒ}t||| ƒ|krèq nt||| |ƒ|| g|kr |j || gƒq q W|o<t||tƒdS(NiR ii(R6tOSASuccTypeListtOpenServerActivitytGetOSACelebrationStateR!R"titemsR#R$t
GetNeedCntttuplet__CheckCanAddSuccessR R%tvaluestminRRRR&(Rt successTypetconditionCountDictR't    updIDListtupdsuccDataListtupdConditionDictRtnewCountt addCondListR*RRtneedCntt    tupleCondtupdInfoR)tupdCnttmaxCnt((slD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerSuccess.pyR5bsV      
     %cCsÉ|tjkr+tj|ƒdkr+dSntjd|ƒ}|sGdSd}x?|D]7}t|||ƒsrqTnt|||j    ƒƒ}PqTW|dks§||kr«dSt
|||||t ƒdS(NiR ( R6R@RARBR!R"tNoneRFRR$tDoAddSuccessProgresstFalse(RRItnewCntRR'tcurCntR*((slD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerSuccess.pytUptateSuccessProgress s  c
Csˆ|jƒ}t||ƒrdS|jƒ}|jƒ}|sAtS|sKdS|tjkrq|d|kr„dSn|tjkr±|d|do§|d|ddks„dSnÓt|ƒt|ƒkrÍdS|tj    krï||kr„dSn•t
}g}|tj krtj |}nx]t |ƒD]O\}}    ||kr\|    ||kr\t}Pq\n|    ||kr't}Pq'q'W|r„dStS(Ni( R#Rt GetSuccTypeR$R&R6tContainSuccessTypeListtMultipleSuccessTypeListtlentUnDownCheckSuccessTypeListRWtPartUnDownCheckSuccessTypeInfot    enumerate(
RR*RRRIRtisbreaktundowncheckIndexListtitnum((slD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerSuccess.pyRF¶sF   *  cCs¼|sF||jtjƒtjtjkr0dS|jtj|ƒn|jƒ}|tjkredStjj|ƒ}x>|j    ƒD]0\}}t
||d|t |dƒt ƒq„WdS(Nii( t GetTickByTypeRtTYPE_Player_Tick_SuccesstTYPE_Player_Tick_Timet SetTickByTypetGetIDt
PyGameDatatg_delaySuccessDicttpopRCRVR RW(RtticktisFinishtplayerIDt successDictt
sucessInfotcnt((slD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerSuccess.pytFinishDelayAddSuccessProgressës (cCsJtjƒrdS|jƒ}|rž|tjkrAitj|<n|t|ƒf}|tj|krz|tj||<n tj|||tj||<dS|r×t|ƒtgƒkr×tjdt|fƒdS|tj    krêdS|tj
krt j |ƒdkrdSnt jd|ƒ}|sBtjd|ƒdSd}g}    xo|D]g}
t||
|ƒssqUn|
jƒ} | |    kr›|    j| ƒn|
jƒ} || krU| }qUqUW|     sÓ|dkr×dSg} xY|    D]Q} t||| ƒ}t|||ƒ}t||| |ƒ| j|| gƒqäWt|| ƒdS(Ns1DoAddSuccessProgress type=%s, condition=%s ´íÎó£¡iR sÕÒ²»µ½³É¾ÍÊý¾ÝsuccessType=%si(Rt IsCrossServerRjRkRlREttypetErrLogR6tSuccessTypeListR@RARBR!R"tDebugLogRFR$R%RDRRHRR(RRItaddCntRt    delayCalcRpt successTupleR'RTtupdConditionListR*RRPR)RYRS((slD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerSuccess.pyRVsX           c
CsÁtjdi|d6ƒ}|s#dSt||ƒrGtjd|ƒdS|jƒ}|jƒ}|jƒ}t|||ƒ}||kr­tjd|||||fƒdSt    ||ƒt
||gt ƒ|j ƒ}d}g}    i}
x¯|D]§} | d \} } t | ƒdkr$| dnd}|r@i|tj6ni}tj|| | |ddtigd    |ƒsyqòn|    j| | |gƒ||
| <qòWtj||    dd
i|
d 6ƒdS( NR tSuccIDs¸Ã³É¾Í½±ÀøÒѾ­ÁìÈ¡¹ý! succID=%ss=¸Ã³É¾ÍδÍê³É! succID=%s,succType=%s,conds=%s,curValue=%s < %siiteventt SuccessAwardt setAttrDicttdataExt appointInfo(R!tGetIpyGameDataByConditionRRRyR[R$RDRR    RR&tGetAwardItemListR^R6tDef_CItemKey_AppointIDt ItemControlertGivePlayerItemRWR%tNotifyGiveAwardInfo(RRR*RRRPtcurValuet awardItemListt isAuctionItemtnotifyAwardListRƒtitemInfotitemIDt    itemCountt    appointIDR((slD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerSuccess.pytGetSuccessAward9s:        "- c Cs]|sŠg}tjƒ}xot|jƒƒD]X}|j|ƒ}|jƒ}|jƒ}||g}||krvq+n|j|ƒq+Wng}    x…|D]}\}}t|||ƒ}
| rÎ|
dkrÎq—nt    j
ƒ} || _ || _ t | j ƒ| _|
| _|    j| ƒq—W|    s"dSt    jƒ} |    | _t | jƒ| _tj|| ƒdS(Ni(R!tIPY_DatatrangetGetSuccessCounttGetSuccessByIndexR[R$R%RtChPyNetSendPackttagSCSuccessInfotSuccTypetCondsR^tCLentCurValuettagSCSuccessInfoListtSuccessInfoListtCountt NetPackCommont SendFakePack( RR)t
isSendZerot
ipyDataMgrtindexR*RRttcListtsuccessInfoListRŠtsuccInfot
clientPack((slD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerSuccess.pyR`s:                       cCsF|rFg}x†|D],}|d}||kr|j|ƒqqWnOtjƒ}|jƒ}|shdS|j|dƒjƒ}t|ddƒ}g}    xc|D][}
|jtj    |
ƒ} | rÒ| rÒq¢nt
j ƒ} |
| _ | | _ |    j| ƒq¢W|    s dSt
jƒ} |    | _t| jƒ| _tj|| ƒdS(Nii(R%R!R“R•R–R#txrangeRRRR—ttagSCSuccessAwardRecordt RecordIndextRecordttagSCSuccessAwardRecordListt
RecordListR^t    RecordCntR R¡(RR(t
isSyncZerotrecordIndexListRt recordIndexR£tsuccCntt    maxSuccIDt
recordListRdt awardRecordt
recordInfoR¨((slD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerSuccess.pyR†s8 
                  (RRR6R RRAR—R-R‡R!RkRR&R    RRRRRR?R5RZRFRtRVR’RURWRR(((slD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerSuccess.pyt<module>s4                                    >     5 9    '&