While researching and working on interpreting the buffdurationformula and buffduration fields in spells, I made the following determinations that can be added to the EQEmu code:
Server/Spells.cpp
Line 2631 - int CalcBuffDuration_formula(int level, int formula, int duration)
First, there's a glitch in formula 2, line ~2645:
Code:
case 1:
i = (int)ceil(level / 2.0f);
return i < duration ? (i < 1 ? 1 : i) : duration;
case 2:
i = (int)ceil(duration / 5.0f * 3);
return i < duration ? (i < 1 ? 1 : i) : duration;
- i = (int)ceil(duration / 5.0f * 3);
+ i = (int)ceil(level / 5.0f * 3);
Looks like simple wrong variable typo.
Second, here are some additional Duration Formulas, confirmed on Live in-game or via raid NPC casting behavior research in raid strats:
- 13 and 14 are just like 12 and 15
- 50 really is permanent, as far as duration. These spells are cancelled other ways (casting/combat for perm invis, non-lev zones for lev, curing poison/curse counters, etc.)
- 51 is just like 50. It's used for aura spells. The target is affected as long as they're in range of the aura (and as long as the aura is being maintained). No time limit.
I also wanted to give a thumbs up for interpreting Duration Formula 11 correctly, where Lucy doesn't. Verified on Live with the Cleric starting spell Courage. Lasted 12 minutes at Level 1, like the server's formula said it should, whereas Lucy says it should last the max 27 minutes at any level. Burn.
Let me know if any more information would be helpful!