This commit is contained in:
parent
e6562fda8c
commit
b2b1229fb8
6 changed files with 140 additions and 36 deletions
|
|
@ -37,18 +37,34 @@ namespace Server.Misc
|
||||||
|
|
||||||
private static CityInfo[] StartingCities = new CityInfo[]
|
private static CityInfo[] StartingCities = new CityInfo[]
|
||||||
{
|
{
|
||||||
new CityInfo( "Yew", "The Empath Abbey", 633, 858, 0 ),
|
new CityInfo( "New Haven", "New Haven Bank", 1150168, 3667, 2625, 0 ),
|
||||||
new CityInfo( "Minoc", "The Barnacle", 2476, 413, 15 ),
|
new CityInfo( "Yew", "The Empath Abbey", 1075072, 633, 858, 0 ),
|
||||||
new CityInfo( "Britain", "Sweet Dreams Inn", 1496, 1628, 10 ),
|
new CityInfo( "Minoc", "The Barnacle", 1075073, 2476, 413, 15 ),
|
||||||
new CityInfo( "Moonglow", "The Scholars Inn", 4408, 1168, 0 ),
|
new CityInfo( "Britain", "The Wayfarer's Inn", 1075074, 1602, 1591, 20 ),
|
||||||
new CityInfo( "Trinsic", "The Traveler's Inn", 1845, 2745, 0 ),
|
new CityInfo( "Moonglow", "The Scholars Inn", 1075075, 4408, 1168, 0 ),
|
||||||
new CityInfo( "Magincia", "The Great Horns Tavern", 3734, 2222, 20 ),
|
new CityInfo( "Trinsic", "The Traveler's Inn", 1075076, 1845, 2745, 0 ),
|
||||||
new CityInfo( "Jhelom", "The Mercenary Inn", 1374, 3826, 0 ),
|
new CityInfo( "Jhelom", "The Mercenary Inn", 1075078, 1374, 3826, 0 ),
|
||||||
new CityInfo( "Skara Brae", "The Falconer's Inn", 618, 2234, 0 ),
|
new CityInfo( "Skara Brae", "The Falconer's Inn", 1075079, 618, 2234, 0 ),
|
||||||
new CityInfo( "Vesper", "The Ironwood Inn", 2771, 976, 0 ),
|
new CityInfo( "Vesper", "The Ironwood Inn", 1075080, 2771, 976, 0 )
|
||||||
new CityInfo( "Haven", "Buckler's Hideaway", 3667, 2625, 0 )
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* Old Haven/Magincia Locations
|
||||||
|
new CityInfo( "Britain", "Sweet Dreams Inn", 1496, 1628, 10 );
|
||||||
|
// ..
|
||||||
|
// Trinsic
|
||||||
|
new CityInfo( "Magincia", "The Great Horns Tavern", 3734, 2222, 20 ),
|
||||||
|
// Jhelom
|
||||||
|
// ..
|
||||||
|
new CityInfo( "Haven", "Buckler's Hideaway", 3667, 2625, 0 )
|
||||||
|
|
||||||
|
if ( Core.AOS )
|
||||||
|
{
|
||||||
|
//CityInfo haven = new CityInfo( "Haven", "Uzeraan's Mansion", 3618, 2591, 0 );
|
||||||
|
CityInfo haven = new CityInfo( "Haven", "Uzeraan's Mansion", 3503, 2574, 14 );
|
||||||
|
StartingCities[StartingCities.Length - 1] = haven;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
private static bool PasswordCommandEnabled = false;
|
private static bool PasswordCommandEnabled = false;
|
||||||
|
|
||||||
public static void Initialize()
|
public static void Initialize()
|
||||||
|
|
@ -59,13 +75,6 @@ namespace Server.Misc
|
||||||
|
|
||||||
if ( PasswordCommandEnabled )
|
if ( PasswordCommandEnabled )
|
||||||
CommandSystem.Register( "Password", AccessLevel.Player, new CommandEventHandler( Password_OnCommand ) );
|
CommandSystem.Register( "Password", AccessLevel.Player, new CommandEventHandler( Password_OnCommand ) );
|
||||||
|
|
||||||
if ( Core.AOS )
|
|
||||||
{
|
|
||||||
//CityInfo haven = new CityInfo( "Haven", "Uzeraan's Mansion", 3618, 2591, 0 );
|
|
||||||
CityInfo haven = new CityInfo( "Haven", "Uzeraan's Mansion", 3503, 2574, 14 );
|
|
||||||
StartingCities[StartingCities.Length - 1] = haven;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[Usage( "Password <newPassword> <repeatPassword>" )]
|
[Usage( "Password <newPassword> <repeatPassword>" )]
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,8 @@ namespace Server.Items
|
||||||
{
|
{
|
||||||
public static void Initialize()
|
public static void Initialize()
|
||||||
{
|
{
|
||||||
TileData.ItemTable[0x2199].Flags = TileFlag.Wall | TileFlag.NoShoot;
|
TileData.ItemTable[0x21A2].Flags = TileFlag.Wall | TileFlag.NoShoot;
|
||||||
TileData.ItemTable[0x2199].Height = 20;
|
TileData.ItemTable[0x21A2].Height = 20;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override string DefaultName
|
public override string DefaultName
|
||||||
|
|
@ -18,7 +18,7 @@ namespace Server.Items
|
||||||
}
|
}
|
||||||
|
|
||||||
[Constructable]
|
[Constructable]
|
||||||
public LOSBlocker() : base( 0x2199 )
|
public LOSBlocker() : base( 0x21A2 )
|
||||||
{
|
{
|
||||||
Movable = false;
|
Movable = false;
|
||||||
}
|
}
|
||||||
|
|
@ -41,7 +41,7 @@ namespace Server.Items
|
||||||
{
|
{
|
||||||
base.Serialize( writer );
|
base.Serialize( writer );
|
||||||
|
|
||||||
writer.Write( (int) 0 );
|
writer.Write( (int) 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Deserialize( GenericReader reader )
|
public override void Deserialize( GenericReader reader )
|
||||||
|
|
@ -49,6 +49,9 @@ namespace Server.Items
|
||||||
base.Deserialize( reader );
|
base.Deserialize( reader );
|
||||||
|
|
||||||
int version = reader.ReadInt();
|
int version = reader.ReadInt();
|
||||||
|
|
||||||
|
if ( version < 1 && ItemID == 0x2199 )
|
||||||
|
this.ItemID = 0x21A2;
|
||||||
}
|
}
|
||||||
|
|
||||||
public sealed class GMItemPacket : Packet
|
public sealed class GMItemPacket : Packet
|
||||||
|
|
|
||||||
|
|
@ -692,7 +692,6 @@ namespace Server.Misc
|
||||||
}
|
}
|
||||||
|
|
||||||
CityInfo city = GetStartLocation( args, young );
|
CityInfo city = GetStartLocation( args, young );
|
||||||
//CityInfo city = new CityInfo( "Britain", "Sweet Dreams Inn", 1496, 1628, 10, Map.Felucca );
|
|
||||||
|
|
||||||
newChar.MoveToWorld( city.Location, city.Map );
|
newChar.MoveToWorld( city.Location, city.Map );
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -165,7 +165,9 @@ namespace Server.Network {
|
||||||
set {
|
set {
|
||||||
m_Version = value;
|
m_Version = value;
|
||||||
|
|
||||||
if ( value >= m_Version7090 ) {
|
if ( value >= m_Version70130 ) {
|
||||||
|
_ProtocolChanges = ProtocolChanges.Version70130;
|
||||||
|
} else if ( value >= m_Version7090 ) {
|
||||||
_ProtocolChanges = ProtocolChanges.Version7090;
|
_ProtocolChanges = ProtocolChanges.Version7090;
|
||||||
} else if ( value >= m_Version7000 ) {
|
} else if ( value >= m_Version7000 ) {
|
||||||
_ProtocolChanges = ProtocolChanges.Version7000;
|
_ProtocolChanges = ProtocolChanges.Version7000;
|
||||||
|
|
@ -196,6 +198,7 @@ namespace Server.Network {
|
||||||
private static ClientVersion m_Version60142 = new ClientVersion( "6.0.14.2" );
|
private static ClientVersion m_Version60142 = new ClientVersion( "6.0.14.2" );
|
||||||
private static ClientVersion m_Version7000 = new ClientVersion( "7.0.0.0" );
|
private static ClientVersion m_Version7000 = new ClientVersion( "7.0.0.0" );
|
||||||
private static ClientVersion m_Version7090 = new ClientVersion( "7.0.9.0" );
|
private static ClientVersion m_Version7090 = new ClientVersion( "7.0.9.0" );
|
||||||
|
private static ClientVersion m_Version70130 = new ClientVersion( "7.0.13.0" );
|
||||||
|
|
||||||
private ProtocolChanges _ProtocolChanges;
|
private ProtocolChanges _ProtocolChanges;
|
||||||
|
|
||||||
|
|
@ -209,6 +212,7 @@ namespace Server.Network {
|
||||||
ExtendedSupportedFeatures = 0x00000040,
|
ExtendedSupportedFeatures = 0x00000040,
|
||||||
StygianAbyss = 0x00000080,
|
StygianAbyss = 0x00000080,
|
||||||
HighSeas = 0x00000100,
|
HighSeas = 0x00000100,
|
||||||
|
NewCharacterList = 0x00000200,
|
||||||
|
|
||||||
Version400a = NewSpellbook,
|
Version400a = NewSpellbook,
|
||||||
Version407a = Version400a | DamagePacket,
|
Version407a = Version400a | DamagePacket,
|
||||||
|
|
@ -218,7 +222,8 @@ namespace Server.Network {
|
||||||
Version6017 = Version6000 | ContainerGridLines,
|
Version6017 = Version6000 | ContainerGridLines,
|
||||||
Version60142 = Version6017 | ExtendedSupportedFeatures,
|
Version60142 = Version6017 | ExtendedSupportedFeatures,
|
||||||
Version7000 = Version60142 | StygianAbyss,
|
Version7000 = Version60142 | StygianAbyss,
|
||||||
Version7090 = Version7000 | HighSeas
|
Version7090 = Version7000 | HighSeas,
|
||||||
|
Version70130 = Version7090 | NewCharacterList
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool NewSpellbook { get { return ((_ProtocolChanges & ProtocolChanges.NewSpellbook) != 0); } }
|
public bool NewSpellbook { get { return ((_ProtocolChanges & ProtocolChanges.NewSpellbook) != 0); } }
|
||||||
|
|
@ -230,6 +235,7 @@ namespace Server.Network {
|
||||||
public bool ExtendedSupportedFeatures { get { return ((_ProtocolChanges & ProtocolChanges.ExtendedSupportedFeatures) != 0); } }
|
public bool ExtendedSupportedFeatures { get { return ((_ProtocolChanges & ProtocolChanges.ExtendedSupportedFeatures) != 0); } }
|
||||||
public bool StygianAbyss { get { return ((_ProtocolChanges & ProtocolChanges.StygianAbyss) != 0); } }
|
public bool StygianAbyss { get { return ((_ProtocolChanges & ProtocolChanges.StygianAbyss) != 0); } }
|
||||||
public bool HighSeas { get { return ((_ProtocolChanges & ProtocolChanges.HighSeas) != 0); } }
|
public bool HighSeas { get { return ((_ProtocolChanges & ProtocolChanges.HighSeas) != 0); } }
|
||||||
|
public bool NewCharacterList { get { return ((_ProtocolChanges & ProtocolChanges.NewCharacterList) != 0); } }
|
||||||
|
|
||||||
public bool IsUOTDClient {
|
public bool IsUOTDClient {
|
||||||
get {
|
get {
|
||||||
|
|
|
||||||
|
|
@ -2262,7 +2262,11 @@ namespace Server.Network
|
||||||
|
|
||||||
state.Send( SupportedFeatures.Instantiate( state ) );
|
state.Send( SupportedFeatures.Instantiate( state ) );
|
||||||
|
|
||||||
state.Send( new CharacterList( state.Account, state.CityInfo ) );
|
if ( state.NewCharacterList ) {
|
||||||
|
state.Send( new CharacterList( state.Account, state.CityInfo ) );
|
||||||
|
} else {
|
||||||
|
state.Send( new CharacterListOld( state.Account, state.CityInfo ) );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -3579,18 +3579,28 @@ namespace Server.Network
|
||||||
{
|
{
|
||||||
private string m_City;
|
private string m_City;
|
||||||
private string m_Building;
|
private string m_Building;
|
||||||
|
private int m_Description;
|
||||||
private Point3D m_Location;
|
private Point3D m_Location;
|
||||||
private Map m_Map;
|
private Map m_Map;
|
||||||
|
|
||||||
public CityInfo( string city, string building, int x, int y, int z, Map m )
|
public CityInfo( string city, string building, int description, int x, int y, int z, Map m )
|
||||||
{
|
{
|
||||||
m_City = city;
|
m_City = city;
|
||||||
m_Building = building;
|
m_Building = building;
|
||||||
|
m_Description = description;
|
||||||
m_Location = new Point3D( x, y, z );
|
m_Location = new Point3D( x, y, z );
|
||||||
m_Map = m;
|
m_Map = m;
|
||||||
}
|
}
|
||||||
|
|
||||||
public CityInfo( string city, string building, int x, int y, int z ) : this( city, building, x, y, z, Map.Trammel )
|
public CityInfo( string city, string building, int x, int y, int z, Map m ) : this( city, building, 0, x, y, z, m )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public CityInfo( string city, string building, int description, int x, int y, int z ) : this( city, building, description, x, y, z, Map.Trammel )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public CityInfo( string city, string building, int x, int y, int z ) : this( city, building, 0, x, y, z, Map.Trammel )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -3618,6 +3628,18 @@ namespace Server.Network
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int Description
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return m_Description;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
m_Description = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public int X
|
public int X
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
|
@ -3711,6 +3733,75 @@ namespace Server.Network
|
||||||
public sealed class CharacterList : Packet
|
public sealed class CharacterList : Packet
|
||||||
{
|
{
|
||||||
public CharacterList( IAccount a, CityInfo[] info ) : base( 0xA9 )
|
public CharacterList( IAccount a, CityInfo[] info ) : base( 0xA9 )
|
||||||
|
{
|
||||||
|
this.EnsureCapacity( 11 + (a.Length * 60) + (info.Length * 89) );
|
||||||
|
|
||||||
|
int highSlot = -1;
|
||||||
|
|
||||||
|
for ( int i = 0; i < a.Length; ++i )
|
||||||
|
{
|
||||||
|
if ( a[i] != null )
|
||||||
|
highSlot = i;
|
||||||
|
}
|
||||||
|
|
||||||
|
int count = Math.Max( Math.Max( highSlot + 1, a.Limit ), 5 );
|
||||||
|
|
||||||
|
m_Stream.Write( (byte) count );
|
||||||
|
|
||||||
|
for ( int i = 0; i < count; ++i )
|
||||||
|
{
|
||||||
|
if ( a[i] != null )
|
||||||
|
{
|
||||||
|
m_Stream.WriteAsciiFixed( a[i].Name, 30 );
|
||||||
|
m_Stream.Fill( 30 ); // password
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_Stream.Fill( 60 );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
m_Stream.Write( (byte) info.Length );
|
||||||
|
|
||||||
|
for ( int i = 0; i < info.Length; ++i )
|
||||||
|
{
|
||||||
|
CityInfo ci = info[i];
|
||||||
|
|
||||||
|
m_Stream.Write( (byte) i );
|
||||||
|
m_Stream.WriteAsciiFixed( ci.City, 32 );
|
||||||
|
m_Stream.WriteAsciiFixed( ci.Building, 32 );
|
||||||
|
m_Stream.Write( (int) ci.X );
|
||||||
|
m_Stream.Write( (int) ci.Y );
|
||||||
|
m_Stream.Write( (int) ci.Z );
|
||||||
|
m_Stream.Write( (int) ci.Map.MapID );
|
||||||
|
m_Stream.Write( (int) ci.Description );
|
||||||
|
m_Stream.Write( (int) 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
CharacterListFlags flags = ExpansionInfo.CurrentExpansion.CharacterListFlags;
|
||||||
|
|
||||||
|
if ( count > 6 )
|
||||||
|
flags |= (CharacterListFlags.SeventhCharacterSlot | CharacterListFlags.SixthCharacterSlot); // 7th Character Slot - TODO: Is SixthCharacterSlot Required?
|
||||||
|
else if ( count == 6 )
|
||||||
|
flags |= CharacterListFlags.SixthCharacterSlot; // 6th Character Slot
|
||||||
|
else if ( a.Limit == 1 )
|
||||||
|
flags |= (CharacterListFlags.SlotLimit & CharacterListFlags.OneCharacterSlot); // Limit Characters & One Character
|
||||||
|
|
||||||
|
m_Stream.Write( (int)(flags | m_AdditionalFlags) ); // Additional Flags
|
||||||
|
}
|
||||||
|
|
||||||
|
private static CharacterListFlags m_AdditionalFlags;
|
||||||
|
|
||||||
|
public static CharacterListFlags AdditionalFlags
|
||||||
|
{
|
||||||
|
get{ return m_AdditionalFlags; }
|
||||||
|
set{ m_AdditionalFlags = value; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public sealed class CharacterListOld : Packet
|
||||||
|
{
|
||||||
|
public CharacterListOld( IAccount a, CityInfo[] info ) : base( 0xA9 )
|
||||||
{
|
{
|
||||||
this.EnsureCapacity( 9 + (a.Length * 60) + (info.Length * 63) );
|
this.EnsureCapacity( 9 + (a.Length * 60) + (info.Length * 63) );
|
||||||
|
|
||||||
|
|
@ -3759,15 +3850,7 @@ namespace Server.Network
|
||||||
else if ( a.Limit == 1 )
|
else if ( a.Limit == 1 )
|
||||||
flags |= (CharacterListFlags.SlotLimit & CharacterListFlags.OneCharacterSlot); // Limit Characters & One Character
|
flags |= (CharacterListFlags.SlotLimit & CharacterListFlags.OneCharacterSlot); // Limit Characters & One Character
|
||||||
|
|
||||||
m_Stream.Write( (int)(flags | m_AdditionalFlags) ); // Additional Flags
|
m_Stream.Write( (int)(flags | CharacterList.AdditionalFlags) ); // Additional Flags
|
||||||
}
|
|
||||||
|
|
||||||
private static CharacterListFlags m_AdditionalFlags;
|
|
||||||
|
|
||||||
public static CharacterListFlags AdditionalFlags
|
|
||||||
{
|
|
||||||
get{ return m_AdditionalFlags; }
|
|
||||||
set{ m_AdditionalFlags = value; }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue