Bard songs go negative for some reason?

Hot fix for now, I don't think they really need to be extended,
but I need to investigate more.
This commit is contained in:
Michael Cook (mackal) 2015-05-24 18:50:33 -04:00
parent 93942fa82b
commit 85bdcf413b
2 changed files with 21 additions and 18 deletions

View File

@ -618,6 +618,7 @@ typedef enum {
#define DF_Permanent 50 #define DF_Permanent 50
#define DF_Aura 51
// note this struct is historical, we don't actually need it to be // note this struct is historical, we don't actually need it to be
// aligned to anything, but for maintaining it it is kept in the order that // aligned to anything, but for maintaining it it is kept in the order that

View File

@ -3367,13 +3367,15 @@ void Mob::BuffProcess()
if(buffs[buffs_i].spellid == SPELL_UNKNOWN) if(buffs[buffs_i].spellid == SPELL_UNKNOWN)
continue; continue;
if(buffs[buffs_i].ticsremaining > 0) // perma buffs will either be -1 or -4 // DF_Permanent uses -1 DF_Aura uses -4 but we need to check negatives for some spells for some reason?
{ if (spells[buffs[buffs_i].spellid].buffdurationformula != DF_Permanent &&
spells[buffs[buffs_i].spellid].buffdurationformula != DF_Aura) {
if(!zone->BuffTimersSuspended() || !IsSuspendableSpell(buffs[buffs_i].spellid)) if(!zone->BuffTimersSuspended() || !IsSuspendableSpell(buffs[buffs_i].spellid))
{ {
--buffs[buffs_i].ticsremaining; --buffs[buffs_i].ticsremaining;
if (buffs[buffs_i].ticsremaining == 0) { if (buffs[buffs_i].ticsremaining == 0) {
// Why do we need to let these go negative? Client uses negatives for perma buffs
if (!IsShortDurationBuff(buffs[buffs_i].spellid) || if (!IsShortDurationBuff(buffs[buffs_i].spellid) ||
IsFearSpell(buffs[buffs_i].spellid) || IsFearSpell(buffs[buffs_i].spellid) ||
IsCharmSpell(buffs[buffs_i].spellid) || IsCharmSpell(buffs[buffs_i].spellid) ||