Go Back   RunUO - Ultima Online Emulation > RunUO > Core Modifications > Network Modifications

Network Modifications This forum is for modifications to the networking code of RunUO

Reply
 
Thread Tools Display Modes
Old 07-23-2007, 12:21 PM   #51 (permalink)
Account Terminated
 
Join Date: May 2007
Age: 32
Posts: 41
Default

Quote:
Originally Posted by Lumberman View Post
Yeah for 6.0.1.7 Client :-),

but it doesn't work with clients <= 6.0.1.6 :-(

Code:
Exception:
System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
   bei Server.Misc.ClientVerification.EventSink_ClientVersionRecieved(ClientVersionRecievedArgs e)
   bei Server.ClientVersionRecievedHandler.Invoke(ClientVersionRecievedArgs e)
   bei Server.EventSink.InvokeClientVersionRecieved(ClientVersionRecievedArgs e) in c:\RunUO_MM\Server.KR\EventSink.cs:Zeile 840.
   bei Server.Network.PacketHandlers.ClientVersion(NetState state, PacketReader pvSrc) in c:\RunUO_MM\Server.KR\Network\PacketHandlers.cs:Zeile 1764.
   bei Server.Network.MessagePump.HandleReceive(NetState ns) in c:\RunUO_MM\Server.KR\Network\MessagePump.cs:Zeile 254.
   bei Server.Network.MessagePump.Slice() in c:\RunUO_MM\Server.KR\Network\MessagePump.cs:Zeile 109.
   bei Server.Core.Main(String[] args) in c:\RunUO_MM\Server.KR\Main.cs:Zeile 459.
after character selection...

Have anybody a hint or solution to me?
i think you need this to fix that:

