diff --git a/.gitignore b/.gitignore index f67a93f4..bd813321 100644 --- a/.gitignore +++ b/.gitignore @@ -9,4 +9,5 @@ !lua_probject/** !wb_unity_pro/** !wb_new_ui/** -!.gitignore \ No newline at end of file +!.gitignore +lua_probject/.emmyrc.json diff --git a/lua_probject/.vscode/launch.json b/lua_probject/.vscode/launch.json index 8191125a..895abf15 100644 --- a/lua_probject/.vscode/launch.json +++ b/lua_probject/.vscode/launch.json @@ -111,6 +111,19 @@ ], "port": 7003, "printType": 1 + }, + { + "type": "emmylua_new", + "request": "launch", + "name": "EmmyLua-Debug", + "host": "localhost", + "port": 9966, + "ext": [ + "lua", + "lua.txt", + "lua.bytes" + ], + "ideConnectDebugger": false } ] } \ No newline at end of file diff --git a/lua_probject/EasyHook.dll b/lua_probject/EasyHook.dll new file mode 100644 index 00000000..d0f5cfda Binary files /dev/null and b/lua_probject/EasyHook.dll differ diff --git a/lua_probject/base_project/Game/View/FamilyView.lua b/lua_probject/base_project/Game/View/FamilyView.lua index 1fa6e817..ccb56570 100644 --- a/lua_probject/base_project/Game/View/FamilyView.lua +++ b/lua_probject/base_project/Game/View/FamilyView.lua @@ -460,16 +460,35 @@ function M:UpdateFamilyRoom(fgCtr, id) end obj:GetChild('text_title').text = playList[index].game_name local mode = ExtendManager.GetExtendConfig(playList[index].gameId):GetGameInfo() + local pId = playList[index].id obj:GetChild('Label_details'):GetChild('title').text = mode:LoadConfigToDetail(playList[index].config) obj:GetChild('text_playName').text = playList[index].name obj:GetController('type').selectedIndex = 1 obj:GetChild('btn_del').onClick:Set(function() ViewUtil.ShowTwoChooose("是否要删除该玩法", function() - fgCtr:FG_DelPlay(id, playList[index].id, function() + fgCtr:FG_DelPlay(id, playList[index].id, function(res) + if res.ReturnCode ~= 0 then + local msg = Table_Error_code_Map[res.ReturnCode] or {} + msg = msg.note or "操作失败" + ViewUtil.ShowBannerOnScreenCenter(msg) + return + end + self:UpdateFamilyRoom(fgCtr, id) end) end) end) + obj:GetChild("btn_edit").onClick:Set(function() + local tem = GroupGameSettingView.new(self.blur_view, id, pId, nil, function(play) + local group = DataManager.groups:get(id) + group:addPlay(play) + -- self:FillView() + self:UpdateFamilyRoom(fgCtr, id) + printlog("刷新玩法===>>>>") + group.update_play = true + end) + tem:Show() + end) end local all_num = #playList + #roomList -- print("=================================================list_room", list_room, list_room.numItems, all_num) diff --git a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupGameSettingView_jaingxi.lua b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupGameSettingView_jaingxi.lua index 4dec6f64..15f9a601 100644 --- a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupGameSettingView_jaingxi.lua +++ b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupGameSettingView_jaingxi.lua @@ -21,11 +21,16 @@ function GroupGameSettingView.new(blur_view, gid, pid, room_config, callback) self._new_hide = false self._queue = false self.group_id = gid - -- self.play = DataManager.groups:get(gid):getPlay(pid) - -- self.table_color = self.play and self.play.deskId or 0 - -- if room_config then - -- self.room_config = json.decode(room_config) - -- end + + --- 2025.6.27 + self.play = DataManager.groups:get(gid):getPlay(pid) + self.table_color = self.play and self.play.deskId or 0 + if room_config then + self.room_config = json.decode(room_config) + end + + + self.rewards_data = {} self.callback = callback self._full = true diff --git a/lua_probject/base_project/Main.lua b/lua_probject/base_project/Main.lua index a3a0990f..22ab35b9 100644 --- a/lua_probject/base_project/Main.lua +++ b/lua_probject/base_project/Main.lua @@ -36,6 +36,21 @@ oldGameVersion = 2 --1 原始 2 老游戏新加功能 --主入口函数。从这里开始lua逻辑 function Main() + -- EmmyluaDebug + + if true then + local suc = pcall(function() + local path = Application.streamingAssetsPath .. "/../../../lua_probject" + package.cpath = package.cpath .. ";" .. path .. "/?.dll" + local dbg = require("emmy_core") + dbg.tcpConnect('localhost', 9966) + end) + if suc then + print("=============================调试连接成功!===========================") + end + end + + --PlayerPrefs.DeleteKey('session_id') Application.targetFrameRate = 60 FairyGUI.UIConfig.buttonSound = FairyGUI.NAudioClip(ResourcesManager.LoadObject("base/common/sound/click.mp3", diff --git a/lua_probject/emmy_core.dll b/lua_probject/emmy_core.dll new file mode 100644 index 00000000..4376aeb3 Binary files /dev/null and b/lua_probject/emmy_core.dll differ diff --git a/lua_probject/emmy_hook.dll b/lua_probject/emmy_hook.dll new file mode 100644 index 00000000..2d1dec0b Binary files /dev/null and b/lua_probject/emmy_hook.dll differ diff --git a/lua_probject/emmy_tool.exe b/lua_probject/emmy_tool.exe new file mode 100644 index 00000000..605e9a91 Binary files /dev/null and b/lua_probject/emmy_tool.exe differ