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
%×þ[c@s„ddlZddlZddlZddlZddlZddlZddlZddlZddlZddl    Z    ddl
Z
ddl Z ddl Z ddl Z ddlZddlZddlZddlZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd    „Zd
„Zd d ed „Zd „Zd„Zed„Zd„Z d„Z!d d„Z"d„Z#dS(iÿÿÿÿNcCs{|jtjƒ}|d}|d}|rg|ddd}tj|tj|ƒt|dtƒntj|dƒdS(Ni
ii(tNomalDictGetPropertytChConfigt Def_PDict_HelpBattleCheckInCountt PlayerControltNomalDictSetPropertytSyncCheckInStatetFalsetSetTodayXianyuanCoin(t    curPlayert checkInInfot checkInCountttodayIsCheckIn((s~E:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBHelpBattle.pyt DoPlayerOnDay%s
 
cCs9|jtjƒ}|d}|r5t|dtƒndS(Ni
i(RRRRtTrue(RR    R ((s~E:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBHelpBattle.pyt DoPlayerLogin2s
 
cCs8tjƒ}||_t|ƒ|_tj||ƒdS(N(tChPyNetSendPackttagMCHelpBattleCheckInResulttIsOKtinttIsLogint NetPackCommont SendFakePack(Rt checkInStatetisLogint checkInPack((s~E:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBHelpBattle.pyR9s
     cCsu|s
dS|d}|dkr3t|||ƒn|dkrRt|||ƒn|dkrqt|||ƒndS(NitCheckIntRefresht
HelpRecord(t__OnHelpBattleCheckInResultt__OnHelpBattleRefreshResultt__OnHelpBattleRecord(RtmsgListtticktcmd((s~E:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBHelpBattle.pytGameServer_FBHelpBattleResultAs
   c    Cs®tjƒj|ƒ}|jtjƒ}|d}|d}|r[tjd|jƒƒdS|jƒ}t    d||gƒ}tjƒj
|j ƒddd|t |ƒƒdS(Ni
sµ±ÌìÒѵǼǣ¬²»ÐèÒªÖØ¸´µÇ¼Ç£¡Rit FBHelpBattle( t    GameWorldtGetPlayerManagertGetPlayerByIndexRRRtDebugLogt GetPlayerIDt GetFightPowertstrtGameServer_QueryPlayerResulttGetIDtlen(    tindext
clientDataR RR    R
R t
fightPowertmsgInfo((s~E:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBHelpBattle.pytOnHelpBattleCheckIn\s
 
 .c    Cs²|\}}}}}|ru|ddd}tj|tj|ƒtj|tjƒ|sutj    ||t
ƒqunt |dt
ƒt j d|||||f|jƒƒdS(Nii
sMFBHelpBattleResult: %s,checkInCount=%s,fightPower=%s,isOK=%s,haveViewCache=%s(RRRRtPlayerActivitytAddDailyActionFinishCntt ShareDefinetDailyActionID_HelpBattleCheckIntPlayerViewCacheTubetUpdateGameServerPlayerCacheRRR$R'R((    RRR R!R
R0tisOKt haveViewCacheR    ((s~E:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBHelpBattle.pyRis     c+    CsÁtjƒj|ƒ}|j}|j}|jƒ}tjƒ}tj|j    ƒƒ}tj
ƒ}    t j d||    ƒ}
|
sdSt jj|iƒ} t jddƒ} d} g}g}x¢| jƒD]”\}}|jtj|ƒ}|r||krtjd|ƒdS| d7} qÅ|jddƒsÅd|krI|j|ƒqY|j|ƒqÅqÅW| | krtjd    | |ƒdSi}|rp| | }|rtj|t|t|ƒƒƒ}|t|ƒ8}x1|D]&}| |}|jd
dƒ||<qÕWn|dkr6|r6x|| D]}d||<qWn| t|ƒ| krKtjd | || f|ƒdSnÛ|| kr”tjd ||ƒdS| |}|jddƒr5t jdd ƒ}tj|tj |ƒ}|sädSi|d6|    d6dd6}x3|D](\}}tj!|||tj"|ƒqWn|jd
dƒ||<t jddƒ}|j#ƒ|j$ƒ}}x¼|j%ƒD]®}|| kr›qƒn| |}|jddƒ} d|krÚ|d}!|d}"n%|
j&ƒ}!|
j'ƒ}"|j(|ƒ|
j)ƒ}#t*j+||ddƒ}$|$j#ƒ|$j$ƒ}%}&t,j-||%|&ƒ}'|'s]qƒn|'j.ƒ}|'j/t0ƒtjd|||!f|ƒ|j1tj||ƒ|'j2tj3| dƒ| d7} t,j4|'ƒ}(|(j5|!ƒt6|'|#| |"ƒt7j8ƒ})||)_9||)_| |)_:t;j<||)ƒqƒW| | krTt=j>||ƒn|r½t?d||    |gƒ}*tjƒj@|j.ƒddd|*t|*ƒƒtjd|*|j.ƒƒndS(NR#tHelpBattleCalliis:¸ÃÖúÕ½»úÆ÷ÈËIDÒѾ­ÕÙ»½¹ý£¬²»ÔÊÐíÖØ¸´ÕÙ»½!calledPlayerID=%sit NeedGoldCalltNames*ÒѾ­ÕÙ»½ÂúÈËÊý£¡ÎÞ·¨ÔÙÕÙ»½£¡calledCount=%stRelationsOÎÞ·¨Ò»¼üÕÙ»½!ÈËÊý²»×ã! calledCount=%s,calledPlayerDict=%s,maxHelpPlayerCount=%ss-²»´æÔÚ¸ÃÖúÕ½Íæ¼Ò£¬ÎÞ·¨ÕÙ»½£¡calledPlayerID=%sitMapIDtlineIDtCalltTypetHelpBattleRobottJobt
FightPowertLVis6ÕÙ»½ÖúÕ½³É¹¦: calledPlayerID=%s,objID=%s,fightPower=%siès GameServer_QueryPlayerResult: %s(AR$R%R&t IsOneKeyCalltPlayerIDR(t    GetGameFBtFBCommontGetRecordMapIDtGetMapIDtGetFBPropertyMarkt IpyGameDataPYtGetIpyGameDatat
PyGameDatatg_fbHelpBattlePlayerDicttgett
GetFuncCfgtitemstGetGameFBDictByKeyRtDef_FB_HelpBattleFBObjIDR'tappendtLogtrandomtsampletminR-tErrLogRt HaveMoneyExR5tTYPE_Price_Gold_Paper_MoneytPayMoneytDef_Cost_FBHelpBattletGetPosXtGetPosYtkeystGetRobotFightPowert
GetRobotLVtpoptGetRobotSkillsDicttGameMaptGetEmptyPlaceInAreaExt    NPCCommont SummonMapNpcR,tSetIsNeedProcessR t SetGameFBDicttSetDicttDef_NPC_Dict_AtkDelayTickt
NPCControltSetHelpBattleRobotRebornAttrt__DoGiveHelpBattleRobotSkillRttagMCHelpBattleCallResulttObjIDRDRRtFBLogictOnCallHelpBattleOKR*R+(+R.R/R Rt isOneKeyCalltcalledPlayerIDtplayerIDtgameFBtmapIDt
funcLineIDtipyDatathelpBattlePlayerDicttmaxHelpPlayerCountt calledCounttfreePlayerIDListthelpNPCRobotIDListt helpPlayerIDthelpPlayerInfoDicttobjIDtcalledPlayerDictt    lackCountt
randIDListtrandIDtrobotIDt goldCallCostt costMoneyListtinfoDictt    moneyTypetmoneyNumt
robotNPCIDtposXtposYtjobR0tnpcLVt jobSkillDicttpositiontnpcPosXtnpcPosYt helpBattleNPCt
npcControltcallResultPackR1((s~E:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBHelpBattle.pytOnHelpBattleCall„sÄ               
! 
     
# 
 
 
               .c
CsÆ|jƒ}||krdS||}g}x[|jƒD]M\}}||krWq9nt|tƒrv|j|ƒq9|t|ƒ7}q9Wtjd|||fƒx|D]}    |j|    ƒq«WdS(Ns)    ¸øÖúÕ½»úÆ÷È˼¼ÄÜ: job=%s,npcLV=%s, %s(    tGetSkillManagerRTt
isinstanceRRWtlistR$R'tLearnSkillByID(
tcurNPCR•R“R”t skillManagert skillInfoDictt skillIDListt    skillInfotneedLVtskillID((s~E:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBHelpBattle.pyRrÿs  
  cCs)tjƒj|ƒ}t|dtƒdS(NtisClientRefresh(R$R%R&t&SendGameServer_RefreshHelpBattlePlayerR (R.R/R R((s~E:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBHelpBattle.pytOnHelpBattleRefreshsicCs©|stj|jƒƒ}n|s3tjƒ}ntjd||ƒ}|sRdS|jƒ}tjƒ}g}i}|j    |t
