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
=.ÏZc@sâddlZddlZddlZddlZiaiaiad„Zd„Zd„Z    ie
d„Z ie
d„Z d„Z ddd    „Zddd
„Zddd „Zd „Zd „Zd„Zd„Zd„ZdS(iÿÿÿÿNcCs&iaiaiatjƒjƒdS(N(tg_ipyGameDataIndexMaptg_ipyCommFuncEvalConfigt g_ipyConfigExt IpyGameDataPYtIPY_DatatClear(((se.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\IpyGameDataEx.pyt
ClearCache!s
cCs|tkrt|SdS(N(R(tkey((se.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\IpyGameDataEx.pyt GetConfigEx,s cCs|t|<|S(N(R(Rt
configData((se.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\IpyGameDataEx.pyt SetConfigEx1s
cCs$t|||ƒ}|sdS|dS(s‰ »ñÈ¡µ¥ÌõIpyGameData 
    @param dtName: Êý¾Ý±íÃû£¬Èç tagRealm Ôò´« Realm
    @param keyDict: ²éÕÒÊý¾ÝÌõ¼þ×ֵ䣬֧³Ö¶à¸ö×Ö¶Î×éºÏ²éѯ
    Ni(tGetIpyGameDataList(tdtNametkeyDictt    isLogNonetdataList((se.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\IpyGameDataEx.pytGetIpyGameData9scCsotj}d|}d|}t||ƒƒ}|sS|rOtjd|ƒndSt||ƒ}|dkr{|dƒgS|s–tjd|ƒdS|jƒ}|jƒ}    t|ƒdk}
|
rÚd||dfn d||f} |
rú|    dn    t|    ƒ} | t    kri} xæt
|ƒD]Ø}||ƒ}|dkr…x?|D]4}t |d    |ƒsJtj d
||fƒdSqJWn|
r¥t|d    |dƒƒn,tg|D]}t|d    |ƒƒ^q¯ƒ}| j |gƒ}|j|ƒ|| |<q%W| t    | <nt    | } | | krH|rDtj d ||fƒndSg| | D]}||ƒ^qS}|S( sŸ »ñÈ¡Âú×ã²éѯÌõ¼þµÄËùÓÐIpyGameData ¼Ç¼Áбí
    @param dtName: Êý¾Ý±íÃû£¬Èç tagRealm Ôò´« Realm
    @param keyDict: ²éÕÒÊý¾ÝÌõ¼þ×ֵ䣬֧³Ö¶à¸ö×Ö¶Î×éºÏ²éѯ
    s
Get%sCounts Get%sByIndexsGetIpyGameData %s no data£¡Niis4GetIpyGameData %s need to set the search condition£¡s%s_%ssGet%ss"GetIpyGameData %s has no field %s!s(GetIpyGameData can not found data! %s %s(RtIPYDatatgetattrt    GameWorldtDebugLogtkeystvaluestlenttupleRtxrangethasattrtErrLogtgettappend(R R RtipyDatat countFuncNamet IndexFuncNamet    dataCountt    IndexFunctkeyListt    valueListtisSingleFieldDatatfindKeyt findValueKeyt indexMapDicttindextiDatatktvaluekeyt    indexListt findDataList((se.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\IpyGameDataEx.pyR CsR    
 
    *      /  
 #cCstdi|d6ƒS(Nt
FuncConfigtKey(R(R((se.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\IpyGameDataEx.pytGetFuncCfgIpyData…sicCst|t||ƒS(N(t __GetFuncCfgtFalse(RR)tfunc((se.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\IpyGameDataEx.pyt
GetFuncCfg†scCst|t||ƒS(N(R2tTrue(RR)R4((se.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\IpyGameDataEx.pytGetFuncEvalCfg‡scCs)tj|t|ƒt|t||ƒƒS(N(tFormulaControltGetCompileFormulatstrR2R3(RR)R4((se.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\IpyGameDataEx.pytGetFuncCompileCfgˆsc        Cs@|dks|dkrdS|rJ|tkrJ|t|krJt||Stdi|d6ƒ}|s{tjd|ƒdStj|iƒ}t|d|ƒƒ}|s­|Sy(|dkrÈt|ƒn    ||ƒ}WnFtk
r}tj    d||||fƒt
d    ||fƒ‚nX|||<tj i||6ƒ|S(
NiitR/R0s¹¦ÄÜÅäÖñíÐÅÏ¢Key=%s ²»´æÔÚ!sGetNumerical%ss4¹¦ÄÜÅäÖÃÐÅÏ¢Key=%s,index=%s,¶Áȡʧ°Ü!Ô­Òò%s, Å׳ö,%ss%¹¦ÄÜÅäÖÃÐÅÏ¢Key=%s,index=%s,¶Áȡʧ°Ü!( RRRRRRtNonetevalt BaseExceptiontLogt    Exceptiontupdate(    RtneedEvalR)R4t
cfgIpyDatat
curCfgDicttcfgStrtevalCfgte((se.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\IpyGameDataEx.pyR2‹s(" (
cCs\t|ƒtkr|S|dkr&gS|jƒr?t|ƒfStd|jtjdƒƒS(Nt0s-R<s(%s,)s,(s0s-s(ttypeR:tisdigittintR>treplacetChConfigtDef_Str_Montant(tfieldStr((se.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\IpyGameDataEx.pytEvalReplaceList¦s   cCsºt|ƒtkr|S|dkr&iSi}|jtjƒ}xu|D]m}d|kr]qEn|jdƒ\}}|jƒrt|ƒ}n|jƒr¨t|ƒ}n|||<qEW|S(NRIs-R<t_(s0s-s(RJR:tsplitRNRORKRL(RPteDictt keyValueListtkeyValueRtvalue((se.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\IpyGameDataEx.pytEvalReplaceDict°s      cCsðtj}d|}d|}d}t||ƒ|ƒ}t|d|ƒƒ}||kr^dSt||ƒƒd}    t||ƒ|    ƒ}
t|
d|ƒƒ} || kr¯|
S|t|    |||| |ƒ} t||ƒ| ƒ} t| d|ƒƒ}||krmxßt| d|ddƒD]A}t||ƒ|ƒ} t| d|ƒƒ}||kr%| Sq%Wn||krìxpt| d|    dƒD]T}t||ƒ|ƒ} t| d|ƒƒ}||kr‘t||ƒ|dƒSq‘Wn| S(Ns
Get%sCounts Get%sByIndexisGet%siiÿÿÿÿ(RRRR=RLR(R tkeyNameRVRRR tlowtlowDatatlowValuethighthighDatat    highValuetneartnearDatat    nearValueti((se.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\IpyGameDataEx.pytInterpolationSearchGÄs:    
 
  $ !    cCsº|st|||ƒSt||ƒ}|s/dSd}|d}t|d|ƒƒ}||kredSt|ƒd}||}    t|    d|ƒƒ}
||
kr¥|    S|t|||||
|ƒ} || } t| d|ƒƒ} || krMx¾t| d|ddƒD]6}||} t| d|ƒƒ} | |kr| SqWni|| kr¶xZt| d|dƒD]>}||} t| d|ƒƒ} | |krq||dSqqWn| S(sŒ
    @param conditionDict: ¶ÔÄ¿±ê×Ö¶ÎkeyName¹é×éµÄ²éѯÌõ¼þ
    @param keyName: Òª¶¨Î»µÄÄ¿±ê×Ö¶Î
    @param keyValue: Òª¶¨Î»µÄÄ¿±ê×Ö¶ÎÖµ
    NisGet%siiÿÿÿÿ(RdR RR=RRLR(R t conditionDictRYRVRRZR[R\R]R^R_R`RaRbRc((se.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\IpyGameDataEx.pytInterpolationSearchCös>
 
 $
 !
 
 (RRRNR8RRRRRR
R6RR R1R=R5R7R;R2RQRXRdRf(((se.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\IpyGameDataEx.pyt<module>s(                 
B            
        2