View Single Post
05-03-11, 07:42 AM   #7
weasoug
A Flamescale Wyrmkin
 
weasoug's Avatar
AddOn Author - Click to view addons
Join Date: May 2010
Posts: 127
Thumbs up

Originally Posted by Vladinator View Post
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.
I see what you mean. but unsure, as i have not used that way. i will give it ago. thanks for the tip.
__________________
wMmap :: Is a lightweight Minimap, with a sleek look & custom imagery.
wIn1 :: In one addon. and is very lightweight & simple to use.
wChat :: Is a lightweight chat mod.
wBroker :: Is A simple broker add-on.
wPetXPBar :: Is A simple lightweight Pet XP Bar.
wBuffs :: Is A simple Buffs Bar.
  Reply With Quote