2022-10-10 21:47:08 -07:00
|
|
|
namespace Server.Targeting;
|
|
|
|
|
|
|
|
|
|
public class StaticTarget : IPoint3D
|
2020-08-25 18:53:35 -07:00
|
|
|
{
|
2022-10-10 21:47:08 -07:00
|
|
|
private Point3D m_Location;
|
2020-08-25 18:53:35 -07:00
|
|
|
|
2022-10-10 21:47:08 -07:00
|
|
|
public StaticTarget(Point3D location, int itemID)
|
|
|
|
|
{
|
|
|
|
|
m_Location = location;
|
|
|
|
|
ItemID = itemID & TileData.MaxItemValue;
|
|
|
|
|
m_Location.Z += TileData.ItemTable[ItemID].CalcHeight;
|
|
|
|
|
}
|
2020-08-25 18:53:35 -07:00
|
|
|
|
2023-01-21 11:19:11 -08:00
|
|
|
public StaticTarget(Point3D location, int itemID, int hue)
|
|
|
|
|
{
|
|
|
|
|
m_Location = location;
|
|
|
|
|
ItemID = itemID & TileData.MaxItemValue;
|
|
|
|
|
m_Location.Z += TileData.ItemTable[ItemID].CalcHeight;
|
|
|
|
|
Hue = hue;
|
|
|
|
|
}
|
|
|
|
|
|
2022-10-10 21:47:08 -07:00
|
|
|
[CommandProperty(AccessLevel.Counselor)]
|
|
|
|
|
public Point3D Location => m_Location;
|
2020-08-25 18:53:35 -07:00
|
|
|
|
2022-10-10 21:47:08 -07:00
|
|
|
[CommandProperty(AccessLevel.Counselor)]
|
|
|
|
|
public string Name => TileData.ItemTable[ItemID].Name;
|
2020-08-25 18:53:35 -07:00
|
|
|
|
2022-10-10 21:47:08 -07:00
|
|
|
[CommandProperty(AccessLevel.Counselor)]
|
|
|
|
|
public TileFlag Flags => TileData.ItemTable[ItemID].Flags;
|
2020-08-25 18:53:35 -07:00
|
|
|
|
2022-10-10 21:47:08 -07:00
|
|
|
[CommandProperty(AccessLevel.Counselor)]
|
|
|
|
|
public int ItemID { get; }
|
2020-08-25 18:53:35 -07:00
|
|
|
|
2022-10-10 21:47:08 -07:00
|
|
|
[CommandProperty(AccessLevel.Counselor)]
|
|
|
|
|
public int X => m_Location.X;
|
2020-08-25 18:53:35 -07:00
|
|
|
|
2022-10-10 21:47:08 -07:00
|
|
|
[CommandProperty(AccessLevel.Counselor)]
|
|
|
|
|
public int Y => m_Location.Y;
|
2020-08-25 18:53:35 -07:00
|
|
|
|
2022-10-10 21:47:08 -07:00
|
|
|
[CommandProperty(AccessLevel.Counselor)]
|
|
|
|
|
public int Z => m_Location.Z;
|
2023-01-21 11:19:11 -08:00
|
|
|
|
|
|
|
|
[CommandProperty(AccessLevel.Counselor)]
|
|
|
|
|
public int Hue { get; }
|
2020-08-25 18:53:35 -07:00
|
|
|
}
|