本文整理汇总了C#中Server.Region.AllowHousing方法的典型用法代码示例。如果您正苦于以下问题:C# Region.AllowHousing方法的具体用法?C# Region.AllowHousing怎么用?C# Region.AllowHousing使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Server.Region
的用法示例。
在下文中一共展示了Region.AllowHousing方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: IsValidRegion
private static bool IsValidRegion(Point3D location, Region region)
{
// exclude all funky locations
// if we cannot put a house there, and it isn't a town, then we don't want to spawn there
if (region == null) return false;
if (region.AllowHousing(new Mobile(), location) == false && !IsTown(region.Name)) return false;
if (region is Server.Regions.AngelIsland) return false;
if (region is GreenAcres) return false;
if (region is HouseRegion) return false;
if (region is Server.Regions.Jail) return false;
return true;
}