fix: Converts ConPVP to serialization generator (#2338)
This commit is contained in:
parent
6ffb63ec82
commit
b01a40a3de
31 changed files with 7942 additions and 8243 deletions
|
|
@ -2,6 +2,7 @@ using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using ModernUO.CodeGeneratedEvents;
|
using ModernUO.CodeGeneratedEvents;
|
||||||
|
using ModernUO.Serialization;
|
||||||
using Server.Engines.PartySystem;
|
using Server.Engines.PartySystem;
|
||||||
using Server.Factions;
|
using Server.Factions;
|
||||||
using Server.Gumps;
|
using Server.Gumps;
|
||||||
|
|
@ -19,11 +20,11 @@ using Server.Spells.Seventh;
|
||||||
using Server.Spells.Spellweaving;
|
using Server.Spells.Spellweaving;
|
||||||
using Server.Targeting;
|
using Server.Targeting;
|
||||||
|
|
||||||
namespace Server.Engines.ConPVP
|
namespace Server.Engines.ConPVP;
|
||||||
{
|
|
||||||
public delegate void CountdownCallback(int count);
|
public delegate void CountdownCallback(int count);
|
||||||
|
|
||||||
public class DuelContext
|
public partial class DuelContext
|
||||||
{
|
{
|
||||||
private static readonly TimeSpan CombatDelay = TimeSpan.FromSeconds(30.0);
|
private static readonly TimeSpan CombatDelay = TimeSpan.FromSeconds(30.0);
|
||||||
private static readonly TimeSpan AutoTieDelay = TimeSpan.FromMinutes(15.0);
|
private static readonly TimeSpan AutoTieDelay = TimeSpan.FromMinutes(15.0);
|
||||||
|
|
@ -2517,14 +2518,11 @@ namespace Server.Engines.ConPVP
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private class InternalWall : Item
|
[SerializationGenerator(0, false)]
|
||||||
|
private partial class InternalWall : Item
|
||||||
{
|
{
|
||||||
public InternalWall() : base(0x80) => Movable = false;
|
public InternalWall() : base(0x80) => Movable = false;
|
||||||
|
|
||||||
public InternalWall(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Appear(Point3D loc, Map map)
|
public void Appear(Point3D loc, Map map)
|
||||||
{
|
{
|
||||||
MoveToWorld(loc, map);
|
MoveToWorld(loc, map);
|
||||||
|
|
@ -2532,21 +2530,7 @@ namespace Server.Engines.ConPVP
|
||||||
Effects.SendLocationParticles(this, 0x376A, 9, 10, 5025);
|
Effects.SendLocationParticles(this, 0x376A, 9, 10, 5025);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
public override bool SkipSerialization => true;
|
||||||
{
|
|
||||||
base.Serialize(writer);
|
|
||||||
|
|
||||||
writer.Write(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
|
||||||
{
|
|
||||||
base.Deserialize(reader);
|
|
||||||
|
|
||||||
var version = reader.ReadInt();
|
|
||||||
|
|
||||||
Delete();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private class ReturnEntry
|
private class ReturnEntry
|
||||||
|
|
@ -2740,7 +2724,8 @@ namespace Server.Engines.ConPVP
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private class ArenaMoongate : ConfirmationMoongate
|
[SerializationGenerator(0, false)]
|
||||||
|
private partial class ArenaMoongate : ConfirmationMoongate
|
||||||
{
|
{
|
||||||
private readonly ExitTeleporter m_Teleporter;
|
private readonly ExitTeleporter m_Teleporter;
|
||||||
|
|
||||||
|
|
@ -2761,9 +2746,7 @@ namespace Server.Engines.ConPVP
|
||||||
Timer.StartTimer(TimeSpan.FromSeconds(10.0), Delete);
|
Timer.StartTimer(TimeSpan.FromSeconds(10.0), Delete);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ArenaMoongate(Serial serial) : base(serial)
|
public override bool SkipSerialization => true;
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override string DefaultName => "spectator moongate";
|
public override string DefaultName => "spectator moongate";
|
||||||
|
|
||||||
|
|
@ -2807,22 +2790,5 @@ namespace Server.Engines.ConPVP
|
||||||
Effects.PlaySound(loc, map, 0x20E);
|
Effects.PlaySound(loc, map, 0x20E);
|
||||||
MoveToWorld(loc, map);
|
MoveToWorld(loc, map);
|
||||||
}
|
}
|
||||||
|
|
||||||
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();
|
|
||||||
|
|
||||||
Delete();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,8 @@
|
||||||
|
using ModernUO.Serialization;
|
||||||
using Server.Items;
|
using Server.Items;
|
||||||
|
|
||||||
namespace Server.Engines.ConPVP
|
namespace Server.Engines.ConPVP;
|
||||||
{
|
|
||||||
public enum DuelTeleporterType
|
public enum DuelTeleporterType
|
||||||
{
|
{
|
||||||
Squares = 6095,
|
Squares = 6095,
|
||||||
|
|
@ -12,7 +13,8 @@ namespace Server.Engines.ConPVP
|
||||||
Links = 6149
|
Links = 6149
|
||||||
}
|
}
|
||||||
|
|
||||||
public class DuelTeleporterAddon : BaseAddon
|
[SerializationGenerator(0, false)]
|
||||||
|
public partial class DuelTeleporterAddon : BaseAddon
|
||||||
{
|
{
|
||||||
[Constructible]
|
[Constructible]
|
||||||
public DuelTeleporterAddon(DuelTeleporterType type = DuelTeleporterType.Squares)
|
public DuelTeleporterAddon(DuelTeleporterType type = DuelTeleporterType.Squares)
|
||||||
|
|
@ -51,22 +53,10 @@ namespace Server.Engines.ConPVP
|
||||||
AddComponent(new AddonComponent(0x754), -2, +1, 0);
|
AddComponent(new AddonComponent(0x754), -2, +1, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public DuelTeleporterAddon(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
[CommandProperty(AccessLevel.GameMaster)]
|
[CommandProperty(AccessLevel.GameMaster)]
|
||||||
public DuelTeleporterType Type
|
public DuelTeleporterType Type
|
||||||
{
|
{
|
||||||
get
|
get => Components.Count > 0 ? (DuelTeleporterType)Components[0].ItemID : DuelTeleporterType.Squares;
|
||||||
{
|
|
||||||
if (Components.Count > 0)
|
|
||||||
{
|
|
||||||
return (DuelTeleporterType)Components[0].ItemID;
|
|
||||||
}
|
|
||||||
|
|
||||||
return DuelTeleporterType.Squares;
|
|
||||||
}
|
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
for (var i = 0; i < Components.Count && i < 9; ++i)
|
for (var i = 0; i < Components.Count && i < 9; ++i)
|
||||||
|
|
@ -75,19 +65,4 @@ namespace Server.Engines.ConPVP
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,17 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using ModernUO.Serialization;
|
||||||
using Server.Gumps;
|
using Server.Gumps;
|
||||||
using Server.Items;
|
using Server.Items;
|
||||||
using Server.Mobiles;
|
using Server.Mobiles;
|
||||||
using Server.Targeting;
|
using Server.Targeting;
|
||||||
|
|
||||||
namespace Server.Engines.ConPVP
|
namespace Server.Engines.ConPVP;
|
||||||
{
|
|
||||||
public class BRBomb : Item
|
[SerializationGenerator(0, false)]
|
||||||
|
public partial class BRBomb : Item
|
||||||
{
|
{
|
||||||
private readonly BRGame m_Game;
|
private readonly BRGame m_Game;
|
||||||
|
|
||||||
|
|
@ -33,10 +36,6 @@ namespace Server.Engines.ConPVP
|
||||||
m_Timer.Start();
|
m_Timer.Start();
|
||||||
}
|
}
|
||||||
|
|
||||||
public BRBomb(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override bool SkipSerialization => true;
|
public override bool SkipSerialization => true;
|
||||||
|
|
||||||
public override string DefaultName => "da bomb";
|
public override string DefaultName => "da bomb";
|
||||||
|
|
@ -58,20 +57,6 @@ namespace Server.Engines.ConPVP
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
|
||||||
{
|
|
||||||
base.Deserialize(reader);
|
|
||||||
|
|
||||||
var version = reader.ReadInt();
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
|
||||||
{
|
|
||||||
base.Serialize(writer);
|
|
||||||
|
|
||||||
writer.Write(0); // version
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void OnAdded(IEntity parent)
|
public override void OnAdded(IEntity parent)
|
||||||
{
|
{
|
||||||
base.OnAdded(parent);
|
base.OnAdded(parent);
|
||||||
|
|
@ -848,9 +833,15 @@ namespace Server.Engines.ConPVP
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class BRGoal : BaseAddon
|
[SerializationGenerator(0, false)]
|
||||||
|
public partial class BRGoal : BaseAddon
|
||||||
{
|
{
|
||||||
private bool m_North;
|
[SerializableField(0)]
|
||||||
|
private bool _north;
|
||||||
|
|
||||||
|
[SerializableFieldChanged(0)]
|
||||||
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
|
private void OnNorthChanged(bool oldValue, bool newValue) => Remake();
|
||||||
|
|
||||||
private BRTeamInfo m_Team;
|
private BRTeamInfo m_Team;
|
||||||
|
|
||||||
|
|
@ -864,21 +855,6 @@ namespace Server.Engines.ConPVP
|
||||||
Remake();
|
Remake();
|
||||||
}
|
}
|
||||||
|
|
||||||
public BRGoal(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
[CommandProperty(AccessLevel.GameMaster)]
|
|
||||||
public bool North
|
|
||||||
{
|
|
||||||
get => m_North;
|
|
||||||
set
|
|
||||||
{
|
|
||||||
m_North = value;
|
|
||||||
Remake();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override string DefaultName => "Bombing Run Goal";
|
public override string DefaultName => "Bombing Run Goal";
|
||||||
|
|
||||||
public override bool ShareHue => false;
|
public override bool ShareHue => false;
|
||||||
|
|
@ -908,8 +884,9 @@ namespace Server.Engines.ConPVP
|
||||||
|
|
||||||
private void Remake()
|
private void Remake()
|
||||||
{
|
{
|
||||||
foreach (var ac in Components)
|
for (var i = 0; i < Components.Count; i++)
|
||||||
{
|
{
|
||||||
|
var ac = Components[i];
|
||||||
ac.Addon = null;
|
ac.Addon = null;
|
||||||
ac.Delete();
|
ac.Delete();
|
||||||
}
|
}
|
||||||
|
|
@ -929,7 +906,7 @@ namespace Server.Engines.ConPVP
|
||||||
// Center Sparkle
|
// Center Sparkle
|
||||||
AddComponent(new AddonComponent(0x375A), 0, 0, -1);
|
AddComponent(new AddonComponent(0x375A), 0, 0, -1);
|
||||||
|
|
||||||
if (!m_North)
|
if (!_north)
|
||||||
{
|
{
|
||||||
// Pillars
|
// Pillars
|
||||||
AddComponent(new AddonComponent(0x0CE), 0, +1, -2);
|
AddComponent(new AddonComponent(0x0CE), 0, +1, -2);
|
||||||
|
|
@ -967,37 +944,6 @@ namespace Server.Engines.ConPVP
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
|
||||||
{
|
|
||||||
base.Serialize(writer);
|
|
||||||
|
|
||||||
writer.Write(1); // version
|
|
||||||
|
|
||||||
writer.Write(m_North);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
|
||||||
{
|
|
||||||
base.Deserialize(reader);
|
|
||||||
|
|
||||||
var version = reader.ReadInt();
|
|
||||||
|
|
||||||
switch (version)
|
|
||||||
{
|
|
||||||
case 1:
|
|
||||||
{
|
|
||||||
m_North = reader.ReadBool();
|
|
||||||
goto case 0;
|
|
||||||
}
|
|
||||||
case 0:
|
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Hue = 0x84C;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override bool OnMoveOver(Mobile m)
|
public override bool OnMoveOver(Mobile m)
|
||||||
{
|
{
|
||||||
if (!Visible)
|
if (!Visible)
|
||||||
|
|
@ -1029,19 +975,13 @@ namespace Server.Engines.ConPVP
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public sealed class BRBoard : Item
|
[SerializationGenerator(0, false)]
|
||||||
|
public sealed partial class BRBoard : Item
|
||||||
{
|
{
|
||||||
public BRTeamInfo m_TeamInfo;
|
public BRTeamInfo m_TeamInfo;
|
||||||
|
|
||||||
[Constructible]
|
[Constructible]
|
||||||
public BRBoard()
|
public BRBoard() : base(7774) => Movable = false;
|
||||||
: base(7774) =>
|
|
||||||
Movable = false;
|
|
||||||
|
|
||||||
public BRBoard(Serial serial)
|
|
||||||
: base(serial)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override string DefaultName => "Scoreboard";
|
public override string DefaultName => "Scoreboard";
|
||||||
|
|
||||||
|
|
@ -1052,20 +992,6 @@ namespace Server.Engines.ConPVP
|
||||||
from.SendGump(new BRBoardGump(from, m_TeamInfo.Game));
|
from.SendGump(new BRBoardGump(from, m_TeamInfo.Game));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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 class BRBoardGump : Gump
|
public class BRBoardGump : Gump
|
||||||
|
|
@ -1961,4 +1887,3 @@ namespace Server.Engines.ConPVP
|
||||||
_finishTimerToken.Cancel();
|
_finishTimerToken.Cancel();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,27 +1,22 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using ModernUO.Serialization;
|
||||||
using Server.Gumps;
|
using Server.Gumps;
|
||||||
using Server.Items;
|
using Server.Items;
|
||||||
using Server.Mobiles;
|
using Server.Mobiles;
|
||||||
using Server.Network;
|
using Server.Network;
|
||||||
using Server.Targeting;
|
using Server.Targeting;
|
||||||
|
|
||||||
namespace Server.Engines.ConPVP
|
namespace Server.Engines.ConPVP;
|
||||||
{
|
|
||||||
public sealed class CTFBoard : Item
|
[SerializationGenerator(0, false)]
|
||||||
|
public sealed partial class CTFBoard : Item
|
||||||
{
|
{
|
||||||
public CTFTeamInfo m_TeamInfo;
|
public CTFTeamInfo m_TeamInfo;
|
||||||
|
|
||||||
[Constructible]
|
[Constructible]
|
||||||
public CTFBoard()
|
public CTFBoard() : base(7774) => Movable = false;
|
||||||
: base(7774) =>
|
|
||||||
Movable = false;
|
|
||||||
|
|
||||||
public CTFBoard(Serial serial)
|
|
||||||
: base(serial)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override string DefaultName => "scoreboard";
|
public override string DefaultName => "scoreboard";
|
||||||
|
|
||||||
|
|
@ -32,20 +27,6 @@ namespace Server.Engines.ConPVP
|
||||||
from.SendGump(new CTFBoardGump(from, m_TeamInfo.Game));
|
from.SendGump(new CTFBoardGump(from, m_TeamInfo.Game));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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 class CTFBoardGump : Gump
|
public class CTFBoardGump : Gump
|
||||||
|
|
@ -210,7 +191,8 @@ namespace Server.Engines.ConPVP
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public sealed class CTFFlag : Item
|
[SerializationGenerator(0, false)]
|
||||||
|
public sealed partial class CTFFlag : Item
|
||||||
{
|
{
|
||||||
public Mobile m_Fragger;
|
public Mobile m_Fragger;
|
||||||
public DateTime m_FragTime;
|
public DateTime m_FragTime;
|
||||||
|
|
@ -223,14 +205,7 @@ namespace Server.Engines.ConPVP
|
||||||
public CTFTeamInfo m_TeamInfo;
|
public CTFTeamInfo m_TeamInfo;
|
||||||
|
|
||||||
[Constructible]
|
[Constructible]
|
||||||
public CTFFlag()
|
public CTFFlag() : base(5643) => Movable = false;
|
||||||
: base(5643) =>
|
|
||||||
Movable = false;
|
|
||||||
|
|
||||||
public CTFFlag(Serial serial)
|
|
||||||
: base(serial)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override string DefaultName => "old people cookies";
|
public override string DefaultName => "old people cookies";
|
||||||
|
|
||||||
|
|
@ -523,20 +498,6 @@ namespace Server.Engines.ConPVP
|
||||||
mob.SolidHueOverride = m_TeamInfo?.Game.GetColor(mob) ?? -1;
|
mob.SolidHueOverride = m_TeamInfo?.Game.GetColor(mob) ?? -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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 interface IRankedCTF
|
public interface IRankedCTF
|
||||||
|
|
@ -1310,4 +1271,3 @@ namespace Server.Engines.ConPVP
|
||||||
_finishTimerToken.Cancel();
|
_finishTimerToken.Cancel();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,25 +1,20 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using ModernUO.Serialization;
|
||||||
using Server.Gumps;
|
using Server.Gumps;
|
||||||
using Server.Items;
|
using Server.Items;
|
||||||
using Server.Mobiles;
|
using Server.Mobiles;
|
||||||
|
|
||||||
namespace Server.Engines.ConPVP
|
namespace Server.Engines.ConPVP;
|
||||||
{
|
|
||||||
public sealed class DDBoard : Item
|
[SerializationGenerator(0, false)]
|
||||||
|
public sealed partial class DDBoard : Item
|
||||||
{
|
{
|
||||||
public DDTeamInfo m_TeamInfo;
|
public DDTeamInfo m_TeamInfo;
|
||||||
|
|
||||||
[Constructible]
|
[Constructible]
|
||||||
public DDBoard()
|
public DDBoard() : base(7774) => Movable = false;
|
||||||
: base(7774) =>
|
|
||||||
Movable = false;
|
|
||||||
|
|
||||||
public DDBoard(Serial serial)
|
|
||||||
: base(serial)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override string DefaultName => "scoreboard";
|
public override string DefaultName => "scoreboard";
|
||||||
|
|
||||||
|
|
@ -30,20 +25,6 @@ namespace Server.Engines.ConPVP
|
||||||
from.SendGump(new DDBoardGump(from, m_TeamInfo.Game));
|
from.SendGump(new DDBoardGump(from, m_TeamInfo.Game));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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 class DDBoardGump : Gump
|
public class DDBoardGump : Gump
|
||||||
|
|
@ -976,7 +957,8 @@ namespace Server.Engines.ConPVP
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class DDWayPoint : BaseAddon
|
[SerializationGenerator(0, false)]
|
||||||
|
public partial class DDWayPoint : BaseAddon
|
||||||
{
|
{
|
||||||
public const int UncapturableHue = 0x497;
|
public const int UncapturableHue = 0x497;
|
||||||
public const int NonCapturedHue = 0x38A;
|
public const int NonCapturedHue = 0x38A;
|
||||||
|
|
@ -1005,10 +987,6 @@ namespace Server.Engines.ConPVP
|
||||||
SetUncapturableHue();
|
SetUncapturableHue();
|
||||||
}
|
}
|
||||||
|
|
||||||
public DDWayPoint(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override bool ShareHue => false;
|
public override bool ShareHue => false;
|
||||||
|
|
||||||
public DDGame Game
|
public DDGame Game
|
||||||
|
|
@ -1041,20 +1019,6 @@ namespace Server.Engines.ConPVP
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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 void SetUncapturableHue()
|
public void SetUncapturableHue()
|
||||||
{
|
{
|
||||||
for (var i = 0; i < Components.Count; i++)
|
for (var i = 0; i < Components.Count; i++)
|
||||||
|
|
@ -1123,29 +1087,11 @@ namespace Server.Engines.ConPVP
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class DDStep : AddonComponent
|
[SerializationGenerator(0, false)]
|
||||||
|
public partial class DDStep : AddonComponent
|
||||||
{
|
{
|
||||||
public DDStep(int itemID) : base(itemID) => Visible = true;
|
public DDStep(int itemID) : base(itemID) => Visible = true;
|
||||||
|
|
||||||
public DDStep(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
|
||||||
{
|
|
||||||
base.Deserialize(reader);
|
|
||||||
|
|
||||||
var version = reader.ReadInt();
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
|
||||||
{
|
|
||||||
base.Serialize(writer);
|
|
||||||
|
|
||||||
writer.Write(0); // version
|
|
||||||
}
|
|
||||||
|
|
||||||
public override bool OnMoveOver(Mobile m) => Addon.OnMoveOver(m);
|
public override bool OnMoveOver(Mobile m) => Addon.OnMoveOver(m);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,41 +1,23 @@
|
||||||
|
using ModernUO.Serialization;
|
||||||
using Server.Gumps;
|
using Server.Gumps;
|
||||||
using Server.Items;
|
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;
|
Visible = false;
|
||||||
Movable = false;
|
Movable = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public EventController(Serial serial)
|
|
||||||
: base(serial)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public abstract string Title { get; }
|
public abstract string Title { get; }
|
||||||
public abstract EventGame Construct(DuelContext dc);
|
public abstract EventGame Construct(DuelContext dc);
|
||||||
|
|
||||||
public abstract string GetTeamName(int teamID);
|
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)
|
public override void OnDoubleClick(Mobile from)
|
||||||
{
|
{
|
||||||
if (from.AccessLevel >= AccessLevel.GameMaster)
|
if (from.AccessLevel >= AccessLevel.GameMaster)
|
||||||
|
|
@ -67,4 +49,3 @@ namespace Server.Engines.ConPVP
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,22 +1,28 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using ModernUO.Serialization;
|
||||||
using Server.Gumps;
|
using Server.Gumps;
|
||||||
using Server.Items;
|
using Server.Items;
|
||||||
using Server.Mobiles;
|
using Server.Mobiles;
|
||||||
|
|
||||||
namespace Server.Engines.ConPVP
|
namespace Server.Engines.ConPVP;
|
||||||
{
|
|
||||||
public class HillOfTheKing : Item
|
[SerializationGenerator(0, false)]
|
||||||
|
public partial class HillOfTheKing : Item
|
||||||
{
|
{
|
||||||
private KHGame m_Game;
|
private KHGame m_Game;
|
||||||
|
|
||||||
|
[SerializedCommandProperty(AccessLevel.GameMaster)]
|
||||||
private KingTimer m_KingTimer;
|
private KingTimer m_KingTimer;
|
||||||
|
|
||||||
|
[EncodedInt]
|
||||||
|
[SerializableField(0)]
|
||||||
|
private int _scoreInterval;
|
||||||
|
|
||||||
[Constructible]
|
[Constructible]
|
||||||
public HillOfTheKing()
|
public HillOfTheKing() : base(0x520)
|
||||||
: base(0x520)
|
|
||||||
{
|
{
|
||||||
ScoreInterval = 10;
|
|
||||||
m_Game = null;
|
m_Game = null;
|
||||||
King = null;
|
King = null;
|
||||||
Movable = false;
|
Movable = false;
|
||||||
|
|
@ -24,10 +30,6 @@ namespace Server.Engines.ConPVP
|
||||||
Name = "the hill";
|
Name = "the hill";
|
||||||
}
|
}
|
||||||
|
|
||||||
public HillOfTheKing(Serial s) : base(s)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public Mobile King { get; private set; }
|
public Mobile King { get; private set; }
|
||||||
|
|
||||||
public KHGame Game
|
public KHGame Game
|
||||||
|
|
@ -44,36 +46,8 @@ namespace Server.Engines.ConPVP
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[CommandProperty(AccessLevel.GameMaster)]
|
|
||||||
public int ScoreInterval { get; set; }
|
|
||||||
|
|
||||||
public int CapturesSoFar => m_KingTimer?.Captures ?? 0;
|
public int CapturesSoFar => m_KingTimer?.Captures ?? 0;
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
|
||||||
{
|
|
||||||
base.Deserialize(reader);
|
|
||||||
|
|
||||||
var version = reader.ReadInt();
|
|
||||||
|
|
||||||
switch (version)
|
|
||||||
{
|
|
||||||
case 0:
|
|
||||||
{
|
|
||||||
ScoreInterval = reader.ReadEncodedInt();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
|
||||||
{
|
|
||||||
base.Serialize(writer);
|
|
||||||
|
|
||||||
writer.Write(0); // version
|
|
||||||
|
|
||||||
writer.WriteEncodedInt(ScoreInterval);
|
|
||||||
}
|
|
||||||
|
|
||||||
private bool CanBeKing(Mobile m)
|
private bool CanBeKing(Mobile m)
|
||||||
{
|
{
|
||||||
// Game running?
|
// Game running?
|
||||||
|
|
@ -274,39 +248,29 @@ namespace Server.Engines.ConPVP
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class KHBoard : Item
|
[SerializationGenerator(0, false)]
|
||||||
|
public partial class KHBoard : Item
|
||||||
{
|
{
|
||||||
private KHController m_Controller;
|
[SerializedCommandProperty(AccessLevel.GameMaster)]
|
||||||
|
[SerializableField(0)]
|
||||||
|
private KHController _controller;
|
||||||
|
|
||||||
|
[SerializableFieldChanged(0)]
|
||||||
|
private void OnControllerChanged(KHController oldValue, KHController newValue)
|
||||||
|
{
|
||||||
|
oldValue?.RemoveBoard(this);
|
||||||
|
newValue?.AddBoard(this);
|
||||||
|
}
|
||||||
|
|
||||||
public KHGame m_Game;
|
public KHGame m_Game;
|
||||||
|
|
||||||
[Constructible]
|
[Constructible]
|
||||||
public KHBoard()
|
public KHBoard() : base(7774)
|
||||||
: base(7774)
|
|
||||||
{
|
{
|
||||||
Name = "King of the Hill Scoreboard";
|
Name = "King of the Hill Scoreboard";
|
||||||
Movable = false;
|
Movable = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public KHBoard(Serial serial)
|
|
||||||
: base(serial)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
[CommandProperty(AccessLevel.GameMaster)]
|
|
||||||
public KHController Controller
|
|
||||||
{
|
|
||||||
get => m_Controller;
|
|
||||||
set
|
|
||||||
{
|
|
||||||
if (m_Controller != value)
|
|
||||||
{
|
|
||||||
m_Controller?.RemoveBoard(this);
|
|
||||||
m_Controller = value;
|
|
||||||
m_Controller?.AddBoard(this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void OnDoubleClick(Mobile from)
|
public override void OnDoubleClick(Mobile from)
|
||||||
{
|
{
|
||||||
if (m_Game != null)
|
if (m_Game != null)
|
||||||
|
|
@ -318,31 +282,6 @@ namespace Server.Engines.ConPVP
|
||||||
from.SendMessage("There is no King of the Hill game in progress.");
|
from.SendMessage("There is no King of the Hill game in progress.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
|
||||||
{
|
|
||||||
base.Serialize(writer);
|
|
||||||
|
|
||||||
writer.Write(0);
|
|
||||||
|
|
||||||
writer.Write(m_Controller);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Deserialize(IGenericReader reader)
|
|
||||||
{
|
|
||||||
base.Deserialize(reader);
|
|
||||||
|
|
||||||
var version = reader.ReadInt();
|
|
||||||
|
|
||||||
switch (version)
|
|
||||||
{
|
|
||||||
case 0:
|
|
||||||
{
|
|
||||||
m_Controller = reader.ReadEntity<KHController>();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public sealed class KHBoardGump : Gump
|
public sealed class KHBoardGump : Gump
|
||||||
|
|
@ -1257,4 +1196,3 @@ namespace Server.Engines.ConPVP
|
||||||
_finishTimerToken.Cancel();
|
_finishTimerToken.Cancel();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,14 @@
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using ModernUO.Serialization;
|
||||||
using Server.Gumps;
|
using Server.Gumps;
|
||||||
using Server.Mobiles;
|
using Server.Mobiles;
|
||||||
using Server.Network;
|
using Server.Network;
|
||||||
|
|
||||||
namespace Server.Engines.ConPVP
|
namespace Server.Engines.ConPVP;
|
||||||
{
|
|
||||||
public class ArenasMoongate : Item
|
[SerializationGenerator(0, false)]
|
||||||
|
public partial class ArenasMoongate : Item
|
||||||
{
|
{
|
||||||
[Constructible]
|
[Constructible]
|
||||||
public ArenasMoongate() : base(0x1FD4)
|
public ArenasMoongate() : base(0x1FD4)
|
||||||
|
|
@ -15,27 +17,8 @@ namespace Server.Engines.ConPVP
|
||||||
Light = LightType.Circle300;
|
Light = LightType.Circle300;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ArenasMoongate(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override string DefaultName => "arena moongate";
|
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)
|
public bool UseGate(Mobile from)
|
||||||
{
|
{
|
||||||
if (DuelContext.CheckCombat(from))
|
if (DuelContext.CheckCombat(from))
|
||||||
|
|
@ -293,4 +276,3 @@ namespace Server.Engines.ConPVP
|
||||||
m_ColumnX += width;
|
m_ColumnX += width;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,49 +1,23 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using ModernUO.Serialization;
|
||||||
using Server.Gumps;
|
using Server.Gumps;
|
||||||
using Server.Network;
|
using Server.Network;
|
||||||
|
|
||||||
namespace Server.Engines.ConPVP
|
namespace Server.Engines.ConPVP;
|
||||||
{
|
|
||||||
public class LadderItem : Item
|
[SerializationGenerator(0, false)]
|
||||||
|
public partial class LadderItem : Item
|
||||||
{
|
{
|
||||||
|
[SerializedCommandProperty(AccessLevel.GameMaster)]
|
||||||
|
[SerializableField(0)]
|
||||||
|
private LadderController _ladder;
|
||||||
|
|
||||||
[Constructible]
|
[Constructible]
|
||||||
public LadderItem() : base(0x117F) => Movable = false;
|
public LadderItem() : base(0x117F) => Movable = false;
|
||||||
|
|
||||||
public LadderItem(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
[CommandProperty(AccessLevel.GameMaster)]
|
|
||||||
public LadderController Ladder { get; set; }
|
|
||||||
|
|
||||||
public override string DefaultName => "1v1 leaderboard";
|
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)
|
|
||||||
{
|
|
||||||
case 1:
|
|
||||||
{
|
|
||||||
Ladder = reader.ReadEntity<LadderController>();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void OnDoubleClick(Mobile from)
|
public override void OnDoubleClick(Mobile from)
|
||||||
{
|
{
|
||||||
if (from.InRange(GetWorldLocation(), 2))
|
if (from.InRange(GetWorldLocation(), 2))
|
||||||
|
|
@ -256,4 +230,3 @@ namespace Server.Engines.ConPVP
|
||||||
m_ColumnX += width;
|
m_ColumnX += width;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,18 @@
|
||||||
|
using ModernUO.Serialization;
|
||||||
using Server.Gumps;
|
using Server.Gumps;
|
||||||
|
|
||||||
namespace Server.Engines.ConPVP
|
namespace Server.Engines.ConPVP;
|
||||||
{
|
|
||||||
public class TournamentBracketItem : Item
|
[SerializationGenerator(0, false)]
|
||||||
|
public partial class TournamentBracketItem : Item
|
||||||
{
|
{
|
||||||
|
[SerializableField(0)]
|
||||||
|
[SerializedCommandProperty(AccessLevel.GameMaster)]
|
||||||
|
private TournamentController _tournament;
|
||||||
|
|
||||||
[Constructible]
|
[Constructible]
|
||||||
public TournamentBracketItem() : base(3774) => Movable = false;
|
public TournamentBracketItem() : base(3774) => Movable = false;
|
||||||
|
|
||||||
public TournamentBracketItem(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
[CommandProperty(AccessLevel.GameMaster)]
|
|
||||||
public TournamentController Tournament { get; set; }
|
|
||||||
|
|
||||||
public override string DefaultName => "tournament bracket";
|
public override string DefaultName => "tournament bracket";
|
||||||
|
|
||||||
public override void OnDoubleClick(Mobile from)
|
public override void OnDoubleClick(Mobile from)
|
||||||
|
|
@ -32,30 +31,4 @@ namespace Server.Engines.ConPVP
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,23 +1,20 @@
|
||||||
using System;
|
using System;
|
||||||
|
using ModernUO.Serialization;
|
||||||
using Server.Factions;
|
using Server.Factions;
|
||||||
using Server.Mobiles;
|
using Server.Mobiles;
|
||||||
|
|
||||||
namespace Server.Engines.ConPVP
|
namespace Server.Engines.ConPVP;
|
||||||
{
|
|
||||||
public class TournamentRegistrar : Banker
|
[SerializationGenerator(0, false)]
|
||||||
|
public partial class TournamentRegistrar : Banker
|
||||||
{
|
{
|
||||||
|
[SerializedCommandProperty(AccessLevel.GameMaster)]
|
||||||
|
[SerializableField(0)]
|
||||||
|
private TournamentController _tournament;
|
||||||
|
|
||||||
[Constructible]
|
[Constructible]
|
||||||
public TournamentRegistrar()
|
public TournamentRegistrar() =>
|
||||||
{
|
Timer.DelayCall(TimeSpan.FromSeconds(30.0), TimeSpan.FromSeconds(30.0), Announce_Callback);
|
||||||
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()
|
private void Announce_Callback()
|
||||||
{
|
{
|
||||||
|
|
@ -78,31 +75,9 @@ namespace Server.Engines.ConPVP
|
||||||
m.EndAction(this);
|
m.EndAction(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
[AfterDeserialization]
|
||||||
|
private void AfterDeserialization()
|
||||||
{
|
{
|
||||||
base.Serialize(writer);
|
Timer.DelayCall(TimeSpan.FromSeconds(30.0), TimeSpan.FromSeconds(30.0), Announce_Callback);
|
||||||
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,25 +1,25 @@
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using ModernUO.Serialization;
|
||||||
using Server.Factions;
|
using Server.Factions;
|
||||||
using Server.Gumps;
|
using Server.Gumps;
|
||||||
using Server.Mobiles;
|
using Server.Mobiles;
|
||||||
|
|
||||||
namespace Server.Engines.ConPVP
|
namespace Server.Engines.ConPVP;
|
||||||
{
|
|
||||||
public class TournamentSignupItem : Item
|
[SerializationGenerator(0, false)]
|
||||||
|
public partial class TournamentSignupItem : Item
|
||||||
{
|
{
|
||||||
|
[SerializedCommandProperty(AccessLevel.GameMaster)]
|
||||||
|
[SerializableField(0)]
|
||||||
|
private TournamentController _tournament;
|
||||||
|
|
||||||
|
[SerializedCommandProperty(AccessLevel.GameMaster)]
|
||||||
|
[SerializableField(1)]
|
||||||
|
private Mobile _registrar;
|
||||||
|
|
||||||
[Constructible]
|
[Constructible]
|
||||||
public TournamentSignupItem() : base(4029) => Movable = false;
|
public TournamentSignupItem() : base(4029) => Movable = false;
|
||||||
|
|
||||||
public TournamentSignupItem(Serial serial) : base(serial)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
[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 string DefaultName => "tournament signup book";
|
||||||
|
|
||||||
public override void OnDoubleClick(Mobile from)
|
public override void OnDoubleClick(Mobile from)
|
||||||
|
|
@ -37,10 +37,7 @@ namespace Server.Engines.ConPVP
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Registrar != null)
|
Registrar?.Direction = Registrar.GetDirectionTo(this);
|
||||||
{
|
|
||||||
Registrar.Direction = Registrar.GetDirectionTo(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (tourney.Stage)
|
switch (tourney.Stage)
|
||||||
{
|
{
|
||||||
|
|
@ -165,32 +162,4 @@ namespace Server.Engines.ConPVP
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Serialize(IGenericWriter writer)
|
|
||||||
{
|
|
||||||
base.Serialize(writer);
|
|
||||||
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
4
Projects/UOContent/Migrations/Server.Engines.ConPVP.ArenasMoongate.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Engines.ConPVP.ArenasMoongate.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Engines.ConPVP.ArenasMoongate"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Engines.ConPVP.BRBoard.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Engines.ConPVP.BRBoard.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Engines.ConPVP.BRBoard"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Engines.ConPVP.BRBomb.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Engines.ConPVP.BRBomb.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Engines.ConPVP.BRBomb"
|
||||||
|
}
|
||||||
14
Projects/UOContent/Migrations/Server.Engines.ConPVP.BRGoal.v0.json
generated
Normal file
14
Projects/UOContent/Migrations/Server.Engines.ConPVP.BRGoal.v0.json
generated
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Engines.ConPVP.BRGoal",
|
||||||
|
"properties": [
|
||||||
|
{
|
||||||
|
"name": "North",
|
||||||
|
"type": "bool",
|
||||||
|
"rule": "PrimitiveTypeMigrationRule",
|
||||||
|
"ruleArguments": [
|
||||||
|
""
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Engines.ConPVP.CTFBoard.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Engines.ConPVP.CTFBoard.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Engines.ConPVP.CTFBoard"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Engines.ConPVP.CTFFlag.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Engines.ConPVP.CTFFlag.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Engines.ConPVP.CTFFlag"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Engines.ConPVP.DDBoard.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Engines.ConPVP.DDBoard.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Engines.ConPVP.DDBoard"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Engines.ConPVP.DDWayPoint.DDStep.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Engines.ConPVP.DDWayPoint.DDStep.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Engines.ConPVP.DDWayPoint.DDStep"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Engines.ConPVP.DDWayPoint.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Engines.ConPVP.DDWayPoint.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Engines.ConPVP.DDWayPoint"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Engines.ConPVP.DuelContext.ArenaMoongate.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Engines.ConPVP.DuelContext.ArenaMoongate.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Engines.ConPVP.DuelContext.ArenaMoongate"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Engines.ConPVP.DuelContext.InternalWall.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Engines.ConPVP.DuelContext.InternalWall.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Engines.ConPVP.DuelContext.InternalWall"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Engines.ConPVP.DuelTeleporterAddon.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Engines.ConPVP.DuelTeleporterAddon.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Engines.ConPVP.DuelTeleporterAddon"
|
||||||
|
}
|
||||||
4
Projects/UOContent/Migrations/Server.Engines.ConPVP.EventController.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Engines.ConPVP.EventController.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Engines.ConPVP.EventController"
|
||||||
|
}
|
||||||
14
Projects/UOContent/Migrations/Server.Engines.ConPVP.HillOfTheKing.v0.json
generated
Normal file
14
Projects/UOContent/Migrations/Server.Engines.ConPVP.HillOfTheKing.v0.json
generated
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Engines.ConPVP.HillOfTheKing",
|
||||||
|
"properties": [
|
||||||
|
{
|
||||||
|
"name": "ScoreInterval",
|
||||||
|
"type": "int",
|
||||||
|
"rule": "PrimitiveTypeMigrationRule",
|
||||||
|
"ruleArguments": [
|
||||||
|
"EncodedInt"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
11
Projects/UOContent/Migrations/Server.Engines.ConPVP.KHBoard.v0.json
generated
Normal file
11
Projects/UOContent/Migrations/Server.Engines.ConPVP.KHBoard.v0.json
generated
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Engines.ConPVP.KHBoard",
|
||||||
|
"properties": [
|
||||||
|
{
|
||||||
|
"name": "Controller",
|
||||||
|
"type": "Server.Engines.ConPVP.KHController",
|
||||||
|
"rule": "SerializableInterfaceMigrationRule"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
11
Projects/UOContent/Migrations/Server.Engines.ConPVP.LadderItem.v0.json
generated
Normal file
11
Projects/UOContent/Migrations/Server.Engines.ConPVP.LadderItem.v0.json
generated
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Engines.ConPVP.LadderItem",
|
||||||
|
"properties": [
|
||||||
|
{
|
||||||
|
"name": "Ladder",
|
||||||
|
"type": "Server.Engines.ConPVP.LadderController",
|
||||||
|
"rule": "SerializableInterfaceMigrationRule"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
11
Projects/UOContent/Migrations/Server.Engines.ConPVP.TournamentBracketItem.v0.json
generated
Normal file
11
Projects/UOContent/Migrations/Server.Engines.ConPVP.TournamentBracketItem.v0.json
generated
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Engines.ConPVP.TournamentBracketItem",
|
||||||
|
"properties": [
|
||||||
|
{
|
||||||
|
"name": "Tournament",
|
||||||
|
"type": "Server.Engines.ConPVP.TournamentController",
|
||||||
|
"rule": "SerializableInterfaceMigrationRule"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
11
Projects/UOContent/Migrations/Server.Engines.ConPVP.TournamentRegistrar.v0.json
generated
Normal file
11
Projects/UOContent/Migrations/Server.Engines.ConPVP.TournamentRegistrar.v0.json
generated
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
"version": 0,
|
||||||
|
"type": "Server.Engines.ConPVP.TournamentRegistrar",
|
||||||
|
"properties": [
|
||||||
|
{
|
||||||
|
"name": "Tournament",
|
||||||
|
"type": "Server.Engines.ConPVP.TournamentController",
|
||||||
|
"rule": "SerializableInterfaceMigrationRule"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
16
Projects/UOContent/Migrations/Server.Engines.ConPVP.TournamentSignupItem.v0.json
generated
Normal file
16
Projects/UOContent/Migrations/Server.Engines.ConPVP.TournamentSignupItem.v0.json
generated
Normal 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"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue