This commit is contained in:
azw 2021-12-24 14:49:15 +08:00
parent a37bcd8ac6
commit 5ffa3dc400
3 changed files with 20 additions and 1 deletions

View File

@ -6,6 +6,20 @@ class Battle(object):
def __init__(self):
self.apis = [
{
'method': 'POST',
'name': 'preBattleCheck',
'desc': '战前检查把CMJoin协议打包成json格式放到http body里参考gamelog处理方式(在发CMJoin之前发如果errcode!=0则提示错误并且不再发CMJoin相当于进入失败)',
'group': 'Battle',
'url': 'webapp/index.php?c=Battle&a=preBattleCheck',
'params': [
_common.ReqHead(),
],
'response': [
_common.RspHead(),
['pre_battle_payload', '', '透传给战斗的CMJoin.pre_battle_payload(该信息里携带了战斗服需要校验的信息,防止客户端伪造数据)']
]
},
]
self.internalApis = [
{
@ -17,6 +31,8 @@ class Battle(object):
['map_id', 0, '地图id'],
['map_tpl_name', '', '地图模板名'],
['room_uuid', 0, '房间唯一id'],
['room_mode', 0, '房间模式 0:吃鸡模式 1:匹配赛模式'],
['hero_id', 0, '英雄id'],
['map_name', '', '地图名'],
['team_mode', 0, '队伍模式 0:单人 1组队'],
['game_time', 0, '游戏时间'],
@ -42,7 +58,7 @@ class Battle(object):
['rank_score', 0, '排位积分'],
#['pass_score', 0, '通行证积分'],
['items', 0, '道具|分割'],
['items', 0, '道具id:道具数量|'],
],
'response': [
_common.RspHead(),

View File

@ -101,6 +101,7 @@ class Hero(object):
self.fields = [
['hero_id', 0, '英雄id'],
['hero_lv', 0, '英雄等级'],
['hero_tili', 0, '英雄体力'],
['skin_id', 0, '英雄皮肤id'],
['skill_lv1', 0, '必杀技等级'],
['skill_lv2', 0, '躲避技能等级'],

View File

@ -68,6 +68,7 @@ CREATE TABLE `t_hero` (
`idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id',
`account_id` varchar(60) CHARACTER SET utf8 NOT NULL COMMENT 'account_id',
`hero_id` int(11) NOT NULL DEFAULT '0' COMMENT '英雄id',
`hero_tili` int(11) NOT NULL DEFAULT '0' COMMENT '英雄体力',
`skin_id` int(11) NOT NULL DEFAULT '0' COMMENT '皮肤id',
`hero_lv` int(11) NOT NULL DEFAULT '0' COMMENT '英雄等级',
`hero_exp` int(11) NOT NULL DEFAULT '0' COMMENT '英雄等级',
@ -237,6 +238,7 @@ CREATE TABLE `t_battle` (
`idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id',
`account_id` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id(channel + "_" + gameid + "_" + openid)',
`battle_data` mediumblob COMMENT 'battle_data',
`kills_modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '击杀修改时间',
`createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
`modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
PRIMARY KEY (`idx`),