%%%------------------------------------------------------------------- %%% @author liwl %%% @copyright (C) 2017, liwl %%% @doc %%% 宠物出行 %%% @end %%% Created : 9 May 2017 by liwl %%%------------------------------------------------------------------- -module(home_pet_data). -export([cfg/0, get/1]). -include("data_config.hrl"). cfg() -> #data_cfg{ name = home_pet_data ,lua_name = home_pet_data ,desc = "宠物出行" ,splitv = 2 ,source = "home_pet_data.xml" ,target = "home_pet_data.erl" ,inc = ["common.hrl", "quest.hrl", "gain.hrl", "condition.hrl"] ,callback = [ {{get_const, undefined}, cb_fun, handle, {get_fun, ["常量配置"], "get_const(~ts) -> ~ts; %% ~ts", [key, val, desc]}} ,{{get_pro, "0"}, cb_fun, handle, {get_tuple, ["城市配置"], id, pro}} ,{get_time, cb_fun, handle, {get_tuple, ["城市配置"], id, time}} ,{get_expend_vigor, cb_fun, handle, {get_tuple, ["城市配置"], id, expend_vigor}} ,{get_evt_list, cb_fun, handle, {get_tuple, ["城市配置"], id, evt_list}} ,{get_evt_rand_list, cb_fun, handle, {tuple_type, ["事件配置"], type, s_id}} ,{get_evt_type, cb_fun, handle, {tuple_type, ["事件配置"], id, type}} ,{get_evt_son_ids, cb_fun, handle, {tuple_type, ["事件配置"], id, s_id}} ,{{get_evt_award, "[]"}, cb_fun, handle, {get_tuple, ["事件配置"], s_id, award}} ,{{get_evt_drop_ids, "[]"}, cb_fun, handle, {get_tuple, ["事件配置"], s_id, drop_ids}} ,{get_evt_award_type, cb_fun, handle, {get_tuple, ["事件配置"], s_id, is_award}} ,{get_evt_is_notice, cb_fun, handle, {get_tuple, ["事件配置"], s_id, is_notice}} ,{get_evt_pro, cb_fun, handle, {get_tuple, ["事件概率"], id, [id, pro, do_count, limit_count]}} ,{get_dialogue_rand_list, cb_fun, handle, {tuple_type, ["萌宠互动"], type, [id, pro]}} ,{get_dialogue_info, cb_fun, handle, {get_tuple, ["萌宠互动"], id, [expend, award, award2]}} ] ,callback_cli = [ {const, cb_fun_lua, handle, {key_val, ["常量配置"], key, [val, desc]}} ,{event_info, cb_fun_lua, handle, {key_val, ["事件配置"], [s_id], all}} ,{interaction_info, cb_fun_lua, handle, {key_val, ["萌宠互动"], [id], all}} ] ,callback_json = [ {const, cb_fun_json, handle, {key_val, ["常量配置"], key, [val, desc]}} ,{event_info, cb_fun_json, handle, {key_val, ["事件配置"], [s_id], all}} ,{interaction_info, cb_fun_json, handle, {key_val, ["萌宠互动"], [id], all}} ] ,sheet = [ {["城市配置"],[ #f_column{type = int, name = id, desc = "城市id", mod = all} ,#f_column{type = bstr, name = name, desc = "名称", mod = all} ,#f_column{type = int, name = pro, desc = "出行权重", mod = all} ,#f_column{type = int, name = time, desc = "出行时间", mod = all} ,#f_column{type = int, name = expend_vigor, desc = "精力值消耗", mod = all} ,#f_column{type = term, name = evt_list, desc = "事件列表", add_list_sign = false, mod = all} ]} ,{["事件配置"],[ #f_column{type = int, name = id, desc = "事件id", mod = all} ,#f_column{type = int, name = s_id, desc = "子id", mod = all} ,#f_column{type = int, name = type, desc = "事件类型", mod = all} ,#f_column{type = term, name = award, desc = "奖励", val = "[]", mod = all} ,#f_column{type = term, name = drop_ids, desc = "掉落奖励", val = "[]", mod = all} ,#f_column{type = bstr, name = desc, desc = "事件描述", mod = all} ,#f_column{type = kv, name = is_show, kv_type = bool, desc = "界面滚动显示", mod = all} ,#f_column{type = kv, name = is_notice, kv_type = bool, desc = "中途弹窗显示", val = 0, mod = all} ,#f_column{type = kv, name = is_award, kv_type = bool, desc = "结束奖励显示", val = 0, mod = all} ]} ,{["事件概率"],[ #f_column{type = int, name = id, desc = "事件id", mod = all} ,#f_column{type = int, name = pro, desc = "事件概率", val = 0, mod = all} ,#f_column{type = int, name = do_count, desc = "事件判断因子", mod = all} ,#f_column{type = int, name = limit_count, desc = "事件触发上限", val = 0, mod = all} ]} ,{["萌宠互动"],[ #f_column{type = int, name = id, desc = "id", mod = all} ,#f_column{type = kv, name = type, kv_type = {?MODULE, get, [type]}, desc = "互动类型", mod = all} ,#f_column{type = bstr, name = desc, desc = "内容", mod = all} ,#f_column{type = int, name = pro, desc = "权重", mod = all} ,#f_column{type = term, name = expend, desc = "消耗", val = "[]", mod = all} ,#f_column{type = int, name = award, desc = "奖励", val = "0", mod = all} ,#f_column{type = term, name = award2, desc = "额外奖励", val = "[]", mod = all} ]} ,{["常量配置"],[ #f_column{type = term, name = key, desc = "常量标识", add_list_sign = false,mod = all} ,#f_column{type = term, name = val, desc = "常量值", add_list_sign = false,mod= all} ,#f_column{type = bstr, name = desc, desc = "描述", mod = client} ]} ] }. get(type) -> [ {"对话", 1} ,{"消耗", 2} ].