WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   DeclineGroup() replacement? (https://www.wowinterface.com/forums/showthread.php?t=50558)

blackytemp 11-22-14 09:22 PM

DeclineGroup() replacement?
 
Hello,

I've been trying to do something with DeclineGroup(), but after trying it manually in the chat as well as in my code (

Code:

/run DeclineGroup()
), it seems that DeclineGroup() does not actually decline the invitation. Was this function deprecated and if so, is there a replacement?

TIA

Phanx 11-23-14 01:24 AM

What makes you think that DeclineGroup is "not working" ? If you think that because it's not hiding the invitation popup, you are mistaken -- you need to either hide the popup yourself (declining a group doesn't cause any event to fire, so the popup can't detect when you decline and hide itself) or just hide the popup instead of calling DeclineGroup (since it does that automatically when hidden).

If you're trying to do something other than "automatically decline groups and hide the popup" please be more specific.

blackytemp 11-23-14 10:20 AM

Thanks for the clarification, I just assumed that it would hide the popup with it since there was no indication of the group invitation being declined when I ran DeclineGroup, I'll hide the popup, thank you.

Oniya 02-23-15 01:46 PM

hi! is there a way to get confirm that it was really declined? :)
like log message that always shows for use when we do it manual ("you declined party invitation")

ebonyfaye 02-23-15 02:06 PM

Quote:

Originally Posted by Oniya (Post 306763)
hi! is there a way to get confirm that it was really declined? :)
like log message that always shows for use when we do it manual ("you declined party invitation")

no but the player that invited you will get the Msg saying that you declined party invitation. but nothing you end that i know off.

i just do DeclineGroup() and then hide the popup,

Oniya 02-23-15 04:31 PM

Quote:

Originally Posted by ebonyfaye (Post 306764)
no but the player that invited you will get the Msg saying that you declined party invitation. but nothing you end that i know off.

i just do DeclineGroup() and then hide the popup,

okay, thanks! :)

lee_terry_jr 03-17-15 02:21 AM

Any chance you could make that into an addon? I have been looking for an addon that will automatically decline all group invites and hide/remove the popup. I only do groups with friends and when that happens i can always disable it temporary or invite them myself.

SDPhantom 03-20-15 01:16 AM

This is a modified version of my personal AntiDuel addon to respond to party invites.
Lua Code:
  1. UIParent:HookScript("OnEvent",function(self,event,...)
  2.     if event=="PARTY_INVITE_REQUEST" then
  3.         local a1,a2,a3,a4=...;
  4.         DeclineGroup();
  5.  
  6.         if a2 or a3 or a4 then
  7.             StaticPopupSpecial_Hide(LFGInvitePopup);
  8.         elseif a5 then
  9.             StaticPopup_Hide("PARTY_INVITE_XREALM");
  10.         else
  11.             StaticPopup_Hide("PARTY_INVITE");
  12.         end
  13.     end
  14. end);



Though in all honesty, you could just run the following to stop the UI from processing party invites.
This won't actually decline the invite, but it'll stop the UI from telling you about it.
Code:

UIParent:UnregisterEvent("PARTY_INVITE_REQUEST");


All times are GMT -6. The time now is 07:55 AM.

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