+ RunUO 2.7 with initial TOL expansion support.
This commit is contained in:
parent
64272798c3
commit
7af0579875
41 changed files with 3181 additions and 499 deletions
|
|
@ -165,7 +165,9 @@ namespace Server.Network {
|
|||
set {
|
||||
m_Version = value;
|
||||
|
||||
if ( value >= m_Version70331 ) {
|
||||
if ( value >= m_Version704565 ) {
|
||||
_ProtocolChanges = ProtocolChanges.Version704565;
|
||||
} else if ( value >= m_Version70331 ) {
|
||||
_ProtocolChanges = ProtocolChanges.Version70331;
|
||||
} else if ( value >= m_Version70300 ) {
|
||||
_ProtocolChanges = ProtocolChanges.Version70300;
|
||||
|
|
@ -208,6 +210,7 @@ namespace Server.Network {
|
|||
private static ClientVersion m_Version70160 = new ClientVersion( "7.0.16.0" );
|
||||
private static ClientVersion m_Version70300 = new ClientVersion( "7.0.30.0" );
|
||||
private static ClientVersion m_Version70331 = new ClientVersion( "7.0.33.1" );
|
||||
private static ClientVersion m_Version704565 = new ClientVersion( "7.0.45.65" );
|
||||
|
||||
private ProtocolChanges _ProtocolChanges;
|
||||
|
||||
|
|
@ -225,6 +228,7 @@ namespace Server.Network {
|
|||
NewCharacterCreation = 0x00000400,
|
||||
ExtendedStatus = 0x00000800,
|
||||
NewMobileIncoming = 0x00001000,
|
||||
NewSecureTrading = 0x00002000,
|
||||
|
||||
Version400a = NewSpellbook,
|
||||
Version407a = Version400a | DamagePacket,
|
||||
|
|
@ -238,7 +242,8 @@ namespace Server.Network {
|
|||
Version70130 = Version7090 | NewCharacterList,
|
||||
Version70160 = Version70130 | NewCharacterCreation,
|
||||
Version70300 = Version70160 | ExtendedStatus,
|
||||
Version70331 = Version70300 | NewMobileIncoming
|
||||
Version70331 = Version70300 | NewMobileIncoming,
|
||||
Version704565 = Version70331 | NewSecureTrading
|
||||
}
|
||||
|
||||
public bool NewSpellbook { get { return ((_ProtocolChanges & ProtocolChanges.NewSpellbook) != 0); } }
|
||||
|
|
@ -254,6 +259,7 @@ namespace Server.Network {
|
|||
public bool NewCharacterCreation { get { return ((_ProtocolChanges & ProtocolChanges.NewCharacterCreation) != 0); } }
|
||||
public bool ExtendedStatus { get { return ((_ProtocolChanges & ProtocolChanges.ExtendedStatus) != 0); } }
|
||||
public bool NewMobileIncoming { get { return ((_ProtocolChanges & ProtocolChanges.NewMobileIncoming) != 0); } }
|
||||
public bool NewSecureTrading { get { return ((_ProtocolChanges & ProtocolChanges.NewSecureTrading) != 0); } }
|
||||
|
||||
public bool IsUOTDClient {
|
||||
get {
|
||||
|
|
|
|||
|
|
@ -376,6 +376,37 @@ namespace Server.Network
|
|||
|
||||
break;
|
||||
}
|
||||
case 3: // Update Gold
|
||||
{
|
||||
Serial serial = pvSrc.ReadInt32();
|
||||
|
||||
SecureTradeContainer cont = World.FindItem(serial) as SecureTradeContainer;
|
||||
|
||||
if (cont != null)
|
||||
{
|
||||
int gold = pvSrc.ReadInt32();
|
||||
int plat = pvSrc.ReadInt32();
|
||||
|
||||
SecureTrade trade = cont.Trade;
|
||||
|
||||
if (trade != null)
|
||||
{
|
||||
if (trade.From.Mobile == state.Mobile)
|
||||
{
|
||||
trade.From.Gold = gold;
|
||||
trade.From.Plat = plat;
|
||||
trade.UpdateFromCurrency();
|
||||
}
|
||||
else if (trade.To.Mobile == state.Mobile)
|
||||
{
|
||||
trade.To.Gold = gold;
|
||||
trade.To.Plat = plat;
|
||||
trade.UpdateToCurrency();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -162,44 +162,62 @@ namespace Server.Network
|
|||
|
||||
public sealed class DisplaySecureTrade : Packet
|
||||
{
|
||||
public DisplaySecureTrade( Mobile them, Container first, Container second, string name ) : base( 0x6F )
|
||||
public DisplaySecureTrade(Mobile them, Container first, Container second, string name)
|
||||
: base(0x6F)
|
||||
{
|
||||
if ( name == null )
|
||||
if (name == null)
|
||||
{
|
||||
name = "";
|
||||
}
|
||||
|
||||
EnsureCapacity( 18 + name.Length );
|
||||
EnsureCapacity(18 + name.Length);
|
||||
|
||||
m_Stream.Write( (byte) 0 ); // Display
|
||||
m_Stream.Write( (int) them.Serial );
|
||||
m_Stream.Write( (int) first.Serial );
|
||||
m_Stream.Write( (int) second.Serial );
|
||||
m_Stream.Write( (bool) true );
|
||||
m_Stream.Write((byte)0); // Display
|
||||
m_Stream.Write(them.Serial);
|
||||
m_Stream.Write(first.Serial);
|
||||
m_Stream.Write(second.Serial);
|
||||
m_Stream.Write(true);
|
||||
|
||||
m_Stream.WriteAsciiFixed( name, 30 );
|
||||
m_Stream.WriteAsciiFixed(name, 30);
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class CloseSecureTrade : Packet
|
||||
{
|
||||
public CloseSecureTrade( Container cont ) : base( 0x6F )
|
||||
public CloseSecureTrade(Container cont)
|
||||
: base(0x6F)
|
||||
{
|
||||
EnsureCapacity( 8 );
|
||||
EnsureCapacity(8);
|
||||
|
||||
m_Stream.Write( (byte) 1 ); // Close
|
||||
m_Stream.Write( (int) cont.Serial );
|
||||
m_Stream.Write((byte)1); // Close
|
||||
m_Stream.Write(cont.Serial);
|
||||
}
|
||||
}
|
||||
|
||||
public enum TradeFlag : byte
|
||||
{
|
||||
Display = 0x0,
|
||||
Close = 0x1,
|
||||
Update = 0x2,
|
||||
UpdateGold = 0x3,
|
||||
UpdateLedger = 0x4
|
||||
}
|
||||
|
||||
public sealed class UpdateSecureTrade : Packet
|
||||
{
|
||||
public UpdateSecureTrade( Container cont, bool first, bool second ) : base( 0x6F )
|
||||
{
|
||||
EnsureCapacity( 8 );
|
||||
public UpdateSecureTrade(Container cont, bool first, bool second)
|
||||
: this(cont, TradeFlag.Update, first ? 1 : 0, second ? 1 : 0)
|
||||
{ }
|
||||
|
||||
m_Stream.Write( (byte) 2 ); // Update
|
||||
m_Stream.Write( (int) cont.Serial );
|
||||
m_Stream.Write( (int) (first ? 1 : 0) );
|
||||
m_Stream.Write( (int) (second ? 1 : 0) );
|
||||
public UpdateSecureTrade(Container cont, TradeFlag flag, int first, int second)
|
||||
: base(0x6F)
|
||||
{
|
||||
EnsureCapacity(17);
|
||||
|
||||
m_Stream.Write((byte)flag);
|
||||
m_Stream.Write(cont.Serial);
|
||||
m_Stream.Write(first);
|
||||
m_Stream.Write(second);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2822,7 +2840,7 @@ namespace Server.Network
|
|||
|
||||
public SupportedFeatures( NetState ns ) : base( 0xB9, ns.ExtendedSupportedFeatures ? 5 : 3 )
|
||||
{
|
||||
FeatureFlags flags = ExpansionInfo.CurrentExpansion.SupportedFeatures;
|
||||
FeatureFlags flags = ExpansionInfo.CoreExpansion.SupportedFeatures;
|
||||
|
||||
flags |= m_AdditionalFlags;
|
||||
|
||||
|
|
@ -4142,7 +4160,7 @@ namespace Server.Network
|
|||
m_Stream.Write( (int) 0 );
|
||||
}
|
||||
|
||||
CharacterListFlags flags = ExpansionInfo.CurrentExpansion.CharacterListFlags;
|
||||
CharacterListFlags flags = ExpansionInfo.CoreExpansion.CharacterListFlags;
|
||||
|
||||
if ( count > 6 )
|
||||
flags |= (CharacterListFlags.SeventhCharacterSlot | CharacterListFlags.SixthCharacterSlot); // 7th Character Slot - TODO: Is SixthCharacterSlot Required?
|
||||
|
|
@ -4237,7 +4255,7 @@ namespace Server.Network
|
|||
m_Stream.WriteAsciiFixed( ci.Building, 31 );
|
||||
}
|
||||
|
||||
CharacterListFlags flags = ExpansionInfo.CurrentExpansion.CharacterListFlags;
|
||||
CharacterListFlags flags = ExpansionInfo.CoreExpansion.CharacterListFlags;
|
||||
|
||||
if ( count > 6 )
|
||||
flags |= (CharacterListFlags.SeventhCharacterSlot | CharacterListFlags.SixthCharacterSlot); // 7th Character Slot - TODO: Is SixthCharacterSlot Required?
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue