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

@ -287,7 +287,7 @@ namespace Server.Engines.Mahjong
public static void SendMahjongJoinGame(this NetState ns, Serial game)
{
if (ns == null)
if (ns.CannotSendPackets())
{
return;
}
@ -303,7 +303,7 @@ namespace Server.Engines.Mahjong
public static void SendMahjongPlayersInfo(this NetState ns, MahjongGame game, Mobile to)
{
if (ns == null)
if (ns.CannotSendPackets())
{
return;
}
@ -361,7 +361,7 @@ namespace Server.Engines.Mahjong
public static void SendMahjongTileInfo(this NetState ns, MahjongTile tile, Mobile to)
{
if (ns == null)
if (ns.CannotSendPackets())
{
return;
}
@ -407,7 +407,7 @@ namespace Server.Engines.Mahjong
public static void SendMahjongTilesInfo(this NetState ns, MahjongGame game, Mobile to)
{
if (ns == null)
if (ns.CannotSendPackets())
{
return;
}
@ -460,7 +460,7 @@ namespace Server.Engines.Mahjong
public static void SendMahjongGeneralInfo(this NetState ns, MahjongGame game)
{
if (ns == null)
if (ns.CannotSendPackets())
{
return;
}
@ -503,7 +503,7 @@ namespace Server.Engines.Mahjong
public static void SendMahjongRelieve(this NetState ns, Serial game)
{
if (ns == null)
if (ns.CannotSendPackets())
{
return;
}