mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-02-04 19:33:47 +00:00
fix debuff trigger
This commit is contained in:
@@ -294,5 +294,9 @@ Value<Unit*>* BuffOnMainTankAction::GetTargetValue()
|
||||
|
||||
bool CastDebuffSpellAction::isUseful()
|
||||
{
|
||||
return CastAuraSpellAction::isUseful() && GetTarget() && (GetTarget()->GetHealth() / AI_VALUE(float, "expected group dps")) >= needLifeTime;
|
||||
Unit* target = GetTarget();
|
||||
if (!target || !target->IsAlive() || !target->IsInWorld()) {
|
||||
return false;
|
||||
}
|
||||
return CastAuraSpellAction::isUseful() && (target->GetHealth() / AI_VALUE(float, "expected group dps")) >= needLifeTime;
|
||||
}
|
||||
Reference in New Issue
Block a user