@@ -18,6 +18,7 @@ if not X.AssertVersion(MODULE_NAME, _L[MODULE_NAME], '^27.0.0') then
1818 return
1919end
2020--[[ #DEBUG BEGIN]] X .ReportModuleLoading (MODULE_PATH , ' START' )--[[ #DEBUG END]]
21+ X .RegisterRestriction (' MY_ArenaHelper.bAutoShowModel' , { remake = true })
2122---- ----------------------------------------------------------------------
2223
2324local O = X .CreateUserSettingsModule (' MY_ArenaHelper' , _L [' General' ], {
@@ -40,6 +41,7 @@ local O = X.CreateUserSettingsModule('MY_ArenaHelper', _L['General'], {
4041 }),
4142 xSchema = X .Schema .Boolean ,
4243 xDefaultValue = false ,
44+ szRestriction = ' MY_ArenaHelper.bAutoShowModel' ,
4345 },
4446 bAutoShowModelBattlefield = {
4547 ePathType = X .PATH_TYPE .ROLE ,
@@ -99,7 +101,7 @@ X.RegisterEvent('LOADING_END', 'MY_ArenaHelper_ShowTargetModel', function()
99101 return
100102 end
101103 local bHasValue = X .IsBoolean (l_bShowNpc ) and X .IsBoolean (l_bShowPlayer ) and X .IsBoolean (l_bShowPartyOverride )
102- if (X .IsInArenaMap () and O .bAutoShowModel )
104+ if (X .IsInArenaMap () and O .bAutoShowModel and not X . IsRestricted ( ' MY_ArenaHelper.bAutoShowModel ' ) )
103105 or (X .IsInBattlefieldMap () and O .bAutoShowModelBattlefield )
104106 or (X .IsInPubgMap () and O .bAutoShowModelPubg ) then
105107 if not bHasValue then
@@ -136,14 +138,16 @@ function D.OnPanelActivePartial(ui, nPaddingX, nPaddingY, nW, nH, nX, nY, nLH)
136138 }):Width () + 5
137139
138140 -- 名剑大会自动取消屏蔽
139- nX = nX + ui :Append (' WndCheckBox' , {
140- x = nX , y = nY , w = ' auto' ,
141- text = _L [' Auto cancel hide player in arena' ],
142- checked = MY_ArenaHelper .bAutoShowModel ,
143- onCheck = function (bChecked )
144- MY_ArenaHelper .bAutoShowModel = bChecked
145- end ,
146- }):Width () + 5
141+ if not X .IsRestricted (' MY_ArenaHelper.bAutoShowModel' ) then
142+ nX = nX + ui :Append (' WndCheckBox' , {
143+ x = nX , y = nY , w = ' auto' ,
144+ text = _L [' Auto cancel hide player in arena' ],
145+ checked = MY_ArenaHelper .bAutoShowModel ,
146+ onCheck = function (bChecked )
147+ MY_ArenaHelper .bAutoShowModel = bChecked
148+ end ,
149+ }):Width () + 5
150+ end
147151
148152 nY = nY + nLH
149153 nX = nPaddingX
0 commit comments