Formats UO Content (#201)

This commit is contained in:
Kamron Batman 2020-08-27 18:30:38 -07:00 • committed by GitHub
parent 86b7b3aed1
commit ad3775c4d7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3249 changed files with 431083 additions and 440981 deletions

View file

@ -4,54 +4,54 @@ using Server.Targeting;
namespace Server.Items
{
public static class ItemIdentification
{
public static void Initialize()
public static class ItemIdentification
{
SkillInfo.Table[(int)SkillName.ItemID].Callback = OnUse;
}
public static TimeSpan OnUse(Mobile from)
{
from.SendLocalizedMessage(500343); // What do you wish to appraise and identify?
from.Target = new InternalTarget();
return TimeSpan.FromSeconds(1.0);
}
[PlayerVendorTarget]
private class InternalTarget : Target
{
public InternalTarget() : base(8, false, TargetFlags.None) => AllowNonlocal = true;
protected override void OnTarget(Mobile from, object o)
{
if (o is Item item)
public static void Initialize()
{
if (from.CheckTargetSkill(SkillName.ItemID, item, 0, 100))
{
if (item is BaseWeapon weapon)
weapon.Identified = true;
else if (item is BaseArmor armor)
armor.Identified = true;
SkillInfo.Table[(int)SkillName.ItemID].Callback = OnUse;
}
if (!Core.AOS)
item.OnSingleClick(from);
}
else
{
from.SendLocalizedMessage(500353); // You are not certain...
}
}
else if (o is Mobile mobile)
public static TimeSpan OnUse(Mobile from)
{
mobile.OnSingleClick(from);
from.SendLocalizedMessage(500343); // What do you wish to appraise and identify?
from.Target = new InternalTarget();
return TimeSpan.FromSeconds(1.0);
}
else
[PlayerVendorTarget]
private class InternalTarget : Target
{
from.SendLocalizedMessage(500353); // You are not certain...
public InternalTarget() : base(8, false, TargetFlags.None) => AllowNonlocal = true;
protected override void OnTarget(Mobile from, object o)
{
if (o is Item item)
{
if (from.CheckTargetSkill(SkillName.ItemID, item, 0, 100))
{
if (item is BaseWeapon weapon)
weapon.Identified = true;
else if (item is BaseArmor armor)
armor.Identified = true;
if (!Core.AOS)
item.OnSingleClick(from);
}
else
{
from.SendLocalizedMessage(500353); // You are not certain...
}
}
else if (o is Mobile mobile)
{
mobile.OnSingleClick(from);
}
else
{
from.SendLocalizedMessage(500353); // You are not certain...
}
}
}
}
}
}
}