hxp
2026-01-06 34520d2b2a4ac78f832169b7ea120651b7f43c26
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
#!/usr/bin/python
# -*- coding: GBK -*-
#-------------------------------------------------------------------------------
#
##@package GM.Commands.Dingjunge
#
# @todo:¶¨¾ü¸ó
# @author hxp
# @date 2026-01-06
# @version 1.0
#
# ÏêϸÃèÊö: ¶¨¾ü¸ó
#
#-------------------------------------------------------------------------------
#"""Version = 2026-01-06 13:30"""
#-------------------------------------------------------------------------------
 
import FBCommon
import GameWorld
import IpyGameDataPY
import GameLogic_Dingjunge
import PlayerControl
import ChConfig
 
def OnExec(curPlayer, paramList):
    
    if not paramList:
        GameWorld.DebugAnswer(curPlayer, "¶¨¾ü¸ó½ø¶È: Dingjunge ½ñÈչؿ¨ID ÀúÊ·¹Ø¿¨ID")
        GameWorld.DebugAnswer(curPlayer, "Ôö¼ÓЧ¹ûÊý: Dingjunge e Ôö¼ÓЧ¹û´ÎÊý")
        GameWorld.DebugAnswer(curPlayer, "´ýÑ¡ÔñЧ¹û: Dingjunge s Ð§¹ûID [Ч¹ûID ...]")
        return
    mapID = ChConfig.Def_FBMapID_Dingjunge
    value1 = paramList[0]
    
    if value1 == "e":
        addEffCnt = paramList[1] if len(paramList) > 1 else 1
        GameLogic_Dingjunge.GivePassLayerEff(curPlayer, addEffCnt)
    elif value1 == "s":
        setEffIDList = paramList[1:]
        sEffIDList = []
        for sIndex in range(IpyGameDataPY.GetFuncCfg("DingjungeEff", 3)):
            effID = setEffIDList[sIndex] if len(setEffIDList) > sIndex else 0
            if effID and not IpyGameDataPY.GetIpyGameDataNotLog("FBDJGEffect", effID):
                GameWorld.DebugAnswer(curPlayer, "Ч¹ûID²»´æÔÚ:%s" % effID)
                effID = 0
            PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_DJGSelectEffect % sIndex, effID)
            sEffIDList.append(effID)
        GameWorld.DebugAnswer(curPlayer, "´ýѡЧ¹ûID:%s" % sEffIDList)
    else:
        todayLineID = value1
        highestLineID = paramList[1] if len(paramList) > 1 else None
        if not highestLineID:
            highestLineID = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FBPassLineID % mapID)
            
        layerNum, levelNum = todayLineID / 100, todayLineID % 100
        ipyData = IpyGameDataPY.GetIpyGameDataNotLog("FBDJGLevel", layerNum, levelNum)
        if not ipyData:
            GameWorld.DebugAnswer(curPlayer, "²»´æÔÚ¸Ã²ã¹Ø¿¨:%s-%s" % (layerNum, levelNum))
            return
        
        if highestLineID:
            if todayLineID > highestLineID:
                highestLineID = todayLineID
            hLayerNum, hLevelNum = highestLineID / 100, highestLineID % 100
            if not IpyGameDataPY.GetIpyGameDataNotLog("FBDJGLevel", hLayerNum, hLevelNum):
                GameWorld.DebugAnswer(curPlayer, "²»´æÔÚ¸Ã²ã¹Ø:%s-%s" % (hLayerNum, hLevelNum))
                return
            
            GameWorld.DebugAnswer(curPlayer, "ÀúÊ·×î¸ß²ã¹Ø:%s-%s" % (hLayerNum, hLevelNum))
            PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_FBPassLineID % mapID, highestLineID)
            FBCommon.Sync_FBPlayerFBInfoData(curPlayer, mapID)
            
        GameWorld.DebugAnswer(curPlayer, "½ñÈÕ²ã¹Ø:%s-%s" % (layerNum, levelNum))
        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_DJGLineID, todayLineID)
        
    GameLogic_Dingjunge.SyncDingjungeInfo(curPlayer)
    return