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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
h/²ic@sddlZddlZddlZddlZddlZddlZddlZddlZddlZddl    Z    ddl
Z
ddl Z ddl Z ddl Z ddlZedd!ƒ\ZZZZZZZZdZdZedd"ƒ\ZZZZZd„Zd„Z d„Z!d    „Z"d
„Z#d „Z$d „Z%d „Z&d„Z'd„Z(d„Z)dd„Z+d„Z,d„Z-d„Z.d„Z/d„Z0d„Z1d„Z2d„Z3d„Z4d„Z5d„Z6d„Z7d„Z8d„Z9ddd „Z:dS(#iÿÿÿÿNiiiicCst|ƒdS(N(tSyncBeautyInfo(t    curPlayer((skD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerBeauty.pyt OnPlayerLogin;s
cCs|jtj|ƒdS(Ni
(tNomalDictGetPropertytChConfigtDef_PDict_BeautyLVInfo(RtbeautyID((skD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerBeauty.pytGetBeautyState@scCsO|jtj|ƒ}|ddtd|ƒ}tj|tj||ƒ|S(Ni
i(RRRtmint PlayerControltNomalDictSetProperty(RRtstatetlvInfo((skD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerBeauty.pytSetBeautyStateCscCs8|jtj|ƒ}|d}|dd}||fS(Ni'i
(RRR(RRR texptlv((skD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerBeauty.pytGetBeautyLVInfoIs
cCs`|jtj|ƒ}t|dƒdt|dƒd|d}tj|tj||ƒ|S(Ni@ i'içi
(RRRRR    R
(RRRRR ((skD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerBeauty.pytSetBeautyLVInfoOs,cCs|jtj|ƒdS(Ni
(RRtDef_PDict_BeautySkinInfo(RtskinID((skD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerBeauty.pytGetBeautySkinStateVscCsO|jtj|ƒ}|ddtd|ƒ}tj|tj||ƒ|S(Ni
i(RRRRR    R
(RRR tinfo((skD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerBeauty.pytSetBeautySkinStateYscCs|jtj|ƒddS(Nidi
(RRR(RR((skD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerBeauty.pytGetBeautySkinUsed^scCs[|jtj|ƒ}|ddtd|ƒd|d}tj|tj||ƒ|S(Nidii
(RRRRR    R
(RRtisUsedR((skD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerBeauty.pytSetBeautySkinUsedas'cCs|jtj|ƒdS(Nid(RRR(RR((skD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerBeauty.pytGetBeautySkinStarfscCsF|jtj|ƒ}|d|d}tj|tj||ƒ|S(Nid(RRRR    R
(RRtstarR((skD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerBeauty.pytSetBeautySkinStariscCsWt||ƒrtS|s.t|||ƒ}n|rS|jƒ}|tkrStSntS(N(RtTruetGetBeautySkinIpyDatat GetUnlockWaytUnlockWaySkin_DefaulttFalse(RRRtipyDatat    unlockWay((skD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerBeauty.pytIsBeautySkinCanUseos  cCsŠtjƒj|ƒ}|jƒ}|j}t||ƒrQtjd||ƒdStjd|ƒ}|smdS|j    ƒ}|j
ƒ}|j ƒ}    |t kr$|}
|    } t j||
| ƒ\} } }| | |}|dkrtjd||
| |f|ƒdSt j|| | || dƒnU|tkri|}tj||ƒsytjd||f|ƒdSn|tkr½|    }|jtjƒ}||krytjd|||f|ƒdSn¼|tkr|    }tj|ƒ}||krytjd|||f|ƒdSnk|tkrhtj}|}tj|||ƒ}|sytjd|||f|ƒdSn|tkr¹tj |ƒ}|}||krytjd    |||f|ƒdSnÀ|t!kr|j"ƒ}|}||krytjd
|||f|ƒdSnr|t#kr[|jtj$ƒ}|    }||krytjd |||f|ƒdSntjd ||f|ƒdSt%||ƒdS( NsºìÑÕÒѾ­¼¤»î¹ý£¡ beautyID=%stBeautyisE¼¤»îºìÑÕÎïÆ·²»×ã! beautyID=%s,needItemID=%s,needItemCnt=%s,lackCnt=%ss-¼¤»îºìÑÕËùÐèÈÎÎñδÍê³É! beautyID=%s,taskID=%ss:¼¤»îºìÑÕËùÐèÑÝÎ䳡ʤÀû´ÎÊý²»×ã! beautyID=%s,winCnt=%s < %ss5¼¤»îºìÑÕËùÐè¼à¹¤²»×ã! beautyID=%s,workerTotal=%s < %ss:¼¤»îºìÑÕËùÐ踱±¾Î´¹ý¹Ø! beautyID=%s,mapID=%s,funcLineID=%ss;¼¤»îºìÑÕËùÐ趨¾ü¸óͨ¹Ø²ã²»×ã! beautyID=%s,passLayer=%s < %ss1¼¤»îºìÑÕËùÐè¹ÙÖ°²»×ã! beautyID=%s,realmLV=%s < %ss7¼¤»îºìÑÕËùÐèÓÎÀú´ÎÊý²»×ã! beautyID=%s,travelCnt=%s < %ss*¸ÃºìÑÕ²»Ö§³Ö¼¤»î! beautyID=%s,unlockWay=%s(&t    GameWorldtGetPlayerManagertGetPlayerByIndext GetPlayerIDtBeautyIDRtDebugLogt IpyGameDataPYtGetIpyGameDataRtGetUnlockValuetGetUnlockNeedCnttUnlockWay_Itemt
ItemCommontGetPackItemBindStateIndexInfotDelCostItemByBindtUnlockWay_TaskIDt
PlayerTaskt IsTaskFinishtUnlockWay_ArenaWinCntRRtDef_PDict_ArenaWinCnttUnlockWay_GoldRushWorkertPlayerGoldRushtGetWorkerTotaltUnlockWay_FBZhanchuitDef_FBMapID_ZhanchuitFBCommontIsFBPasstUnlockWay_FBDingjungetGameLogic_DingjungetGetPassLayerMaxtUnlockWay_OfficialRanktGetOfficialRanktUnlockWay_TravelCnttDef_PDict_TravelCnttDoBeautyActivate(tindext curPackDatattickRtplayerIDRR"R#t unlockValuet unlockNeedCntt
needItemIDt needItemCnttcostItemIndexListtbindCntt    unBindCnttlackCntttaskIDt
needWinCnttwinCntt needWorkerCntt workerTotaltmapIDt
funcLineIDtisPasst    passLayert    needLayertrealmLVt needRealmLVt    travelCntt needTravelCnt((skD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerBeauty.pytOnBeautyActivate„s†                             cCszt||ƒrdSd\}}t||dƒt||||ƒtjd||jƒƒt|ƒt||gƒdS(NiisºìÑÕ¼¤»î³É¹¦£¡ beautyID=%s(ii(RR RR&R+R)tRefreshBeautyAttrR(RRRR((skD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerBeauty.pyRGØs 
cCsmd}tjƒ}xTt|jƒƒD]@}|j|ƒ}|jƒ}t||ƒs[q%n|d7}q%W|S(Nii(R,tIPY_DatatrangetGetBeautyCounttGetBeautyByIndext GetBeautyIDR(RtactCntt
ipyDataMgrRHR"R((skD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerBeauty.pytGetBeautyActCntäs  cCs€d}tjƒ}xgt|jƒƒD]S}|j|ƒ}|jƒ}t||ƒs[q%nt||ƒd}||7}q%W|S(Ni(R,RdReRfRgRhRR(RtlvTotalRjRHR"RtcurLV((skD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerBeauty.pytGetBeautyLVTotalðs  c Csvtjƒj|ƒ}|jƒ}|j}|j}|j}t||ƒsctjd||ƒdSt    j
d|ƒ}|sdS|j ƒ}    t ||ƒ\}
} t    j ddƒ} t    j ddƒ} || kr| j|ƒ}t| ƒ|krû| |nd}nK|jƒ}||kr=tjd|||f|ƒdSt    jddƒ}|dkr_dS|
d}t    j
d    |    |ƒ}|s¥tjd
||    |
f|ƒdS|jƒ}d}|| }|dkr¦|rý||}||dkr|d7}qnd}|dkrdStj|||ƒ\}}}|||}|dkrx||8}tjd |||||fƒn|dkr¦tj|||||dƒq¦n||}| |}tjd ||    |
| ||||||f
ƒ|
}||kr)||8}|d7}tjd ||fƒnt||||ƒt||gƒ||
krrt|ƒtj|ƒndS(NsºìÑÕδ¼¤»î£¡ beautyID=%sR%t
BeautyLVUPiiis0·Ç¸ÃºìÑÕרÊôÐÅÎïID£¡ beautyID=%s,itemID=%s != %sitBeautyQualityLVs,ºìÑÕÒÑÂú¼¶£¡ beautyID=%s,quality=%s,curLV=%ss[ÏûºÄµÀ¾ß²»×㣬ÓжàÉÙÏûºÄ¶àÉÙ! itemID=%s,costItemCount=%s,bindCnt=%s,unBindCnt=%s,lackCnt=%ssqºìÑÕ¼Ó¾­Ñé: beautyID=%s,quality=%s,curLV=%s,curExp=%s,addExp=%s,updExp=%s/%s,itemID=%s,costItemCount=%s,perExp=%ss    Éý¼¶: updLV=%s,updExp=%s(R&R'R(R)R*tItemIDtIsQuickRR+R,R-tGetBeautyQualityRtGetFuncEvalCfgRHtlentGetExclusiveItemIDt
GetFuncCfgt GetLVNeedExpR1R2R3RRRctOpenServerActivitytUpdOSA_BeautyTrainBillboard(RHRIRJRRKRtitemIDtisQuickR"tqualityRmtcurExptcommItemIDListt commExpListtperExptexclusiveItemIDtnextLVt nextLVIpyDatat    lvNeedExpt costItemCounttneedExpRPRQRRRStaddExptupdExptupdLV((skD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerBeauty.pyt OnBeautyLVUPs€               %   
 
 
 
     "
 
    & 
 
 
cCsöt||ƒs$tjd|ƒdStjd|ƒ}|s@dS|jƒ}t||ƒd}|jtj    |ƒ}||kr¢tjd||||fƒdStjd||||fƒ|}i}xt
|d|dƒD]v}tjd||ƒ}    |    sPn|    j ƒ}
x<|
D]4} | d} | d} |j | dƒ| || <qW|}qãW|sgdSg|j ƒD]\} } | | g^qt}tjd||fƒtj|tj    ||ƒt||gƒtj||d    d
tigƒdS( NsºìÑÕδ¼¤»î£¡ beautyID=%sR%isJµ±Ç°Ã»ÓкìÑյȼ¶½±Àø¿ÉÁìÈ¡£¡ beautyID=%s,quality=%s,awardLV=%s >= curLV=%ss<ÁìÈ¡ºìÑյȼ¶½±Àø: beautyID=%s,quality=%s,curLV=%s,awardLV=%siRps"    updAwardLV=%s,awardItemList=%steventt BeautyLVAward(RR&R+R,R-RsRRRtDef_PDict_BeautyAwardLVRetGetAwardItemListtgettitemsR    R
Rt ItemControlertGivePlayerItemOrMailR!(RRR"R}RmtawardLVt
updAwardLVtitemDicttgetLVt    lvIpyDatatitemListtitemInfoR{t    itemCountt awardItemList((skD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerBeauty.pytGetBeautyLVAwardZsB    
 
 
+cCsÄtjƒj|ƒ}|jƒ}|j}|j}|j}t||ƒsctjd||ƒdS|dkr‚t    |||ƒn>|dkr¡t
|||ƒn|dkrÀt |||ƒndS(NsºìÑÕδ¼¤»î£¡ beautyID=%siii( R&R'R(R)R*tSkinIDtOPTypeRR+tOnBeautySkinActivatetOnUseBeautySkintOnBeautySkinStarUP(RHRIRJRRKRRtopType((skD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerBeauty.pytOnBeautySkinOPŒs                cCsGtjd|ƒ}|sdSx$|D]}|jƒ|kr#|Sq#WdS(Nt
BeautySkin(R,tGetIpyGameDataListt    GetSkinID(RRRt ipyDataListR"((skD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerBeauty.pyRŸs c Cs`t||ƒr*tjd||fƒdSt|||ƒ}|sFdS|jƒ}|jƒ}|jƒ}|tkrú|}|}tj    |||ƒ\}    }
} ||
| } | dkrÛtjd|||| fƒdStj
||    |
| |dƒntjd||fƒdSt ||dƒtjd||fƒt |ƒt ||g|gƒdS(Ns%ºìÑÕÆ¤·ôÒѼ¤»î! beautyID=%s,skinID=%sisI¼¤»îºìÑÕʱװÎïÆ·²»×ã! beautyID=%s,needItemID=%s,needItemCnt=%s,lackCnt=%sR%s)ºìÑÕÆ¤·ô²»ÐèÒª¼¤»î! beautyID=%s,skinID=%sis#ºìÑÕÆ¤·ô¼¤»î: beautyID=%s,skinID=%s(RR&R+RRR.R/tUnlockWaySkin_ItemR1R2R3RRcR( RRRR"R#RLRMRNRORPRQRRRS((skD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerBeauty.pyR ¨s2     
cCsý|jƒ}t|||ƒs<tjd||f|ƒdStjd||f|ƒtjd|ƒ}|srdSg}xk|D]c}|jƒ}||kr°t||dƒn%t||ƒrt||dƒnq|j    |ƒqWt
||g|ƒdS(Ns'¸ÃºìÑÕʱװ²»¿ÉÓÃ! beautyID=%s,skinID=%ss$´©´÷ ºìÑÕʱװ! beautyID=%s,skinID=%sR¥ii( R)R$R&R+R,R¦R§RRtappendR(RRRRKR¨t
skinIDListR"t    ipySkinID((skD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerBeauty.pyR¡És&    cCs­|jƒ}t|||ƒs<tjd||f|ƒdSt|||ƒ}|sXdS|jƒ}t||ƒ}||kr tjd|||f|ƒdS|jƒtkr¶dS|j    ƒ}|j
ƒ}| sÜ| ràdSt j |||ƒ\}    }
} ||
| } | dkr9tjd|||| fƒdSt j ||    |
| |dƒ|d} tjd|| f|ƒt||| ƒt|ƒt||g|gƒdS(Ns'¸ÃºìÑÕʱװ²»¿ÉÓÃ! beautyID=%s,skinID=%ss,ºìÑÕʱװÐǼ¶ÒÑÂú! skinID=%s,curStar=%s >= %sisGºìÑÕʱװÉýÐÇÎïÆ·²»×ã! skinID=%s,needItemID=%s,needItemCnt=%s,lackCnt=%sR%is#ºìÑÕʱװÉýÐÇ! skinID=%s,nextStar=%s(R)R$R&R+Rt
GetStarMaxRRR©R.t GetUpNeedCntR1R2R3RRcR(RRRRKR"tstarMaxtcurStarRNRORPRQRRRStnextStar((skD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerBeauty.pyR¢ßs<      
 
cCs!t|ƒtj|ƒjƒdS(N(tCalcBeautyAttrt PlayerOnlinetGetOnlinePlayertRefreshRoleAttr(R((skD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerBeauty.pyRcs
c&Csí|jƒ}i}i}tjddƒ}tjƒ}x_t|jƒƒD]K}|j|ƒ}|jƒ}t||ƒsqIn|j    ƒ}    t
||ƒd}
xªt|
dƒD]˜} tj d|    | ƒ} | sÖq¯n| j ƒ} | j ƒ}xVt| ƒD]H\}}t|ƒ|kr#||nd}|j|dƒ|||<qûWq¯W|jƒ}|jƒ}|jƒ}|
|}x†t|ƒD]x\}}t|ƒ|kr®||nd}t|ƒ|krÐ||nd}|||}|j|dƒ|||<q†W|jƒ}|jƒ}|jƒ}|jƒ}|r‚|||}||kred|g||<n||d|||d<ntjd|ƒ}|s qInxñ|D]é}|jƒ}t||||ƒsÔq§n|j ƒ} |jƒ}!|jƒ}"t||ƒ}#x†t| ƒD]x\}$}t|!ƒ|$kr<|!|$nd}t|"ƒ|$kr^|"|$nd}%||%|#}|j|dƒ|||<qWq§WqIWtjd||ƒtjd||ƒ|t j!|<t"j#|ƒj$t%j&|ƒdS(    NRoiiiRpR¥s ºìÑÕÊôÐÔ: %ss ºìÑÕЧ¹û: %s('R)R,RwRdReRfRgRhRRsRR-t GetAttrIDListtGetAttrValueListt    enumerateRuRtGetTalentAttrIDListtGetTalentAttrValueListtGetTalentPerLVAddListt
GetEffTypetGetEffTypeValuet GetEffValuetGetEffPerLVAddR¦R§R$tGetInitAttrValueListtGetAttrPerStarAddListRR&R+t
PyGameDatatg_beautyEffTypeDictR³R´t SetCalcAttrRtDef_CalcAttr_Beauty(&RRKtattrDictt effTypeDictt talentLVUPPerRjRHR"RR}tbeautyLVRR˜t lvAttrIDListtlvAttrValueListtlvIndextattrIDt    attrValuettalentAttrIDListttalentAttrValueListttalentPerLVAddListttalentLVttIndext    initValuetperLVAddteffTypet effTypeValueteffValuet effPerLVAddR¨t skinIpyDataRt
attrIDListtinitAttrValueListtperStarAddListRtsIndext
perStarAdd((skD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerBeauty.pyR²sx      ""   
""          ""& cCs1tjj|jƒiƒ}|j|ddgƒS(Ni(RÂRÃRR)(RRÖRÇ((skD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerBeauty.pytGetBeautyEffInfoUscCs6|dkr`g}tjƒ}xEt|jƒƒD](}|j|ƒ}|j|jƒƒq1Wn|}g}x‚|D]z}t||ƒ}    |     r¡|dkr¡qsnt    ||ƒ\}
} t
j ƒ} || _ |    | _ |
| _| | _|jtj|ƒ| _g| _tjd|ƒ} | rÎx«| D] }|jƒ}|dkrZ||krZq'qZnt
jƒ}||_t||||ƒrŠdnd|_ t||ƒ|_t||ƒ|_| jj|ƒq'Wnt| jƒ| _|j| ƒqsW|sûdSt
j ƒ}||_!t|j!ƒ|_"t#j$||ƒdS(NR¥ii(%tNoneR,RdReRfRgRªRhRRtChPyNetSendPackt tagSCBeautyR*tStatetLVtExpRRRŽtAwardLVtSkinListR¦R§ttagSCBeautySkinRžR$RtUsedRtStarRutSkinCntttagSCBeautyInfot
BeautyListtCountt NetPackCommont SendFakePack(Rt beautyIDListR«tsyncBeautyIDListRjRHR"t
beautyListRR RRtbeautyR¨Rt
beautySkint
clientPack((skD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerBeauty.pyR[sT                                     $     i    i(;RR&R1R³R    R,RâRyRAR:RðR’RÂR5R>ReR0R4R7R9R<RCRER@R R©tEffType_BootyPertEffType_ArenaItemExtEffType_TravelEnergytEffType_FBZhanchuiItemExtEffType_HeroItemExPerRRR RRRRRRRRRáR$RbRGRkRnR‹RR¤RR R¡R¢RcR²RàR(((skD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerBeauty.pyt<module>sZ               '                                                     T                  T    2                !        "        O