ArenaLeaveConfirmer

ArenaLeaveConfirmer skips the confirmation popup which would normally appear when leaving arena, effectively reverting the change Blizzard made for patch 5.1.

This tiny addon is proudly taint-free and does only exactly what I've said it will do. It is literally 7 lines long, cleanly post-hooking a single function, which means it runs my function after the targeted function ("ConfirmOrLeaveBattlefield" in this case) completes.

Its entire code is the following:

local function hook_ConfirmOrLeaveBattlefield(...)
	if select(1, IsActiveBattlefieldArena()) or GetBattlefieldWinner() then
		StaticPopup_Hide("CONFIRM_LEAVE_BATTLEFIELD")
		LeaveBattlefield()
	end
end
hooksecurefunc("ConfirmOrLeaveBattlefield", hook_ConfirmOrLeaveBattlefield)

For those interested, I'm using hooksecurefunc even though ConfirmOrLeaveBattlefield is not a protected function because ConfirmOrLeaveBattlefield seemed to be called when clicking "Leave Queue" sometimes, which caused the game to freak out about ArenaLeaveConfirmer before I switched to hooksecurefunc. This confused me, so I decided to just use the safest implementation available.

You must login to post a comment. Don't have an account? Register to get one!

Facts

Date created
Jan 14, 2013
Category
Last update
Jun 23, 2015
Development stage
Release
License
Creative Commons Attribution-NonCommercial-ShareAlike 2.5 Canada (CC BY-NC-SA 2.5)
Curse link
ArenaLeaveConfirmer
Downloads
1,425
Recent files

Authors