game2005api/doc/Battle.py
2021-12-24 14:49:15 +08:00

68 lines
3.2 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 -*-
import _common
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 = [
{
'desc': '服务器战报(客户端不用处理)battleReport',
'group': 'User',
'url': 'webapp/index.php?c=Battle&a=battleReport',
'params': [
_common.ReqHead(),
['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, '游戏时间'],
['alive_time', 0, '存活时间'],
['ranked', 0, '排名'],
['kills', 0, '击杀数'],
['damage_out', 0, '伤害输出'],
['rescue_teammate_times', 0, '救起队友次数'],
['diving_times', 0, '潜水次数'],
['damage_in', 0, '伤害输入'],
['recover_hp', 0, '治疗量'],
['open_airdrop_times', 0, '开启空投补给次数'],
['use_medicine_times', 0, '使用药物次数'],
['destory_car_times', 0, '破坏载具次数'],
['use_camouflage_times', 0, '使用伪装物'],
['use_skill_times', 0, '使用技能次数'],
['ride_car_move_distance', 0, '驾驶或乘坐载具累计移动X米'],
['ride_car_kills', 0, '驾驶或乘坐载具累计击杀X个敌人'],
['max_hero_skill_lv', 0, '单局内英雄技能升级到X级'],
['weapons_type', '', '武器信息 weapon_id:kills:damage_out:obtain_count|'],
['weapons_slot', '', '武器信息 weapon_id:use_times|'],
['heros', '', '武器信息 hero_id:skill_lv:weapon_lv|'],
['rank_score', 0, '排位积分'],
#['pass_score', 0, '通行证积分'],
['items', 0, '道具id:道具数量|'],
],
'response': [
_common.RspHead(),
]
},
]