The following is a fix for ClientVersion that incorrectly parses some client version strings, such as the recent '5.0.2' version.
just replace the ClientVersion constructor around line 240 in ClientVersion.cs with the following
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 (letter_index < patch.Length && 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;
}
}
The above is a core modification and requires access to the RunUO-1.0.0 source files and the ability to recompile the server.
I have also attached a fix that can be used instead of making this core mod. Just drop the script into your custom script area. This is NOT a core modification and does not require access to the RunUO sources.
If you made the core mod, then you dont need the script. If you used the script then you dont need the core mod. If you did both, that's not a problem either.
__________________
The first line of the first rule in the forum rules and guidelines "Be respectful of others. "
For questions, information, and support for XmlSpawner and its addons, visit the
XmlSpawner Support Forum