【命格】提交

dev_chengFeng
ZhangBiao 2021-12-07 16:27:55 +08:00
parent 464ab967ef
commit 9509fc7012
2 changed files with 27 additions and 10 deletions

View File

@ -31,7 +31,8 @@ function Gem:BindEvent()
end)
Util.AddClick(self.btnPractice, function()
NetManager.LifeStoneUpRequest()
UIManager.OpenPanel(UIName.PracticePanel)
self:ClosePanel()
end)
Util.AddClick(self.onekey, function()

View File

@ -6244,13 +6244,22 @@ end
--命石合成
function this.LifeStoneUpRequest(_type,_gridId,_gridIndex,_curGemId,_selectNum,func)
local data = HeroInfoProto_pb.LifeStoneUpRequest()
LogPink("_type:"..tostring(_type))
data.type = _type
data.gridId = _gridId
data.gridIndex = _gridIndex
data.curGemId = _curGemId
data.selectNum = _selectNum
-- if _gridId then
-- data.gridId = _gridId
-- end
-- if _gridIndex then
-- data.gridIndex = _gridIndex
-- end
-- if _curGemId then
-- data.curGemId = _curGemId
-- end
-- if _selectNum then
-- data.selectNum = _selectNum
-- end
local msg = data:SerializeToString()
Network:SendMessageWithCallBack(MessageTypeProto_pb.LifeStoneUpRequest , MessageTypeProto_pb.LifeStoneUpResponse , msg, function(buffer)
Network:SendMessageWithCallBack(MessageTypeProto_pb.LIFE_STONE_UP_REQUEST , MessageTypeProto_pb.LIFE_STONE_UP_RESPONSE , msg, function(buffer)
local data = buffer:DataByte()
local msg = HeroInfoProto_pb.LifeStoneUpResponse()
msg:ParseFromString(data)
@ -6267,11 +6276,18 @@ end
function this.LifeGridChangeRequest(_type,_gridId,_gridIndex,_curGemId,func)
local data = HeroInfoProto_pb.LifeGridChangeRequest()
data.type = _type
data.position = _gridId
data.index = _gridIndex
data.lifeStoneId = _curGemId
if _gridId then
data.position = _gridId
end
if _gridIndex then
data.index = _gridIndex
end
if _curGemId then
data.lifeStoneId = _curGemId
end
local msg = data:SerializeToString()
Network:SendMessageWithCallBack(MessageTypeProto_pb.LifeGridChangeRequest , MessageTypeProto_pb.LifeGridChangeResponse , msg, function(buffer)
Network:SendMessageWithCallBack(MessageTypeProto_pb.LIFE_GRID_CHANGE_REQUEST , MessageTypeProto_pb.LIFE_GRID_CHANGE_RESPONSE , msg, function(buffer)
local data = buffer:DataByte()
local msg = HeroInfoProto_pb.LifeGridChangeResponse()
msg:ParseFromString(data)