Skip to content

Commit

Permalink
Release 1.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
luckyyyyy committed Jan 29, 2016
1 parent 0fc386a commit f37f409
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 33 deletions.
63 changes: 35 additions & 28 deletions 0Base/Base.lua
Original file line number Diff line number Diff line change
@@ -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 --
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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 = { ... }
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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 {}
Expand Down
14 changes: 9 additions & 5 deletions AutoTeam/AutoTeam.lua
Original file line number Diff line number Diff line change
@@ -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 = {
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit f37f409

Please sign in to comment.