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,63 @@
using System;
namespace Server.Items
{
public class BookOfBushido : Spellbook
{
[Constructable]
public BookOfBushido()
: this((ulong)0x3F)
{
}
[Constructable]
public BookOfBushido(ulong content)
: base(content, 0x238C)
{
this.Layer = (Core.ML ? Layer.OneHanded : Layer.Invalid);
}
public BookOfBushido(Serial serial)
: base(serial)
{
}
public override SpellbookType SpellbookType
{
get
{
return SpellbookType.Samurai;
}
}
public override int BookOffset
{
get
{
return 400;
}
}
public override int BookCount
{
get
{
return 6;
}
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)1); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
if (version == 0 && Core.ML)
this.Layer = Layer.OneHanded;
}
}
}

View File

@@ -0,0 +1,63 @@
using System;
namespace Server.Items
{
public class BookOfChivalry : Spellbook
{
[Constructable]
public BookOfChivalry()
: this((ulong)0x3FF)
{
}
[Constructable]
public BookOfChivalry(ulong content)
: base(content, 0x2252)
{
this.Layer = (Core.ML ? Layer.OneHanded : Layer.Invalid);
}
public BookOfChivalry(Serial serial)
: base(serial)
{
}
public override SpellbookType SpellbookType
{
get
{
return SpellbookType.Paladin;
}
}
public override int BookOffset
{
get
{
return 200;
}
}
public override int BookCount
{
get
{
return 10;
}
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)1); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
if (version == 0 && Core.ML)
this.Layer = Layer.OneHanded;
}
}
}

View File

@@ -0,0 +1,138 @@
using System;
using System.Collections.Generic;
using Server.Network;
using Server.Spells;
using Server.ContextMenus;
using Server.Mobiles;
using Server.Spells.SkillMasteries;
using Server.Gumps;
using Server.Spells.Spellweaving;
namespace Server.Items
{
[Flipable(0x225A, 0x225B)]
public class BookOfMasteries : Spellbook
{
public override SpellbookType SpellbookType{ get{ return SpellbookType.SkillMasteries; } }
public override int BookOffset{ get{ return 700; } }
public override int BookCount{ get{ return 45; } }
private ulong _Content;
[CommandProperty(AccessLevel.GameMaster)]
public new ulong Content
{
get
{
return _Content;
}
set
{
if (_Content != value)
{
_Content = value;
InvalidateProperties();
}
}
}
[Constructable]
public BookOfMasteries() : this( 0x1FFFFFFFFFFF )
{
}
[Constructable]
public BookOfMasteries( ulong content ) : base( content, 0x225A )
{
Layer = Layer.OneHanded;
_Content = content;
}
public override void GetContextMenuEntries(Mobile from, List<ContextMenuEntry> list)
{
base.GetContextMenuEntries(from, list);
var menu = new SimpleContextMenuEntry(from, 1151948, m =>
{
if (m is PlayerMobile && IsChildOf(m.Backpack) && CheckCooldown(m))
BaseGump.SendGump(new MasterySelectionGump(m as PlayerMobile, this));
});
if (!IsChildOf(from.Backpack) || !CheckCooldown(from))
menu.Enabled = false;
list.Add(menu);
}
private static Dictionary<Mobile, DateTime> m_Cooldown = new Dictionary<Mobile, DateTime>();
public static void AddToCooldown(Mobile from)
{
if(m_Cooldown == null)
m_Cooldown = new Dictionary<Mobile, DateTime>();
m_Cooldown[from] = DateTime.UtcNow + TimeSpan.FromMinutes(10);
}
public static bool CheckCooldown(Mobile from)
{
if (from.AccessLevel > AccessLevel.Player)
return true;
if (m_Cooldown != null && m_Cooldown.ContainsKey(from))
{
if (m_Cooldown[from] < DateTime.UtcNow)
{
m_Cooldown.Remove(from);
return true;
}
return false;
}
return true;
}
public override void AddProperty(ObjectPropertyList list)
{
base.AddProperty(list);
if(RootParent is Mobile)
{
SkillName sk = ((Mobile)RootParent).Skills.CurrentMastery;
if (sk > 0)
{
list.Add(MasteryInfo.GetLocalization(sk));
if (sk == SkillName.Spellweaving)
{
list.Add(1060485, ArcanistSpell.GetMasteryFocusLevel((Mobile)RootParent).ToString()); // strength bonus ~1_val~
}
}
}
}
public BookOfMasteries(Serial serial)
: base(serial)
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.WriteEncodedInt( 1 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadEncodedInt();
}
}
}

