From f37f4094d7223a60867f507017b02db047376557 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9D=92=E9=98=B3=E9=AD=82?= Date: Fri, 29 Jan 2016 14:38:33 +0800 Subject: [PATCH] Release 1.3.0 --- 0Base/Base.lua | 63 ++++++++++++++++++++++++------------------- AutoTeam/AutoTeam.lua | 14 ++++++---- 2 files changed, 44 insertions(+), 33 deletions(-) diff --git a/0Base/Base.lua b/0Base/Base.lua index fbb13a8..b990041 100644 --- a/0Base/Base.lua +++ b/0Base/Base.lua @@ -1,7 +1,7 @@ -- @Author: Webster -- @Date: 2015-01-21 15:21:19 -- @Last Modified by: Webster --- @Last Modified time: 2016-01-28 15:58:11 +-- @Last Modified time: 2016-01-29 10:26:46 --------------------------------------- -- JH Plugin - Base -- @@ -90,8 +90,8 @@ local function GetLang() end local _L = GetLang() -local _VERSION_ = 0x1020400 -local _BUILD_ = "20160114" +local _VERSION_ = 0x1030000 +local _BUILD_ = "20160129" local _DEBUG_ = IsFileExist(ADDON_DATA_PATH .. "EnableDebug") local _LOGLV_ = 2 @@ -552,13 +552,13 @@ function _JH.OpenPanel(szTitle) local loading = frame:Lookup("", "Text_Loading") loading:SetText(GetUserRoleName() .. "\nWelcome Back.") if szTitle then - JH.Animate(loading):FadeOut(Random(500, 1200), function() + JH.Animate(loading):FadeOut(function() Init() fnAction() end) else JH.Animate(loading):FadeIn(200, function() - JH.Animate(loading):FadeOut(1200, function() + JH.Animate(loading):FadeOut(function() Init() JH.Animate(frame.hHome):FadeIn(300, fnAction) end) @@ -779,28 +779,6 @@ function _JH.SetGlobalValue(szVarPath, Val) tab = tab[v] end end --- 开发函数 CallGlobalFun -function JH.CallGlobalFun(funname, ...) - if not string.find(funname, ".") then - return _G[funname](...) - end - local t = JH.Split(funname, ".") - local len = #t - if len == 2 then - return _G[t[1]][t[2]](...) - end - local fun = _G - for k, v in ipairs(t) do - if fun[v] then - fun = fun[v] - else - return - end - end - if fun then - return fun(...) - end -end -- 初始化一个模块 function JH.RegisterInit(key, ...) local events = { ... } @@ -1610,7 +1588,7 @@ function _JH.GetPlayerAddonMenu() tinsert(menu, v) end end - if _DEBUG_Client then + if JH.bDebugClient then tinsert(menu, { bDevide = true }) tinsert(menu, { szOption = "ReloadUIAddon", fnAction = function() ReloadUIAddon() @@ -1676,6 +1654,35 @@ function JH.GetShadowHandle(szName) return sh:Lookup("", szName) end +-- 开发函数 CallGlobalFun +local function CallGlobalFun(funname, ...) + if not string.find(funname, ".") then + return _G[funname](...) + end + local t = JH.Split(funname, ".") + local len = #t + if len == 2 then + return _G[t[1]][t[2]](...) + end + local fun = _G + for k, v in ipairs(t) do + if fun[v] then + fun = fun[v] + else + return + end + end + if fun then + return fun(...) + end +end +JH.RegisterEvent("JH_DEBUG", function() + if _DEBUG_ then + local param = { arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9 } + CallGlobalFun(arg0, unpack(param)) + end +end) + JH.RegisterEvent("PLAYER_ENTER_GAME", function() _JH.OpenPanel() _JH.tGlobalValue = JH.LoadLUAData("config/userdata.jx3dat") or {} diff --git a/AutoTeam/AutoTeam.lua b/AutoTeam/AutoTeam.lua index 0f0bffb..72db9e5 100644 --- a/AutoTeam/AutoTeam.lua +++ b/AutoTeam/AutoTeam.lua @@ -1,7 +1,7 @@ -- @Author: Webster -- @Date: 2014-11-20 23:34:41 -- @Last Modified by: Webster --- @Last Modified time: 2016-01-09 22:09:52 +-- @Last Modified time: 2016-01-29 14:38:17 local _L = JH.LoadLangPack local JH_AutoTeam = { @@ -125,10 +125,14 @@ PS.OnPanelActive = function(frame) :Text("开启/关闭自动组队"):Click(function(bChecked) JH_AutoTeam.bEnable = bChecked if bChecked then - JH_AutoSetTeam.bRequestList = false - JH.UnRegisterInit("RequestList") + JH_PartyRequest.bEnable = false + JH.Sysmsg("JH_PartyRequest.bEnable = false") + JH.UnRegisterInit("PARTY_REQUEST") + else + JH_PartyRequest.bEnable = true + JH.Sysmsg("JH_PartyRequest.bEnable = false") + JH.RegisterInit("PARTY_REQUEST", JH_PartyRequest.GetEvent()) end - for i = 1,3 do ui:Fetch("Check_XyzSelf"..i):Enable(bChecked) end @@ -216,7 +220,7 @@ PS.OnPanelActive = function(frame) end end JH.SwitchChat(k) - -- JH.Talk(k, szText, true, false, true) + JH.Talk(k, szText, true, false, true) end, i * 300) end end