Quantcast DeclineGroup() replacement? - WoWInterface
Thread Tools Display Modes
11-22-14, 09:22 PM   #1
blackytemp
A Murloc Raider
Join Date: Feb 2012
Posts: 4
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
  Reply With Quote
11-23-14, 01:24 AM   #2
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
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.
__________________
Author/maintainer of Grid, PhanxChat, oUF_Phanx, and many more.
Troubleshoot an addonTurn any code into an addonMore addon resources
Need help with your code? Post all of your actual code! Attach or paste your files.
Please don’t PM me about addon bugs or code questions. Post a comment or forum thread instead!
  Reply With Quote
11-23-14, 10:20 AM   #3
blackytemp
A Murloc Raider
Join Date: Feb 2012
Posts: 4
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.
  Reply With Quote
02-23-15, 01:46 PM   #4
Oniya
A Wyrmkin Dreamwalker
Join Date: Feb 2015
Posts: 57
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")
  Reply With Quote
02-23-15, 02:06 PM   #5
ebonyfaye
A Fallenroot Satyr
 
ebonyfaye's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2009
Posts: 23
Originally Posted by Oniya View Post
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,
  Reply With Quote
02-23-15, 04:31 PM   #6
Oniya
A Wyrmkin Dreamwalker
Join Date: Feb 2015
Posts: 57
Originally Posted by ebonyfaye View Post
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!
  Reply With Quote
03-17-15, 02:21 AM   #7
lee_terry_jr
A Murloc Raider
Join Date: Feb 2015
Posts: 5
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.
  Reply With Quote
03-20-15, 01:16 AM   #8
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 1,804
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");
__________________
ESOUI AddOns | 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 : 03-20-15 at 01:24 AM.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » DeclineGroup() replacement?

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