Question about buff duration - Durationformula
Hi folks,
I have been trying to determine what is actually behind the "Durationformula" for spells to calculate the duration for levels 1-65. For some spells, it's pretty simple, for example: - Ensnare: Buff Duration: 140 (14.0 minutes), Durationformula: "Level * 2 + 10" (durationformula 9). With the above it's simple to figure out the spell duration for Ensnare at any character level. However, with this spell, as an example: - Snare: Buff Duration: 39 (3.9 minutes), Durationformula: "Duration * 3/5" (durationformula 2). It's not easy (well, for me) to use this Durationformula and others to calculate duration by level. I was hoping someone could shed some light into what "Duration * 3/5", "Duration / 2" etc. actually mean for determining the duration for the spells with those formulas at say, level 14, or whatever. Thanks in advance. |
Code:
// the generic formula calculations Heres the code if you think the math will better explain it :p |
Quote:
|
Also take note... the duration it returns is in "ticks" of 6 seconds
so if it returns a duration of 60 -- that is 6 minutes :) |
Quote:
However case 2: Code:
i = (int)ceil(duration / 5.0f * 3); It takes the duration, which default for Snare is "39", divides it by a float 5.0 * 3, rounds it to the nearest int, and that is supposed to = duration. What? |
The formula looks incorrect.. its supposed to scale with level.. but it does not :p
|
Pretty sure case 2: should be this.... (going from what is posted on Lucy for spells that have that formula ID)
Code:
i = (int)ceil(level * 0.6f); http://lucy.allakhazam.com/spell.htm...42&source=Live At level 1 -- it returns 1 tick at level 65 it returns 39 ticks (or MAX duration) formula works with this spell too ... so it seems to be right on :) http://lucy.allakhazam.com/spell.htm...97&source=Live |
Quote:
Works for me. Thanks again! :) |
All times are GMT -4. The time now is 06:57 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.