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,69 +1,69 @@
|
|||
using Server.Engines.Harvest;
|
||||
using System.Collections.Generic;
|
||||
using Server.ContextMenus;
|
||||
using Server.Engines.Harvest;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class FishingPole : Item
|
||||
{
|
||||
[Constructible]
|
||||
public FishingPole() : base( 0x0DC0 )
|
||||
{
|
||||
Layer = Layer.TwoHanded;
|
||||
Weight = 8.0;
|
||||
}
|
||||
public class FishingPole : Item
|
||||
{
|
||||
[Constructible]
|
||||
public FishingPole() : base(0x0DC0)
|
||||
{
|
||||
Layer = Layer.TwoHanded;
|
||||
Weight = 8.0;
|
||||
}
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
Point3D loc = GetWorldLocation();
|
||||
public FishingPole(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
if ( !from.InLOS( loc ) || !from.InRange( loc, 2 ) )
|
||||
from.LocalOverheadMessage( MessageType.Regular, 0x3E9, 1019045 ); // I can't reach that
|
||||
else
|
||||
Fishing.System.BeginHarvesting( from, this );
|
||||
}
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
Point3D loc = GetWorldLocation();
|
||||
|
||||
public override void GetContextMenuEntries( Mobile from, List<ContextMenuEntry> list )
|
||||
{
|
||||
base.GetContextMenuEntries( from, list );
|
||||
if (!from.InLOS(loc) || !from.InRange(loc, 2))
|
||||
from.LocalOverheadMessage(MessageType.Regular, 0x3E9, 1019045); // I can't reach that
|
||||
else
|
||||
Fishing.System.BeginHarvesting(from, this);
|
||||
}
|
||||
|
||||
BaseHarvestTool.AddContextMenuEntries( from, this, list, Fishing.System );
|
||||
}
|
||||
public override void GetContextMenuEntries(Mobile from, List<ContextMenuEntry> list)
|
||||
{
|
||||
base.GetContextMenuEntries(from, list);
|
||||
|
||||
public override bool CheckConflictingLayer( Mobile m, Item item, Layer layer )
|
||||
{
|
||||
if ( base.CheckConflictingLayer( m, item, layer ) )
|
||||
return true;
|
||||
BaseHarvestTool.AddContextMenuEntries(from, this, list, Fishing.System);
|
||||
}
|
||||
|
||||
if ( layer == Layer.OneHanded )
|
||||
{
|
||||
m.SendLocalizedMessage( 500214 ); // You already have something in both hands.
|
||||
return true;
|
||||
}
|
||||
public override bool CheckConflictingLayer(Mobile m, Item item, Layer layer)
|
||||
{
|
||||
if (base.CheckConflictingLayer(m, item, layer))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
if (layer == Layer.OneHanded)
|
||||
{
|
||||
m.SendLocalizedMessage(500214); // You already have something in both hands.
|
||||
return true;
|
||||
}
|
||||
|
||||
public FishingPole( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write( (int) 1 ); // version
|
||||
}
|
||||
writer.Write(1); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
int version = reader.ReadInt();
|
||||
|
||||
if ( version < 1 && Layer == Layer.OneHanded )
|
||||
Layer = Layer.TwoHanded;
|
||||
}
|
||||
}
|
||||
if (version < 1 && Layer == Layer.OneHanded)
|
||||
Layer = Layer.TwoHanded;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue