mirror of
https://github.com/islehorse/HISP.git
synced 2025-04-24 05:35:51 +12:00
Remove " " space from the names
This commit is contained in:
parent
bef3032886
commit
8e451633dc
59 changed files with 391 additions and 391 deletions
53
Horse Isle Server/HorseIsleServer/Game/Services/Transport.cs
Normal file
53
Horse Isle Server/HorseIsleServer/Game/Services/Transport.cs
Normal file
|
@ -0,0 +1,53 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace HISP.Game.Services
|
||||
{
|
||||
class Transport
|
||||
{
|
||||
public struct TransportLocation
|
||||
{
|
||||
public int Id;
|
||||
public int Cost;
|
||||
public int GotoX;
|
||||
public int GotoY;
|
||||
public string Type;
|
||||
public string LocationTitle;
|
||||
}
|
||||
|
||||
public struct TransportPoint
|
||||
{
|
||||
public int X;
|
||||
public int Y;
|
||||
public int[] Locations;
|
||||
}
|
||||
|
||||
public static List<TransportPoint> TransportPoints = new List<TransportPoint>();
|
||||
public static List<TransportLocation> TransportLocations = new List<TransportLocation>();
|
||||
|
||||
|
||||
public static TransportPoint GetTransportPoint(int x, int y)
|
||||
{
|
||||
foreach(TransportPoint transportPoint in TransportPoints)
|
||||
{
|
||||
if (transportPoint.X == x && transportPoint.Y == y)
|
||||
{
|
||||
return transportPoint;
|
||||
}
|
||||
}
|
||||
throw new KeyNotFoundException("Cannot find transport point at x:" + x + "y:" + y);
|
||||
}
|
||||
|
||||
public static TransportLocation GetTransportLocation(int id)
|
||||
{
|
||||
foreach (TransportLocation transportLocation in TransportLocations)
|
||||
{
|
||||
if (transportLocation.Id == id)
|
||||
{
|
||||
return transportLocation;
|
||||
}
|
||||
}
|
||||
throw new KeyNotFoundException("Cannot find transport location at Id:" + id);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue