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
Sð    hc@suddlZddlZddlZddlZddlZddlZddlZddlZddlZddl    Z    ddl
Z
ddl Z ddl Z dZ dZd„Zd„Zd„Zded„Zd    „Zd
„Zd „Zd „Zd „Zd„Zd„Zd„Zd„Zdd„Zdd„Zdd„Zd„Z dgd„Z!d„Z"d„Z#dS(iÿÿÿÿNii cCs't|ƒs#t|ƒt|ƒndS(N(t__CheckPlayerCrossActLianqitSync_CrossActLianqiActionInfotSync_LianqiPlayerInfo(t    curPlayer((sS.\\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActLianqi.pyt OnPlayerLogin$s 
 cCs[tjƒ}xHt|jƒƒD]4}|j|ƒ}tj|ƒsIqnt|ƒqWdS(N(t    GameWorldtGetPlayerManagertxrangetGetPlayerCounttGetPlayerByIndextIsNormalPlayerR(t playerManagertindexR((sS.\\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActLianqi.pytRefreshCrossActLianqiInfo,s c    Cs^|jƒ}tj|tjƒ}|jtjdƒ}|jtjdƒ}|jtjdƒ}|j    t
j ƒ}||krœt j d||f|ƒdSt j d||||f|ƒtj|tjƒtj|t
j |ƒtj|t
jdƒtj|t
jdƒtj|t
jdƒtj|t
jdƒtj|t
jdƒtj|t
jdƒx.ttƒD] }tj|t
j|dƒqvWx4tjddƒD] }tj|t
j|dƒq­Wx-tjddƒD]}tj ||dƒqäW|rGt!|tj"ddƒƒt#|d    t$ƒt%|ƒt&|ƒntj'|tjƒt(S(
Nis-¿ç·þÁ¶Æ÷»î¶¯ID²»±ä£¬²»´¦Àí£¡cfgID=%s,actID=%ss;¿ç·þÁ¶Æ÷»î¶¯ÖØÖÃ! cfgID=%s,actID=%s,playerActID=%s,state=%st LianqiUseItemiitActLianqiRecycleItemt    LianqiSettisNotify()t GetPlayerIDtCrossRealmPlayertGetPlayerCrossActInfot ShareDefinetCrossActName_Lianqitgett ActKey_CfgIDt    ActKey_IDt ActKey_StatetNomalDictGetPropertytChConfigtDef_PDict_CA_LianqiIDRtDebugLogtPlayerZhanlingt ResetZhanlingtZhanlingType_Lianqit PlayerControltNomalDictSetPropertytDef_PDict_LianqiScoretDef_PDict_LianqiScoreHighesttDef_PDict_LianqiEnergytDef_PDict_LianqiEnergyTimetDef_PDict_LianqiLVAwardMaxtDef_PDict_LianqiLVAwardStatetrangetDef_SizetDef_PDict_LianqiRowDatat IpyGameDataPYtGetFuncEvalCfgtDef_PDict_LianqiItemUset ItemControlert RecycleItemtSetLianqiEnergyt
GetFuncCfgt ReStartGametFalseRRtNotifyCrossActEndtTrue(    RtplayerIDtactInfotcfgIDtactIDtstatet playerActIDtrowtitemID((sS.\\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActLianqi.pyR7s>   
 ic Cs5tj|tjdƒx4tjddƒD] }tj|tj|dƒq)Wtjddƒ}tt    t    ƒ}t
