fix: Codegens promo items (#1355)
This commit is contained in:
parent
bf6da39176
commit
8e3facc57b
61 changed files with 1430 additions and 1923 deletions
|
|
@ -1036,6 +1036,27 @@ public static class Utility
|
|||
return sampleList;
|
||||
}
|
||||
|
||||
public static void RandomSample<T>(this T[] source, int count, List<T> dest)
|
||||
{
|
||||
if (count <= 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var length = source.Length;
|
||||
Span<bool> list = stackalloc bool[length];
|
||||
|
||||
var i = 0;
|
||||
do
|
||||
{
|
||||
var rand = Random(length);
|
||||
if (!(list[rand] && (list[rand] = true)))
|
||||
{
|
||||
dest.Add(source[rand]);
|
||||
}
|
||||
} while (++i < count);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static T RandomList<T>(params T[] list) => list.RandomElement();
|
||||
|
||||
|
|
|
|||
|
|
@ -1,99 +0,0 @@
|
|||
using Server.Items;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Gumps
|
||||
{
|
||||
public class DawnsMusicBoxGump : Gump
|
||||
{
|
||||
private readonly DawnsMusicBox m_Box;
|
||||
|
||||
public DawnsMusicBoxGump(DawnsMusicBox box)
|
||||
: base(60, 36)
|
||||
{
|
||||
m_Box = box;
|
||||
|
||||
AddPage(0);
|
||||
|
||||
AddBackground(0, 0, 273, 324, 0x13BE);
|
||||
AddImageTiled(10, 10, 253, 20, 0xA40);
|
||||
AddImageTiled(10, 40, 253, 244, 0xA40);
|
||||
AddImageTiled(10, 294, 253, 20, 0xA40);
|
||||
AddAlphaRegion(10, 10, 253, 304);
|
||||
AddButton(10, 294, 0xFB1, 0xFB2, 0);
|
||||
AddHtmlLocalized(45, 296, 450, 20, 1060051, 0x7FFF); // CANCEL
|
||||
AddHtmlLocalized(14, 12, 273, 20, 1075130, 0x7FFF); // Choose a track to play
|
||||
|
||||
var page = 1;
|
||||
int i, y = 49;
|
||||
|
||||
AddPage(page);
|
||||
|
||||
for (i = 0; i < m_Box.Tracks.Count; i++, y += 24)
|
||||
{
|
||||
var info = DawnsMusicBox.GetInfo(m_Box.Tracks[i]);
|
||||
|
||||
if (i > 0 && i % 10 == 0)
|
||||
{
|
||||
AddButton(228, 294, 0xFA5, 0xFA6, 0, GumpButtonType.Page, page + 1);
|
||||
|
||||
AddPage(page + 1);
|
||||
y = 49;
|
||||
|
||||
AddButton(193, 294, 0xFAE, 0xFAF, 0, GumpButtonType.Page, page);
|
||||
|
||||
page++;
|
||||
}
|
||||
|
||||
if (info == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
AddButton(19, y, 0x845, 0x846, 100 + i);
|
||||
AddHtmlLocalized(44, y - 2, 213, 20, info.Name, 0x7FFF);
|
||||
}
|
||||
|
||||
if (i % 10 == 0)
|
||||
{
|
||||
AddButton(228, 294, 0xFA5, 0xFA6, 0, GumpButtonType.Page, page + 1);
|
||||
|
||||
AddPage(page + 1);
|
||||
y = 49;
|
||||
|
||||
AddButton(193, 294, 0xFAE, 0xFAF, 0, GumpButtonType.Page, page);
|
||||
}
|
||||
|
||||
AddButton(19, y, 0x845, 0x846, 1);
|
||||
AddHtmlLocalized(44, y - 2, 213, 20, 1075207, 0x7FFF); // Stop Song
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState sender, RelayInfo info)
|
||||
{
|
||||
if (m_Box?.Deleted != false)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var m = sender.Mobile;
|
||||
|
||||
if (!m_Box.IsChildOf(m.Backpack) && !m_Box.IsLockedDown)
|
||||
{
|
||||
m.SendLocalizedMessage(
|
||||
1061856
|
||||
); // You must have the item in your backpack or locked down in order to use it.
|
||||
}
|
||||
else if (m_Box.IsLockedDown && !m_Box.HasAccess(m))
|
||||
{
|
||||
m.SendLocalizedMessage(502691); // You must be the owner to use this.
|
||||
}
|
||||
else if (info.ButtonID == 1)
|
||||
{
|
||||
m_Box.EndMusic(m);
|
||||
}
|
||||
else if (info.ButtonID >= 100 && info.ButtonID - 100 < m_Box.Tracks.Count)
|
||||
{
|
||||
m_Box.PlayMusic(m, m_Box.Tracks[info.ButtonID - 100]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,5 +1,4 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using ModernUO.Serialization;
|
||||
using Server.Factions;
|
||||
using Server.Gumps;
|
||||
|
|
|
|||
|
|
@ -1,109 +1,75 @@
|
|||
namespace Server.Items
|
||||
using ModernUO.Serialization;
|
||||
|
||||
namespace Server.Items;
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class EarringBoxSet : RedVelvetGiftBox
|
||||
{
|
||||
public class EarringBoxSet : RedVelvetGiftBox
|
||||
[Constructible]
|
||||
public EarringBoxSet()
|
||||
{
|
||||
[Constructible]
|
||||
public EarringBoxSet()
|
||||
{
|
||||
DropItem(new EarringsOfProtection(AosElementAttribute.Physical));
|
||||
DropItem(new EarringsOfProtection(AosElementAttribute.Fire));
|
||||
DropItem(new EarringsOfProtection(AosElementAttribute.Cold));
|
||||
DropItem(new EarringsOfProtection(AosElementAttribute.Poison));
|
||||
DropItem(new EarringsOfProtection(AosElementAttribute.Energy));
|
||||
}
|
||||
|
||||
public EarringBoxSet(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
public class EarringsOfProtection : BaseJewel
|
||||
{
|
||||
private AosElementAttribute m_Attribute;
|
||||
|
||||
[Constructible]
|
||||
public EarringsOfProtection() : this(RandomType())
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public EarringsOfProtection(AosElementAttribute element)
|
||||
: base(0x1087, Layer.Earrings)
|
||||
{
|
||||
Resistances[element] = 2;
|
||||
|
||||
m_Attribute = element;
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
|
||||
public EarringsOfProtection(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public virtual AosElementAttribute Attribute => m_Attribute;
|
||||
|
||||
public override int LabelNumber => GetItemData(m_Attribute, true);
|
||||
|
||||
public override int Hue => GetItemData(m_Attribute, false);
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
writer.Write((int)m_Attribute);
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadInt();
|
||||
m_Attribute = (AosElementAttribute)reader.ReadInt();
|
||||
}
|
||||
|
||||
public static AosElementAttribute RandomType() => GetTypes(Utility.Random(5));
|
||||
|
||||
public static AosElementAttribute GetTypes(int value)
|
||||
{
|
||||
return value switch
|
||||
{
|
||||
0 => AosElementAttribute.Physical,
|
||||
1 => AosElementAttribute.Fire,
|
||||
2 => AosElementAttribute.Cold,
|
||||
3 => AosElementAttribute.Poison,
|
||||
_ => AosElementAttribute.Energy
|
||||
};
|
||||
}
|
||||
|
||||
public static int GetItemData(AosElementAttribute element, bool label)
|
||||
{
|
||||
return element switch
|
||||
{
|
||||
AosElementAttribute.Physical => label ? 1071091 : 0, // Earring of Protection (Physical) 1071091
|
||||
AosElementAttribute.Fire => label ? 1071092 : 0x4ec, // Earring of Protection (Fire) 1071092
|
||||
AosElementAttribute.Cold => label ? 1071093 : 0x4f2, // Earring of Protection (Cold) 1071093
|
||||
AosElementAttribute.Poison => label ? 1071094 : 0x4f8, // Earring of Protection (Poison) 1071094
|
||||
AosElementAttribute.Energy => label ? 1071095 : 0x4fe, // Earring of Protection (Energy) 1071095
|
||||
_ => -1
|
||||
};
|
||||
}
|
||||
DropItem(new EarringsOfProtection(AosElementAttribute.Physical));
|
||||
DropItem(new EarringsOfProtection(AosElementAttribute.Fire));
|
||||
DropItem(new EarringsOfProtection(AosElementAttribute.Cold));
|
||||
DropItem(new EarringsOfProtection(AosElementAttribute.Poison));
|
||||
DropItem(new EarringsOfProtection(AosElementAttribute.Energy));
|
||||
}
|
||||
}
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class EarringsOfProtection : BaseJewel
|
||||
{
|
||||
[SerializableField(0, setter: "private")]
|
||||
[SerializedCommandProperty(AccessLevel.GameMaster)]
|
||||
private AosElementAttribute _attribute;
|
||||
|
||||
[Constructible]
|
||||
public EarringsOfProtection() : this(RandomType())
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public EarringsOfProtection(AosElementAttribute element) : base(0x1087, Layer.Earrings)
|
||||
{
|
||||
Resistances[element] = 2;
|
||||
|
||||
_attribute = element;
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
|
||||
public override int LabelNumber => GetItemData(_attribute, true);
|
||||
|
||||
public override int Hue => GetItemData(_attribute, false);
|
||||
|
||||
private void Deserialize(IGenericReader reader, int version)
|
||||
{
|
||||
_attribute = (AosElementAttribute)reader.ReadInt();
|
||||
}
|
||||
|
||||
public static AosElementAttribute RandomType() => GetTypes(Utility.Random(5));
|
||||
|
||||
public static AosElementAttribute GetTypes(int value)
|
||||
{
|
||||
return value switch
|
||||
{
|
||||
0 => AosElementAttribute.Physical,
|
||||
1 => AosElementAttribute.Fire,
|
||||
2 => AosElementAttribute.Cold,
|
||||
3 => AosElementAttribute.Poison,
|
||||
_ => AosElementAttribute.Energy
|
||||
};
|
||||
}
|
||||
|
||||
public static int GetItemData(AosElementAttribute element, bool label)
|
||||
{
|
||||
return element switch
|
||||
{
|
||||
AosElementAttribute.Physical => label ? 1071091 : 0, // Earring of Protection (Physical) 1071091
|
||||
AosElementAttribute.Fire => label ? 1071092 : 0x4ec, // Earring of Protection (Fire) 1071092
|
||||
AosElementAttribute.Cold => label ? 1071093 : 0x4f2, // Earring of Protection (Cold) 1071093
|
||||
AosElementAttribute.Poison => label ? 1071094 : 0x4f8, // Earring of Protection (Poison) 1071094
|
||||
AosElementAttribute.Energy => label ? 1071095 : 0x4fe, // Earring of Protection (Energy) 1071095
|
||||
_ => -1
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,317 +1,302 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.CompilerServices;
|
||||
using ModernUO.Serialization;
|
||||
using Server.ContextMenus;
|
||||
using Server.Gumps;
|
||||
using Server.Multis;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
namespace Server.Items;
|
||||
|
||||
[Flippable(0x2AF9, 0x2AFD)]
|
||||
[SerializationGenerator(1)]
|
||||
public partial class DawnsMusicBox : Item, ISecurable
|
||||
{
|
||||
[Flippable(0x2AF9, 0x2AFD)]
|
||||
public class DawnsMusicBox : Item, ISecurable
|
||||
private static readonly Dictionary<MusicName, DawnsMusicInfo> _info = new()
|
||||
{
|
||||
private static readonly Dictionary<MusicName, DawnsMusicInfo> m_Info = new()
|
||||
{ MusicName.Samlethe, new DawnsMusicInfo(1075152, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Sailing, new DawnsMusicInfo(1075163, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Britain2, new DawnsMusicInfo(1075145, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Britain1, new DawnsMusicInfo(1075144, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Bucsden, new DawnsMusicInfo(1075146, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Forest_a, new DawnsMusicInfo(1075161, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Cove, new DawnsMusicInfo(1075176, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Death, new DawnsMusicInfo(1075171, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Dungeon9, new DawnsMusicInfo(1075160, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Dungeon2, new DawnsMusicInfo(1075175, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Cave01, new DawnsMusicInfo(1075159, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Combat3, new DawnsMusicInfo(1075170, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Combat1, new DawnsMusicInfo(1075168, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Combat2, new DawnsMusicInfo(1075169, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Jhelom, new DawnsMusicInfo(1075147, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Linelle, new DawnsMusicInfo(1075185, DawnsMusicRarity.Common) },
|
||||
{ MusicName.LBCastle, new DawnsMusicInfo(1075148, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Minoc, new DawnsMusicInfo(1075150, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Moonglow, new DawnsMusicInfo(1075177, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Magincia, new DawnsMusicInfo(1075149, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Nujelm, new DawnsMusicInfo(1075174, DawnsMusicRarity.Common) },
|
||||
{ MusicName.BTCastle, new DawnsMusicInfo(1075173, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Tavern04, new DawnsMusicInfo(1075167, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Skarabra, new DawnsMusicInfo(1075154, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Stones2, new DawnsMusicInfo(1075143, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Serpents, new DawnsMusicInfo(1075153, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Taiko, new DawnsMusicInfo(1075180, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Tavern01, new DawnsMusicInfo(1075164, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Tavern02, new DawnsMusicInfo(1075165, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Tavern03, new DawnsMusicInfo(1075166, DawnsMusicRarity.Common) },
|
||||
{ MusicName.TokunoDungeon, new DawnsMusicInfo(1075179, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Trinsic, new DawnsMusicInfo(1075155, DawnsMusicRarity.Common) },
|
||||
{ MusicName.OldUlt01, new DawnsMusicInfo(1075142, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Ocllo, new DawnsMusicInfo(1075151, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Vesper, new DawnsMusicInfo(1075156, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Victory, new DawnsMusicInfo(1075172, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Mountn_a, new DawnsMusicInfo(1075162, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Wind, new DawnsMusicInfo(1075157, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Yew, new DawnsMusicInfo(1075158, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Zento, new DawnsMusicInfo(1075178, DawnsMusicRarity.Common) },
|
||||
{ MusicName.GwennoConversation, new DawnsMusicInfo(1075131, DawnsMusicRarity.Uncommon) },
|
||||
{ MusicName.DreadHornArea, new DawnsMusicInfo(1075181, DawnsMusicRarity.Uncommon) },
|
||||
{ MusicName.ElfCity, new DawnsMusicInfo(1075182, DawnsMusicRarity.Uncommon) },
|
||||
{ MusicName.GoodEndGame, new DawnsMusicInfo(1075132, DawnsMusicRarity.Uncommon) },
|
||||
{ MusicName.GoodVsEvil, new DawnsMusicInfo(1075133, DawnsMusicRarity.Uncommon) },
|
||||
{ MusicName.GreatEarthSerpents, new DawnsMusicInfo(1075134, DawnsMusicRarity.Uncommon) },
|
||||
{ MusicName.GrizzleDungeon, new DawnsMusicInfo(1075186, DawnsMusicRarity.Uncommon) },
|
||||
{ MusicName.Humanoids_U9, new DawnsMusicInfo(1075135, DawnsMusicRarity.Uncommon) },
|
||||
{ MusicName.MelisandesLair, new DawnsMusicInfo(1075183, DawnsMusicRarity.Uncommon) },
|
||||
{ MusicName.MinocNegative, new DawnsMusicInfo(1075136, DawnsMusicRarity.Uncommon) },
|
||||
{ MusicName.ParoxysmusLair, new DawnsMusicInfo(1075184, DawnsMusicRarity.Uncommon) },
|
||||
{ MusicName.Paws, new DawnsMusicInfo(1075137, DawnsMusicRarity.Uncommon) },
|
||||
{ MusicName.SelimsBar, new DawnsMusicInfo(1075138, DawnsMusicRarity.Rare) },
|
||||
{ MusicName.SerpentIsleCombat_U7, new DawnsMusicInfo(1075139, DawnsMusicRarity.Rare) },
|
||||
{ MusicName.ValoriaShips, new DawnsMusicInfo(1075140, DawnsMusicRarity.Rare) }
|
||||
};
|
||||
|
||||
public static readonly MusicName[] _commonTracks =
|
||||
{
|
||||
MusicName.Samlethe, MusicName.Sailing, MusicName.Britain2, MusicName.Britain1,
|
||||
MusicName.Bucsden, MusicName.Forest_a, MusicName.Cove, MusicName.Death,
|
||||
MusicName.Dungeon9, MusicName.Dungeon2, MusicName.Cave01, MusicName.Combat3,
|
||||
MusicName.Combat1, MusicName.Combat2, MusicName.Jhelom, MusicName.Linelle,
|
||||
MusicName.LBCastle, MusicName.Minoc, MusicName.Moonglow, MusicName.Magincia,
|
||||
MusicName.Nujelm, MusicName.BTCastle, MusicName.Tavern04, MusicName.Skarabra,
|
||||
MusicName.Stones2, MusicName.Serpents, MusicName.Taiko, MusicName.Tavern01,
|
||||
MusicName.Tavern02, MusicName.Tavern03, MusicName.TokunoDungeon, MusicName.Trinsic,
|
||||
MusicName.OldUlt01, MusicName.Ocllo, MusicName.Vesper, MusicName.Victory,
|
||||
MusicName.Mountn_a, MusicName.Wind, MusicName.Yew, MusicName.Zento
|
||||
};
|
||||
|
||||
public static readonly MusicName[] _uncommonTracks =
|
||||
{
|
||||
MusicName.GwennoConversation, MusicName.DreadHornArea, MusicName.ElfCity,
|
||||
MusicName.GoodEndGame, MusicName.GoodVsEvil, MusicName.GreatEarthSerpents,
|
||||
MusicName.GrizzleDungeon, MusicName.Humanoids_U9, MusicName.MelisandesLair,
|
||||
MusicName.MinocNegative, MusicName.ParoxysmusLair, MusicName.Paws
|
||||
};
|
||||
|
||||
public static readonly MusicName[] _rareTracks =
|
||||
{
|
||||
MusicName.SelimsBar, MusicName.SerpentIsleCombat_U7, MusicName.ValoriaShips
|
||||
};
|
||||
|
||||
[SerializableField(0, setter: "private")]
|
||||
private List<MusicName> _tracks;
|
||||
|
||||
[SerializableField(1)]
|
||||
[SerializedCommandProperty(AccessLevel.GameMaster)]
|
||||
private SecureLevel _level;
|
||||
|
||||
[SerializableField(2)]
|
||||
private int _itemID;
|
||||
|
||||
private int _count;
|
||||
private TimerExecutionToken _timerToken;
|
||||
|
||||
[Constructible]
|
||||
public DawnsMusicBox() : base(0x2AF9)
|
||||
{
|
||||
Weight = 1.0;
|
||||
|
||||
_tracks = new List<MusicName>();
|
||||
|
||||
GetTracks(DawnsMusicRarity.Common).RandomSample(4, _tracks);
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1075198; // Dawn's Music Box
|
||||
|
||||
public override void OnAfterDuped(Item newItem)
|
||||
{
|
||||
if (newItem is not DawnsMusicBox box)
|
||||
{
|
||||
{ MusicName.Samlethe, new DawnsMusicInfo(1075152, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Sailing, new DawnsMusicInfo(1075163, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Britain2, new DawnsMusicInfo(1075145, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Britain1, new DawnsMusicInfo(1075144, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Bucsden, new DawnsMusicInfo(1075146, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Forest_a, new DawnsMusicInfo(1075161, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Cove, new DawnsMusicInfo(1075176, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Death, new DawnsMusicInfo(1075171, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Dungeon9, new DawnsMusicInfo(1075160, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Dungeon2, new DawnsMusicInfo(1075175, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Cave01, new DawnsMusicInfo(1075159, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Combat3, new DawnsMusicInfo(1075170, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Combat1, new DawnsMusicInfo(1075168, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Combat2, new DawnsMusicInfo(1075169, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Jhelom, new DawnsMusicInfo(1075147, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Linelle, new DawnsMusicInfo(1075185, DawnsMusicRarity.Common) },
|
||||
{ MusicName.LBCastle, new DawnsMusicInfo(1075148, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Minoc, new DawnsMusicInfo(1075150, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Moonglow, new DawnsMusicInfo(1075177, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Magincia, new DawnsMusicInfo(1075149, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Nujelm, new DawnsMusicInfo(1075174, DawnsMusicRarity.Common) },
|
||||
{ MusicName.BTCastle, new DawnsMusicInfo(1075173, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Tavern04, new DawnsMusicInfo(1075167, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Skarabra, new DawnsMusicInfo(1075154, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Stones2, new DawnsMusicInfo(1075143, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Serpents, new DawnsMusicInfo(1075153, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Taiko, new DawnsMusicInfo(1075180, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Tavern01, new DawnsMusicInfo(1075164, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Tavern02, new DawnsMusicInfo(1075165, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Tavern03, new DawnsMusicInfo(1075166, DawnsMusicRarity.Common) },
|
||||
{ MusicName.TokunoDungeon, new DawnsMusicInfo(1075179, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Trinsic, new DawnsMusicInfo(1075155, DawnsMusicRarity.Common) },
|
||||
{ MusicName.OldUlt01, new DawnsMusicInfo(1075142, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Ocllo, new DawnsMusicInfo(1075151, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Vesper, new DawnsMusicInfo(1075156, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Victory, new DawnsMusicInfo(1075172, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Mountn_a, new DawnsMusicInfo(1075162, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Wind, new DawnsMusicInfo(1075157, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Yew, new DawnsMusicInfo(1075158, DawnsMusicRarity.Common) },
|
||||
{ MusicName.Zento, new DawnsMusicInfo(1075178, DawnsMusicRarity.Common) },
|
||||
{ MusicName.GwennoConversation, new DawnsMusicInfo(1075131, DawnsMusicRarity.Uncommon) },
|
||||
{ MusicName.DreadHornArea, new DawnsMusicInfo(1075181, DawnsMusicRarity.Uncommon) },
|
||||
{ MusicName.ElfCity, new DawnsMusicInfo(1075182, DawnsMusicRarity.Uncommon) },
|
||||
{ MusicName.GoodEndGame, new DawnsMusicInfo(1075132, DawnsMusicRarity.Uncommon) },
|
||||
{ MusicName.GoodVsEvil, new DawnsMusicInfo(1075133, DawnsMusicRarity.Uncommon) },
|
||||
{ MusicName.GreatEarthSerpents, new DawnsMusicInfo(1075134, DawnsMusicRarity.Uncommon) },
|
||||
{ MusicName.GrizzleDungeon, new DawnsMusicInfo(1075186, DawnsMusicRarity.Uncommon) },
|
||||
{ MusicName.Humanoids_U9, new DawnsMusicInfo(1075135, DawnsMusicRarity.Uncommon) },
|
||||
{ MusicName.MelisandesLair, new DawnsMusicInfo(1075183, DawnsMusicRarity.Uncommon) },
|
||||
{ MusicName.MinocNegative, new DawnsMusicInfo(1075136, DawnsMusicRarity.Uncommon) },
|
||||
{ MusicName.ParoxysmusLair, new DawnsMusicInfo(1075184, DawnsMusicRarity.Uncommon) },
|
||||
{ MusicName.Paws, new DawnsMusicInfo(1075137, DawnsMusicRarity.Uncommon) },
|
||||
{ MusicName.SelimsBar, new DawnsMusicInfo(1075138, DawnsMusicRarity.Rare) },
|
||||
{ MusicName.SerpentIsleCombat_U7, new DawnsMusicInfo(1075139, DawnsMusicRarity.Rare) },
|
||||
{ MusicName.ValoriaShips, new DawnsMusicInfo(1075140, DawnsMusicRarity.Rare) }
|
||||
};
|
||||
|
||||
public static readonly MusicName[] m_CommonTracks =
|
||||
{
|
||||
MusicName.Samlethe, MusicName.Sailing, MusicName.Britain2, MusicName.Britain1,
|
||||
MusicName.Bucsden, MusicName.Forest_a, MusicName.Cove, MusicName.Death,
|
||||
MusicName.Dungeon9, MusicName.Dungeon2, MusicName.Cave01, MusicName.Combat3,
|
||||
MusicName.Combat1, MusicName.Combat2, MusicName.Jhelom, MusicName.Linelle,
|
||||
MusicName.LBCastle, MusicName.Minoc, MusicName.Moonglow, MusicName.Magincia,
|
||||
MusicName.Nujelm, MusicName.BTCastle, MusicName.Tavern04, MusicName.Skarabra,
|
||||
MusicName.Stones2, MusicName.Serpents, MusicName.Taiko, MusicName.Tavern01,
|
||||
MusicName.Tavern02, MusicName.Tavern03, MusicName.TokunoDungeon, MusicName.Trinsic,
|
||||
MusicName.OldUlt01, MusicName.Ocllo, MusicName.Vesper, MusicName.Victory,
|
||||
MusicName.Mountn_a, MusicName.Wind, MusicName.Yew, MusicName.Zento
|
||||
};
|
||||
|
||||
public static readonly MusicName[] m_UncommonTracks =
|
||||
{
|
||||
MusicName.GwennoConversation, MusicName.DreadHornArea, MusicName.ElfCity,
|
||||
MusicName.GoodEndGame, MusicName.GoodVsEvil, MusicName.GreatEarthSerpents,
|
||||
MusicName.GrizzleDungeon, MusicName.Humanoids_U9, MusicName.MelisandesLair,
|
||||
MusicName.MinocNegative, MusicName.ParoxysmusLair, MusicName.Paws
|
||||
};
|
||||
|
||||
public static readonly MusicName[] m_RareTracks =
|
||||
{
|
||||
MusicName.SelimsBar, MusicName.SerpentIsleCombat_U7, MusicName.ValoriaShips
|
||||
};
|
||||
|
||||
private int m_Count;
|
||||
private int m_ItemID;
|
||||
|
||||
private TimerExecutionToken _timerToken;
|
||||
|
||||
[Constructible]
|
||||
public DawnsMusicBox() : base(0x2AF9)
|
||||
{
|
||||
Weight = 1.0;
|
||||
|
||||
Tracks = new List<MusicName>();
|
||||
|
||||
while (Tracks.Count < 4)
|
||||
{
|
||||
var name = RandomTrack(DawnsMusicRarity.Common);
|
||||
|
||||
if (!Tracks.Contains(name))
|
||||
{
|
||||
Tracks.Add(name);
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
public DawnsMusicBox(Serial serial) : base(serial)
|
||||
box.Tracks = new List<MusicName>();
|
||||
box.Tracks.AddRange(Tracks);
|
||||
}
|
||||
|
||||
public override void GetProperties(IPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
var commonSongs = 0;
|
||||
var uncommonSongs = 0;
|
||||
var rareSongs = 0;
|
||||
|
||||
foreach (var track in _tracks)
|
||||
{
|
||||
}
|
||||
var info = GetInfo(track);
|
||||
|
||||
public override int LabelNumber => 1075198; // Dawn's Music Box
|
||||
|
||||
public List<MusicName> Tracks { get; private set; }
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public SecureLevel Level { get; set; }
|
||||
|
||||
public override void OnAfterDuped(Item newItem)
|
||||
{
|
||||
if (newItem is not DawnsMusicBox box)
|
||||
switch (info.Rarity)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
box.Tracks = new List<MusicName>();
|
||||
box.Tracks.AddRange(Tracks);
|
||||
}
|
||||
|
||||
public override void GetProperties(IPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
var commonSongs = 0;
|
||||
var uncommonSongs = 0;
|
||||
var rareSongs = 0;
|
||||
|
||||
for (var i = 0; i < Tracks.Count; i++)
|
||||
{
|
||||
var info = GetInfo(Tracks[i]);
|
||||
|
||||
switch (info.Rarity)
|
||||
{
|
||||
case DawnsMusicRarity.Common:
|
||||
case DawnsMusicRarity.Common:
|
||||
{
|
||||
commonSongs++;
|
||||
break;
|
||||
case DawnsMusicRarity.Uncommon:
|
||||
}
|
||||
case DawnsMusicRarity.Uncommon:
|
||||
{
|
||||
uncommonSongs++;
|
||||
break;
|
||||
case DawnsMusicRarity.Rare:
|
||||
}
|
||||
case DawnsMusicRarity.Rare:
|
||||
{
|
||||
rareSongs++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (commonSongs > 0)
|
||||
{
|
||||
list.Add(1075234, commonSongs); // ~1_NUMBER~ Common Tracks
|
||||
}
|
||||
|
||||
if (uncommonSongs > 0)
|
||||
{
|
||||
list.Add(1075235, uncommonSongs); // ~1_NUMBER~ Uncommon Tracks
|
||||
}
|
||||
|
||||
if (rareSongs > 0)
|
||||
{
|
||||
list.Add(1075236, rareSongs); // ~1_NUMBER~ Rare Tracks
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void GetContextMenuEntries(Mobile from, List<ContextMenuEntry> list)
|
||||
if (commonSongs > 0)
|
||||
{
|
||||
base.GetContextMenuEntries(from, list);
|
||||
|
||||
SetSecureLevelEntry.AddTo(from, this, list); // Set secure level
|
||||
list.Add(1075234, commonSongs); // ~1_NUMBER~ Common Tracks
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
if (uncommonSongs > 0)
|
||||
{
|
||||
if (!IsChildOf(from.Backpack) && !IsLockedDown)
|
||||
{
|
||||
from.SendLocalizedMessage(
|
||||
1061856
|
||||
); // You must have the item in your backpack or locked down in order to use it.
|
||||
}
|
||||
else if (IsLockedDown && !HasAccess(from))
|
||||
{
|
||||
from.SendLocalizedMessage(502436); // That is not accessible.
|
||||
}
|
||||
else
|
||||
{
|
||||
from.CloseGump<DawnsMusicBoxGump>();
|
||||
from.SendGump(new DawnsMusicBoxGump(this));
|
||||
}
|
||||
list.Add(1075235, uncommonSongs); // ~1_NUMBER~ Uncommon Tracks
|
||||
}
|
||||
|
||||
public bool HasAccess(Mobile m) =>
|
||||
m.AccessLevel >= AccessLevel.GameMaster || BaseHouse.FindHouseAt(this)?.HasAccess(m) == true;
|
||||
|
||||
public void PlayMusic(Mobile m, MusicName music)
|
||||
if (rareSongs > 0)
|
||||
{
|
||||
if (_timerToken.Running)
|
||||
{
|
||||
EndMusic(m);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_ItemID = ItemID;
|
||||
}
|
||||
|
||||
m.NetState.SendPlayMusic(music);
|
||||
Timer.StartTimer(TimeSpan.FromSeconds(0.5), TimeSpan.FromSeconds(0.5), 4, Animate, out _timerToken);
|
||||
}
|
||||
|
||||
public void EndMusic(Mobile m)
|
||||
{
|
||||
_timerToken.Cancel();
|
||||
m.NetState.SendStopMusic();
|
||||
|
||||
if (m_Count > 0)
|
||||
{
|
||||
ItemID = m_ItemID;
|
||||
}
|
||||
|
||||
m_Count = 0;
|
||||
}
|
||||
|
||||
private void Animate()
|
||||
{
|
||||
m_Count++;
|
||||
|
||||
if (m_Count >= 4)
|
||||
{
|
||||
m_Count = 0;
|
||||
ItemID = m_ItemID;
|
||||
}
|
||||
else
|
||||
{
|
||||
ItemID++;
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
|
||||
writer.Write(Tracks.Count);
|
||||
|
||||
for (var i = 0; i < Tracks.Count; i++)
|
||||
{
|
||||
writer.Write((int)Tracks[i]);
|
||||
}
|
||||
|
||||
writer.Write((int)Level);
|
||||
writer.Write(m_ItemID);
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadEncodedInt();
|
||||
|
||||
var count = reader.ReadInt();
|
||||
Tracks = new List<MusicName>();
|
||||
|
||||
for (var i = 0; i < count; i++)
|
||||
{
|
||||
Tracks.Add((MusicName)reader.ReadInt());
|
||||
}
|
||||
|
||||
Level = (SecureLevel)reader.ReadInt();
|
||||
m_ItemID = reader.ReadInt();
|
||||
}
|
||||
|
||||
public static DawnsMusicInfo GetInfo(MusicName name)
|
||||
{
|
||||
if (m_Info == null) // sanity
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
m_Info.TryGetValue(name, out var info);
|
||||
return info;
|
||||
}
|
||||
|
||||
public static MusicName RandomTrack(DawnsMusicRarity rarity)
|
||||
{
|
||||
var list = rarity switch
|
||||
{
|
||||
DawnsMusicRarity.Common => m_CommonTracks,
|
||||
DawnsMusicRarity.Uncommon => m_UncommonTracks,
|
||||
DawnsMusicRarity.Rare => m_RareTracks,
|
||||
_ => m_CommonTracks
|
||||
};
|
||||
|
||||
return list.RandomElement();
|
||||
list.Add(1075236, rareSongs); // ~1_NUMBER~ Rare Tracks
|
||||
}
|
||||
}
|
||||
|
||||
public override void GetContextMenuEntries(Mobile from, List<ContextMenuEntry> list)
|
||||
{
|
||||
base.GetContextMenuEntries(from, list);
|
||||
|
||||
SetSecureLevelEntry.AddTo(from, this, list); // Set secure level
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (!IsChildOf(from.Backpack) && !IsLockedDown)
|
||||
{
|
||||
// You must have the item in your backpack or locked down in order to use it.
|
||||
from.SendLocalizedMessage(1061856);
|
||||
}
|
||||
else if (IsLockedDown && !HasAccess(from))
|
||||
{
|
||||
from.SendLocalizedMessage(502436); // That is not accessible.
|
||||
}
|
||||
else
|
||||
{
|
||||
from.CloseGump<DawnsMusicBoxGump>();
|
||||
from.SendGump(new DawnsMusicBoxGump(this));
|
||||
}
|
||||
}
|
||||
|
||||
public bool HasAccess(Mobile m) =>
|
||||
m.AccessLevel >= AccessLevel.GameMaster || BaseHouse.FindHouseAt(this)?.HasAccess(m) == true;
|
||||
|
||||
public void PlayMusic(Mobile m, MusicName music)
|
||||
{
|
||||
if (_timerToken.Running)
|
||||
{
|
||||
EndMusic(m);
|
||||
}
|
||||
else
|
||||
{
|
||||
_itemID = ItemID;
|
||||
}
|
||||
|
||||
m.NetState.SendPlayMusic(music);
|
||||
Timer.StartTimer(TimeSpan.FromSeconds(0.5), TimeSpan.FromSeconds(0.5), 4, Animate, out _timerToken);
|
||||
}
|
||||
|
||||
public void EndMusic(Mobile m)
|
||||
{
|
||||
_timerToken.Cancel();
|
||||
m.NetState.SendStopMusic();
|
||||
|
||||
if (_count > 0)
|
||||
{
|
||||
ItemID = _itemID;
|
||||
}
|
||||
|
||||
_count = 0;
|
||||
}
|
||||
|
||||
private void Animate()
|
||||
{
|
||||
_count++;
|
||||
|
||||
if (_count >= 4)
|
||||
{
|
||||
_count = 0;
|
||||
ItemID = _itemID;
|
||||
}
|
||||
else
|
||||
{
|
||||
ItemID++;
|
||||
}
|
||||
}
|
||||
|
||||
private void Deserialize(IGenericReader reader, int version)
|
||||
{
|
||||
var count = reader.ReadInt();
|
||||
_tracks = new List<MusicName>();
|
||||
|
||||
for (var i = 0; i < count; i++)
|
||||
{
|
||||
_tracks.Add((MusicName)reader.ReadInt());
|
||||
}
|
||||
|
||||
_level = (SecureLevel)reader.ReadInt();
|
||||
_itemID = reader.ReadInt();
|
||||
}
|
||||
|
||||
[AfterDeserialization]
|
||||
private void AfterDeserialization()
|
||||
{
|
||||
// Just in case we serialize while music was playing
|
||||
ItemID = _itemID;
|
||||
}
|
||||
|
||||
public static DawnsMusicInfo GetInfo(MusicName name)
|
||||
{
|
||||
if (_info == null) // sanity
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
_info.TryGetValue(name, out var info);
|
||||
return info;
|
||||
}
|
||||
|
||||
public static MusicName RandomTrack(DawnsMusicRarity rarity) => GetTracks(rarity).RandomElement();
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static MusicName[] GetTracks(DawnsMusicRarity rarity)
|
||||
{
|
||||
return rarity switch
|
||||
{
|
||||
DawnsMusicRarity.Common => _commonTracks,
|
||||
DawnsMusicRarity.Uncommon => _uncommonTracks,
|
||||
DawnsMusicRarity.Rare => _rareTracks,
|
||||
_ => _commonTracks
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,96 @@
|
|||
using Server.Items;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Gumps;
|
||||
|
||||
public class DawnsMusicBoxGump : Gump
|
||||
{
|
||||
private readonly DawnsMusicBox m_Box;
|
||||
|
||||
public DawnsMusicBoxGump(DawnsMusicBox box) : base(60, 36)
|
||||
{
|
||||
m_Box = box;
|
||||
|
||||
AddPage(0);
|
||||
|
||||
AddBackground(0, 0, 273, 324, 0x13BE);
|
||||
AddImageTiled(10, 10, 253, 20, 0xA40);
|
||||
AddImageTiled(10, 40, 253, 244, 0xA40);
|
||||
AddImageTiled(10, 294, 253, 20, 0xA40);
|
||||
AddAlphaRegion(10, 10, 253, 304);
|
||||
AddButton(10, 294, 0xFB1, 0xFB2, 0);
|
||||
AddHtmlLocalized(45, 296, 450, 20, 1060051, 0x7FFF); // CANCEL
|
||||
AddHtmlLocalized(14, 12, 273, 20, 1075130, 0x7FFF); // Choose a track to play
|
||||
|
||||
var page = 1;
|
||||
int i, y = 49;
|
||||
|
||||
AddPage(page);
|
||||
|
||||
for (i = 0; i < m_Box.Tracks.Count; i++, y += 24)
|
||||
{
|
||||
var info = DawnsMusicBox.GetInfo(m_Box.Tracks[i]);
|
||||
|
||||
if (i > 0 && i % 10 == 0)
|
||||
{
|
||||
AddButton(228, 294, 0xFA5, 0xFA6, 0, GumpButtonType.Page, page + 1);
|
||||
|
||||
AddPage(page + 1);
|
||||
y = 49;
|
||||
|
||||
AddButton(193, 294, 0xFAE, 0xFAF, 0, GumpButtonType.Page, page);
|
||||
|
||||
page++;
|
||||
}
|
||||
|
||||
if (info == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
AddButton(19, y, 0x845, 0x846, 100 + i);
|
||||
AddHtmlLocalized(44, y - 2, 213, 20, info.Name, 0x7FFF);
|
||||
}
|
||||
|
||||
if (i % 10 == 0)
|
||||
{
|
||||
AddButton(228, 294, 0xFA5, 0xFA6, 0, GumpButtonType.Page, page + 1);
|
||||
|
||||
AddPage(page + 1);
|
||||
y = 49;
|
||||
|
||||
AddButton(193, 294, 0xFAE, 0xFAF, 0, GumpButtonType.Page, page);
|
||||
}
|
||||
|
||||
AddButton(19, y, 0x845, 0x846, 1);
|
||||
AddHtmlLocalized(44, y - 2, 213, 20, 1075207, 0x7FFF); // Stop Song
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState sender, RelayInfo info)
|
||||
{
|
||||
if (m_Box?.Deleted != false)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var m = sender.Mobile;
|
||||
|
||||
if (!m_Box.IsChildOf(m.Backpack) && !m_Box.IsLockedDown)
|
||||
{
|
||||
// You must have the item in your backpack or locked down in order to use it.
|
||||
m.SendLocalizedMessage(1061856);
|
||||
}
|
||||
else if (m_Box.IsLockedDown && !m_Box.HasAccess(m))
|
||||
{
|
||||
m.SendLocalizedMessage(502691); // You must be the owner to use this.
|
||||
}
|
||||
else if (info.ButtonID == 1)
|
||||
{
|
||||
m_Box.EndMusic(m);
|
||||
}
|
||||
else if (info.ButtonID >= 100 && info.ButtonID - 100 < m_Box.Tracks.Count)
|
||||
{
|
||||
m_Box.PlayMusic(m, m_Box.Tracks[info.ButtonID - 100]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,149 +1,99 @@
|
|||
using Server.Targeting;
|
||||
using ModernUO.Serialization;
|
||||
using Server.Targeting;
|
||||
|
||||
namespace Server.Items
|
||||
namespace Server.Items;
|
||||
|
||||
[Flippable(0x1053, 0x1054)]
|
||||
[SerializationGenerator(2)]
|
||||
public partial class DawnsMusicGear : Item
|
||||
{
|
||||
[Flippable(0x1053, 0x1054)]
|
||||
public class DawnsMusicGear : Item
|
||||
[SerializableField(0)]
|
||||
[SerializedCommandProperty(AccessLevel.GameMaster)]
|
||||
private MusicName _music;
|
||||
|
||||
[Constructible]
|
||||
public DawnsMusicGear() : this(DawnsMusicBox.RandomTrack(DawnsMusicRarity.Common))
|
||||
{
|
||||
[Constructible]
|
||||
public DawnsMusicGear() : this(DawnsMusicBox.RandomTrack(DawnsMusicRarity.Common))
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public DawnsMusicGear(MusicName music) : base(0x1053)
|
||||
{
|
||||
_music = music;
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public static DawnsMusicGear RandomCommon => new(DawnsMusicBox.RandomTrack(DawnsMusicRarity.Common));
|
||||
|
||||
public static DawnsMusicGear RandomUncommon => new(DawnsMusicBox.RandomTrack(DawnsMusicRarity.Uncommon));
|
||||
|
||||
public static DawnsMusicGear RandomRare => new(DawnsMusicBox.RandomTrack(DawnsMusicRarity.Rare));
|
||||
|
||||
public override void AddNameProperty(IPropertyList list)
|
||||
{
|
||||
var info = DawnsMusicBox.GetInfo(Music);
|
||||
|
||||
if (info == null)
|
||||
{
|
||||
base.AddNameProperty(list);
|
||||
return;
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public DawnsMusicGear(MusicName music) : base(0x1053)
|
||||
if (info.Rarity == DawnsMusicRarity.Common)
|
||||
{
|
||||
Music = music;
|
||||
|
||||
Weight = 1.0;
|
||||
list.Add(1075204); // Gear for Dawn's Music Box (Common)
|
||||
}
|
||||
else if (info.Rarity == DawnsMusicRarity.Uncommon)
|
||||
{
|
||||
list.Add(1075205); // Gear for Dawn's Music Box (Uncommon)
|
||||
}
|
||||
else if (info.Rarity == DawnsMusicRarity.Rare)
|
||||
{
|
||||
list.Add(1075206); // Gear for Dawn's Music Box (Rare)
|
||||
}
|
||||
|
||||
public DawnsMusicGear(Serial serial) : base(serial)
|
||||
list.Add(info.Name);
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
from.Target = new InternalTarget(this);
|
||||
}
|
||||
|
||||
private void Deserialize(IGenericReader reader, int version)
|
||||
{
|
||||
Music = (MusicName)reader.ReadInt();
|
||||
}
|
||||
|
||||
public class InternalTarget : Target
|
||||
{
|
||||
private readonly DawnsMusicGear _gear;
|
||||
|
||||
public InternalTarget(DawnsMusicGear gear) : base(2, false, TargetFlags.None) => _gear = gear;
|
||||
|
||||
protected override void OnTarget(Mobile from, object targeted)
|
||||
{
|
||||
}
|
||||
|
||||
public static DawnsMusicGear RandomCommon => new(DawnsMusicBox.RandomTrack(DawnsMusicRarity.Common));
|
||||
|
||||
public static DawnsMusicGear RandomUncommon =>
|
||||
new(DawnsMusicBox.RandomTrack(DawnsMusicRarity.Uncommon));
|
||||
|
||||
public static DawnsMusicGear RandomRare => new(DawnsMusicBox.RandomTrack(DawnsMusicRarity.Rare));
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public MusicName Music { get; set; }
|
||||
|
||||
public override void AddNameProperty(IPropertyList list)
|
||||
{
|
||||
var info = DawnsMusicBox.GetInfo(Music);
|
||||
|
||||
if (info != null)
|
||||
if (_gear?.Deleted != false)
|
||||
{
|
||||
if (info.Rarity == DawnsMusicRarity.Common)
|
||||
{
|
||||
list.Add(1075204); // Gear for Dawn's Music Box (Common)
|
||||
}
|
||||
else if (info.Rarity == DawnsMusicRarity.Uncommon)
|
||||
{
|
||||
list.Add(1075205); // Gear for Dawn's Music Box (Uncommon)
|
||||
}
|
||||
else if (info.Rarity == DawnsMusicRarity.Rare)
|
||||
{
|
||||
list.Add(1075206); // Gear for Dawn's Music Box (Rare)
|
||||
}
|
||||
|
||||
list.Add(info.Name);
|
||||
}
|
||||
else
|
||||
{
|
||||
base.AddNameProperty(list);
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
from.Target = new InternalTarget(this);
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(1); // version
|
||||
|
||||
writer.Write((int)Music);
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadEncodedInt();
|
||||
|
||||
switch (version)
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
Music = (MusicName)reader.ReadInt();
|
||||
break;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (version == 0) // Music wasn't serialized in version 0, pick a new track of random rarity
|
||||
if (targeted is not DawnsMusicBox box)
|
||||
{
|
||||
DawnsMusicRarity rarity;
|
||||
var rand = Utility.RandomDouble();
|
||||
|
||||
if (rand < 0.025)
|
||||
{
|
||||
rarity = DawnsMusicRarity.Rare;
|
||||
}
|
||||
else if (rand < 0.225)
|
||||
{
|
||||
rarity = DawnsMusicRarity.Uncommon;
|
||||
}
|
||||
else
|
||||
{
|
||||
rarity = DawnsMusicRarity.Common;
|
||||
}
|
||||
|
||||
Music = DawnsMusicBox.RandomTrack(rarity);
|
||||
from.SendLocalizedMessage(1071964); // Gears can only be put into a musicbox.
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
public class InternalTarget : Target
|
||||
{
|
||||
private readonly DawnsMusicGear m_Gear;
|
||||
|
||||
public InternalTarget(DawnsMusicGear gear) : base(2, false, TargetFlags.None) => m_Gear = gear;
|
||||
|
||||
protected override void OnTarget(Mobile from, object targeted)
|
||||
if (!box.Tracks.Contains(_gear.Music))
|
||||
{
|
||||
if (m_Gear?.Deleted != false)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (targeted is DawnsMusicBox box)
|
||||
{
|
||||
if (!box.Tracks.Contains(m_Gear.Music))
|
||||
{
|
||||
box.Tracks.Add(m_Gear.Music);
|
||||
box.InvalidateProperties();
|
||||
|
||||
m_Gear.Delete();
|
||||
|
||||
from.SendLocalizedMessage(1071961); // This song has been added to the musicbox.
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(1071962); // This song track is already in the musicbox.
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(1071964); // Gears can only be put into a musicbox.
|
||||
}
|
||||
box.Tracks.Add(_gear.Music);
|
||||
from.SendLocalizedMessage(1071962); // This song track is already in the musicbox.
|
||||
return;
|
||||
}
|
||||
|
||||
box.InvalidateProperties();
|
||||
_gear.Delete();
|
||||
from.SendLocalizedMessage(1071961); // This song has been added to the musicbox.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,22 +1,10 @@
|
|||
namespace Server.Items
|
||||
namespace Server.Items;
|
||||
|
||||
public enum DawnsMusicRarity
|
||||
{
|
||||
public enum DawnsMusicRarity
|
||||
{
|
||||
Common,
|
||||
Uncommon,
|
||||
Rare
|
||||
}
|
||||
|
||||
public class DawnsMusicInfo
|
||||
{
|
||||
public DawnsMusicInfo(int name, DawnsMusicRarity rarity)
|
||||
{
|
||||
Name = name;
|
||||
Rarity = rarity;
|
||||
}
|
||||
|
||||
public int Name { get; }
|
||||
|
||||
public DawnsMusicRarity Rarity { get; }
|
||||
}
|
||||
Common,
|
||||
Uncommon,
|
||||
Rare
|
||||
}
|
||||
|
||||
public record DawnsMusicInfo(int Name, DawnsMusicRarity Rarity);
|
||||
|
|
|
|||
|
|
@ -1,50 +1,34 @@
|
|||
namespace Server.Items
|
||||
using ModernUO.Serialization;
|
||||
|
||||
namespace Server.Items;
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class DupresShield : BaseShield
|
||||
{
|
||||
public class DupresShield : BaseShield
|
||||
[Constructible]
|
||||
public DupresShield() : base(0x2B01)
|
||||
{
|
||||
[Constructible]
|
||||
public DupresShield() : base(0x2B01)
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
Weight = 6.0;
|
||||
LootType = LootType.Blessed;
|
||||
Weight = 6.0;
|
||||
|
||||
Attributes.BonusHits = 5;
|
||||
Attributes.RegenHits = 1;
|
||||
Attributes.BonusHits = 5;
|
||||
Attributes.RegenHits = 1;
|
||||
|
||||
SkillBonuses.SetValues(0, SkillName.Parry, 5);
|
||||
}
|
||||
|
||||
public DupresShield(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1075196; // Dupre's Shield
|
||||
|
||||
public override int BasePhysicalResistance => 1;
|
||||
public override int BaseFireResistance => 0;
|
||||
public override int BaseColdResistance => 0;
|
||||
public override int BasePoisonResistance => 0;
|
||||
public override int BaseEnergyResistance => 1;
|
||||
|
||||
public override int InitMinHits => 255;
|
||||
public override int InitMaxHits => 255;
|
||||
|
||||
public override int AosStrReq => 50;
|
||||
|
||||
public override int ArmorBase => 15;
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadEncodedInt();
|
||||
}
|
||||
SkillBonuses.SetValues(0, SkillName.Parry, 5);
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1075196; // Dupre's Shield
|
||||
|
||||
public override int BasePhysicalResistance => 1;
|
||||
public override int BaseFireResistance => 0;
|
||||
public override int BaseColdResistance => 0;
|
||||
public override int BasePoisonResistance => 0;
|
||||
public override int BaseEnergyResistance => 1;
|
||||
|
||||
public override int InitMinHits => 255;
|
||||
public override int InitMaxHits => 255;
|
||||
|
||||
public override int AosStrReq => 50;
|
||||
|
||||
public override int ArmorBase => 15;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,262 +1,198 @@
|
|||
using System;
|
||||
using ModernUO.Serialization;
|
||||
|
||||
namespace Server.Items
|
||||
namespace Server.Items;
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class EnhancedBandage : Bandage
|
||||
{
|
||||
public class EnhancedBandage : Bandage
|
||||
[Constructible]
|
||||
public EnhancedBandage(int amount = 1) : base(amount) => Hue = 0x8A5;
|
||||
|
||||
// TODO: On BandageContext, check if enhanced, and add this value
|
||||
public const int HealingBonus = 10;
|
||||
|
||||
public override int LabelNumber => 1152441; // enhanced bandage
|
||||
|
||||
public override bool Dye(Mobile from, DyeTub sender) => false;
|
||||
|
||||
public override void AddNameProperties(IPropertyList list)
|
||||
{
|
||||
[Constructible]
|
||||
public EnhancedBandage(int amount = 1)
|
||||
: base(amount) =>
|
||||
Hue = 0x8A5;
|
||||
base.AddNameProperties(list);
|
||||
|
||||
public EnhancedBandage(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
list.Add(1075216); // these bandages have been enhanced
|
||||
}
|
||||
}
|
||||
|
||||
public static int HealingBonus => 10;
|
||||
[Flippable(0x2AC0, 0x2AC3)]
|
||||
[SerializationGenerator(1)]
|
||||
public partial class FountainOfLife : BaseAddonContainer
|
||||
{
|
||||
public const int MaxCharges = 10;
|
||||
|
||||
public override int LabelNumber => 1152441; // enhanced bandage
|
||||
[SerializableField(1)]
|
||||
private Timer _timer;
|
||||
|
||||
public override bool Dye(Mobile from, DyeTub sender) => false;
|
||||
|
||||
public override void AddNameProperties(IPropertyList list)
|
||||
{
|
||||
base.AddNameProperties(list);
|
||||
|
||||
list.Add(1075216); // these bandages have been enhanced
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadEncodedInt();
|
||||
}
|
||||
[Constructible]
|
||||
public FountainOfLife(int charges = MaxCharges) : base(0x2AC0)
|
||||
{
|
||||
_charges = charges;
|
||||
}
|
||||
|
||||
[Flippable(0x2AC0, 0x2AC3)]
|
||||
public class FountainOfLife : BaseAddonContainer
|
||||
[DeserializeTimerField(1)]
|
||||
private void DeserializeTimer(TimeSpan delay)
|
||||
{
|
||||
private int m_Charges;
|
||||
_timer = Timer.DelayCall(Utility.Max(delay, TimeSpan.Zero), RechargeTime, Recharge);
|
||||
}
|
||||
|
||||
private TimerExecutionToken _timerToken;
|
||||
public override BaseAddonContainerDeed Deed => new FountainOfLifeDeed(_charges);
|
||||
|
||||
[Constructible]
|
||||
public FountainOfLife(int charges = 10)
|
||||
: base(0x2AC0)
|
||||
public virtual TimeSpan RechargeTime => TimeSpan.FromDays(1);
|
||||
|
||||
public override int LabelNumber => 1075197; // Fountain of Life
|
||||
public override int DefaultGumpID => 0x484;
|
||||
public override int DefaultDropSound => 66;
|
||||
public override int DefaultMaxItems => 125;
|
||||
|
||||
[SerializableProperty(0)]
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public int Charges
|
||||
{
|
||||
get => _charges;
|
||||
set
|
||||
{
|
||||
m_Charges = charges;
|
||||
|
||||
Timer.StartTimer(RechargeTime, RechargeTime, Recharge, out _timerToken);
|
||||
}
|
||||
|
||||
public FountainOfLife(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override BaseAddonContainerDeed Deed => new FountainOfLifeDeed(m_Charges);
|
||||
|
||||
public virtual TimeSpan RechargeTime => TimeSpan.FromDays(1);
|
||||
|
||||
public override int LabelNumber => 1075197; // Fountain of Life
|
||||
public override int DefaultGumpID => 0x484;
|
||||
public override int DefaultDropSound => 66;
|
||||
public override int DefaultMaxItems => 125;
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public int Charges
|
||||
{
|
||||
get => m_Charges;
|
||||
set
|
||||
{
|
||||
m_Charges = Math.Min(value, 10);
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
public override bool OnDragLift(Mobile from) => false;
|
||||
|
||||
public override bool OnDragDrop(Mobile from, Item dropped)
|
||||
{
|
||||
if (dropped is Bandage)
|
||||
{
|
||||
var allow = base.OnDragDrop(from, dropped);
|
||||
|
||||
if (allow)
|
||||
{
|
||||
Enhance(from);
|
||||
}
|
||||
|
||||
return allow;
|
||||
}
|
||||
|
||||
from.SendLocalizedMessage(1075209); // Only bandages may be dropped into the fountain.
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool OnDragDropInto(Mobile from, Item item, Point3D p)
|
||||
{
|
||||
if (item is Bandage)
|
||||
{
|
||||
var allow = base.OnDragDropInto(from, item, p);
|
||||
|
||||
if (allow)
|
||||
{
|
||||
Enhance(from);
|
||||
}
|
||||
|
||||
return allow;
|
||||
}
|
||||
|
||||
from.SendLocalizedMessage(1075209); // Only bandages may be dropped into the fountain.
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void AddNameProperties(IPropertyList list)
|
||||
{
|
||||
base.AddNameProperties(list);
|
||||
|
||||
list.Add(1075217, m_Charges); // ~1_val~ charges remaining
|
||||
}
|
||||
|
||||
public override void OnDelete()
|
||||
{
|
||||
_timerToken.Cancel();
|
||||
|
||||
base.OnDelete();
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
|
||||
writer.Write(m_Charges);
|
||||
writer.Write(_timerToken.Next);
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadEncodedInt();
|
||||
|
||||
m_Charges = reader.ReadInt();
|
||||
|
||||
var next = reader.ReadDateTime();
|
||||
|
||||
var now = Core.Now;
|
||||
|
||||
if (next < now)
|
||||
{
|
||||
Timer.StartTimer(RechargeTime, Recharge, out _timerToken);
|
||||
}
|
||||
else
|
||||
{
|
||||
Timer.StartTimer(next - now, RechargeTime, Recharge, out _timerToken);
|
||||
}
|
||||
}
|
||||
|
||||
public void Recharge()
|
||||
{
|
||||
m_Charges = 10;
|
||||
|
||||
Enhance(null);
|
||||
}
|
||||
|
||||
public void Enhance(Mobile from)
|
||||
{
|
||||
for (var i = Items.Count - 1; i >= 0 && m_Charges > 0; --i)
|
||||
{
|
||||
if (Items[i] is EnhancedBandage)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (Items[i] is Bandage bandage)
|
||||
{
|
||||
Item enhanced;
|
||||
|
||||
if (bandage.Amount > m_Charges)
|
||||
{
|
||||
bandage.Amount -= m_Charges;
|
||||
enhanced = new EnhancedBandage(m_Charges);
|
||||
m_Charges = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
enhanced = new EnhancedBandage(bandage.Amount);
|
||||
m_Charges -= bandage.Amount;
|
||||
bandage.Delete();
|
||||
}
|
||||
|
||||
if (from == null || !TryDropItem(from, enhanced, false)) // try stacking first
|
||||
{
|
||||
DropItem(enhanced);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
_charges = Math.Min(value, MaxCharges);
|
||||
InvalidateProperties();
|
||||
this.MarkDirty();
|
||||
}
|
||||
}
|
||||
|
||||
public class FountainOfLifeDeed : BaseAddonContainerDeed
|
||||
public override bool OnDragLift(Mobile from) => false;
|
||||
|
||||
public override bool OnDragDrop(Mobile from, Item dropped)
|
||||
{
|
||||
private int m_Charges;
|
||||
|
||||
[Constructible]
|
||||
public FountainOfLifeDeed(int charges = 10)
|
||||
if (dropped is not Bandage)
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
m_Charges = charges;
|
||||
from.SendLocalizedMessage(1075209); // Only bandages may be dropped into the fountain.
|
||||
return false;
|
||||
}
|
||||
|
||||
public FountainOfLifeDeed(Serial serial)
|
||||
: base(serial)
|
||||
if (base.OnDragDrop(from, dropped))
|
||||
{
|
||||
Enhance(from);
|
||||
return true;
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1075197; // Fountain of Life
|
||||
public override BaseAddonContainer Addon => new FountainOfLife(m_Charges);
|
||||
return false;
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public int Charges
|
||||
public override bool OnDragDropInto(Mobile from, Item item, Point3D p)
|
||||
{
|
||||
if (item is not Bandage)
|
||||
{
|
||||
get => m_Charges;
|
||||
set
|
||||
from.SendLocalizedMessage(1075209); // Only bandages may be dropped into the fountain.
|
||||
return false;
|
||||
}
|
||||
|
||||
if (base.OnDragDropInto(from, item, p))
|
||||
{
|
||||
Enhance(from);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void AddNameProperties(IPropertyList list)
|
||||
{
|
||||
base.AddNameProperties(list);
|
||||
|
||||
list.Add(1075217, _charges); // ~1_val~ charges remaining
|
||||
}
|
||||
|
||||
public override void OnDelete()
|
||||
{
|
||||
_timer?.Stop();
|
||||
base.OnDelete();
|
||||
}
|
||||
|
||||
private void Deserialize(IGenericReader reader, int version)
|
||||
{
|
||||
_charges = reader.ReadInt();
|
||||
|
||||
var next = reader.ReadDateTime();
|
||||
|
||||
var now = Core.Now;
|
||||
|
||||
DeserializeTimer(next - now);
|
||||
}
|
||||
|
||||
public void Recharge()
|
||||
{
|
||||
Charges = MaxCharges;
|
||||
Enhance(null);
|
||||
}
|
||||
|
||||
public void Enhance(Mobile from)
|
||||
{
|
||||
for (var i = Items.Count - 1; i >= 0 && _charges > 0; --i)
|
||||
{
|
||||
if (Items[i] is EnhancedBandage)
|
||||
{
|
||||
m_Charges = Math.Min(value, 10);
|
||||
InvalidateProperties();
|
||||
continue;
|
||||
}
|
||||
|
||||
if (Items[i] is Bandage bandage)
|
||||
{
|
||||
Item enhanced;
|
||||
|
||||
if (bandage.Amount > _charges)
|
||||
{
|
||||
bandage.Amount -= _charges;
|
||||
enhanced = new EnhancedBandage(_charges);
|
||||
Charges = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
enhanced = new EnhancedBandage(bandage.Amount);
|
||||
Charges -= bandage.Amount;
|
||||
bandage.Delete();
|
||||
}
|
||||
|
||||
if (from == null || !TryDropItem(from, enhanced, false)) // try stacking first
|
||||
{
|
||||
DropItem(enhanced);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class FountainOfLifeDeed : BaseAddonContainerDeed
|
||||
{
|
||||
[Constructible]
|
||||
public FountainOfLifeDeed(int charges = FountainOfLife.MaxCharges)
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
_charges = charges;
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1075197; // Fountain of Life
|
||||
public override BaseAddonContainer Addon => new FountainOfLife(_charges);
|
||||
|
||||
[SerializableProperty(0)]
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public int Charges
|
||||
{
|
||||
get => _charges;
|
||||
set
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
|
||||
writer.Write(m_Charges);
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadEncodedInt();
|
||||
|
||||
m_Charges = reader.ReadInt();
|
||||
_charges = Math.Min(value, FountainOfLife.MaxCharges);
|
||||
InvalidateProperties();
|
||||
this.MarkDirty();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,41 +1,20 @@
|
|||
namespace Server.Items
|
||||
using ModernUO.Serialization;
|
||||
|
||||
namespace Server.Items;
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class OssianGrimoire : NecromancerSpellbook
|
||||
{
|
||||
public class OssianGrimoire : NecromancerSpellbook
|
||||
[Constructible]
|
||||
public OssianGrimoire()
|
||||
{
|
||||
[Constructible]
|
||||
public OssianGrimoire()
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
LootType = LootType.Blessed;
|
||||
|
||||
SkillBonuses.SetValues(0, SkillName.Necromancy, 10.0);
|
||||
Attributes.RegenMana = 1;
|
||||
Attributes.CastSpeed = 1;
|
||||
Attributes.IncreasedKarmaLoss = 5;
|
||||
}
|
||||
|
||||
public OssianGrimoire(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1078148; // Ossian Grimoire
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(1); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadEncodedInt();
|
||||
|
||||
if (version == 0)
|
||||
{
|
||||
Attributes.IncreasedKarmaLoss = 5;
|
||||
}
|
||||
}
|
||||
SkillBonuses.SetValues(0, SkillName.Necromancy, 10.0);
|
||||
Attributes.RegenMana = 1;
|
||||
Attributes.CastSpeed = 1;
|
||||
Attributes.IncreasedKarmaLoss = 5;
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1078148; // Ossian Grimoire
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,47 +1,21 @@
|
|||
namespace Server.Items
|
||||
using ModernUO.Serialization;
|
||||
|
||||
namespace Server.Items;
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class QuiverOfInfinity : BaseQuiver
|
||||
{
|
||||
public class QuiverOfInfinity : BaseQuiver
|
||||
[Constructible]
|
||||
public QuiverOfInfinity() : base(0x2B02)
|
||||
{
|
||||
[Constructible]
|
||||
public QuiverOfInfinity() : base(0x2B02)
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
Weight = 8.0;
|
||||
LootType = LootType.Blessed;
|
||||
Weight = 8.0;
|
||||
|
||||
WeightReduction = 30;
|
||||
LowerAmmoCost = 20;
|
||||
WeightReduction = 30;
|
||||
LowerAmmoCost = 20;
|
||||
|
||||
Attributes.DefendChance = 5;
|
||||
}
|
||||
|
||||
public QuiverOfInfinity(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1075201; // Quiver of Infinity
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(2); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadEncodedInt();
|
||||
|
||||
if (version < 1 && DamageIncrease == 0)
|
||||
{
|
||||
DamageIncrease = 10;
|
||||
}
|
||||
|
||||
if (version < 2 && Attributes.WeaponDamage == 10)
|
||||
{
|
||||
Attributes.WeaponDamage = 0;
|
||||
}
|
||||
}
|
||||
Attributes.DefendChance = 5;
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1075201; // Quiver of Infinity
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,196 +1,112 @@
|
|||
using System;
|
||||
using ModernUO.Serialization;
|
||||
using Server.Mobiles;
|
||||
using Server.Spells.Ninjitsu;
|
||||
|
||||
namespace Server.Items
|
||||
namespace Server.Items;
|
||||
|
||||
public enum TalismanForm
|
||||
{
|
||||
public enum TalismanForm
|
||||
Ferret = 1031672,
|
||||
Squirrel = 1031671,
|
||||
CuSidhe = 1031670,
|
||||
Reptalon = 1075202
|
||||
}
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class BaseFormTalisman : Item
|
||||
{
|
||||
public BaseFormTalisman() : base(0x2F59)
|
||||
{
|
||||
Ferret = 1031672,
|
||||
Squirrel = 1031671,
|
||||
CuSidhe = 1031670,
|
||||
Reptalon = 1075202
|
||||
LootType = LootType.Blessed;
|
||||
Layer = Layer.Talisman;
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public class BaseFormTalisman : Item
|
||||
public virtual TalismanForm Form => TalismanForm.Squirrel;
|
||||
|
||||
public override void AddNameProperty(IPropertyList list)
|
||||
{
|
||||
public BaseFormTalisman() : base(0x2F59)
|
||||
list.Add(1075200, $"{(int)Form:#}");
|
||||
}
|
||||
|
||||
public override void OnRemoved(IEntity parent)
|
||||
{
|
||||
base.OnRemoved(parent);
|
||||
|
||||
if (parent is Mobile m)
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
Layer = Layer.Talisman;
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public BaseFormTalisman(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual TalismanForm Form => TalismanForm.Squirrel;
|
||||
|
||||
public override void AddNameProperty(IPropertyList list)
|
||||
{
|
||||
list.Add(1075200, $"{(int)Form:#}");
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadEncodedInt();
|
||||
}
|
||||
|
||||
public override void OnRemoved(IEntity parent)
|
||||
{
|
||||
base.OnRemoved(parent);
|
||||
|
||||
if (parent is Mobile m)
|
||||
{
|
||||
AnimalForm.RemoveContext(m, true);
|
||||
}
|
||||
}
|
||||
|
||||
public static bool EntryEnabled(Mobile m, Type type)
|
||||
{
|
||||
if (type == typeof(Squirrel))
|
||||
{
|
||||
return m.Talisman is SquirrelFormTalisman;
|
||||
}
|
||||
|
||||
if (type == typeof(Ferret))
|
||||
{
|
||||
return m.Talisman is FerretFormTalisman;
|
||||
}
|
||||
|
||||
if (type == typeof(CuSidhe))
|
||||
{
|
||||
return m.Talisman is CuSidheFormTalisman;
|
||||
}
|
||||
|
||||
if (type == typeof(Reptalon))
|
||||
{
|
||||
return m.Talisman is ReptalonFormTalisman;
|
||||
}
|
||||
|
||||
return true;
|
||||
AnimalForm.RemoveContext(m, true);
|
||||
}
|
||||
}
|
||||
|
||||
public class FerretFormTalisman : BaseFormTalisman
|
||||
public static bool EntryEnabled(Mobile m, Type type)
|
||||
{
|
||||
[Constructible]
|
||||
public FerretFormTalisman()
|
||||
if (type == typeof(Squirrel))
|
||||
{
|
||||
return m.Talisman is SquirrelFormTalisman;
|
||||
}
|
||||
|
||||
public FerretFormTalisman(Serial serial) : base(serial)
|
||||
if (type == typeof(Ferret))
|
||||
{
|
||||
return m.Talisman is FerretFormTalisman;
|
||||
}
|
||||
|
||||
public override TalismanForm Form => TalismanForm.Ferret;
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
if (type == typeof(CuSidhe))
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
return m.Talisman is CuSidheFormTalisman;
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class SquirrelFormTalisman : BaseFormTalisman
|
||||
{
|
||||
[Constructible]
|
||||
public SquirrelFormTalisman()
|
||||
if (type == typeof(Reptalon))
|
||||
{
|
||||
return m.Talisman is ReptalonFormTalisman;
|
||||
}
|
||||
|
||||
public SquirrelFormTalisman(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override TalismanForm Form => TalismanForm.Squirrel;
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class CuSidheFormTalisman : BaseFormTalisman
|
||||
{
|
||||
[Constructible]
|
||||
public CuSidheFormTalisman()
|
||||
{
|
||||
}
|
||||
|
||||
public CuSidheFormTalisman(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override TalismanForm Form => TalismanForm.CuSidhe;
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class ReptalonFormTalisman : BaseFormTalisman
|
||||
{
|
||||
[Constructible]
|
||||
public ReptalonFormTalisman()
|
||||
{
|
||||
}
|
||||
|
||||
public ReptalonFormTalisman(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override TalismanForm Form => TalismanForm.Reptalon;
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadEncodedInt();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class FerretFormTalisman : BaseFormTalisman
|
||||
{
|
||||
[Constructible]
|
||||
public FerretFormTalisman()
|
||||
{
|
||||
}
|
||||
|
||||
public override TalismanForm Form => TalismanForm.Ferret;
|
||||
}
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class SquirrelFormTalisman : BaseFormTalisman
|
||||
{
|
||||
[Constructible]
|
||||
public SquirrelFormTalisman()
|
||||
{
|
||||
}
|
||||
|
||||
public override TalismanForm Form => TalismanForm.Squirrel;
|
||||
}
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class CuSidheFormTalisman : BaseFormTalisman
|
||||
{
|
||||
[Constructible]
|
||||
public CuSidheFormTalisman()
|
||||
{
|
||||
}
|
||||
|
||||
public override TalismanForm Form => TalismanForm.CuSidhe;
|
||||
|
||||
}
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class ReptalonFormTalisman : BaseFormTalisman
|
||||
{
|
||||
[Constructible]
|
||||
public ReptalonFormTalisman()
|
||||
{
|
||||
}
|
||||
|
||||
public override TalismanForm Form => TalismanForm.Reptalon;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,37 +1,21 @@
|
|||
namespace Server.Items
|
||||
using ModernUO.Serialization;
|
||||
|
||||
namespace Server.Items;
|
||||
|
||||
[Flippable(0x2684, 0x2683)]
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class HoodedShroudOfShadows : BaseOuterTorso
|
||||
{
|
||||
[Flippable(0x2684, 0x2683)]
|
||||
public class HoodedShroudOfShadows : BaseOuterTorso
|
||||
[Constructible]
|
||||
public HoodedShroudOfShadows(int hue = 0x455) : base(0x2684, hue)
|
||||
{
|
||||
[Constructible]
|
||||
public HoodedShroudOfShadows(int hue = 0x455) : base(0x2684, hue)
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
Weight = 3.0;
|
||||
}
|
||||
LootType = LootType.Blessed;
|
||||
Weight = 3.0;
|
||||
}
|
||||
|
||||
public HoodedShroudOfShadows(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override bool Dye(Mobile from, DyeTub sender)
|
||||
{
|
||||
from.SendLocalizedMessage(sender.FailMessage);
|
||||
return false;
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
public override bool Dye(Mobile from, DyeTub sender)
|
||||
{
|
||||
from.SendLocalizedMessage(sender.FailMessage);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,34 +1,17 @@
|
|||
namespace Server.Items
|
||||
using ModernUO.Serialization;
|
||||
|
||||
namespace Server.Items;
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class LuckyNecklace : BaseJewel
|
||||
{
|
||||
public class LuckyNecklace : BaseJewel
|
||||
[Constructible]
|
||||
public LuckyNecklace() : base(0x1088, Layer.Neck)
|
||||
{
|
||||
[Constructible]
|
||||
public LuckyNecklace()
|
||||
: base(0x1088, Layer.Neck)
|
||||
{
|
||||
Attributes.Luck = 200;
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
|
||||
public LuckyNecklace(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int Hue => 1150;
|
||||
public override int LabelNumber => 1075239; // Lucky Necklace 1075239
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
reader.ReadInt(); /* int version = reader.ReadInt(); Why? Just to have an unused var? */
|
||||
}
|
||||
Attributes.Luck = 200;
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
|
||||
public override int Hue => 1150;
|
||||
public override int LabelNumber => 1075239; // Lucky Necklace 1075239
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,86 +1,36 @@
|
|||
namespace Server.Items
|
||||
using ModernUO.Serialization;
|
||||
|
||||
namespace Server.Items;
|
||||
|
||||
[Flippable(0xC12, 0xC13)]
|
||||
[SerializationGenerator(0)]
|
||||
public partial class BrokenArmoireComponent : AddonComponent
|
||||
{
|
||||
[Flippable(0xC12, 0xC13)]
|
||||
public class BrokenArmoireComponent : AddonComponent
|
||||
public BrokenArmoireComponent() : base(0xC12)
|
||||
{
|
||||
public BrokenArmoireComponent() : base(0xC12)
|
||||
{
|
||||
}
|
||||
|
||||
public BrokenArmoireComponent(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1076262; // Broken Armoire
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class BrokenArmoireAddon : BaseAddon
|
||||
{
|
||||
[Constructible]
|
||||
public BrokenArmoireAddon()
|
||||
{
|
||||
AddComponent(new BrokenArmoireComponent(), 0, 0, 0);
|
||||
}
|
||||
|
||||
public BrokenArmoireAddon(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override BaseAddonDeed Deed => new BrokenArmoireDeed();
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class BrokenArmoireDeed : BaseAddonDeed
|
||||
{
|
||||
[Constructible]
|
||||
public BrokenArmoireDeed() => LootType = LootType.Blessed;
|
||||
|
||||
public BrokenArmoireDeed(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override BaseAddon Addon => new BrokenArmoireAddon();
|
||||
public override int LabelNumber => 1076262; // Broken Armoire
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
public override int LabelNumber => 1076262; // Broken Armoire
|
||||
}
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class BrokenArmoireAddon : BaseAddon
|
||||
{
|
||||
[Constructible]
|
||||
public BrokenArmoireAddon()
|
||||
{
|
||||
AddComponent(new BrokenArmoireComponent(), 0, 0, 0);
|
||||
}
|
||||
|
||||
public override BaseAddonDeed Deed => new BrokenArmoireDeed();
|
||||
}
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class BrokenArmoireDeed : BaseAddonDeed
|
||||
{
|
||||
[Constructible]
|
||||
public BrokenArmoireDeed() => LootType = LootType.Blessed;
|
||||
|
||||
public override BaseAddon Addon => new BrokenArmoireAddon();
|
||||
public override int LabelNumber => 1076262; // Broken Armoire
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,133 +1,100 @@
|
|||
using ModernUO.Serialization;
|
||||
using Server.Gumps;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
namespace Server.Items;
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class BrokenBedAddon : BaseAddon
|
||||
{
|
||||
public class BrokenBedAddon : BaseAddon
|
||||
[Constructible]
|
||||
public BrokenBedAddon(bool east)
|
||||
{
|
||||
[Constructible]
|
||||
public BrokenBedAddon(bool east)
|
||||
if (east) // east
|
||||
{
|
||||
if (east) // east
|
||||
{
|
||||
AddComponent(new LocalizedAddonComponent(0x1895, 1076263), 0, 0, 0);
|
||||
AddComponent(new LocalizedAddonComponent(0x1894, 1076263), 0, 1, 0);
|
||||
AddComponent(new LocalizedAddonComponent(0x1897, 1076263), 1, 0, 0);
|
||||
AddComponent(new LocalizedAddonComponent(0x1896, 1076263), 1, 1, 0);
|
||||
}
|
||||
else // south
|
||||
{
|
||||
AddComponent(new LocalizedAddonComponent(0x1899, 1076263), 0, 0, 0);
|
||||
AddComponent(new LocalizedAddonComponent(0x1898, 1076263), 1, 0, 0);
|
||||
AddComponent(new LocalizedAddonComponent(0x189B, 1076263), 0, 1, 0);
|
||||
AddComponent(new LocalizedAddonComponent(0x189A, 1076263), 1, 1, 0);
|
||||
}
|
||||
AddComponent(new LocalizedAddonComponent(0x1895, 1076263), 0, 0, 0);
|
||||
AddComponent(new LocalizedAddonComponent(0x1894, 1076263), 0, 1, 0);
|
||||
AddComponent(new LocalizedAddonComponent(0x1897, 1076263), 1, 0, 0);
|
||||
AddComponent(new LocalizedAddonComponent(0x1896, 1076263), 1, 1, 0);
|
||||
}
|
||||
|
||||
public BrokenBedAddon(Serial serial) : base(serial)
|
||||
else // south
|
||||
{
|
||||
}
|
||||
|
||||
public override BaseAddonDeed Deed => new BrokenBedDeed();
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadEncodedInt();
|
||||
AddComponent(new LocalizedAddonComponent(0x1899, 1076263), 0, 0, 0);
|
||||
AddComponent(new LocalizedAddonComponent(0x1898, 1076263), 1, 0, 0);
|
||||
AddComponent(new LocalizedAddonComponent(0x189B, 1076263), 0, 1, 0);
|
||||
AddComponent(new LocalizedAddonComponent(0x189A, 1076263), 1, 1, 0);
|
||||
}
|
||||
}
|
||||
|
||||
public class BrokenBedDeed : BaseAddonDeed
|
||||
public override BaseAddonDeed Deed => new BrokenBedDeed();
|
||||
}
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class BrokenBedDeed : BaseAddonDeed
|
||||
{
|
||||
private bool _east;
|
||||
|
||||
[Constructible]
|
||||
public BrokenBedDeed() => LootType = LootType.Blessed;
|
||||
|
||||
public override BaseAddon Addon => new BrokenBedAddon(_east);
|
||||
|
||||
public override int LabelNumber => 1076263; // Broken Bed
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
private bool m_East;
|
||||
|
||||
[Constructible]
|
||||
public BrokenBedDeed() => LootType = LootType.Blessed;
|
||||
|
||||
public BrokenBedDeed(Serial serial) : base(serial)
|
||||
if (IsChildOf(from.Backpack))
|
||||
{
|
||||
from.CloseGump<InternalGump>();
|
||||
from.SendGump(new InternalGump(this));
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(1062334); // This item must be in your backpack to be used.
|
||||
}
|
||||
}
|
||||
|
||||
private void SendTarget(Mobile m)
|
||||
{
|
||||
base.OnDoubleClick(m);
|
||||
}
|
||||
|
||||
private class InternalGump : Gump
|
||||
{
|
||||
private readonly BrokenBedDeed _deed;
|
||||
|
||||
public InternalGump(BrokenBedDeed deed) : base(60, 36)
|
||||
{
|
||||
_deed = deed;
|
||||
|
||||
AddPage(0);
|
||||
|
||||
AddBackground(0, 0, 273, 324, 0x13BE);
|
||||
AddImageTiled(10, 10, 253, 20, 0xA40);
|
||||
AddImageTiled(10, 40, 253, 244, 0xA40);
|
||||
AddImageTiled(10, 294, 253, 20, 0xA40);
|
||||
AddAlphaRegion(10, 10, 253, 304);
|
||||
AddButton(10, 294, 0xFB1, 0xFB2, 0);
|
||||
AddHtmlLocalized(45, 296, 450, 20, 1060051, 0x7FFF); // CANCEL
|
||||
AddHtmlLocalized(14, 12, 273, 20, 1076749, 0x7FFF); // Please select your broken bed position
|
||||
|
||||
AddPage(1);
|
||||
|
||||
AddButton(19, 49, 0x845, 0x846, 1);
|
||||
AddHtmlLocalized(44, 47, 213, 20, 1075386, 0x7FFF); // South
|
||||
AddButton(19, 73, 0x845, 0x846, 2);
|
||||
AddHtmlLocalized(44, 71, 213, 20, 1075387, 0x7FFF); // East
|
||||
}
|
||||
|
||||
public override BaseAddon Addon => new BrokenBedAddon(m_East);
|
||||
public override int LabelNumber => 1076263; // Broken Bed
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
public override void OnResponse(NetState sender, RelayInfo info)
|
||||
{
|
||||
if (IsChildOf(from.Backpack))
|
||||
if (_deed?.Deleted != false || info.ButtonID == 0)
|
||||
{
|
||||
from.CloseGump<InternalGump>();
|
||||
from.SendGump(new InternalGump(this));
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(1062334); // This item must be in your backpack to be used.
|
||||
}
|
||||
}
|
||||
|
||||
private void SendTarget(Mobile m)
|
||||
{
|
||||
base.OnDoubleClick(m);
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadEncodedInt();
|
||||
}
|
||||
|
||||
private class InternalGump : Gump
|
||||
{
|
||||
private readonly BrokenBedDeed m_Deed;
|
||||
|
||||
public InternalGump(BrokenBedDeed deed) : base(60, 36)
|
||||
{
|
||||
m_Deed = deed;
|
||||
|
||||
AddPage(0);
|
||||
|
||||
AddBackground(0, 0, 273, 324, 0x13BE);
|
||||
AddImageTiled(10, 10, 253, 20, 0xA40);
|
||||
AddImageTiled(10, 40, 253, 244, 0xA40);
|
||||
AddImageTiled(10, 294, 253, 20, 0xA40);
|
||||
AddAlphaRegion(10, 10, 253, 304);
|
||||
AddButton(10, 294, 0xFB1, 0xFB2, 0);
|
||||
AddHtmlLocalized(45, 296, 450, 20, 1060051, 0x7FFF); // CANCEL
|
||||
AddHtmlLocalized(14, 12, 273, 20, 1076749, 0x7FFF); // Please select your broken bed position
|
||||
|
||||
AddPage(1);
|
||||
|
||||
AddButton(19, 49, 0x845, 0x846, 1);
|
||||
AddHtmlLocalized(44, 47, 213, 20, 1075386, 0x7FFF); // South
|
||||
AddButton(19, 73, 0x845, 0x846, 2);
|
||||
AddHtmlLocalized(44, 71, 213, 20, 1075387, 0x7FFF); // East
|
||||
return;
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState sender, RelayInfo info)
|
||||
{
|
||||
if (m_Deed?.Deleted != false || info.ButtonID == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
m_Deed.m_East = info.ButtonID != 1;
|
||||
m_Deed.SendTarget(sender.Mobile);
|
||||
}
|
||||
_deed._east = info.ButtonID != 1;
|
||||
_deed.SendTarget(sender.Mobile);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,86 +1,36 @@
|
|||
namespace Server.Items
|
||||
using ModernUO.Serialization;
|
||||
|
||||
namespace Server.Items;
|
||||
|
||||
[Flippable(0xC14, 0xC15)]
|
||||
[SerializationGenerator(0)]
|
||||
public partial class BrokenBookcaseComponent : AddonComponent
|
||||
{
|
||||
[Flippable(0xC14, 0xC15)]
|
||||
public class BrokenBookcaseComponent : AddonComponent
|
||||
public BrokenBookcaseComponent() : base(0xC14)
|
||||
{
|
||||
public BrokenBookcaseComponent() : base(0xC14)
|
||||
{
|
||||
}
|
||||
|
||||
public BrokenBookcaseComponent(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1076258; // Broken Bookcase
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class BrokenBookcaseAddon : BaseAddon
|
||||
{
|
||||
[Constructible]
|
||||
public BrokenBookcaseAddon()
|
||||
{
|
||||
AddComponent(new BrokenBookcaseComponent(), 0, 0, 0);
|
||||
}
|
||||
|
||||
public BrokenBookcaseAddon(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override BaseAddonDeed Deed => new BrokenBookcaseDeed();
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class BrokenBookcaseDeed : BaseAddonDeed
|
||||
{
|
||||
[Constructible]
|
||||
public BrokenBookcaseDeed() => LootType = LootType.Blessed;
|
||||
|
||||
public BrokenBookcaseDeed(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override BaseAddon Addon => new BrokenBookcaseAddon();
|
||||
public override int LabelNumber => 1076258; // Broken Bookcase
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
public override int LabelNumber => 1076258; // Broken Bookcase
|
||||
}
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class BrokenBookcaseAddon : BaseAddon
|
||||
{
|
||||
[Constructible]
|
||||
public BrokenBookcaseAddon()
|
||||
{
|
||||
AddComponent(new BrokenBookcaseComponent(), 0, 0, 0);
|
||||
}
|
||||
|
||||
public override BaseAddonDeed Deed => new BrokenBookcaseDeed();
|
||||
}
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class BrokenBookcaseDeed : BaseAddonDeed
|
||||
{
|
||||
[Constructible]
|
||||
public BrokenBookcaseDeed() => LootType = LootType.Blessed;
|
||||
|
||||
public override BaseAddon Addon => new BrokenBookcaseAddon();
|
||||
public override int LabelNumber => 1076258; // Broken Bookcase
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,86 +1,36 @@
|
|||
namespace Server.Items
|
||||
using ModernUO.Serialization;
|
||||
|
||||
namespace Server.Items;
|
||||
|
||||
[Flippable(0xC24, 0xC25)]
|
||||
[SerializationGenerator(0)]
|
||||
public partial class BrokenChestOfDrawersComponent : AddonComponent
|
||||
{
|
||||
[Flippable(0xC24, 0xC25)]
|
||||
public class BrokenChestOfDrawersComponent : AddonComponent
|
||||
public BrokenChestOfDrawersComponent() : base(0xC24)
|
||||
{
|
||||
public BrokenChestOfDrawersComponent() : base(0xC24)
|
||||
{
|
||||
}
|
||||
|
||||
public BrokenChestOfDrawersComponent(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1076261; // Broken Chest of Drawers
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class BrokenChestOfDrawersAddon : BaseAddon
|
||||
{
|
||||
[Constructible]
|
||||
public BrokenChestOfDrawersAddon()
|
||||
{
|
||||
AddComponent(new BrokenChestOfDrawersComponent(), 0, 0, 0);
|
||||
}
|
||||
|
||||
public BrokenChestOfDrawersAddon(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override BaseAddonDeed Deed => new BrokenChestOfDrawersDeed();
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class BrokenChestOfDrawersDeed : BaseAddonDeed
|
||||
{
|
||||
[Constructible]
|
||||
public BrokenChestOfDrawersDeed() => LootType = LootType.Blessed;
|
||||
|
||||
public BrokenChestOfDrawersDeed(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override BaseAddon Addon => new BrokenChestOfDrawersAddon();
|
||||
public override int LabelNumber => 1076261; // Broken Chest of Drawers
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
public override int LabelNumber => 1076261; // Broken Chest of Drawers
|
||||
}
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class BrokenChestOfDrawersAddon : BaseAddon
|
||||
{
|
||||
[Constructible]
|
||||
public BrokenChestOfDrawersAddon()
|
||||
{
|
||||
AddComponent(new BrokenChestOfDrawersComponent(), 0, 0, 0);
|
||||
}
|
||||
|
||||
public override BaseAddonDeed Deed => new BrokenChestOfDrawersDeed();
|
||||
}
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class BrokenChestOfDrawersDeed : BaseAddonDeed
|
||||
{
|
||||
[Constructible]
|
||||
public BrokenChestOfDrawersDeed() => LootType = LootType.Blessed;
|
||||
|
||||
public override BaseAddon Addon => new BrokenChestOfDrawersAddon();
|
||||
public override int LabelNumber => 1076261; // Broken Chest of Drawers
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,86 +1,36 @@
|
|||
namespace Server.Items
|
||||
using ModernUO.Serialization;
|
||||
|
||||
namespace Server.Items;
|
||||
|
||||
[Flippable(0xC17, 0xC18)]
|
||||
[SerializationGenerator(0)]
|
||||
public partial class BrokenCoveredChairComponent : AddonComponent
|
||||
{
|
||||
[Flippable(0xC17, 0xC18)]
|
||||
public class BrokenCoveredChairComponent : AddonComponent
|
||||
public BrokenCoveredChairComponent() : base(0xC17)
|
||||
{
|
||||
public BrokenCoveredChairComponent() : base(0xC17)
|
||||
{
|
||||
}
|
||||
|
||||
public BrokenCoveredChairComponent(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1076257; // Broken Covered Chair
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class BrokenCoveredChairAddon : BaseAddon
|
||||
{
|
||||
[Constructible]
|
||||
public BrokenCoveredChairAddon()
|
||||
{
|
||||
AddComponent(new BrokenCoveredChairComponent(), 0, 0, 0);
|
||||
}
|
||||
|
||||
public BrokenCoveredChairAddon(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override BaseAddonDeed Deed => new BrokenCoveredChairDeed();
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class BrokenCoveredChairDeed : BaseAddonDeed
|
||||
{
|
||||
[Constructible]
|
||||
public BrokenCoveredChairDeed() => LootType = LootType.Blessed;
|
||||
|
||||
public BrokenCoveredChairDeed(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override BaseAddon Addon => new BrokenCoveredChairAddon();
|
||||
public override int LabelNumber => 1076257; // Broken Covered Chair
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
public override int LabelNumber => 1076257; // Broken Covered Chair
|
||||
}
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class BrokenCoveredChairAddon : BaseAddon
|
||||
{
|
||||
[Constructible]
|
||||
public BrokenCoveredChairAddon()
|
||||
{
|
||||
AddComponent(new BrokenCoveredChairComponent(), 0, 0, 0);
|
||||
}
|
||||
|
||||
public override BaseAddonDeed Deed => new BrokenCoveredChairDeed();
|
||||
}
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class BrokenCoveredChairDeed : BaseAddonDeed
|
||||
{
|
||||
[Constructible]
|
||||
public BrokenCoveredChairDeed() => LootType = LootType.Blessed;
|
||||
|
||||
public override BaseAddon Addon => new BrokenCoveredChairAddon();
|
||||
public override int LabelNumber => 1076257; // Broken Covered Chair
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,91 +1,35 @@
|
|||
namespace Server.Items
|
||||
using ModernUO.Serialization;
|
||||
|
||||
namespace Server.Items;
|
||||
|
||||
[Flippable(0xC19, 0xC1A)]
|
||||
[SerializationGenerator(0)]
|
||||
public partial class BrokenFallenChairComponent : AddonComponent
|
||||
{
|
||||
[Flippable(0xC19, 0xC1A)]
|
||||
public class BrokenFallenChairComponent : AddonComponent
|
||||
public BrokenFallenChairComponent() : base(0xC19)
|
||||
{
|
||||
public BrokenFallenChairComponent() : base(0xC19)
|
||||
{
|
||||
}
|
||||
|
||||
public BrokenFallenChairComponent(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1076264; // Broken Fallen Chair
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(1); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadEncodedInt();
|
||||
|
||||
if (version < 1 && ItemID == 0xC17)
|
||||
{
|
||||
ItemID = 0xC19;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class BrokenFallenChairAddon : BaseAddon
|
||||
{
|
||||
[Constructible]
|
||||
public BrokenFallenChairAddon()
|
||||
{
|
||||
AddComponent(new BrokenFallenChairComponent(), 0, 0, 0);
|
||||
}
|
||||
|
||||
public BrokenFallenChairAddon(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override BaseAddonDeed Deed => new BrokenFallenChairDeed();
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class BrokenFallenChairDeed : BaseAddonDeed
|
||||
{
|
||||
[Constructible]
|
||||
public BrokenFallenChairDeed() => LootType = LootType.Blessed;
|
||||
|
||||
public BrokenFallenChairDeed(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override BaseAddon Addon => new BrokenFallenChairAddon();
|
||||
public override int LabelNumber => 1076264; // Broken Fallen Chair
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
public override int LabelNumber => 1076264; // Broken Fallen Chair
|
||||
}
|
||||
|
||||
public class BrokenFallenChairAddon : BaseAddon
|
||||
{
|
||||
[Constructible]
|
||||
public BrokenFallenChairAddon()
|
||||
{
|
||||
AddComponent(new BrokenFallenChairComponent(), 0, 0, 0);
|
||||
}
|
||||
|
||||
public override BaseAddonDeed Deed => new BrokenFallenChairDeed();
|
||||
}
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class BrokenFallenChairDeed : BaseAddonDeed
|
||||
{
|
||||
[Constructible]
|
||||
public BrokenFallenChairDeed() => LootType = LootType.Blessed;
|
||||
|
||||
public override BaseAddon Addon => new BrokenFallenChairAddon();
|
||||
public override int LabelNumber => 1076264; // Broken Fallen Chair
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,129 +1,95 @@
|
|||
using ModernUO.Serialization;
|
||||
using Server.Gumps;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
namespace Server.Items;
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class BrokenVanityAddon : BaseAddon
|
||||
{
|
||||
public class BrokenVanityAddon : BaseAddon
|
||||
[Constructible]
|
||||
public BrokenVanityAddon(bool east)
|
||||
{
|
||||
[Constructible]
|
||||
public BrokenVanityAddon(bool east)
|
||||
if (east) // east
|
||||
{
|
||||
if (east) // east
|
||||
{
|
||||
AddComponent(new LocalizedAddonComponent(0xC20, 1076260), 0, 0, 0);
|
||||
AddComponent(new LocalizedAddonComponent(0xC21, 1076260), 0, -1, 0);
|
||||
}
|
||||
else // south
|
||||
{
|
||||
AddComponent(new LocalizedAddonComponent(0xC22, 1076260), 0, 0, 0);
|
||||
AddComponent(new LocalizedAddonComponent(0xC23, 1076260), -1, 0, 0);
|
||||
}
|
||||
AddComponent(new LocalizedAddonComponent(0xC20, 1076260), 0, 0, 0);
|
||||
AddComponent(new LocalizedAddonComponent(0xC21, 1076260), 0, -1, 0);
|
||||
}
|
||||
|
||||
public BrokenVanityAddon(Serial serial) : base(serial)
|
||||
else // south
|
||||
{
|
||||
}
|
||||
|
||||
public override BaseAddonDeed Deed => new BrokenVanityDeed();
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadEncodedInt();
|
||||
AddComponent(new LocalizedAddonComponent(0xC22, 1076260), 0, 0, 0);
|
||||
AddComponent(new LocalizedAddonComponent(0xC23, 1076260), -1, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
public class BrokenVanityDeed : BaseAddonDeed
|
||||
public override BaseAddonDeed Deed => new BrokenVanityDeed();
|
||||
}
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class BrokenVanityDeed : BaseAddonDeed
|
||||
{
|
||||
private bool _east;
|
||||
|
||||
[Constructible]
|
||||
public BrokenVanityDeed() => LootType = LootType.Blessed;
|
||||
|
||||
public override BaseAddon Addon => new BrokenVanityAddon(_east);
|
||||
public override int LabelNumber => 1076260; // Broken Vanity
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
private bool m_East;
|
||||
|
||||
[Constructible]
|
||||
public BrokenVanityDeed() => LootType = LootType.Blessed;
|
||||
|
||||
public BrokenVanityDeed(Serial serial) : base(serial)
|
||||
if (IsChildOf(from.Backpack))
|
||||
{
|
||||
from.CloseGump<InternalGump>();
|
||||
from.SendGump(new InternalGump(this));
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(1062334); // This item must be in your backpack to be used.
|
||||
}
|
||||
}
|
||||
|
||||
private void SendTarget(Mobile m)
|
||||
{
|
||||
base.OnDoubleClick(m);
|
||||
}
|
||||
|
||||
private class InternalGump : Gump
|
||||
{
|
||||
private readonly BrokenVanityDeed _deed;
|
||||
|
||||
public InternalGump(BrokenVanityDeed deed) : base(60, 63)
|
||||
{
|
||||
_deed = deed;
|
||||
|
||||
AddPage(0);
|
||||
|
||||
AddBackground(0, 0, 273, 324, 0x13BE);
|
||||
AddImageTiled(10, 10, 253, 20, 0xA40);
|
||||
AddImageTiled(10, 40, 253, 244, 0xA40);
|
||||
AddImageTiled(10, 294, 253, 20, 0xA40);
|
||||
AddAlphaRegion(10, 10, 253, 304);
|
||||
AddButton(10, 294, 0xFB1, 0xFB2, 0);
|
||||
AddHtmlLocalized(45, 296, 450, 20, 1060051, 0x7FFF); // CANCEL
|
||||
AddHtmlLocalized(14, 12, 273, 20, 1076747, 0x7FFF); // Please select your broken vanity position
|
||||
|
||||
AddPage(1);
|
||||
|
||||
AddButton(19, 49, 0x845, 0x846, 1);
|
||||
AddHtmlLocalized(44, 47, 213, 20, 1075386, 0x7FFF); // South
|
||||
AddButton(19, 73, 0x845, 0x846, 2);
|
||||
AddHtmlLocalized(44, 71, 213, 20, 1075387, 0x7FFF); // East
|
||||
}
|
||||
|
||||
public override BaseAddon Addon => new BrokenVanityAddon(m_East);
|
||||
public override int LabelNumber => 1076260; // Broken Vanity
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
public override void OnResponse(NetState sender, RelayInfo info)
|
||||
{
|
||||
if (IsChildOf(from.Backpack))
|
||||
if (_deed?.Deleted != false || info.ButtonID == 0)
|
||||
{
|
||||
from.CloseGump<InternalGump>();
|
||||
from.SendGump(new InternalGump(this));
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(1062334); // This item must be in your backpack to be used.
|
||||
}
|
||||
}
|
||||
|
||||
private void SendTarget(Mobile m)
|
||||
{
|
||||
base.OnDoubleClick(m);
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadEncodedInt();
|
||||
}
|
||||
|
||||
private class InternalGump : Gump
|
||||
{
|
||||
private readonly BrokenVanityDeed m_Deed;
|
||||
|
||||
public InternalGump(BrokenVanityDeed deed) : base(60, 63)
|
||||
{
|
||||
m_Deed = deed;
|
||||
|
||||
AddPage(0);
|
||||
|
||||
AddBackground(0, 0, 273, 324, 0x13BE);
|
||||
AddImageTiled(10, 10, 253, 20, 0xA40);
|
||||
AddImageTiled(10, 40, 253, 244, 0xA40);
|
||||
AddImageTiled(10, 294, 253, 20, 0xA40);
|
||||
AddAlphaRegion(10, 10, 253, 304);
|
||||
AddButton(10, 294, 0xFB1, 0xFB2, 0);
|
||||
AddHtmlLocalized(45, 296, 450, 20, 1060051, 0x7FFF); // CANCEL
|
||||
AddHtmlLocalized(14, 12, 273, 20, 1076747, 0x7FFF); // Please select your broken vanity position
|
||||
|
||||
AddPage(1);
|
||||
|
||||
AddButton(19, 49, 0x845, 0x846, 1);
|
||||
AddHtmlLocalized(44, 47, 213, 20, 1075386, 0x7FFF); // South
|
||||
AddButton(19, 73, 0x845, 0x846, 2);
|
||||
AddHtmlLocalized(44, 71, 213, 20, 1075387, 0x7FFF); // East
|
||||
return;
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState sender, RelayInfo info)
|
||||
{
|
||||
if (m_Deed?.Deleted != false || info.ButtonID == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
m_Deed.m_East = info.ButtonID != 1;
|
||||
m_Deed.SendTarget(sender.Mobile);
|
||||
}
|
||||
_deed._east = info.ButtonID != 1;
|
||||
_deed.SendTarget(sender.Mobile);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,86 +1,36 @@
|
|||
namespace Server.Items
|
||||
using ModernUO.Serialization;
|
||||
|
||||
namespace Server.Items;
|
||||
|
||||
[Flippable(0xC1B, 0xC1C, 0xC1E, 0xC1D)]
|
||||
[SerializationGenerator(0)]
|
||||
public partial class StandingBrokenChairComponent : AddonComponent
|
||||
{
|
||||
[Flippable(0xC1B, 0xC1C, 0xC1E, 0xC1D)]
|
||||
public class StandingBrokenChairComponent : AddonComponent
|
||||
public StandingBrokenChairComponent() : base(0xC1B)
|
||||
{
|
||||
public StandingBrokenChairComponent() : base(0xC1B)
|
||||
{
|
||||
}
|
||||
|
||||
public StandingBrokenChairComponent(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1076259; // Standing Broken Chair
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class StandingBrokenChairAddon : BaseAddon
|
||||
{
|
||||
[Constructible]
|
||||
public StandingBrokenChairAddon()
|
||||
{
|
||||
AddComponent(new StandingBrokenChairComponent(), 0, 0, 0);
|
||||
}
|
||||
|
||||
public StandingBrokenChairAddon(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override BaseAddonDeed Deed => new StandingBrokenChairDeed();
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class StandingBrokenChairDeed : BaseAddonDeed
|
||||
{
|
||||
[Constructible]
|
||||
public StandingBrokenChairDeed() => LootType = LootType.Blessed;
|
||||
|
||||
public StandingBrokenChairDeed(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override BaseAddon Addon => new StandingBrokenChairAddon();
|
||||
public override int LabelNumber => 1076259; // Standing Broken Chair
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
public override int LabelNumber => 1076259; // Standing Broken Chair
|
||||
}
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class StandingBrokenChairAddon : BaseAddon
|
||||
{
|
||||
[Constructible]
|
||||
public StandingBrokenChairAddon()
|
||||
{
|
||||
AddComponent(new StandingBrokenChairComponent(), 0, 0, 0);
|
||||
}
|
||||
|
||||
public override BaseAddonDeed Deed => new StandingBrokenChairDeed();
|
||||
}
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class StandingBrokenChairDeed : BaseAddonDeed
|
||||
{
|
||||
[Constructible]
|
||||
public StandingBrokenChairDeed() => LootType = LootType.Blessed;
|
||||
|
||||
public override BaseAddon Addon => new StandingBrokenChairAddon();
|
||||
public override int LabelNumber => 1076259; // Standing Broken Chair
|
||||
}
|
||||
|
|
|
|||
4
Projects/UOContent/Migrations/Server.Items.BaseFormTalisman.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.BaseFormTalisman.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.BaseFormTalisman"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.BrokenArmoireAddon.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.BrokenArmoireAddon.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.BrokenArmoireAddon"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.BrokenArmoireComponent.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.BrokenArmoireComponent.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.BrokenArmoireComponent"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.BrokenArmoireDeed.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.BrokenArmoireDeed.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.BrokenArmoireDeed"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.BrokenBedAddon.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.BrokenBedAddon.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.BrokenBedAddon"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.BrokenBedDeed.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.BrokenBedDeed.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.BrokenBedDeed"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.BrokenBookcaseAddon.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.BrokenBookcaseAddon.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.BrokenBookcaseAddon"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.BrokenBookcaseComponent.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.BrokenBookcaseComponent.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.BrokenBookcaseComponent"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.BrokenBookcaseDeed.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.BrokenBookcaseDeed.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.BrokenBookcaseDeed"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.BrokenChestOfDrawersAddon.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.BrokenChestOfDrawersAddon.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.BrokenChestOfDrawersAddon"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.BrokenChestOfDrawersComponent.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.BrokenChestOfDrawersComponent.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.BrokenChestOfDrawersComponent"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.BrokenChestOfDrawersDeed.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.BrokenChestOfDrawersDeed.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.BrokenChestOfDrawersDeed"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.BrokenCoveredChairAddon.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.BrokenCoveredChairAddon.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.BrokenCoveredChairAddon"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.BrokenCoveredChairComponent.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.BrokenCoveredChairComponent.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.BrokenCoveredChairComponent"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.BrokenCoveredChairDeed.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.BrokenCoveredChairDeed.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.BrokenCoveredChairDeed"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.BrokenFallenChairComponent.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.BrokenFallenChairComponent.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.BrokenFallenChairComponent"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.BrokenFallenChairDeed.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.BrokenFallenChairDeed.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.BrokenFallenChairDeed"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.BrokenVanityAddon.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.BrokenVanityAddon.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.BrokenVanityAddon"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.BrokenVanityDeed.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.BrokenVanityDeed.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.BrokenVanityDeed"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.CuSidheFormTalisman.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.CuSidheFormTalisman.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.CuSidheFormTalisman"
|
||||
}
|
||||
28
Projects/UOContent/Migrations/Server.Items.DawnsMusicBox.v1.json
generated
Normal file
28
Projects/UOContent/Migrations/Server.Items.DawnsMusicBox.v1.json
generated
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
"version": 1,
|
||||
"type": "Server.Items.DawnsMusicBox",
|
||||
"properties": [
|
||||
{
|
||||
"name": "Tracks",
|
||||
"type": "System.Collections.Generic.List\u003CServer.MusicName\u003E",
|
||||
"rule": "ListMigrationRule",
|
||||
"ruleArguments": [
|
||||
"Server.MusicName",
|
||||
"EnumMigrationRule"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Level",
|
||||
"type": "Server.Multis.SecureLevel",
|
||||
"rule": "EnumMigrationRule"
|
||||
},
|
||||
{
|
||||
"name": "ItemID",
|
||||
"type": "int",
|
||||
"rule": "PrimitiveTypeMigrationRule",
|
||||
"ruleArguments": [
|
||||
""
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
11
Projects/UOContent/Migrations/Server.Items.DawnsMusicGear.v2.json
generated
Normal file
11
Projects/UOContent/Migrations/Server.Items.DawnsMusicGear.v2.json
generated
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"version": 2,
|
||||
"type": "Server.Items.DawnsMusicGear",
|
||||
"properties": [
|
||||
{
|
||||
"name": "Music",
|
||||
"type": "Server.MusicName",
|
||||
"rule": "EnumMigrationRule"
|
||||
}
|
||||
]
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.DupresShield.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.DupresShield.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.DupresShield"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.EarringBoxSet.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.EarringBoxSet.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.EarringBoxSet"
|
||||
}
|
||||
11
Projects/UOContent/Migrations/Server.Items.EarringsOfProtection.v0.json
generated
Normal file
11
Projects/UOContent/Migrations/Server.Items.EarringsOfProtection.v0.json
generated
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.EarringsOfProtection",
|
||||
"properties": [
|
||||
{
|
||||
"name": "Attribute",
|
||||
"type": "Server.AosElementAttribute",
|
||||
"rule": "EnumMigrationRule"
|
||||
}
|
||||
]
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.EnhancedBandage.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.EnhancedBandage.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.EnhancedBandage"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.FerretFormTalisman.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.FerretFormTalisman.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.FerretFormTalisman"
|
||||
}
|
||||
22
Projects/UOContent/Migrations/Server.Items.FountainOfLife.v1.json
generated
Normal file
22
Projects/UOContent/Migrations/Server.Items.FountainOfLife.v1.json
generated
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"version": 1,
|
||||
"type": "Server.Items.FountainOfLife",
|
||||
"properties": [
|
||||
{
|
||||
"name": "Charges",
|
||||
"type": "int",
|
||||
"rule": "PrimitiveTypeMigrationRule",
|
||||
"ruleArguments": [
|
||||
""
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Timer",
|
||||
"type": "Server.Timer",
|
||||
"rule": "TimerMigrationRule",
|
||||
"ruleArguments": [
|
||||
""
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
14
Projects/UOContent/Migrations/Server.Items.FountainOfLifeDeed.v0.json
generated
Normal file
14
Projects/UOContent/Migrations/Server.Items.FountainOfLifeDeed.v0.json
generated
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.FountainOfLifeDeed",
|
||||
"properties": [
|
||||
{
|
||||
"name": "Charges",
|
||||
"type": "int",
|
||||
"rule": "PrimitiveTypeMigrationRule",
|
||||
"ruleArguments": [
|
||||
""
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.HoodedShroudOfShadows.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.HoodedShroudOfShadows.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.HoodedShroudOfShadows"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.LuckyNecklace.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.LuckyNecklace.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.LuckyNecklace"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.OssianGrimoire.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.OssianGrimoire.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.OssianGrimoire"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.QuiverOfInfinity.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.QuiverOfInfinity.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.QuiverOfInfinity"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.ReptalonFormTalisman.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.ReptalonFormTalisman.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.ReptalonFormTalisman"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.SquirrelFormTalisman.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.SquirrelFormTalisman.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.SquirrelFormTalisman"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.StandingBrokenChairAddon.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.StandingBrokenChairAddon.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.StandingBrokenChairAddon"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.StandingBrokenChairComponent.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.StandingBrokenChairComponent.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.StandingBrokenChairComponent"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.StandingBrokenChairDeed.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.StandingBrokenChairDeed.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.StandingBrokenChairDeed"
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue