hwj35
2025-06-23 aa0f971ae9a59f0fd98d57b6c1d1663a270be92c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
8öCgc@sŸdZddlZddlZddlZddlZddlZddlZddlZdefd„ƒYZ    dd    d„ƒYZ
da d„Z d„ZdS(
sVersion = 2015-08-12 16:00iÿÿÿÿNt ExpandPackCfgcBsDeZd„Zd„Zd„Zd„Zd„Zdgd„ZRS(cCsHi|_i|_||_||_|||_||_|jƒdS(N(t_ExpandPackCfg__cfgInfot)_ExpandPackCfg__totalAddAttrInfoWithCountt_ExpandPackCfg__defCountt_ExpandPackCfg__maxCountt_ExpandPackCfg__canAddCountt_ExpandPackCfg__cfgNamet_ExpandPackCfg__LoadCfg(tselftcfgNametdefCounttmaxCount((svE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerExpandPackCfgMgr.pyt__init__(s                     c    Cs4tj|jƒ}d|kr"dS||_t|jƒ}igd6}xætd|jƒD]Ò}|d}}||krƒ|}n|jj|iƒ}xf|j    ƒD]X}|dkr×||j
|j|dƒƒq¥|j|dƒ|j|dƒ||<q¥W|j j |ƒsZt j|ƒ|j |<qZqZWdS(NtExpiit0(t ReadChConfigtGetEvalChConfigRtNoneRtlentrangeRtgettiterkeystappendRthas_keytcopytdeepcopy(    RtcfgInfotcfgCountt    totalDicttitcounttindext gridCfgInfotkey((svE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerExpandPackCfgMgr.pyt    __LoadCfg5s"             *cCs|jS(N(R(R((svE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerExpandPackCfgMgr.pytGetCanAddCountSscCs7t|jƒ}||kr$|}n|jj|dƒS(N(RRRR(RtbuyIndexR((svE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerExpandPackCfgMgr.pytGetAttrInfoByInexVs     cCs|jj|dƒS(N(RRR(RtbuyCount((svE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerExpandPackCfgMgr.pytGetTotalAddAttrInfoByCount`sR cCs|dks|dkr)tjdƒdS||jkrItjdƒdS||krftjdƒdS||kr t|jƒ}||kr–|}n|jj|iƒ}i}xT|D]L}|dkrötj|ƒ}    t    ||ƒ}
|
||<q¸||||<q¸W|S|j
|ƒ} |j
|dƒ} | dksF| dkratjd||gƒdSd|kr|| j ƒ}ni}x…|D]}}|dkrðtj|ƒ}    | ||d} d}
x| D]}|
t    |ƒ7}
qÉW|
||<q‰| || |||<q‰W|S(    Nis5GetTotalCanAddAttrInfo fromIndex <= 0 or toIndex <= 0s3GetTotalCanAddAttrInfo toIndex > self.__canAddCounts*GetTotalCanAddAttrInfo fromIndex > toIndexR is GetTotalCanAddAttrInfo NoData %stall( t    GameWorldtErrLogRRRRRt PlayerControltGetPlayerReExptevalR'tkeys(Rt    curPlayert    fromIndexttoIndextattrListRtfindInfotretInfotattrtReExptaddExpttoInfotfromInfotexpFormulaListtformula((svE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerExpandPackCfgMgr.pytGetTotalCanAddAttrInfojsP                  (t__name__t
__module__R RR#R%R'R<(((svE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerExpandPackCfgMgr.pyR!s                  
    
tExpandPackCfgMgrcBs5eZd„Zd„Zd„Zd„Zd„ZRS(cCs i|_dS(N(t$_ExpandPackCfgMgr__expandPackCfgDict(R((svE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerExpandPackCfgMgr.pyR ´scCsœtjtjƒ}|jƒjtjƒ}td||jƒƒ|jtj<tjtj    ƒ}|jƒjtj    ƒ}td||jƒƒ|jtj    <dS(NtExpandItemPacktExpandWareHousePack(
t
ItemCommontGetPackInitCountt IPY_GameWorldtrptItemtGetItemManagertGetPackRt GetMaxCountR@t rptWarehouse(RR/tdefItemPackCounttitemPack((svE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerExpandPackCfgMgr.pytLoad»s        cCs|jj|dƒS(N(R@RR(RtpackType((svE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerExpandPackCfgMgr.pytGetExpandPackCfgËscCs0|j||tjƒ|j||tjƒdS(N(t_ExpandPackCfgMgr__CalcPackAttrRERFRJ(RR/t allAttrList((svE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerExpandPackCfgMgr.pytCalcAttrÓsc Csœ|j|ƒ}|sdStj|tj}|j|ƒ}|dkrLdS|j|ƒ}tjdƒ}x+|D]#}    ||    }
tj    |    |
|ƒqqWdS(NitExpandPackAddAttr(
ROtChConfigtDef_Type_CanBuyPack_PlayerDicttDef_PlayerPackDict_Index_KeytNomalDictGetPropertyR'RRR+tCalcAttrDict_Type( RR/RQRNtpackCfgtkeyNametcurCounttattrInfotexpandPackAddAttrtattrNametaddValue((svE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerExpandPackCfgMgr.pyt__CalcPackAttrßs  
(R=R>R RMRORRRP(((svE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerExpandPackCfgMgr.pyR?¯s
                 cCs#tstƒatj|ƒntS(N(tg_expandPackCfgMgrR?RM(R/((svE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerExpandPackCfgMgr.pytGetExpandPackCfgMgrùs    cCst|ƒj|ƒS(N(RbRO(R/RN((svE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerExpandPackCfgMgr.pyROs((t__doc__RR)RER+RCRTRtobjectRR?RRaRbRO(((svE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerExpandPackCfgMgr.pyt<module>s       ŽE