life time check for debuff spell & cast time spell

This commit is contained in:
Yunfan Li
2023-09-04 17:04:59 +08:00
parent 9575ca222b
commit 7e1de0b9cf
9 changed files with 138 additions and 25 deletions

View File

@@ -207,7 +207,7 @@ bool TargetInSightTrigger::IsActive()
bool DebuffTrigger::IsActive()
{
return BuffTrigger::IsActive() && AI_VALUE2(uint8, "health", GetTargetName()) > life_bound;
return BuffTrigger::IsActive() && GetTarget() && (1000 * GetTarget()->GetHealth() / AI_VALUE(float, "expected group dps")) >= needLifeTime;
}
bool DebuffOnBossTrigger::IsActive()