#!/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