#!/usr/bin/python # -*- coding: GBK -*- #------------------------------------------------------------------------------- # ##@package GM.Commands.GatherSoul # # @todo:ÉèÖþۻêР# @author hxp # @date 2024-07-12 # @version 1.0 # # ÏêϸÃèÊö: ÉèÖþۻêР# #------------------------------------------------------------------------------- #"""Version = 2024-07-12 16:30""" #------------------------------------------------------------------------------- import GameWorld import ChConfig import IpyGameDataPY import PlayerGatherTheSoul import PlayerControl #--------------------------------------------------------------------- #Âß¼­ÊµÏÖ ## GMÃüÁîÖ´ÐÐÈë¿Ú # @param curPlayer µ±Ç°Íæ¼Ò # @param paramList ²ÎÊýÁбí [index,1True] # @return None # @remarks º¯ÊýÏêϸ˵Ã÷. def OnExec(curPlayer, paramList): if not paramList: GameWorld.DebugAnswer(curPlayer, "ÖØÖÃËùÓоۻê: GahterSoul 0") GameWorld.DebugAnswer(curPlayer, "ÉèÖþۻêµÈ¼¶: GahterSoul ¾Û»êID µÈ¼¶") return value1 = paramList[0] if value1 == 0: # жÏÂËùÓÐÏâǶ for holeNum in range(1, 1 + IpyGameDataPY.GetFuncCfg("GatherTheSoulHole", 1)): soulID = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_GatherTheSoulHoleID % holeNum) if soulID: PlayerGatherTheSoul.OnGatherTheSoulTakeoff(curPlayer, soulID) # ÖØÖÃËùÓеȼ¶ resetSoulIDList = [] ipyDataMgr = IpyGameDataPY.IPY_Data() for index in range(ipyDataMgr.GetGatherTheSoulCount()): ipyData = ipyDataMgr.GetGatherTheSoulByIndex(index) soulID = ipyData.GetSoulID() if curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_GatherTheSoulLV % soulID): resetSoulIDList.append(soulID) PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_GatherTheSoulLV % soulID, 0) PlayerGatherTheSoul.Sync_SoulInfo(curPlayer, resetSoulIDList) PlayerGatherTheSoul.RefreshGatherTheSoulAttr(curPlayer, True) else: soulID = value1 soulLV = paramList[1] if len(paramList) > 1 else 1 PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_GatherTheSoulLV % soulID, soulLV) PlayerGatherTheSoul.Sync_SoulInfo(curPlayer, [soulID]) PlayerGatherTheSoul.RefreshGatherTheSoulAttr(curPlayer, True) return