Fix some buffs ending prematurely

This commit is contained in:
gsemaj 2023-09-24 12:22:55 -07:00
parent a14354ca4b
commit 6956782027
No known key found for this signature in database
GPG Key ID: 24B96BAA40497929
1 changed files with 2 additions and 1 deletions

View File

@ -120,7 +120,8 @@ static SkillResult handleSkillBuff(SkillData* skill, int power, ICombatant* sour
int duration = skill->durationTime[power];
int strength = skill->values[0][power];
BuffStack passiveBuff = {
skill->drainType == SkillDrainType::PASSIVE ? 1 : (duration * 100) / MS_PER_COMBAT_TICK, // ticks
// if the duration is 0, it needs to be recast every tick
duration == 0 ? 1 : (duration * 100) / MS_PER_COMBAT_TICK, // ticks
strength, // value
source->getRef(), // source
source == target ? BuffClass::NANO : BuffClass::GROUP_NANO, // buff class