2010-07-24, 02:56 PM
MysticHLE Wrote:Wow...really?! Switch statements?! That many conditions as well?! I really wonder what kind of beginner programmers they hire to code these things. These developers should know better. -_-!
The computer isn't going to like this in terms of performance. And there isn't much that the assembler will be able to do either...way too many potential branch prediction misses (on the architecture level). >.>
I sure hope this function isn't invoked each time we attack...and that it's only calculated once. -_-
Kinda explains why MS runs so slow and requires so much resources...if they really have these bad programming habits. >.>
It definitely doesn't look like a function in the STL library, so it must be a user-defined function - which shouldn't be a surprise to you - since that's what programming is essentially about. STL is mainly only used for the containers/ADTs.
Precisely, their attack calculations and such are worst. They should simply pre-calculate it and cache on a location for future attack, and update when the user cast a buff/debuff.
You'll see hundreds of if and else such as :
Code:
if (skillid / 1000 == 100) {
if (skillid == 1311111) {
} else if .. and so on
}THIS repeats for every single job! lol
AND their randomizer does this 7~15 times per attack to an array :
Code:
CRand32_Rand() // Generate an unsigned int32even without using it fully.

