fix: Converts ConPVP to serialization generator (#2338)

This commit is contained in:
Kamron Batman 2026-02-14 14:50:10 -08:00 committed by GitHub
parent 6ffb63ec82
commit b01a40a3de
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
31 changed files with 7942 additions and 8243 deletions

File diff suppressed because it is too large Load diff

View file

@ -1,93 +1,68 @@
using ModernUO.Serialization;
using Server.Items;
namespace Server.Engines.ConPVP
namespace Server.Engines.ConPVP;
public enum DuelTeleporterType
{
public enum DuelTeleporterType
Squares = 6095,
Buds = 6104,
Flowers = 6113,
Spikes = 6122,
Arrows = 6140,
Links = 6149
}
[SerializationGenerator(0, false)]
public partial class DuelTeleporterAddon : BaseAddon
{
[Constructible]
public DuelTeleporterAddon(DuelTeleporterType type = DuelTeleporterType.Squares)
{
Squares = 6095,
Buds = 6104,
Flowers = 6113,
Spikes = 6122,
Arrows = 6140,
Links = 6149
var itemID = (int)type;
AddComponent(new AddonComponent(itemID + 0), -1, -1, 5);
AddComponent(new AddonComponent(itemID + 1), -1, 0, 5);
AddComponent(new AddonComponent(itemID + 2), 0, -1, 5);
AddComponent(new AddonComponent(itemID + 3), -1, +1, 5);
AddComponent(new AddonComponent(itemID + 4), 0, 0, 5);
AddComponent(new AddonComponent(itemID + 5), +1, -1, 5);
AddComponent(new AddonComponent(itemID + 6), 0, +1, 5);
AddComponent(new AddonComponent(itemID + 7), +1, 0, 5);
AddComponent(new AddonComponent(itemID + 8), +1, +1, 5);
AddComponent(new AddonComponent(0x759), -2, -2, 0);
AddComponent(new AddonComponent(0x75A), +2, +2, 0);
AddComponent(new AddonComponent(0x75B), -2, +2, 0);
AddComponent(new AddonComponent(0x75C), +2, -2, 0);
AddComponent(new AddonComponent(0x751), -1, +2, 0);
AddComponent(new AddonComponent(0x751), 0, +2, 0);
AddComponent(new AddonComponent(0x751), +1, +2, 0);
AddComponent(new AddonComponent(0x752), +2, -1, 0);
AddComponent(new AddonComponent(0x752), +2, 0, 0);
AddComponent(new AddonComponent(0x752), +2, +1, 0);
AddComponent(new AddonComponent(0x753), -1, -2, 0);
AddComponent(new AddonComponent(0x753), 0, -2, 0);
AddComponent(new AddonComponent(0x753), +1, -2, 0);
AddComponent(new AddonComponent(0x754), -2, -1, 0);
AddComponent(new AddonComponent(0x754), -2, 0, 0);
AddComponent(new AddonComponent(0x754), -2, +1, 0);
}
public class DuelTeleporterAddon : BaseAddon
[CommandProperty(AccessLevel.GameMaster)]
public DuelTeleporterType Type
{
[Constructible]
public DuelTeleporterAddon(DuelTeleporterType type = DuelTeleporterType.Squares)
get => Components.Count > 0 ? (DuelTeleporterType)Components[0].ItemID : DuelTeleporterType.Squares;
set
{
var itemID = (int)type;
AddComponent(new AddonComponent(itemID + 0), -1, -1, 5);
AddComponent(new AddonComponent(itemID + 1), -1, 0, 5);
AddComponent(new AddonComponent(itemID + 2), 0, -1, 5);
AddComponent(new AddonComponent(itemID + 3), -1, +1, 5);
AddComponent(new AddonComponent(itemID + 4), 0, 0, 5);
AddComponent(new AddonComponent(itemID + 5), +1, -1, 5);
AddComponent(new AddonComponent(itemID + 6), 0, +1, 5);
AddComponent(new AddonComponent(itemID + 7), +1, 0, 5);
AddComponent(new AddonComponent(itemID + 8), +1, +1, 5);
AddComponent(new AddonComponent(0x759), -2, -2, 0);
AddComponent(new AddonComponent(0x75A), +2, +2, 0);
AddComponent(new AddonComponent(0x75B), -2, +2, 0);
AddComponent(new AddonComponent(0x75C), +2, -2, 0);
AddComponent(new AddonComponent(0x751), -1, +2, 0);
AddComponent(new AddonComponent(0x751), 0, +2, 0);
AddComponent(new AddonComponent(0x751), +1, +2, 0);
AddComponent(new AddonComponent(0x752), +2, -1, 0);
AddComponent(new AddonComponent(0x752), +2, 0, 0);
AddComponent(new AddonComponent(0x752), +2, +1, 0);
AddComponent(new AddonComponent(0x753), -1, -2, 0);
AddComponent(new AddonComponent(0x753), 0, -2, 0);
AddComponent(new AddonComponent(0x753), +1, -2, 0);
AddComponent(new AddonComponent(0x754), -2, -1, 0);
AddComponent(new AddonComponent(0x754), -2, 0, 0);
AddComponent(new AddonComponent(0x754), -2, +1, 0);
}
public DuelTeleporterAddon(Serial serial) : base(serial)
{
}
[CommandProperty(AccessLevel.GameMaster)]
public DuelTeleporterType Type
{
get
for (var i = 0; i < Components.Count && i < 9; ++i)
{
if (Components.Count > 0)
{
return (DuelTeleporterType)Components[0].ItemID;
}
return DuelTeleporterType.Squares;
Components[i].ItemID = i + (int)value;
}
set
{
for (var i = 0; i < Components.Count && i < 9; ++i)
{
Components[i].ItemID = i + (int)value;
}
}
}
public override void Serialize(IGenericWriter writer)
{
base.Serialize(writer);
writer.Write(0); // version
}
public override void Deserialize(IGenericReader reader)
{
base.Deserialize(reader);
var version = reader.ReadInt();
}
}
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,70 +1,51 @@
using ModernUO.Serialization;
using Server.Gumps;
using Server.Items;
namespace Server.Engines.ConPVP
namespace Server.Engines.ConPVP;
[SerializationGenerator(0, false)]
public abstract partial class EventController : Item
{
public abstract class EventController : Item
public EventController() : base(0x1B7A)
{
public EventController()
: base(0x1B7A)
{
Visible = false;
Movable = false;
}
public EventController(Serial serial)
: base(serial)
{
}
public abstract string Title { get; }
public abstract EventGame Construct(DuelContext dc);
public abstract string GetTeamName(int teamID);
public override void Serialize(IGenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize(IGenericReader reader)
{
base.Deserialize(reader);
var version = reader.ReadInt();
}
public override void OnDoubleClick(Mobile from)
{
if (from.AccessLevel >= AccessLevel.GameMaster)
{
from.SendGump(new PropertiesGump(from, this));
}
}
Visible = false;
Movable = false;
}
public abstract class EventGame
public abstract string Title { get; }
public abstract EventGame Construct(DuelContext dc);
public abstract string GetTeamName(int teamID);
public override void OnDoubleClick(Mobile from)
{
protected DuelContext m_Context;
public EventGame(DuelContext context) => m_Context = context;
public DuelContext Context => m_Context;
public virtual bool FreeConsume => true;
public virtual bool OnDeath(Mobile mob, Container corpse) => true;
public virtual bool CantDoAnything(Mobile mob) => false;
public virtual void OnStart()
{
}
public virtual void OnStop()
if (from.AccessLevel >= AccessLevel.GameMaster)
{
from.SendGump(new PropertiesGump(from, this));
}
}
}
public abstract class EventGame
{
protected DuelContext m_Context;
public EventGame(DuelContext context) => m_Context = context;
public DuelContext Context => m_Context;
public virtual bool FreeConsume => true;
public virtual bool OnDeath(Mobile mob, Container corpse) => true;
public virtual bool CantDoAnything(Mobile mob) => false;
public virtual void OnStart()
{
}
public virtual void OnStop()
{
}
}

File diff suppressed because it is too large Load diff

View file

@ -1,296 +1,278 @@
using System.Collections.Generic;
using System.Text;
using ModernUO.Serialization;
using Server.Gumps;
using Server.Mobiles;
using Server.Network;
namespace Server.Engines.ConPVP
namespace Server.Engines.ConPVP;
[SerializationGenerator(0, false)]
public partial class ArenasMoongate : Item
{
public class ArenasMoongate : Item
[Constructible]
public ArenasMoongate() : base(0x1FD4)
{
[Constructible]
public ArenasMoongate() : base(0x1FD4)
{
Movable = false;
Light = LightType.Circle300;
}
public ArenasMoongate(Serial serial) : base(serial)
{
}
public override string DefaultName => "arena moongate";
public override void Serialize(IGenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize(IGenericReader reader)
{
base.Deserialize(reader);
var version = reader.ReadInt();
Light = LightType.Circle300;
}
public bool UseGate(Mobile from)
{
if (DuelContext.CheckCombat(from))
{
from.SendMessage(0x22, "You have recently been in combat with another player and cannot use this moongate.");
return false;
}
if (from.Spell != null)
{
from.SendLocalizedMessage(1049616); // You are too busy to do that at the moment.
return false;
}
from.SendGump(new ArenaGump(from, this));
if (!from.Hidden || from.AccessLevel == AccessLevel.Player)
{
Effects.PlaySound(from.Location, from.Map, 0x20E);
}
return true;
}
public override void OnDoubleClick(Mobile from)
{
if (from.InRange(GetWorldLocation(), 1))
{
UseGate(from);
}
else
{
from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that
}
}
public override bool OnMoveOver(Mobile m) => !m.Player || UseGate(m);
Movable = false;
Light = LightType.Circle300;
}
public class ArenaGump : Gump
public override string DefaultName => "arena moongate";
public bool UseGate(Mobile from)
{
private readonly List<Arena> m_Arenas;
private readonly Mobile m_From;
private readonly ArenasMoongate m_Gate;
private int m_ColumnX = 12;
public override bool Singleton => true;
public ArenaGump(Mobile from, ArenasMoongate gate) : base(50, 50)
if (DuelContext.CheckCombat(from))
{
m_From = from;
m_Gate = gate;
m_Arenas = Arena.Arenas;
AddPage(0);
var height = 12 + 20 + m_Arenas.Count * 31 + 24 + 12;
AddBackground(0, 0, 499 + 40, height, 0x2436);
var list = m_Arenas;
for (var i = 1; i < list.Count; i += 2)
{
AddImageTiled(12, 32 + i * 31, 475 + 40, 30, 0x2430);
}
AddAlphaRegion(10, 10, 479 + 40, height - 20);
AddColumnHeader(35, null);
AddColumnHeader(115, "Arena");
AddColumnHeader(325, "Participants");
AddColumnHeader(40, "Obs");
AddButton(499 + 40 - 12 - 63 - 4 - 63, height - 12 - 24, 247, 248, 1);
AddButton(499 + 40 - 12 - 63, height - 12 - 24, 241, 242, 2);
for (var i = 0; i < list.Count; ++i)
{
var ar = list[i];
var x = 12;
var y = 32 + i * 31;
var color = ar.Players.Count > 0 ? 0xCCFFCC : 0xCCCCCC;
AddRadio(x + 3, y + 1, 9727, 9730, false, i);
x += 35;
AddBorderedText(x + 5, y + 5, 115 - 5, ar.Name ?? "(no name)", color, 0);
x += 115;
var sb = new StringBuilder();
if (ar.Players.Count > 0)
{
var ladder = Ladder.Instance;
if (ladder == null)
{
continue;
}
LadderEntry p1 = null, p2 = null, p3 = null, p4 = null;
for (var j = 0; j < ar.Players.Count; ++j)
{
var mob = ar.Players[j];
var c = ladder.Find(mob);
if (p1 == null || c.Index < p1.Index)
{
p4 = p3;
p3 = p2;
p2 = p1;
p1 = c;
}
else if (p2 == null || c.Index < p2.Index)
{
p4 = p3;
p3 = p2;
p2 = c;
}
else if (p3 == null || c.Index < p3.Index)
{
p4 = p3;
p3 = c;
}
else if (p4 == null || c.Index < p4.Index)
{
p4 = c;
}
}
Append(sb, p1);
Append(sb, p2);
Append(sb, p3);
Append(sb, p4);
if (ar.Players.Count > 4)
{
sb.Append(", ...");
}
}
else
{
sb.Append("Empty");
}
AddBorderedText(x + 5, y + 5, 325 - 5, sb.ToString(), color, 0);
x += 325;
AddBorderedText(x, y + 5, 40, Html.Center($"{ar.Spectators}"), color, 0);
}
from.SendMessage(0x22, "You have recently been in combat with another player and cannot use this moongate.");
return false;
}
private void Append(StringBuilder sb, LadderEntry le)
if (from.Spell != null)
{
if (le == null)
{
return;
}
if (sb.Length > 0)
{
sb.Append(", ");
}
sb.Append(le.Mobile.Name);
from.SendLocalizedMessage(1049616); // You are too busy to do that at the moment.
return false;
}
public override void OnResponse(NetState sender, in RelayInfo info)
from.SendGump(new ArenaGump(from, this));
if (!from.Hidden || from.AccessLevel == AccessLevel.Player)
{
if (info.ButtonID != 1)
{
return;
}
Effects.PlaySound(from.Location, from.Map, 0x20E);
}
var switches = info.Switches;
return true;
}
if (switches.Length == 0)
{
return;
}
public override void OnDoubleClick(Mobile from)
{
if (from.InRange(GetWorldLocation(), 1))
{
UseGate(from);
}
else
{
from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that
}
}
var opt = switches[0];
public override bool OnMoveOver(Mobile m) => !m.Player || UseGate(m);
}
if (opt < 0 || opt >= m_Arenas.Count)
{
return;
}
public class ArenaGump : Gump
{
private readonly List<Arena> m_Arenas;
private readonly Mobile m_From;
private readonly ArenasMoongate m_Gate;
var arena = m_Arenas[opt];
private int m_ColumnX = 12;
if (!m_From.InRange(m_Gate.GetWorldLocation(), 1) || m_From.Map != m_Gate.Map)
public override bool Singleton => true;
public ArenaGump(Mobile from, ArenasMoongate gate) : base(50, 50)
{
m_From = from;
m_Gate = gate;
m_Arenas = Arena.Arenas;
AddPage(0);
var height = 12 + 20 + m_Arenas.Count * 31 + 24 + 12;
AddBackground(0, 0, 499 + 40, height, 0x2436);
var list = m_Arenas;
for (var i = 1; i < list.Count; i += 2)
{
AddImageTiled(12, 32 + i * 31, 475 + 40, 30, 0x2430);
}
AddAlphaRegion(10, 10, 479 + 40, height - 20);
AddColumnHeader(35, null);
AddColumnHeader(115, "Arena");
AddColumnHeader(325, "Participants");
AddColumnHeader(40, "Obs");
AddButton(499 + 40 - 12 - 63 - 4 - 63, height - 12 - 24, 247, 248, 1);
AddButton(499 + 40 - 12 - 63, height - 12 - 24, 241, 242, 2);
for (var i = 0; i < list.Count; ++i)
{
var ar = list[i];
var x = 12;
var y = 32 + i * 31;
var color = ar.Players.Count > 0 ? 0xCCFFCC : 0xCCCCCC;
AddRadio(x + 3, y + 1, 9727, 9730, false, i);
x += 35;
AddBorderedText(x + 5, y + 5, 115 - 5, ar.Name ?? "(no name)", color, 0);
x += 115;
var sb = new StringBuilder();
if (ar.Players.Count > 0)
{
m_From.SendLocalizedMessage(1019002); // You are too far away to use the gate.
}
else if (DuelContext.CheckCombat(m_From))
{
m_From.SendMessage(
0x22,
"You have recently been in combat with another player and cannot use this moongate."
);
}
else if (m_From.Spell != null)
{
m_From.SendLocalizedMessage(1049616); // You are too busy to do that at the moment.
}
else if (m_From.Map == arena.Facet && arena.Zone.Contains(m_From.Location))
{
m_From.SendLocalizedMessage(1019003); // You are already there.
var ladder = Ladder.Instance;
if (ladder == null)
{
continue;
}
LadderEntry p1 = null, p2 = null, p3 = null, p4 = null;
for (var j = 0; j < ar.Players.Count; ++j)
{
var mob = ar.Players[j];
var c = ladder.Find(mob);
if (p1 == null || c.Index < p1.Index)
{
p4 = p3;
p3 = p2;
p2 = p1;
p1 = c;
}
else if (p2 == null || c.Index < p2.Index)
{
p4 = p3;
p3 = p2;
p2 = c;
}
else if (p3 == null || c.Index < p3.Index)
{
p4 = p3;
p3 = c;
}
else if (p4 == null || c.Index < p4.Index)
{
p4 = c;
}
}
Append(sb, p1);
Append(sb, p2);
Append(sb, p3);
Append(sb, p4);
if (ar.Players.Count > 4)
{
sb.Append(", ...");
}
}
else
{
BaseCreature.TeleportPets(m_From, arena.GateIn, arena.Facet);
m_From.Combatant = null;
m_From.Warmode = false;
m_From.Hidden = true;
m_From.MoveToWorld(arena.GateIn, arena.Facet);
Effects.PlaySound(arena.GateIn, arena.Facet, 0x1FE);
}
}
private void AddBorderedText(int x, int y, int width, string text, int color, int borderColor)
{
/*AddColoredText( x - 1, y, width, text, borderColor );
AddColoredText( x + 1, y, width, text, borderColor );
AddColoredText( x, y - 1, width, text, borderColor );
AddColoredText( x, y + 1, width, text, borderColor );*/
/*AddColoredText( x - 1, y - 1, width, text, borderColor );
AddColoredText( x + 1, y + 1, width, text, borderColor );*/
AddColoredText(x, y, width, text, color);
}
private void AddColoredText(int x, int y, int width, string text, int color)
{
AddHtml(x, y, width, 20, color == 0 ? text : text.Color(color));
}
private void AddColumnHeader(int width, string name)
{
AddBackground(m_ColumnX, 12, width, 20, 0x242C);
AddImageTiled(m_ColumnX + 2, 14, width - 4, 16, 0x2430);
if (name != null)
{
AddBorderedText(m_ColumnX, 13, width, name.Center(), 0xFFFFFF, 0);
sb.Append("Empty");
}
m_ColumnX += width;
AddBorderedText(x + 5, y + 5, 325 - 5, sb.ToString(), color, 0);
x += 325;
AddBorderedText(x, y + 5, 40, Html.Center($"{ar.Spectators}"), color, 0);
}
}
private void Append(StringBuilder sb, LadderEntry le)
{
if (le == null)
{
return;
}
if (sb.Length > 0)
{
sb.Append(", ");
}
sb.Append(le.Mobile.Name);
}
public override void OnResponse(NetState sender, in RelayInfo info)
{
if (info.ButtonID != 1)
{
return;
}
var switches = info.Switches;
if (switches.Length == 0)
{
return;
}
var opt = switches[0];
if (opt < 0 || opt >= m_Arenas.Count)
{
return;
}
var arena = m_Arenas[opt];
if (!m_From.InRange(m_Gate.GetWorldLocation(), 1) || m_From.Map != m_Gate.Map)
{
m_From.SendLocalizedMessage(1019002); // You are too far away to use the gate.
}
else if (DuelContext.CheckCombat(m_From))
{
m_From.SendMessage(
0x22,
"You have recently been in combat with another player and cannot use this moongate."
);
}
else if (m_From.Spell != null)
{
m_From.SendLocalizedMessage(1049616); // You are too busy to do that at the moment.
}
else if (m_From.Map == arena.Facet && arena.Zone.Contains(m_From.Location))
{
m_From.SendLocalizedMessage(1019003); // You are already there.
}
else
{
BaseCreature.TeleportPets(m_From, arena.GateIn, arena.Facet);
m_From.Combatant = null;
m_From.Warmode = false;
m_From.Hidden = true;
m_From.MoveToWorld(arena.GateIn, arena.Facet);
Effects.PlaySound(arena.GateIn, arena.Facet, 0x1FE);
}
}
private void AddBorderedText(int x, int y, int width, string text, int color, int borderColor)
{
/*AddColoredText( x - 1, y, width, text, borderColor );
AddColoredText( x + 1, y, width, text, borderColor );
AddColoredText( x, y - 1, width, text, borderColor );
AddColoredText( x, y + 1, width, text, borderColor );*/
/*AddColoredText( x - 1, y - 1, width, text, borderColor );
AddColoredText( x + 1, y + 1, width, text, borderColor );*/
AddColoredText(x, y, width, text, color);
}
private void AddColoredText(int x, int y, int width, string text, int color)
{
AddHtml(x, y, width, 20, color == 0 ? text : text.Color(color));
}
private void AddColumnHeader(int width, string name)
{
AddBackground(m_ColumnX, 12, width, 20, 0x242C);
AddImageTiled(m_ColumnX + 2, 14, width - 4, 16, 0x2430);
if (name != null)
{
AddBorderedText(m_ColumnX, 13, width, name.Center(), 0xFFFFFF, 0);
}
m_ColumnX += width;
}
}

View file

@ -1,259 +1,232 @@
using System;
using System.Collections.Generic;
using ModernUO.Serialization;
using Server.Gumps;
using Server.Network;
namespace Server.Engines.ConPVP
namespace Server.Engines.ConPVP;
[SerializationGenerator(0, false)]
public partial class LadderItem : Item
{
public class LadderItem : Item
[SerializedCommandProperty(AccessLevel.GameMaster)]
[SerializableField(0)]
private LadderController _ladder;
[Constructible]
public LadderItem() : base(0x117F) => Movable = false;
public override string DefaultName => "1v1 leaderboard";
public override void OnDoubleClick(Mobile from)
{
[Constructible]
public LadderItem() : base(0x117F) => Movable = false;
public LadderItem(Serial serial) : base(serial)
if (from.InRange(GetWorldLocation(), 2))
{
}
var ladder = ConPVP.Ladder.Instance ?? Ladder.Ladder;
[CommandProperty(AccessLevel.GameMaster)]
public LadderController Ladder { get; set; }
public override string DefaultName => "1v1 leaderboard";
public override void Serialize(IGenericWriter writer)
{
base.Serialize(writer);
writer.Write(1);
writer.Write(Ladder);
}
public override void Deserialize(IGenericReader reader)
{
base.Deserialize(reader);
var version = reader.ReadInt();
switch (version)
if (ladder != null)
{
case 1:
{
Ladder = reader.ReadEntity<LadderController>();
break;
}
from.SendGump(new LadderGump(ladder), true);
}
}
public override void OnDoubleClick(Mobile from)
else
{
if (from.InRange(GetWorldLocation(), 2))
{
var ladder = ConPVP.Ladder.Instance ?? Ladder.Ladder;
if (ladder != null)
{
from.SendGump(new LadderGump(ladder), true);
}
}
else
{
from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that
}
}
}
public class LadderGump : Gump
{
private readonly Ladder m_Ladder;
private readonly List<LadderEntry> m_List;
private readonly int m_Page;
private int m_ColumnX = 12;
public LadderGump(Ladder ladder, int page = 0) : base(50, 50)
{
m_Ladder = ladder;
m_Page = page;
AddPage(0);
m_List = new List<LadderEntry>(ladder.Entries);
var lc = Math.Min(m_List.Count, 150);
var start = page * 15;
var end = start + 15;
if (end > lc)
{
end = lc;
}
var ct = end - start;
var height = 12 + 20 + ct * 20 + 23 + 12;
AddBackground(0, 0, 499, height, 0x2436);
for (var i = start + 1; i < end; i += 2)
{
AddImageTiled(12, 32 + (i - start) * 20, 475, 20, 0x2430);
}
AddAlphaRegion(10, 10, 479, height - 20);
if (page > 0)
{
AddButton(446, height - 12 - 2 - 16, 0x15E3, 0x15E7, 1);
}
else
{
AddImage(446, height - 12 - 2 - 16, 0x2626);
}
if ((page + 1) * 15 < lc)
{
AddButton(466, height - 12 - 2 - 16, 0x15E1, 0x15E5, 2);
}
else
{
AddImage(466, height - 12 - 2 - 16, 0x2622);
}
AddHtml(
16,
height - 12 - 2 - 18,
400,
20,
Html.Color($"Top {lc} of {m_List.Count:N0} duelists, page {page + 1} of {(lc + 14) / 15}", 0xFFC000)
);
AddColumnHeader(75, "Rank");
AddColumnHeader(115, "Level");
AddColumnHeader(50, "Guild");
AddColumnHeader(115, "Name");
AddColumnHeader(60, "Wins");
AddColumnHeader(60, "Losses");
for (var i = start; i < end && i < lc; ++i)
{
var entry = m_List[i];
var y = 32 + (i - start) * 20;
var x = 12;
AddBorderedText(x, y, 75, Rank(i + 1).Center(), 0xFFFFFF, 0);
x += 75;
/*AddImage( 20, y + 5, 0x2616, 0x96C );
AddImage( 22, y + 5, 0x2616, 0x96C );
AddImage( 20, y + 7, 0x2616, 0x96C );
AddImage( 22, y + 7, 0x2616, 0x96C );
AddImage( 21, y + 6, 0x2616, 0x454 );*/
AddImage(x + 3, y + 4, 0x805);
var xp = entry.Experience;
var level = Ladder.GetLevel(xp);
Ladder.GetLevelInfo(level, out var xpBase, out var xpAdvance);
int width;
var xpOffset = xp - xpBase;
if (xpOffset >= xpAdvance)
{
width = 109; // level 50
}
else
{
width = (109 * xpOffset + xpAdvance / 2) / (xpAdvance - 1);
}
// AddImageTiled( 21, y + 6, width, 8, 0x2617 );
AddImageTiled(x + 3, y + 4, width, 11, 0x806);
AddBorderedText(x, y, 115, Html.Center($"{level}"), 0xFFFFFF, 0);
x += 115;
var mob = entry.Mobile;
if (mob.Guild != null)
{
AddBorderedText(x, y, 50, mob.Guild.Abbreviation.Center(), 0xFFFFFF, 0);
}
x += 50;
AddBorderedText(x + 5, y, 115 - 5, mob.Name, 0xFFFFFF, 0);
x += 115;
AddBorderedText(x, y, 60, Html.Center($"{entry.Wins}"), 0xFFFFFF, 0);
x += 60;
AddBorderedText(x, y, 60, Html.Center($"{entry.Losses}"), 0xFFFFFF, 0);
x += 60;
// AddBorderedText( 292 + 15, y, 115 - 30, String.Format( "{0} <DIV ALIGN=CENTER>/</DIV> <DIV ALIGN=RIGHT>{1}</DIV>", entry.Wins, entry.Losses ), 0xFFC000, 0 );
}
}
public static string Rank(int num)
{
var numStr = num.ToString("N0");
if (num % 100 > 10 && num % 100 < 20)
{
return $"{numStr}th";
}
return (num % 10) switch
{
1 => $"{numStr}st",
2 => $"{numStr}nd",
3 => $"{numStr}rd",
_ => $"{numStr}th"
};
}
public override void OnResponse(NetState sender, in RelayInfo info)
{
var from = sender.Mobile;
if (info.ButtonID == 1 && m_Page > 0)
{
from.SendGump(new LadderGump(m_Ladder, m_Page - 1));
}
else if (info.ButtonID == 2 && (m_Page + 1) * 15 < Math.Min(m_List.Count, 150))
{
from.SendGump(new LadderGump(m_Ladder, m_Page + 1));
}
}
private void AddBorderedText(int x, int y, int width, string text, int color, int borderColor)
{
/*AddColoredText( x - 1, y, width, text, borderColor );
AddColoredText( x + 1, y, width, text, borderColor );
AddColoredText( x, y - 1, width, text, borderColor );
AddColoredText( x, y + 1, width, text, borderColor );*/
/*AddColoredText( x - 1, y - 1, width, text, borderColor );
AddColoredText( x + 1, y + 1, width, text, borderColor );*/
AddColoredText(x, y, width, text, color);
}
private void AddColoredText(int x, int y, int width, string text, int color)
{
AddHtml(x, y, width, 20, color == 0 ? text : text.Color(color));
}
private void AddColumnHeader(int width, string name)
{
AddBackground(m_ColumnX, 12, width, 20, 0x242C);
AddImageTiled(m_ColumnX + 2, 14, width - 4, 16, 0x2430);
AddBorderedText(m_ColumnX, 13, width, name.Center(), 0xFFFFFF, 0);
m_ColumnX += width;
from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that
}
}
}
public class LadderGump : Gump
{
private readonly Ladder m_Ladder;
private readonly List<LadderEntry> m_List;
private readonly int m_Page;
private int m_ColumnX = 12;
public LadderGump(Ladder ladder, int page = 0) : base(50, 50)
{
m_Ladder = ladder;
m_Page = page;
AddPage(0);
m_List = new List<LadderEntry>(ladder.Entries);
var lc = Math.Min(m_List.Count, 150);
var start = page * 15;
var end = start + 15;
if (end > lc)
{
end = lc;
}
var ct = end - start;
var height = 12 + 20 + ct * 20 + 23 + 12;
AddBackground(0, 0, 499, height, 0x2436);
for (var i = start + 1; i < end; i += 2)
{
AddImageTiled(12, 32 + (i - start) * 20, 475, 20, 0x2430);
}
AddAlphaRegion(10, 10, 479, height - 20);
if (page > 0)
{
AddButton(446, height - 12 - 2 - 16, 0x15E3, 0x15E7, 1);
}
else
{
AddImage(446, height - 12 - 2 - 16, 0x2626);
}
if ((page + 1) * 15 < lc)
{
AddButton(466, height - 12 - 2 - 16, 0x15E1, 0x15E5, 2);
}
else
{
AddImage(466, height - 12 - 2 - 16, 0x2622);
}
AddHtml(
16,
height - 12 - 2 - 18,
400,
20,
Html.Color($"Top {lc} of {m_List.Count:N0} duelists, page {page + 1} of {(lc + 14) / 15}", 0xFFC000)
);
AddColumnHeader(75, "Rank");
AddColumnHeader(115, "Level");
AddColumnHeader(50, "Guild");
AddColumnHeader(115, "Name");
AddColumnHeader(60, "Wins");
AddColumnHeader(60, "Losses");
for (var i = start; i < end && i < lc; ++i)
{
var entry = m_List[i];
var y = 32 + (i - start) * 20;
var x = 12;
AddBorderedText(x, y, 75, Rank(i + 1).Center(), 0xFFFFFF, 0);
x += 75;
/*AddImage( 20, y + 5, 0x2616, 0x96C );
AddImage( 22, y + 5, 0x2616, 0x96C );
AddImage( 20, y + 7, 0x2616, 0x96C );
AddImage( 22, y + 7, 0x2616, 0x96C );
AddImage( 21, y + 6, 0x2616, 0x454 );*/
AddImage(x + 3, y + 4, 0x805);
var xp = entry.Experience;
var level = Ladder.GetLevel(xp);
Ladder.GetLevelInfo(level, out var xpBase, out var xpAdvance);
int width;
var xpOffset = xp - xpBase;
if (xpOffset >= xpAdvance)
{
width = 109; // level 50
}
else
{
width = (109 * xpOffset + xpAdvance / 2) / (xpAdvance - 1);
}
// AddImageTiled( 21, y + 6, width, 8, 0x2617 );
AddImageTiled(x + 3, y + 4, width, 11, 0x806);
AddBorderedText(x, y, 115, Html.Center($"{level}"), 0xFFFFFF, 0);
x += 115;
var mob = entry.Mobile;
if (mob.Guild != null)
{
AddBorderedText(x, y, 50, mob.Guild.Abbreviation.Center(), 0xFFFFFF, 0);
}
x += 50;
AddBorderedText(x + 5, y, 115 - 5, mob.Name, 0xFFFFFF, 0);
x += 115;
AddBorderedText(x, y, 60, Html.Center($"{entry.Wins}"), 0xFFFFFF, 0);
x += 60;
AddBorderedText(x, y, 60, Html.Center($"{entry.Losses}"), 0xFFFFFF, 0);
x += 60;
// AddBorderedText( 292 + 15, y, 115 - 30, String.Format( "{0} <DIV ALIGN=CENTER>/</DIV> <DIV ALIGN=RIGHT>{1}</DIV>", entry.Wins, entry.Losses ), 0xFFC000, 0 );
}
}
public static string Rank(int num)
{
var numStr = num.ToString("N0");
if (num % 100 > 10 && num % 100 < 20)
{
return $"{numStr}th";
}
return (num % 10) switch
{
1 => $"{numStr}st",
2 => $"{numStr}nd",
3 => $"{numStr}rd",
_ => $"{numStr}th"
};
}
public override void OnResponse(NetState sender, in RelayInfo info)
{
var from = sender.Mobile;
if (info.ButtonID == 1 && m_Page > 0)
{
from.SendGump(new LadderGump(m_Ladder, m_Page - 1));
}
else if (info.ButtonID == 2 && (m_Page + 1) * 15 < Math.Min(m_List.Count, 150))
{
from.SendGump(new LadderGump(m_Ladder, m_Page + 1));
}
}
private void AddBorderedText(int x, int y, int width, string text, int color, int borderColor)
{
/*AddColoredText( x - 1, y, width, text, borderColor );
AddColoredText( x + 1, y, width, text, borderColor );
AddColoredText( x, y - 1, width, text, borderColor );
AddColoredText( x, y + 1, width, text, borderColor );*/
/*AddColoredText( x - 1, y - 1, width, text, borderColor );
AddColoredText( x + 1, y + 1, width, text, borderColor );*/
AddColoredText(x, y, width, text, color);
}
private void AddColoredText(int x, int y, int width, string text, int color)
{
AddHtml(x, y, width, 20, color == 0 ? text : text.Color(color));
}
private void AddColumnHeader(int width, string name)
{
AddBackground(m_ColumnX, 12, width, 20, 0x242C);
AddImageTiled(m_ColumnX + 2, 14, width - 4, 16, 0x2430);
AddBorderedText(m_ColumnX, 13, width, name.Center(), 0xFFFFFF, 0);
m_ColumnX += width;
}
}

View file

@ -1,60 +1,33 @@
using ModernUO.Serialization;
using Server.Gumps;
namespace Server.Engines.ConPVP
namespace Server.Engines.ConPVP;
[SerializationGenerator(0, false)]
public partial class TournamentBracketItem : Item
{
public class TournamentBracketItem : Item
[SerializableField(0)]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private TournamentController _tournament;
[Constructible]
public TournamentBracketItem() : base(3774) => Movable = false;
public override string DefaultName => "tournament bracket";
public override void OnDoubleClick(Mobile from)
{
[Constructible]
public TournamentBracketItem() : base(3774) => Movable = false;
public TournamentBracketItem(Serial serial) : base(serial)
if (!from.InRange(GetWorldLocation(), 2))
{
from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that
}
[CommandProperty(AccessLevel.GameMaster)]
public TournamentController Tournament { get; set; }
public override string DefaultName => "tournament bracket";
public override void OnDoubleClick(Mobile from)
else
{
if (!from.InRange(GetWorldLocation(), 2))
var tourney = Tournament?.Tournament;
if (tourney != null)
{
from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that
}
else
{
var tourney = Tournament?.Tournament;
if (tourney != null)
{
from.SendGump(new TournamentBracketGump(from, tourney, TourneyBracketGumpType.Index), true);
}
}
}
public override void Serialize(IGenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
writer.Write(Tournament);
}
public override void Deserialize(IGenericReader reader)
{
base.Deserialize(reader);
var version = reader.ReadInt();
switch (version)
{
case 0:
{
Tournament = reader.ReadEntity<TournamentController>();
break;
}
from.SendGump(new TournamentBracketGump(from, tourney, TourneyBracketGumpType.Index), true);
}
}
}

View file

@ -1,108 +1,83 @@
using System;
using ModernUO.Serialization;
using Server.Factions;
using Server.Mobiles;
namespace Server.Engines.ConPVP
namespace Server.Engines.ConPVP;
[SerializationGenerator(0, false)]
public partial class TournamentRegistrar : Banker
{
public class TournamentRegistrar : Banker
[SerializedCommandProperty(AccessLevel.GameMaster)]
[SerializableField(0)]
private TournamentController _tournament;
[Constructible]
public TournamentRegistrar() =>
Timer.DelayCall(TimeSpan.FromSeconds(30.0), TimeSpan.FromSeconds(30.0), Announce_Callback);
private void Announce_Callback()
{
[Constructible]
public TournamentRegistrar()
var tourney = Tournament?.Tournament;
if (tourney?.Stage == TournamentStage.Signup)
{
Timer.StartTimer(TimeSpan.FromSeconds(30.0), TimeSpan.FromSeconds(30.0), Announce_Callback);
}
public TournamentRegistrar(Serial serial) : base(serial)
{
}
[CommandProperty(AccessLevel.GameMaster)]
public TournamentController Tournament { get; set; }
private void Announce_Callback()
{
var tourney = Tournament?.Tournament;
if (tourney?.Stage == TournamentStage.Signup)
{
PublicOverheadMessage(
MessageType.Regular,
0x35,
false,
"Come one, come all! Do you aspire to be a fighter of great renown? Join this tournament and show the world your abilities."
);
}
}
public override void OnMovement(Mobile m, Point3D oldLocation)
{
base.OnMovement(m, oldLocation);
var tourney = Tournament?.Tournament;
if (InRange(m, 4) && !InRange(oldLocation, 4) && tourney?.Stage == TournamentStage.Signup && m.CanBeginAction(this))
{
var ladder = Ladder.Instance;
var entry = ladder?.Find(m);
if (entry != null && Ladder.GetLevel(entry.Experience) < tourney.LevelRequirement)
{
return;
}
if (tourney.IsFactionRestricted && Faction.Find(m) == null)
{
return;
}
if (tourney.HasParticipant(m))
{
return;
}
PrivateOverheadMessage(
MessageType.Regular,
0x35,
false,
$"Hello m'{(m.Female ? "Lady" : "Lord")}. Dost thou wish to enter this tournament? You need only to write your name in this book.",
m.NetState
);
m.BeginAction(this);
Timer.StartTimer(TimeSpan.FromSeconds(10.0), () => ReleaseLock_Callback(m));
}
}
public void ReleaseLock_Callback(Mobile m)
{
m.EndAction(this);
}
public override void Serialize(IGenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
writer.Write(Tournament);
}
public override void Deserialize(IGenericReader reader)
{
base.Deserialize(reader);
var version = reader.ReadInt();
switch (version)
{
case 0:
{
Tournament = reader.ReadEntity<TournamentController>();
break;
}
}
Timer.StartTimer(TimeSpan.FromSeconds(30.0), TimeSpan.FromSeconds(30.0), Announce_Callback);
PublicOverheadMessage(
MessageType.Regular,
0x35,
false,
"Come one, come all! Do you aspire to be a fighter of great renown? Join this tournament and show the world your abilities."
);
}
}
public override void OnMovement(Mobile m, Point3D oldLocation)
{
base.OnMovement(m, oldLocation);
var tourney = Tournament?.Tournament;
if (InRange(m, 4) && !InRange(oldLocation, 4) && tourney?.Stage == TournamentStage.Signup && m.CanBeginAction(this))
{
var ladder = Ladder.Instance;
var entry = ladder?.Find(m);
if (entry != null && Ladder.GetLevel(entry.Experience) < tourney.LevelRequirement)
{
return;
}
if (tourney.IsFactionRestricted && Faction.Find(m) == null)
{
return;
}
if (tourney.HasParticipant(m))
{
return;
}
PrivateOverheadMessage(
MessageType.Regular,
0x35,
false,
$"Hello m'{(m.Female ? "Lady" : "Lord")}. Dost thou wish to enter this tournament? You need only to write your name in this book.",
m.NetState
);
m.BeginAction(this);
Timer.StartTimer(TimeSpan.FromSeconds(10.0), () => ReleaseLock_Callback(m));
}
}
public void ReleaseLock_Callback(Mobile m)
{
m.EndAction(this);
}
[AfterDeserialization]
private void AfterDeserialization()
{
Timer.DelayCall(TimeSpan.FromSeconds(30.0), TimeSpan.FromSeconds(30.0), Announce_Callback);
}
}

View file

@ -1,193 +1,162 @@
using System.Collections.Generic;
using ModernUO.Serialization;
using Server.Factions;
using Server.Gumps;
using Server.Mobiles;
namespace Server.Engines.ConPVP
namespace Server.Engines.ConPVP;
[SerializationGenerator(0, false)]
public partial class TournamentSignupItem : Item
{
public class TournamentSignupItem : Item
[SerializedCommandProperty(AccessLevel.GameMaster)]
[SerializableField(0)]
private TournamentController _tournament;
[SerializedCommandProperty(AccessLevel.GameMaster)]
[SerializableField(1)]
private Mobile _registrar;
[Constructible]
public TournamentSignupItem() : base(4029) => Movable = false;
public override string DefaultName => "tournament signup book";
public override void OnDoubleClick(Mobile from)
{
[Constructible]
public TournamentSignupItem() : base(4029) => Movable = false;
public TournamentSignupItem(Serial serial) : base(serial)
if (!from.InRange(GetWorldLocation(), 2))
{
from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that
}
[CommandProperty(AccessLevel.GameMaster)]
public TournamentController Tournament { get; set; }
[CommandProperty(AccessLevel.GameMaster)]
public Mobile Registrar { get; set; }
public override string DefaultName => "tournament signup book";
public override void OnDoubleClick(Mobile from)
else
{
if (!from.InRange(GetWorldLocation(), 2))
var tourney = Tournament?.Tournament;
if (tourney == null)
{
from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that
return;
}
else
Registrar?.Direction = Registrar.GetDirectionTo(this);
switch (tourney.Stage)
{
var tourney = Tournament?.Tournament;
if (tourney == null)
{
return;
}
if (Registrar != null)
{
Registrar.Direction = Registrar.GetDirectionTo(this);
}
switch (tourney.Stage)
{
case TournamentStage.Fighting:
case TournamentStage.Fighting:
{
if (Registrar != null)
{
if (Registrar != null)
if (tourney.HasParticipant(from))
{
if (tourney.HasParticipant(from))
{
Registrar.PrivateOverheadMessage(
MessageType.Regular,
0x35,
false,
"Excuse me? You are already signed up.",
from.NetState
);
}
else
{
Registrar.PrivateOverheadMessage(
MessageType.Regular,
0x22,
false,
"The tournament has already begun. You are too late to signup now.",
from.NetState
);
}
Registrar.PrivateOverheadMessage(
MessageType.Regular,
0x35,
false,
"Excuse me? You are already signed up.",
from.NetState
);
}
else
{
Registrar.PrivateOverheadMessage(
MessageType.Regular,
0x22,
false,
"The tournament has already begun. You are too late to signup now.",
from.NetState
);
}
break;
}
case TournamentStage.Inactive:
break;
}
case TournamentStage.Inactive:
{
Registrar?.PrivateOverheadMessage(
MessageType.Regular,
0x35,
false,
"The tournament is closed.",
from.NetState
);
break;
}
case TournamentStage.Signup:
{
var ladder = Ladder.Instance;
var entry = ladder?.Find(from);
if (entry != null && Ladder.GetLevel(entry.Experience) < tourney.LevelRequirement)
{
Registrar?.PrivateOverheadMessage(
MessageType.Regular,
0x35,
false,
"The tournament is closed.",
"You have not yet proven yourself a worthy dueler.",
from.NetState
);
break;
}
case TournamentStage.Signup:
if (tourney.IsFactionRestricted && Faction.Find(from) == null)
{
var ladder = Ladder.Instance;
var entry = ladder?.Find(from);
if (entry != null && Ladder.GetLevel(entry.Experience) < tourney.LevelRequirement)
{
Registrar?.PrivateOverheadMessage(
MessageType.Regular,
0x35,
false,
"You have not yet proven yourself a worthy dueler.",
from.NetState
);
break;
}
if (tourney.IsFactionRestricted && Faction.Find(from) == null)
{
Registrar?.PrivateOverheadMessage(
MessageType.Regular,
0x35,
false,
"Only those who have declared their faction allegiance may participate.",
from.NetState
);
break;
}
if (from.HasGump<AcceptTeamGump>())
{
Registrar?.PrivateOverheadMessage(
MessageType.Regular,
0x22,
false,
"You must first respond to the offer I've given you.",
from.NetState
);
}
else if (from.HasGump<AcceptDuelGump>())
{
Registrar?.PrivateOverheadMessage(
MessageType.Regular,
0x22,
false,
"You must first cancel your duel offer.",
from.NetState
);
}
else if (from is PlayerMobile mobile && mobile.DuelContext != null)
{
Registrar?.PrivateOverheadMessage(
MessageType.Regular,
0x22,
false,
"You are already participating in a duel.",
mobile.NetState
);
}
else if (!tourney.HasParticipant(from))
{
from.SendGump(new ConfirmSignupGump(from, Registrar, tourney, new List<Mobile> { from }));
}
else
{
Registrar?.PrivateOverheadMessage(
MessageType.Regular,
0x35,
false,
"You have already entered this tournament.",
from.NetState
);
}
Registrar?.PrivateOverheadMessage(
MessageType.Regular,
0x35,
false,
"Only those who have declared their faction allegiance may participate.",
from.NetState
);
break;
}
}
}
}
public override void Serialize(IGenericWriter writer)
{
base.Serialize(writer);
if (from.HasGump<AcceptTeamGump>())
{
Registrar?.PrivateOverheadMessage(
MessageType.Regular,
0x22,
false,
"You must first respond to the offer I've given you.",
from.NetState
);
}
else if (from.HasGump<AcceptDuelGump>())
{
Registrar?.PrivateOverheadMessage(
MessageType.Regular,
0x22,
false,
"You must first cancel your duel offer.",
from.NetState
);
}
else if (from is PlayerMobile mobile && mobile.DuelContext != null)
{
Registrar?.PrivateOverheadMessage(
MessageType.Regular,
0x22,
false,
"You are already participating in a duel.",
mobile.NetState
);
}
else if (!tourney.HasParticipant(from))
{
from.SendGump(new ConfirmSignupGump(from, Registrar, tourney, new List<Mobile> { from }));
}
else
{
Registrar?.PrivateOverheadMessage(
MessageType.Regular,
0x35,
false,
"You have already entered this tournament.",
from.NetState
);
}
writer.Write(0);
writer.Write(Tournament);
writer.Write(Registrar);
}
public override void Deserialize(IGenericReader reader)
{
base.Deserialize(reader);
var version = reader.ReadInt();
switch (version)
{
case 0:
{
Tournament = reader.ReadEntity<TournamentController>();
Registrar = reader.ReadEntity<Mobile>();
break;
}
}

View file

@ -0,0 +1,4 @@
{
"version": 0,
"type": "Server.Engines.ConPVP.ArenasMoongate"
}

View file

@ -0,0 +1,4 @@
{
"version": 0,
"type": "Server.Engines.ConPVP.BRBoard"
}

View file

@ -0,0 +1,4 @@
{
"version": 0,
"type": "Server.Engines.ConPVP.BRBomb"
}

View file

@ -0,0 +1,14 @@
{
"version": 0,
"type": "Server.Engines.ConPVP.BRGoal",
"properties": [
{
"name": "North",
"type": "bool",
"rule": "PrimitiveTypeMigrationRule",
"ruleArguments": [
""
]
}
]
}

View file

@ -0,0 +1,4 @@
{
"version": 0,
"type": "Server.Engines.ConPVP.CTFBoard"
}

View file

@ -0,0 +1,4 @@
{
"version": 0,
"type": "Server.Engines.ConPVP.CTFFlag"
}

View file

@ -0,0 +1,4 @@
{
"version": 0,
"type": "Server.Engines.ConPVP.DDBoard"
}

View file

@ -0,0 +1,4 @@
{
"version": 0,
"type": "Server.Engines.ConPVP.DDWayPoint.DDStep"
}

View file

@ -0,0 +1,4 @@
{
"version": 0,
"type": "Server.Engines.ConPVP.DDWayPoint"
}

View file

@ -0,0 +1,4 @@
{
"version": 0,
"type": "Server.Engines.ConPVP.DuelContext.ArenaMoongate"
}

View file

@ -0,0 +1,4 @@
{
"version": 0,
"type": "Server.Engines.ConPVP.DuelContext.InternalWall"
}

View file

@ -0,0 +1,4 @@
{
"version": 0,
"type": "Server.Engines.ConPVP.DuelTeleporterAddon"
}

View file

@ -0,0 +1,4 @@
{
"version": 0,
"type": "Server.Engines.ConPVP.EventController"
}

View file

@ -0,0 +1,14 @@
{
"version": 0,
"type": "Server.Engines.ConPVP.HillOfTheKing",
"properties": [
{
"name": "ScoreInterval",
"type": "int",
"rule": "PrimitiveTypeMigrationRule",
"ruleArguments": [
"EncodedInt"
]
}
]
}

View file

@ -0,0 +1,11 @@
{
"version": 0,
"type": "Server.Engines.ConPVP.KHBoard",
"properties": [
{
"name": "Controller",
"type": "Server.Engines.ConPVP.KHController",
"rule": "SerializableInterfaceMigrationRule"
}
]
}

View file

@ -0,0 +1,11 @@
{
"version": 0,
"type": "Server.Engines.ConPVP.LadderItem",
"properties": [
{
"name": "Ladder",
"type": "Server.Engines.ConPVP.LadderController",
"rule": "SerializableInterfaceMigrationRule"
}
]
}

View file

@ -0,0 +1,11 @@
{
"version": 0,
"type": "Server.Engines.ConPVP.TournamentBracketItem",
"properties": [
{
"name": "Tournament",
"type": "Server.Engines.ConPVP.TournamentController",
"rule": "SerializableInterfaceMigrationRule"
}
]
}

View file

@ -0,0 +1,11 @@
{
"version": 0,
"type": "Server.Engines.ConPVP.TournamentRegistrar",
"properties": [
{
"name": "Tournament",
"type": "Server.Engines.ConPVP.TournamentController",
"rule": "SerializableInterfaceMigrationRule"
}
]
}

View file

@ -0,0 +1,16 @@
{
"version": 0,
"type": "Server.Engines.ConPVP.TournamentSignupItem",
"properties": [
{
"name": "Tournament",
"type": "Server.Engines.ConPVP.TournamentController",
"rule": "SerializableInterfaceMigrationRule"
},
{
"name": "Registrar",
"type": "Server.Mobile",
"rule": "SerializableInterfaceMigrationRule"
}
]
}