Thread Tools Display Modes
07-10-22, 05:24 PM   #1
Walkerbo
A Cobalt Mageweaver
 
Walkerbo's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2010
Posts: 233
Disable the LFG tool.

Hi all

I am trying to prevent a player from using the LFG tool.
To do so I use the "LFG_UPDATE_RANDOM_INFO" event and then close the LFG window.

Here is my chunk;
Lua Code:
  1. elseif event == "LFG_UPDATE_RANDOM_INFO" then
  2.     PVEFrame:Hide() -- debug --
  3. end
The LFG tool displays and then closes, so it is seen; further, I open the LFG tool 3 times the window does not close, so this chunk is not the way to go.

I can disable the LFG micro button but the keybind "I" still launches the LFG tool.

The added issue is that the LFG frame and micro button names change with the different UI addons, (eg ELVUI).

I have found the test that applies before a character hits level 10 yet cannot find a CVar that I can set.
Lua Code:
  1. C_PlayerInfo.IsPlayerNPERestricted()
I have not been successful in finding the function that launches the LFG tool so I cannot hook it either.

Does anyone have any ideas on how to stop displaying the LFG tool regardless of keybinds and UI addons?
__________________
"As someone once told me, frames are just special types of tables, and tables are special types of pointers."
Fizzlemizz
  Reply With Quote
07-10-22, 06:49 PM   #2
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,313
Keybinds are registered through FrameXML/Bindings.xml. The lines in particular that you'd be interested start at line 1050.

Code:
<Binding name="TOGGLEGROUPFINDER" header="BLANK13" category="BINDING_HEADER_INTERFACE">
	PVEFrame_ToggleFrame();
</Binding>
<Binding name="TOGGLEDUNGEONSANDRAIDS" category="BINDING_HEADER_INTERFACE">
	PVEFrame_ToggleFrame("GroupFinderFrame", nil);
</Binding>
FrameXML/Bindings.xml:1050



As for the UI itself, it either goes through PVEFrame_ToggleFrame() or PVEFrame_ShowFrame(). The former ends up calling the later, but it also has some processing of its own if the panel is already shown.



Finally, I would point out this could violate Blizzard's Addon Policy if you aren't planning on providing replacement functionality.
3) Add-ons must not negatively impact World of Warcraft realms or other players.
Add-ons will perform no function which, in Blizzard Entertainment’s sole discretion, negatively impacts the performance of the World of Warcraft realms or otherwise negatively affects the game for other players.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)

Last edited by SDPhantom : 07-10-22 at 06:58 PM.
  Reply With Quote
07-10-22, 10:18 PM   #3
Kanegasi
A Molten Giant
 
Kanegasi's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2007
Posts: 666
Originally Posted by SDPhantom View Post
Finally, I would point out this could violate Blizzard's Addon Policy if you aren't planning on providing replacement functionality.
Based on their previous posts, it looks like they're creating some sort of ironman addon. I would assume a user installing such an addon would be aware of the restrictions the addon would provide, also assuming OP would clearly warn of them.

Additionally, while the "sole discretion" part makes it a catch-all, that rule is specifically worded to mean things like spamming chat, causing lag, or otherwise affecting players that don't have the addon. One such example that would violate this rule is why addons can't change a character's title. A long time ago, titles were instantly changeable, and certain enterprising players found out that everyone nearby would lag if an addon spam-changed titles due to the character's name changing and the server having to process that change for every connected client. Nowadays, you need to hardware change the title and there's an internal cooldown before and after the title actually updates.

Last edited by Kanegasi : 07-10-22 at 11:07 PM.
  Reply With Quote
07-10-22, 10:44 PM   #4
Walkerbo
A Cobalt Mageweaver
 
Walkerbo's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2010
Posts: 233
Hi

@SDPhantom, thanks for identifying the correct function, and thanks for the warning; as Kanegasi said I am building an IronMan addon.

@Kanegasi, correct, I knew someone would crack the code before I launched

Cheers for the replies.
__________________
"As someone once told me, frames are just special types of tables, and tables are special types of pointers."
Fizzlemizz
  Reply With Quote
07-11-22, 06:58 PM   #5
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,313
Originally Posted by Kanegasi View Post
Based on their previous posts, it looks like they're creating some sort of ironman addon. I would assume a user installing such an addon would be aware of the restrictions the addon would provide, also assuming OP would clearly warn of them.

Additionally, while the "sole discretion" part makes it a catch-all, that rule is specifically worded to mean things like spamming chat, causing lag, or otherwise affecting players that don't have the addon.
This is the part that opens it up more for interpretation and why I left out the examples they give. They focused on performance only, which was the first part they brought up, but didn't cover this completely. The "sole discretion" part is just lawyer-speak for "only Blizzard's interpretation matters".
... or otherwise negatively affects the game for other players.


Originally Posted by Kanegasi View Post
Based on their previous posts, it looks like they're creating some sort of ironman addon. I would assume a user installing such an addon would be aware of the restrictions the addon would provide, also assuming OP would clearly warn of them.
Originally Posted by Walkerbo View Post
thanks for the warning; as Kanegasi said I am building an IronMan addon.
The root of it all is player experience. This can include the end user. Though if this is what they want and it only affects them, then I see no issue about it.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote
07-12-22, 11:50 AM   #6
prof17
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Oct 2015
Posts: 5
Originally Posted by SDPhantom View Post
This is the part that opens it up more for interpretation and why I left out the examples they give. They focused on performance only, which was the first part they brought up, but didn't cover this completely. The "sole discretion" part is just lawyer-speak for "only Blizzard's interpretation matters".

The root of it all is player experience. This can include the end user. Though if this is what they want and it only affects them, then I see no issue about it.
It might be a problem that it limits the users in the pool of LFG. Blizzard might want to adjust server populations by doing merges and layering to make sure the LFG tool is useable.

Originally Posted by Walkerbo View Post
Hi

@SDPhantom, thanks for identifying the correct function, and thanks for the warning; as Kanegasi said I am building an IronMan addon.

@Kanegasi, correct, I knew someone would crack the code before I launched

Cheers for the replies.
Then you would also want to prevent users from using a script, and remove/replace the LFG button in the menu.
  Reply With Quote
07-12-22, 04:15 PM   #7
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,313
Originally Posted by prof17 View Post
It might be a problem that it limits the users in the pool of LFG. Blizzard might want to adjust server populations by doing merges and layering to make sure the LFG tool is useable.
A moot point since the same can be done without the addon just by choosing not to use LFG. Honestly, the addon is completely unnecessary, but I've heard of communities that refuse to make runs official without having them active.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)

Last edited by SDPhantom : 07-12-22 at 04:22 PM.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Disable the LFG tool.

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off