Updated to new binary (with the api merged).

Removed System.Drawing dependency
This commit is contained in:
high 2011-09-24 18:29:27 -04:00
parent b95caf67c2
commit b2f47f57ac
20 changed files with 82 additions and 96 deletions

View file

@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
using System;
using System.Collections.Generic;
using System.Data;
using System.Drawing;
using System.IO;
using System.Xml;
using MySql.Data.MySqlClient;
@ -173,11 +173,11 @@ namespace TShockAPI.DB
{
try
{
return new Warp(new PointF(reader.Get<int>("X"), reader.Get<int>("Y")), reader.Get<string>("WarpName"), reader.Get<string>("WorldID"), reader.Get<string>("Private"));
return new Warp(new Vector2(reader.Get<int>("X"), reader.Get<int>("Y")), reader.Get<string>("WarpName"), reader.Get<string>("WorldID"), reader.Get<string>("Private"));
}
catch
{
return new Warp(new PointF(reader.Get<int>("X"), reader.Get<int>("Y")), reader.Get<string>("WarpName"), reader.Get<string>("WorldID"), "0");
return new Warp(new Vector2(reader.Get<int>("X"), reader.Get<int>("Y")), reader.Get<string>("WarpName"), reader.Get<string>("WorldID"), "0");
}
}
}
@ -247,12 +247,12 @@ namespace TShockAPI.DB
public class Warp
{
public PointF WarpPos { get; set; }
public Vector2 WarpPos { get; set; }
public string WarpName { get; set; }
public string WorldWarpID { get; set; }
public string Private { get; set; }
public Warp(PointF warppos, string name, string worldid, string hidden)
public Warp(Vector2 warppos, string name, string worldid, string hidden)
{
WarpPos = warppos;
WarpName = name;
@ -262,7 +262,7 @@ namespace TShockAPI.DB
public Warp()
{
WarpPos = PointF.Empty;
WarpPos = Vector2.Zero;
WarpName = null;
WorldWarpID = string.Empty;
Private = "0";