Naviehs
Member
Im having an issue with the new vet reward, I managed to make is so you cant place it by houses but I can still place it over rocks , trees etc... Anyone has a fix?
//
// Thank you!
//
C#:
public override void OnDoubleClick( Mobile from )
{
if (TentCheck(from)==false)
{
from.SendMessage("You Already own a Tent");
}
else
{
if ( IsChildOf( from.Backpack ) )
{
if ( Validate(from) == true)
{
TentWalls v = new TentWalls();
v.Location = from.Location;
v.Map = from.Map;
TentRoof w = new TentRoof();
w.Location = from.Location;
w.Map = from.Map;
TentFloor y = new TentFloor();
y.Location = from.Location;
y.Map = from.Map;
TentTrim z = new TentTrim();
z.Location = from.Location;
z.Map = from.Map;
TentVerifier tentverifier = new TentVerifier();
from.AddToBackpack (tentverifier);
SecureTent chest = new SecureTent((PlayerMobile)from,v,w,y,z);
chest.Location = new Point3D( from.X -1, from.Y-1, from.Z );
chest.Map = from.Map;
BedRoll1 x = new BedRoll1(v,w,y,z,(PlayerMobile)from, (SecureTent) chest,(TentVerifier) tentverifier);
x.Location = new Point3D( from.X, from.Y+1, from.Z );
x.Map = from.Map;
from.SendGump( new TentGump( from ) );
this.Delete();
}
else
{
from.SendMessage("You cannot errect your Tent in this area.");
}
}
else
{
from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it.
}
}
}
public bool Validate(Mobile from)
{
foreach (Item item in Map.GetItemsInRange(from.Location, 15))
{
ItemData id = item.ItemData;
LandTile landTile = Tiles.GetLandTile();
int landID = landTile.ID & TileData.MaxLandValue;
if (item is BaseHouse || !item.Movable || item.ItemData.Impassable || landTile.Impassable )
{
return false;
}
}
return true;
}
// Thank you!