Server.Multis.BaseCamp.AddMobile C# (CSharp) Method

AddMobile() public method

public AddMobile ( Mobile m, int wanderRange, int xOffset, int yOffset, int zOffset ) : void
m Mobile
wanderRange int
xOffset int
yOffset int
zOffset int
return void
		public virtual void AddMobile( Mobile m, int wanderRange, int xOffset, int yOffset, int zOffset )
		{
			m_Mobiles.Add(m);

			int zavg = Map.GetAverageZ(X + xOffset, Y + yOffset);
			Point3D loc = new Point3D(X + xOffset, Y + yOffset, zavg + zOffset);
			BaseCreature bc = m as BaseCreature;

			if ( bc != null )
			{
				bc.RangeHome = wanderRange; 
				bc.Home = loc; 
			}

			if ( m is BaseVendor || m is Banker )
				m.Direction = Direction.South;

			m.MoveToWorld( loc, this.Map );
		}