cehua_wcy
2018-12-06 acc1bd1e76fbccb8250a2036363e7fc43b51ce00
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
üªû[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-„ZGd.„ZHdS(/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…scCs|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 ƒrt j|t jdƒtjƒjt|dƒtjƒjt|dƒtjƒjt|dƒtj|t j dt jƒqn(tjƒj|t ƒ}t!|||ƒt"||ƒ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_StarttGetPlayerGameFBDictByKeytFBPlayerDict_RebornBuffLVt__DoAddRebornBufftDoFBHelp(R
RtplayerIDtgameFBtfbStept    startTicktcloseFB_RemainTickt rebornBuffLV((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/RJRKtlentGameMaptGetEmptyPlaceInAreatGetPosXtGetPosY(RMtenterPostdisttposPoint((s|.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_ElderBattlefield.pyt __GetRandPosºs
"cCs\tjdƒ}x!|D]}tj|||ƒqWtjddƒ}tj|||ƒdS(NtElderBattlefieldBufftElderBattlefieldRoboti(t IpyGameDataPYtGetFuncEvalCfgt    BuffSkilltDelBuffBySkillIDt
GetFuncCfg(R
Rt
buffIDListtbuffIDt skillBuffID((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ÔscCsU|jƒ}tjƒ}|j|tdƒ|j|tdƒ|j|tdƒdS(Ni(tGetIDR R)tSetPlayerGameFBDicttFBPlayerDict_ContKillCntExtFBPlayerDict_EnemyIDR@(R
RCRD((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+RR[R\R0t SendMailByKeyt WorldNotifyt
PyGameDatatg_sgzztopPlayerNameRt FB_Step_OvertDoLogic_FBKickAllPlayertGameWorldProcesstCloseFBt__CheckRefreshBuffNPCt__RefreshRobot(RREt 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'RYiiiii(R R)tGetGameFBDictByKeyRt SetGameFBDictR[R\R_t GetNPCManagertxrangetGetCustomNPCRefreshCounttGetCustomNPCRefreshAttGetRefreshMarktGetCounttappendRJtshuffleRt SetNPCRefreshtProcessAllNPCRefresh(RRDt lastCheckTicktallRmarktmaxCntt    rmarkListtnpcCnttgameNPCtit
npcRefreshtrmarkt
needAddCnttnpcIDtrMark((s|.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_ElderBattlefield.pyRys6     
 # 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ÐtElderBattlefieldCfgiiRZiiièi( R R)R~RRRt    GetLineIDRstg_elderBattleRobotDieDicttgetR[R\RR€RR‚RƒR„R…tGetMapCopyPlayerManagertGetPlayerCounttmint Def_TotalCntt Def_RobotCntRPR_RJR‡t    enumerateRRˆR‰(RRDRŠ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.pyRz)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.pyRhs cCsBtjd||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’tj| tjkrydnd|jƒg|ƒn–xE|D]=\}    }
}tj||    |
|tjgddtigƒq™Witj|ƒtj6tj|jƒƒtj 6}tj!|tj|d|ƒtj"|tjdƒdS(Ns)    Íæ¼Ò´¦ÀíÉϹÅÕ½³¡½áËãÐÅÏ¢ , isLogin=%siitElderBattlefieldMailtElderBattlefieldMail2teventtElderBattlefield(#R R R(RtGetFBLineRewardR.R/tNomalDictGetPropertyR8R™t PlayerSuccesstGetCanGetAwardSuccByTypet ShareDefinetSuccType_ElderBattlefieldKillt SuccType_ElderBattlefieldConKillt GiveSuccAwardtFalseR†titemsRPt
ItemCommontGetItemPackSpaceR$trptItemRRR0Rqt ItemControlertGivePlayerItemtGetJsonItemListt Over_itemInfotOver_succItemInfot NotifyFBOverR7(R
tisLoginRt fbRewardDicttcurStagetitemListt
succIDListt succAwardDicttrewardItemListtitemIDtitemCntt    needSpacet
emptySpaceRtisBindtoverDict((s|.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_ElderBattlefield.pyRts2 !422cCsè|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+R9RRtGetNameRsRtR0RrR±trangeR›R²R³R´RBR»R.R8R[R\RPtGetPlayerReExptindextevaltFormulaControltGetCompileFormulaR tAddExpR:R;tDef_PerPointValueR7(R
RDtaddValueRCt    gameWorldtupdScoreR{ttopNameRµ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èttopScoreR{tenemyIDs DoFBHelp %s(R RR(R+R9R[R\RœR»R.R8RPR:R;Rt
Help_scoret    Help_steptHelp_expt Help_expPointRRsRtR)R?RhR t Notify_FBHelp( R
RRæRCRîRêRÏRñRòthelpDictR{Rù((s|.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_ElderBattlefield.pyRBÐs$  (
cCs>|jƒtjddiƒjƒkr:t|||ƒndS(NRZi(tGetNPCIDR[R\tvaluestDoFBOnKill_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(NiRitAncientBattlefield_10tElderBattlefieldSysiiiR–tAncientBattlefield_7tAncientBattlefield_robottAncientBattlefield_8tElderBattlefieldPoints4»÷É±Íæ¼Ò: »÷ɱ=%s,Á¬É±=%s,tagPlayerID=%s,updScore=%s(!R R)tGetGameObjTypeR$t    gotPlayerR(R R?tFBPlayerDict_KillCntRfR0t
NotifyCodeRgR[R_RœRPtFBNotifyRÜR¼tDoAddSuccessProgressR¾R¿RÀRtGetObjIDRhRR+RR÷RBR    (tatkobjtdefenderRRDt atkIsPlayertaddScoreRCtkillCntt 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(NRZiR–i( R R)R*RR[R\RRt __OnRobotDieR™R÷RB(R
RRRDREtnpcidtkillNPCScoreDictR((s|.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_ElderBattlefield.pytDoFB_Player_KillNPC;s  '   cCs8|jƒtjddiƒjƒkr4t|ƒndS(NRZi(RR[R\RR(tattackerRR((s|.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_ElderBattlefield.pytDoFB_Npc_KillNPCLs' cCsLtjƒjƒ}|tjkr8tj|j|ƒn|gtj|<dS(N(R RR—RsR˜R†(RR((s|.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_ElderBattlefield.pyRQs
c    Cs¨|jƒ}tjddƒ}||kr.dStjdƒ}x!|D]}tj|||ƒqDWtj|ƒ}tj    ƒj
|ƒ}t j |||t |ddƒdS(NRYii(RR[R_R\R]R^RJRKR t GetGameDatatGetSkillBySkillIDt
SkillShellt__DoLogic_AddBuffRÂ(    R
RRR t    buffNPCIDR`Rat    addBuffIDtcurSkill((s|.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_ElderBattlefield.pytOnMoveTouchNPCZs   cCst||ƒ S(N(tCanAttackPlayer(R
t curTagPlayer((s|.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_ElderBattlefield.pytCheckPlayersRelation_IsFriendqscCs t||ƒS(N(R-(R
R.((s|.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_ElderBattlefield.pytDoCanAttackTeamerzscCstjƒ}|jƒ}tS(N(R R)R*R    (R
R.RDRE((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scCsbt|ƒ|jƒ}tjƒj|tƒ}|tjddƒkrJdSt||d|ƒdS(NRZii(    t__SetPlayerRandomPosReR R)R?R@R[R_RA(R
t rebornPlaceRRCRH((s|.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_ElderBattlefield.pytOnResetFBRebornPlacePos—s
 cCs˜tjddƒ|d}tjƒj|ƒ}|sJtjd|ƒdS|jƒ}tjƒj|t    |ƒt
j |ƒ}t j ||||ƒdS(NRZiisÉϹŸ´»î¼Óbuff   ÕÒ²»µ½¼¼ÄÜ%s(R[R_R R%R&tLogReR)RfR@t SkillCommont GetBuffTypeR]t    DoAddBuff(R
RHRRbt    skillBuffRCtbuffType((s|.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_ElderBattlefield.pyRA¡s cCs#tƒ\}}|j||ƒdS(N(RXtResetPos(R
tposXtposY((s|.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_ElderBattlefield.pyR2®scCs0tjddiƒj|ƒ}|s(dS|tS(NR–ii(R[R\R™t Def_PlayerCnt(Rtcfg((s|.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_ElderBattlefield.pytGetFBLineMaxPlayerCount·s(IR.RR R0R[RwRÄRÇR$R¾R¼RQR]RáRsRR'R<R6RJttimeR9RRRRgR:R;RhR@RRRÝR>RžRRmRpRuR RRR!R"R'RIRNRXRcRdRiR}RyRzRRÂRR÷RBRRR"R$RR,R/R0R-R1R4RAR2R@(((s|.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_ElderBattlefield.pyt<module>s„                                          
         $                             $    ?     !    ;             G