Rework buff duration formulas

These are derived from the client

SE_IllusionPresistence will also set the duration to 10k tics like live
This commit is contained in:
Michael Cook (mackal)
2015-05-23 02:20:36 -04:00
parent 351e63ae72
commit 8aadc36320
16 changed files with 116 additions and 120 deletions
+2 -2
View File
@@ -83,7 +83,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial)
if(c_override)
{
int durat = CalcBuffDuration(caster, this, spell_id, caster_level);
if(durat > 0)
if(durat) // negatives are perma buffs
{
buffslot = AddBuff(caster, spell_id, durat, caster_level);
if(buffslot == -1) // stacking failure
@@ -3366,7 +3366,7 @@ void Mob::BuffProcess()
if(buffs[buffs_i].spellid == SPELL_UNKNOWN)
continue;
if(spells[buffs[buffs_i].spellid].buffdurationformula != DF_Permanent)
if(buffs[buffs_i].ticsremaining > 0) // perma buffs will either be -1 or -4
{
if(!zone->BuffTimersSuspended() || !IsSuspendableSpell(buffs[buffs_i].spellid))
{