diff --git a/Assets/ManagedResources/~Lua/Modules/Gem/GemPanel.lua b/Assets/ManagedResources/~Lua/Modules/Gem/GemPanel.lua index d2d4443ab5..c074fe6a4e 100644 --- a/Assets/ManagedResources/~Lua/Modules/Gem/GemPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Gem/GemPanel.lua @@ -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() diff --git a/Assets/ManagedResources/~Lua/Modules/Net/NetManager.lua b/Assets/ManagedResources/~Lua/Modules/Net/NetManager.lua index bec246493a..7a0e2e7ffa 100644 --- a/Assets/ManagedResources/~Lua/Modules/Net/NetManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Net/NetManager.lua @@ -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)