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
Œ$ïic@såddlZddlZddlZddlZddlZddlZddlZddlZddlZd„Z    d„Z
d„Z d„Z dd„Z d„Zd    d
„Zd „Zd „Zd „Zdd„Zd„ZdS(iÿÿÿÿNcCs”xtjjtjiƒjƒD]m}|jtjdƒ}t||ƒ}| r|jtjƒrt    ||ƒt
||ƒt ||ƒqqWdS(Ni( t
PyGameDatatg_operationActionDicttgett ShareDefinetOperationActionName_Tasktvaluest ActKey_ActNumt__CheckPlayerActTaskActiont ActKey_StatetSync_ActTaskActionInfotSync_ActTaskPlayerValueInfotSync_ActTaskPlayerInfo(t    curPlayertactInfotactNumtisReset((slD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActTask.pyt OnPlayerLogins%  cCs^tjƒ}xKt|jƒƒD]7}|j|ƒ}tj|ƒsIqnt||ƒqWdS(N(t    GameWorldtGetPlayerManagertxrangetGetPlayerCounttGetPlayerByIndextIsNormalPlayerR(Rt playerManagertindexR ((slD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActTask.pytRefreshActTaskActionInfo)s c    Csa|jƒ}tjtj|ƒ}|jtjdƒ}|jtjdƒ}|jtjƒ}|j    t
j |ƒ}|j    t
j |ƒ}||kr³tj d||f|ƒdStj d|||||f|ƒ|rìt||ƒntj|t
j ||ƒtj|t
j ||ƒ|r]t||ƒt||ƒt||ƒt||ƒntS(Nis+ÈÎÎñ»î¶¯ID²»±ä£¬²»´¦Àí£¡ actNum=%s,actID=%ssEÈÎÎñ»î¶¯ÖØÖÃ! actNum=%s,actID=%s,playerActID=%s,state=%s,lastCfgID=%s(t GetPlayerIDRt
GetActInfoRRRt    ActKey_IDRt ActKey_CfgIDtNomalDictGetPropertytChConfigtDef_PDict_ActTaskIDtDef_PDict_ActTaskCfgIDtDebugLogt__ResetTaskValueByTemplateIDt PlayerControltNomalDictSetPropertyR    R
R tTrue(    R RtplayerIDR tactIDtstatetcfgIDt playerActIDt    lastCfgID((slD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActTask.pyR3s,         cCsÀ|s
dStjd|ƒ}|s&dS|jƒ}|jƒ}x1tjD]&}tj|tj||fdƒqHWt    |dƒ}x8t
|dƒD]&}tj|tj ||fdƒq’WdS(NtActTaskii
i( t IpyGameDataPYtGetIpyGameDatat    GetActNumt GetTemplateIDRtActTaskTypeListR$R%tDef_PDict_ActTaskValuet__GetTaskAwardRecordKeyNumMaxtrangetDef_PDict_ActTaskAward(R R*tipyDataRt
templateIDttaskTypettaskAwardKeyNumtkeyNum((slD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActTask.pyR#Ts  $$icCs\tjd|ƒ}|rXd}x/|D]'}|jƒ|kr%|jƒ}q%q%W|dS|S(Nt ActTaskTempii(R.tGetIpyGameDataListt    GetTaskID(R8t    defKeyNumttaskIpyDataListt    taskIDMaxt taskIpyData((slD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActTask.pyR4ls cCsš|jƒ}x‡tjjtjiƒjƒD]g}|jtjdƒ}|jtjƒs^q+n|jtj    ƒ}t
j d|ƒ}|sŽq+n|j ƒ}t
j d|ƒ}    |    s¸q+nd}
xG|    D]?} | jƒ|krãqÅn| jƒ} | |
krÅ| }
qÅqÅW|jtj||fƒ} || ks+|
dkrBq+ntj|tj||f|ƒtjd|||f|ƒt|||gƒq+WdS(NiR-R<s9¸üÐÂÈÎÎñ»î¶¯ÈÎÎñ½ø¶ÈÖµ: actNum=%s,taskType=%s,updValue=%s(RRRRRRRRRRR.R/R1R=t GetTaskTypet GetNeedValueRRR3R$R%RR"R
(R R9tupdValueR'R RR*R7R8R@t needValueMaxRBt    needValuetcurValue((slD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActTask.pytUpdActTaskValuews6 %      icCs§|jƒ}x”tjjtjiƒjƒD]t}|jtjdƒ}|jtjƒs^q+n|jtj    ƒ}t
j d|ƒ}|sŽq+n|j ƒ}t
j d|ƒ}    |    s¸q+nd}
xG|    D]?} | jƒ|krãqÅn| jƒ} | |
krÅ| }
qÅqÅW|jtj||fƒ} | |
kr6q+nt|
| |ƒ}tj|tj||f|ƒtjd|||||
f|ƒt|||gƒq+WdS(NiR-R<sH¸üÐÂÈÎÎñ»î¶¯ÈÎÎñ½ø¶ÈÖµ: actNum=%s,taskType=%s,addValue=%s,updValue=%s/%s(RRRRRRRRRRR.R/R1R=RCRDRRR3tminR$R%RR"R
(R R9taddValueR'R RR*R7R8R@RFRBRGRHRE((slD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActTask.pytAddActTaskValues: %           cCs=tj|ƒ}tjtj|ƒ}|s?tjd|ƒdS|jtjƒsftjd|ƒdS|jtjƒ}t    j
d|ƒ}|s”dS|j ƒ}t    j d|ƒ}|s¼dSd}x*|D]"}    |    jƒ|krÉ|    }PqÉqÉW|stjd||||fƒdS|jƒ}
|jƒ} |jƒ} |jtj|| fƒ} | | kr‰tjd||||| | fƒdS|}tj|tj|t|gƒrÎtjd|||fƒdStj|tj|dt|gƒtjd    ||||
fƒtj||
d
dtigƒt||ƒdS( NsûÓиÃÈÎÎñ»î¶¯£¡ actNum=%ss·ÇÈÎÎñ»î¶¯ÖУ¡ actNum=%sR-R<sBÕÒ²»µ½¶ÔÓ¦»î¶¯ÈÎÎñ½±Àø! actNum=%s,cfgID=%s,templateID=%s,taskID=%ssU»î¶¯ÈÎÎñδÍê³É£¬ÎÞ·¨ÁìÈ¡! actNum=%s,cfgID=%s,templateID=%s,taskID=%s,curValue=%s < %ss2ÈÎÎñ»î¶¯¸ÃÈÎÎñÒÑÁì½±! actNum=%s,cfgID=%s,taskID=%sis@ÁìÈ¡ÈÎÎñ»î¶¯½±Àø£¡ actNum=%s,cfgID=%s,taskID=%s,awardItemList=%stevent(RtToIntDefRRRR"RRRR.R/R1R=tNoneR>tGetAwardItemListRCRDRRR3tGetDictValueByBitR6R&tSetDictValueByBitt ItemControlertGivePlayerItemOrMailtFalseR (R ttaskIDRR R*R7R8R@t findIpyDataRBt awardItemListR9RGRHt
awardIndex((slD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActTask.pytOnGetActTaskAwardÅsR          !" c    CsÎg}tjtj|ƒ}|s%|S|jtjƒs;|S|jtjƒ}tjd|ƒ}|si|S|j    ƒ}tj
d|ƒ}|s‘|Sx6|D].}|j ƒ}||kr˜|j |ƒq˜q˜W|S(NR-R<( RRRRRRRR.R/R1R=RCtappend(    Rt taskTypeListR R*R7R8R@RBR9((slD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActTask.pytGetActTaskTypeListýs&    cCsÏ|jtj|ƒ}tjd|ƒ}|s2dS|jƒ}t|ƒ}tjƒ}||_    g|_
x>t |dƒD],}|j
j |jtj ||fƒƒqyWt|j
ƒ|_tj||ƒdS(NR-i(RRR!R.R/R1R4tChPyNetSendPackttagSCActTaskPlayerInfotActNumtAwardRecordListR5R[R6tlent
AwardCountt NetPackCommont SendFakePack(R RR*R7R8t    keyNumMaxt
clientPackR;((slD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActTask.pyR s           *cCs´|dkrt|ƒ}ntjƒ}||_g|_xR|D]J}tjƒ}||_|jt    j
||fƒ|_ |jj |ƒq@Wt |jƒ|_tj||ƒdS(N(ROR]R^ttagSCActTaskPlayerValueInfoR`t TaskValueListttagSCActTaskPlayerValuetTaskTypeRRR3t    TaskValueR[Rbt    TaskCountRdRe(R RR\RgR9t taskValueInfo((slD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActTask.pyR
$s                cCsËtjtj|ƒ}|sdS|jtjƒs5dS|jtjƒ}tjd|ƒ}|scdStj    |ƒ\}}t
j ƒ}||_ |jtj |ƒ|_||_||_tj||ƒdS(NR-(RRRRRRRR.R/tGetOperationActionDateStrR^ttagSCActTaskInfoR`tActKey_StartDateSynct    StartDatetEndtDatetCfgIDRdRe(R RR R*R7t startDateStrt
endDateStrRg((slD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActTask.pyR    5s"             (RRR$R.R^RSRdRRRRRR#R4RIRLRZR]R ROR
R    (((slD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActTask.pyt<module>s(                  
    !         & (    8