on_server_world_info = function(l_9_0, l_9_1) local form = nx_value("form_stage_create\\form_select_book") if not nx_is_valid(form) then return end shiel_book(form) local str_lst = util_split_string(nx_string(l_9_1), ",") local vis_type = str_lst[1] local list_size = (table.getn(str_lst) - 1) / 2 local t = {str_lst[3], str_lst[5], str_lst[7], str_lst[9]} table.sort(t) for i = 0, list_size - 1 do local book_info = str_lst[i * 2 + 2] if openbook_table[book_info] == nil then if nx_int(form.SINGLE_STEP_OPEN) == nx_int(0) and nx_string(book_info) == nx_string("book7") then openbook_table[book_info][1] = nx_number(str_lst[i * 2 + 3]) openbook_table[book_info][2] = false openbook_table[book_info][3] = false else openbook_table[book_info][1] = nx_number(str_lst[i * 2 + 3]) openbook_table[book_info][2] = true openbook_table[book_info][3] = true end end end local rec_table = {} local i = 1 for book,info_table in pairs(openbook_table) do if openbook_table[book][3] and openbook_table[book][2] then rec_table[i] = book i = i + 1 end end local count = table.getn(rec_table) if count == 1 then local rbtn = nx_custom(form, bookid_table[rec_table[1]][1]) if nx_is_valid(rbtn) then rbtn.Top = 48 rbtn.Visible = true if nx_is_valid(rbtn.lbl) then rbtn.lbl.Visible = true end end end for i = 1, count do for j = i + 1, count do if openbook_table[rec_table[j]][1] < openbook_table[rec_table[i]][1] then local buff = rec_table[i] rec_table[i] = rec_table[j] rec_table[j] = buff end end end local min_player_book = nx_number(openbook_table[rec_table[1]][1]) local max_player_book = nx_number(openbook_table[rec_table[count]][1]) local ini_manager = nx_value("IniManager") local file_name = "ini\\ui\\book_player_limit.ini" local ini = ini_manager:LoadIniToManager("ini\\ui\\book_player_limit.ini") for j = 1, count do openbook_table[rec_table[j]][3] = true end local section_count = ini:GetSectionCount() for i = 1, section_count do local max_num = nx_number(ini:ReadInteger(i - 1, "max", 99999999)) local min_num = nx_number(ini:ReadInteger(i - 1, "min", 0)) if min_num <= min_player_book and min_player_book < max_num then for j = 1, count do if nx_number(min_num) <= nx_number(openbook_table[rec_table[j]][1]) and nx_number(openbook_table[rec_table[j]][1]) < nx_number(max_num) then openbook_table[rec_table[j]][3] = true else openbook_table[rec_table[j]][3] = false end end else end end ini_manager:UnloadIniFromManager(file_name) for i = 1, count do local rbtn = nx_custom(form, bookid_table[rec_table[i]][1]) if nx_is_valid(rbtn) then rbtn.Top = 48 + (i - 1) * 60 rbtn.lbl.Top = rbtn.Top local gui = nx_value("gui") rbtn.Text = gui.TextManager:GetText(bookid_table[rec_table[i]][4]) rbtn.Visible = true rbtn.lbl.Visible = true local enable = openbook_table[rec_table[i]][3] rbtn.Enabled = enable end end local name = rec_table[1] form.bookid = name local rbtn = nx_custom(form, bookid_table[name][1]) form.lbl_bg.out_speed_time = 500 form.lbl_bg.in_speed_time = 500 form.lbl_bg.is_out = false local back_image = "gui\\create\\" .. name .. ".png" form.lbl_bg.BackImage = back_image form.lbl_bg.BlendColor = "0,0,0,0" rbtn.Checked = true form.lbl_11.Visible = true form.Default = form.btn_okend