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
o.Igc@såddlZddlZddlZddlZddlZddlZddlZddlZddlZddl    Z    ddl
Z
d„Z d„Z d„Z d„Zd„Zd„Zdd    „Zd
„Zd „Zd „ZdS( iÿÿÿÿNcCs‡x€tjjtjiƒjƒD]`}|jtjdƒ}t||ƒ}| r|jtjƒrt    ||ƒt
||ƒqqWdS(Ni( t
PyGameDatatg_operationActionDicttgett ShareDefinet#OperationActionName_FamilyCTGAssisttvaluest ActKey_ActNumt"__CheckPlayerFamilyCTGAssistActiont ActKey_StatetSync_FamilyCTGAssistActionInfotSync_FamilyCTGAssistPlayerInfo(t    curPlayertactInfotactNumtisReset((sxE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActFamilyCTGAssist.pyt OnPlayerLogins% cCs^tjƒ}xKt|jƒƒD]7}|j|ƒ}tj|ƒsIqnt||ƒqWdS(N(t    GameWorldtGetPlayerManagertxrangetGetPlayerCounttGetPlayerByIndextIsNormalPlayerR(R t playerManagertindexR ((sxE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActFamilyCTGAssist.pyt RefreshFamilyCTGAssistActionInfo*s cCs |jƒ}tjtj|ƒ}|jtjdƒ}|jtjdƒ}|jt    j
|ƒ}||kr‘tj d||f|jƒƒdStj d||||f|ƒt j |t    j
||ƒt j |t    j|dƒ|rt||ƒt||ƒntS(Nis3ÏÉÃ˳äֵЭÖú»î¶¯ID²»±ä£¬²»´¦Àí£¡ actNum=%s,actID=%ss@ÏÉÃ˳äֵЭÖú»î¶¯ÖØÖÃ! actNum=%s,actID=%s,playerActID=%s,state=%s(t GetPlayerIDRt
GetActInfoRRRt    ActKey_IDRtNomalDictGetPropertytChConfigtDef_PDict_FamilyCTGAssistIDtDebugLogt PlayerControltNomalDictSetPropertytDef_PDict_FamilyCTGAssistAwardR    R
tTrue(R R tplayerIDR tactIDtstatet playerActID((sxE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActFamilyCTGAssist.pyR5s     cCs—|jƒsdSg}x]tjjtjiƒjƒD]=}|jtjdƒ}|jtjƒr5|j    |ƒq5q5W|s€dSt
|d|gƒdS(Nit    PlayerCTG( t GetFamilyIDRRRRRRRRtappendt SendToGameServer_FamilyCTGAssist(R t
actNumListR R ((sxE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActFamilyCTGAssist.pyt OnPlayerCTGQs %cCsA|jƒ}tj|dƒ}|dkrBtjd||ƒdStjtj|ƒ}|jtjƒstjd||ƒdS|jtj    ƒ}|jtj
dƒ}t j d|ƒ}|sÄdStj |||ƒ}|sãdSt jd|ƒ}    |    sÿdSd}
g} x?|    D]7} || jƒkr0qn| jƒ}
| jƒ} PqW|
dkr}tjd||||f|ƒdS|jtj|ƒ} | td|
ƒ@rÍtjd    |||||
f|ƒdStj|| ƒsãdStjƒjƒ}tj|tj|ƒs!tjd
|ƒdSt|d |||
| gƒdS( su»î¶¯Ãâ·Ñ½±Àø
    @param ctgPlayers: ÒªÁìÈ¡µÄ³äÖµÈËÊý½±Àø
    @param actNum: »î¶¯±àºÅ£¬Èç11 »ò  12 ´ú±í²»Í¬µÄ»î¶¯
    is!ûÓÐÖ¸¶¨ÁìÈ¡µÄ»î¶¯±àºÅ! actNum=%sNs+ÏÉÃ˳äֵЭÖú·Ç»î¶¯ÖÐÎÞ·¨ÁìÈ¡½±Àø! actNum=%stActFamilyCTGAssisttActFamilyCTGAssistTempsNÏÉÃ˳äֵЭÖú»î¶¯Ã»Óиý±ÀøÐÅÏ¢! actNum=%s,cfgID=%s,templateID=%s,ctgPlayers=%siscÏÉÃ˳äֵЭÖú»î¶¯ÒѾ­ÁìÈ¡¹ý¸ÃÃâ·Ñ½±Àø! actNum=%s,cfgID=%s,templateID=%s,ctgPlayers=%s,recordIndex=%ss ÇëÇóCDÖÐ...tFamilyCTGAssistAward( RRtToIntDeftLogRRRRRt ActKey_CfgIDtActKey_DayIndext IpyGameDataPYtGetIpyGameDatat GetTemplateIDtGetIpyGameDataListtNonetGetNeedCTGPlayerstGetRecordIndextGetAwardItemListtErrLogRRR"tpowt ItemControlertCheckPackSpaceEnought GetGameWorldtGetTicktSetPlayerTickTimet TYPE_Player_Tick_FamilyCTGAssistRR+(R t
ctgPlayersR R$R tcfgIDtdayIndextipyDatat
templateIDttempIpyDataListt recordIndext awardItemListt tempIpyDatat awardRecordttick((sxE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActFamilyCTGAssist.pytGetFamilyCTGAssistAwardasZ              c Cs7|\}}}}|jƒ}|jtj|ƒ}|td|ƒ@rhtjd|||f|ƒdS|td|ƒO}tj|tj||ƒt    ||ƒx6|D].\}}    }
t
j |||    |
t j gƒq©Wi|d6|d6|d6|d6} tj|d| ƒtjd|||||f|ƒdS(    NisR·µ»ØÊ±ÏÉÃ˳äֵЭÖú»î¶¯ÒѾ­ÁìÈ¡¹ý¸ÃÃâ·Ñ½±Àø! actNum=%s,ctgPlayers=%s,recordIndex=%sR RERKRLR.scÏÉÃ˳äֵЭÖú»î¶¯ÁìÈ¡½±Àø! actNum=%s,ctgPlayers=%s,recordIndex=%s,updAwardRecord=%s,awardItemList=%s(RRRR"R>RRR R!R
R?tGivePlayerItemt IPY_GameWorldtrptItemtDataRecordPacktDR_FuncGiveItemR2( R tdataMsgR RERKRLR$RNtitemIDt    itemCountt isAuctionItemt addDataDict((sxE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActFamilyCTGAssist.pyt__DoGiveFamilyCTGAssistAward s"      #"    tcCsd|jƒ}t||gƒ}tjƒj|ddd|t|ƒƒtjd||f|ƒdS(NitFamilyCTGAssists"ÏÉÃ˳äÖµ»¥Öú·¢ËÍGameServer: %s, %s(RtstrRRtGameServer_QueryPlayerResulttlenR2(R tmsgTypeRVR$tmsgList((sxE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActFamilyCTGAssist.pyR+·s
 (cCs9|\}}}|sdS|dkr5t||ƒndS(NR0(R[(R tmsgDataRORaRVtret((sxE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActFamilyCTGAssist.pytGameServer_FamilyCTGAssist¾s  cCsBtjƒ}||_|jtj|ƒ|_tj||ƒdS(N(    tChPyNetSendPackt!tagMCActFamilyCTGAssistPlayerInfotActNumRRR"t AwardRecordt NetPackCommont SendFakePack(R R t
clientPack((sxE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActFamilyCTGAssist.pyR
Ês
     cCstjtj|ƒ}|jtjƒs+dS|jtjƒ}|jtjdƒ}tj    d|ƒ}|sndStj
|||ƒ}|sdStj d|ƒ}|s©dStj |ƒ\}}    |jtj |ƒ}
tjƒ}||_|
|_|    |_|jƒ|_|jƒ|_g|_xº|D]²} tjƒ} | jƒ| _| jƒ| _g| _xT| jƒD]F\} }}tjƒ}| |_ ||_!||_"| jj#|ƒqnWt$| jƒ| _%|jj#| ƒq(Wt$|jƒ|_&t'j(||ƒdS(NiR.R/()RRRRRRR3R4R5R6R7R8tGetOperationActionDateStrtActKey_StartDateSyncRfttagMCActFamilyCTGAssistInfoRht    StartDatetEndtDatet
GetLVLimittLimitLVt GetIsDayResett
IsDayResett AwardInfoListttagMCActFamilyCTGAssistAwardR:tNeedCTGPlayersR;t RecordIndext AwardItemListR<ttagMCActFamilyCTGAssistItemtItemIDt    ItemCounttIsBindR*R`tCountt
AwardCountRjRk(R R R RFRGRHRIRJt startDateStrt
endDateStrt startDateSyncRMtawardRWRXRYtitem((sxE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActFamilyCTGAssist.pyR    ÒsN                                    (RRR R5RfRTRjR?RRRRRRRR-RPR[R+ReR
R    (((sxE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActFamilyCTGAssist.pyt<module>s(                                 ?