j ƒ}    |rÑtj ddƒ}
tj ddƒ} |    |
| krÝtj d|    |ƒdS|    |
kr-tj ddƒ} tj|tj| ƒ}|s-tj dƒdSntjj|iƒ} x| jƒD]{\}}|jt
j|ƒ}|s}qOn|jt
j|ƒ}|jddƒ}|jd    d
ƒ}|||g||<qOWnt|    sð|j|t
j d
ƒn|jt
j|jƒƒ|jt
j|jƒƒtj d |jƒ|jƒfƒtd |||||gƒ}tj ƒj!|j"ƒd
d
d|t#|ƒƒtj$d ||ƒdS(NR#tHelpBattleRefreshiis.³¬¹ýË¢ÐÂÖúÕ½Áбí´ÎÊý£¡ÎÞ·¨Ë¢ÐÂ!refreshCount=%sis»õ±Ò²»×ã!ÎÞ·¨Ë¢ÐÂÖúÕ½£¡RDR>isÉèÖø±±¾Õ½Á¦=%s,±£µ×É˺¦=%sRs)SendGameServer_RefreshHelpBattlePlayer %s(%RJRKRLRMRNROR(R$RItGetPlayerGameFBDictByKeyRtFBPD_HelpBattleRefreshCountRSR'RR]R5R^RPRQRRRTRURVtDef_FB_HelpBattleGoldCalltSetPlayerGameFBDictRmtFBPD_HelpBattleFBFightPowertGetFightPowerMintFBPD_HelpBattleFBBaseHurttGetRobotBaseHurtR*R%R+R,R-RX(RR{R|R¨R}RyRzRŒtcalledPlayerIDDictt refreshCounttfreeRefreshCounttgoldRefreshCounttcostGoldR~RƒR„R…t needGoldCallR“trelationR1((s~E:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBHelpBattle.pyR©sT    #.c    Cs<|\}}}}}}}    |jƒ}
tjƒ} i|d6|d6dd6} x0|D](\} }tj|| |tj| ƒqUW| j|
tjƒ}|r¿|d7}| j    |
tj|ƒntj
d|||||||f|
ƒtj
d|    |
ƒ|    t j |
<t jƒ}||_g|_xì|    jƒD]Þ\}}t jƒ}| jtj|ƒ|_||_|jddƒ|_d    |kr|d    |_t|jƒ|_|d
|_|d |_|d |_|jd dƒ|_|jddƒ|_ n|jj!|ƒq4Wt|jƒ|_"t#j$||ƒdS(NR?R@RRBiswFBHelpBattleResult: %s,mapID=%s,funcLineID=%s,isClientRefresh=%s,costMoneyList=%s,calledPlayerIDDict=%s,refreshCount=%ss    helpBattlePlayerDict=%sRDR=RFtRealmLVRER>iR<(%R(R$RIRR_RR`R¬R­R¯RXRPRQRttagMCHelpBattleListt RefreshCounttHelpPlayerListRTttagMCHelpBattlePlayerRURVRtRHRRRDR=R-tNameLenRFR»RER>t
IsNeedGoldRWt    HelpCountRR(RRR R!R{R|R¨RŒR´R~RyRzRRŽRRµthelpPlayerListPackRƒR„t
helpPlayer((s~E:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBHelpBattle.pyRSsD   
                         c    Csl|\}}|jƒ}tjd||f|ƒd}d}g}|jtjƒ}    tjƒ}
