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

@ -4,7 +4,7 @@ using Server.Network;
namespace Server.Misc
{
public static class Profile
public class Profile
{
public static void Initialize()
{
@ -48,9 +48,12 @@ namespace Server.Misc
if (footer.Length == 0 && beholder == beheld)
footer = GetAccountDuration(beheld);
string body = beheld.Profile ?? "";
string body = beheld.Profile;
Packets.SendDisplayProfile(beholder.NetState, beholder != beheld || !beheld.ProfileLocked ? beheld.Serial : Serial.Zero, header, body, footer);
if (body == null || body.Length <= 0)
body = "";
beholder.Send(new DisplayProfile(beholder != beheld || !beheld.ProfileLocked, beheld, header, body, footer));
}
private static string GetAccountDuration(Mobile m)
@ -69,7 +72,10 @@ namespace Server.Misc
if (Format(ts.TotalMinutes, "This account is {0} minute{1} old.", out v))
return v;
return Format(ts.TotalSeconds, "This account is {0} second{1} old.", out v) ? v : "";
if (Format(ts.TotalSeconds, "This account is {0} second{1} old.", out v))
return v;
return "";
}
public static bool Format(double value, string format, out string op)
@ -84,4 +90,4 @@ namespace Server.Misc
return false;
}
}
}
}