DrDamage

158 - Molten Core not applying to Soul Fire (2 bug fixes for your approval)

Molten Core wasn't applying to Soul Fire. I found a bug in the code and fixed it. Posting the fixed code along with specific details of what I changed:
You had Soul Fire listed twice in the code, once for the Molten Core calculation, and once for the T10 set bonus. I think (I'm not very experienced with Lua, all my programming experience deals with Java) that the addon was only counting the second function when it was calculating Soul Fire's damage, and ignoring the Molten Core code. I consolidated the two functions, and it seems to be working properly now.

I also think I found a bug with Fire and Brimstone applying to Incinerate and Chaos Bolt. The lines of code were

calculation.dmgM = calculation.dmgM * (1 + (Talents["Fire and Brimstone"] or 0))

(Incinerate)

calculation.dmgM = calculation.dmgM * 1 + (Talents["Fire and Brimstone"])

(Chaos Bolt)

I changed them both to

calculation.dmgM = calculation.dmgM * (1 + 0.02 * Talents["Fire and Brimstone"])

since the "or 0" part of the incinerate code appeared redundant, as it didn't appear anywhere else.

Name Description Size MD5
Warlock.lua The altered code for reference 43.5 KiB 169b8088b521...
User When Change
Gagorian Apr 23, 2010 at 09:03 UTC Changed status from New to Fixed
enigma3d Apr 22, 2010 at 18:40 UTC

Added attachment Warlock.lua

enigma3d Apr 22, 2010 at 18:39 UTC Create

You must login to post a comment. Don't have an account? Register to get one!

  • 2 comments
  • Avatar of enigma3d enigma3d Apr 23, 2010 at 06:45 UTC - 0 likes

    My apologies then, I didn't read all of the code, and just assumed it was wrong because it was different from how you applied molten core to incinerate or soul fire. Was going for consistency as I don't have a lot of experience with Lua.

    Last edited Apr 23, 2010 by enigma3d
  • Avatar of Gagorian Gagorian Apr 22, 2010 at 22:00 UTC - 0 likes

    Good job catching the double soul fire entry, you're right that only the latter one is calculated as the table entry is replaced by it.

    I can't see any bug with Fire and Brimstone though. The "or 0" is necessary since the table entry is nil unless you have the talent (in other parts of the code the talent is checked before). Also multiplying the table entry by 0.02 is wrong as the table entry already contains the true talent value, not the number of points allocated in the talent (You can see how the talents are defined in the talent table at the bottom of the class module, some are set to contain the number of points, while most contain the value of the talent depending on the usage in the module).

    I've added the fix for Soul Fire in the latest alpha.

  • 2 comments

Facts

Last updated
Apr 23, 2010
Reported
Apr 22, 2010
Status
Fixed - Developer made requested changes. QA should verify.
Type
Enhancement - A change which is intended to better the project in some way
Priority
Medium - Normal priority.
Votes
0

Reported by

Possible assignees