-- Substitute __ENTRANCE_ROW__ from the matching exported MapEntrance row. -- Read RuntimeFloor/RuntimeGroup data, never load or execute a level graph. do local input=__ENTRANCE_ROW__ local function log(v)CS.UnityEngine.Debug.Log('[GAC_CW_ENTRANCE_RES] '..tostring(v))end if not _G.__gacCwEntranceRes1 then _G.__gacCwEntranceRes1=true local ok,err=pcall(function() local nativeID=CS.RPG.GameCore.ConstValueCommonExcelTable.GetData('GridFight_EntranceID').Value.IntValue if nativeID~=input.ID then error('Entrance row differs from native CW constant')end local floor=CS.RPG.GameCore.GameCoreConfigLoader.LoadRtLevelFloorInfo(CS.RPG.Client.MapDef.GetRtFloorInfoPath(input.PlaneID,input.FloorID)) log('BEGIN entry='..input.ID..' groups='..floor.GroupInstanceList.Length..' start_group='..input.StartGroupID..' anchor='..input.StartAnchorID) _G.__gacCwEntranceResRows={floor=floor,index=0} end) if not ok then log('ERROR '..tostring(err))end end local state=_G.__gacCwEntranceResRows if state and not state.done then local ok,err=pcall(function() local floor=state.floor for i=state.index,math.min(state.index+15,floor.GroupInstanceList.Length-1)do local g=floor.GroupInstanceList[i] local c=floor.GroupInstanceCommonMap[g.ID] log('GROUP '..g.ID..' path='..tostring(g.GroupPath)..' deleted='..tostring(g.IsDelete)..' common_deleted='..tostring(c and c.IsDelete)..' side='..tostring(c and c.LoadSide)) if g.ID==input.StartGroupID then log('START_TRANSFORM '..CS.Newtonsoft.Json.JsonConvert.SerializeObject(g)) local r=CS.RPG.GameCore.GameCoreConfigLoader.LoadRtLevelGroupInfo(g.GroupPath) log('START_GROUP '..CS.Newtonsoft.Json.JsonConvert.SerializeObject(r)) end end state.index=state.index+16 if state.index>=floor.GroupInstanceList.Length then log('END');state.done=true end end) if not ok then log('ERROR '..tostring(err));state.done=true end end end