added prefix to rest manager
added region method again
This commit is contained in:
parent
bdf56225b7
commit
a259a02306
2 changed files with 16 additions and 1 deletions
|
|
@ -283,6 +283,21 @@ namespace TShockAPI.DB
|
||||||
return regions;
|
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)
|
public static List<string> ListIDs(string MergedIDs)
|
||||||
{
|
{
|
||||||
return MergedIDs.Split(new[] {','}, StringSplitOptions.RemoveEmptyEntries).ToList();
|
return MergedIDs.Split(new[] {','}, StringSplitOptions.RemoveEmptyEntries).ToList();
|
||||||
|
|
|
||||||
|
|
@ -510,7 +510,7 @@ namespace TShockAPI
|
||||||
{"ip", player.IP},
|
{"ip", player.IP},
|
||||||
{"group", player.Group.Name},
|
{"group", player.Group.Name},
|
||||||
{"position", player.TileX + "," + player.TileY},
|
{"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)}
|
{"buffs", string.Join(", ", player.TPlayer.buffType)}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue