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:
parent
5db8b1354c
commit
941452de4a
58 changed files with 5510 additions and 5537 deletions
|
|
@ -162,7 +162,7 @@ namespace Server
|
|||
long ticks
|
||||
)
|
||||
{
|
||||
if (ns == null)
|
||||
if (ns.CannotSendPackets())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
@ -207,7 +207,7 @@ namespace Server
|
|||
|
||||
public static void SendRemoveBuffPacket(NetState ns, Serial mob, BuffIcon iconID)
|
||||
{
|
||||
if (ns == null)
|
||||
if (ns.CannotSendPackets())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,19 +15,21 @@ namespace Server
|
|||
return true;
|
||||
}
|
||||
|
||||
var lowerName = name.ToLowerInvariant().Replace(" ", "");
|
||||
var lowerName = name?.ToLowerInvariant().Replace(" ", "");
|
||||
|
||||
foreach (var so in SkillInfo.Table)
|
||||
if (!string.IsNullOrEmpty(lowerName))
|
||||
{
|
||||
if (lowerName == so.ProfessionSkillName.ToLowerInvariant())
|
||||
foreach (var so in SkillInfo.Table)
|
||||
{
|
||||
skillName = (SkillName)so.SkillID;
|
||||
return true;
|
||||
if (lowerName == so.ProfessionSkillName.ToLowerInvariant())
|
||||
{
|
||||
skillName = (SkillName)so.SkillID;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
static ProfessionInfo()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue