This commit is contained in:
aozhiwei 2021-12-30 15:16:06 +08:00
parent a48dc468cf
commit 96fd43af5f
3 changed files with 47 additions and 11 deletions

View File

@ -39,7 +39,7 @@ class Hero(object):
'url': 'webapp/index.php?c=Hero&a=takonSkin',
'params': [
_common.ReqHead(),
['hero_id', 0, '英雄id'],
['hero_uniid', 0, '英雄唯一id'],
['skin_id', 0, '皮肤id'],
],
'response': [
@ -48,28 +48,45 @@ class Hero(object):
},
{
'name': 'upgradeSkill',
'desc': '技能',
'desc': '技能',
'group': 'Hero',
'url': 'webapp/index.php?c=Hero&a=upgradeSkill',
'params': [
_common.ReqHead(),
['hero_id', 0, '英雄id'],
['hero_uniid', 0, '英雄唯一id'],
],
'response': [
_common.RspHead(),
]
},
{
'name': 'useYokeItem',
'desc': '使用羁绊道具',
'name': 'upgradeLevel',
'desc': '升等级',
'group': 'Hero',
'url': 'webapp/index.php?c=Hero&a=useYokeItem',
'url': 'webapp/index.php?c=Hero&a=upgradeLevel',
'params': [
_common.ReqHead(),
['hero_id', 0, '英雄id'],
['hero_uniid', 0, '英雄唯一id'],
['cost_item_id', 0, '支付方式'],
],
'response': [
_common.RspHead(),
['property_chg', _common.PropertyChg(), '属性变更'],
]
},
{
'name': 'upgradeQuality',
'desc': '升阶',
'group': 'Hero',
'url': 'webapp/index.php?c=Hero&a=upgradeQuality',
'params': [
_common.ReqHead(),
['hero_uniid', 0, '英雄唯一id'],
['cost_item_id', 0, '支付方式'],
],
'response': [
_common.RspHead(),
['property_chg', _common.PropertyChg(), '属性变更'],
]
},
]

View File

@ -16,6 +16,14 @@ class RspHead(object):
['errmsg', '', '错误描述'],
]
class Attr(object):
def __init__(self):
self.fields = [
['attr_type', 0, '属性类型'],
['attr_val', 0, '属性值'],
]
class GunSkin(object):
def __init__(self):
@ -99,14 +107,20 @@ class Hero(object):
def __init__(self):
self.fields = [
['hero_uniid', 0, '英雄唯一id'],
['hero_id', 0, '英雄id'],
['hero_lv', 0, '英雄等级'],
['hero_tili', 0, '英雄体力'],
['state', 0, '0已购买 1体验中'],
['skin_id', 0, '英雄皮肤id'],
['quality', 0, '品阶'],
['skill_lv1', 0, '必杀技等级'],
['skill_lv2', 0, '躲避技能等级'],
['yoke_lv', 0, '羁绊等级'],
['yoke_exp', 0, '羁绊经验'],
['!attr', [Attr()], '属性'],
['try_count', 0, '剩余体验次数 当state=1时才有意义'],
['lock_type', 0, '0:无锁 1:升级 2:升阶'],
['lock_time', 0, '使用锁定时间(升级或者升阶触发),单位秒,锁定期间不可战斗和做其他操作'],
['trade_locktime', 0, '出售锁定时间(升级或者升阶完成后触发),单位秒,只锁交易,其他的操作仍可进行'],
]
class HeroSkin(object):

View File

@ -69,13 +69,18 @@ CREATE TABLE `t_hero` (
`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 '英雄体力',
`state` int(11) NOT NULL DEFAULT '0' COMMENT '0已购买 1体验中',
`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 '英雄等级',
`yoke_lv` int(11) NOT NULL DEFAULT '0' COMMENT '羁绊等级',
`yoke_exp` int(11) NOT NULL DEFAULT '0' COMMENT '羁绊经验',
`quality` int(11) NOT NULL DEFAULT '0' COMMENT '品阶',
`skill_lv1` int(11) NOT NULL DEFAULT '0' COMMENT '必杀技等级',
`skill_lv2` int(11) NOT NULL DEFAULT '0' COMMENT '躲避技能等级',
`try_count` int(11) NOT NULL DEFAULT '0' COMMENT '剩余体验次数 当state=1时才有意义',
`lock_type` int(11) NOT NULL DEFAULT '0' COMMENT '0:无锁 1:升级 2:升阶',
`unlock_time` int(11) NOT NULL DEFAULT '0' COMMENT '解锁时间',
`unlock_trade_time` int(11) NOT NULL DEFAULT '0' COMMENT '出售解锁时间',
`rand_attr` mediumblob COMMENT '随机属性',
`createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
`modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
PRIMARY KEY (`idx`),