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
ž^÷[c@sddlZddlZddlZddlZddlZddlZddlZddlZddlZddl    Z    ddl
Z
ddl Z ddl Z ddl Z ddlZddlZddlZddlZddlZddlZddlZdZdZdZdZdZdZdZd    Zd
Zd Zd Ze d ƒ\Z!Z"Z#e d ƒ\Z$Z%Z&d„Z'd„Z(d„Z)d„Z*d„Z+d„Z,d„Z-d„Z.d„Z/d„Z0d„Z1d„Z2d„Z3d„Z4d„Z5d„Z6e7d„Z8d„Z9d „Z:d!„Z;d"„Z<d#„Z=d$„Z>d%„Z?d&„Z@d'„ZAd(„ZBd)„ZCd*„ZDd+„ZEd,„ZFd-„ZGdS(.iÿÿÿÿNs FBPD_Score%st FBPD_KillCnttFBPD_LastCheckTicktFBPD_LastCheckTick1tFBPD_ContKillCntExsFBPlayerDict_TotalExp%ssFBPlayerDict_TotalExpPoint%st FBPD_EnemyIDt RebornBuffLVtMap_ElderBattlefield_StartTicktMap_ElderBattlefield_TopPlayericCst|tƒdS(N(tOnElderBattlefieldFBResulttTrue(t    curPlayer((s|.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_ElderBattlefield.pytOnLoginHs cCsWtjd|ƒ|dkrLtjƒjt|ƒtjƒjtdƒntƒdS(Ns!    ÉϹÅÕ½³¡»î¶¯×´Ì¬±ä¸ü state=%sii(t    GameWorldtDebugLogt GetGameWorldtSetGameWorldDictRRt GiveJoinPrize(tstatettick((s|.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_ElderBattlefield.pytOnElderBattlefieldStateChangeLs  cCsetjƒjƒ}tjƒjƒd}tj||ƒ}|rax|D]}tj|ƒqGWndS(Ni(    R tGetMaptGetMapIDRt GetPropertyIDtFBCommontGetFBLineRefreshNPCtNPCCustomRefreshtSetNPCRefreshByID(RtmapIDtlineIDt refreshIDListt    refreshID((s|.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_ElderBattlefield.pytOnOpenFBas cCstjƒjdƒdS(Ni(R Rt SetPropertyID(R((s|.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_ElderBattlefield.pyt    OnCloseFBpscCstjd||fƒtS(NsOnEnterFBEvent map %s - %s(R R R    (R
RRR((s|.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_ElderBattlefield.pytOnEnterFBEvent{scCstjd|jƒƒtjS(NsOnChangeMapAsk  CopyMapID=%s(R R t GetCopyMapIDt IPY_GameWorldt    cmeAccept(taskR((s|.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_ElderBattlefield.pytOnChangeMapAsk…scCsh|jƒ}tjd|ƒtjƒ}|jƒ}tjƒjtƒ}tdt    j
t j ƒd||ƒ}|s‡t j|ƒdS|jtjd|tƒt    j|ƒsWt    j|ƒt    j|t j ƒrWt j|t jdƒtjƒjt|dƒtjƒjt|dƒtjƒjt|dƒtj|t j dt jƒqWnt||ƒdS(Ns DoEnterFB...iiè( t GetPlayerIDR R t    GetGameFBt    GetFBStepRtGetGameWorldDictByKeyRtmaxRtGetFBLineStepTimetChConfigtDef_FBMapID_ElderBattlefieldt PlayerControlt PlayerLeaveFBt Sync_TimeTickR$t tttTowerTakeR    tGetHadDelTickettSetHadDelTickettAddEnterFBCounttNomalDictSetPropertyt%Def_Player_Dict_ElderBattlefieldStageRtFBPlayerDict_ScoretFBPlayerDict_TotalExptFBPlayerDict_TotalExpPointt EventReportt WriteEvent_FBt CME_Log_StarttDoFBHelp(R
RtplayerIDtgameFBtfbStept    startTicktcloseFB_RemainTick((s|.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_ElderBattlefield.pyt    DoEnterFB‘s(   '  " cCs tj|ƒS(N(trandomtchoice(R
RtlineIdtipyEnterPosInfoR((s|.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_ElderBattlefield.pytOnGetFBEnterPos³scCsytjtjdƒ}tj|ƒ}t|ƒdkr<dn|d}tj|d|d|ƒ}|j    ƒ|j
ƒfS(Niiii( RtGetFBLineEnterPosInfoR.R/RFRGtlentGameMaptGetEmptyPlaceInAreatGetPosXtGetPosY(RItenterPostdisttposPoint((s|.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_ElderBattlefield.pyt __GetRandPos¸s
"cCs7tjdƒ}x!|D]}tj|||ƒqWdS(NtElderBattlefieldBuff(t IpyGameDataPYtGetFuncEvalCfgt    BuffSkilltDelBuffBySkillID(R
Rt
buffIDListtbuffID((s|.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_ElderBattlefield.pytDoExitFBÄs cCsdS(N((R
R((s|.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_ElderBattlefield.pytDoPlayerLeaveFBÑscCsB|jƒ}tjƒ}|j|tdƒ|j|tdƒdS(Ni(tGetIDR R)tSetPlayerGameFBDicttFBPlayerDict_ContKillCntExtFBPlayerDict_EnemyID(R
R@RA((s|.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_ElderBattlefield.pytDoPlayerChangeMapLogic×s
  cCs/tjƒjƒ}|tkrFtjtjƒr+tjt    |ƒq+nå|t    kr+tjtjƒstj
ƒj t ƒ}|rêt jdƒ}|rÑtjd|g|ƒtjddtj|ddgƒntj
ƒjt dƒntjt|ƒtjƒtj|ƒq+t|ƒt|ƒndS(NtElderBattlefieldTopAwardtElderBattlefieldTopMailitElderBattlefieldBest(R R)R*t FB_Step_OpenRtGetFBFuncOpenStateR.R/t    SetFBSteptFB_Step_FightingRR+RRVRWR0t SendMailByKeyt WorldNotifyt
PyGameDatatg_sgzztopPlayerNameRt FB_Step_OvertDoLogic_FBKickAllPlayertGameWorldProcesstCloseFBt__CheckRefreshBuffNPCt__RefreshRobot(RRBt topPlayerIDt topAwardList((s|.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_ElderBattlefield.pyt    OnProcessås&  '
 
 cCsotjƒ}|jtƒ}|r5||dkr5dS|jt|ƒtjddƒ}tjddƒ}g}d}tjƒ}xst    |j
ƒƒD]_}|j |ƒ}    |    j ƒ}
|
|krÇq”n||    j ƒ7}|    j ƒs”|j|
ƒq”q”W||} | s dStj|ƒtjddƒ} x1||  D]%} tj| | dfgddƒq5Wtj|ƒdS(Ni'RUiiiii(R R)tGetGameFBDictByKeyRt SetGameFBDictRVRWt
GetFuncCfgt GetNPCManagertxrangetGetCustomNPCRefreshCounttGetCustomNPCRefreshAttGetRefreshMarktGetCounttappendRFtshuffleRt SetNPCRefreshtProcessAllNPCRefresh(RRAt lastCheckTicktallRmarktmaxCntt    rmarkListtnpcCnttgameNPCtit
npcRefreshtrmarkt
needAddCnttnpcIDtrMark((s|.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_ElderBattlefield.pyRrs6     
 # cCsßtjƒ}|jtƒ}|r5||dkr5dS|jt|ƒtjƒjƒ}tjj    |gƒ}t
j ddiƒ}tjƒj ƒd}||kr§dSt
j ddƒ}d}i}    tj ƒ}
xgt|
jƒƒD]S} |
j| ƒ} | jƒ} | |krqän| jƒ}||    | <||7}qäW||}tjƒjƒ}t|t||tƒ}||t|ƒ}t
jdƒ}d}x0|D](}|||dkrÀPn|d7}q¢W||tj|<||}|dkrÛt
j dd    iƒj    |dƒ}|s dStj|ƒd}x•t|ƒD]‡\} }||kr\Pn|    j    |dƒ}| t|ƒdkrŠdn||}||7}||}tj|||fg||ƒq@Wtj|ƒndS(
NiÐtElderBattlefieldCfgiitElderBattlefieldRobotiiièi( R R)RwRRxRt    GetLineIDRltg_elderBattleRobotDieDicttgetRVRWRRzR{R|R}R~RtGetMapCopyPlayerManagertGetPlayerCounttmint Def_TotalCntt Def_RobotCntRLRyRFRt    enumerateRR‚Rƒ(RRAR„tfblineidtg_elderBattleRobotDieListt robotCfgDictRR‡t    curNPCCntt robotCntDictR‰RŠR‹RŒtcnttrobotCfgt curPlayerCntt maxRobotCnttextraCntt
rebornTimet    rebornCnttdieTickt
refreshCntRŽt hasRefreshCntRtcurCntt    curMaxCnt((s|.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_ElderBattlefield.pyRs%sf      
 
 
 !  &
 
#cCsetjƒ}xRt|jƒƒD]>}|j|ƒ}|dks|jƒ rSqnt|ƒqWdS(N(R tGetPlayerManagerR{R–tGetPlayerByIndextNonet    GetInitOKR(t playerManagerRŠR
((s|.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_ElderBattlefield.pyRds cCs-tjd||jƒƒd}tjtj|ƒ}|jtjdƒ}|j    |gƒ}t
j |t j t jgƒ}t
j||tƒ}| r¡| r¡dSg}x*|D]"\}    }
|j|    |
dgƒq®Wx0|jƒD]"\}    }
|j|    |
dgƒqáWt|ƒ} tj|tj| ƒ} tjƒjƒ} | tjks^|s^| | kr}tjd|jƒg|ƒn–xE|D]=\}    }
}tj||    |
|tjgddtigƒq„Witj|ƒtj6tj|jƒƒtj 6}tj!|tj|d|ƒtj"|tjdƒdS(Ns)    Íæ¼Ò´¦ÀíÉϹÅÕ½³¡½áËãÐÅÏ¢ , isLogin=%siitElderBattlefieldMailteventtElderBattlefield(#R R R(RtGetFBLineRewardR.R/tNomalDictGetPropertyR8R”t PlayerSuccesstGetCanGetAwardSuccByTypet ShareDefinetSuccType_ElderBattlefieldKillt SuccType_ElderBattlefieldConKillt GiveSuccAwardtFalseR€titemsRLt
ItemCommontGetItemPackSpaceR$trptItemRRR0Rjt ItemControlertGivePlayerItemtGetJsonItemListt Over_itemInfotOver_succItemInfot NotifyFBOverR7(R
tisLoginRt fbRewardDicttcurStagetitemListt
succIDListt succAwardDicttrewardItemListtitemIDtitemCntt    needSpacet
emptySpaceRtisBindtoverDict((s|.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_ElderBattlefield.pyRps2 !22cCsè|jƒ}tjƒ}|jt|ƒ|}|jt||ƒ|jtƒ}| sr||jt|ƒkr°|jt|ƒ|jƒ}|t_    t
j dd|gƒn|jtƒ|krGtj ƒ}xst d|jƒƒD]Y}    |j|    ƒ}
|
dksç|
jƒ rqçn|
jƒ|kr3qçnt|
dƒqçWn|jtjdƒ} tjddƒ} | t| ƒkrä|| | kräd} t
j|ƒ}tjdƒ}x^| | D]R}||kr¿| j|ƒd}ttjd|||ƒƒ}| |7} q¿q¿Wtjd| || f|ƒt
j
|ƒj| ƒ|jt |ƒ}|jt!|ƒ}|tj"|}|| }|tj"}|tj"}|jt ||ƒ|jt!||ƒt
j#|tj|ƒn|S(    NitAncientBattlefield_9RitElderBattlefieldExpisElderBattlefieldExp%ss&curStage=%s,updStage=%s,addTotalExp=%s($R(R RR+R9RRtGetNameRlRmR0RkR¬trangeR–R­R®R¯R?RµR.R8RVRWRLtGetPlayerReExptindextevaltFormulaControltGetCompileFormulaR tAddExpR:R;tDef_PerPointValueR7(R
RAtaddValueR@t    gameWorldtupdScoreRtttopNameR°RŠtplayerRÉtstageScoreListt addTotalExptreExptexpFormulaDicttscoretupdStagetaddExptexptexpPointttotalExpt updTotalExptupdExpt updExpPoint((s|.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_ElderBattlefield.pyt __AddElderBattlefieldPlayerScore‘sT         "  
  c CsXtjƒ}|jƒ}|jt|ƒ}tjddƒ}t|jt    j