j |ƒ|| }g}xktt    ƒD]]}g}xAtt    ƒD]3}    |t    |    |krÒdnd}
|j |
ƒq²W|j |ƒq™Wt ||d|ƒt||ƒ|r1t||ƒndS(NiRit
LianqiRandsÖØÐ¿ªÊ¼Á¶Æ÷: %s(R"R#RR$R-R.R/R3R*R+trandomtshuffletappendt PrintGridDatat SaveGridDataR( RtopTypeRR?t initRandCounttrandListt gridDataListR>t rowDataListtcoltlv((sS.\\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActLianqi.pyR4bs& 
  cCs…g}xxttƒD]j}|jtj|ƒ}g}x8ttƒD]*}|d}|d}|jd|ƒqBW|j|ƒqW|S(Nidi(R*R+RRR,tinsertRC(RRIR>t rowDataValueRJt_tcolValue((sS.\\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActLianqi.pytGetGridDataLists
 
cCsœtjd||jƒƒx{|D]s}d}xJ|D]B}|rM|d7}n|dkrf|d7}n|t|ƒ7}q4Wtjd||jƒƒq!WdS(Ns%sts, i
s s[%s](RRRtstr(RRIt
printTitletrowDatatrowStrRL((sS.\\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActLianqi.pyRDŒs     cCstxmttƒD]_}d}x*ttƒD]}|d|||7}q&Wt|ƒ}tj|tj||ƒq WdS(NRRs%02d(R*R+tintR"R#RR,(RRIR>t
rowDataStrRKRN((sS.\\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActLianqi.pyRE™s c
Cs=tjƒj|ƒ}|jƒ}|j}|j}|j}|j}|dkrºtj    |t
j ƒ}    |    s„tj d||ƒdS|    j t
jƒt
jkrºtj d||ƒdSn|dkrÙt|||ƒn`|dkrþt|||||ƒn;|dkrt||ƒn|dkr9t|||ƒndS(Nis!·ÇÁ¶Æ÷»î¶¯ÖУ¬ÎÞ·¨²Ù×÷! OPType=%ss%·ÇÁ¶Æ÷»î¶¯²ÎÓëÖУ¬ÎÞ·¨²Ù×÷! OPType=%siii(i(RRR    RtOPTypetOPValuetOPValue2tOPValue3RRRRRRtActKey_StateJointActStateJoin_StarttOnMovet    OnUseItemR4t OnGetLVAward(
R t
clientDatattickRR8RYRZR[R\R9((sS.\\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActLianqi.pyt OnActLianqiOP­s.                      cCs^d|kot|ƒknrZd|koCt||ƒknrZ|||}|SdS(Ni(tlen(trtcRIRL((sS.\\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActLianqi.pyt    GetGridLVÈsHc  Cs|jƒ}|jtjƒ}|s8tjd|ƒdSd}g}|dkr_d}d}ni|dkrzd}d}nN|d    kr•d}d
}n3|d kr°d}d }ntjd ||ƒdStjd||||f|ƒt|ƒ}t||dƒ|\}}    |dks(|    dkr4tt    ƒntt    ƒddd…}
g} g} d} x´|
D]¬}x£|
D]›}t
|||ƒ}g}|sqsn||}}t }x©tt    ƒD]›}||7}||    7}||g| kríPnt
|||ƒ}|dkrPn|s*||g}t }q½||krW|t krW||g}t}q½Pq½W|rs|\}}d|||<|rä|d7}td|ƒ}| |7} tjd||| ||||f|ƒ| j||gƒn||||<| j||||gƒqsqsWqfWtjd| |ƒ| sDtj|dƒdSd}g}x‰tt    ƒD]{}xrtt    ƒD]d}|||}|s |j||gƒqp|t krÅ|t krÅ|d7}qpt||ƒ}qpWq]W|rÁtj|ƒ\}}g}tjddiƒ}xf|jƒD]X}t|tƒrt|ƒdkr|d|koe|dknr||}qqWtj|dƒ}||||<tjd|||||f|ƒnt||dƒt||dƒt|| |ƒt||ƒt ||| ƒtS(NsÁ¶Æ÷ÎÞÌåÁ¦£¬ÎÞ·¨Òƶ¯!RRiiÿÿÿÿisÉÏisÏÂis×óisÓÒs"Á¶Æ÷·½Ïò´íÎó£¬ÎÞ·¨Òƶ¯! moveDir=%ss(Á¶Æ÷ÒÆ¶¯: moveDir=%s%s,v=%s,curEnergy=%ssÒÆ¶¯Ç°s?ºÏ³ÉµÈ¼¶: %s,addScore=%s,addScoreTotal=%s, RC(%s,%s) to (%s,%s)s ÒÆ¶¯¶ÓÁÐ: %stLianqiMoveUnableR@s1Ëæ»úÌí¼Ó: maxLVNow=%s,row=%s,col=%s,randLV=%s, %ssÒÆ¶¯ºó(iÿÿÿÿi(ii(iiÿÿÿÿ(ii(!RRRR&RRRQRDR*R+RhR5tNonet    Def_MaxLVR7tpowRCR"t
NotifyCodetmaxRAtchoiceR-R.tkeyst
isinstancettupleRetGetResultByRandomListR2tAddLianqiScoreRER( RRFtmoveDirR8t    curEnergyt    moveDirCntvRItvrtvctloopListt
lvUPRCListtmoveListt addScoreTotalRfRgRLtmoveTottoRttoCtisUpROtlvTotaddScoretmaxLVNowt emptyGridListR>RKt randRateListt randRateDicttlvRangetrandLV((sS.\\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActLianqi.pyR_Ðs¼                        =   
 
            
 
     $ E& c Cs>|jƒ}tjddƒ}td|dƒ}|d}|dksY|t|ƒkrqtjd||ƒdS||}    tjddƒ}
|
jt|    ƒdƒ} |j    t
j |    ƒ} | dkr÷| | kr÷tjd||    | | f|ƒdSt j ||    |ƒ\} }}td|||ƒ}|dkrYtjd||    |f|ƒdS|d|d}}|d|d}}t|ƒ}|dkr;t|||ƒ}|sÚtjd    ||    |||f|ƒdStjd
||    |||f|ƒt||d ƒd|||<t||ƒt||d ƒn•|dkr!t|||ƒ}t|||ƒ}| sy| r©tjd ||    ||||||f|ƒdStjd||    ||||||f|ƒt||d ƒ||||<||||<t||ƒt||d ƒn¯|dkrt|||ƒ}tjddƒ}| sd||krŽtjd||    ||||f|ƒdStjd||    |||f|ƒt||d ƒ|d7}||||<t||ƒt||d ƒtd|ƒ}t|||ƒn¸|dkrÐ|j    t
jƒ}tjddƒ}||krxtjd||    ||f|ƒdStjddƒ|}||}t||ƒ}tjd||    ||||f|ƒnt j|| |||dƒ| |}tj|t
j |    |ƒtjd||    |f|ƒt||ƒdS(NRii
is#Á¶Æ÷¸¨ÖúµÀ¾ßË÷Òý²»´æÔÚ! useIndex=%sisMÁ¶Æ÷µ¥¾ÖʹÓøõÀ¾ß´ÎÊýÒÑ´ïÉÏÏÞ! useIndex=%s,itemID=%s,alreadyUsedCnt=%s >= %ss4Á¶Æ÷¸¨ÖúµÀ¾ß²»×ã! useIndex=%s,itemID=%s,lackCount=%ssRÁ¶Æ÷µ±Ç°¸ñ×Ó²»´æÔÚ»òΪ¿Õ£¬ÎÞÐèʹÓøõÀ¾ß! useIndex=%s,itemID=%s,rA=%s,cA=%s,lvA=%ssBÁ¶Æ÷ʹÓÃÏû³ýÈÎÒâλÖõÀ¾ß! useIndex=%s,itemID=%s,rA=%s,cA=%s,lvA=%ssʹÓÃǰsʹÓúóseÁ¶Æ÷A»òB¸ñ×Ó²»´æÔÚ»òΪ¿Õ£¬ÎÞÐèʹÓøõÀ¾ß! useIndex=%s,itemID=%s,rA=%s,cA=%s,lvA=%s,rB=%s,cB=%s,lvB=%ssYÁ¶Æ÷ʹÓý»»»ÈÎÒâÁ½¸öλÖõÀ¾ß! useIndex=%s,itemID=%s,rA=%s,cA=%s,lvA=%s,rB=%s,cB=%s,lvB=%sis_Á¶Æ÷µ±Ç°¸ñ×Ó²»Âú×ãʹÓõȼ¶£¬ÎÞÐèʹÓøõÀ¾ß! useIndex=%s,itemID=%s,rA=%s,cA=%s,lvA=%s,lvLimit=%ss:Á¶Æ÷ʹÓýø½×µÀ¾ß! useIndex=%s,itemID=%s,rA=%s,cA=%s,lvA=%sRsFÁ¶Æ÷ÌåÁ¦ÒÑÂú£¬ÎÞÐèʹÓøõÀ¾ß! useIndex=%s,itemID=%s,curEnergy=%s >= %sis^Á¶Æ÷ʹÓÃÌåÁ¦µÀ¾ß! useIndex=%s,itemID=%s,useItemCount=%s,addEnergy=%s,curEnergy=%s,updEnergy=%stLianqis8¸üе¥¾ÖµÀ¾ßʹÓôÎÊý: useIndex=%s,itemID=%s,updUseCnt=%s(RR-R.RnReRRRRSRRR/t
ItemCommontGetPackItemBindStateIndexInfoRQRhRDRER3RlRtR&R2tDelCostItemByBindR"R#R(RRFtuseInfotopValue2topValue3R8t
itemIDListt useItemCounttuseIndexR?t useLimitDicttlimitCnttalreadyUsedCnttcostItemIndexListtbindCntt    unBindCntt    lackCounttrAtcAtrBtcBRItlvAtlvBtlvLimitR„Rvt    energyMaxt    addEnergyt    updEnergyt    updUseCnt((sS.\\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActLianqi.pyR`Dsš 
 
    ##      #    #  &#
    
     
 cCs8|jtjƒsdS|jtjƒ}tjddƒ}||krJdStjddƒ}|sfdSttjƒƒ}|jtjƒ}|s°|}t    j
