added prefix to rest manager

added region method again
This commit is contained in:
Zack Piispanen 2012-06-23 14:40:06 -04:00
parent bdf56225b7
commit a259a02306
2 changed files with 16 additions and 1 deletions

View file

@ -283,6 +283,21 @@ namespace TShockAPI.DB
return regions;
}
public List<Region> InAreaRegion(int x, int y)
{
List<Region> regions = new List<Region>() { };
foreach (Region region in Regions)
{
if (x >= region.Area.Left && x <= region.Area.Right &&
y >= region.Area.Top && y <= region.Area.Bottom &&
region.DisableBuild)
{
regions.Add(region);
}
}
return regions;
}
public static List<string> ListIDs(string MergedIDs)
{
return MergedIDs.Split(new[] {','}, StringSplitOptions.RemoveEmptyEntries).ToList();

View file

@ -510,7 +510,7 @@ namespace TShockAPI
{"ip", player.IP},
{"group", player.Group.Name},
{"position", player.TileX + "," + player.TileY},
{"inventory", string.Join(", ", activeItems.Select(p => (p.name + ":" + p.stack)))},
{"inventory", string.Join(", ", activeItems.Select(p => (String.Format( "({0}){1}:{2}", p.prefix, p.name, p.stack))))},
{"buffs", string.Join(", ", player.TPlayer.buffType)}
};
}