hxp
2021-11-04 563e6d6c9bb5e09f7ef7d3534466acd2dbc2aa36
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/AddFairyEvent.py
@@ -21,6 +21,7 @@
import GameWorld
import ChConfig
import PlayerFairyDomain
import GameLogic_CrossGrassland
import PlayerControl
import ShareDefine
import random
@@ -34,7 +35,7 @@
#  @remarks 函数详细说明.
def OnExec(curPlayer, msgList):
    if not msgList:
        GameWorld.DebugAnswer(curPlayer, "AddFairyEvent 事件ID")
        GameWorld.DebugAnswer(curPlayer, "AddFairyEvent 事件ID 事件ID ...")
        return
    maxEventCnt = PlayerFairyDomain.GetMaxEventCnt()  # 最大可出现事件个数
    if len(msgList) > maxEventCnt:
@@ -63,6 +64,13 @@
                        index = 0
                    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FairyAdventuresData % fdEventID, ipyData.GetID() * 100 + index)
        
        ipyData = IpyGameDataPY.GetIpyGameData('FairyDomain', fdEventID)
        if not ipyData:
            continue
        # 草园重置
        if ipyData.GetEventType() in [PlayerFairyDomain.FDEventType_GrasslandXian, PlayerFairyDomain.FDEventType_GrasslandLing]:
            GameLogic_CrossGrassland.DoResetCrossGrassland(curPlayer, ipyData.GetEventType(), fdEventID)
    #设置寻访中
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FairyDomainState, 1)