Small adjustments as I go through the code.
This commit is contained in:
parent
4d2965d2de
commit
3f45bd57b9
2 changed files with 25 additions and 25 deletions
|
|
@ -3316,7 +3316,7 @@ namespace Server
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static bool _processing = false;
|
private static bool _processing;
|
||||||
|
|
||||||
public static void ProcessDeltaQueue()
|
public static void ProcessDeltaQueue()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -441,7 +441,7 @@ namespace Server.Network
|
||||||
byte layer = pvSrc.ReadByte();
|
byte layer = pvSrc.ReadByte();
|
||||||
Serial serial = pvSrc.ReadInt32();
|
Serial serial = pvSrc.ReadInt32();
|
||||||
int amount = pvSrc.ReadInt16();
|
int amount = pvSrc.ReadInt16();
|
||||||
|
|
||||||
buyList.Add( new BuyItemResponse( serial, amount ) );
|
buyList.Add( new BuyItemResponse( serial, amount ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2028,11 +2028,11 @@ namespace Server.Network
|
||||||
|
|
||||||
public static PlayCharCallback ThirdPartyAuthCallback = null, ThirdPartyHackedCallback = null;
|
public static PlayCharCallback ThirdPartyAuthCallback = null, ThirdPartyHackedCallback = null;
|
||||||
|
|
||||||
private static byte[] m_ThirdPartyAuthKey = new byte[]
|
private static byte[] m_ThirdPartyAuthKey = new byte[]
|
||||||
{
|
{
|
||||||
0x9, 0x11, 0x83, (byte)'+', 0x4, 0x17, 0x83,
|
0x9, 0x11, 0x83, (byte)'+', 0x4, 0x17, 0x83,
|
||||||
0x5, 0x24, 0x85,
|
0x5, 0x24, 0x85,
|
||||||
0x7, 0x17, 0x87,
|
0x7, 0x17, 0x87,
|
||||||
0x6, 0x19, 0x88,
|
0x6, 0x19, 0x88,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -2080,7 +2080,7 @@ namespace Server.Network
|
||||||
bool match = true;
|
bool match = true;
|
||||||
for ( int i=0; match && i < m_ThirdPartyAuthKey.Length; i++ )
|
for ( int i=0; match && i < m_ThirdPartyAuthKey.Length; i++ )
|
||||||
match = match && pvSrc.ReadByte() == m_ThirdPartyAuthKey[i];
|
match = match && pvSrc.ReadByte() == m_ThirdPartyAuthKey[i];
|
||||||
|
|
||||||
if ( match )
|
if ( match )
|
||||||
authOK = true;
|
authOK = true;
|
||||||
}
|
}
|
||||||
|
|
@ -2135,25 +2135,25 @@ namespace Server.Network
|
||||||
if ( m == null )
|
if ( m == null )
|
||||||
{
|
{
|
||||||
state.Dispose();
|
state.Dispose();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
if ( m.NetState != null )
|
|
||||||
m.NetState.Dispose();
|
|
||||||
|
|
||||||
NetState.ProcessDisposedQueue();
|
|
||||||
|
|
||||||
state.Send( new ClientVersionReq() );
|
m.NetState?.Dispose();
|
||||||
|
|
||||||
state.BlockAllPackets = true;
|
// TODO: Make this wait one tick so we don't have to call it unnecessarily
|
||||||
|
NetState.ProcessDisposedQueue();
|
||||||
|
|
||||||
state.Flags = (ClientFlags)flags;
|
state.Send( new ClientVersionReq() );
|
||||||
|
|
||||||
state.Mobile = m;
|
state.BlockAllPackets = true;
|
||||||
m.NetState = state;
|
|
||||||
|
|
||||||
new LoginTimer( state, m ).Start();
|
state.Flags = (ClientFlags)flags;
|
||||||
}
|
|
||||||
|
state.Mobile = m;
|
||||||
|
m.NetState = state;
|
||||||
|
|
||||||
|
new LoginTimer( state, m ).Start();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2427,7 +2427,7 @@ namespace Server.Network
|
||||||
|
|
||||||
byte raceID = (byte)(genderRace < 4 ? 0 : ((genderRace / 2) - 1));
|
byte raceID = (byte)(genderRace < 4 ? 0 : ((genderRace / 2) - 1));
|
||||||
race = Race.Races[raceID];
|
race = Race.Races[raceID];
|
||||||
|
|
||||||
if( race == null )
|
if( race == null )
|
||||||
race = Race.DefaultRace;
|
race = Race.DefaultRace;
|
||||||
|
|
||||||
|
|
@ -2518,7 +2518,7 @@ namespace Server.Network
|
||||||
private static Dictionary<int, AuthIDPersistence> m_AuthIDWindow = new Dictionary<int, AuthIDPersistence>( m_AuthIDWindowSize );
|
private static Dictionary<int, AuthIDPersistence> m_AuthIDWindow = new Dictionary<int, AuthIDPersistence>( m_AuthIDWindowSize );
|
||||||
|
|
||||||
private static int GenerateAuthID( NetState state )
|
private static int GenerateAuthID( NetState state )
|
||||||
{
|
{
|
||||||
if ( m_AuthIDWindow.Count == m_AuthIDWindowSize ) {
|
if ( m_AuthIDWindow.Count == m_AuthIDWindowSize ) {
|
||||||
int oldestID = 0;
|
int oldestID = 0;
|
||||||
DateTime oldest = DateTime.MaxValue;
|
DateTime oldest = DateTime.MaxValue;
|
||||||
|
|
@ -2532,7 +2532,7 @@ namespace Server.Network
|
||||||
|
|
||||||
m_AuthIDWindow.Remove( oldestID );
|
m_AuthIDWindow.Remove( oldestID );
|
||||||
}
|
}
|
||||||
|
|
||||||
int authID;
|
int authID;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
|
|
@ -2543,7 +2543,7 @@ namespace Server.Network
|
||||||
} while ( m_AuthIDWindow.ContainsKey( authID ) );
|
} while ( m_AuthIDWindow.ContainsKey( authID ) );
|
||||||
|
|
||||||
m_AuthIDWindow[authID] = new AuthIDPersistence( state.Version );
|
m_AuthIDWindow[authID] = new AuthIDPersistence( state.Version );
|
||||||
|
|
||||||
return authID;
|
return authID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2569,7 +2569,7 @@ namespace Server.Network
|
||||||
state.Dispose();
|
state.Dispose();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( state.m_AuthID != 0 && authID != state.m_AuthID )
|
if ( state.m_AuthID != 0 && authID != state.m_AuthID )
|
||||||
{
|
{
|
||||||
Console.WriteLine( "Login: {0}: Invalid client detected, disconnecting", state );
|
Console.WriteLine( "Login: {0}: Invalid client detected, disconnecting", state );
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue