掷骰子协议修改

yuanshuai 2020-10-15 12:04:23 +08:00
parent a05cb7cc43
commit a9b9d9467f
2 changed files with 5 additions and 2 deletions

View File

@ -4505,7 +4505,10 @@ function this.JourneyGetOneInfoResponse(mapId,func)
end
--摇骰子请求
function this.JourneyDoResponse(func)
function this.JourneyDoResponse(mapId,func)
local request = MapInfoProto_pb.JourneyDoRequest()
request.mapId = mapId
local msg = request:SerializeToString()
Network:SendMessageWithCallBack(MessageTypeProto_pb.JOURNEY_DO_REQUEST, MessageTypeProto_pb.JOURNEY_DO_RESPONSE, msg, function(buffer)
local data = buffer:DataByte()
local msg = MapInfoProto_pb.JourneyDoResponse()

View File

@ -43,7 +43,7 @@ function this.OpenXiaoYaoMap(mapId)
end
--掷骰子请求
function this.StartXiaoYao()
function this.StartXiaoYao()
NetManager.JourneyDoResponse(this.curMapId,function (msg)
for i = 1, #msg.pointes do
Log("骰子点数:"..msg.pointes[i])