游戏内使用道具

使用道具指令

请求指令

参数名
类型
描述
必填
cmd
int
const CMD_QUIZ_PHASE = 201; //游戏协议系统主命令字,(主命令字)- 客户端使用
必填
scmd
int
const GAME_USE_PROP_REQ = 56; //使用道具请求,客户端使用
必填

请求参数

参数名
类型
描述
必填
prop_id
int
道具ID
必填

TIP响应参数

参数名
类型
描述
必填
code
int
200 为成功
必填
msg
string
对code的可读描述
必填
data
object
数据集
必填
prop_id
int
刚才使用的道具ID
必填
type
int
1 为单发TIP 2为群发广播 这里一定是 1
必填
cmd
int
响应主指令 201
必填
scmd
int
const GAME_USE_PROP_RESP= 56; //使用道具响应
必填
len
int
消息长度
必填

广播响应参数 这里是告诉所有玩家当前每个人的答题情况

参数名
类型
描述
code
int
200 为成功
msg
string
对code的可读描述
data
object
数据集
prop_id
int
刚才使用的道具ID
type
int
1 为单发TIP 2为群发广播 这里一定是 2
cmd
int
响应主指令 201
scmd
int
const GAME_USE_PROP_RESP= 56; //使用道具响应
len
int
消息长度

截图演示

当使用加时卡道具时 会使用下一题的指令发出响应