From 93e495d225c9fa6ea2ce42794a9fbe77add63160 Mon Sep 17 00:00:00 2001 From: Emil Zhai Date: Sat, 9 Oct 2021 13:13:21 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=84=A6=E7=82=B9=E8=A7=92=E8=89=B2?= =?UTF-8?q?=E5=A4=87=E6=B3=A8=E4=B8=AD=E7=9A=84=E7=9B=AE=E6=A0=87=E5=8A=A0?= =?UTF-8?q?=E5=85=A5=E5=85=AC=E5=85=B1=E5=9C=B0=E5=9B=BE=E5=88=A4=E5=AE=9A?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MY_Focus/src/MY_Focus.PS.lua | 29 +++++++++++++++++------------ MY_Focus/src/MY_Focus.lua | 23 +++++++++++------------ 2 files changed, 28 insertions(+), 24 deletions(-) diff --git a/MY_Focus/src/MY_Focus.PS.lua b/MY_Focus/src/MY_Focus.PS.lua index dc62fd182..19069d1e2 100644 --- a/MY_Focus/src/MY_Focus.PS.lua +++ b/MY_Focus/src/MY_Focus.PS.lua @@ -298,7 +298,6 @@ function PS.OnPanelActive(wnd) imageframe = 10, autoenable = function() return MY_Focus.IsEnabled() end, }) - ui:Append('WndCheckBox', { x = x, y = y, w = wr, text = _L['Auto focus tong'], checked = MY_Focus.bFocusTong, @@ -310,6 +309,23 @@ function PS.OnPanelActive(wnd) }) y = y + deltaY + ui:Append('Image', { + x = x + 5, y = y - 3, w = 10, h = 8, + image = 'ui/Image/UICommon/ScienceTree.UITex', + imageframe = 10, + autoenable = function() return MY_Focus.IsEnabled() end, + }) + ui:Append('WndCheckBox', { + x = x, y = y, w = wr, text = _L['Anmerkungen auto focus'], + checked = MY_Focus.bFocusAnmerkungen, + oncheck = function(bChecked) + MY_Focus.bFocusAnmerkungen = bChecked + MY_Focus.RescanNearby() + end, + autoenable = function() return MY_Focus.IsEnabled() end, + }) + y = y + deltaY + ui:Append('Image', { x = x + 5, y = y, w = 10, h = 10, image = 'ui/Image/UICommon/ScienceTree.UITex', @@ -366,17 +382,6 @@ function PS.OnPanelActive(wnd) }) y = y + deltaY - ui:Append('WndCheckBox', { - x = x, y = y, w = wr, text = _L['Anmerkungen auto focus'], - checked = MY_Focus.bFocusAnmerkungen, - oncheck = function(bChecked) - MY_Focus.bFocusAnmerkungen = bChecked - MY_Focus.RescanNearby() - end, - autoenable = function() return MY_Focus.IsEnabled() end, - }) - y = y + deltaY - ui:Append('WndCheckBox', { x = x, y = y, w = wr, text = _L['Show focus\'s target'], checked = MY_Focus.bShowTarget, diff --git a/MY_Focus/src/MY_Focus.lua b/MY_Focus/src/MY_Focus.lua index 3e76b6cfb..f5ae7cd8f 100644 --- a/MY_Focus/src/MY_Focus.lua +++ b/MY_Focus/src/MY_Focus.lua @@ -623,6 +623,17 @@ function D.OnObjectEnterScene(dwType, dwID, nRetryCount) end else if not O.bOnlyPublicMap or (not X.IsInBattleField() and not X.IsInDungeon() and not X.IsInArena()) then + -- ÅжϽÇÉ«±¸×¢ + if dwType == TARGET.PLAYER + and O.bFocusAnmerkungen + and MY_Anmerkungen + and MY_Anmerkungen.GetPlayerNote(dwID) then + table.insert(aVia, { + bDeletable = false, + szVia = _L['Anmerkungen'], + }) + bFocus = true + end -- ÅжϺÃÓÑ if dwType == TARGET.PLAYER and O.bFocusFriend @@ -669,18 +680,6 @@ function D.OnObjectEnterScene(dwType, dwID, nRetryCount) bFocus = true end - -- ÅжϽÇÉ«±¸×¢ - if not bFocus and O.bFocusAnmerkungen - and dwType == TARGET.PLAYER - and MY_Anmerkungen - and MY_Anmerkungen.GetPlayerNote(dwID) then - table.insert(aVia, { - bDeletable = false, - szVia = _L['Anmerkungen'], - }) - bFocus = true - end - -- ÅжÏÆÁ±ÎµÄNPC if bFocus and dwType == TARGET.NPC and X.IsShieldedNpc(dwTemplateID, 'FOCUS') and X.IsRestricted('MY_Focus.SHILDED_NPC') then bFocus = false