fix: Stops creating blocked packets entirely (#944)

Optimizes larger servers where users are logging in and packets are being created for no reason.
This commit is contained in:
Kamron Batman 2022-02-27 00:13:49 -08:00 • committed by GitHub
parent 5db8b1354c
commit 941452de4a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
58 changed files with 5510 additions and 5537 deletions

View file

@ -65,7 +65,7 @@ namespace Server.Network
public static void SendMapDetails(this NetState ns, MapItem map)
{
if (ns == null)
if (ns.CannotSendPackets())
{
return;
}
@ -93,7 +93,7 @@ namespace Server.Network
public static void SendMapCommand(this NetState ns, MapItem map, int command, int x = 0, int y = 0, bool editable = false)
{
if (ns == null)
if (ns.CannotSendPackets())
{
return;
}