game2006api/doc/Battle.py
aozhiwei 1a97e8a3fd 1
2022-09-05 10:47:40 +08:00

48 lines
1.7 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': 'Battle',
'url': 'webapp/index.php?c=Battle&a=battleReport',
'params': [
_common.ReqHead(),
],
'response': [
_common.RspHead(),
]
},
{
'desc': '获取战斗数据(客户端不用处理)getBattleData',
'group': 'Battle',
'url': 'webapp/index.php?c=Battle&a=getBattleData',
'params': [
_common.ReqHead(),
],
'response': [
_common.RspHead(),
]
},
]