Files
abysmal-isle/Scripts/Context Menus/TeachEntry.cs
Unstable Kitsune b918192e4e Overwrite
Complete Overwrite of the Folder with the free shard. ServUO 57.3 has been added.
2023-11-28 23:20:26 -05:00

30 lines
784 B
C#

using System;
using Server.Mobiles;
namespace Server.ContextMenus
{
public class TeachEntry : ContextMenuEntry
{
private readonly SkillName m_Skill;
private readonly BaseCreature m_Mobile;
private readonly Mobile m_From;
public TeachEntry(SkillName skill, BaseCreature m, Mobile from, bool enabled)
: base(6000 + (int)skill)
{
this.m_Skill = skill;
this.m_Mobile = m;
this.m_From = from;
if (!enabled)
this.Flags |= Network.CMEFlags.Disabled;
}
public override void OnClick()
{
if (!this.m_From.CheckAlive())
return;
this.m_Mobile.Teach(this.m_Skill, this.m_From, 0, false);
}
}
}