Thanks! That makes sense and should work. I knew I just needed to get someone else's eyes on it and knew I was over complicating it =) So used to having a continue in c++/c#, wasn't coming up with the logic for doing it without it.
Halgrimm, I'd suggest you use SCTD for now. I am in the middle of a large rewrite of the custom events. Not sure what is specially wrong in your case, but the code has changed so much right now I don't wanna go back =)
bugme, I'll make sure and add an option for that in the new event structure.
Its probably best just to show you the code, but it basically has to do with creating custom events for SCT against the new combat log. Users can specify a number of criteria in finding a custom event, so basically I have to loop through each custom event and see if there is a match. It is easier/quicker to find where they don't match. Below is an example of one of the methods that is called after I have determined it is a damage/heal event (note this does not match what is on the svn currently)
function SCT:HealDamageCustomEvent(tab, spellName, critical, amount, sourceName, sourceFlags, destName, destFlags, icon)
local found
--loop through each event
for key, value in ipairs(tab) do
found = true
--see if its to what they care about
if not CombatLog_Object_IsA(destFlags, FLAG_LOOKUP[value.target]) then
found = false
end
--if they care about source
if found and value.source and not CombatLog_Object_IsA(sourceFlags, FLAG_LOOKUP[value.source]) then
found = false
end
--if they care about skill and skill is not found
if found and value.search and spellName and not strfind(spellName, value.search) then
found = false
end
--if they care about crits and crit is not found
if found and value.critical and not critical then
found = false
end
--if still ok, then send custom event
if found then
self:FormatCustomEvent(value, icon, spellName, sourceName, destName, amount)
return value.override
end
end
return false
end
Everywhere you see a found = false is basically a point where I know this event doesn't match, so I can go on the to the next item. I'm still in the middle a large rewrite of this custom event code, so any suggestions are appreciated =)
As near as I can tell, there is no way to do a "continue" statement in a for loop in Lua. In other words, stop the current iteration of the loop and jump to the next. I maybe just need re-think my logic on this, but how would you handle a situation like this?
for k,v in pairs(t) do
local found = true
if ... then
found = false
end
if found and ... then
found = false
end
if found and ... then
found = false
end
...(repeat for many conditions)
if found then
return true
end
end
return false
I know when I need to break out of the loop and start on the next iteration, but can't find a way too. Best I can come up with was using the found boolean to short circuit all the other conditions. break exits the whole loop, and I don't need to return until I have either found what I need or looked at everything in the table.
That is not a supported feature in the custom events right now. You can no longer easily search the combat log like in the past. What are you trying to do that the built in crushing blows doesn't do for you?
Jaded, that is an issue I am addressing. Fades currently use the same values as the buff/debuff event.
Halgrimm, the custom events are totally re-written. That has not been addressed yet and it low priority right now. SCT does not show your damage, only SCTD does. Nred some examples of what you are seeing as an issue.
I've committed a change that will attempt to use a default color of white if no color is found. Please report back to me any events appearing in white that you know shouldn't be. If you can screenshot the tooltip of the event too, that would be helpful. This isn't ideal, but should help at least stop the errors until we can track down what is causing it. Since I cannot reproduce it, will need your help =)
It would help me if you could note what exactly is causing the error. Its obviously not something common or the mod wouldn't work for anyone. It must be some event in the raid dungeon you are in, so please try and note what happens if at all possible.
Right now, no. You are better off editing the one you start with and then loading it on to other characters. Just select "Default" from the original drop down, make it how you like, the copy it to the other characters as needed, using the Copy From dropdown. This is all the built in Ace3 profile stuff, so I may either need to edit some things, or they may still be tweaking it.
Barabas, if you look back a page or two, you will see gedgold had the exact same issue as you. Clearing out his saved variables fixed it for him, so I am not sure what else to suggest for you. What localization are you in?
Eilenda you may need to revert back your Ace3 libs. That is a method provided by them for adding options to the blizzard options frame. If it has been removed or Blizzard changed something about the process, then mods will have to be updated. You maybe be able to /ace3 to still get to the options.
Barabas, please don't post large errors like that. 1 will do fine. Your profile is corrupted. Please log out of the game, delete your eavesdrop saved variables file, then log back in and you should be good to go.
0
0
bugme, I'll make sure and add an option for that in the new event structure.
0
Everywhere you see a found = false is basically a point where I know this event doesn't match, so I can go on the to the next item. I'm still in the middle a large rewrite of this custom event code, so any suggestions are appreciated =)
0
I know when I need to break out of the loop and start on the next iteration, but can't find a way too. Best I can come up with was using the found boolean to short circuit all the other conditions. break exits the whole loop, and I don't need to return until I have either found what I need or looked at everything in the table.
0
0
Halgrimm, the custom events are totally re-written. That has not been addressed yet and it low priority right now. SCT does not show your damage, only SCTD does. Nred some examples of what you are seeing as an issue.
0
0
0
0
0
Eilenda you may need to revert back your Ace3 libs. That is a method provided by them for adding options to the blizzard options frame. If it has been removed or Blizzard changed something about the process, then mods will have to be updated. You maybe be able to /ace3 to still get to the options.
0
0
0
0