Merge pull request #570 from liyunfan1223/fix_party_buff_crash

[Crash fix] Party buff check
This commit is contained in:
Yunfan Li
2024-10-03 15:01:15 +08:00
committed by GitHub

View File

@@ -33,6 +33,10 @@ bool DivineSpiritTrigger::IsActive()
bool PrayerOfFortitudeTrigger::IsActive()
{
Unit* target = GetTarget();
if (!target || !target->IsPlayer())
return false;
return BuffOnPartyTrigger::IsActive() && !botAI->HasAura("prayer of fortitude", GetTarget()) &&
botAI->GetBot()->IsInSameGroupWith((Player*)GetTarget()) &&
botAI->GetBuffedCount((Player*)GetTarget(), "prayer of fortitude") < 4 &&
@@ -41,6 +45,10 @@ bool PrayerOfFortitudeTrigger::IsActive()
bool PrayerOfSpiritTrigger::IsActive()
{
Unit* target = GetTarget();
if (!target || !target->IsPlayer())
return false;
return BuffOnPartyTrigger::IsActive() && !botAI->HasAura("prayer of spirit", GetTarget()) &&
botAI->GetBot()->IsInSameGroupWith((Player*)GetTarget()) &&
// botAI->GetManaPercent() > 50 &&