WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   Disable the LFG tool. (https://www.wowinterface.com/forums/showthread.php?t=59168)

Walkerbo 07-10-22 05:24 PM

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?

SDPhantom 07-10-22 06:49 PM

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.
Quote:

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.


Kanegasi 07-10-22 10:18 PM

Quote:

Originally Posted by SDPhantom (Post 340779)
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.

Walkerbo 07-10-22 10:44 PM

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:D

Cheers for the replies.

SDPhantom 07-11-22 06:58 PM

Quote:

Originally Posted by Kanegasi (Post 340780)
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".
Quote:

... or otherwise negatively affects the game for other players.


Quote:

Originally Posted by Kanegasi (Post 340780)
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.

Quote:

Originally Posted by Walkerbo (Post 340781)
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.

prof17 07-12-22 11:50 AM

Quote:

Originally Posted by SDPhantom (Post 340787)
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.

Quote:

Originally Posted by Walkerbo (Post 340781)
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:D

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.

SDPhantom 07-12-22 04:15 PM

Quote:

Originally Posted by prof17 (Post 340788)
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.


All times are GMT -6. The time now is 07:54 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI