View Single Post
01-01-22, 06:14 PM   #7
zENK
A Murloc Raider
Join Date: Dec 2021
Posts: 5
Originally Posted by Kanegasi View Post
I'm a bit confused as to how your original macro even worked. On retail, UninviteUnit is supposed to take only name-realm and is hardware protected, as well as LeaveParty() moving to C_PartyInfo in 8.2.5 with the deprecated placeholder removed in 9.0. Maybe the act of hitting the macro is good for the whole loop, haven't really tried something like that, as well as a unit token still being allowed, but either you have your own LeaveParty() shortcut or an addon is providing it, or you're on one of the classic versions.

In any case, assuming you're on a legitimate WoW version, here are four versions of a macro that will disband a party or a raid, each version accounting for unit tokens, name-realm, and where the LeaveParty() function might be. The last one is the longest at 186 characters. As a side note, I added the third argument to UninviteUnit which should skip any confirmation dialogs, based on the way Blizzard uses it.

Code:
/run local n,u=4,"party" if IsInRaid() then n,u=40,"raid" end for i=1,n do if not UnitIsUnit(u..i,"player") then UninviteUnit(u..i,nil,1) end end LeaveParty()

/run local n,u=4,"party" if IsInRaid() then n,u=40,"raid" end for i=1,n do if not UnitIsUnit(u..i,"player") then UninviteUnit(GetUnitName(u..i,1),nil,1) end end LeaveParty()

/run local n,u=4,"party" if IsInRaid() then n,u=40,"raid" end for i=1,n do if not UnitIsUnit(u..i,"player") then UninviteUnit(u..i,nil,1) end end C_PartyInfo.LeaveParty()

/run local n,u=4,"party" if IsInRaid() then n,u=40,"raid" end for i=1,n do if not UnitIsUnit(u..i,"player") then UninviteUnit(GetUnitName(u..i,1),nil,1) end end C_PartyInfo.LeaveParty()
I found that macro I posted here on another website, I didn't make it myself :P but your macros works great the way I wanted it to thanks! Now I have both a macro and an addon to do it for me incase the addon would ever break or something, just one thing I'm wondering about for the macros you posted. Is there something you can edit to avoid the "You aren't in a party" spam while using the macro in a raid group? https://imgur.com/a/vkTmVFc

Last edited by zENK : 01-01-22 at 10:50 PM.
  Reply With Quote