Cleanup/Housekeeping (#242)

This commit is contained in:
Kamron Batman 2020-09-12 15:31:21 -07:00 committed by GitHub
parent 90ede0659f
commit 741e8d8300
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
228 changed files with 6292 additions and 2690 deletions

View file

@ -1,6 +1,6 @@
/*************************************************************************
* ModernUO *
* Copyright (C) 2019-2020 - ModernUO Development Team *
* Copyright 2019-2020 - ModernUO Development Team *
* Email: hi@modernuo.com *
* File: MenuPackets.cs *
* *
@ -166,11 +166,15 @@ namespace Server.Network
var range = e.Range;
if (range == -1)
{
range = 18;
}
var flags = e.Flags;
if (!(e.Enabled && menu.From.InRange(p, range)))
{
flags |= CMEFlags.Disabled;
}
Stream.Write((short)flags);
}
@ -213,21 +217,29 @@ namespace Server.Network
var range = e.Range;
if (range == -1)
{
range = 18;
}
var flags = e.Flags;
if (!(e.Enabled && menu.From.InRange(p, range)))
{
flags |= CMEFlags.Disabled;
}
var color = e.Color & 0xFFFF;
if (color != 0xFFFF)
{
flags |= CMEFlags.Colored;
}
Stream.Write((short)flags);
if ((flags & CMEFlags.Colored) != 0)
{
Stream.Write((short)color);
}
}
}
}