First of all, I don't have a Vanilla client to test it, so you'll be the guinea pig here.
I'm not very familiar with Vanilla API, but would be great if anyone could confirm if event "COMBAT_RATING_UPDATE" is implemented in 1.12 patch.
For now, I will leave here a solution that should work, but it's not the most efficient one.
- Code: Select all
local timer = CreateFrame("FRAME");
local GetTime = GetTime;
local time, elapsed = GetTime(), 0;
timer:SetScript("OnUpdate", function()
elapsed = GetTime() - time;
if elapsed > 0.1 then
time = GetTime();
if GetCritChance() > 100 then
DEFAULT_CHAT_FRAME:AddMessage("You have now +100% crit chance!");
time = time + 3; --this will add +3secs to the timer
end
end
end);
timer:SetScript("OnEvent", function()
DEFAULT_CHAT_FRAME:AddMessage("Combat_Rating_Update working...");
end);
timer:RegisterEvent("COMBAT_RATING_UPDATE");
Make an addOn with the code above and report the results.
Basically, it should warn you with a chat message everytime you have +100% crit chance.
I also add a simple test to see if the event that I mentioned above is working or not.