Adds EJ (#99)
This commit is contained in:
parent
4f75cd9251
commit
5b5bfeb4b0
12 changed files with 1696 additions and 728 deletions
|
|
@ -34,7 +34,8 @@ namespace Server
|
|||
ML,
|
||||
SA,
|
||||
HS,
|
||||
TOL
|
||||
TOL,
|
||||
EJ
|
||||
}
|
||||
|
||||
[Flags]
|
||||
|
|
@ -79,6 +80,7 @@ namespace Server
|
|||
Jungle = 0x00100000,
|
||||
Shadowguard = 0x00200000,
|
||||
TOL = 0x00400000,
|
||||
EJ = 0x00800000,
|
||||
|
||||
ExpansionNone = None,
|
||||
ExpansionT2A = T2A,
|
||||
|
|
@ -90,7 +92,8 @@ namespace Server
|
|||
ExpansionML = ExpansionSE | ML | NinthAge,
|
||||
ExpansionSA = ExpansionML | SA | Gothic | Rustic,
|
||||
ExpansionHS = ExpansionSA | HS,
|
||||
ExpansionTOL = ExpansionHS | TOL | Jungle | Shadowguard
|
||||
ExpansionTOL = ExpansionHS | TOL | Jungle | Shadowguard,
|
||||
ExpansionEJ = ExpansionTOL | EJ
|
||||
}
|
||||
|
||||
[Flags]
|
||||
|
|
@ -124,7 +127,8 @@ namespace Server
|
|||
ExpansionML = ExpansionSE | ML,
|
||||
ExpansionSA = ExpansionML,
|
||||
ExpansionHS = ExpansionSA,
|
||||
ExpansionTOL = ExpansionHS
|
||||
ExpansionTOL = ExpansionHS,
|
||||
ExpansionEJ = ExpansionTOL
|
||||
}
|
||||
|
||||
[Flags]
|
||||
|
|
@ -142,13 +146,15 @@ namespace Server
|
|||
Jungle = 0x100000,
|
||||
Shadowguard = 0x200000,
|
||||
TOL = 0x400000,
|
||||
EJ = 0x800000,
|
||||
|
||||
HousingAOS = AOS,
|
||||
HousingSE = HousingAOS | SE,
|
||||
HousingML = HousingSE | ML | Crystal,
|
||||
HousingSA = HousingML | SA | Gothic | Rustic,
|
||||
HousingHS = HousingSA | HS,
|
||||
HousingTOL = HousingHS | TOL | Jungle | Shadowguard
|
||||
HousingTOL = HousingHS | TOL | Jungle | Shadowguard,
|
||||
HousingEJ = HousingTOL | EJ
|
||||
}
|
||||
|
||||
public class ExpansionInfo
|
||||
|
|
@ -163,77 +169,96 @@ namespace Server
|
|||
ClientFlags.None,
|
||||
FeatureFlags.ExpansionNone,
|
||||
CharacterListFlags.ExpansionNone,
|
||||
HousingFlags.None),
|
||||
HousingFlags.None
|
||||
),
|
||||
new ExpansionInfo(
|
||||
1,
|
||||
"The Second Age",
|
||||
ClientFlags.Felucca,
|
||||
FeatureFlags.ExpansionT2A,
|
||||
CharacterListFlags.ExpansionT2A,
|
||||
HousingFlags.None),
|
||||
HousingFlags.None
|
||||
),
|
||||
new ExpansionInfo(
|
||||
2,
|
||||
"Renaissance",
|
||||
ClientFlags.Trammel,
|
||||
FeatureFlags.ExpansionUOR,
|
||||
CharacterListFlags.ExpansionUOR,
|
||||
HousingFlags.None),
|
||||
HousingFlags.None
|
||||
),
|
||||
new ExpansionInfo(
|
||||
3,
|
||||
"Third Dawn",
|
||||
ClientFlags.Ilshenar,
|
||||
FeatureFlags.ExpansionUOTD,
|
||||
CharacterListFlags.ExpansionUOTD,
|
||||
HousingFlags.None),
|
||||
HousingFlags.None
|
||||
),
|
||||
new ExpansionInfo(
|
||||
4,
|
||||
"Blackthorn's Revenge",
|
||||
ClientFlags.Ilshenar,
|
||||
FeatureFlags.ExpansionLBR,
|
||||
CharacterListFlags.ExpansionLBR,
|
||||
HousingFlags.None),
|
||||
HousingFlags.None
|
||||
),
|
||||
new ExpansionInfo(
|
||||
5,
|
||||
"Age of Shadows",
|
||||
ClientFlags.Malas,
|
||||
FeatureFlags.ExpansionAOS,
|
||||
CharacterListFlags.ExpansionAOS,
|
||||
HousingFlags.HousingAOS),
|
||||
HousingFlags.HousingAOS
|
||||
),
|
||||
new ExpansionInfo(
|
||||
6,
|
||||
"Samurai Empire",
|
||||
ClientFlags.Tokuno,
|
||||
FeatureFlags.ExpansionSE,
|
||||
CharacterListFlags.ExpansionSE,
|
||||
HousingFlags.HousingSE),
|
||||
HousingFlags.HousingSE
|
||||
),
|
||||
new ExpansionInfo(
|
||||
7,
|
||||
"Mondain's Legacy",
|
||||
new ClientVersion("5.0.0a"),
|
||||
FeatureFlags.ExpansionML,
|
||||
CharacterListFlags.ExpansionML,
|
||||
HousingFlags.HousingML),
|
||||
HousingFlags.HousingML
|
||||
),
|
||||
new ExpansionInfo(
|
||||
8,
|
||||
"Stygian Abyss",
|
||||
ClientFlags.TerMur,
|
||||
FeatureFlags.ExpansionSA,
|
||||
CharacterListFlags.ExpansionSA,
|
||||
HousingFlags.HousingSA),
|
||||
HousingFlags.HousingSA
|
||||
),
|
||||
new ExpansionInfo(
|
||||
9,
|
||||
"High Seas",
|
||||
new ClientVersion("7.0.9.0"),
|
||||
FeatureFlags.ExpansionHS,
|
||||
CharacterListFlags.ExpansionHS,
|
||||
HousingFlags.HousingHS),
|
||||
HousingFlags.HousingHS
|
||||
),
|
||||
new ExpansionInfo(
|
||||
10,
|
||||
"Time of Legends",
|
||||
new ClientVersion("7.0.45.65"),
|
||||
FeatureFlags.ExpansionTOL,
|
||||
CharacterListFlags.ExpansionTOL,
|
||||
HousingFlags.HousingTOL)
|
||||
HousingFlags.HousingTOL
|
||||
),
|
||||
new ExpansionInfo(
|
||||
11,
|
||||
"Endless Journey",
|
||||
new ClientVersion("7.0.61.0"),
|
||||
FeatureFlags.ExpansionEJ,
|
||||
CharacterListFlags.ExpansionEJ,
|
||||
HousingFlags.HousingEJ
|
||||
)
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -304,6 +329,7 @@ namespace Server
|
|||
Expansion.SA => FeatureFlags.ExpansionSA,
|
||||
Expansion.HS => FeatureFlags.ExpansionHS,
|
||||
Expansion.TOL => FeatureFlags.ExpansionTOL,
|
||||
Expansion.EJ => FeatureFlags.EJ,
|
||||
_ => FeatureFlags.ExpansionNone
|
||||
};
|
||||
}
|
||||
|
|
@ -321,4 +347,4 @@ namespace Server
|
|||
|
||||
public override string ToString() => Name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,6 +32,12 @@ namespace Server
|
|||
|
||||
void Delete();
|
||||
void ProcessDelta();
|
||||
|
||||
bool InRange(Point2D p, int range);
|
||||
|
||||
bool InRange(Point3D p, int range);
|
||||
|
||||
bool InRange(IPoint2D p, int range);
|
||||
}
|
||||
|
||||
public class Entity : IEntity, IComparable<Entity>
|
||||
|
|
@ -75,5 +81,23 @@ namespace Server
|
|||
public void ProcessDelta()
|
||||
{
|
||||
}
|
||||
|
||||
public bool InRange(Point2D p, int range) =>
|
||||
p.m_X >= Location.m_X - range
|
||||
&& p.m_X <= Location.m_X + range
|
||||
&& p.m_Y >= Location.m_Y - range
|
||||
&& p.m_Y <= Location.m_Y + range;
|
||||
|
||||
public bool InRange(Point3D p, int range) =>
|
||||
p.m_X >= Location.m_X - range
|
||||
&& p.m_X <= Location.m_X + range
|
||||
&& p.m_Y >= Location.m_Y - range
|
||||
&& p.m_Y <= Location.m_Y + range;
|
||||
|
||||
public bool InRange(IPoint2D p, int range) =>
|
||||
p.X >= Location.m_X - range
|
||||
&& p.X <= Location.m_X + range
|
||||
&& p.Y >= Location.m_Y - range
|
||||
&& p.Y <= Location.m_Y + range;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3762,6 +3762,26 @@ namespace Server
|
|||
|
||||
#endregion
|
||||
|
||||
#region InRange
|
||||
public virtual bool InRange(Point2D p, int range) =>
|
||||
p.m_X >= Location.m_X - range
|
||||
&& p.m_X <= Location.m_X + range
|
||||
&& p.m_Y >= Location.m_Y - range
|
||||
&& p.m_Y <= Location.m_Y + range;
|
||||
|
||||
public virtual bool InRange(Point3D p, int range) =>
|
||||
p.m_X >= Location.m_X - range
|
||||
&& p.m_X <= Location.m_X + range
|
||||
&& p.m_Y >= Location.m_Y - range
|
||||
&& p.m_Y <= Location.m_Y + range;
|
||||
|
||||
public virtual bool InRange(IPoint2D p, int range) =>
|
||||
p.X >= Location.m_X - range
|
||||
&& p.X <= Location.m_X + range
|
||||
&& p.Y >= Location.m_Y - range
|
||||
&& p.Y <= Location.m_Y + range;
|
||||
#endregion
|
||||
|
||||
#region OnDoubleClick[...]
|
||||
|
||||
public virtual void OnDoubleClick(Mobile from)
|
||||
|
|
|
|||
|
|
@ -607,6 +607,8 @@ namespace Server
|
|||
|
||||
public static bool TOL => Expansion >= Expansion.TOL;
|
||||
|
||||
public static bool EJ => Expansion >= Expansion.EJ;
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9558,25 +9558,23 @@ namespace Server
|
|||
#endregion
|
||||
|
||||
#region InRange
|
||||
public virtual bool InRange(Point2D p, int range) =>
|
||||
p.m_X >= Location.m_X - range
|
||||
&& p.m_X <= Location.m_X + range
|
||||
&& p.m_Y >= Location.m_Y - range
|
||||
&& p.m_Y <= Location.m_Y + range;
|
||||
|
||||
public bool InRange(Point2D p, int range) =>
|
||||
p.m_X >= m_Location.m_X - range
|
||||
&& p.m_X <= m_Location.m_X + range
|
||||
&& p.m_Y >= m_Location.m_Y - range
|
||||
&& p.m_Y <= m_Location.m_Y + range;
|
||||
|
||||
public bool InRange(Point3D p, int range) =>
|
||||
p.m_X >= m_Location.m_X - range
|
||||
&& p.m_X <= m_Location.m_X + range
|
||||
&& p.m_Y >= m_Location.m_Y - range
|
||||
&& p.m_Y <= m_Location.m_Y + range;
|
||||
|
||||
public bool InRange(IPoint2D p, int range) =>
|
||||
p.X >= m_Location.m_X - range
|
||||
&& p.X <= m_Location.m_X + range
|
||||
&& p.Y >= m_Location.m_Y - range
|
||||
&& p.Y <= m_Location.m_Y + range;
|
||||
public virtual bool InRange(Point3D p, int range) =>
|
||||
p.m_X >= Location.m_X - range
|
||||
&& p.m_X <= Location.m_X + range
|
||||
&& p.m_Y >= Location.m_Y - range
|
||||
&& p.m_Y <= Location.m_Y + range;
|
||||
|
||||
public virtual bool InRange(IPoint2D p, int range) =>
|
||||
p.X >= Location.m_X - range
|
||||
&& p.X <= Location.m_X + range
|
||||
&& p.Y >= Location.m_Y - range
|
||||
&& p.Y <= Location.m_Y + range;
|
||||
#endregion
|
||||
|
||||
#region OnDoubleClick[..]
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -475,22 +475,12 @@ namespace Server
|
|||
|
||||
public void Write(List<Item> list)
|
||||
{
|
||||
Write(list, false);
|
||||
WriteItemList(list);
|
||||
}
|
||||
|
||||
public void Write(List<Item> list, bool tidy)
|
||||
{
|
||||
if (tidy)
|
||||
for (int i = 0; i < list.Count;)
|
||||
if (list[i].Deleted)
|
||||
list.RemoveAt(i);
|
||||
else
|
||||
++i;
|
||||
|
||||
Write(list.Count);
|
||||
|
||||
for (int i = 0; i < list.Count; ++i)
|
||||
Write(list[i]);
|
||||
WriteItemList(list, tidy);
|
||||
}
|
||||
|
||||
public void WriteItemList<T>(List<T> list) where T : Item
|
||||
|
|
@ -502,7 +492,7 @@ namespace Server
|
|||
{
|
||||
if (tidy)
|
||||
for (int i = 0; i < list.Count;)
|
||||
if (list[i].Deleted)
|
||||
if (list[i]?.Deleted != false)
|
||||
list.RemoveAt(i);
|
||||
else
|
||||
++i;
|
||||
|
|
|
|||
|
|
@ -440,22 +440,12 @@ namespace Server
|
|||
|
||||
public void Write(List<Item> list)
|
||||
{
|
||||
Write(list, false);
|
||||
WriteItemList(list);
|
||||
}
|
||||
|
||||
public void Write(List<Item> list, bool tidy)
|
||||
{
|
||||
if (tidy)
|
||||
for (int i = 0; i < list.Count;)
|
||||
if (list[i].Deleted)
|
||||
list.RemoveAt(i);
|
||||
else
|
||||
++i;
|
||||
|
||||
Write(list.Count);
|
||||
|
||||
for (int i = 0; i < list.Count; ++i)
|
||||
Write(list[i]);
|
||||
WriteItemList(list, tidy);
|
||||
}
|
||||
|
||||
public void WriteItemList<T>(List<T> list) where T : Item
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue