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,91 @@
using System;
using System.Linq;
using Server.Engines.CannedEvil;
namespace Server.Items
{
public class ChampionSkull : Item
{
public static readonly ChampionSkullType[] Types = //
Enum.GetValues(typeof(ChampionSkullType))
.Cast<ChampionSkullType>()
.Where(o => o != ChampionSkullType.None)
.ToArray();
public static ChampionSkullType RandomType { get { return Types[Utility.Random(Types.Length)]; } }
private ChampionSkullType m_Type;
[Constructable]
public ChampionSkull()
: this(RandomType)
{ }
[Constructable]
public ChampionSkull(ChampionSkullType type)
: base(0x1AE1)
{
m_Type = type;
LootType = LootType.Cursed;
switch (type)
{
case ChampionSkullType.Power:
Hue = 0x159;
break;
case ChampionSkullType.Venom:
Hue = 0x172;
break;
case ChampionSkullType.Greed:
Hue = 0x1EE;
break;
case ChampionSkullType.Death:
Hue = 0x025;
break;
case ChampionSkullType.Pain:
Hue = 0x035;
break;
}
}
public ChampionSkull(Serial serial)
: base(serial)
{ }
[CommandProperty(AccessLevel.GameMaster)]
public ChampionSkullType Type
{
get { return m_Type; }
set
{
m_Type = value;
InvalidateProperties();
}
}
public override int LabelNumber
{
get { return 1049479 + (int)m_Type; }
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0); // version
writer.Write((int)m_Type);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
reader.ReadInt();
m_Type = (ChampionSkullType)reader.ReadInt();
}
}
}