fix(Core/AI): keep charmed creature victim set by charmer (#25552)

This commit is contained in:
blinkysc 2026-04-23 03:46:08 -05:00 committed by GitHub
parent 72591ee841
commit 092fc7cc9e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -358,6 +358,10 @@ bool CreatureAI::UpdateVictim()
return false; return false;
} }
// Charmed creatures: the charmer controls target selection, don't interfere
if (me->IsCharmed())
return me->GetVictim() != nullptr;
if (!me->HasReactState(REACT_PASSIVE)) if (!me->HasReactState(REACT_PASSIVE))
{ {
if (Unit* victim = me->SelectVictim()) if (Unit* victim = me->SelectVictim())