Fixes code according to modern code style. Fixes a few expression bugs.
This commit is contained in:
parent
89eea25e5f
commit
970fd563b2
3324 changed files with 441118 additions and 433755 deletions
|
|
@ -1,60 +1,60 @@
|
|||
using System;
|
||||
using Server.Targeting;
|
||||
using Server.Mobiles;
|
||||
using Server.Targeting;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class ItemIdentification
|
||||
{
|
||||
public static void Initialize()
|
||||
{
|
||||
SkillInfo.Table[(int)SkillName.ItemID].Callback = OnUse;
|
||||
}
|
||||
public class ItemIdentification
|
||||
{
|
||||
public static void Initialize()
|
||||
{
|
||||
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();
|
||||
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 );
|
||||
}
|
||||
return TimeSpan.FromSeconds(1.0);
|
||||
}
|
||||
|
||||
[PlayerVendorTarget]
|
||||
private class InternalTarget : Target
|
||||
{
|
||||
public InternalTarget() : base ( 8, false, TargetFlags.None )
|
||||
{
|
||||
AllowNonlocal = true;
|
||||
}
|
||||
[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 )
|
||||
{
|
||||
if ( from.CheckTargetSkill( SkillName.ItemID, o, 0, 100 ) )
|
||||
{
|
||||
if ( o is BaseWeapon )
|
||||
((BaseWeapon)o).Identified = true;
|
||||
else if ( o is BaseArmor )
|
||||
((BaseArmor)o).Identified = true;
|
||||
protected override void OnTarget(Mobile from, object o)
|
||||
{
|
||||
if (o is Item)
|
||||
{
|
||||
if (from.CheckTargetSkill(SkillName.ItemID, o, 0, 100))
|
||||
{
|
||||
if (o is BaseWeapon)
|
||||
((BaseWeapon)o).Identified = true;
|
||||
else if (o is BaseArmor)
|
||||
((BaseArmor)o).Identified = true;
|
||||
|
||||
if ( !Core.AOS )
|
||||
((Item)o).OnSingleClick( from );
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage( 500353 ); // You are not certain...
|
||||
}
|
||||
}
|
||||
else if ( o is Mobile )
|
||||
{
|
||||
((Mobile)o).OnSingleClick( from );
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage( 500353 ); // You are not certain...
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!Core.AOS)
|
||||
((Item)o).OnSingleClick(from);
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(500353); // You are not certain...
|
||||
}
|
||||
}
|
||||
else if (o is Mobile)
|
||||
{
|
||||
((Mobile)o).OnSingleClick(from);
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(500353); // You are not certain...
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue