Revert "Updates Packets & Randomizer (#43)" (#61)

This reverts commit 179cb50557.
This commit is contained in:
Kamron Batman 2019-11-11 08:46:11 -08:00 • committed by GitHub
parent 179cb50557
commit c2ecc76457
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
588 changed files with 16260 additions and 10926 deletions

View file

@ -1,4 +1,3 @@
using System.Linq;
using Server.Gumps;
using Server.Misc;
using Server.Mobiles;
@ -41,7 +40,9 @@ namespace Server.Guilds
public override void OnResponse(NetState sender, RelayInfo info)
{
if (!(sender.Mobile is PlayerMobile pm &&IsMember(pm, guild)))
PlayerMobile pm = sender.Mobile as PlayerMobile;
if (!IsMember(pm, guild))
return;
switch (info.ButtonID)
@ -84,12 +85,30 @@ namespace Server.Guilds
s = s.ToLower();
if (s.Any(c => (c < 'a' || c > 'z') && (c < '0' || c > '9') && exceptions.All(exception => exception != c)))
return false;
for (int i = 0; i < s.Length; ++i)
{
char c = s[i];
if ((c < 'a' || c > 'z') && (c < '0' || c > '9'))
{
bool except = false;
for (int j = 0; !except && j < exceptions.Length; j++)
if (c == exceptions[j])
except = true;
if (!except)
return false;
}
}
string[] disallowed = ProfanityProtection.Disallowed;
return disallowed.All(t => s.IndexOf(t) == -1);
for (int i = 0; i < disallowed.Length; i++)
if (s.IndexOf(disallowed[i]) != -1)
return false;
return true;
}
public void AddHtmlText(int x, int y, int width, int height, TextDefinition text, bool back, bool scroll)