채팅0

    배안타고 오르비스 갈수있을듯 도전해볼게

    조회수 635

    return function (self)

    local time = os.clock()

    local ds = _DataService:GetTable("WorldMap")

    for i=1,ds:GetRowCount() do

    local key = ds:GetCell(i, 1)

    local data = _HttpService:JSONDecode(ds:GetCell(i, 2))

    ---@type WorldMapInfo
    local worldMapInfo = {}
    worldMapInfo.Key = key
    worldMapInfo.BaseImg = data["BaseImg"]["0"]["_ruid"]
    
    local info = data["info"]
    if (info) then
    	worldMapInfo.ParentMap = info["parentMap"]
    end
    
    ---@type table<WorldMapLinkInfo>
    local mapLinkByLayerOrder = {}
    local mapLink = {}
    local wzNameToLinkOrder = {}
    local mapLinkWz = data["MapLink"]
    if (mapLinkWz) then
    	local function parseMapLink(d)
    		---@type WorldMapLinkInfo
    		local linkData = {}
    		local linkImg = d["link"]["linkImg"]
    		linkData.LinkImg = linkImg["_ruid"]
    		linkData.LinkImgOrigin = _WzUtils:GetVector(linkImg["origin"])
    		linkData.LinkImgSize = Vector2(tonumber(linkImg["_width"]), tonumber(linkImg["_height"]))
    		linkData.LinkTarget = d["link"]["linkMap"]
    		return linkData
    	end
    	
    	-- 순차적으로 입력
    	for _,mapLinkData in _WzUtils:GetLabeled(mapLinkWz) do
    		mapLink[#mapLink + 1] = parseMapLink(mapLinkData)
    	end
    	
    	-- 야매 레이어
    	local linkOrder = {}
    	if (key == "WorldMap") then
    		--[[
    			0: 메이플 아일랜드
    			1: 빅토리아 아일랜드
    			2: 오르비스, 엘나스 산맥
    			5: 미나르숲
    			6: 무릉도원
    			4: 아쿠아로드
    			3: 루더스 호수
    		]]
    		linkOrder = {"0", "1", "2", "5", "6", "4", "3"}
    		wzNameToLinkOrder = {[0] = 1, [1] = 2, [2] = 3, [3] = 7, [4] = 6, [5] = 4, [6] = 5}
    	end
    	if (#linkOrder == 0) then
    		log_error(string.format("MapLink order is not defined: %s", key))
    	end
    	for i=1,#linkOrder do
    		mapLinkByLayerOrder[#mapLinkByLayerOrder + 1] = mapLink[tonumber(linkOrder[i])+1]
    	end
    end
    worldMapInfo.WzIndexToLayerOrder = wzNameToLinkOrder
    worldMapInfo.MapLinkByLayerOrder = mapLinkByLayerOrder
    
    ---@type table<WorldMapListData>
    local spotList = {}
    ---@type table<integer, WorldMapListData>
    local mapIdToSpot = {}
    if (data["MapList"]) then
    	for j,d in _WzUtils:GetLabeled(data["MapList"]) do
    		local spotData = self:ParseMapSpotData(d)
    		spotList[tonumber(j)+1] = spotData
    		
    		local mapNo = d["mapNo"]
    		for _,mapId in pairs(mapNo) do
    			mapIdToSpot[tonumber(mapId)] = spotData
    		end
    	end
    end
    worldMapInfo.MapSpot = spotList
    
    self.MapIdToSpot[key] = mapIdToSpot
    self.WorldMapInfo[key] = worldMapInfo

    end

    log(string.format("Loaded worldmap %.2f sec", os.clock() - time))

    end

    댓글7

    회원프로필

    ㄷㄷㄷ 클라스

    2024.01.31 14:31
    회원프로필

    배안타고..직접 날아가는건가요 ! ㄷㄷㄷ

    2024.01.31 14:31
    회원프로필

    와 ㅈ 댄다 ㅋㅋㅋ

    2024.01.31 14:32
    회원프로필

    형아 갠톡좀 봐주라잉 ㅠㅠ 나 Fly 넣었는데 내 게시글좀 ㄱㄱ

    2024.01.31 14:32
    회원프로필

    시간은 금이다 ㄷㄷㄷ

    2024.01.31 14:34
    회원프로필

    ㅊㅊ

    2024.01.31 14:35
    회원프로필

    이거 테이블에 이상한값 넣으면 어디로 가지려나

    2024.01.31 14:36

      게시글 리스트
      제목작성자작성일조회
      공지10-2022120
      6167220:4424
      6167116:4453
      6167014:2470
      6166914:0878
      6166811:3991
      6166701:52191
      6166611-12215
      6166511-12249
      6166411-12303
      6166311-11429
      6166211-11405
      6166111-11544
      6166011-11447
      6165911-11598
      6165811-10516
      6165711-10542
      6165611-10523
      6165511-10590
      6165411-10716
      안내 배너 이미지