%%---------------------------------------------------- %% 宠物出行 %% %% @author liufenglin 240039421@qq.com %%---------------------------------------------------- -module(proto_261). -export([info/0, cfg/0]). -include("protocol.hrl"). info() -> { "宠物出行" ,["common.hrl", "quest.hrl"] }. -spec cfg() -> [#rpc{}]. cfg() -> [ #rpc{ code = 26100 ,req_desc = "房间基础" ,log_title = "房间基础" ,req = [ ] ,reply_desc = "宠物出行基础信息" ,reply = [ {uint32, pet_id, "宠物基础id"} ,{string, name, "宠物名"} ,{uint8, state, "宠物状态(0:未激活 1:在家 2:出行)"} ,{uint32, vigor, "精力值"} ,{uint32, vigor_time, "精力下次回复时间"} ,{array, tuple, set_item, "行囊", [ {uint8, key, "键:(1:本次出行食物 2:本次出行道具 3:下次出行食物 4:下次出行道具)"} ,{uint32, id, "道具唯一id"} ]} ,{uint32, rename_count, "当前改名次数"} ,{uint8, day_talk, "今日已对话次数"} ,{uint8, day_feed, "今日已喂食次数"} ] } ,#rpc{ code = 26101 ,log_title = "请求精力值" ,req_desc = "请求精力值" ,req = [ ] ,reply_desc = "请求精力值" ,reply = [ {uint32, vigor, "精力值"} ,{uint32, vigor_time, "精力下次回复时间"} ] } ,#rpc{ code = 26102 ,log_title = "宠物改名" ,req_desc = "宠物改名" ,req = [ {string, name, "新名"} ] ,reply_desc = "请求精力值" ,reply = [ {uint8, code, "结果(0:失败 1:成功)"} ,{string, msg, "结果信息"} ,{string, name, "新名"} ,{uint32, rename_count, "当前改名次数"} ] } ,#rpc{ code = 26103 ,log_title = "宠物交互" ,req_desc = "宠物交互" ,req = [ {uint8, type, "交互类型(1:对话 2:喂食)"} ] ,reply_desc = "宠物交互" ,reply = [ {uint8, code, "结果(0:失败 1:成功)"} ,{string, msg, "结果信息"} ,{uint32, id, "交互id (根据这个读表取对话内容)"} ,{uint8, flag, "是否需要支付(0不需要 1:需要)"} ,{uint8, day_talk, "今日已对话次数"} ,{uint8, day_feed, "今日已喂食次数"} ,{uint32, vigor, "精力值"} ] } ,#rpc{ code = 26104 ,log_title = "宠物交互支付道具" ,req_desc = "宠物交互支付道具" ,req = [ ] ,reply_desc = "宠物交互支付道具" ,reply = [ {uint8, code, "结果(0:失败 1:成功)"} ,{string, msg, "结果信息"} ,{uint32, vigor, "精力值"} ,{uint8, day_talk, "今日已对话次数"} ,{uint8, day_feed, "今日已喂食次数"} ] } ,#rpc{ code = 26105 ,log_title = "宠物事件" ,req_desc = "宠物事件" ,req = [ ] ,reply_desc = "宠物事件" ,reply = [ {array, tuple, evt_list, "宠物事件", [ {uint32, evt_id, "事件唯一"} ,{uint32, time, "事件触发时间"} ,{uint32, evt_sid, "事件子id(1:出行 2:回归)"} ,{array, tuple, award, "事件奖励", [ {uint32, id, "道具id"} ,{uint32, num, "道具数量"} ]} ]} ] } ,#rpc{ code = 26106 ,log_title = "宠物事件奖励领取" ,req_desc = "宠物事件奖励领取" ,req = [ {uint32, evt_id, "事件唯一"} ] ,reply_desc = "宠物事件奖励领取" ,reply = [ {uint8, code, "结果(0:失败 1:成功)"} ,{string, msg, "结果信息"} ,{uint8, flag, "是否邮件发放"} ,{array, tuple, award, "事件奖励", [ {uint32, id, "道具id"} ,{uint32, num, "道具数量"} ]} ,{uint32, evt_id, "事件唯一"} ] } ,#rpc{ code = 26107 ,log_title = "行囊设置" ,req_desc = "行囊设置" ,req = [ {array, tuple, set_item, "行囊", [ {uint8, key, "键:(1:本次出行食物 2:本次出行道具 3:下次出行食物 4:下次出行道具)(没有不传)"} ,{uint32, id, "道具唯一id"} ]} ] ,reply_desc = "宠物事件奖励领取" ,reply = [ {uint8, code, "结果(0:失败 1:成功)"} ,{string, msg, "结果信息"} ,{array, tuple, set_item, "行囊", [ {uint8, key, "键:(1:本次出行食物 2:本次出行道具 3:下次出行食物 4:下次出行道具)(没有不传)"} ,{uint32, id, "道具唯一id"} ]} ] } ,#rpc{ code = 26108 ,log_title = "宠物事件推送" ,req_desc = "宠物事件推送" ,req = [ ] ,reply_desc = "宠物事件推送" ,reply = [ {array, tuple, evt_list, "宠物事件", [ {uint32, evt_id, "事件唯一"} ,{uint32, time, "事件触发时间"} ,{uint32, evt_sid, "事件子id(1:出行 2:回归)"} ,{array, tuple, award, "事件奖励", [ {uint32, id, "道具id"} ,{uint32, num, "道具数量"} ]} ]} ] } ,#rpc{ code = 26109 ,log_title = "获取本次出行所有事件" ,req_desc = "获取本次出行所有事件" ,req = [ ] ,reply_desc = "获取本次出行所有事件" ,reply = [ {uint32, start_time, "本次出行开始时间"} ,{array, tuple, evt_list, "宠物事件", [ {uint32, evt_id, "事件唯一"} ,{uint32, time, "事件触发时间"} ,{uint32, evt_sid, "事件子id(1:出行 2:回归)"} ,{array, tuple, award, "事件奖励", [ {uint32, id, "道具id"} ,{uint32, num, "道具数量"} ]} ]} ,{uint32, city_id, "城市id"} ] } ,#rpc{ code = 26110 ,log_title = "请求珍宝图鉴数据" ,req_desc = "请求珍宝图鉴数据" ,req = [ ] ,reply_desc = "请求珍宝图鉴数据" ,reply = [ {array, single, list, "珍宝图鉴数据", [ {uint32, id, "已激活的图鉴id"} ]} ] } ,#rpc{ code = 26111 ,log_title = "请求相册/日记数据" ,req_desc = "请求相册/日记数据" ,req = [ {uint8, type, "类型(34:相册 35:日记)"} ] ,reply_desc = "请求相册/日记数据" ,reply = [ {uint8, type, "类型(34:相册 35:日记)"} ,{array, tuple, list, "相册/日记数据", [ {uint32, id, "id"} ,{uint32, base_id, "bid"} ]} ] } ,#rpc{ code = 26112 ,log_title = "增加相册/日记数据" ,req_desc = "增加相册/日记数据" ,req = [ ] ,reply_desc = "增加相册/日记数据" ,reply = [ {uint8, type, "类型(34:相册 35:日记)"} ,{array, tuple, list, "相册/日记数据", [ {uint32, id, "id"} ,{uint32, base_id, "bid"} ]} ] } ,#rpc{ code = 26113 ,log_title = "删除相册/日记数据" ,req_desc = "删除相册/日记数据" ,req = [ {uint8, type, "类型(34:相册 35:日记)"} ,{uint32, id, "id"} ] ,reply_desc = "增加相册/日记数据" ,reply = [ {uint8, code, "结果(0:失败 1:成功)"} ,{string, msg, "结果信息"} ,{uint8, type, "类型(34:相册 35:日记)"} ,{uint32, id, "id"} ] } ].