This commit is contained in:
aozhiwei 2021-12-22 16:25:43 +08:00
parent c75994a858
commit 42d333bd9a
4 changed files with 18 additions and 0 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 = [
{

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 '英雄等级',

View File

@ -28,6 +28,7 @@ class Hero extends BaseModel {
return array(
'hero_id' => $row['hero_id'],
'hero_lv' => $row['hero_lv'],
'hero_tili' => $row['hero_tili'],
'skin_id' => $row['skin_id'],
'skill_lv1' => $row['skill_lv1'],
'skill_lv2' => $row['skill_lv2'],
@ -51,6 +52,7 @@ class Hero extends BaseModel {
'account_id' => myself()->_getAccountId(),
'hero_id' => $heroMeta['id'],
'hero_lv' => 1,
'hero_tili' => $heroMeta['tili'],
#'skin_id' => $defSkin,
'skill_lv1' => 1,
'skill_lv2' => 1,