This mod is very simple and does what it is suppose to do, but I get an error every rez because it must try to send a tell/whisper thanking the person before I am actually rezzed. So, every time I see an error message saying (approximately) "Unable to chat while dead".
Is there an easy way to fix this error? Or an easy way to simply disable that function?
AutoRez = AceLibrary("AceAddon-2.0"):new("AceConsole-2.0", "AceEvent-2.0")
function AutoRez:OnInitialize()
self:Print("AutoRez loaded.")
end
function AutoRez:OnEnable()
self:RegisterEvent("RESURRECT_REQUEST", "Res");
end
function AutoRez:Res()
if UnitAffectingCombat(arg1)==nil then
AcceptResurrect()
--SendChatMessage("thanks"..arg1, "EMOTE", nil, nil);
self:Print("Automatically rezzed by".." "..arg1)
end
end
Orionshock is saying that 8 lines of code is sufficient, instead of the original addon packing in 200 kb of totally unnecessary Ace2 library files for such a simple addon.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Is there an easy way to fix this error? Or an easy way to simply disable that function?
8 lines, NO WAY!