g|
_x,|D]$} | \} } }}}}}}tj    |ƒ}tj
|ƒ}tj ƒ}| |_ | |_ t|j ƒ|_||_||_||_||_||_||_|
jj|ƒ|ji| d6|d6|d6|d6|d6|d6|d    6|d
6ƒ||7}|rŒ||7}n|    d 7}    qrWt|
jƒ|
_tj||
ƒi|d 6}tjd |||    f|ƒtj|tj|d|dtƒ|r!tj||ƒntj |tj|    ƒ|    t!j"ddƒkrht#j$|tj%|    ƒndS(Ns)__OnHelpBattleRecord %s,helpRecordList=%sit CallPlayerIDR?t
FuncLineIDtXianyuanCoinAddR>tVIPLVtHelpTimet    IsSameDayitHelpListsJ    addXianyuanCoinTotal=%s,addXianyuanCoinTotalTotay=%s,totalHelpCount=%st addDataDictt    isSysHintR«i(&R(R$R'RRtDef_PDict_HelpBattleTotalCountRttagMCHelpBattleRecordListt
RecordListtChangeTimeNumToStrtCheckTimeIsSameServerDayExttagMCHelpBattleRecordRÅtCallPlayerNameR-RÀR?RÆRÇR>RÈRÉRWt RecordCountRRRt    GiveMoneyR5tTYPE_Price_XianyuanCoinRtAddTodayXianyuanCoinRRNRStPlayerBillboardtUpdatePlayerBillboardtDef_BT_FBHelpBattle(RRR R!thelpRecordListRytaddXianyuanCoinTotaltaddXianyuanCoinTotalTotaytdrListttotalHelpCountt
recordPackt
recordInfot callPlayerIDtcallPlayerNameR{R|txianyuanCoinAddRºtvipLVt
recordTimettimeStrt    isSameDaytrecordRÌ((s~E:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBHelpBattle.pyRsT                                         % 
      "c
CsÁ|jƒ}tjd|ƒ}|s(dSd}d}|sI|jƒ}n¤|jƒ}|jƒ}    |    rí|jtj|ƒ}
|
|    kr¬d}d}t    j
d||ƒqí|
d7}
t j |tj||
ƒt    j
d||
f|ƒntj ddƒ} tjddiƒ} t j|ƒ} | }|jƒrj|tj|tjƒ7}|tj|tjƒ7}nd\}}}}t    jƒjƒ}|tjkr(tjj|iƒ}xµ|jƒD]b}|jd
dƒ}|sãq¿n| jt|ƒgƒ}|t|ƒdkr|dnd7}q¿WnB|tjkrj|tj krjtj j!|ƒ\}}}}qjnd}|r‘t"|||d ƒ}nt#|| dƒ}t$||ƒ}|dkrÏ| rÏd}nt    j
d |||||||f|ƒ|rAi|d 6|d6}t j%|t&j'|d|ƒt j(||ƒnt)j*ƒ}||_+||_,||_-||_.||_/||_0||_1||_2t|j2ƒ|_3t4j5||ƒ||fS(sµÕæÈËÌôÕ½¸±±¾Ôö¼ÓÏÉÔµ±Ò£¬°üº¬¹ý¹Ø»òÖúÕ½£¨²»º¬¾µÏñÖúÕ½£©
    @param isHelp: ÊÇ·ñÖúÕ½µÄ
    @return: »ñµÃµÄÏÉÔµ±Ò, ÎÞ·¨»ñµÃÏÉÔµ±ÒÔ­Òò(1-´ïµ½ÖúÕ½´ÎÊýÉÏÏÞ£¬2-´ïµ½Ã¿ÈÕ»ñµÃÏÉÔµ±ÒÉÏÏÞ)
    tFBFuncii'is5´ïµ½Ã¿ÈÕÖúÕ½¿É»ñµÃÏÉÔµ±Ò´ÎÊýÉÏÏÞ£¡ÎÞ·¨ÔÙ»ñµÃ!mapID=%ss7Ôö¼ÓÿÈÕÖúÕ½¿É»ñµÃÏÉÔµ±Ò´ÎÊý!mapID=%s,todayHelpCount=%stHelpBattlePointitR>gˆÃ@s{ÌôÕ½¸±±¾Ôö¼ÓÏÉÔµ±Ò: baseFBPoint=%s,relationAdd=%s,addCoinRate=%s,coinAdd=%s,canAddMax=%s,coinAddReal=%s,relationPlayerID=%sR?RÆRÌ(ii(iiis(6R(RNROt
