Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/modules/Bots/playerbot/PlayerbotAI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1008,9 +1008,9 @@ bool PlayerbotAI::HasAura(string name, Unit* unit)
}

uint32 spellId = aiObjectContext->GetValue<uint32>("spell id", name)->Get();
if (spellId)
if (spellId && HasAura(spellId, unit))
{
return HasAura(spellId, unit);
return true;
}
Comment on lines 1010 to 1014
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had no idea that was even a thing- dang. Yea, if that actually exists, it would be better.

Copy link
Contributor Author

@bozimmerman bozimmerman Mar 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, after thinking about it -- I will have to stand by my original commit and just let the maintainers decide, but here's what I think:

First off, this was a bug fix to enable behavior that was already clearly intended, due to the entire rest of the method handling the name-search. So, this commit is a minimal fix and less risky than Copilot's suggestion.

Second, while Copilot's solution WOULD speed up my weird use-case, it would not matter in all other cases, including the most common case of all: an aura missing entirely. When the aura is missing entirely, it would STILL fall back to the name search in Copilot's code. So, on net: the speed benefit is likely to be very minor.

So, my humble suggestion: take this bug fix in that spirit, and consider Copilot's change as a minor optimization later.


wstring wnamepart;
Expand Down
Loading