Thread Tools Display Modes
10-24-10, 08:18 AM   #1
ckeurk
A Murloc Raider
 
ckeurk's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2007
Posts: 4
Autorez

my little file does not work anymore with patch:
could you help me fix the problem ?
Thank you

Code:
local Rezzer
local function OnEvent()
	if event == "RESURRECT_REQUEST" then
		if UnitAffectingCombat(arg1) == nil then
			Rezzer = arg1
			AcceptResurrect()
		end
	elseif Rezzer then
			DoEmote("thank",Rezzer)
			Rezzer = nil
	end
end

local f = CreateFrame("Frame")
f:RegisterEvent("RESURRECT_REQUEST")
f:RegisterEvent("PLAYER_ALIVE")
f:RegisterEvent("PLAYER_UNGHOST")
f:SetScript("OnEvent", OnEvent)
  Reply With Quote
10-24-10, 09:34 AM   #2
Vlad
A Molten Giant
 
Vlad's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2005
Posts: 793
Try
Code:
local f = CreateFrame("Frame")
f:RegisterEvent("PLAYER_ALIVE")
f:RegisterEvent("PLAYER_UNGHOST")
f:RegisterEvent("RESURRECT_REQUEST")
f:SetScript("OnEvent", function(self, event, arg1)
  if event == "RESURRECT_REQUEST" then -- someone wants to revive you
    self.resser = arg1 -- we note this name
    AcceptResurrect() -- we accept the ressurection
  elseif self.resser and UnitExists(self.resser) and not UnitIsDeadOrGhost("player") then -- checks that we know who revives us, that he exists (in group) and that we are not dead by the time this fires (we can't emote if we are dead remember?)
    DoEmote("thank", self.resser) -- we /thank him
    self.resser = nil -- stop this from spaming and wait for next time someone revives us
  end
end)
I noticed no "arg1" and such declarations on your function OnEvent so most likely that's the issue.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » Autorez


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