fix(core): Removes disposable netstates. (#467)

- [X] Removes IDisposable from NetState
- [X] Swaps Disconnect and Dispose methods
This commit is contained in:
Kamron Batman 2021-02-05 14:33:35 -08:00 • committed by GitHub
parent 079eeb1b96
commit 67625ad249
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
49 changed files with 204 additions and 210 deletions

View file

@ -372,7 +372,7 @@ namespace Server.Network
if (!buttonExists)
{
state.WriteConsole("Invalid gump response, disconnecting...");
state.Dispose();
state.Disconnect();
return;
}
@ -381,7 +381,7 @@ namespace Server.Network
if (switchCount < 0 || switchCount > gump.m_Switches)
{
state.WriteConsole("Invalid gump response, disconnecting...");
state.Dispose();
state.Disconnect();
return;
}
@ -397,7 +397,7 @@ namespace Server.Network
if (textCount < 0 || textCount > gump.m_TextEntries)
{
state.WriteConsole("Invalid gump response, disconnecting...");
state.Dispose();
state.Disconnect();
return;
}
@ -411,7 +411,7 @@ namespace Server.Network
if (textLength > 239)
{
state.WriteConsole("Invalid gump response, disconnecting...");
state.Dispose();
state.Disconnect();
return;
}
@ -596,11 +596,11 @@ namespace Server.Network
"Sent ingame packet (0xD7x{0:X2}) before having been attached to a mobile",
packetId
);
state.Dispose();
state.Disconnect();
}
else if (ph.Ingame && state.Mobile.Deleted)
{
state.Dispose();
state.Disconnect();
}
else
{