%%---------------------------------------------------- %% 数据配置文件 %% @author linguohui %%---------------------------------------------------- -module(holiday_nian_data). -export([ cfg/0 ,get/1 ]). -include("data_config.hrl"). -include("common.hrl"). cfg() -> #data_cfg{ name = holiday_nian_data ,lua_name = holiday_nian_data ,js_name = holiday_nian_data ,desc = "配置数据" ,source = "holiday_nian_data.xml" ,target = "holiday_nian_data.erl" ,splitv = 1 ,head_rows = 1 ,inc = ["holiday_nian.hrl"] ,callback = [ {{get_const, undefined}, cb_fun, handle, {get_fun, ["常量配置"], "get_const(~ts) -> ~ts; %% ~ts", [key, val, desc]}} ,{get_all_event_group, cb_fun, handle, {tuple_list, ["事件组"], [evt_gid, ids, update_type, update_time]}} ,{get_event_id, cb_fun, handle, {get_tuple, ["事件组"], evt_gid, ids}} ,{{get_event_limit, undefined}, cb_fun, handle, {get_tuple, ["事件类型限制"], type, num}} ,{{get_event_type, undefined}, cb_fun, handle, {get_tuple, ["事件"], id, type}} ,{{get_event_walk, undefined}, cb_fun, handle, {get_tuple, ["事件"], id, is_walk}} ,{{get_evt, undefined}, cb_fun, handle, {get_record, ["事件"], id, holiday_nian_evt_data, [id, type, ext, win_reward_list]}} ,{get_reward, cb_fun, handle, {get_tuple, ["奖励信息"], id, [type, ext]}} ,{get_all_val, cb_fun, handle, {tuple_list, ["触发红包事件进度值"], val}} ,{get_tribute, cb_fun, handle, {tuple_list, ["触发红包事件进度值"], [val, flag]}} ,{get_monster_id, cb_fun, handle, {get_fun, ["年兽id"], "get_monster_id({Time, ~ts}) when Time >= ~ts andalso Time =< ~ts -> ~ts;", [type, update_low, update_high, base_id]}} ,{get_monster_lev, cb_fun, handle, {get_fun, ["年兽等级映射"], "get_monster_lev({WorldLev, ~ts}) when WorldLev >= ~ts andalso WorldLev =< ~ts -> ~ts;", [type, world_low, world_high, lev]}} ,{get_monster_reward, cb_fun, handle, {get_fun, ["年兽伤害奖励"], "get_monster_reward({Dps, ~ts}) when Dps >= ~ts andalso Dps =< ~ts -> ~ts;", [type, dps_low, dps_high, reward]}} ,{get_robot_ids, cb_fun, handle, {get_fun, ["怪物机器人库"], "get_robot_ids({~ts, MaxPower}) when MaxPower >= ~ts andalso MaxPower =< ~ts -> ~ts;", [id, min, max, robot]}} ,{{get_gold_monster_rank_reward, undefined}, cb_fun, handle, {get_fun, ["金色年兽排名奖励"], "get_gold_monster_rank_reward(Rank) when Rank >= ~ts andalso Rank =< ~ts -> ~ts;", [rank_high, rank_low, reward]}} ,{get_collection_time, cb_fun, handle, {get_tuple, ["集字兑换"], id, [time, start_unixtime, end_unixtime]}} ,{get_collection_loss_gain, cb_fun, handle, {get_tuple, ["集字兑换"], id, [loss, gain]}} ,{get_collection_list, cb_fun, handle, {tuple_list, ["集字兑换"], [id, time]}} ,{get_small_monster_lev, cb_fun, handle, {get_fun, ["小年兽匹配区间"], "get_small_monster_lev(MaxPower) when MaxPower >= ~ts andalso MaxPower =< ~ts -> ~ts;", [power_low, power_high, lev]}} ,{get_red_packet_radio, cb_fun, handle, {get_fun, ["进度值系数"], "get_red_packet_radio(OpenDay) when OpenDay >= ~ts andalso OpenDay =< ~ts -> ~ts;", [open_low, open_high, radio]}} ,{get_red_packet_radio2, cb_fun, handle, {get_fun, ["非首次进度值系数"], "get_red_packet_radio2(Num) when Num >= ~ts andalso Num =< ~ts -> ~ts;", [num_low, num_high, radio]}} ,{get_log_name, cb_fun, handle, {get_tuple, ["事件"], id, name}} ,{get_log_dps, cb_fun, handle, {get_fun, ["年兽伤害奖励"], "get_log_dps({Dps, ~ts}) when Dps >= ~ts andalso Dps =< ~ts -> ~ts;", [type, dps_low, dps_high, dps_high]}} ] ,callback_cli = [ {const, cb_fun_lua, handle, {key_val, ["常量配置"], key, [val, desc]}} % ,{customs, cb_fun_lua, handle, {key_val, ["副本信息"], id, [id_limit, lev_limit, power_limit, first_reward, add_radio, battle_bg_id, award, res_id, desc, music, award_desc, camp]}} ,{evt_info, cb_fun_lua, handle, {key_val, ["事件"], id, [id, name, type, ext, is_walk, res_1, res_2, offset, reversal, reward, boss_skill_id]}} ,{dialogue, cb_fun_lua, handle, {key_val, ["奖励Npc"], id, [dialogue, answer]}} ,{drama, cb_fun_lua, handle, {key_val, ["第一次对话"], id, [dialogue]}} ,{board, cb_fun_lua, handle, {key_val, ["广告牌"], id, all}} ,{redbag_progress, cb_fun_lua, handle, {list_val, ["触发红包事件进度值"], val}} ,{harm_reward, cb_fun_lua, handle, {list_val, ["年兽伤害奖励"], [type],[dps_low, dps_high]}} ,{rank_reward, cb_fun_lua, handle, {list_val, ["金色年兽排名奖励"], [rank_low, rank_high, reward]}} % ,{buff, cb_fun_lua, handle, {key_val, ["buff信息"], buff_id, [buff_id, name, desc, quality, range, res_id]}} ,{exchange, cb_fun_lua, handle, {key_val, ["集字兑换"], id, all}} ] ,callback_json = [ {const, cb_fun_json, handle, {key_val, ["常量配置"], key, [val, desc]}} % ,{customs, cb_fun_json, handle, {key_val, ["副本信息"], id, [id_limit, lev_limit, power_limit, first_reward, add_radio, battle_bg_id, award, res_id, desc, music, award_desc, camp]}} ,{evt_info, cb_fun_json, handle, {key_val, ["事件"], id, [id, name, type, ext, is_walk, res_1, res_2, offset, reversal, reward, boss_skill_id]}} ,{dialogue, cb_fun_json, handle, {key_val, ["奖励Npc"], id, [dialogue, answer]}} ,{drama, cb_fun_json, handle, {key_val, ["第一次对话"], id, [dialogue]}} ,{board, cb_fun_json, handle, {key_val, ["广告牌"], id, all}} ,{redbag_progress, cb_fun_json, handle, {list_val, ["触发红包事件进度值"], val}} ,{harm_reward, cb_fun_json, handle, {list_val, ["年兽伤害奖励"], [type],[dps_low, dps_high]}} ,{rank_reward, cb_fun_json, handle, {list_val, ["金色年兽排名奖励"], [rank_low, rank_high, reward]}} % ,{buff, cb_fun_json, handle, {key_val, ["buff信息"], buff_id, [buff_id, name, desc, quality, range, res_id]}} ,{exchange, cb_fun_json, handle, {key_val, ["集字兑换"], id, all}} ] ,sheet = [ {["常量配置"], [ #f_column{type = atom, name = key, desc = "键", primary = true, mod = all} ,#f_column{type = term, name = val, desc = "值", add_list_sign = false, mod = all} ,#f_column{type = str, name = desc, desc = "描述", mod = all} ]} ,{["事件组"], [ #f_column{type = int, name = evt_gid, desc = "事件组ID"} ,#f_column{type = term, name = ids, desc = "{事件ID, 权重}"} ,#f_column{type = kv, name = update_type, kv_type = {?MODULE, get, [update_type]}, desc = "刷新类型", val = 1} ,#f_column{type = term, name = update_time, desc = "刷新时间点", val = "[]"} ]} ,{["事件"], [ #f_column{type = int, name = id, desc = "事件ID"} ,#f_column{type = bstr, name = name, desc = "事件名称"} ,#f_column{type = kv, kv_type = {?MODULE, get, [type]}, name = type, desc = "事件类型"} ,#f_column{type = term, name = ext, desc = "额外参数"} ,#f_column{type = kv, kv_type = bool, name = is_walk, desc = "是否可行走", mod = all} ,#f_column{type = term, name = win_reward_list, desc = "成功奖励列表"} ,#f_column{type = int, name = main_id, desc = "主格子事件id", val = 0} ,#f_column{type = term, name = res_1, desc = "事件完成前的资源", mod = client, comment = "1为图片,2为特效,不填则不显示"} ,#f_column{type = term, name = res_2, desc = "事件完成后的资源", mod = client, comment = "1为图片,2为特效,不填则不显示"} ,#f_column{type = term, name = offset, desc = "事件资源偏移值", mod = client, comment = "x,y:x为横向偏移,y为纵向偏移"} ,#f_column{type = term, name = reward, desc = "奖励展示",mod = client} ,#f_column{type = int, name = reversal, desc = "是否翻转", comment = "填1为翻转,否则不翻转"} ,#f_column{type = term, name = boss_skill_id, desc = "技能展示",mod = client} ]} ,{["事件类型限制"], [ #f_column{type = kv, kv_type = {?MODULE, get, [type]}, name = type, desc = "事件类型"} ,#f_column{type = int, name = num, desc = "出现次数限制"} ]} ,{["奖励信息"], [ #f_column{type = int, name = id, desc = "奖励Id", mod = all} ,#f_column{type = kv, kv_type = {?MODULE, get, [reward_type]}, name = type, desc = "奖励类型"} ,#f_column{type = term, name = ext, desc = "额外参数", val = "[]"} ,#f_column{type = bstr, name = desc, desc = "备注"} ]} ,{["奖励Npc"], [ #f_column{type = int, name = id, desc = "对话Id", mod = all} ,#f_column{type = term, name = reward_list, desc = "对话奖励{选项,奖励列表}", mod = all} ,#f_column{type = term, name = dialogue, desc = "对话", mod = client} ,#f_column{type = term, name = answer, desc = "选项", mod = client} ]} ,{["怪物机器人库"], [ #f_column{type = int, name = id, desc = "组ID", mod = all} ,#f_column{type = int, name = min, desc = "战力下限", mod = all} ,#f_column{type = int, name = max, desc = "战力上限", mod = all} ,#f_column{type = term, name = robot, desc = "机器人匹配{id, weight}", mod = all} ]} ,{["第一次对话"], [ #f_column{type = term, name = condition, desc = "对话触发条件", mod = all} ,#f_column{type = int, name = id, desc = "对话Id", mod = all} ,#f_column{type = term, name = dialogue, desc = "对话", mod = client} ]} ,{["广告牌"], [ #f_column{type = int, name = id, desc = "id", mod = client} ,#f_column{type = bstr, name = btn_str, desc = "按钮名称", mod = client} ,#f_column{type = bstr, name = res_id, desc = "资源名称", mod = client} ,#f_column{type = bstr, name = title, desc = "标题", mod = client} ,#f_column{type = bstr, name = desc_1, desc = "描述内容1", mod = client} ,#f_column{type = bstr, name = desc_2, desc = "描述内容2", mod = client} ]} ,{["触发红包事件进度值"], [ #f_column{type = int, name = val, desc = "进度值", mod = all} ,#f_column{type = kv, kv_type = bool, name = flag, desc = "是否触发红包事件", mod = all} ]} ,{["年兽id"], [ #f_column{type = kv, kv_type = {?MODULE, get, [type]}, name = type, desc = "事件类型"} ,#f_column{type = int, name = update_low, desc = "次数下限", mod = all} ,#f_column{type = int, name = update_high, desc = "次数上限", mod = all} ,#f_column{type = int, name = base_id, desc = "单位id", mod = all} ]} ,{["年兽等级映射"], [ #f_column{type = kv, kv_type = {?MODULE, get, [type]}, name = type, desc = "事件类型"} ,#f_column{type = int, name = world_low, desc = "世界等级下限", mod = all} ,#f_column{type = int, name = world_high, desc = "世界等级上限", mod = all} ,#f_column{type = int, name = lev, desc = "年兽等级", mod = all} ]} ,{["年兽伤害奖励"], [ #f_column{type = kv, kv_type = {?MODULE, get, [type]}, name = type, desc = "事件类型"} ,#f_column{type = int, name = id, desc = "id", mod = all} ,#f_column{type = int, name = dps_low, desc = "伤害下限", mod = all} ,#f_column{type = int, name = dps_high, desc = "伤害上限", mod = all} ,#f_column{type = term, name = reward, desc = "奖励", mod = all} ]} ,{["金色年兽排名奖励"], [ #f_column{type = int, name = rank_high, desc = "排名上限", mod = all} ,#f_column{type = int, name = rank_low, desc = "排名下限", mod = all} ,#f_column{type = term, name = reward, desc = "奖励", mod = all} ]} ,{["集字兑换"], [ #f_column{type = int, name = id, desc = "序号", mod = all} ,#f_column{type = term, name = loss, desc = "所需物品", mod = all} ,#f_column{type = term, name = gain, desc = "兑换物品", mod = all} ,#f_column{type = int, name = time, desc = "次数", mod = all} ,#f_column{type = int, name = start_unixtime, desc = "开始时间戳", mod = all} ,#f_column{type = int, name = end_unixtime, desc = "结束时间戳", mod = all} ]} ,{["小年兽匹配区间"], [ #f_column{type = int, name = power_low, desc = "战力下限", mod = all} ,#f_column{type = int, name = power_high, desc = "战力上限", mod = all} ,#f_column{type = int, name = lev, desc = "小年兽等级", mod = all} ]} ,{["进度值系数"], [ #f_column{type = int, name = open_low, desc = "开服天数区间下限", mod = all} ,#f_column{type = int, name = open_high, desc = "开服天数区间上限", mod = all} ,#f_column{type = int, name = radio, desc = "贡品目标系数", mod = all} ]} ,{["非首次进度值系数"], [ #f_column{type = int, name = num_low, desc = "活跃人数区间下限", mod = all} ,#f_column{type = int, name = num_high, desc = "活跃人数区间上限", mod = all} ,#f_column{type = int, name = radio, desc = "贡品目标系数", mod = all} ]} ] }. get(type) -> [ {"空事件", 0} ,{"怪物", 1} ,{"出生点", 2} ,{"告示牌", 3} ,{"获得道具", 4} ,{"Npc", 5} ,{"可破坏障碍", 6} ,{"不可破坏障碍", 7} ,{"获得字", 8} ,{"获得贡品", 9} ,{"获得烟花", 10} ,{"红包", 11} ,{"限时年兽", 12} ,{"金色年兽", 13} ,{"限时年兽(不可挑战状态)", 14} ,{"金色年兽(不可挑战状态)", 15} ]; get(reward_type) -> [ {"获得物品", 1} ,{"获得道具(进玩法背包)", 2} ,{"掉落奖励", 3} ]; get(update_type) -> [ {"常规刷新", 1} ,{"特殊刷新", 2} ]; get(_) -> [].