|tj|ƒdS||}||}|dkrÔdSt j d||||f|j ƒƒt    j
|tj|ƒt|t|||ƒƒt|ƒdS(NRiiis1ʱ¼ä»Ö¸´Á¶Æ÷ÌåÁ¦: passTime=%s(%s-%s),addEnergy=%s(RRRR&R-R3RWttimeR'R"R#RRRR2tminR(RRvR£t needSecondstcurTimetlastTimetpassTimeR¤((sS.\\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActLianqi.pyt    OnProcess s0 
 
 &
cCs¯|jtjƒ}td|ƒ}tj|tj|ƒtjddƒ}||krntj|tjdƒn=||kr«||kr«tj|tjt    t
j
ƒƒƒn|S(NièýRii( RRR&R¨R"R#R-R3R'RWR§(Rt    setEnergyRvR¥R£((sS.\\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActLianqi.pyR2»s %cCss|dkrdS|jtjƒ}tjd|||f|jƒƒt||||ƒtj|tj    |ƒdS(Nis2Á¶Æ÷»î¶¯»ý·ÖÔö¼Ó: curScore=%s,addScore=%s,actLV=%s(
RRR$RRRtSetLianqiScoreRtAddZhanlingValueR!(RR„tactLVtcurScore((sS.\\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActLianqi.pyRtËs #cCsút}|jtjƒ}||krI|}tj|tj|ƒt}nt|tjƒ}tj|tj    |ƒ|jtj
ƒ}||kr´|}tj|tj
|ƒt}nt j d|||f|j ƒƒ|röt|d||gƒn|S(Ns:Á¶Æ÷»î¶¯»ý·Ö¸üÐÂ: updScore=%s,scoreHighest=%s,lvHighest=%st ScoreHighest(R5RRR(R"R#R7R¨tDef_UpperLimit_DWordR$R%RRRtSendToGameServer_Lianqi(RtsetScoreR±t updBillboardt    lvHighesttupdScoret scoreHighest((sS.\\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActLianqi.pyR¯Õs$              RRcCsd|jƒ}t||gƒ}tjƒj|ddd|t|ƒƒtjd||f|ƒdS(Nit    ActLianqisÁ¶Æ÷»î¶¯·¢ËÍGameServer: %s, %s(RRSRRtGameServer_QueryPlayerResultRetLog(RtmsgTypetdataMsgR8tmsgList((sS.\\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActLianqi.pyRµïs
 (c    Cs?|jƒ}|jtjƒ}||krHtjd||f|ƒdStjddiƒ}t|ƒ|krsdS|t|ƒ}|jtj    ƒ}|t
d|ƒ@rÆtjd||f|ƒdSt j ||ddt igƒ|t
d|ƒB}tj|tj    |ƒtjd||||f|ƒt||ƒdS(    Ns$Á¶Æ÷½±ÀøµÈ¼¶²»×ã! curAwardLV=%s < %sRiis,Á¶Æ÷½±ÀøµÈ¼¶ÒÑÁìÈ¡! awardLV=%s,awardState=%steventR‹s>Á¶Æ÷ÁìÈ¡½±ÀøµÈ¼¶! awardLV=%s,awardState=%s,updAwardState=%s,%s(RRRR(RRR-R.RSR)RlR0tGivePlayerItemOrMailR5R"R#R(    RRFtawardLVR8t
curAwardLVtlvAwardItemDictt awardItemListt
awardStatet updAwardState((sS.\\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActLianqi.pyRaös(       c Csî|jtjƒsdStjƒ}|jtjƒ|_|jtjƒ|_|jtj    ƒ|_
|jtj ƒ|_ |jtj ƒ|_|jtjƒ|_g|_x:tjddƒD]&}|jj|jtj|ƒƒq¼Wt|jƒ|_tt|ƒƒjddƒ|_t|jƒ|_g|_xˆ|D]€}t|tƒ s;t|ƒdkriq;ntj ƒ}|\}}}    }
||_!||_"|    |_#|
|_$|jj|ƒq;W||_%t|jƒ|_&t'j(||ƒdS(NRis RRi()RRRtChPyNetSendPackttagMCActLianqiPlayerInfoR$tScoreR%R³R&tEnergyR't
EnergyTimeR(t
LVAwardMaxR)t LVAwardStatetUseItemCntListR-R.RCR/Ret
UseItemLenRSRQtreplacetGridDatat GridDataLentMoveListRqtlistttagMCActLianqiTileMovetRowtColtToRowtToColRYt    MoveCountt NetPackCommont SendFakePack( RRFR}t
clientPackR?tmoveInfottileMoveR>RKttoRowttoCol((sS.\\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActLianqi.pyR s<     $!     "                     cCsstj|tjƒ}|sdS|jtjƒs5dS|jtjiƒ}|sTdS|jddƒ}|r~tjd|ƒng}t    j
ƒ}t |jtj gƒƒ|_ t|j ƒ|_|jddƒ|_|jddƒ|_|jddƒ|_|jddƒ|_|jd    dƒ|_|jd
dƒ|_t|ƒ|_t|jƒ|_tj||ƒdS( NtPersonalTemplateIDitActLianqiBillTemptZoneIDt    StartDateRRtEndDatet JoinStartTimet JoinEndTimetLVLimit(RRRRRRtActKey_IpyDataInfoR-tGetIpyGameDataListRÉttagMCCrossActLianqiInfoRStActKey_ServerIDRangeListtServerIDRangeInfoRet ServerInfoLent GroupValue1RçtEndtDateRéRêtLimitLVt__GetTempRankBillPackListtPersonalBillboardInfoListtPersonalBillCountRÝRÞ(RR9t ipyDataDicttpersonalTempIDtpersonalTempIpyDataListRß((sS.\\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActLianqi.pyR1s. cCsÑg}|s|Sxº|D]²}tjƒ}|jƒ|_g|_|jƒ}xX|D]P\}}}tjƒ}|jƒ||_||_    ||_
|jj |ƒqTWt |jƒ|_ |jƒ|_g|_|jƒ}    |    jƒ}
|
jƒx³|
D]«} |    | } tjƒ} | | _g| _xX| D]P\}}}tjƒ}|jƒ||_||_    ||_
| jj |ƒq0Wt | jƒ| _ |jj | ƒqûWt |jƒ|_|j |ƒqW|S(N(RÉttagMCCrossActLianqiBillardtGetRanktRankt AwardItemListtGetAwardItemListttagMCCrossActLianqiItemtCleartItemIDt    ItemCounttIsBindRCRetCountt GetNeedScoret    NeedScoretAwardItemExListtGetScoreAwardExRptsortttagMCCrossActLianqiAwardExtCountEx(t ipyDataListt packBillListt tempIpyDatatrankInfoRÆR?t    itemCountt isAuctionItemtitemt scoreAwardExt scoreExListtscoreExt
itemExListtawardEx((sS.\\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActLianqi.pyRõQsL        
                  
 
          
            ($RR"R-RÝRÉRRR0RŒRRRAR§R+RkRR RR7R4RQRDRERdRhR_R`R­R2RtR¯RµRaRRRõ(((sS.\\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActLianqi.pyt<module>sD                          +                          t    \        
     $