View Single Post
08-10-05, 10:14 AM   #3
Garoun
A Fallenroot Satyr
 
Garoun's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2005
Posts: 25
(Don't know how I missed this before I posted mine :/ I looked through every single page, sigh)

Grayhoof, have you done any work on making custom events fire on a class per class basis in the sct_event_config.lua file? Was curious since I'm running into the issue of seeing things like Overpower! when I'm on my rogue :P. I saw your post about the localizations file but I use the 'Flag SCT text' so even though I force a " " into the field I'll get * *. Is there anyway to have a 'Class' based SCT_Event_Config = { } array such as SCT_Event_Config_<class> = {} that runs based on which class you used.

I use this code currently to work around the issue if anyone cares to use it: (used the 'gar' prefix as to avoid possible interference with other variables in the program)
Code:
--[[ Goes after the comment block ]]
     local garPClass, garLocClass = UnitClass("player");

     if (garPClass == "Warrior") then
          gar_TargetDodged = "Overpower!";
     else
          gar_TargetDodged = "-Evaded-";
     end
     ChatFrame1:AddMessage(garPClass .. ' class custom SCT events loaded.');

--[[ Example custom event ]]
SCT_Event_Config = {
[11] = {name=gar_TargetDodged, search="dodges", r=256/256, g=256/256, b=0/256, iscrit=1},
};
Standard Disclaimer: If you don't know what you are doing don't go editing files because you will most likely break something and I take no responsibility. Do so at your own risk. As always BACK UP original files before you go screwing with them .
  Reply With Quote