Unholy dk

This commit is contained in:
Yunfan Li
2024-09-06 20:29:56 +08:00
parent 593b30bbb0
commit f20d3aea6c
13 changed files with 98 additions and 50 deletions

View File

@@ -152,7 +152,16 @@ bool OutNumberedTrigger::IsActive()
bool BuffTrigger::IsActive()
{
Unit* target = GetTarget();
return SpellTrigger::IsActive() && !botAI->HasAura(spell, target, false, checkIsOwner);
if (!target)
return false;
if (!SpellTrigger::IsActive())
return false;
Aura* aura = botAI->GetAura(spell, target, checkIsOwner, checkDuration);
if (!aura)
return true;
if (beforeDuration && aura->GetDuration() < beforeDuration)
return true;
return false;
}
Value<Unit*>* BuffOnPartyTrigger::GetTargetValue()