Adds property sorting for json output (#266)
This commit is contained in:
parent
ddc58ec707
commit
12e935e4f4
31 changed files with 228 additions and 130 deletions
|
|
@ -25,16 +25,16 @@ namespace Server.Configurations
|
|||
{
|
||||
private const string m_RelPath = "Configuration/email-settings.json";
|
||||
|
||||
public static bool EmailEnabled { get; private set; }
|
||||
public static MailboxAddress FromAddress { get; private set; }
|
||||
public static MailboxAddress CrashAddress { get; private set; }
|
||||
public static MailboxAddress SpeechLogPageAddress { get; private set; }
|
||||
public static string EmailServer { get; private set; }
|
||||
public static bool EmailEnabled { get; private set; }
|
||||
public static int EmailPort { get; private set; }
|
||||
public static string EmailServerUsername { get; private set; }
|
||||
public static string EmailServerPassword { get; private set; }
|
||||
public static int EmailSendRetryCount { get; private set; } // seconds
|
||||
public static int EmailSendRetryDelay { get; private set; } // seconds
|
||||
public static string EmailServer { get; private set; }
|
||||
public static string EmailServerUsername { get; private set; }
|
||||
public static string EmailServerPassword { get; private set; }
|
||||
public static MailboxAddress FromAddress { get; private set; }
|
||||
public static MailboxAddress SpeechLogPageAddress { get; private set; }
|
||||
|
||||
public static void Configure()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -173,7 +173,7 @@ namespace Server.Engines.BulkOrders
|
|||
|
||||
if (points >= group.Points)
|
||||
{
|
||||
return @group;
|
||||
return group;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -498,7 +498,7 @@ namespace Server.Engines.Craft
|
|||
|
||||
if (index >= 0 && index < group.CraftItems.Count)
|
||||
{
|
||||
CraftItem(@group.CraftItems[index]);
|
||||
CraftItem(group.CraftItems[index]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -519,7 +519,7 @@ namespace Server.Engines.Craft
|
|||
|
||||
if (index >= 0 && index < group.CraftItems.Count)
|
||||
{
|
||||
m_From.SendGump(new CraftGumpItem(m_From, system, @group.CraftItems[index], m_Tool));
|
||||
m_From.SendGump(new CraftGumpItem(m_From, system, group.CraftItems[index], m_Tool));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -133,7 +133,7 @@ namespace Server.Guilds
|
|||
|
||||
if (pm == null || !IsMember(pm, guild) || !pm.GuildRank.GetFlag(RankFlags.CanInvitePlayer))
|
||||
{
|
||||
pm.SendLocalizedMessage(503301); // You don't have permission to do that.
|
||||
from.SendLocalizedMessage(503301); // You don't have permission to do that.
|
||||
}
|
||||
else if (targ == null)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -179,11 +179,11 @@ namespace Server.Gumps
|
|||
|
||||
/*
|
||||
private static bool PrevLabel = OldStyle, NextLabel = OldStyle;
|
||||
|
||||
|
||||
private static readonly int PrevLabelOffsetX = PrevWidth + 1;
|
||||
|
||||
|
||||
private static readonly int PrevLabelOffsetY = 0;
|
||||
|
||||
|
||||
private static readonly int NextLabelOffsetX = -29;
|
||||
private static readonly int NextLabelOffsetY = 0;
|
||||
* */
|
||||
|
|
@ -306,108 +306,110 @@ namespace Server.Gumps
|
|||
AddImageTiled(x, y, SetWidth, EntryHeight, SetGumpID);
|
||||
}
|
||||
|
||||
if (group == selected)
|
||||
if (group != selected)
|
||||
{
|
||||
var indentMaskX = BorderSize;
|
||||
var indentMaskY = y + EntryHeight + OffsetSize;
|
||||
continue;
|
||||
}
|
||||
|
||||
for (var j = 0; j < group.Skills.Length; ++j)
|
||||
{
|
||||
var sk = target.Skills[group.Skills[j]];
|
||||
var indentMaskX = BorderSize;
|
||||
var indentMaskY = y + EntryHeight + OffsetSize;
|
||||
|
||||
x = BorderSize + OffsetSize;
|
||||
y += EntryHeight + OffsetSize;
|
||||
for (var j = 0; j < group!.Skills.Length; ++j)
|
||||
{
|
||||
var sk = target.Skills[group.Skills[j]];
|
||||
|
||||
x += OffsetSize;
|
||||
x += IndentWidth;
|
||||
x = BorderSize + OffsetSize;
|
||||
y += EntryHeight + OffsetSize;
|
||||
|
||||
AddImageTiled(x, y, PrevWidth, EntryHeight, HeaderGumpID);
|
||||
x += OffsetSize;
|
||||
x += IndentWidth;
|
||||
|
||||
AddButton(x + PrevOffsetX, y + PrevOffsetY, 0x15E1, 0x15E5, GetButtonID(1, j));
|
||||
AddImageTiled(x, y, PrevWidth, EntryHeight, HeaderGumpID);
|
||||
|
||||
x += PrevWidth + OffsetSize;
|
||||
AddButton(x + PrevOffsetX, y + PrevOffsetY, 0x15E1, 0x15E5, GetButtonID(1, j));
|
||||
|
||||
x -= OldStyle ? OffsetSize : 0;
|
||||
x += PrevWidth + OffsetSize;
|
||||
|
||||
AddImageTiled(
|
||||
x,
|
||||
y,
|
||||
emptyWidth + (OldStyle ? OffsetSize * 2 : 0) - OffsetSize - IndentWidth,
|
||||
EntryHeight,
|
||||
EntryGumpID
|
||||
);
|
||||
AddLabel(x + TextOffsetX, y, TextHue, sk == null ? "(null)" : sk.Name);
|
||||
|
||||
x += emptyWidth + (OldStyle ? OffsetSize * 2 : 0) - OffsetSize - IndentWidth;
|
||||
x += OffsetSize;
|
||||
|
||||
if (SetGumpID != 0)
|
||||
{
|
||||
AddImageTiled(x, y, SetWidth, EntryHeight, SetGumpID);
|
||||
}
|
||||
|
||||
if (sk != null)
|
||||
{
|
||||
int buttonID1, buttonID2;
|
||||
int xOffset, yOffset;
|
||||
|
||||
switch (sk.Lock)
|
||||
{
|
||||
default:
|
||||
buttonID1 = 0x983;
|
||||
buttonID2 = 0x983;
|
||||
xOffset = 6;
|
||||
yOffset = 4;
|
||||
break;
|
||||
case SkillLock.Down:
|
||||
buttonID1 = 0x985;
|
||||
buttonID2 = 0x985;
|
||||
xOffset = 6;
|
||||
yOffset = 4;
|
||||
break;
|
||||
case SkillLock.Locked:
|
||||
buttonID1 = 0x82C;
|
||||
buttonID2 = 0x82C;
|
||||
xOffset = 5;
|
||||
yOffset = 2;
|
||||
break;
|
||||
}
|
||||
|
||||
AddButton(x + xOffset, y + yOffset, buttonID1, buttonID2, GetButtonID(2, j));
|
||||
|
||||
y += 1;
|
||||
x -= OffsetSize;
|
||||
x -= 1;
|
||||
x -= 50;
|
||||
|
||||
AddImageTiled(x, y, 50, EntryHeight - 2, OffsetGumpID);
|
||||
|
||||
x += 1;
|
||||
y += 1;
|
||||
|
||||
AddImageTiled(x, y, 48, EntryHeight - 4, EntryGumpID);
|
||||
|
||||
AddLabelCropped(
|
||||
x + TextOffsetX,
|
||||
y - 1,
|
||||
48 - TextOffsetX,
|
||||
EntryHeight - 3,
|
||||
TextHue,
|
||||
sk.Base.ToString("F1")
|
||||
);
|
||||
|
||||
y -= 2;
|
||||
}
|
||||
}
|
||||
x -= OldStyle ? OffsetSize : 0;
|
||||
|
||||
AddImageTiled(
|
||||
indentMaskX,
|
||||
indentMaskY,
|
||||
IndentWidth + OffsetSize,
|
||||
group.Skills.Length * (EntryHeight + OffsetSize) - (i < m_Groups.Length - 1 ? OffsetSize : 0),
|
||||
BackGumpID + 4
|
||||
x,
|
||||
y,
|
||||
emptyWidth + (OldStyle ? OffsetSize * 2 : 0) - OffsetSize - IndentWidth,
|
||||
EntryHeight,
|
||||
EntryGumpID
|
||||
);
|
||||
AddLabel(x + TextOffsetX, y, TextHue, sk == null ? "(null)" : sk.Name);
|
||||
|
||||
x += emptyWidth + (OldStyle ? OffsetSize * 2 : 0) - OffsetSize - IndentWidth;
|
||||
x += OffsetSize;
|
||||
|
||||
if (SetGumpID != 0)
|
||||
{
|
||||
AddImageTiled(x, y, SetWidth, EntryHeight, SetGumpID);
|
||||
}
|
||||
|
||||
if (sk != null)
|
||||
{
|
||||
int buttonID1, buttonID2;
|
||||
int xOffset, yOffset;
|
||||
|
||||
switch (sk.Lock)
|
||||
{
|
||||
default:
|
||||
buttonID1 = 0x983;
|
||||
buttonID2 = 0x983;
|
||||
xOffset = 6;
|
||||
yOffset = 4;
|
||||
break;
|
||||
case SkillLock.Down:
|
||||
buttonID1 = 0x985;
|
||||
buttonID2 = 0x985;
|
||||
xOffset = 6;
|
||||
yOffset = 4;
|
||||
break;
|
||||
case SkillLock.Locked:
|
||||
buttonID1 = 0x82C;
|
||||
buttonID2 = 0x82C;
|
||||
xOffset = 5;
|
||||
yOffset = 2;
|
||||
break;
|
||||
}
|
||||
|
||||
AddButton(x + xOffset, y + yOffset, buttonID1, buttonID2, GetButtonID(2, j));
|
||||
|
||||
y += 1;
|
||||
x -= OffsetSize;
|
||||
x -= 1;
|
||||
x -= 50;
|
||||
|
||||
AddImageTiled(x, y, 50, EntryHeight - 2, OffsetGumpID);
|
||||
|
||||
x += 1;
|
||||
y += 1;
|
||||
|
||||
AddImageTiled(x, y, 48, EntryHeight - 4, EntryGumpID);
|
||||
|
||||
AddLabelCropped(
|
||||
x + TextOffsetX,
|
||||
y - 1,
|
||||
48 - TextOffsetX,
|
||||
EntryHeight - 3,
|
||||
TextHue,
|
||||
sk.Base.ToString("F1")
|
||||
);
|
||||
|
||||
y -= 2;
|
||||
}
|
||||
}
|
||||
|
||||
AddImageTiled(
|
||||
indentMaskX,
|
||||
indentMaskY,
|
||||
IndentWidth + OffsetSize,
|
||||
group.Skills.Length * (EntryHeight + OffsetSize) - (i < m_Groups.Length - 1 ? OffsetSize : 0),
|
||||
BackGumpID + 4
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ namespace Server
|
|||
|
||||
for (var j = 0; !contains && j < group.Length; ++j)
|
||||
{
|
||||
contains = @group[j].IsAssignableFrom(type);
|
||||
contains = group[j].IsAssignableFrom(type);
|
||||
}
|
||||
|
||||
if (contains)
|
||||
|
|
|
|||
|
|
@ -226,7 +226,7 @@ namespace Server.Spells.Necromancy
|
|||
|
||||
if (contains)
|
||||
{
|
||||
return @group;
|
||||
return group;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue