4.1 COMBAT_LOG_EVENT_UNFILTER changed

- Technical Support
90 Human Warrior
18580
04/26/2011 08:55 PMPosted by Chicknbiscut
So what does hideCaster do exactly?

no idea, it doesn't even show in user combat log or /combatlog, it is only in raw packets and doesn't contain any useful information.
Reply Quote
Posted earlier in this thread(quote not working):

Wowza! Talk about Blizz dropping the ball on this one. System design 101: add new stuff to the END of a parameter list.

No0b programmer mistake? Or part of an evil scheme to purge the land of Add-Ons?

/don TinFoilHat



The "COMBAT_LOG_EVENT_UNFILTERED" event has 2 sets of parameters. One that is passed for every event (frame handle, timestamp, combat log event name, hide caster flag) and one that changes depending on the type of combat log event. Had Blizzard added the flag after both parameter sets, it's offset would not be consistent and finding the flag would incur significant performance penalties.

Lifetime of sub-optimal performance vs. +1% nerd rage on forums for 2 days.

I'm partial to the latter.


FYI - for any "programmers" that aren't famiiiar with "overloaded functions" - it's a function that has different calling procedures - ie number of arguments - with the same name...

Keeping common arguments in the same place makes for better programming practice - which is likely why this "hidecaster" argument appears where it does...

Feel free to correct me if I'm wrong - I don't program LUA - but seeing this

4.0.6
COMBAT_LOG_EVENT_UNFILTERED(timestamp, event, sourceGUID, sourceName, sourceFlags, destGUID, destName, destFlags, ...)

4.1
COMBAT_LOG_EVENT_UNFILTERED(timestamp, event, hideCaster, sourceGUID, sourceName, sourceFlags, destGUID, destName, destFlags, ...)


and then this:

Posted by Kilryte
it has been said, it's one of the early things you learn is software design, always add the end, especially in an environment where parameters are not all required. If parameters were passed by name, then the order wouldn't matter.


made me feel the need to point this out.

FYI - named args are nice, but extra work - and overhead.
Edited by Feñce on 4/26/2011 9:52 PM PDT
Reply Quote
85 Blood Elf Warrior
4810
04/26/2011 09:48 PMPosted by Feñce
FYI - named args are nice, but extra work - and overhead.


Judging from WoW's memory footprint I don't think Blizzard is worried about overhead.
Reply Quote
- Technical Support
90 Human Warrior
18580
04/26/2011 11:48 PMPosted by Erudition
FYI - named args are nice, but extra work - and overhead.


Judging from WoW's memory footprint I don't think Blizzard is worried about overhead.

memory usage and overhead are not the same thing.
Reply Quote
85 Blood Elf Warrior
4810
[quote="24157729013"]memory usage and overhead are not the same thing.


I'm sorry I wasn't aware that you could only have CPU overhead and not memory overhead.

"In computer science, overhead is generally considered any combination of excess or indirect computation time, memory, bandwidth, or other resources that are required to attain a particular goal."

You should probably go edit Wikipedia so others don't make this mistake.
Reply Quote
- Technical Support
90 Human Warrior
18580
overhead is a broad term, and just because they don't owrry about memory overhead does not mean they don't owrry about cpu overhead that affects fps or game performance especially in something like combat. perhaps my wording wasn't perfect but it's not rocket science. that's like saying blizz doesn't care about their sports car because it has crappy rims. That's a broad statement. Maybe blizz just doesn't care about the rims but def cares about the engine.
Reply Quote
85 Blood Elf Warrior
4810
04/27/2011 01:44 AMPosted by Omegal
Maybe blizz just doesn't care about the rims but def cares about the engine.


Which engine?

The graphics engine that still looks like something from 2004 or the combat engine that's woefully incapable of handling the talents and abilities they throw at it?
Reply Quote
85 Tauren Paladin
2430

Which engine?

The graphics engine that still looks like something from 2004 or the combat engine that's woefully incapable of handling the talents and abilities they throw at it?


The car engine.
Reply Quote
85 Blood Elf Rogue
8675
04/26/2011 08:55 PMPosted by Chicknbiscut
So what does hideCaster do exactly?



Exactly what I was going to ask...

