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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
Bðric@soddlZddlZddlZddlZddlZddlZddlZddlZddlZddl    Z    ddl
Z
e dƒ\Z Z ZZZZZd„Zd„Zd„Zd„Zd„Zd„Zd    „Zd
„Zd „Zd „Zd d„Zd„Zd„Zd„Z d„Z!de"d„Z#d„Z$d„Z%d„Z&d„Z'd„Z(dS(iÿÿÿÿNicCst|ƒdS(N(tSyncDingjungeInfo(t    curPlayer((s„D:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_Dingjunge.pytOnFBPlayerOnLogin)s
cCsÚtj|tjdƒx@tttjddƒƒƒD] }tj|tj|dƒq5Wx:ttj    ddƒƒD] }tj|tj
|dƒqrWtj|tj dƒtj|tj dƒt |ƒt|ƒdS(Nit DingjungeEffii(t PlayerControltNomalDictSetPropertytChConfigtDef_PDict_DJGLineIDtrangetlent IpyGameDataPYtGetFuncEvalCfgtDef_PDict_DJGEffectt
GetFuncCfgtDef_PDict_DJGSelectEffecttDef_PDict_DJGUnSelectCnttDef_PDict_DJGEffAutotRefreshDingjungeAttrR(RteIndextsIndex((s„D:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_Dingjunge.pytOnFBPlayerOnDay-s%
 
cCsÛ|jtjƒ}|d|d}}|sEtjdddƒ}nq|sctjd|dƒ}nS|}|d}tjd||ƒ}|s¶|d}d}tjd||ƒ}n|rÀ|Stjd||fƒdS(Nidt
FBDJGLevelis1ÒÑͨ¹Ø»òÕÒ²»µ½ÏÂÒ»¹ØÊý¾Ý! layerNum=%s,levelNum=%s(tNomalDictGetPropertyRRR
tGetIpyGameDatatGetIpyGameDataNotLogt    GameWorldtDebugLog(Rt todayLineIDtlayerNumtlevelNumtipyDatat nextLayerNumt nextLevelNum((s„D:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_Dingjunge.pytGetNextIpyData9s"
 
cCsztj}|jtj|ƒ}|d|d}}td|dƒ}|rv|rvtjd||dƒ rv|}n|S(NidiiR(RtDef_FBMapID_DingjungeRtDef_Player_Dict_FBPassLineIDtmaxR
R(RtmapIDt highestLineIDt    hLayerNumt    hLevelNumt passLayerMax((s„D:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_Dingjunge.pytGetPassLayerMaxNs    &    cCs@t|ƒ}tjddƒ}|d|}|dkr<|SdS(Nt    Dingjungeii(R*R
R (RR)t
backLayerstquickStartLayer((s„D:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_Dingjunge.pytGetQuickStartLayerYs   c Cs¤|jtj|ƒ}t|ƒ}|r^|jtjƒ}|s^tjd||fƒdSnt|ƒ}    |    stdS|    jƒ}
|    j    ƒ} |
d| }t
|fS(NsA½ñÈÕ»¹Î´¿ìËÙÕ½¶·ÎÞ·¨ÊÖ¶¯ÌôÕ½! highestLineID=%s,quickStartLayer=%sid( RRR#R.RRRR!t GetLayerNumt GetLevelNumtTrue( RR%t
funcLineIDttagTypettagIDt    valueListR&R-Rt nextIpyDataRR((s„D:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_Dingjunge.pytOnTurnFightRequestcs    c    Cse|d|d}}tjd||ƒ}|s4dS|jƒ}|jƒ}|jƒ}|||fS(NidR(R
RtGetLineupIDListtGetNPCLVt GetDifficulty(    RR%R2RRRtnpcLineupIDListt
strongerLVt
difficulty((s„D:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_Dingjunge.pytGetFBNPCLineupInfots   c    Csþ|s
dS|tjk}    |    s#dS|jtjƒ}
tjd||
fƒ|
|krstjd|
|fƒdS|d|d} } tjd| | ƒ} | s§dSg}|jtj|ƒ}||kr(| j    ƒ}||7}tjd||fƒt
j |||ƒt j |tj|ƒntj|tj|ƒ|| jƒ7}tjd|| | |fƒ|jit
j|ƒt
j6ƒtj||ddtigd    tƒtjd| | d
ƒsðtjd | | fƒt|d
ƒnt|ƒdS( Ns(¶¨¾ü¸ó½áËã: funcLineID=%s,todayLineID=%ss0½ñÈÕÒѹý¹ØµÄ²»Öظ´½áËã½±Àø! todayLineID=%s >= %sidRs0Ê״ιý¹Ø: highestLineID=%s,firstPassAwardList=%ss;×îÖÕ½±Àø: mapID=%s,layerNum=%s,levelNum=%s,awardItemList=%steventR+t isNotifyAwardis4±¾²ãûÓÐÏÂÒ»¹ØÁË£¬Í¨¹Ø±¾²ã!: layerNum=%s,levelNum=%s(Rt Def_FactionARRRRR
RR#tGetPassAwardListtFBCommont    SetFBPasstPlayerBillboardtUpdatePlayerBillboardt ShareDefinetDef_BT_DingjungeRRt GetAwardListtupdatetGetJsonItemListt Over_itemInfot ItemControlertGivePlayerItemOrMailtFalseRtGivePassLayerEffR(RtguidR%R2t
winFactiontstatMsgtdateStrtreqDatat    awardDicttisWinRRRRt awardItemListR&tfirstPassAwardList((s„D:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_Dingjunge.pytOnTurnFightAwardƒs@   
 %
c    Cs’|jtjƒ}|r-tjd|ƒdS|jtj|ƒ}t|ƒ}|sjtjd|ƒdS||g}d}d}||||fS(sѸ±±¾¿ìËÙ¹ý¹ØÑéÖ¤
    @param mapID: Êý¾ÝµØÍ¼ID
    @param lineID: Ä¿±ê¹Ø¿¨Ïß·ID£¬¿ÉÒ»´ÎÐÔÌø¶à¹Ø£¬¸ù¾Ý¹¦ÄÜÓÉǰ¶Ë·¢°ü¾ö¶¨»òºó¶ËÖ±½Ó¾ö¶¨
    @return: (lineID, quickCnt, quickFightPower, quickData) »ò  None
    @note: lineID Óɺó¶Ë¾ö¶¨µÄ¿ìËÙ¹ý¹Øµ½ÄÄ£¬Èç¹ûǰ¶Ë¾ö¶¨µÄÔòÖ±½Ó·µ»Ø lineID
    @note: quickCnt ±¾´Î×ܹ²Ìø¹ý¼¸¹Ø 
    @note: quickFightPower Ä¿±êÕóÈÝÕ½Á¦£¬ÓÃÓÚÑéÖ¤Õ½Á¦ÊÇ·ñÂú×ã¿ìËÙ¹ý¹Ø
    @note: quickData À©Õ¹Êý¾Ý£¬¹¦ÄÜ×Ô¶¨Ò壬´«¸ø OnPlayerFBQuickPassResult
    s2½ñÈÕÒѾ­ÔÚÊÖ¶¯Õ½¶·ÁË£¬ÎÞ·¨¿ìËÙÌôÕ½! todayLineID=%sNs*»¹Î´´ïµ½¿É¿ìËÙÌôÕ½µÄ²ã¼¶! highestLineID=%si(RRRRRR#R.(    RR%tlineIDRR&R-t    quickDatatquickCnttquickFightPower((s„D:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_Dingjunge.pytOnPlayerFBQuickPass°s   cCs"|\}}|jƒ}t|ƒ}|dd}tjd||||f|ƒd}    tjƒ}
xKt|
jƒƒD]7} |
j    | ƒ} | j
ƒ} | |kr¨Pn| }    qwW|    s¼dS|    j ƒ}t j |tj|ƒ|d}t||ƒt|ƒtj||ddtigƒdS(NidisR¶¨¾ü¸ó¿ìËÙÕ½¶·: highestLineID=%s,passLayerMax=%s,quickStartLayer=%s,todayLineID=%siR?R+(t GetPlayerIDR*RRtNoneR
tIPY_DataRtGetFBDJGQuickCounttGetFBDJGQuickByIndext GetNeedLayertGetQuickAwardListRRRRRPRRMRNRO(RR%R[R\R&R-tplayerIDR)Rt awardIpyDatat
ipyDataMgrtindext quickIpyDatat    needLayerRXt    addEffCnt((s„D:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_Dingjunge.pytOnPlayerFBQuickPassResultÊs.          
 
 
icCs`|jtjƒ|}tj|tj|ƒtjd||fƒt|ƒs\t|ƒndS(Ns-Ôö¼ÓЧ¹û¼Ó³É´ÎÊý: addEffCnt=%s,unSelectCnt=%s(    RRRRRRRt__doAutoSelectAllt__randSelectEff(RRmt unSelectCnt((s„D:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_Dingjunge.pyRPës   c CsUtjƒj|ƒ}|jr$dnd}|j}g}tjƒ}xQt|jƒƒD]=}|j    |ƒ}|j
ƒ}    |    |krX|j |    ƒqXqXW|j ƒtj d|||fƒtj|tj|ƒxqttjddƒƒD]W}
t|ƒ|
kr||
nd}    |    |kr)d}    ntj|tj|
|    ƒqìWt|ƒdS(NiisBЧ¹ûÔ¤Éè: selectAuto=%s,selectSetAttrIDList=%s,canSetAttrIDList=%sRi(RtGetPlayerManagertGetPlayerByIndext
SelectAutotSelectSetAttrIDListR
RbRtGetFBDJGEffectCounttGetFBDJGEffectByIndext    GetAttrIDtappendtsortRRRRRR R    tDef_PDict_DJGEffSetR( Rjt
clientDatattickRt
selectAutotselectSetAttrIDListtcanSetAttrIDListRiRtattrIDtssIndex((s„D:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_Dingjunge.pytOnDingjungeEffSetüs(       
"     
cCs¥tjƒj|ƒ}|j}|j}|j}|dkrIt|ƒnN|dkrht|dtƒn/t    |||ƒr—t|dtƒt
|ƒnt |ƒdS(NiitisReset( RRrRst
SelectTypet SelectIndext ReplaceHoleRoRpR1t __doSelectEffRR(RjR|R}Rt
selectTypet selectIndext replaceHole((s„D:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_Dingjunge.pytOnDingjungeEffSelects                
c
CsJ|jtjƒs#tjdƒdS|jtjƒ}g}xLttjddƒƒD]2}|jtj    |ƒ}|rT|j
|ƒqTqTWt |ƒ}tjd|||fƒtjddƒ}xwt|ƒD]i}t ||ƒ}|sîPnt ||||ƒsPnx.t|ƒD] }    tj|tj|    dƒqWqÏWt|ƒtS(Ns먦Æô×Ô¶¯Ñ¡Ôñ!RisIÖ´ÐÐÒ»¼üÑ¡Ôñ¼Ó³ÉЧ¹û: unSelectCnt=%s,effHoleCnt=%s,selectSetAttrIDList=%sii(RRRRRRRR
R R{Ryt__getUnlockEffHoleCntRpt__doAutoSelectEffRRRRR1(
RRqRR‚Rt
effHoleCntt
randEffCntt_t    effIDListR((s„D:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_Dingjunge.pyRo0s,  "
cCsX|jtjƒ}tjddƒ}d}x'|D]}||kr1|d7}q1q1W|S(NRii(RRRR
R (RRteffHoleNeedLVIDListRtneedLVID((s„D:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_Dingjunge.pyROs  icCsÎ|stjddƒ}n|rUx1t|ƒD] }tj|tj|dƒq.Wn|jtjƒ}|dkr„t    j
dƒdSg}|r“nDxAt|ƒD]3}|jtj|ƒ}|sÆPn|j |ƒq W|rá|Sg}tjddƒ}xwtt tj ddƒƒƒD]W}    |jtj|    ƒ}
|
s>Pn|
d|
d}} | |kr|j |ƒqqWg} tjƒ} xot| jƒƒD][}| j|ƒ}|jƒ}||krËq˜n|jƒ}|r˜| j ||gƒq˜q˜Wd}xWt |ƒ|krV|dkrV|d8}t    j| ƒ}||kr|j |ƒqqW|d8}tj|tj|ƒxPt|ƒD]B}t |ƒ|kr¦||nd}tj|tj||ƒq„W|S(    NRiisûÓÐδ´¦ÀíµÄ¼Ó³ÉЧ¹û´ÎÊýÁËiiidiÈ(R
R RRRRRRRRRRyR    R R RbRvRwtGetEffIDt GetRandWeighttGetResultByWeightList(RRR„RRqR’teffIDtfullLVEffIDListteffMaxLVRteffInfoteffLVtrandWeightListRiRjRt
randWeighttrandCntt    randEffID((s„D:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_Dingjunge.pyRpYsd!  %     !
 
"c
Csg}xº|D]²}tjd|ƒ}|s1q n|jƒ}|jƒ}d}    d}
||krƒd}    t|ƒ|j|ƒ}
nd} |d| } d} |j|    ||
| | ||gƒq W|jdtƒ|sÝdS|d}|t    }|t
}tj ddƒ}d}g}x@t |ƒD]2} |j tj| ƒ} | sc|dkr&| }q&q&n| d| d}} tjd|ƒ}|s–q&n|jƒ}|jƒ}||krü| |krü| d7} |d| } tj|tj| | ƒtSd}    d}
||kr6d}    t|ƒ|j|ƒ}
n|j|    ||
| | ||gƒq&W|dkr¦|} |}d} |d| } tj|tj| | ƒtS|j|ƒ|jdtƒ|d}|t}|dkræn&|}|} tj|tj|| ƒtS(    Nt FBDJGEffectiiidiÿÿÿÿtreverseRi(R
Rt GetEffQualityRxR    RjRyRzR1tPriority_EffIDtPriority_EffInfoR RRRR RRtPriority_EIndex(RtselectEffIDListRRtpriorityEffListR˜t
effIpyDatat
effQualityRtinSett setPriorityRœR›Rt    selectEfft selectEffIDt selectEffInfoRšt
emptyIndexteffListtlastEfft
lastEIndext replaceIndex((s„D:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_Dingjunge.pyRŽ™s‚    &
 
 
       
 &  
 
 c CsH|jtj|ƒ}tjd|||fƒ|s:dSt|ƒ}tjddƒ}d}x÷t|ƒD]é}|jtj    |ƒ}|s¹|dkrktjd|ƒ|}qkqkn|d|d}    }
|    |krk|
|krtjd||    |
fƒdS|
d7}
|    d|
}tjd    ||    |
fƒt
j |tj    ||ƒt SqkW|dkr¼|}|}    d}
|    d|
}tjd
||    |
fƒt
j |tj    ||ƒt S|dksÔ||krïtjd ||fƒdSd}
|d|
} |d} | }tjd | |fƒt
j |tj    | |ƒt S( Ns:ÊÖ¶¯Ñ¡ÔñЧ¹û: selectIndex=%s,selectEffID=%s,replaceHole=%sRiiÿÿÿÿs    »¹ÓпղÛ: eIndex=%sids5    ÒÑ´æÔÚ¸ÃЧ¹ûÇÒÒÑÂú¼¶: eIndex=%s,effID=%s,effLV=%sis5    ÒÑ´æÔÚ¸ÃЧ¹ûÖ±½ÓÉý¼¶: eIndex=%s,effID=%s,effLV=%ss1    ¿Õ²ÛÖ±½ÓÉèÖÃ: emptyIndex=%s,effID=%s,effLV=%ss6    Ìæ»»µÄÄ¿±ê²Ûλ²»¿ÉÓÃ: replaceHole=%s,effHoleCnt=%ss,    ÊÖ¶¯Ñ¡ÔñÌæ»»! replaceIndex=%s,effInfo=%s( RRRRRRR
R RR RRR1( RRŠR‹R®RRšR°RR›R˜RœR¯R´((s„D:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_Dingjunge.pyRˆùsT        
 
cCs*t|ƒtj|ƒjdtjƒdS(NtexclusiveMapID(tCalcDingjungeAttrt PlayerOnlinetGetOnlinePlayertRefreshRoleAttrRR"(R((s„D:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_Dingjunge.pyR,s
c Csú|jƒ}i}t|ƒ}x¥t|ƒD]—}|jtj|ƒ}|sSq+n|d|d}}tjd|ƒ}|s†q+n|jƒ}    |j    ƒ}
|
|} |j
|    dƒ| ||    <q+Wt j d||ƒt j|ƒjtj|ƒdS(NidR¡is ¶¨¾üÊôÐÔ: %s(R`RRRRR R
RRxt GetAttrValuetgetRRR·R¸t SetCalcAttrtDef_CalcAttr_Dingjunge( RRgtattrDictRRR›R˜RœR©Rt    attrValuetattrValueTotal((s„D:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_Dingjunge.pyR¶1s$    
c Csêtjƒ}|jtjƒ|_g}xtttj    ddƒƒƒD]o}|jtj
|ƒ}|slPn|d|d}}tj ƒ}||_ ||_ ||_|j|ƒqFW||_t|jƒ|_g}xMttjddƒƒD]3}    |jtj|    ƒ}|sPn|j|ƒqóW||_t|jƒ|_|jtjƒ|_|jtjƒ|_g}
xCttjddƒƒD])} |jtj| ƒ} |
j| ƒqŽW|
|_t|jƒ|_tj||ƒdS(NRiidii(tChPyNetSendPackttagSCDingjungeInfoRRRt    TodayPassRR    R
R R ttagSCDingjungeEfftEffIndextEffIDtEffLVRytEffListtEffCntR Rt SelectEffListt SelectEffCntRt UnSelectCntRRtR{Rut SelectSetCntt NetPackCommont SendFakePack( Rt
clientPackR±RR›R˜Rœtefft selectEffListRRR‚R((s„D:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_Dingjunge.pyRJsB %                         ()RCRRGRRERÁRMR
RÎR·RRtPriority_InSettPriority_EffQualitytPriority_SetPriorityR¦R¥R¤tPriority_AttrIDRRR!R*R.R7R>RZR_RnRPRƒRŒRoRRORpRŽRˆRR¶R(((s„D:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_Dingjunge.pyt<module>s@           !                      
            -        !     "            
@    `    3