ClientVerification.cs
Code:
		private static void EventSink_ClientVersionRecieved( ClientVersionRecievedArgs e )
		{
			// new 6017 support
			if ( e == null || e.State == null || e.State.Mobile == null )
				return;
Konstantin Andry is offline   Reply With Quote
Old 07-23-2007, 01:47 PM   #52 (permalink)
Forum Newbie
 
Join Date: Oct 2002
Posts: 18
Default

You are welcome, a credit would be appreciated too.

Just so you know, you don't need to block packets from the client, just hold off setting the netstate property of the mobile will do the trick - move the last portion of 0x5D handler into a timer loop, like so:

Code:
public static void DelayLoginProcess(NetState state, Mobile m, int flags)
{
   if ( state.ClientVersion != null /* If UOKR is supported, test here */ )
   {
       Timer.DelayCall( TimeSpan.FromSeconds(0.1), delegate()
       {
           DelayLoginProcess(state, m, flags);
       });
   }
   else
   {
       // do the login process here
   }
}
Then just send ClientVersionReq and then call this method to wait for the reply.

Also, people with BuffInfo support might have their 0xBD packet handler overwritten, you might want to remove that as well.

Regards,

PQ
pmouse is offline   Reply With Quote
Old 07-23-2007, 02:23 PM   #53 (permalink)
Forum Newbie
 
Join Date: Jan 2004
Posts: 16
Default

Quote:
Originally Posted by Konstantin Andry View Post
i think you need this to fix that:

ClientVerification.cs
Code:
		private static void EventSink_ClientVersionRecieved( ClientVersionRecievedArgs e )
		{
			// new 6017 support
			if ( e == null || e.State == null || e.State.Mobile == null )
				return;
Yes, that work for me and client <= 6.0.1.6!

Many thanks to Kamron and all others here!
Lumberman is offline   Reply With Quote
Old 07-23-2007, 03:30 PM   #54 (permalink)
Newbie
 
Join Date: Jun 2006
Posts: 94
Default

Hold on, I will make updates to the included files and the thread to reflect these changes.

EDIT: I don't see how the BuffIcon would affect things...

Code:
			if( Enabled )
			{
				EventSink.ClientVersionReceived += new ClientVersionReceivedHandler( delegate( ClientVersionReceivedArgs args )
				{
					PlayerMobile pm = args.State.Mobile as PlayerMobile;
					
					if( pm != null )
						Timer.DelayCall( TimeSpan.Zero, pm.ResendBuffs );
				} );
			}
This code would simply exit... since PlayerMobile would be null.
Is there a chance that args.State could be null?
__________________
Record for the sentence that makes the least sense - Go HERE

Last edited by Kamron; 07-23-2007 at 03:59 PM.
Kamron is offline   Reply With Quote
Old 07-23-2007, 03:51 PM   #55 (permalink)
Newbie
 
Join Date: Jun 2006
Posts: 94
Default

Okay, thank you guys for finding those problems. I just updated the included files.

Item.cs Serialization:

Code:
		public virtual void Serialize( GenericWriter writer )
		{
			writer.Write( 9 ); // version

			SaveFlag flags = SaveFlag.None;

			int x = m_Location.m_X, y = m_Location.m_Y, z = m_Location.m_Z;

			if ( x != 0 || y != 0 || z != 0 )
			{
				if ( x >= short.MinValue && x <= short.MaxValue && y >= short.MinValue && y <= short.MaxValue && z >= sbyte.MinValue && z <= sbyte.MaxValue )
				{
					if ( x != 0 || y != 0 )
					{
						if ( x >= byte.MinValue && x <= byte.MaxValue && y >= byte.MinValue && y <= byte.MaxValue )
							flags |= SaveFlag.LocationByteXY;
						else
							flags |= SaveFlag.LocationShortXY;
					}

					if ( z != 0 )
						flags |= SaveFlag.LocationSByteZ;
				}
				else
				{
					flags |= SaveFlag.LocationFull;
				}
			}

			CompactInfo info = LookupCompactInfo();
			List<Item> items = LookupItems();

			if ( m_GridLocation > 0 )
				flags |= SaveFlag.GridLocation;
			if ( m_Direction != Direction.North )
				flags |= SaveFlag.Direction;
			if ( info != null && info.m_Bounce != null )
				flags |= SaveFlag.Bounce;
			if ( m_LootType != LootType.Regular )
				flags |= SaveFlag.LootType;
			if ( m_ItemID != 0 )
				flags |= SaveFlag.ItemID;
			if ( m_Hue != 0 )
				flags |= SaveFlag.Hue;
			if ( m_Amount != 1 )
				flags |= SaveFlag.Amount;
			if ( m_Layer != Layer.Invalid )
				flags |= SaveFlag.Layer;
			if ( info != null && info.m_Name != null )
				flags |= SaveFlag.Name;
			if ( m_Parent != null )
				flags |= SaveFlag.Parent;
			if ( items != null && items.Count > 0 )
				flags |= SaveFlag.Items;
			if ( m_Map != Map.Internal )
				flags |= SaveFlag.Map;
			//if ( m_InsuredFor != null && !m_InsuredFor.Deleted )
				//flags |= SaveFlag.InsuredFor;
			if ( info != null && info.m_BlessedFor != null && !info.m_BlessedFor.Deleted )
				flags |= SaveFlag.BlessedFor;
			if ( info != null && info.m_HeldBy != null && !info.m_HeldBy.Deleted )
				flags |= SaveFlag.HeldBy;
			if ( info != null && info.m_SavedFlags != 0 )
				flags |= SaveFlag.SavedFlags;

			if ( info == null || info.m_Weight == -1 )
			{
				flags |= SaveFlag.NullWeight;
			}
			else
			{
				if ( info.m_Weight == 0.0 )
				{
					flags |= SaveFlag.WeightIs0;
				}
				else if ( info.m_Weight != 1.0 )
				{
					if ( info.m_Weight == (int) info.m_Weight )
						flags |= SaveFlag.IntWeight;
					else
						flags |= SaveFlag.WeightNot1or0;
				}
			}

			ImplFlag implFlags = ( m_Flags & ( ImplFlag.Visible | ImplFlag.Movable | ImplFlag.Stackable | ImplFlag.Insured | ImplFlag.PayedInsurance | ImplFlag.QuestItem ) );

			if ( implFlags != ( ImplFlag.Visible | ImplFlag.Movable ) )
				flags |= SaveFlag.ImplFlags;

			writer.Write( (int) flags );

			/* begin last moved time optimization */
			long ticks = m_LastMovedTime.Ticks;
			long now = DateTime.Now.Ticks;

			TimeSpan d;

			try { d = new TimeSpan( ticks - now ); }
			catch { if ( ticks < now ) d = TimeSpan.MaxValue; else d = TimeSpan.MaxValue; }

			double minutes = -d.TotalMinutes;

			if ( minutes < int.MinValue )
				minutes = int.MinValue;
			else if ( minutes > int.MaxValue )
				minutes = int.MaxValue;

			writer.WriteEncodedInt( (int) minutes );
			/* end */

			if ( GetSaveFlag( flags, SaveFlag.GridLocation ) )
				writer.Write( (byte) m_GridLocation );

			if ( GetSaveFlag( flags, SaveFlag.Direction ) )
				writer.Write( (byte) m_Direction );

			if ( GetSaveFlag( flags, SaveFlag.Bounce ) )
				BounceInfo.Serialize( info.m_Bounce, writer );

			if ( GetSaveFlag( flags, SaveFlag.LootType ) )
				writer.Write( (byte) m_LootType );

			if ( GetSaveFlag( flags, SaveFlag.LocationFull ) )
			{
				writer.WriteEncodedInt( x );
				writer.WriteEncodedInt( y );
				writer.WriteEncodedInt( z );
			}
			else
			{
				if ( GetSaveFlag( flags, SaveFlag.LocationByteXY ) )
				{
					writer.Write( (byte) x );
					writer.Write( (byte) y );
				}
				else if ( GetSaveFlag( flags, SaveFlag.LocationShortXY ) )
				{
					writer.Write( (short) x );
					writer.Write( (short) y );
				}

				if ( GetSaveFlag( flags, SaveFlag.LocationSByteZ ) )
					writer.Write( (sbyte) z );
			}

			if ( GetSaveFlag( flags, SaveFlag.ItemID ) )
				writer.WriteEncodedInt( (int) m_ItemID );

			if ( GetSaveFlag( flags, SaveFlag.Hue ) )
				writer.WriteEncodedInt( (int) m_Hue );

			if ( GetSaveFlag( flags, SaveFlag.Amount ) )
				writer.WriteEncodedInt( (int) m_Amount );

			if ( GetSaveFlag( flags, SaveFlag.Layer ) )
				writer.Write( (byte) m_Layer );

			if ( GetSaveFlag( flags, SaveFlag.Name ) )
				writer.Write( (string) info.m_Name );

			if ( GetSaveFlag( flags, SaveFlag.Parent ) )
			{
				if ( m_Parent is Mobile && !( (Mobile) m_Parent ).Deleted )
					writer.Write( ( (Mobile) m_Parent ).Serial );
				else if ( m_Parent is Item && !( (Item) m_Parent ).Deleted )
					writer.Write( ( (Item) m_Parent ).Serial );
				else
					writer.Write( (int) Serial.MinusOne );
			}

			if ( GetSaveFlag( flags, SaveFlag.Items ) )
				writer.Write( items, false );

			if ( GetSaveFlag( flags, SaveFlag.IntWeight ) )
				writer.WriteEncodedInt( (int) info.m_Weight );
			else if ( GetSaveFlag( flags, SaveFlag.WeightNot1or0 ) )
				writer.Write( (double) info.m_Weight );

			if ( GetSaveFlag( flags, SaveFlag.Map ) )
				writer.Write( (Map) m_Map );

			if ( GetSaveFlag( flags, SaveFlag.ImplFlags ) )
				writer.WriteEncodedInt( (int) implFlags );

			if ( GetSaveFlag( flags, SaveFlag.InsuredFor ) )
				writer.Write( (Mobile) null );

			if ( GetSaveFlag( flags, SaveFlag.BlessedFor ) )
				writer.Write( info.m_BlessedFor );

			if ( GetSaveFlag( flags, SaveFlag.HeldBy ) )
				writer.Write( info.m_HeldBy );

			if ( GetSaveFlag( flags, SaveFlag.SavedFlags ) )
				writer.WriteEncodedInt( info.m_SavedFlags );
		}

		public virtual void Deserialize( GenericReader reader )
		{
			int version = reader.ReadInt();

			SetLastMoved();

			switch ( version )
			{
				case 9:
				case 8:
				case 7:
				case 6:
				{
					SaveFlag flags = (SaveFlag)reader.ReadInt();

					if ( version < 7 )
					{
						LastMoved = reader.ReadDeltaTime();
					}
					else
					{
						int minutes = reader.ReadEncodedInt();

						try{ LastMoved = DateTime.Now - TimeSpan.FromMinutes( minutes ); }
						catch{ LastMoved = DateTime.Now; }
					}

					if ( GetSaveFlag( flags, SaveFlag.GridLocation ) )
						m_GridLocation = reader.ReadByte();

					if ( GetSaveFlag( flags, SaveFlag.Direction ) )
						m_Direction = (Direction)reader.ReadByte();

					if ( GetSaveFlag( flags, SaveFlag.Bounce ) )
						AcquireCompactInfo().m_Bounce = BounceInfo.Deserialize( reader );

					if ( GetSaveFlag( flags, SaveFlag.LootType ) )
						m_LootType = (LootType)reader.ReadByte();

					int x = 0, y = 0, z = 0;

					if ( GetSaveFlag( flags, SaveFlag.LocationFull ) )
					{
						x = reader.ReadEncodedInt();
						y = reader.ReadEncodedInt();
						z = reader.ReadEncodedInt();
					}
					else
					{
						if ( GetSaveFlag( flags, SaveFlag.LocationByteXY ) )
						{
							x = reader.ReadByte();
							y = reader.ReadByte();
						}
						else if ( GetSaveFlag( flags, SaveFlag.LocationShortXY ) )
						{
							x = reader.ReadShort();
							y = reader.ReadShort();
						}

						if ( GetSaveFlag( flags, SaveFlag.LocationSByteZ ) )
							z = reader.ReadSByte();
					}

					m_Location = new Point3D( x, y, z );

					if ( GetSaveFlag( flags, SaveFlag.ItemID ) )
						m_ItemID = reader.ReadEncodedInt();

					if ( GetSaveFlag( flags, SaveFlag.Hue ) )
						m_Hue = reader.ReadEncodedInt();

					if ( GetSaveFlag( flags, SaveFlag.Amount ) )
						m_Amount = reader.ReadEncodedInt();
					else
						m_Amount = 1;

					if ( GetSaveFlag( flags, SaveFlag.Layer ) )
						m_Layer = (Layer)reader.ReadByte();

					if ( GetSaveFlag( flags, SaveFlag.Name ) )
					{
						string name = reader.ReadString();

						if ( name != this.DefaultName )
							AcquireCompactInfo().m_Name = name;
					}

					if ( GetSaveFlag( flags, SaveFlag.Parent ) )
					{
						Serial parent = reader.ReadInt();

						if ( parent.IsMobile )
							m_Parent = World.FindMobile( parent );
						else if ( parent.IsItem )
							m_Parent = World.FindItem( parent );
						else
							m_Parent = null;

						if ( m_Parent == null && (parent.IsMobile || parent.IsItem) )
							Delete();
					}

					if ( GetSaveFlag( flags, SaveFlag.Items ) )
					{
						List<Item> items = reader.ReadStrongItemList();

						if ( this is Container )
							( this as Container ).m_Items = items;
						else
							AcquireCompactInfo().m_Items = items;
					}

					if ( version < 8 || !GetSaveFlag( flags, SaveFlag.NullWeight ) )
					{
						double weight;

						if ( GetSaveFlag( flags, SaveFlag.IntWeight ) )
							weight = reader.ReadEncodedInt();
						else if ( GetSaveFlag( flags, SaveFlag.WeightNot1or0 ) )
							weight = reader.ReadDouble();
						else if ( GetSaveFlag( flags, SaveFlag.WeightIs0 ) )
							weight = 0.0;
						else
							weight = 1.0;

						if ( weight != DefaultWeight )
							AcquireCompactInfo().m_Weight = weight;
					}

					if ( GetSaveFlag( flags, SaveFlag.Map ) )
						m_Map = reader.ReadMap();
					else
						m_Map = Map.Internal;

					if ( GetSaveFlag( flags, SaveFlag.Visible ) )
						SetFlag( ImplFlag.Visible, reader.ReadBool() );
					else
						SetFlag( ImplFlag.Visible, true );

					if ( GetSaveFlag( flags, SaveFlag.Movable ) )
						SetFlag( ImplFlag.Movable, reader.ReadBool() );
					else
						SetFlag( ImplFlag.Movable, true );

					if ( GetSaveFlag( flags, SaveFlag.Stackable ) )
						SetFlag( ImplFlag.Stackable, reader.ReadBool() );

					if ( GetSaveFlag( flags, SaveFlag.ImplFlags ) )
						m_Flags = (ImplFlag)reader.ReadEncodedInt();

					if ( GetSaveFlag( flags, SaveFlag.InsuredFor ) )
						/*m_InsuredFor = */reader.ReadMobile();

					if ( GetSaveFlag( flags, SaveFlag.BlessedFor ) )
						AcquireCompactInfo().m_BlessedFor = reader.ReadMobile();

					if ( GetSaveFlag( flags, SaveFlag.HeldBy ) )
						AcquireCompactInfo().m_HeldBy = reader.ReadMobile();

					if ( GetSaveFlag( flags, SaveFlag.SavedFlags ) )
						AcquireCompactInfo().m_SavedFlags = reader.ReadEncodedInt();

					if ( m_Map != null && m_Parent == null )
						m_Map.OnEnter( this );

					break;
				}
				case 5:
				{
					SaveFlag flags = (SaveFlag)reader.ReadInt();

					LastMoved = reader.ReadDeltaTime();

					if ( GetSaveFlag( flags, SaveFlag.Direction ) )
						m_Direction = (Direction)reader.ReadByte();

					if ( GetSaveFlag( flags, SaveFlag.Bounce ) )
						AcquireCompactInfo().m_Bounce = BounceInfo.Deserialize( reader );

					if ( GetSaveFlag( flags, SaveFlag.LootType ) )
						m_LootType = (LootType)reader.ReadByte();

					if ( GetSaveFlag( flags, SaveFlag.LocationFull ) )
						m_Location = reader.ReadPoint3D();

					if ( GetSaveFlag( flags, SaveFlag.ItemID ) )
						m_ItemID = reader.ReadInt();

					if ( GetSaveFlag( flags, SaveFlag.Hue ) )
						m_Hue = reader.ReadInt();

					if ( GetSaveFlag( flags, SaveFlag.Amount ) )
						m_Amount = reader.ReadInt();
					else
						m_Amount = 1;

					if ( GetSaveFlag( flags, SaveFlag.Layer ) )
						m_Layer = (Layer)reader.ReadByte();

					if ( GetSaveFlag( flags, SaveFlag.Name ) )
					{
						string name = reader.ReadString();

						if ( name != this.DefaultName )
							AcquireCompactInfo().m_Name = name;
					}

					if ( GetSaveFlag( flags, SaveFlag.Parent ) )
					{
						Serial parent = reader.ReadInt();

						if ( parent.IsMobile )
							m_Parent = World.FindMobile( parent );
						else if ( parent.IsItem )
							m_Parent = World.FindItem( parent );
						else
							m_Parent = null;

						if ( m_Parent == null && (parent.IsMobile || parent.IsItem) )
							Delete();
					}

					if ( GetSaveFlag( flags, SaveFlag.Items ) )
					{
						List<Item> items = reader.ReadStrongItemList();

						if ( this is Container )
							( this as Container ).m_Items = items;
						else
							AcquireCompactInfo().m_Items = items;
					}

					double weight;

					if ( GetSaveFlag( flags, SaveFlag.IntWeight ) )
						weight = reader.ReadEncodedInt();
					else if ( GetSaveFlag( flags, SaveFlag.WeightNot1or0 ) )
						weight = reader.ReadDouble();
					else if ( GetSaveFlag( flags, SaveFlag.WeightIs0 ) )
						weight = 0.0;
					else
						weight = 1.0;

					if ( weight != DefaultWeight )
						AcquireCompactInfo().m_Weight = weight;

					if ( GetSaveFlag( flags, SaveFlag.Map ) )
						m_Map = reader.ReadMap();
					else
						m_Map = Map.Internal;

					if ( GetSaveFlag( flags, SaveFlag.Visible ) )
						SetFlag( ImplFlag.Visible, reader.ReadBool() );
					else
						SetFlag( ImplFlag.Visible, true );

					if ( GetSaveFlag( flags, SaveFlag.Movable ) )
						SetFlag( ImplFlag.Movable, reader.ReadBool() );
					else
						SetFlag( ImplFlag.Movable, true );

					if ( GetSaveFlag( flags, SaveFlag.Stackable ) )
						SetFlag( ImplFlag.Stackable, reader.ReadBool() );

					if ( m_Map != null && m_Parent == null )
						m_Map.OnEnter( this );

					break;
				}
				case 4: // Just removed variables
				case 3:
				{
					m_Direction = (Direction)reader.ReadInt();

					goto case 2;
				}
				case 2:
				{
					AcquireCompactInfo().m_Bounce = BounceInfo.Deserialize( reader );
					LastMoved = reader.ReadDeltaTime();

					goto case 1;
				}
				case 1:
				{
					m_LootType = (LootType) reader.ReadByte();//m_Newbied = reader.ReadBool();

					goto case 0;
				}
				case 0:
				{
					m_Location = reader.ReadPoint3D();
					m_ItemID = reader.ReadInt();
					m_Hue = reader.ReadInt();
					m_Amount = reader.ReadInt();
					m_Layer = (Layer) reader.ReadByte();

					string name = reader.ReadString();

					if ( name != this.DefaultName )
						AcquireCompactInfo().m_Name = name;

					Serial parent = reader.ReadInt();

					if ( parent.IsMobile )
						m_Parent = World.FindMobile( parent );
					else if ( parent.IsItem )
						m_Parent = World.FindItem( parent );
					else
						m_Parent = null;

					if ( m_Parent == null && (parent.IsMobile || parent.IsItem) )
						Delete();

					int count = reader.ReadInt();

					if ( count > 0 )
					{
						List<Item> items = new List<Item>( count );

						for ( int i = 0; i < count; ++i )
						{
							Item item = reader.ReadItem();

							if ( item != null )
								items.Add( item );
						}

						if ( this is Container )
							( this as Container ).m_Items = items;
						else
							AcquireCompactInfo().m_Items = items;
					}

					double weight = reader.ReadDouble();

					if ( weight != DefaultWeight )
						AcquireCompactInfo().m_Weight = weight;

					if ( version <= 3 )
					{
						reader.ReadInt();
						reader.ReadInt();
						reader.ReadInt();
					}

					m_Map = reader.ReadMap();
					SetFlag( ImplFlag.Visible, reader.ReadBool() );
					SetFlag( ImplFlag.Movable, reader.ReadBool() );

					if ( version <= 3 )
						/*m_Deleted =*/ reader.ReadBool();

					Stackable = reader.ReadBool();

					if ( m_Map != null && m_Parent == null )
						m_Map.OnEnter( this );

					break;
				}
			}

			if ( this.HeldBy != null )
				Timer.DelayCall( TimeSpan.Zero, new TimerCallback( FixHolding_Sandbox ) );

			//if ( version < 9 )
				VerifyCompactInfo();
		}
__________________
Record for the sentence that makes the least sense - Go HERE
Kamron is offline   Reply With Quote
Old 07-23-2007, 04:20 PM   #56 (permalink)
Newbie
 
Join Date: Jun 2006
Posts: 94
Default

I will be testing this fix with UOML 6.0.1.8 now. If anyone has problems with 6.0.1.8, please tell me.
__________________
Record for the sentence that makes the least sense - Go HERE
Kamron is offline   Reply With Quote
Old 07-24-2007, 04:32 AM   #57 (permalink)
Newbie
 
Join Date: Jan 2006
Location: Turkey
Age: 22
Posts: 35
Send a message via MSN to sailor
Default

In the zip, BaseVendor.cs modification is not included. And in EventSink.cs public delegate void ClientVersionRecievedHandler( ClientVersionRecievedArgs e ); is written wrong (in runuo svn 187). You use in you scripts ClientVersionReceived. So SVN187 users may have problems with this.

By the way, can you write here how we should modify BaseVendor.cs ?
sailor is offline   Reply With Quote
Old 07-24-2007, 11:17 AM   #58 (permalink)
Forum Expert
 
Join Date: Feb 2004
Age: 27
Posts: 1,834
Default

anyone else had a crash with the annoygump? I got the feeling this is the reason why it crashed, sorry got the crashlog no more. Because m is null and m.State crashes <.<
Code:
		private static void SendAnnoyGump( Mobile m )
		{
			if( m != null && m.NetState != null && m.NetState.Version < Required )
			{
Didn't need the gump anyways.
__________________
[sig]all my scripts are public domain and can be re-released in any form[/sig]
Kamuflaro is offline   Reply With Quote
Old 07-24-2007, 01:51 PM   #59 (permalink)
Forum Novice
 
RavonTUS's Avatar
 
Join Date: Aug 2004
Location: in a house.
Age: 39
Posts: 588
Send a message via ICQ to RavonTUS Send a message via AIM to RavonTUS
Default

Quote:
Originally Posted by sailor View Post
In the zip, BaseVendor.cs modification is not included. And in EventSink.cs public delegate void ClientVersionRecievedHandler( ClientVersionRecievedArgs e ); is written wrong (in runuo svn 187). You use in you scripts ClientVersionReceived. So SVN187 users may have problems with this.

By the way, can you write here how we should modify BaseVendor.cs ?
Renamed all "recieve" to "receive", in server & scripts, then recompiled core and I too get the BaseVendor.cs error when tring to compile. (SVN 187)

Error:
Code:
Errors:
 + Custom/Distro/Base/BaseVendor.cs:
    CS1501: Line 831: No overload for method 'VendorBuyContent' takes '1' arguments
Line 831 in red:
Code:
            if (list.Count > 0)
            {
                list.Sort(new BuyItemStateComparer());

                SendPacksTo(from);

                from.Send(new VendorBuyContent(list));
                from.Send(new VendorBuyList(this, list));
                from.Send(new DisplayBuyList(this));
                from.Send(new MobileStatusExtended(from));//make sure their gold amount is sent
It looks like it does not like this change in Packets.cs...
Code:
    public sealed class VendorBuyContent : Packet
    {
        //23JUL2007 Support for 6.0.1.7 Client *** START ***
        //public VendorBuyContent(ArrayList list)
        //    : base(0x3c)
        //{
        //    this.EnsureCapacity(list.Count * 19 + 5);

        public VendorBuyContent(ArrayList list, ClientVersion version)
            : base(0x3c)
        {
            bool uokr = IsUOKRPacket(version);

            this.EnsureCapacity(list.Count * (uokr ? 20 : 19) + 5);
            //23JUL2007 Support for 6.0.1.7 Client *** END   ***
OK, I think this will fix it, however, I am not where I can test it...

In BaseVendor.cs change line 831 (in red):
Code:
            if (list.Count > 0)
            {
                list.Sort(new BuyItemStateComparer());

                SendPacksTo(from);

                from.Send(new VendorBuyContent(list, from.NetState.Version));
                from.Send(new VendorBuyList(this, list));
                from.Send(new DisplayBuyList(this));
                from.Send(new MobileStatusExtended(from));//make sure their gold amount is sent
Will VendorBuyList and DisplayBuyList also need this change too?

-Ravon
__________________

Will RunUO work on Linux? Yes
RavonTUS is offline   Reply With Quote
Old 07-24-2007, 01:55 PM   #60 (permalink)
Newbie
 
Join Date: Jun 2006
Posts: 94
Default

I dunno why I am missing some of the files in the archive.. sorry about that.
And I was not aware that I copied over some of my typo fixes..

I will fix this, thanks again
__________________
Record for the sentence that makes the least sense - Go HERE
Kamron is offline   Reply With Quote
Old 07-24-2007, 02:02 PM   #61 (permalink)
Newbie
 
Join Date: Jun 2006
Posts: 94
Default

Okay I included BaseVendor.cs
I also updated the compiled core file to be proper with RUO 187.

Truthfully, this fix is one of many that I include in a modified core which fixes many issues brought up by the RUO issue tracker.
__________________
Record for the sentence that makes the least sense - Go HERE
Kamron is offline   Reply With Quote
Old 07-24-2007, 03:52 PM   #62 (permalink)
Forum Expert
 
Join Date: Feb 2004
Age: 27
Posts: 1,834
Default

Quote:
Originally Posted by Kamron View Post
Okay I included BaseVendor.cs
I also updated the compiled core file to be proper with RUO 187.

Truthfully, this fix is one of many that I include in a modified core which fixes many issues brought up by the RUO issue tracker.
Do NPC vendor buy gumps work properly with this now? I've had issues with them not showing up stuff

P.S. You forgot to attach Eventsink.cs? ^^' Got compile errors in Bufficons.cs.

Edit: My fault, everything works fine...
__________________
[sig]all my scripts are public domain and can be re-released in any form[/sig]

Last edited by Kamuflaro; 07-24-2007 at 09:38 PM.
Kamuflaro is offline   Reply With Quote
Old 07-24-2007, 07:30 PM   #63 (permalink)
Forum Novice
 
RavonTUS's Avatar
 
Join Date: Aug 2004
Location: in a house.
Age: 39
Posts: 588
Send a message via ICQ to RavonTUS Send a message via AIM to RavonTUS
Default

Greetings,

Kamron - Thank you. I have tested/used everything from this thread and it works. I tested Clients 5.0.6, 5.0.9 and 6.0.1.8.

-Ravon
__________________

Will RunUO work on Linux? Yes
RavonTUS is offline   Reply With Quote
Old 07-25-2007, 12:12 AM   #64 (permalink)
Forum Novice
 
Mideon's Avatar
 
Join Date: May 2005
Location: Canada
Age: 24
Posts: 543
Default

Stupid Question, does this work with 1.0?
__________________
A sense of community is the lifeblood of RunUO.
http://www.runuo.com/forums/announcements/67400-something-all-you-chew.html

Satire, man's greatest weapon (Flame Wars!)

The darkness is patient and in the end it always wins...but even the smallest light can overcome the blackest shadow.
Mideon is offline   Reply With Quote
Old 07-25-2007, 01:26 AM   #65 (permalink)
Newbie
 
Join Date: Jun 2006
Posts: 94
Default

No.. but if someone wants to modify it to work.. go ahead.

I have said this about many shards, and I will say it again... every shard should update to 2.0. If you do the update properly, it will run alot smoother, faster, and altogether better.

RE: RavonTUS - Thanks, I tested it with 6.0.1.8 as well, but not the older clients.
__________________
Record for the sentence that makes the least sense - Go HERE
Kamron is offline   Reply With Quote
Old 07-25-2007, 11:18 AM   #66 (permalink)
Account Terminated
 
Join Date: Mar 2007
Posts: 58
Default

Thanks for this. works great!

Just curious, how do you get the packet info of what the server sends? Since on OSI its encrypted. I don't have an OSI account but I'd like to get one just so I can analyse packet changes for KR but not sure how to go about getting around the encryption. I know some people have found ways to extract the twofish keys so thats not a problem I don't think.
quantomsadmn is offline   Reply With Quote
Old 07-25-2007, 12:48 PM   #67 (permalink)
Newbie
 
Join Date: Jun 2006
Posts: 94
Default

If you have an OSI acct, it makes it 100x easier... programs like Razor and SpyUO (there is a SpyUO for KR too) log the packets unencrypted...

so that makes it alot easier to see the raw packets going back and forth.
__________________
Record for the sentence that makes the least sense - Go HERE
Kamron is offline   Reply With Quote
Old 07-25-2007, 01:24 PM   #68 (permalink)
Newbie
 
Join Date: Jun 2006
Posts: 94
Default

Currently I am having a problem with Clilocs in the Context Menus (AOS).. If anyone else is having problems, that will help me find out if its related to the new client support.
__________________
Record for the sentence that makes the least sense - Go HERE
Kamron is offline   Reply With Quote
Old 07-25-2007, 01:50 PM   #69 (permalink)
Forum Expert
 
stormwolff's Avatar
 
Join Date: Nov 2003
Location: The Internet
Age: 28
Posts: 3,510
Default

Quote:
Originally Posted by Kamron View Post
Currently I am having a problem with Clilocs in the Context Menus (AOS).. If anyone else is having problems, that will help me find out if its related to the new client support.
I have not seen any issues in my short tests this morning. What menu are you having issues with?
stormwolff is offline   Reply With Quote
Old 07-25-2007, 02:13 PM   #70 (permalink)
Newbie
 
Join Date: Jun 2006
Posts: 94
Default

All context menus... I get MegaCliloc errors... alot of 0's, and 39996228 and stuff like that.
__________________
Record for the sentence that makes the least sense - Go HERE
Kamron is offline   Reply With Quote
Old 07-25-2007, 02:15 PM   #71 (permalink)
Forum Expert
 
stormwolff's Avatar
 
Join Date: Nov 2003
Location: The Internet
Age: 28
Posts: 3,510
Default

Quote:
Originally Posted by Kamron View Post
All context menus... I get MegaCliloc errors... alot of 0's, and 39996228 and stuff like that.
All seem fine on this end with your updated exe and scripts & 2d 6.0.1.8 on my test server.
stormwolff is offline   Reply With Quote
Old 07-25-2007, 02:19 PM   #72 (permalink)
Newbie
 
Join Date: Jun 2006
Posts: 94
Default

Okay, it may be other fixes I added.. thanks for confirming
__________________
Record for the sentence that makes the least sense - Go HERE
Kamron is offline   Reply With Quote
Old 07-25-2007, 02:22 PM   #73 (permalink)
Account Terminated
 
Join Date: Mar 2007
Posts: 58
Default

Quote:
Originally Posted by Kamron View Post
If you have an OSI acct, it makes it 100x easier... programs like Razor and SpyUO (there is a SpyUO for KR too) log the packets unencrypted...

so that makes it alot easier to see the raw packets going back and forth.
Hmm good to know, did not figure razor unencrypted the packets before it would hit a sniffer tool. I'll also have to check into spyuo.
quantomsadmn is offline   Reply With Quote