What is, hideCaster, and why did we suddenly need it in 4.1... why did we live for so long without this...
Reply Quote
85 Blood Elf Priest
7120
Overloading for the win

http://en.wikipedia.org/wiki/Function_overloading
Edited by Dandruff on 4/27/2011 9:05 AM PDT
Reply Quote
85 Troll Mage
12470
Overloading for the win

http://en.wikipedia.org/wiki/Function_overloading

Well the page even says the technique is a poor fit for Lua:

Method overloading is usually associated with statically-typed programming languages which enforce type checking in function calls.

You can fake it, but only with significant overhead as other posters mentioned. And the CLEU handler is the last place you want to be introducing overhead. It was a good temporary measure for making addons compatible between 4.0.6 and the 4.1 PTR though:

-- START 4.1 PTR COMPATIBILITY
local clientVersion
do
local version = GetBuildInfo() -- e.g. "4.0.6"
local a, b, c = strsplit(".", version) -- e.g. "4", "0", "6"
clientVersion = 10000*a + 100*b + c -- e.g. 40006
end
if clientVersion >= 40100 then
local real_CLEU = Scorchio2.COMBAT_LOG_EVENT_UNFILTERED
function Scorchio2:COMBAT_LOG_EVENT_UNFILTERED(_1, _2, _3, hideCaster, ...)
return real_CLEU(self, _1, _2, _3, ...)
end
end
-- END 4.1 PTR COMPATIBILITY



(And the first half was necessary because GetBuildInfo() was broken on early PTR builds and still giving 40000 as the TOC. Parsing the string was the only way to get it right. Or I suppose you could compare the version strings alphabetically.) Anyway that's all it took. It was one of the easier API changes to deal with.
Edited by Morsk on 4/29/2011 1:05 PM PDT
Reply Quote
85 Blood Elf Priest
7120
04/28/2011 05:19 AMPosted by Morsk
Pardon the fake tabs! And the first half was necessary because GetBuildInfo()


Weee
{
Lookie meh tabs!
This is how coders
write code!
}
Reply Quote
85 Troll Mage
12470
Oh cool. I gave up on hoping [code] was implemented on the new forums, but I guess they did it right after I gave up!
Reply Quote
- Technical Support
90 Human Warrior
18580
if tonumber((select(2, GetBuildInfo()))) >= 13682 then
local oldHandler = MOD.COMBAT_LOG_EVENT_UNFILTERED
function MOD:COMBAT_LOG_EVENT_UNFILTERED(timestamp, event, hideCaster, ...)
return oldHandler(self, timestamp, event, ...)
end
end


Same hack pretty much but a simpler build check. was an ok temporary hack to make sure on launch it wouldn't be terribly broken for masses while everything is tested for an actual release tagging without hack :)
Reply Quote
85 Troll Mage
12470
04/30/2011 10:25 AMPosted by Omegal
Same hack pretty much but a simpler build check. was an ok temporary hack to make sure on launch it wouldn't be terribly broken for masses while everything is tested for an actual release tagging without hack :)

Nice. :) I was afraid to check the build number because I didn't know if it was guaranteed a PTR always has greater build numbers than any release before the PTR. If a 4.0.6a was released in the middle of the 4.1 PTR phase, do we know for sure that its build number is less than a 4.1 PTR? I'm paranoid about that kind of thing!

edit: Durp; my parsing code breaks on a string like "4.0.6a" anyway. I wasn't paranoid enough. Hm...
Edited by Morsk on 5/3/2011 10:52 AM PDT
Reply Quote
85 Blood Elf Rogue
8675
So i herd 4.2 is changing something again...
Reply Quote
- Technical Support
90 Human Warrior
18580
http://us.battle.net:80/wow/en/forum/topic/2483689044

tried to report and vote it a sticky but apparently no one thinks it's important enough yet. At least not til patch day when tech support forums fill up with addon complaints again because they lag in combat :)
Reply Quote

Please report any Code of Conduct violations, including:

Threats of violence. We take these seriously and will alert the proper authorities.

Posts containing personal information about other players. This includes physical addresses, e-mail addresses, phone numbers, and inappropriate photos and/or videos.

Harassing or discriminatory language. This will not be tolerated.

Forums Code of Conduct

Report Post # written by

Reason
Explain (256 characters max)
Submit Cancel

Reported!

[Close]