Overwrite

Complete Overwrite of the Folder with the free shard. ServUO 57.3 has been added.
This commit is contained in:
Unstable Kitsune
2023-11-28 23:20:26 -05:00
parent 3cd54811de
commit b918192e4e
11608 changed files with 2644205 additions and 47 deletions

View File

@@ -0,0 +1,73 @@
using System;
namespace Server.Items
{
public class SlayerSocket : ItemSocket
{
public SlayerName Slayer { get; set; }
public SlayerSocket()
{
}
public SlayerSocket(SlayerName slayer, TimeSpan duration)
: base(duration)
{
Slayer = slayer;
}
public override void GetProperties(ObjectPropertyList list)
{
list.Add(1155617); // Silvered
}
public override void OnRemoved()
{
if (Owner != null && !Owner.Deleted && Owner.RootParent is Mobile)
{
((Mobile)Owner.RootParent).SendLocalizedMessage(1155618, String.IsNullOrEmpty(Owner.Name) ? String.Format("#{0}", Owner.LabelNumber) : Owner.Name); // Your ~1_name~'s Tincture of Silver has worn off.
}
}
public static SlayerName GetSlayer(Item item)
{
if (item == null)
{
return SlayerName.None;
}
var socket = item.GetSocket<SlayerSocket>();
if (socket != null)
{
return socket.Slayer;
}
return SlayerName.None;
}
public override void OnAfterDuped(ItemSocket oldSocket)
{
if (oldSocket is SlayerSocket)
{
Slayer = ((SlayerSocket)oldSocket).Slayer;
}
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
writer.Write((int)Slayer);
}
public override void Deserialize(Item owner, GenericReader reader)
{
base.Deserialize(owner, reader);
reader.ReadInt(); // version
Slayer = (SlayerName)reader.ReadInt();
}
}
}