hxp
3 天以前 8e76a6859474df07c12e0b4ff0ea3bfd321675eb
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
8*ƒic@s]ddlZddlZddlZddlZddlZddlZddlZddlZddlZddl    Z    ddl
Z
dZ dZ d„Z d„Zd„Zded„Zd    „Zd
„Zd „Zd „Zd „Zd„Zd„Zd„Zd„Zdd„Zdd„Zdd„Zd„Zdgd„Zd„Z d„Z!dS(iÿÿÿÿNii cCs't|ƒs#t|ƒt|ƒndS(N(t__CheckPlayerCrossActLianqitSync_CrossActLianqiActionInfotSync_LianqiPlayerInfo(t    curPlayer((snD:\SG_ServerCode\ServerPython\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((snD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActLianqi.pytRefreshCrossActLianqiInfo+s c    Cs)|jƒ}i}|jtjdƒ}|jtjdƒ}|jtjdƒ}|jtjƒ}||krt    j
d||f|ƒdSt    j
d||||f|ƒt j |tj|ƒt j |tj dƒt j |tjdƒt j |tjdƒt j |tjdƒt j |tjdƒt j |tjdƒx.ttƒD] }t j |tj|dƒqTWx4tjddƒD] }t j |tj|dƒq‹Wx-tjddƒD]}tj||dƒqÂW|r%t|tjddƒƒt|d    tƒt|ƒt |ƒnt!S(
Nis-¿ç·þÁ¶Æ÷»î¶¯ID²»±ä£¬²»´¦Àí£¡cfgID=%s,actID=%ss;¿ç·þÁ¶Æ÷»î¶¯ÖØÖÃ! cfgID=%s,actID=%s,playerActID=%s,state=%st LianqiUseItemiitActLianqiRecycleItemt    LianqiSettisNotify("t GetPlayerIDtgett ShareDefinet ActKey_CfgIDt    ActKey_IDt ActKey_StatetNomalDictGetPropertytChConfigtDef_PDict_CA_LianqiIDRtDebugLogt PlayerControltNomalDictSetPropertytDef_PDict_LianqiScoretDef_PDict_LianqiScoreHighesttDef_PDict_LianqiEnergytDef_PDict_LianqiEnergyTimetDef_PDict_LianqiLVAwardMaxtDef_PDict_LianqiLVAwardStatetrangetDef_SizetDef_PDict_LianqiRowDatat IpyGameDataPYtGetFuncEvalCfgtDef_PDict_LianqiItemUset ItemControlert RecycleItemtSetLianqiEnergyt
GetFuncCfgt ReStartGametFalseRRtTrue(    RtplayerIDtactInfotcfgIDtactIDtstatet playerActIDtrowtitemID((snD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActLianqi.pyR6s:   
 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(RRRRR'R(R)R-R$R%trandomtshuffletappendt PrintGridDatat SaveGridDataR( RtopTypeRR8t initRandCounttrandListt gridDataListR7t rowDataListtcoltlv((snD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActLianqi.pyR.as& 
  cCs…g}xxttƒD]j}|jtj|ƒ}g}x8ttƒD]*}|d}|d}|jd|ƒqBW|j|ƒqW|S(Nidi(R$R%RRR&tinsertR<(RRBR7t rowDataValueRCt_tcolValue((snD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActLianqi.pytGetGridDataList~s
 
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(RRBt
printTitletrowDatatrowStrRE((snD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActLianqi.pyR=‹s     cCstxmttƒD]_}d}x*ttƒD]}|d|||7}q&Wt|ƒ}tj|tj||ƒq WdS(NRKs%02d(R$R%tintRRRR&(RRBR7t
rowDataStrRDRG((snD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActLianqi.pyR>˜s c
Cs.tjƒj|ƒ}|jƒ}|j}|j}|j}|j}|dkr«i}    |    sutjd||ƒdS|    j    t
j ƒt
j kr«tjd||ƒdSn|dkrÊt |||ƒn`|dkrït|||||ƒn;|dkr t||ƒn|dkr*t|||ƒndS(Nis!·ÇÁ¶Æ÷»î¶¯ÖУ¬ÎÞ·¨²Ù×÷! OPType=%ss%·ÇÁ¶Æ÷»î¶¯²ÎÓëÖУ¬ÎÞ·¨²Ù×÷! OPType=%siii(i(RRR    RtOPTypetOPValuetOPValue2tOPValue3RRRtActKey_StateJointActStateJoin_StarttOnMovet    OnUseItemR.t OnGetLVAward(
R t
clientDatattickRR1RRRSRTRUR2((snD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActLianqi.pyt OnActLianqiOP¬s.                      cCs^d|kot|ƒknrZd|koCt||ƒknrZ|||}|SdS(Ni(tlen(trtcRBRE((snD:\SG_ServerCode\ServerPython\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Á¶Æ÷ÎÞÌåÁ¦£¬ÎÞ·¨Òƶ¯!RKiiÿÿÿÿ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 ÒÆ¶¯¶ÓÁÐ: %stLianqiMoveUnableR9s1Ëæ»úÌí¼Ó: maxLVNow=%s,row=%s,col=%s,randLV=%s, %ssÒÆ¶¯ºó(iÿÿÿÿi(ii(iiÿÿÿÿ(ii(!RRRR RRRJR=R$R%RaR/tNonet    Def_MaxLVR0tpowR<Rt
NotifyCodetmaxR:tchoiceR'R(tkeyst
isinstancettupleR^tGetResultByRandomListR,tAddLianqiScoreR>R( RR?tmoveDirR1t    curEnergyt    moveDirCntvRBtvrtvctloopListt
lvUPRCListtmoveListt addScoreTotalR_R`REtmoveTottoRttoCtisUpRHtlvTotaddScoretmaxLVNowt emptyGridListR7RDt randRateListt randRateDicttlvRangetrandLV((snD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActLianqi.pyRXÏ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(RgR^RRRRLRRR)t
ItemCommontGetPackItemBindStateIndexInfoRJRaR=R>R-ReRmR R,tDelCostItemByBindRRR(RR?tuseInfotopValue2topValue3R1t
itemIDListt useItemCounttuseIndexR8t useLimitDicttlimitCnttalreadyUsedCnttcostItemIndexListtbindCntt    unBindCntt    lackCounttrAtcAtrBtcBRBtlvAtlvBtlvLimitR}Rot    energyMaxt    addEnergyt    updEnergyt    updUseCnt((snD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActLianqi.pyRYCsš 
 
    ##      #    #  &#
    
     
 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'R-RPttimeR!RRRRRR,tminR(RRoRœt needSecondstcurTimetlastTimetpassTimeR((snD:\SG_ServerCode\ServerPython\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¡RRR'R-R!RPR (Rt    setEnergyRoRžRœ((snD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActLianqi.pyR,ºs %cCs]|dkrdS|jtjƒ}tjd|||f|jƒƒt||||ƒdS(Nis2Á¶Æ÷»î¶¯»ý·ÖÔö¼Ó: curScore=%s,addScore=%s,actLV=%s(RRRRRRtSetLianqiScore(RR}tactLVtcurScore((snD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActLianqi.pyRmÊ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(R/RRR"RRR0R¡tDef_UpperLimit_DWordRRRRRtSendToGameServer_Lianqi(RtsetScoreR©t updBillboardt    lvHighesttupdScoret scoreHighest((snD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActLianqi.pyR¨Ôs$              RKcCsd|jƒ}t||gƒ}tjƒj|ddd|t|ƒƒtjd||f|ƒdS(Nit    ActLianqisÁ¶Æ÷»î¶¯·¢ËÍGameServer: %s, %s(RRLRRtGameServer_QueryPlayerResultR^tLog(RtmsgTypetdataMsgR1tmsgList((snD:\SG_ServerCode\ServerPython\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(RLR#ReR*tGivePlayerItemOrMailR/RRR(    RR?tawardLVR1t
curAwardLVtlvAwardItemDictt awardItemListt
awardStatet updAwardState((snD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActLianqi.pyRZõ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 RKi()RRRtChPyNetSendPackttagMCActLianqiPlayerInfoRtScoreRR«R tEnergyR!t
EnergyTimeR"t
LVAwardMaxR#t LVAwardStatetUseItemCntListR'R(R<R)R^t
UseItemLenRLRJtreplacetGridDatat GridDataLentMoveListRjtlistttagMCActLianqiTileMovetRowtColtToRowtToColRRt    MoveCountt NetPackCommont SendFakePack( RR?Rvt
clientPackR8tmoveInfottileMoveR7RDttoRowttoCol((snD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActLianqi.pyR s<     $!     "                     cCsdi}|sdS|jtjƒs&dS|jtjiƒ}|sEdS|jddƒ}|rotjd|ƒng}tjƒ}t|jtj    gƒƒ|_
t |j
ƒ|_ |jddƒ|_ |jddƒ|_|jddƒ|_|jddƒ|_|jd    dƒ|_|jd
dƒ|_t|ƒ|_t |jƒ|_tj||ƒdS( NtPersonalTemplateIDitActLianqiBillTemptZoneIDt    StartDateRKtEndDatet JoinStartTimet JoinEndTimetLVLimit(RRRtActKey_IpyDataInfoR'tGetIpyGameDataListRÁttagMCCrossActLianqiInfoRLtActKey_ServerIDRangeListtServerIDRangeInfoR^t ServerInfoLent GroupValue1RßtEndtDateRáRâtLimitLVt__GetTempRankBillPackListtPersonalBillboardInfoListtPersonalBillCountRÕRÖ(RR2t ipyDataDicttpersonalTempIDtpersonalTempIpyDataListR×((snD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActLianqi.pyR0s. 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    ItemCounttIsBindR<R^tCountt GetNeedScoret    NeedScoretAwardItemExListtGetScoreAwardExRitsortttagMCCrossActLianqiAwardExtCountEx(t ipyDataListt packBillListt tempIpyDatatrankInfoR¾R8t    itemCountt isAuctionItemtitemt scoreAwardExt scoreExListtscoreExt
itemExListtawardEx((snD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActLianqi.pyRíPsL        
                  
 
          
            ("RRR'RÕRÁR*R…RRR:R R%RdRR RR0R.RJR=R>R]RaRXRYR¦R,RmR¨R­RZRRRí(((snD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActLianqi.pyt<module>s@                        +                          t    \        
     $