View File

@@ -0,0 +1,58 @@
using System;
namespace Server.Items
{
public class BookOfNinjitsu : Spellbook
{
[Constructable]
public BookOfNinjitsu()
: this((ulong)0xFF)
{
}
[Constructable]
public BookOfNinjitsu(ulong content)
: base(content, 0x23A0)
{
Layer = (Core.ML ? Layer.OneHanded : Layer.Invalid);
}
public BookOfNinjitsu(Serial serial)
: base(serial)
{
}
public override SpellbookType SpellbookType
{
get
{
return SpellbookType.Ninja;
}
}
public override int BookOffset
{
get
{
return 500;
}
}
public override int BookCount
{
get
{
return 8;
}
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)1); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,58 @@
using System;
namespace Server.Items
{
public class MysticBook : Spellbook
{
[Constructable]
public MysticBook()
: this((ulong)0)
{
}
[Constructable]
public MysticBook(ulong content)
: base(content, 0x2D9D)
{
this.Layer = Layer.OneHanded;
}
public MysticBook(Serial serial)
: base(serial)
{
}
public override SpellbookType SpellbookType
{
get
{
return SpellbookType.Mystic;
}
}
public override int BookOffset
{
get
{
return 677;
}
}
public override int BookCount
{
get
{
return 16;
}
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.WriteEncodedInt(0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadEncodedInt();
}
}
}

View File

@@ -0,0 +1,91 @@
using System;
namespace Server.Items
{
public class NecromancerSpellbook : Spellbook
{
[Constructable]
public NecromancerSpellbook()
: this((ulong)0)
{
}
[Constructable]
public NecromancerSpellbook(ulong content)
: base(content, 0x2253)
{
this.Layer = (Core.ML ? Layer.OneHanded : Layer.Invalid);
}
public NecromancerSpellbook(Serial serial)
: base(serial)
{
}
public override SpellbookType SpellbookType
{
get
{
return SpellbookType.Necromancer;
}
}
public override int BookOffset
{
get
{
return 100;
}
}
public override int BookCount
{
get
{
return ((Core.SE) ? 17 : 16);
}
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)1); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
if (version == 0 && Core.ML)
this.Layer = Layer.OneHanded;
}
}
public class CompleteNecromancerSpellbook : NecromancerSpellbook
{
[Constructable]
public CompleteNecromancerSpellbook()
: base((ulong)0x1FFFF)
{
}
public CompleteNecromancerSpellbook(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.WriteEncodedInt(0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadEncodedInt();
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,62 @@
using System;
namespace Server.Items
{
public class SpellweavingBook : Spellbook
{
[Constructable]
public SpellweavingBook()
: this((ulong)0)
{
}
[Constructable]
public SpellweavingBook(ulong content)
: base(content, 0x2D50)
{
this.Hue = 0x8A2;
this.Layer = Layer.OneHanded;
}
public SpellweavingBook(Serial serial)
: base(serial)
{
}
public override SpellbookType SpellbookType
{
get
{
return SpellbookType.Arcanist;
}
}
public override int BookOffset
{
get
{
return 600;
}
}
public override int BookCount
{
get
{
return 16;
}
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.WriteEncodedInt(0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadEncodedInt();
}
}
}