View Single Post
05-03-11, 07:24 AM   #6
Vlad
A Molten Giant
 
Vlad's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2005
Posts: 793
I do have one question, why use that method?

All it does is return "%d seconds" and all that again does is put the GetCorpseRecoveryDelay() value (number) so it is "0 seconds", wouldn't it just be easier to do this?

Code:
eventHandlers['RESURRECT_REQUEST'] = function(name)
  if UnitAffectingCombat("player") or UnitAffectingCombat(name) then return end

  local delay = GetCorpseRecoveryDelay()
  if delay == 0 then
    AcceptResurrect()
    DoEmote("thank", name)
  else
    SendChatMessage("Thanks for the rez! I still have "..delay.." seconds until I can accept it.", "WHISPER", nil, name)
  end
end
Maybe I am missing something.
  Reply With Quote