From 311b1aa2a54b32f15a16a19565e8e5264a2a4480 Mon Sep 17 00:00:00 2001 From: Bohica Date: Sat, 25 Jan 2025 03:22:57 -0800 Subject: [PATCH] fix: HandlesOnSpeech for vendors --- Projects/UOContent/Mobiles/AI/BaseAI.cs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Projects/UOContent/Mobiles/AI/BaseAI.cs b/Projects/UOContent/Mobiles/AI/BaseAI.cs index 387b99054..501cdaf07 100644 --- a/Projects/UOContent/Mobiles/AI/BaseAI.cs +++ b/Projects/UOContent/Mobiles/AI/BaseAI.cs @@ -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 &&