GetFBPointt GetHelpPointtGetDayHelpCountMaxRRtDef_PDict_FBRealHelpCountR$R'RRRStGetFuncEvalCfgtGetTodayXianyuanCointGetVIPLvt    PlayerViptGetPrivilegeValuet!VIPPrivilege_XianyuanCoinUpperAddtVIPPrivilege_XianyuanCoinAddPertGetMapt GetMapFBTypet IPY_GameWorldt    fbtSingleRPRQRRtvaluesR*R-tfbtTeamtg_teamFBMemRelationAddDictRfRtmaxR[RÖR5R×RØRttagMCAddXianyuanCoinMsgR?RÆR>tRelationCoinAddRÇtReasonRÅRÔRÀRR(RR{R@tisHelpRyt fbFuncIpyDatatreasont addCoinRatet baseFBPointtdayHelpCountMaxttodayHelpCounttxianyuanCoinUppertrelationCoinAddDictttodayXianyuanCointplayerXianyuanCoinUpperRºt relationAddtrelationPlayerIDtrelationPlayerNametfbTypeR~R„trelationAddListtcoinAddt    canAddMaxt coinAddRealRÌtmsgPack((s~E:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBHelpBattle.pytDoFBAddXianyuanCoin³s€    
 -$                                          c
Csd}d}d}d}|jƒ}|tjkrC||||fStjƒ}tj|\}    }
} tjddgƒ} tjddiƒ} |jƒ}|jƒ}|r[x_|
j    ƒD]š\}}t
|||||| |    |ƒ\}}|sùqºn|}| j t |ƒgƒ}|t |ƒdkr6|dnd7}| |}||||fSWn´x±|
j    ƒD]£\}}t
|||||| |    |ƒd}|s¥qhn|| dkr¾|}n|rÍ|}n| j t |ƒgƒ}|t |ƒdkr|dnd7}qhW||||fS(NiRíRìiii(t    GetTeamIDRPtg_teamFBMemRelationDictR$tGetMapCopyPlayerManagerRNRòR(t GetFamilyIDRTt__GetTemMemRelationRRR*R-(RRt leavePlayerIDRºRRRtteamIDt playerManagert
friendListtmemFamilyIDDictt memNameDictt relationListR RytfamilyIDt memPlayerIDt memFamilyIDt memRelationR((s~E:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBHelpBattle.pyt__GetTeamFBMemRelationInfo    sD    '&
%        *c
Cs¸|r||krdS|j|ƒ}|dks=|jƒrAdSxp|D]h}    |    dkry||g|kry|    |fSn|    dkrH||kr°|r°||kr°|    |fSqHqHWdS(Niii(ii(ii(ii(tFindPlayerByIDtNonetIsEmpty(
R RyR%R&R'R$R!Rt    memPlayert checkRelation((s~E:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBHelpBattle.pyR4s    c
CsItjƒ}x¾t|jƒƒD]ª}|j|ƒ}|dks|jƒrRqn|rƒ|jƒ|krƒtj    j
|dƒqnt |t j |ƒ|ƒ\}}}}||||gtj    |jƒ<qWxut|jƒƒD]a}    |j|    ƒ}|dksà|jƒrqàn|r1|jƒ|kr1qàntj||ƒqàWdS(Ni(R$RtxrangetGetPlayerCountR&R+R,R(RPRÿRfR)RJtGetIsHelpFightRutDoFBHelp(
R RR titplayerRºRRRR.((s~E:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBHelpBattle.pytRefershTeamFBMemRelationDs$ '#cCs"|tjkrdStj|d S(Nii(ii(RPRÿ(Ry((s~E:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBHelpBattle.pytGetTeamFBMemRelationInfo[s($R$RRRÙRRR7RJRNR5RPRYRhRjRuRõRûR3R RRR"R2RRœRrRªRR©RRRR)RR5R6(((s~E:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\FBHelpBattle.pyt<module>sD                                                {        5    ,    4 V    +