411 lines
17 KiB
Erlang
411 lines
17 KiB
Erlang
%%----------------------------------------------------
|
|
% 积分商城协议
|
|
%% @author liufenglin
|
|
%%----------------------------------------------------
|
|
-module(proto_134).
|
|
-export([info/0,cfg/0]).
|
|
-include("protocol.hrl").
|
|
|
|
info() -> {
|
|
""
|
|
,["exchange.hrl"]
|
|
}.
|
|
|
|
cfg() ->
|
|
[
|
|
#rpc{
|
|
code = 13401
|
|
,log_title = "商店请求"
|
|
,req_desc = "商店请求"
|
|
,req = [
|
|
{uint8, type, "商店类型"}
|
|
]
|
|
,reply_desc = "商城返回"
|
|
,reply = [
|
|
{uint8, code, "结果(0:失败 1:成功)"}
|
|
,{string, msg, "结果信息"}
|
|
,{uint8, type, "商店类型"}
|
|
,{uint8, is_half, "是否已使用体力半价 (0:未使用 1:已使用)"}
|
|
,{array, tuple, item_list, "物品列表", [
|
|
{uint32, item_id , "物品序号Id"}
|
|
,{array, tuple, ext, "商品附加信息",
|
|
[{uint8, key, "附加信息标识"}
|
|
, {uint32, val, "附加信息值"}
|
|
]
|
|
}
|
|
]}
|
|
]
|
|
},
|
|
#rpc{
|
|
code = 13402
|
|
,log_title = "兑换"
|
|
,req_desc = "兑换"
|
|
,req = [
|
|
{uint32, eid, "积分商店物品eid"},
|
|
{uint32, num, "兑换数量"}
|
|
]
|
|
,reply_desc = "兑换返回"
|
|
,reply = [
|
|
{uint8, code, "结果(0:失败 1:成功)"}
|
|
,{uint8, type, "商店类型"}
|
|
,{uint32, eid, "商店物品eid"}
|
|
,{uint8, is_half, "是否已使用体力半价 (0:未使用 1:已使用)"}
|
|
,{array, tuple, ext, "商品附加信息",
|
|
[{uint8, key, "附加信息标识"}
|
|
, {uint32, val, "附加信息值"}
|
|
]
|
|
}
|
|
,{string, msg, "结果信息"}
|
|
]
|
|
},
|
|
#rpc{
|
|
code = 13403
|
|
,log_title = "请求神秘商店"
|
|
,req_desc = "请求神秘商店"
|
|
,req = [
|
|
{uint32, type, "商城类型"}
|
|
]
|
|
,reply_desc = "神秘商店返回"
|
|
,reply = [
|
|
{uint32, type, "商城类型"}
|
|
,{uint8, code, "结果(0:失败 1:成功)"}
|
|
,{string, msg, "结果信息"}
|
|
,{uint32, count , "今日刷新次数"}
|
|
,{uint32, free_count, "剩余免费次数"}
|
|
,{uint32, num, "当前格子数量"}
|
|
,{uint32, refresh_time, "刷新时间(0:请求错误 1:unixtime)"}
|
|
,{array, tuple, item_list, "物品列表", [
|
|
{uint32, item_id , "物品序号Id"}
|
|
,{uint32, item_num , "物品数量"}
|
|
,{uint32, order, "序列号"}
|
|
,{uint32, price, "价格"}
|
|
,{uint8, type, "物品类型:1/eqm, 2/partner, 3/item"}
|
|
,{uint32, pay_type, "支付类型:1/金币, 2/钻石"}
|
|
,{uint32, has_buy , "已购买次数"}
|
|
,{uint32, limit_count , "限购次数"}
|
|
,{uint32, limit_day , "天限购次数"}
|
|
,{uint32, limit_week , "周限购次数"}
|
|
,{uint32, limit_month , "月限购次数"}
|
|
,{uint32, discount_type, "折扣类型"}
|
|
,{uint32, discount , "折扣"}
|
|
,{array, tuple, main_attr, "主属性", [
|
|
{uint8, attr_type, "属性类型 比如 攻击 物防 法防"}
|
|
,{uint32, val, "值, 如果是比例"}
|
|
]}
|
|
,{uint32, pay_type2, "支付类型:0/没有第二支付"}
|
|
,{uint32, price2 , "第二支付价格"}
|
|
,{uint32, score, "评分"}
|
|
,{string, item_desc, "物品描述"}
|
|
]}
|
|
]
|
|
},
|
|
#rpc{
|
|
code = 13404
|
|
,log_title = "服务端推送神秘商店可以刷新"
|
|
,reply_desc = "服务端推送神秘商店可以刷新"
|
|
,reply = [
|
|
]
|
|
},
|
|
#rpc{
|
|
code = 13405
|
|
,log_title = "手动刷新"
|
|
,req_desc = "手动刷新"
|
|
,req = [
|
|
{uint32, type, "商城类型"}
|
|
]
|
|
,reply_desc = "手动刷新"
|
|
,reply = [
|
|
{uint32, type, "商城类型"}
|
|
,{uint8, code, "结果(0:失败 1:成功)"}
|
|
,{string, msg, "结果信息"}
|
|
,{uint32, count , "今日刷新次数"}
|
|
,{uint32, free_count, "剩余免费次数"}
|
|
,{uint32, num, "当前格子数量"}
|
|
,{uint32, refresh_time, "刷新时间(0:请求错误 1:unixtime)"}
|
|
,{array, tuple, item_list, "物品列表", [
|
|
{uint32, item_id , "物品序号Id"}
|
|
,{uint32, item_num , "物品数量"}
|
|
,{uint32, order, "序列号"}
|
|
,{uint32, price, "价格"}
|
|
,{uint8, type, "物品类型:1/eqm, 2/partner, 3/item"}
|
|
,{uint32, pay_type, "支付类型:1/金币, 2/钻石"}
|
|
,{uint32, has_buy , "已购买次数"}
|
|
,{uint32, limit_count , "限购次数"}
|
|
,{uint32, limit_day , "天限购次数"}
|
|
,{uint32, limit_week , "周限购次数"}
|
|
,{uint32, limit_month , "月限购次数"}
|
|
,{uint32, discount_type, "折扣类型"}
|
|
,{uint32, discount , "折扣"}
|
|
,{array, tuple, main_attr, "主属性", [
|
|
{uint8, attr_type, "属性类型 比如 攻击 物防 法防"}
|
|
,{uint32, val, "值, 如果是比例"}
|
|
]}
|
|
,{uint32, pay_type2, "支付类型:0/没有第二支付"}
|
|
,{uint32, price2 , "第二支付价格"}
|
|
,{uint32, score, "评分"}
|
|
,{string, item_desc, "物品描述"}
|
|
]}
|
|
]
|
|
},
|
|
%% #rpc{
|
|
%% code = 13406
|
|
%% ,req_desc = "开启物品格"
|
|
%% ,req = [
|
|
%% ]
|
|
%% ,reply_desc = "开启物品格"
|
|
%% ,reply = [
|
|
%% {uint8, code, "结果(0:失败 1:成功)"}
|
|
%% ,{string, msg, "结果信息"}
|
|
%% ,{uint32, count , "今日刷新次数"}
|
|
%% ,{uint32, num, "当前格子数量"}
|
|
%% ,{array, tuple, item_list, "物品列表", [
|
|
%% {uint32, item_id , "物品序号Id"}
|
|
%% ,{uint32, item_num , "物品数量"}
|
|
%% ,{uint32, order, "序列号"}
|
|
%% ,{uint32, price, "价格"}
|
|
%% ,{uint8, type, "物品类型:1/eqm, 2/partner, 3/item"}
|
|
%% ,{uint8, pay_type, "支付类型:1/金币, 2/钻石"}
|
|
%% ,{uint32, buycount , "是否购买"}
|
|
%% ,{uint32, discount_type, "折扣类型"}
|
|
%% ,{uint32, discount , "折扣"}
|
|
%% ,{array, tuple, main_attr, "主属性", [
|
|
%% {uint8, attr_type, "属性类型 比如 攻击 物防 法防"}
|
|
%% ,{uint32, val, "值, 如果是比例"}
|
|
%% ]}
|
|
%% ,{uint8, pay_type2, "支付类型:0/没有第二支付"}
|
|
%% ,{uint32, price2 , "第二支付价格"}
|
|
%% ,{uint32, score, "评分"}
|
|
%% ]}
|
|
%% ]
|
|
%% },
|
|
#rpc{
|
|
code = 13407
|
|
,log_title = "请求神秘商城购买"
|
|
,req_desc = "请求神秘商城购买"
|
|
,req = [
|
|
{uint32, order, "序列号"}
|
|
,{uint32, type, "商城类型"}
|
|
,{uint32, buy_type, "购买类型(1:支付类型1购买 2:支付类型2购买)"}
|
|
,{uint32, num, "兑换数量"}
|
|
]
|
|
,reply_desc = "神秘商城购买"
|
|
,reply = [
|
|
{uint8, code, "结果(0:失败 1:成功)"}
|
|
,{string, msg, "结果信息"}
|
|
,{uint32, order, "序列号"}
|
|
,{uint32, num, "兑换数量"}
|
|
,{uint32, type, "商城类型"}
|
|
]
|
|
},
|
|
#rpc{
|
|
code = 13408
|
|
,log_title = "请求是否半价"
|
|
,req_desc = "请求是否半价"
|
|
,req = [
|
|
{uint8, type, "类型"}
|
|
]
|
|
,reply_desc = "返回是否半价"
|
|
,reply = [
|
|
{uint8, code, "结果(0:半价 1:全价)"}
|
|
]
|
|
}
|
|
,#rpc{
|
|
code = 13409
|
|
,log_title = "请求积分商店"
|
|
,req_desc = "请求积分商店"
|
|
,req = [
|
|
{uint8, type, "商店类型"}
|
|
]
|
|
,reply_desc = "积分商店返回"
|
|
,reply = [
|
|
{uint8, code, "结果(0:失败 1:成功)"}
|
|
,{string, msg, "结果信息"}
|
|
,{uint32, count , "今日刷新次数"}
|
|
,{array, exchange_other, item_list, "物品列表", [
|
|
{uint32, pos , "位置"}
|
|
,{uint32, item_id , "物品Id"}
|
|
,{uint32, item_num , "物品数量"}
|
|
,{uint32, price, "价格"}
|
|
,{uint32, status , "每日剩余购买次数"}
|
|
]}
|
|
]
|
|
}
|
|
,#rpc{
|
|
code = 13410
|
|
,log_title = "请求积分商店购买"
|
|
,req_desc = "请求积分商店购买"
|
|
,req = [
|
|
{uint8, type, "商店类型"}
|
|
,{uint32, pos , "位置"}
|
|
]
|
|
,reply_desc = "积分商店购买返回"
|
|
,reply = [
|
|
{uint8, code, "结果(0:失败 1:成功)"}
|
|
,{string, msg, "结果信息"}
|
|
,{array, exchange_other, item_list, "物品列表", [
|
|
{uint32, pos , "位置"}
|
|
,{uint32, item_id , "物品Id"}
|
|
,{uint32, item_num , "物品数量"}
|
|
,{uint32, price, "价格"}
|
|
,{uint32, status , "是否购买"}
|
|
]}
|
|
]
|
|
}
|
|
,#rpc{
|
|
code = 13411
|
|
,log_title = "请求积分商店手动刷新"
|
|
,req_desc = "请求积分商店手动刷新"
|
|
,req = [
|
|
{uint8, type, "商店类型"}
|
|
]
|
|
,reply_desc = "积分商店手动刷新返回"
|
|
,reply = [
|
|
{uint8, code, "结果(0:失败 1:成功)"}
|
|
,{string, msg, "结果信息"}
|
|
,{uint32, count , "今日刷新次数"}
|
|
,{array, exchange_other, item_list, "物品列表", [
|
|
{uint32, pos , "位置"}
|
|
,{uint32, item_id , "物品Id"}
|
|
,{uint32, item_num , "物品数量"}
|
|
,{uint32, price, "价格"}
|
|
,{uint32, status , "是否购买"}
|
|
]}
|
|
]
|
|
}
|
|
,#rpc{
|
|
code = 13412
|
|
,log_title = "请求热卖商城"
|
|
,req_desc = "请求热卖商城"
|
|
,req = [
|
|
]
|
|
,reply_desc = "热卖商城信息"
|
|
,reply = [
|
|
{uint8, code, "结果(0:失败 1:成功)"}
|
|
,{string, msg, "结果信息"}
|
|
,{uint32, type, "活动子类型"}
|
|
,{uint32, day , "第几天"}
|
|
,{array, tuple, item_list, "物品列表", [
|
|
{uint32, item_id , "商品id"}
|
|
,{uint32, status , "购买次数"}
|
|
]}
|
|
]
|
|
}
|
|
,#rpc{
|
|
code = 13413
|
|
,log_title = "热卖商城购买"
|
|
,req_desc = "热卖商城购买"
|
|
,req = [
|
|
{uint32, id, "商品id"}
|
|
]
|
|
,reply_desc = "热卖商城信息"
|
|
,reply = [
|
|
{uint8, code, "结果(0:失败 1:成功)"}
|
|
,{string, msg, "结果信息"}
|
|
,{uint32, type, "活动子类型"}
|
|
,{uint32, day , "第几天"}
|
|
,{array, tuple, item_list, "物品列表", [
|
|
{uint32, item_id , "商品id"}
|
|
,{uint32, status , "购买次数"}
|
|
]}
|
|
]
|
|
}
|
|
,#rpc{
|
|
code = 13414
|
|
,log_title = "请求商城红点相关"
|
|
,req_desc = "请求商城红点相关"
|
|
,req = [
|
|
]
|
|
,reply_desc = "商城红点相关"
|
|
,reply = [
|
|
{uint8, code, "结果(0:不加红点 1:加红点)"}
|
|
]
|
|
},
|
|
#rpc{
|
|
code = 13415
|
|
,log_title = "请求神器商店"
|
|
,req_desc = "请求神器商店"
|
|
,req = [
|
|
{uint32, type, "商城类型"}
|
|
]
|
|
,reply_desc = "神器商店返回"
|
|
,reply = [
|
|
{uint32, type, "商城类型"}
|
|
,{uint16, count , "今日刷新次数"}
|
|
,{uint16, max_count , "今日刷新次数上限"}
|
|
,{uint8, free_count , "今日免费刷新次数"}
|
|
,{uint8, max_free_count , "免费刷新次数上限"}
|
|
,{array, tuple, item_list, "物品列表", [
|
|
{uint8, order, "序列号"}
|
|
,{uint32, item_id , "物品序号Id"}
|
|
,{uint32, item_num , "物品数量"}
|
|
,{uint32, price, "价格"}
|
|
,{uint8, type, "物品类型:1/eqm, 2/partner, 3/item, 4/神器"}
|
|
,{uint8, pay_type, "支付类型:1/金币, 2/钻石, 20/神器之灵"}
|
|
,{uint32, buycount , "是否购买"}
|
|
,{uint32, discount_type, "折扣类型"}
|
|
,{uint32, discount , "折扣"}
|
|
]}
|
|
]
|
|
}
|
|
,#rpc{
|
|
code = 13416
|
|
,log_title = "请求神器商城购买"
|
|
,req_desc = "请求神器商城购买"
|
|
,req = [
|
|
{uint32, order, "序列号"}
|
|
,{uint32, type, "商城类型"}
|
|
,{uint32, buy_type, "购买类型(1:支付类型1购买 2:支付类型2购买)"}
|
|
]
|
|
,reply_desc = "神器商城购买"
|
|
,reply = [
|
|
{uint8, code, "结果(0:失败 1:成功)"}
|
|
,{string, msg, "结果信息"}
|
|
,{uint32, order, "序列号"}
|
|
]
|
|
}
|
|
,#rpc{
|
|
code = 13417
|
|
,log_title = "刷新神器商城"
|
|
,req_desc = "刷新神器商城"
|
|
,req = [
|
|
{uint32, type, "商城类型"}
|
|
]
|
|
,reply_desc = "神器商城购买"
|
|
,reply = [
|
|
{uint8, code, "结果(0:失败 1:成功)"}
|
|
,{string, msg, "结果信息"}
|
|
]
|
|
}
|
|
,#rpc{
|
|
code = 13418
|
|
,log_title = "神器商城刷新,重新请求13415"
|
|
,reply_desc = "神器商城刷新, 重新请求13415(如果在相应界面中)"
|
|
,reply = []
|
|
}
|
|
,#rpc{
|
|
code = 13419
|
|
,log_title = "神格兑换"
|
|
,req_desc = "神格兑换"
|
|
,req = [
|
|
{uint32, num, "兑换的神格数量"}
|
|
]
|
|
,reply_desc = "神格兑换"
|
|
,reply = [
|
|
{uint8, code, "结果(0:失败 1:成功)"}
|
|
,{string, msg, "结果信息"}
|
|
]
|
|
}
|
|
,#rpc{
|
|
code = 13420
|
|
,log_title = "免费次数刷新"
|
|
,req_desc = "免费次数刷新"
|
|
,req = []
|
|
,reply = [
|
|
{uint32, type, "商城类型"}
|
|
,{uint32, count , "今日刷新次数"}
|
|
,{uint32, free_count, "剩余免费次数"}
|
|
,{uint32, refresh_time, "刷新时间(0:请求错误 1:unixtime)"}
|
|
]
|
|
}
|
|
].
|