dƒdt |ƒƒ}|jt |ƒ}|jt |ƒ}i|tj6|tj6|tj6|tj6}    |jtƒ}
|jt|
ƒ} |
rêtjnd|    d<|
r| nd|    d<|
|    d<tjƒj|tƒ|    d    <tjd
|    |ƒtj||    ƒdS( NRiiitRâttopScoreRttenemyIDs DoFBHelp %s(R RR(R+R9RVRWR—RµR.R8RLR:R;Rt
Help_scoret    Help_steptHelp_expt Help_expPointRRlRmR)tGetPlayerGameFBDictByKeyRaR t Notify_FBHelp( R
RRàR@RèRäRÉRëRìthelpDictRtRó((s|.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_ElderBattlefield.pyR?Ìs$  (
cCs>|jƒtjddiƒjƒkr:t|||ƒndS(NR‘i(tGetNPCIDRVRWtvaluestDoFBOnKill_Player(tcurNPCR
R((s|.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_ElderBattlefield.pytDoFBOnNPCKill_Playerås'cCs§tjƒ}|jƒtjk}d}|rØ|jƒ}tjd|ƒ|j|tƒd}|j    |t|ƒ|dkr—t
j |ddgƒn|j|t ƒd}|j    |t |ƒt jddƒ}    t jddƒ}
t jddƒ} ||
krl|| dkrlt||
| t|    ƒdƒ} t
j|    | |jƒ|gƒt
j |d|gƒn|dkr‘t
j |ddgƒntj|tjdƒtj|tjd|gƒt jd    dƒ}nd} |jƒtjkr6|jƒ} |j| t ƒ}||
kr||rKt
jd
|jƒ|jƒ|gƒq|t
jd |jƒ|jƒ|jƒ|gƒn|j    | t dƒ|r6|j    | t|ƒ| |j|tƒkrüt
j |d ƒ|j    |tdƒ|t jd dƒ7}n| tjƒjtƒkr3|t jd dƒ7}q3q6n|r~t|||ƒ}tjd||| |f|ƒt||ƒn|jƒtjkr£t||ƒnt S(NiRþitAncientBattlefield_10tElderBattlefieldSysiiiRtAncientBattlefield_7tAncientBattlefield_robottAncientBattlefield_8tElderBattlefieldPoints4»÷É±Íæ¼Ò: »÷ɱ=%s,Á¬É±=%s,tagPlayerID=%s,updScore=%s(!R R)tGetGameObjTypeR$t    gotPlayerR(R RùtFBPlayerDict_KillCntR_R0t
NotifyCodeR`RVRyR—RLtFBNotifyRÖR¶tDoAddSuccessProgressR¸R¹RºRütGetObjIDRaRR+RRñR?R    (tatkobjtdefenderRRAt atkIsPlayertaddScoreR@tkillCntt contKillCntExt ckillSysListtbaseCnttperCnttsysIndext tagPlayerIDtdefContKillCntExRá((s|.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_ElderBattlefield.pyRþðsb   !    (1    cCs´tjƒ}|jƒ}|jƒtjddiƒjƒkr\t|||ƒt|ƒn|jƒ}tjddƒ}|j    |ƒ}|s“dSt
|||ƒt ||ƒdS(NR‘iRi( R R)R*RüRVRWRýRþt __OnRobotDieR”RñR?(R
RÿRRARBtnpcidtkillNPCScoreDictR((s|.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_ElderBattlefield.pytDoFB_Player_KillNPC7s  '   cCs8|jƒtjddiƒjƒkr4t|ƒndS(NR‘i(RüRVRWRýR(tattackerRÿR((s|.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_ElderBattlefield.pytDoFB_Npc_KillNPCHs' cCsLtjƒjƒ}|tjkr8tj|j|ƒn|gtj|<dS(N(R RR’RlR“R€(RR((s|.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_ElderBattlefield.pyRMs
c    Cs¨|jƒ}tjddƒ}||kr.dStjdƒ}x!|D]}tj|||ƒqDWtj|ƒ}tj    ƒj
|ƒ}t j |||t |ddƒdS(NRUii(RüRVRyRWRXRYRFRGR t GetGameDatatGetSkillBySkillIDt
SkillShellt__DoLogic_AddBuffR¼(    R
RÿRRt    buffNPCIDRZR[t    addBuffIDtcurSkill((s|.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_ElderBattlefield.pytOnMoveTouchNPCVs   cCst||ƒ S(N(tCanAttackPlayer(R
t curTagPlayer((s|.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_ElderBattlefield.pytCheckPlayersRelation_IsFriendmscCs t||ƒS(N(R((R
R)((s|.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_ElderBattlefield.pytDoCanAttackTeamervscCstjƒ}|jƒ}tS(N(R R)R*R    (R
R)RARB((s|.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_ElderBattlefield.pyR(s  cCstS(N(R    (((s|.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_ElderBattlefield.pytOnPlayerRebornŒscCsÖt|ƒ|jƒ}tjƒj|tƒ}|tjddƒkrJdStjddƒ|}tjƒj    |ƒ}|stj
d|ƒdStjƒj |t|dƒt j |ƒ}tj||||ƒdS(NR‘iisÉϹŸ´»î¼Óbuff   ÕÒ²»µ½¼¼ÄÜ%si(t__SetPlayerRandomPosR^R R)RùtFBPlayerDict_RebornBuffLVRVRyR R!tLogR_t SkillCommont GetBuffTypeRXt    DoAddBuff(R
t rebornPlaceRR@t rebornBuffLVt skillBuffIDt    skillBufftbuffType((s|.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_ElderBattlefield.pytOnResetFBRebornPlacePos“s
 cCs#tƒ\}}|j||ƒdS(N(RTtResetPos(R
tposXtposY((s|.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_ElderBattlefield.pyR-¨scCs0tjddiƒj|ƒ}|s(dS|tS(NRii(RVRWR”t Def_PlayerCnt(Rtcfg((s|.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_ElderBattlefield.pytGetFBLineMaxPlayerCount±s(HR.RR R0RVRpR¾RÁR$R¸R¶RMRXRÛRlRR"R<R0RFttimeR9R    RRR`R:R;RaR.RRR×R<R™R˜RfRiRnR RRR!R"R'RERJRTR\R]RbRvRrRsRR¼RRñR?RRþRRRR'R*R+R(R,R8R-R>(((s|.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_ElderBattlefield.pyt<module>s‚                                          
         "                              $    ?     !    ;             G