hxp
2025-06-12 edc3910a9d090e5df4deb2dbc37709a740375938
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
#!/usr/bin/python
# -*- coding: GBK -*-
#-------------------------------------------------------------------------------
#
##@package GM.Commands.EnterFB
#
# @todo:½øÈ븱±¾
# @author hxp
# @date 2017-10-25
# @version 1.0
#
# ÏêϸÃèÊö: ½øÈ븱±¾
#
#-------------------------------------------------------------------------------
#"""Version = 2017-10-25 18:00"""
#-------------------------------------------------------------------------------
 
import GameWorld
import PlayerControl
import FBCommon
import ChConfig
import PlayerFB
 
 
## GMÃüÁîÖ´ÐÐÈë¿Ú
#  @param curPlayer µ±Ç°Íæ¼Ò
#  @param paramList ²ÎÊýÁбí []
#  @return None
#  @remarks º¯ÊýÏêϸ˵Ã÷.
def OnExec(curPlayer, paramList):
    
    if not paramList or len(paramList) == 3:
        GameWorld.DebugAnswer(curPlayer, "EnterFB mapID ¿ÉÑ¡(lineID posX posY)")
        return
    mapID = paramList[0]
    lineID = paramList[1] if len(paramList) > 1 else 0
    posX = paramList[2] if len(paramList) > 2 else 0
    posY = paramList[3] if len(paramList) > 3 else 0
    if FBCommon.GetFBPDictValue(curPlayer, ChConfig.Def_PDict_LastEnterFBTick % mapID):
        FBCommon.SetFBPDictValue(curPlayer, ChConfig.Def_PDict_LastEnterFBTick % mapID, 0)
        
    tick = GameWorld.GetGameWorld().GetTick()
    if mapID in FBCommon.GetClientCustomScene():
        PlayerFB.DoEnterCustomScene(curPlayer, mapID, lineID, tick)
    elif mapID in ChConfig.Def_CrossMapIDList:
        PlayerControl.PlayerEnterCrossServer(curPlayer, mapID, lineID)
    else:
        PlayerControl.PlayerEnterFB(curPlayer, mapID, lineID, posX, posY)
    return