|
||
|
|||||||
| Subsystems This forum is for modifications to the various subystem code of RunUO |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Forum Novice
Join Date: Mar 2004
Location: Germany
Age: 23
Posts: 301
|
As of the new UO client update, the version string now contains more than just one digit as revision. This means, that the current ClientVersion constructor parses the version string (4.0.10) and just reads this as "4.0.1".
I wrote a fix for this. This is the new constructor for the ClientVersion object (found in ClientVersion.cs) Code:
public ClientVersion( string fmt )
{
m_SourceString = fmt;
try
{
fmt = fmt.ToLower();
string[] version = fmt.Split( new char[] {'.'}, 3 );
m_Patch = 0;
for ( int i = 0; i < version[2].Length; i++ )
{
if ( Char.IsLetter( version[2][i] ) )
{
m_Patch = ( version[2][i] - 'a' ) + 1;
version[2] = version[2].Remove( i, version[2].Length - i );
break;
}
}
m_Major = int.Parse( version[0] );
m_Minor = int.Parse( version[1] );
m_Revision = int.Parse( version[2] );
if ( fmt.IndexOf( "god" ) >= 0 || fmt.IndexOf( "gq" ) >= 0 )
m_Type = ClientType.God;
else if ( fmt.IndexOf( "third dawn" ) >= 0 || fmt.IndexOf( "uo:td" ) >= 0 || fmt.IndexOf( "uotd" ) >= 0 || fmt.IndexOf( "uo3d" ) >= 0 || fmt.IndexOf( "uo:3d" ) >= 0 )
m_Type = ClientType.UOTD;
else
m_Type = ClientType.Regular;
}
catch
{
m_Major = 0;
m_Minor = 0;
m_Revision = 0;
m_Patch = 0;
m_Type = ClientType.Regular;
}
}
|
|
|
|
|
|
#3 (permalink) |
|
This is a core code modification, not part of the regular distribution....I wouldn't recommend making changes such as this unless you know what you're doing and of course have a good compiler.
I'm not sure why you're having problems with characters not being able to move when they die, I have no such problems on my shard at all. Perhaps you could ask in Server Support or Script Support? |
|
|
|
|
|
|
#4 (permalink) |
|
Forum Expert
Join Date: Feb 2004
Age: 27
Posts: 2,047
|
It's not only habitat, it's everyone on 2 shards I work on, and those people are the only ones with the new patch. They've died in custom map areas, Ilshenar areas, and it's all the same. As soon as you try to move as a ghost it will spawn up your screen that you're frozen and can't do that.
|
|
|
|
|
|
#6 (permalink) |
|
Forum Expert
Join Date: Feb 2004
Age: 27
Posts: 2,047
|
I don't think the script would fix it either, now that I know it's a custom map problem. I figured since people were dying in Ilshenar, and that the area was still as OSI has it, it wouldn't matter what kind of map it is, but I guess it only happens on customs.
|
|
|
|
|
|
#7 (permalink) |
|
Forum Expert
Join Date: Feb 2003
Age: 30
Posts: 515
|
Im guessing its having the 0kb .diff files for custom map to remove the chunks of land from OSI but OSI hasnt patched any map files if you look in the patchlog file only thing they changed with 4.0.10a is the gump files, art files, and clioc files. Im stumped why its doing this but its super annoying babysitting people so they can get ressed.
|
|
|
|
|
|
#8 (permalink) |
|
Join Date: Oct 2002
Age: 23
Posts: 4,689
|
This is my version of the Client Fix... I believe my code is faster and more effecient
Code:
public ClientVersion( string fmt )
{
m_SourceString = fmt;
try
{
//Format: Major.Minor.Revision[Patch] [Type]
//Exmple: 4.0.10a UO3D
fmt = fmt.ToLower();
string[] fmts = fmt.Split( new char[] {'.'}, 3 );
string patch = fmts[2];
int letter_index;
for( letter_index = 0; letter_index < patch.Length; letter_index++ )
if ( !Char.IsNumber( patch[letter_index] ) )
break;
m_Major = int.Parse( fmts[0] );
m_Minor = int.Parse( fmts[1] );
m_Revision = int.Parse( patch.Substring( 0, letter_index ) );
if ( Char.IsLetter( patch[letter_index] ) )
m_Patch = (patch[letter_index] - 'a') + 1;
else
m_Patch = 0;
if ( patch.IndexOf( "god" ) >= 0 || patch.IndexOf( "gq" ) >= 0 )
m_Type = ClientType.God;
else if ( patch.IndexOf( "third dawn" ) >= 0 || patch.IndexOf( "uo:td" ) >= 0 || patch.IndexOf( "uotd" ) >= 0 || patch.IndexOf( "uo3d" ) >= 0 || patch.IndexOf( "uo:3d" ) >= 0 )
m_Type = ClientType.UOTD;
else
m_Type = ClientType.Regular;
}
catch
{
m_Major = 0;
m_Minor = 0;
m_Revision = 0;
m_Patch = 0;
m_Type = ClientType.Regular;
}
}
|
|
|
|
|
|
#10 (permalink) |
|
Join Date: Oct 2002
Age: 23
Posts: 4,689
|
I don't believe so... because thats a client thing, not a server thing....
Basically what happens is you take 4.0.9q for example, and it changes it to Major = 4 Minor = 0 Revision = 9 Patch = q with the fix, for example, it changes 4.0.10a to Major = 4 Minor = 0 Revision = 10 Patch = a as apposed to Major = 4 Minor = 0 Revision = 1 Patch = (garbage) |
|
|
|
|
|
#15 (permalink) | |
|
Forum Expert
Join Date: Mar 2003
Location: England
Age: 35
Posts: 986
|
Quote:
![]() |
|
|
|
|
|
|
#17 (permalink) |
|
ok so how do i attact this.............................
using System; using Server; namespace Server.Misc { public class ClientVerification { public static void Initialize() { ClientVersion.Required = null; //ClientVersion.Required = new ClientVersion( "1.0.8q" ); ClientVersion.AllowGod = false; ClientVersion.AllowUOTD = true; ClientVersion.AllowRegular = true; ClientVersion.KickDelay = TimeSpan.FromSeconds( 1.0 ); } } } with yours............................................. .. public ClientVersion( string fmt ) { m_SourceString = fmt; try { //Format: Major.Minor.Revision[Patch] [Type] //Exmple: 4.0.10a UO3D fmt = fmt.ToLower(); string[] fmts = fmt.Split( new char[] {'.'}, 3 ); string patch = fmts[2]; int letter_index; for( letter_index = 0; letter_index < patch.Length; letter_index++ ) if ( !Char.IsNumber( patch[letter_index] ) ) break; m_Major = int.Parse( fmts[0] ); m_Minor = int.Parse( fmts[1] ); m_Revision = int.Parse( patch.Substring( 0, letter_index ) ); if ( Char.IsLetter( patch[letter_index] ) ) m_Patch = (patch[letter_index] - 'a') + 1; else m_Patch = 0; if ( patch.IndexOf( "god" ) >= 0 || patch.IndexOf( "gq" ) >= 0 ) m_Type = ClientType.God; else if ( patch.IndexOf( "third dawn" ) >= 0 || patch.IndexOf( "uo:td" ) >= 0 || patch.IndexOf( "uotd" ) >= 0 || patch.IndexOf( "uo3d" ) >= 0 || patch.IndexOf( "uo:3d" ) >= 0 ) m_Type = ClientType.UOTD; else m_Type = ClientType.Regular; } catch { m_Major = 0; m_Minor = 0; m_Revision = 0; m_Patch = 0; m_Type = ClientType.Regular; } } -------------------------------------------------------------------------------- |
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|