game2006api/doc/_common.py
hujiabin aa6c1e98bf 1
2022-09-19 22:01:30 +08:00

821 lines
29 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# -*- coding: utf-8 -*-
class ReqHead(object):
def __init__(self):
self.fields = [
['account_id', '', '账号id'],
['session_id', '', '会话id'],
]
class RspHead(object):
def __init__(self, **kwargs):
self.fields = [
['errcode', 0, '错误码/0 成功1 失败2余额不足'],
['errmsg', '', '错误描述'],
]
for (key, value) in kwargs.items():
for i in range(0, len(self.fields)):
if self.fields[i][0] == key:
self.fields[i][0] = key
self.fields[i][1] = value
break
class Union(object):
def __init__(self, fields):
self.doc = 'Union 联合体的访问方式:.联合体内含结构的字段名'
self.fields = [['', f[0], f[1]] for f in fields]
class Attr(object):
def __init__(self):
self.fields = [
['attr_id', 0, '属性id'],
['type', 0, '1: 绝对值 2百分比 ---弃用字段'],
['val', 0, '属性值'],
]
class AttrDesc(object):
def __init__(self):
self.fields = [
['name', '', '属性名'],
['attr_id', 0, '属性id'],
['type', 0, '1: 绝对值 2百分比 ---弃用字段' ],
['val', 0, '属性值'],
]
class SystemCurrency(object):
def __init__(self):
self.fields = [
['name', '', '货币名称'],
['original_price', 0, '原价'],
['discount_price', 0, '折后价'],
['discount_rate', 0, '折扣百分比0-100'],
['decimals', 0, '小数位数'],
['contract_address', 0, '合约地址'],
]
class Page(object):
def __init__(self):
self.fields = [
['last_idx', '', '回传信息'],
['total', 0, '总记录数'],
['count', 0, '当前记录数'],
['per_page', 0, '每页多少条记录'],
['current_page', 0, '当前页'],
['total_pages', 0, '总页数'],
]
class Gun(object):
def __init__(self):
self.fields = [
['token_id', '', 'token id'],
['gun_uniid', 0, '枪唯一id'],
['gun_id', 0, '枪id'],
['state', 0, '0已购买 1体验中'],
['gun_lv', 0, '枪等级'],
['quality', 0, '品阶'],
['durability', 0, '耐久'],
['durability_max', 0, '最大耐久'],
['ceg_uplimit', 0, 'ceg今天获取上限'],
['!attr_base', [Attr()], '枪械基础属性'],
['!attr_pro', [Attr()], '枪械升级升阶加成属性'],
['!attr_chip', [Attr()], '枪械芯片加成属性'],
['try_count', 0, '剩余体验次数 当state=1时才有意义'],
['lock_type', 0, '0:无锁 1:升级 2:升阶 3:派遣中'],
['unlock_time', 0, '使用解锁utc时间(升级或者升阶触发),锁定期间不可战斗和做其他操作,配合lock_type使用'],
['unlock_lefttime', 0, '解锁剩余时间(单位秒)'],
['trade_locktime', 0, '出售锁定时间(升级或者升阶完成后触发),单位秒,只锁交易,其他的操作仍可进行'],
['current_pvp_get_ceg', 0, '当前pvp获取的ceg数量'],
['current_pve_get_ceg', 0, '当前pve获取的ceg数量'],
['last_pvp_get_ceg_time', 0, '最后一次获取pvp获取ceg时间'],
['last_pve_get_ceg_time', 0, '最后一次获取pve获取ceg时间'],
['chip_ids', '', '镶嵌的芯片主键id组'],
['!chip_core', [ChipCore()], '芯片核心加成'],
['pvp_ceg_uplimit', 0, 'pvp获取的ceg的上限'],
['pve_ceg_uplimit', 0, 'pve获取的ceg的上限'],
['offer_reward_state', 0, '是否悬赏中'],
]
class GunSkin(object):
def __init__(self):
self.fields = [
['gun_id', 0, '枪支id'],
['skin_id', 0, '皮肤id'],
['try_expire_at', 0, '试用到期时间(utc时间)'],
]
class GunTalent(object):
def __init__(self):
self.fields = [
['talent_id', 0, '天赋'],
['talent_lv', 0, '天赋等级'],
]
class UserInfo(object):
def __init__(self):
self.fields = [
['activated', 0, '是否已激活'],
['rename_count', 0, '改名次数'],
['account_id', '', '账号id'],
['name', '', '用户名字'],
['head_id', 0, '头像id'],
['head_frame', 0, '头像框id'],
['level', 0, '等级'],
['exp', 0, '经验'],
['max_exp', 0, '经验(上限)'],
['rank', 0, '当前段位'],
['history_best_rank', 0, '历史最高段位'],
['gold', 0, '金币'],
['diamond', 0, '钻石'],
['hero_uniid', 0, '当前使用的英雄唯一ID'],
['hero_id', 0, '当前使用的英雄ID'],
['first_fight', 0, '是否是第一次战斗'],
['already_guide', 0, '是否已经引导'],
['pve_instance_id', 0, '已过pve副本id 0:一关未过'],
['!head_list', [0], '拥有的头像列表'],
['!head_frame_list', [0], '拥有的头像框列表'],
]
class UserSimple(object):
def __init__(self):
self.fields = [
['account_id', '', '账号id'],
['address', '', '钱包地址'],
['name', '', '用户名字'],
['head_id', 0, '头像id'],
['head_frame', 0, '头像框id'],
['level', 0, '等级'],
['exp', 0, '经验'],
['gold', 0, '金币'],
['diamond', 0, '钻石'],
['hero_id', 0, '当前使用的英雄ID'],
['rank', 0, '段位'],
['score', 0, '积分'],
['pve_instance_id', 0, '已过pve副本id 0:一关未过'],
]
class BcUserInfo(object):
def __init__(self):
self.fields = [
['account', '', '账号'],
['gold', 0, '金币'],
['diamond', 0, '钻石'],
]
class UserDetailInfo(object):
def __init__(self):
self.fields = [
['activated', 0, '是否已激活'],
['account_id', '', '账号id'],
['name', '', '用户名字'],
['head_id', 0, '头像id'],
['head_frame', 0, '头像框id'],
['level', 0, '等级'],
['exp', 0, '经验'],
['max_exp', 0, '经验(上限)'],
['gold', 0, '金币'],
['diamond', 0, '钻石'],
['hero_uniid', 0, '当前使用的英雄唯一ID'],
['hero_id', 0, '当前使用的英雄ID'],
['current_rank', 0, '当前段位'],
['history_best_rank', 0, '历史最高段位'],
['like_count', 0, '点赞次数'],
['!history_seasons', [UserHisSeason()], '历史打过的赛季列表'],
]
class UserHisSeason(object):
def __init__(self):
self.fields = [
['season_id', 0, '赛季'],
['total_kills', 0, '击杀总数(个人信息)'],
['game_times', 0, '游戏场次(个人信息)'],
['win_times', 0, '胜利场次(个人信息)'],
['win_rate', 0, '胜率(个人信息,百分比数值整数部分)'],
['max_kills', 0, '最高击杀(游戏信息)'],
['avg_kills', 0, '平均击杀(游戏信息)'],
['max_damage_out', 0, '最高伤害输出(游戏信息)'],
['avg_damage_out', 0, '平均伤害输出(游戏信息)'],
['star_kills', 0, '击败(5纬图-击败, 百分比数值整数部分)'],
['star_damage', 0, '伤害(5纬图-伤害, 百分比数值整数部分)'],
['star_alive', 0, '生存(5纬图-生存, 百分比数值整数部分)'],
['star_recover', 0, '治疗(5纬图-治疗, 百分比数值整数部分)'],
['star_win', 0, '胜利(5纬图-胜利, 百分比数值整数部分)'],
]
class Hero(object):
def __init__(self):
self.fields = [
['token_id', '', 'token id'],
['hero_uniid', 0, '英雄唯一id'],
['hero_id', 0, '英雄id'],
['hero_lv', 0, '英雄等级'],
['hero_tili', 0, '英雄体力'],
['hero_tili_max', 0, '英雄最大体力'],
['state', 0, '0已购买 1体验中'],
['skin_id', 0, '英雄皮肤id'],
['quality', 0, '品阶'],
['skill_lv1', 0, '主动技能等级'],
['skill_lv2', 0, '被动技能等级'],
['!attr_base', [Attr()], '英雄基础属性'],
['!attr_pro', [Attr()], '英雄升级升阶提升属性'],
['!attr_skill', [Attr()], '英雄技能提升属性'],
['!attr_chip', [Attr()], '英雄芯片提升属性'],
['try_count', 0, '剩余体验次数 当state=1时才有意义'],
['lock_type', 0, '0:无锁 1:升级 2:升阶 3:派遣中'],
['unlock_lefttime', 0, '解锁剩余时间(单位秒)'],
['unlock_time', 0, '使用解锁utc时间(升级或者升阶触发),锁定期间不可战斗和做其他操作,配合lock_type使用'],
['current_pvp_get_ceg', 0, '当前pvp获取的ceg数量'],
['current_pve_get_ceg', 0, '当前pve获取的ceg数量'],
['last_pvp_get_ceg_time', 0, '最后一次获取pvp获取ceg时间'],
['last_pve_get_ceg_time', 0, '最后一次获取pve获取ceg时间'],
['unlock_trade_time', 0, '出售解锁utc时间(升级或者升阶完成后触发),只锁交易其他的操作仍可进行和lock_type无关是独立的锁!!!'],
['advanced_count', 0, '进阶次数'],
['lukcy', 0, '幸运'],
['chip_ids', '', '镶嵌的芯片主键id组'],
['skill_points', '', '技能点'],
['!chip_core', [ChipCore()], '芯片核心加成'],
['!skill_common', [], '通用属性'],
['pvp_ceg_uplimit', 0, 'pvp获取的ceg的上限'],
['pve_ceg_uplimit', 0, 'pve获取的ceg的上限'],
['offer_reward_state', 0, '是否悬赏中'],
]
class LevelingHero(object):
def __init__(self):
self.fields = [
['info', Hero(), '英雄信息'],
['countdown', 0, '倒计时'],
]
class QualityingHero(object):
def __init__(self):
self.fields = [
['info', Hero(), '英雄信息'],
['countdown', 0, '倒计时'],
]
class HeroSkin(object):
def __init__(self):
self.fields = [
['skin_id', 0, '英雄皮肤id'],
['skin_state', 0, '英雄皮肤状态 0=已经购1 = 试用状态'],
['try_expire_at', 0, '试用到期时间(utc时间)'],
]
class Item(object):
def __init__(self):
self.fields = [
['item_uniid', 0, '道具唯一id'],
['item_id', 0, '道具id'],
['item_num', 0, '道具数量'],
['!attr', [Attr()], '属性'],
]
class AwardItem(object):
def __init__(self):
self.fields = [
['item_id', 0, '道具id'],
['item_num', 0, '道具数量'],
]
class Award(object):
def __init__(self):
self.fields = [
['!items', [AwardItem()], '奖励物品列表']
]
class PropertyChg(object):
def __init__(self):
self.fields = [
['user_info', UserInfo(), '用户信息变更(用来更新本地客户端字段(有则更新无则不变))'],
['!container_chg', [''], '容器类数据变更(bag、hero、heroSkin、gunSkin, gun,chip,fragment)']
]
class CostInfoItem(object):
def __init__(self):
self.fields = [
['item_id', 0, '购买需要消耗的道具id'],
['item_num', 0, '购买需要消耗的道具数量'],
['discount', 0, '折扣百分比0-100'],
]
class CostInfo(object):
def __init__(self):
self.fields = [
['!cost_group', [CostInfoItem()], '一组扣费项目,(金币、钻石视为道具,可能有多种价格)'],
]
class PriceInfo(object):
def __init__(self):
self.fields = [
['!cost_list', [CostInfo()], '扣费方式列表'],
['discount_begin_time', 0, '折扣开始时间(utc时间)'],
['discount_end_time', 0, '折扣结束时间(utc时间)'],
]
class DiscountInfo(object):
def __init__(self):
self.fields = [
['item_id', 0, '道具id'],
['gold_discount', 0, '金币折扣百分比0-100'],
['diamond_discount', 0, '钻石折扣百分比0-100'],
]
class ItemPriceInfo(object):
def __init__(self):
self.fields = [
['item_id', 0, '道具id'],
['price_info', PriceInfo(), '价格信息'],
]
class Goods(object):
def __init__(self):
self.fields = [
['goods_id', 0, '商品id 用于购买的时候回传'],
['item_id', 0, '配置表id'],
['price_info', PriceInfo(), '价格信息'],
['flag_icon', '', '商品标记(商品左上角的显示图标,超值、9折等)'],
['limit_type', 0, '0:不限购(这时忽略bought_times、total_buy_times) 1:每日限购 2:周限购 3:累计限购'],
['bought_times', 0, '已购买次数'],
['total_buy_times', 0, '总的可购买次数'],
]
class Shop(object):
def __init__(self):
self.fields = [
['shop_id', 0, '商店id'],
['!goods_list1', [Goods()], '商品列表1'],
['!goods_list2', [Goods()], '商品列表2'],
]
class Mission(object):
def __init__(self):
self.fields = [
['mission_id', 0, '任务id'],
['current', 0, '任务进度-当前'],
['target', 0, '任务进度-目标'],
['state', 0, '任务状态 0:任务已完成-可领取奖励 1:可接任务(send) 2:任务进行中-未完成(不可领取)'],
['show_progress', 0, '是否显示任务进度'],
['objects!',
[
['type', '', '类型 0武器 1英雄'],
['id', '', 'id'],
],
'悬赏任务对象列表'],
['lefttime', 0, '剩余时间(悬赏任务)'],
['ceg_num', 0, '奖励ceg数量(悬赏任务)'],
]
class SeasonCardGiftPackage(object):
def __init__(self):
self.fields = [
['package_id', 0, '礼包id'],
['item_id', 0, '礼包道具表id(目前客户端没用到先不用管)'],
['state', 0, '0:未购买 1:已购买'],
['price_info', PriceInfo(), '价格信息'],
]
class SeasonCard(object):
def __init__(self):
self.fields = [
['season_id', 0, '赛季id(客户端显示为Sxxx)'],
['season_begin_time', 0, '赛季开始时间(utc时间)'],
['season_end_time', 0, '赛季结束时间(utc时间)'],
['card_lv', 0, '手册等级'],
['card_exp', 0, '手册经验'],
['card_max_exp', 0, '手册经验上限'],
['buy_level_price', 0, '等级价格(钻石)'],
['!gift_packages', [SeasonCardGiftPackage()], '礼包列表'],
['!received_level_rewards1', [0], '等级解锁的奖励已领取等级列表(普通手册)'],
['!received_level_rewards2', [0], '等级解锁的奖励已领取等级列表(精英)'],
]
class SeasonMission(object):
def __init__(self):
self.fields = [
['state', 0, '任务状态 0:可领取 1:已领取 2:未完成(不可领取)'],
['current', 0, '当前匹配场次'],
['target', 0, '目标匹配场次'],
['target_rank', 0, '目标段位'],
]
class Season(object):
def __init__(self):
self.fields = [
['season_id', 0, '赛季id(客户端显示为Sxxx)'],
['rank', 0, '段位'],
['score', 0, '积分'],
['max_score', 0, '积分上限'],
['noshow_score_bar', 0, '不要显示积分条界面(xx/xx)'],
['mission', SeasonMission(), '赛季任务'],
]
class RankingItem(object):
def __init__(self):
self.fields = [
['ranked', 0, '排名'],
['account_id', '', '账号id'],
['address', '', '钱包地址'],
['name', '', '用户名字'],
['head_id', 0, '头像id'],
['head_frame', 0, '头像框id'],
['level', 0, '等级'],
['exp', 0, '经验'],
['gold', 0, '金币'],
['diamond', 0, '钻石'],
['hero_id', 0, '当前使用的英雄ID'],
['rank', 0, '段位'],
['score', 0, '积分'],
]
class RankingList(object):
def __init__(self):
self.fields = [
['type', 0, '排行榜类型 1积分榜'],
['!ranking_list', [RankingItem()], '排行榜'],
['my_ranked', RankingItem(), '我的排名(如果ranked<1则表示自己未上榜)'],
]
class RankingItemEx(object):
def __init__(self):
self.fields = [
['ranked', 0, '排名'],
['user', UserSimple(), '用户信息'],
['value', 0, '存活时间 击杀数'],
]
class RankingListEx(object):
def __init__(self):
self.fields = [
['type', 0, '排行榜类型 1:存活时间 2:击杀数'],
['!rows', [RankingItemEx()], '排行榜'],
['my_ranked', RankingItemEx(), '我的排名(如果ranked<1则表示自己未上榜)'],
]
class RedDot(object):
def __init__(self):
self.fields = [
['type', 0, '红点类型'],
['state', 0, '红点状态 0:无 1:有'],
]
class TeamMember(object):
def __init__(self):
self.fields = [
['account_id', '', '账号id'],
['name', '', '用户名字'],
['sex', 0, '性别'],
['hero_id', 0, 'heroid'],
['head_id', 0, '头像id'],
['head_frame', 0, '头像框id'],
['level', 0, '等级'],
['exp', 0, '经验'],
['rank', 0, '段位'],
['game_times', 0, '游戏次数'],
['win_times', 0, '胜利次数'],
['kills', 0, '击杀数'],
['is_leader', 0, '是否队长'],
['createtime', 0, '账号创建时间'],
]
class TeamInfo(object):
def __init__(self):
self.fields = [
['team_uuid', '', '队伍唯一id'],
['payload', '', '透传给CMJoin'],
['match_mode', 0, '0: 匹配赛模式 1: 排位赛 3: pve'],
['pve_instance_id', 0, 'pve副本id'],
['slot_num', 0, '槽位数 >=1 && <= 4'],
['state', 0, '0:未开始 1:准备就绪(这时客户端进入长链接走组队逻辑)'],
['!member_list', [TeamMember()], '队伍成员列表(包含自己)'],
]
class BuyableBox(object):
def __init__(self):
self.fields = [
['box_id', '', '箱子id'],
]
class PreSaleInfo(object):
def __init__(self):
self.fields = [
['batch_id', 0, '批次id(目前客户端没用到先不用管)'],
['countdown', 0, '预售倒计时'],
['sold_num', 0, '已售数'],
['total_num', 0, '总数'],
['state', 0, '0:预售未开始(tilte文字) 1:预售准备开始(有倒计时) 2:预售开始(title文字) 3:预售结束(title)'],
['title', '', '预售文字标题描述 '],
['hint', '', '预售文字描述'],
['buyable_list!', [BuyableBox()], '可购买商品列表'],
]
class PreSaleBox(object):
def __init__(self):
self.fields = [
['box_id', '', '箱子id'],
['item_id', 0, '道具id(根据这个读取箱子的图片)'],
['name', '', '名字'],
['job', '', '职业'],
['avatar_url', '', '头像完整url'],
['!currency_list', [SystemCurrency()], '货币列表,(目前有且只有一个)'],
]
class NftHeroDetail(object):
def __init__(self):
self.fields = [
['name', '', '英雄名'],
['job', '', '职业'],
['level', 0, '等级'],
['quality', 0, '星级'],
['hp', 0, '血量'],
['speed', 0, '速度'],
['atk', 0, '攻击'],
['def', 0, '防御'],
['advanced_count', 0, '升级次数'],
['lukcy', 0, '幸运'],
['success_rate', 0, '成功率'],
['!attr', [AttrDesc()], '属性'],
]
class NftGunDetail(object):
def __init__(self):
self.fields = [
['name', '', '枪支名'],
['level', 0, '等级'],
['quality', 0, '星级'],
['lukcy', 0, '幸运'],
['clip_volume', 0, '弹夹数'],
['reload_time', 0, '装弹时间'],
['fire_rate', 0, '射击速度'],
['atk', 0, '攻击'],
['bullet_speed', 0, '子弹速度'],
['range', 0, '射程'],
['!attr', [AttrDesc()], '属性'],
]
class NftChipDetail(object):
def __init__(self):
self.fields = [
['name', '', '芯片名'],
['!attr', [AttrDesc()], '属性'],
]
class TransactionRecrod(object):
def __init__(self):
self.fields = [
['from', '', '来源钱包'],
['date', 0, '交易日期(utc时间)'],
]
class NftDetail(object):
def __init__(self):
self.fields = [
['token_id', '', 'token id'],
['owner_address', '', '所有者地址'],
['owner_name', '', '所有名字'],
['item_id', 0, '道具id'],
['type', '', 'nft类型 1:英雄 2:枪支 3:芯片 4:盲盒'],
['image', '', 'nft图片地址'],
['state', 0, '0:正常状态 1:出售中 2:出租中'],
['lock_time', 0, '锁定时间(单位秒)'],
['hide_attr', 0, '是否隐藏属性'],
['is_genesis', 0, '是否创世nft'],
['info', Union([
[NftHeroDetail(), '英雄'],
[NftGunDetail(), '枪支'],
[NftChipDetail(), '芯片'],
]), 'nft详细信息'],
['!transaction_recrod', [TransactionRecrod()], '交易记录'],
['!currency_list', [SystemCurrency()], '货币列表,(目前有且只有一个)'],
['mint_time', 0, '铸造时间'],
]
class NftView(object):
def __init__(self):
self.fields = [
['name', '', 'nft名字'],
['description', '', 'nft描述'],
['image', '', 'nft图片'],
]
class Phase3Box(object):
def __init__(self):
self.fields = [
['box_id', '', '箱子id'],
]
class ChipAttr(object):
def __init__(self):
self.fields = [
['attr_id', 0, '属性id'],
['type', 0, '1: 绝对值 2百分比 ---弃用字段'],
['val', 0, '综合属性值'],
['chip_type', 0, '1英雄芯片 2枪械芯片'],
['attr_num', 0, '成长属性值'],
['attr_pool_num', 0, '固定属性值'],
]
class ChipCore(object):
def __init__(self):
self.fields = [
['chip_core_id', 0, '核心id'],
['chip_core_type', 0, '1英雄芯片核心 2枪械芯片核心'],
['chip_core_lv', 0, '核心等级'],
['attr_id', 0, '芯片属性id'],
['attr_number', 0, '属性加成'],
['attr_add_type', 0, '加成类型1 绝对值2 百分比 ---弃用字段'],
]
class Chip(object):
def __init__(self):
self.fields = [
['idx', 0, '主键id'],
['token_id', '', 'token id'],
['account_id', '', '账号id'],
['item_id', 0, '道具id'],
['item_num', 0, '道具数量'],
['chip_grade', 0, '芯片等级'],
['chip_type', 0, '芯片类型1 英雄2 枪械'],
['state', 0, '芯片添加状态:0 正常;1 选择;-1 锁定'],
['supper_state', 0, '是否锁定0 正常;1 锁住'],
['inlay_state', 0, '镶嵌状态0 未镶嵌;1 镶嵌了'],
['!rand_attr', [ChipAttr()], '属性'],
['lucky_temporary', '', '升级成功后的幸运值'],
['lucky_final', '', '最终幸运值'],
['strength_max', '', '最大体力值'],
['strength', '', '前一天体力值'],
['strength_temporary', '', '升级成功所得出的总体力值'],
['mint', '', '所需mint费'],
['belong_to_item_id', '', '所镶嵌的英雄或枪械的item id'],
]
class ChipPro(object):
def __init__(self):
self.fields = [
['idx', 0, '主键id'],
['token_id', '', 'token id'],
['account_id', '', '账号id'],
['item_id', 0, '道具id'],
['item_num', 0, '道具数量'],
['chip_grade', 0, '芯片等级'],
['chip_type', 0, '芯片类型1 英雄2 枪械'],
['state', 0, '芯片添加状态:0 正常;1 选择;-1 锁定'],
['supper_state', 0, '是否锁定0 正常;1 锁住'],
['inlay_state', 0, '镶嵌状态0 未镶嵌;1 镶嵌了'],
['!rand_attr', [ChipAttr()], '属性'],
['lucky_temporary', '', '临时幸运值'],
['lucky_final', '', '最终幸运值'],
['strength', '', '体力值'],
['!rand_attr_after', [ChipAttr()], '芯片升级后的属性'],
['upgrade_cost', '', '芯片升级所需价值'],
]
class BattleMember(object):
def __init__(self):
self.fields = [
['account_id', '', '账号id'],
['session_id', '', '会话id'],
['hero_uniid', '', '英雄唯一id'],
['weapon_uniid1', '', '武器1唯一id'],
['weapon_uniid2', '', '武器2唯一id'],
]
class Cost(object):
def __init__(self):
self.fields = [
['CEG', '', '金币'],
['CEC', '', '钻石'],
]
class Fragment(object):
def __init__(self):
self.fields = [
['idx', 0, '主键id'],
['token_id', '', 'token id'],
['item_id', '', '道具id'],
['type', '', '碎片类型 1:英雄碎片 2枪械碎片 3:特殊英雄碎片 4:特殊枪械碎片'],
['parts', '', '碎片部位 0:特殊碎片的部位 1-8:普通部位'],
['createtime', 0, '创建时间'],
['modifytime', 0, '修改时间'],
]
class HisBattle(object):
def __init__(self):
self.fields = [
['battle_uuid', '', '本次比赛唯一id'],
['victory', 0, '是否胜利'],
['room_mode', 0, '0:吃鸡模式 1:歼灭模式 2:生存模式'],
['match_mode', 0, '比赛模式 1:匹配赛 2:排位赛 3: pve'],
['team_mode', 0, '组队模式 1:单人 2::多人'],
['result', '', '比赛结果 当pve模式时: 1:通关 2:通关失败 其他模式:排名'],
['kills', '', '击杀数'],
['hero_id', '', '英雄id'],
['weapon1_id', '', '武器1 id'],
['weapon2_id', '', '武器2 id'],
['level_class', 0, '段位'],
['score', 0, '段位-积分'],
['score_change', 0, '段位-积分变更'],
['pve_score', 0, 'pve积分 pve模式'],
['map_id', 0, '地图id'],
['pve_instance_id', 0, '副本id'],
['end_time', 0, '战斗时间 utc时间 客户端自己处理时区问题'],
]
class BattleReport(object):
def __init__(self):
self.fields = [
['battle_uuid', '', '本次比赛唯一id'],
['match_mode', 0, '比赛模式 1:匹配赛 2:排位赛 3: pve'],
['team_mode', 0, '组队模式 1:单人 2::多人'],
]
class BattleCegReward(object):
def __init__(self):
self.fields = [
['uuid', '', '唯一id'],
['obtain_ceg', 0, '实际获得ceg数量'],
['ceg_uplimit', 0, 'ceg数量上限'],
]
class BattleItemReward(object):
def __init__(self):
self.fields = [
['item_id', 0, '道具id'],
['item_num', 0, '道具数量'],
]
class BattleReward(object):
def __init__(self):
self.fields = [
['hero', BattleCegReward(), '英雄奖励'],
['weapon1', BattleCegReward(), '武器1奖励'],
['weapon2', BattleCegReward(), '武器2奖励'],
['!items', [BattleItemReward()], '碎片奖励'],
]