RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Simple Modification BoundingBoxPicker

Kons.snoK

Sorceror
Simple Modification BoundingBoxPicker

Some of my Builders notices that clicking on a dark side of the gamescreen ( like under paperdoll ) makes new clients send 0 0 0 target packet ( i'm speaking of SA, i don't know if this issue is present in 2D 7.0+ )
causing the creation of a Rectangle from 0 to first location ( quite annoying :) )
I saw RunUO have no prevention to this, so i suggest this simple change.
Code:
				else if ( m_Map != null && m_Map != Map.Internal && m_Callback != null )
				{
					Point3D start = m_Store;
					Point3D end = new Point3D( p );

					#region KR ITalia
					if (end == Point3D.Zero || (end.X == 0 && end.Y == 0))
					{
						from.SendMessage("Targeted wrong Place, please Tile Again");
						return;
					}
					#endregion
					Utility.FixPoints( ref start, ref end );
 

Kons.snoK

Sorceror
making some further researching, it came out that best way to solve this problem is to put

Code:
			if (targetID == unchecked((int)0xDEADBEEF))
				return;

			#region KR Italia
			if ((x == 0) && (y == 0) && (z == 0))
				return;
			#endregion

			Mobile from = state.Mobile;

in packethandlers.cs ,
Code:
		public static void TargetResponse(NetState state, PacketReader pvSrc)
		{
Osi does not handle 0 0 0 packet.
 
Top