Skip to content

Commit

Permalink
fix: HandlesOnSpeech for vendors
Browse files Browse the repository at this point in the history
  • Loading branch information
Bohicatv committed Jan 25, 2025
1 parent cb14ff8 commit 311b1aa
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Projects/UOContent/Mobiles/AI/BaseAI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,22 @@ target is BlackSolenInfiltratorQueen or BlackSolenInfiltratorWarrior
return true;
}

public virtual bool HandlesOnSpeech(Mobile from)
{
if (from.AccessLevel >= AccessLevel.GameMaster)
{
return true;
}

if (from.Alive && m_Mobile.Controlled && m_Mobile.Commandable &&
(from == m_Mobile.ControlMaster || m_Mobile.IsPetFriend(from)))
{
return true;
}

return from.Alive && from.InRange(m_Mobile.Location, 3) && m_Mobile.IsHumanInTown();
}

public virtual void OnSpeech(SpeechEventArgs e)
{
if (WasNamed(e.Speech) && e.Mobile.Alive &&
Expand Down

0 comments on commit 311b1aa

Please sign in to comment.