region basic tests added
This commit is contained in:
parent
1fce9ce36e
commit
732121bdf5
5 changed files with 114 additions and 7 deletions
|
|
@ -292,15 +292,15 @@ namespace TShockAPI.DB
|
|||
"INSERT INTO Regions VALUES (@tx, @ty, @height, @width, @name, @worldid, @userids, @protected);";
|
||||
com.AddParameter("@tx", tx);
|
||||
com.AddParameter("@ty", ty);
|
||||
com.AddParameter("@width", width + tx);
|
||||
com.AddParameter("@height", height + ty);
|
||||
com.AddParameter("@width", width);
|
||||
com.AddParameter("@height", height);
|
||||
com.AddParameter("@name", regionname.ToLower());
|
||||
com.AddParameter("@worldid", worldid);
|
||||
com.AddParameter("@userids", "");
|
||||
com.AddParameter("@protected", 1);
|
||||
if (com.ExecuteNonQuery() > 0)
|
||||
{
|
||||
ReloadAllRegions();
|
||||
Regions.Add(new Region(new Rectangle(tx, ty, width, height), regionname, 0, worldid));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue