/trunk
LeaveParty = function() |
local _, instanceType = IsInInstance() |
if instanceType == "party" or instanceType == "raid" then |
if GetNumGroupMembers() > 0 or GetNumSubgroupMembers() > 0 then |
local check |
if IsInRaid then |
-- Mists of Pandaria |
check = IsInGroup() or IsInRaid() |
else |
-- Cataclysm |
check = GetNumPartyMembers() > 0 or GetNumRaidMembers() > 0 |
end |
if check then |
return StaticPopup_Show("CONFIRM_LEAVE_PARTY") |
end |
end |
## Interface: 50001 |
## Version: 5.0.3.wowi:revision-beta |
## Interface: 40300 |
## Version: 4.3.2.wowi:revision |
## Title: ConfirmLeaveParty |
## Notes: Asks for confirmation when leaving a party inside an instance. |