cehua_hzl
2019-01-18 21d2fbe634a1f59df779ba4e6232014d50473115
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
Wg\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_TopPlayericCs5tjƒjƒ}|tjkr1t|tƒndS(N(t    GameWorldtGetMaptGetMapIDtChConfigtDef_FBMapID_ElderBattlefieldtOnElderBattlefieldFBResulttTrue(t    curPlayertmapID((s|.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_ElderBattlefield.pytOnFBPlayerOnLoginHscCsWtjd|ƒ|dkrLtjƒjt|ƒtjƒjtdƒntƒdS(Ns!    ÉϹÅÕ½³¡»î¶¯×´Ì¬±ä¸ü state=%sii(RtDebugLogt GetGameWorldtSetGameWorldDictRRt GiveJoinPrize(tstatettick((s|.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_ElderBattlefield.pytOnElderBattlefieldStateChangeNs  cCsetjƒjƒ}tjƒjƒd}tj||ƒ}|rax|D]}tj|ƒqGWndS(Ni(    RR    R
Rt GetPropertyIDtFBCommontGetFBLineRefreshNPCtNPCCustomRefreshtSetNPCRefreshByID(RRtlineIDt refreshIDListt    refreshID((s|.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_ElderBattlefield.pytOnOpenFBcs cCstjƒjdƒdS(Ni(RRt SetPropertyID(R((s|.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_ElderBattlefield.pyt    OnCloseFBrscCstjd||fƒtS(NsOnEnterFBEvent map %s - %s(RRR(RRRR((s|.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_ElderBattlefield.pytOnEnterFBEvent}scCstjd|jƒƒtjS(NsOnChangeMapAsk  CopyMapID=%s(RRt GetCopyMapIDt IPY_GameWorldt    cmeAccept(taskR((s|.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_ElderBattlefield.pytOnChangeMapAsk‡sc    CsÂ|jƒ}tjd|ƒtjƒ}|jƒ}tjƒjtƒ}tdt    j
t j ƒd||ƒ}|s‡t j|ƒdS|jtjd|tƒt    jƒsÒtjƒjƒd}t    j|ƒnt    j|ƒs‰t    j|ƒt    j|t j ƒr±t j|t jdƒtjƒjt|dƒtjƒjt|dƒtjƒjt|dƒtj |t j dt j!ƒq±n(tjƒj"|t#ƒ}t$|||ƒt%||ƒdS(Ns DoEnterFB...iièi(&t GetPlayerIDRRt    GetGameFBt    GetFBStepRtGetGameWorldDictByKeyRtmaxRtGetFBLineStepTimeR R t PlayerControlt PlayerLeaveFBt Sync_TimeTickR&t tttTowerTakeRtGetHadSetFBPropertyMarkRtSetFBPropertyMarktGetHadDelTickettSetHadDelTickettAddEnterFBCounttNomalDictSetPropertyt%Def_Player_Dict_ElderBattlefieldStageRtFBPlayerDict_ScoretFBPlayerDict_TotalExptFBPlayerDict_TotalExpPointt EventReportt WriteEvent_FBt CME_Log_StarttGetPlayerGameFBDictByKeytFBPlayerDict_RebornBuffLVt__DoAddRebornBufftDoFBHelp(    RRtplayerIDtgameFBtfbStept    startTicktcloseFB_RemainTickRt rebornBuffLV((s|.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_ElderBattlefield.pyt    DoEnterFB“s2   '   " cCs tj|ƒS(N(trandomtchoice(RRtlineIdtipyEnterPosInfoR((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 RLRMtlentGameMaptGetEmptyPlaceInAreatGetPosXtGetPosY(ROtenterPostdisttposPoint((s|.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_ElderBattlefield.pyt __GetRandPosÀs
"cCsrtjdƒ}x!|D]}tj|||ƒqWtjddƒ}tj|||ƒtj|jƒtƒdS(NtElderBattlefieldBufftElderBattlefieldRoboti(    t IpyGameDataPYtGetFuncEvalCfgt    BuffSkilltDelBuffBySkillIDt
GetFuncCfgRtUpdFBLineNPCStrengthenLVR*R(RRt
buffIDListtbuffIDt skillBuffID((s|.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_ElderBattlefield.pytDoExitFBÌs cCsdS(N((RR((s|.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_ElderBattlefield.pytDoPlayerLeaveFBÛscCsU|jƒ}tjƒ}|j|tdƒ|j|tdƒ|j|tdƒdS(Ni(tGetIDRR+tSetPlayerGameFBDicttFBPlayerDict_ContKillCntExtFBPlayerDict_EnemyIDRB(RRERF((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(RR+R,t FB_Step_OpenRtGetFBFuncOpenStateR R t    SetFBSteptFB_Step_FightingRR-RR]R^R0t SendMailByKeyt WorldNotifyt
PyGameDatatg_sgzztopPlayerNameRt FB_Step_OvertDoLogic_FBKickAllPlayertGameWorldProcesstCloseFBt__CheckRefreshBuffNPCt__RefreshRobot(RRGt 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'R[iiiii(RR+tGetGameFBDictByKeyRt SetGameFBDictR]R^Rat GetNPCManagertxrangetGetCustomNPCRefreshCounttGetCustomNPCRefreshAttGetRefreshMarktGetCounttappendRLtshuffleRt SetNPCRefreshtProcessAllNPCRefresh(RRFt lastCheckTicktallRmarktmaxCntt    rmarkListtnpcCnttgameNPCtit
npcRefreshtrmarkt
needAddCnttnpcIDtrMark((s|.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_ElderBattlefield.pyR| s6     
 # cCstjƒ}|jtƒ}|r5||dkr5dS|jt|ƒtjƒjƒ}tjj    |gƒ}t
j ddiƒ}tjƒj ƒd}||kr§dS|jt jƒ}tjƒjƒdksØ| rÜdSt
j ddƒ}d}    i}
tjƒ} xgt| jƒƒD]S} | j| ƒ} | jƒ}||krLqn| jƒ}||
|<|    |7}    qW||}tjƒjƒ}t|t||tƒ}||    t|ƒ}t
jdƒ}d}x0|D](}|||dkrõPn|d7}q×W||tj|<||}|dkrt
j dd    iƒj    |dƒ}|sUdStj|ƒd}x•t|ƒD]‡\} }||kr‘Pn|
j    |dƒ}| t|ƒdkr¿dn||}||7}||}tj |||fg||ƒquWtj!|ƒndS(
NiÐtElderBattlefieldCfgiiiR\iièi("RR+RRR‚Rt    GetLineIDRvtg_elderBattleRobotDieDicttgetR]R^RR tDef_FB_NPCStrengthenMaxLVtGetMapCopyPlayerManagertGetPlayerCountRƒR„R…R†R‡Rˆtmint Def_TotalCntt Def_RobotCntRRRaRLRŠt    enumerateRR‹RŒ(RRFRtfblineidtg_elderBattleRobotDieListt robotCfgDictRt
robotMaxLVR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.pyR}0sl      
 
 
 !  &
 
#cCsetjƒ}xRt|jƒƒD]>}|j|ƒ}|dks|jƒ rSqnt|ƒqWdS(N(RtGetPlayerManagerR„RŸtGetPlayerByIndextNonet    GetInitOKR (t playerManagerR“R((s|.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_ElderBattlefield.pyRss cCsL|jtjdƒ}|sdStjd||jƒƒd}tjtj|ƒ}|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ƒ} | tjksh|sh| | krœtj| tjkrƒdnd|jƒg|ƒn–xE|D]=\}    }
}tj||    |
|tjgddtigƒq£Witj|ƒtj6tj|jƒƒtj 6}tj!|tj|d|ƒtj"|tjdƒdS(Nis)    Íæ¼Ò´¦ÀíÉϹÅÕ½³¡½áËãÐÅÏ¢ , isLogin=%sitElderBattlefieldMailtElderBattlefieldMail2teventtElderBattlefield(#tNomalDictGetPropertyR R:RRR*RtGetFBLineRewardR Rœt PlayerSuccesstGetCanGetAwardSuccByTypet ShareDefinetSuccType_ElderBattlefieldKillt SuccType_ElderBattlefieldConKillt GiveSuccAwardtFalseR‰titemsRRt
ItemCommontGetItemPackSpaceR&trptItemR    R
R0Rtt ItemControlertGivePlayerItemtGetJsonItemListt Over_itemInfotOver_succItemInfot NotifyFBOverR9(RtisLogintcurStageRt fbRewardDicttitemListt
succIDListt succAwardDicttrewardItemListtitemIDtitemCntt    needSpacet
emptySpaceRtisBindtoverDict((s|.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_ElderBattlefield.pyR s6 !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*RRR-R;RRtGetNameRvRwR0RuR¶trangeRŸR·R¸R¹RDR¿R R:R]R^RRtGetPlayerReExptindextevaltFormulaControltGetCompileFormulaRtAddExpR<R=tDef_PerPointValueR9(RRFtaddValueREt    gameWorldtupdScoreR~ttopNameRºR“tplayerRÓtstageScoreListt addTotalExptreExptexpFormulaDicttscoretupdStagetaddExptexptexpPointttotalExpt updTotalExptupdExpt updExpPoint((s|.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_ElderBattlefield.pyt __AddElderBattlefieldPlayerScore£sT         "  
  c Cs€tjƒ}|jƒ}|jƒ}|jt|ƒ}tjddƒ}t|j    t
j dƒdt |ƒƒ}|jt |ƒ}|jt|ƒ}    i|tj6|tj6|tj6|    tj6}
|jtƒ} |jt| ƒ} | rötjnd|
d<| r | nd|
d<| |
d<tjƒj|tƒ|
d    <tjj|iƒ|
tj<tjd
|
|ƒtj||
ƒdS( NR™iiitRíttopScoreR~tenemyIDs DoFBHelp %s(RRRšR*R-R;R]R^R R¿R R:RRR<R=Rt
Help_scoret    Help_steptHelp_expt Help_expPointRRvRwR+RARktg_fbRobotJobDictRœt Help_robotJobRt Notify_FBHelp( RRRëRRERóRïRÓRöR÷thelpDictR~Rþ((s|.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_ElderBattlefield.pyRDÞs(   (
cCs>|jƒtjddiƒjƒkr:t|||ƒndS(NR\i(tGetNPCIDR]R^tvaluestDoFBOnKill_Player(tcurNPCRR((s|.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_ElderBattlefield.pytDoFBOnNPCKill_Playerùs'cCs§tjƒ}|jƒtjk}tjddƒ}d}|rØ|jƒ}tjd|ƒ|j    |t
ƒd}|j |t
|ƒ|dkr©t j |ddgƒn|j    |tƒd}    |j |t|    ƒtjddƒ}
tjddƒ} |    |krl|    | dkrlt|    || t|
ƒdƒ} t j|
| |jƒ|    gƒt j |d|    gƒn|    dkr‘t j |ddgƒntj|tjdƒtj|tjd|    gƒtjd    dƒ}nd} |jƒtjkr6|jƒ} |j    | tƒ}||kr||rKt jd
|jƒ|jƒ|gƒq|t jd |jƒ|jƒ|jƒ|gƒn|j | tdƒ|r6|j | t|ƒ| |j    |tƒkrüt j |d ƒ|j |tdƒ|tjd dƒ7}n| tjƒjtƒkr3|tjd dƒ7}q3q6n|r~t|||ƒ}tjd||    | |f|ƒt||ƒn|jƒtjkr£t||ƒnt S(NtElderBattlefieldSysiiR
itAncientBattlefield_10iiR™tAncientBattlefield_7tAncientBattlefield_robottAncientBattlefield_8tElderBattlefieldPoints4»÷É±Íæ¼Ò: »÷ɱ=%s,Á¬É±=%s,tagPlayerID=%s,updScore=%s(!RR+tGetGameObjTypeR&t    gotPlayerR]RaR*RRAtFBPlayerDict_KillCntRiR0t
NotifyCodeRjR RRtFBNotifyRáRÁtDoAddSuccessProgressRÃRÄRÅRRhRkRR-RRüRDR(tatkobjtdefenderRRFt atkIsPlayertbaseCnttaddScoreREtkillCntt contKillCntExt ckillSysListtperCnttsysIndext 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( RR+R,RR]R^R    R
t __OnRobotDieRœRüRD(RR RRFRGtnpcidtkillNPCScoreDictR((s|.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_ElderBattlefield.pytDoFB_Player_KillNPCLs  '   cCs8|jƒtjddiƒjƒkr4t|ƒndS(NR\i(RR]R^R    R%(tattackerR R((s|.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_ElderBattlefield.pytDoFB_Npc_KillNPC]s' cCsLtjƒjƒ}|tjkr8tj|j|ƒn|gtj|<dS(N(RRRšRvR›R‰(RR((s|.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_ElderBattlefield.pyR%bs
c    Cs¨|jƒ}tjddƒ}||kr.dStjdƒ}x!|D]}tj|||ƒqDWtj|ƒ}tj    ƒj
|ƒ}t j |||t |ddƒdS(NR[ii(RR]RaR^R_R`RLRMRt GetGameDatatGetSkillBySkillIDt
SkillShellt__DoLogic_AddBuffRÇ(    RR RR&t    buffNPCIDRcRdt    addBuffIDtcurSkill((s|.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_ElderBattlefield.pytOnMoveTouchNPCks   cCst||ƒ S(N(tCanAttackPlayer(Rt curTagPlayer((s|.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_ElderBattlefield.pytCheckPlayersRelation_IsFriend‚scCs t||ƒS(N(R3(RR4((s|.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_ElderBattlefield.pytDoCanAttackTeamer‹scCstjƒ}|jƒ}tS(N(RR+R,R(RR4RFRG((s|.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_ElderBattlefield.pyR3”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(NR\ii(    t__SetPlayerRandomPosRhRR+RARBR]RaRC(Rt rebornPlaceRRERJ((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(NR\iisÉϹŸ´»î¼Óbuff   ÕÒ²»µ½¼¼ÄÜ%s(R]RaRR+R,tLogRhR+RiRBt SkillCommont GetBuffTypeR_t    DoAddBuff(RRJRRet    skillBuffREtbuffType((s|.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_ElderBattlefield.pyRC²s cCs#tƒ\}}|j||ƒdS(N(RZtResetPos(RtposXtposY((s|.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_ElderBattlefield.pyR8¿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 RRR0R]RzRÉRÌR&RÃRÁRSR_RæRvRR-R>R<RLttimeR;RRRRjR<R=RkRBRRRâRDR¢R¡RpRsRxRRR!R#R$R)RKRPRZRfRgRlR€R|R}RRÇR RüRDR R
R(R*R%R2R5R6R3R7R:RCR8RF(((s|.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\GameWorldLogic\FBProcess\GameLogic_ElderBattlefield.pyt<module>s„                                          
         (                             $    C     $    ;             H