Various Aquarium fixes - http://jira.runuo.com/browse/RUNUO-102
This commit is contained in:
parent
4e15a2aa4c
commit
4708ec4301
18 changed files with 889 additions and 800 deletions
|
|
@ -152,7 +152,7 @@ namespace Server.Items
|
|||
AddonComponent.ApplyLightTo( this );
|
||||
}
|
||||
|
||||
public void DropItemsToGround()
|
||||
public virtual void DropItemsToGround()
|
||||
{
|
||||
for ( int i = Items.Count - 1; i >= 0; i-- )
|
||||
Items[ i ].MoveToWorld( Location );
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -6,226 +6,181 @@ using Server.Targeting;
|
|||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class AquariumFishingNet : Item
|
||||
{
|
||||
public class AquariumFishNet : SpecialFishingNet
|
||||
{
|
||||
public override int LabelNumber{ get{ return 1074463; } } // An aquarium fishing net
|
||||
|
||||
private static int[] m_Hues = { 0x09B, 0x0CD, 0x0D3, 0x14D, 0x1DD, 0x1E9, 0x1F4, 0x373, 0x451, 0x47F, 0x489, 0x492, 0x4B5, 0x8AA };
|
||||
private static int[] m_WaterTiles = { 0x00A8, 0x00AB, 0x0136, 0x0137 };
|
||||
|
||||
private Mobile m_Player;
|
||||
|
||||
|
||||
[Constructable]
|
||||
public AquariumFishingNet() : base( 0xDC8 )
|
||||
public AquariumFishNet()
|
||||
{
|
||||
ItemID = 0xDC8;
|
||||
|
||||
if ( Hue == 0x8A0 )
|
||||
Hue = 0x240;
|
||||
}
|
||||
|
||||
protected override void AddNetProperties( ObjectPropertyList list )
|
||||
{
|
||||
}
|
||||
|
||||
// TODO
|
||||
//public override bool RequireDeepWater { get { return false; } }
|
||||
|
||||
protected override void FinishEffect( Point3D p, Map map, Mobile from )
|
||||
{
|
||||
if ( Utility.RandomDouble() < 0.02 )
|
||||
{
|
||||
from.SendLocalizedMessage( 1074487 ); // The creatures are too quick for you!
|
||||
}
|
||||
else
|
||||
{
|
||||
BaseFish fish = GiveFish( from );
|
||||
FishBowl bowl = Aquarium.GetEmptyBowl( from );
|
||||
|
||||
if ( bowl != null )
|
||||
{
|
||||
fish.StopTimer();
|
||||
bowl.AddItem( fish );
|
||||
from.SendLocalizedMessage( 1074489 ); // A live creature jumps into the fish bowl in your pack!
|
||||
Delete();
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( from.PlaceInBackpack( fish ) )
|
||||
{
|
||||
from.PlaySound( 0x5A2 );
|
||||
from.SendLocalizedMessage( 1074490 ); // A live creature flops around in your pack before running out of air.
|
||||
|
||||
fish.Kill();
|
||||
Delete();
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
fish.Delete();
|
||||
|
||||
from.SendLocalizedMessage( 1074488 ); // You could not hold the creature.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
InUse = false;
|
||||
Movable = true;
|
||||
|
||||
if ( !from.PlaceInBackpack( this ) )
|
||||
{
|
||||
if ( from.Map == null || from.Map == Map.Internal )
|
||||
Delete();
|
||||
else
|
||||
MoveToWorld( from.Location, from.Map );
|
||||
}
|
||||
}
|
||||
|
||||
private BaseFish GiveFish( Mobile from )
|
||||
{
|
||||
double skill = from.Skills.Fishing.Value;
|
||||
|
||||
if ( ( skill / 100.0 ) >= Utility.RandomDouble() )
|
||||
{
|
||||
int max = (int) skill / 5;
|
||||
|
||||
if ( max > 20 )
|
||||
max = 20;
|
||||
|
||||
switch ( Utility.Random( max ) )
|
||||
{
|
||||
case 0: return new MinocBlueFish();
|
||||
case 1: return new Shrimp();
|
||||
case 2: return new FandancerFish();
|
||||
case 3: return new GoldenBroadtail();
|
||||
case 4: return new RedDartFish();
|
||||
case 5: return new AlbinoCourtesanFish();
|
||||
case 6: return new MakotoCourtesanFish();
|
||||
case 7: return new NujelmHoneyFish();
|
||||
case 8: return new Jellyfish();
|
||||
case 9: return new SpeckledCrab();
|
||||
case 10: return new LongClawCrab();
|
||||
case 11: return new AlbinoFrog();
|
||||
case 12: return new KillerFrog();
|
||||
case 13: return new VesperReefTiger();
|
||||
case 14: return new PurpleFrog();
|
||||
case 15: return new BritainCrownFish();
|
||||
case 16: return new YellowFinBluebelly();
|
||||
case 17: return new SpottedBuccaneer();
|
||||
case 18: return new SpinedScratcherFish();
|
||||
default: return new SmallMouthSuckerFin();
|
||||
}
|
||||
}
|
||||
|
||||
return new MinocBlueFish();
|
||||
}
|
||||
|
||||
public AquariumFishNet( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
// Legacy code
|
||||
public class AquariumFishingNet : Item
|
||||
{
|
||||
public override int LabelNumber{ get{ return 1074463; } } // An aquarium fishing net
|
||||
|
||||
public AquariumFishingNet()
|
||||
{
|
||||
Weight = 1.0;
|
||||
|
||||
Hue = ( 0.01 > Utility.RandomDouble() ) ? Utility.RandomList( m_Hues ) : 0x240;
|
||||
}
|
||||
|
||||
public AquariumFishingNet( Serial serial ) : base( serial )
|
||||
{
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
private Item CreateReplacement()
|
||||
{
|
||||
Item result = new AquariumFishNet();
|
||||
result.Hue = Hue;
|
||||
result.LootType = LootType;
|
||||
result.Movable = Movable;
|
||||
result.Name = Name;
|
||||
result.QuestItem = QuestItem;
|
||||
result.Visible = Visible;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
if ( !IsChildOf( from.Backpack ) )
|
||||
{
|
||||
from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it.
|
||||
return;
|
||||
}
|
||||
|
||||
from.SendLocalizedMessage( 1010484 ); // Where do you wish to use the net?
|
||||
from.BeginTarget( -1, true, TargetFlags.None, new TargetCallback( OnTarget ) );
|
||||
}
|
||||
|
||||
public void OnTarget( Mobile from, object obj )
|
||||
{
|
||||
m_Player = from;
|
||||
|
||||
if ( Deleted )
|
||||
return;
|
||||
|
||||
IPoint3D p3D = obj as IPoint3D;
|
||||
|
||||
if ( p3D == null )
|
||||
return;
|
||||
|
||||
Map map = from.Map;
|
||||
|
||||
if ( map == null || map == Map.Internal )
|
||||
return;
|
||||
|
||||
int x = p3D.X, y = p3D.Y;
|
||||
|
||||
if ( !from.InRange( p3D, 6 ) )
|
||||
{
|
||||
from.SendLocalizedMessage( 500976 ); // You need to be closer to the water to fish!
|
||||
}
|
||||
else if ( FullValidation( map, x, y ) )
|
||||
|
||||
Item replacement = CreateReplacement();
|
||||
|
||||
if ( !from.PlaceInBackpack( replacement ) )
|
||||
{
|
||||
Point3D p = new Point3D( x, y, map.GetAverageZ( x, y ) );
|
||||
|
||||
Movable = false;
|
||||
MoveToWorld( p, map );
|
||||
|
||||
from.Animate( 12, 5, 1, true, false, 0 );
|
||||
|
||||
Timer.DelayCall( TimeSpan.FromSeconds( 1.5 ), TimeSpan.FromSeconds( 1.0 ), 20, new TimerStateCallback( DoEffect ), new object[]{ p, 0 } );
|
||||
|
||||
from.SendLocalizedMessage( 1010487 ); // You plunge the net into the sea...
|
||||
replacement.Delete();
|
||||
from.SendLocalizedMessage( 500720 ); // You don't have enough room in your backpack!
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage( 1010485 ); // You can only use this net in deep water!
|
||||
}
|
||||
}
|
||||
|
||||
public static bool FullValidation( Map map, int x, int y )
|
||||
{
|
||||
bool valid = ValidateDeepWater( map, x, y );
|
||||
|
||||
for ( int j = 1, offset = 5; valid && j <= 5; ++j, offset += 5 )
|
||||
{
|
||||
if ( !ValidateDeepWater( map, x + offset, y + offset ) )
|
||||
valid = false;
|
||||
else if ( !ValidateDeepWater( map, x + offset, y - offset ) )
|
||||
valid = false;
|
||||
else if ( !ValidateDeepWater( map, x - offset, y + offset ) )
|
||||
valid = false;
|
||||
else if ( !ValidateDeepWater( map, x - offset, y - offset ) )
|
||||
valid = false;
|
||||
}
|
||||
|
||||
return valid;
|
||||
}
|
||||
|
||||
private static bool ValidateDeepWater( Map map, int x, int y )
|
||||
{
|
||||
int tileID = map.Tiles.GetLandTile( x, y ).ID;
|
||||
bool water = false;
|
||||
|
||||
for ( int i = 0; !water && i < m_WaterTiles.Length; i += 2 )
|
||||
water = ( tileID >= m_WaterTiles[i] && tileID <= m_WaterTiles[i + 1] );
|
||||
|
||||
return water;
|
||||
}
|
||||
|
||||
private void DoEffect( object state )
|
||||
{
|
||||
if ( Deleted )
|
||||
return;
|
||||
|
||||
object[] states = (object[])state;
|
||||
|
||||
Point3D p = (Point3D)states[0];
|
||||
int index = (int)states[1];
|
||||
|
||||
states[1] = ++index;
|
||||
|
||||
if ( index == 1 )
|
||||
{
|
||||
Effects.SendLocationEffect( p, Map, 0x352D, 16, 4 );
|
||||
Effects.PlaySound( p, Map, 0x364 );
|
||||
}
|
||||
else if ( index <= 10 || index == 20 )
|
||||
{
|
||||
for ( int i = 0; i < 3; ++i )
|
||||
{
|
||||
int x, y;
|
||||
|
||||
switch ( Utility.Random( 8 ) )
|
||||
{
|
||||
default:
|
||||
case 0: x = -1; y = -1; break;
|
||||
case 1: x = -1; y = 0; break;
|
||||
case 2: x = -1; y = +1; break;
|
||||
case 3: x = 0; y = -1; break;
|
||||
case 4: x = 0; y = +1; break;
|
||||
case 5: x = +1; y = -1; break;
|
||||
case 6: x = +1; y = 0; break;
|
||||
case 7: x = +1; y = +1; break;
|
||||
}
|
||||
|
||||
Effects.SendLocationEffect( new Point3D( p.X + x, p.Y + y, p.Z ), Map, 0x352D, 16, 4 );
|
||||
}
|
||||
|
||||
Effects.PlaySound( p, Map, 0x364 );
|
||||
|
||||
if ( index == 20 )
|
||||
FinishEffect( p );
|
||||
else
|
||||
this.Z -= 1;
|
||||
}
|
||||
}
|
||||
|
||||
private void FinishEffect( Point3D p )
|
||||
{
|
||||
BaseFish fish = GiveFish( m_Player.Skills.Fishing.Base / 100 );
|
||||
|
||||
if ( fish != null )
|
||||
{
|
||||
Item[] items = m_Player.Backpack.FindItemsByType( typeof( FishBowl ) );
|
||||
|
||||
foreach ( FishBowl bowl in items )
|
||||
{
|
||||
if ( !bowl.Deleted && bowl.Empty )
|
||||
{
|
||||
fish.StopTimer();
|
||||
bowl.AddItem( fish );
|
||||
bowl.InvalidateProperties();
|
||||
m_Player.SendLocalizedMessage( 1074489 ); // A live creature jumps into the fish bowl in your pack!
|
||||
Delete();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if ( !m_Player.PlaceInBackpack( fish ) )
|
||||
{
|
||||
m_Player.SendLocalizedMessage( 500720 ); // You don't have enough room in your backpack!
|
||||
fish.MoveToWorld( m_Player.Location, m_Player.Map );
|
||||
}
|
||||
else
|
||||
m_Player.SendLocalizedMessage( 1074490 ); // A live creature flops around in your pack before running out of air.
|
||||
|
||||
fish.Kill();
|
||||
Delete();
|
||||
from.Use( replacement );
|
||||
}
|
||||
else
|
||||
{
|
||||
Movable = true;
|
||||
|
||||
if ( !m_Player.PlaceInBackpack( this ) )
|
||||
MoveToWorld( m_Player.Location, m_Player.Map );
|
||||
|
||||
m_Player.SendLocalizedMessage( 1074487 ); // The creatures are too quick for you!
|
||||
}
|
||||
}
|
||||
|
||||
public BaseFish GiveFish( double skill )
|
||||
{
|
||||
if ( 0.004 * skill > Utility.RandomDouble() ) return new Shrimp();
|
||||
if ( 0.008 * skill > Utility.RandomDouble() ) return new SmallMouthSuckerFin();
|
||||
if ( 0.008 * skill > Utility.RandomDouble() ) return new SpinedScratcherFish();
|
||||
if ( 0.022 * skill > Utility.RandomDouble() ) return new SpottedBuccaneer();
|
||||
if ( 0.022 * skill > Utility.RandomDouble() ) return new YellowFinBluebelly();
|
||||
if ( 0.030 * skill > Utility.RandomDouble() ) return new BritainCrownFish();
|
||||
if ( 0.030 * skill > Utility.RandomDouble() ) return new PurpleFrog();
|
||||
if ( 0.032 * skill > Utility.RandomDouble() ) return new VesperReefTiger();
|
||||
if ( 0.038 * skill > Utility.RandomDouble() ) return new KillerFrog();
|
||||
if ( 0.040 * skill > Utility.RandomDouble() ) return new AlbinoFrog();
|
||||
if ( 0.046 * skill > Utility.RandomDouble() ) return new LongClawCrab();
|
||||
if ( 0.052 * skill > Utility.RandomDouble() ) return new SpeckledCrab();
|
||||
if ( 0.058 * skill > Utility.RandomDouble() ) return new Jellyfish();
|
||||
if ( 0.062 * skill > Utility.RandomDouble() ) return new NujelmHoneyFish();
|
||||
if ( 0.064 * skill > Utility.RandomDouble() ) return new MakotoCourtesanFish();
|
||||
if ( 0.076 * skill > Utility.RandomDouble() ) return new AlbinoCourtesanFish();
|
||||
if ( 0.082 * skill > Utility.RandomDouble() ) return new RedDartFish();
|
||||
if ( 0.088 * skill > Utility.RandomDouble() ) return new MinocBlueFish();
|
||||
if ( 0.090 * skill > Utility.RandomDouble() ) return new GoldenBroadtail();
|
||||
if ( 0.148 * skill > Utility.RandomDouble() ) return new FandancerFish();
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
|
|
|
|||
|
|
@ -2,107 +2,91 @@ using System;
|
|||
using System.Collections;
|
||||
using Server.Gumps;
|
||||
using Server.Items;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class AquariumGump : Gump
|
||||
{
|
||||
{
|
||||
private Aquarium m_Aquarium;
|
||||
private bool m_Edit;
|
||||
|
||||
|
||||
public AquariumGump( Aquarium aquarium, bool edit ) : base( 100, 100 )
|
||||
{
|
||||
m_Aquarium = aquarium;
|
||||
m_Edit = edit;
|
||||
|
||||
|
||||
Closable = true;
|
||||
Disposable = true;
|
||||
Dragable = true;
|
||||
Resizable = false;
|
||||
|
||||
|
||||
AddPage( 0 );
|
||||
AddBackground( 0, 0, 350, 323, 0xE10 );
|
||||
AddImage( 0, 0, 0x2C96 );
|
||||
|
||||
|
||||
if ( m_Aquarium.Items.Count == 0 )
|
||||
return;
|
||||
|
||||
|
||||
for ( int i = 1; i <= m_Aquarium.Items.Count; i ++ )
|
||||
DisplayPage( i );
|
||||
DisplayPage( i, edit );
|
||||
}
|
||||
|
||||
public virtual void DisplayPage( int page )
|
||||
|
||||
public virtual void DisplayPage( int page, bool edit )
|
||||
{
|
||||
AddPage( page );
|
||||
|
||||
Item item = m_Aquarium.Items[ page - 1 ];
|
||||
|
||||
AddPage( page );
|
||||
|
||||
Item item = m_Aquarium.Items[ page - 1 ];
|
||||
|
||||
// item name
|
||||
if ( item.LabelNumber != 0 )
|
||||
AddHtmlLocalized( 20, 217, 250, 20, item.LabelNumber, 0xFFFFFF, false, false ); // Name
|
||||
|
||||
// item details
|
||||
AddHtmlLocalized( 20, 217, 250, 20, item.LabelNumber, 0xFFFFFF, false, false ); // Name
|
||||
|
||||
// item details
|
||||
if ( item is BaseFish )
|
||||
{
|
||||
BaseFish fish = (BaseFish) item;
|
||||
|
||||
if ( !fish.Dead && fish.ItemID > 0x3B0F )
|
||||
AddHtmlLocalized( 20, 239, 315, 20, 1074422, 0xFFFFFF, false, false ); // A very unusual live aquarium creature
|
||||
else if ( !fish.Dead && fish.Hue > 0 )
|
||||
AddHtmlLocalized( 20, 239, 315, 20, 1074423, 0xFFFFFF, false, false ); // A live aquarium creature of unusual color
|
||||
else if ( !fish.Dead )
|
||||
AddHtmlLocalized( 20, 239, 315, 20, 1073622, 0xFFFFFF, false, false ); // A live aquarium creature
|
||||
else if ( fish.Dead && fish.ItemID > 0x3B0F )
|
||||
AddHtmlLocalized( 20, 239, 315, 20, 1074424, 0xFFFFFF, false, false ); // A very unusual dead aquarium creature
|
||||
else if ( fish.Dead && fish.Hue > 0 )
|
||||
AddHtmlLocalized( 20, 239, 315, 20, 1074425, 0xFFFFFF, false, false ); // A dead aquarium creature of unusual color
|
||||
else if ( fish.Dead )
|
||||
AddHtmlLocalized( 20, 239, 315, 20, 1073623, 0xFFFFFF, false, false ); // A dead aquarium creature
|
||||
}
|
||||
AddHtmlLocalized( 20, 239, 315, 20, ( (BaseFish) item ).GetDescription(), 0xFFFFFF, false, false );
|
||||
else
|
||||
{
|
||||
AddHtmlLocalized( 20, 239, 315, 20, 1073634, 0xFFFFFF, false, false ); // An aquarium decoration
|
||||
}
|
||||
|
||||
|
||||
// item image
|
||||
AddItem( 150, 80, item.ItemID, item.Hue );
|
||||
|
||||
AddItem( 150, 80, item.ItemID, item.Hue );
|
||||
|
||||
// item number / all items
|
||||
AddHtml( 20, 195, 250, 20, String.Format( "<BASEFONT COLOR=#{0:X6}>{1}</BASEFONT>", 0xFFFFFF, page + "/" + ( m_Aquarium.Items.Count ) ), false, false );
|
||||
|
||||
AddHtml( 20, 195, 250, 20, String.Format( "<BASEFONT COLOR=#FFFFFF>{0}/{1}</BASEFONT>", page, m_Aquarium.Items.Count ), false, false );
|
||||
|
||||
// remove item
|
||||
if ( m_Edit )
|
||||
if ( edit )
|
||||
{
|
||||
AddBackground( 230, 195, 100, 26, 0x13BE );
|
||||
AddButton( 235, 200, 0x845, 0x846, page, GumpButtonType.Reply, 0 );
|
||||
AddHtmlLocalized( 260, 198, 60, 26, 1073838, 0x0, false, false ); // Remove
|
||||
}
|
||||
|
||||
|
||||
// next page
|
||||
if ( page < m_Aquarium.Items.Count )
|
||||
{
|
||||
AddButton( 195, 280, 0xFA5, 0xFA7, 0, GumpButtonType.Page, page + 1 );
|
||||
AddHtmlLocalized( 230, 283, 100, 18, 1044045, 0xFFFFFF, false, false ); // NEXT PAGE
|
||||
AddHtmlLocalized( 230, 283, 100, 18, 1044045, 0xFFFFFF, false, false ); // NEXT PAGE
|
||||
}
|
||||
|
||||
|
||||
// previous page
|
||||
if ( page > 1 )
|
||||
{
|
||||
AddButton( 45, 280, 0xFAE, 0xFAF, 0, GumpButtonType.Page, page - 1 );
|
||||
AddHtmlLocalized( 80, 283, 100, 18, 1044044, 0xFFFFFF, false, false ); // PREV PAGE
|
||||
AddHtmlLocalized( 80, 283, 100, 18, 1044044, 0xFFFFFF, false, false ); // PREV PAGE
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnResponse( Server.Network.NetState sender, RelayInfo info )
|
||||
|
||||
public override void OnResponse( NetState sender, RelayInfo info )
|
||||
{
|
||||
if ( m_Aquarium == null || m_Aquarium.Deleted )
|
||||
return;
|
||||
|
||||
if ( info.ButtonID > 0 && info.ButtonID <= m_Aquarium.Items.Count && m_Edit )
|
||||
|
||||
bool edit = m_Aquarium.HasAccess( sender.Mobile );
|
||||
|
||||
if ( info.ButtonID > 0 && info.ButtonID <= m_Aquarium.Items.Count && edit )
|
||||
m_Aquarium.RemoveItem( sender.Mobile, info.ButtonID - 1 );
|
||||
|
||||
|
||||
if ( info.ButtonID > 0 )
|
||||
sender.Mobile.SendGump( new AquariumGump( m_Aquarium, m_Edit ) );
|
||||
}
|
||||
sender.Mobile.SendGump( new AquariumGump( m_Aquarium, edit ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,25 +2,25 @@ using System;
|
|||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
{
|
||||
public enum WaterState
|
||||
{
|
||||
Dead,
|
||||
Dying,
|
||||
Unhealthy,
|
||||
Healthy,
|
||||
Strong,
|
||||
Strong
|
||||
}
|
||||
|
||||
|
||||
public enum FoodState
|
||||
{
|
||||
Dead,
|
||||
Starving,
|
||||
Hungry,
|
||||
Full,
|
||||
Overfed,
|
||||
Overfed
|
||||
}
|
||||
|
||||
|
||||
[PropertyObject]
|
||||
public class AquariumState
|
||||
{
|
||||
|
|
@ -28,58 +28,67 @@ namespace Server.Items
|
|||
private int m_Maintain;
|
||||
private int m_Improve;
|
||||
private int m_Added;
|
||||
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int State
|
||||
{
|
||||
get{ return m_State; }
|
||||
set{ m_State = value; }
|
||||
set
|
||||
{
|
||||
m_State = value;
|
||||
|
||||
if ( m_State < 0 )
|
||||
m_State = 0;
|
||||
|
||||
if ( m_State > 4 )
|
||||
m_State = 4;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int Maintain
|
||||
{
|
||||
get{ return m_Maintain; }
|
||||
set{ m_Maintain = value; }
|
||||
}
|
||||
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int Improve
|
||||
{
|
||||
get{ return m_Improve; }
|
||||
set{ m_Improve = value; }
|
||||
}
|
||||
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int Added
|
||||
{
|
||||
get{ return m_Added; }
|
||||
set{ m_Added = value; }
|
||||
}
|
||||
|
||||
|
||||
public AquariumState()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "...";
|
||||
}
|
||||
|
||||
|
||||
public virtual void Serialize( GenericWriter writer )
|
||||
{
|
||||
writer.Write( 0 ); // version
|
||||
|
||||
|
||||
writer.Write( m_State );
|
||||
writer.Write( m_Maintain );
|
||||
writer.Write( m_Improve );
|
||||
writer.Write( m_Added );
|
||||
}
|
||||
|
||||
|
||||
public virtual void Deserialize( GenericReader reader )
|
||||
{
|
||||
int version = reader.ReadInt();
|
||||
|
||||
|
||||
m_State = reader.ReadInt();
|
||||
m_Maintain = reader.ReadInt();
|
||||
m_Improve = reader.ReadInt();
|
||||
|
|
|
|||
|
|
@ -3,17 +3,19 @@ using Server;
|
|||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
{
|
||||
public class BaseFish : Item
|
||||
{
|
||||
private Timer m_Timer;
|
||||
|
||||
private static readonly TimeSpan DeathDelay = TimeSpan.FromMinutes( 5 );
|
||||
|
||||
private Timer m_Timer;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public bool Dead
|
||||
{
|
||||
get{ return ItemID == 0x3B0C; }
|
||||
get{ return ( ItemID == 0x3B0C ); }
|
||||
}
|
||||
|
||||
|
||||
[Constructable]
|
||||
public BaseFish( int itemID ) : base( itemID )
|
||||
{
|
||||
|
|
@ -21,65 +23,59 @@ namespace Server.Items
|
|||
}
|
||||
|
||||
public BaseFish( Serial serial ) : base( serial )
|
||||
{
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
public virtual void StartTimer()
|
||||
{
|
||||
if ( m_Timer != null )
|
||||
m_Timer.Stop();
|
||||
|
||||
m_Timer = Timer.DelayCall( TimeSpan.FromMinutes( 5 ), new TimerCallback( Kill ) );
|
||||
|
||||
m_Timer = Timer.DelayCall( DeathDelay, new TimerCallback( Kill ) );
|
||||
|
||||
InvalidateProperties();
|
||||
}
|
||||
|
||||
|
||||
public virtual void StopTimer()
|
||||
{
|
||||
if ( m_Timer != null )
|
||||
m_Timer.Stop();
|
||||
|
||||
|
||||
m_Timer = null;
|
||||
|
||||
InvalidateProperties();
|
||||
}
|
||||
|
||||
|
||||
public override void OnDelete()
|
||||
{
|
||||
StopTimer();
|
||||
}
|
||||
|
||||
public virtual void Kill()
|
||||
{
|
||||
ItemID = 0x3B0C;
|
||||
StopTimer();
|
||||
|
||||
|
||||
InvalidateProperties();
|
||||
}
|
||||
|
||||
public override bool DropToItem( Mobile from, Item target, Point3D p )
|
||||
{
|
||||
if ( target is FishBowl || target is Aquarium )
|
||||
{
|
||||
if ( base.DropToItem( from, target, p ) )
|
||||
{
|
||||
StopTimer();
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return base.DropToItem( from, target, p );
|
||||
|
||||
public int GetDescription()
|
||||
{
|
||||
// TODO: This will never return "very unusual dead aquarium creature" due to the way it is killed
|
||||
if ( ItemID > 0x3B0F )
|
||||
return Dead ? 1074424 : 1074422; // A very unusual [dead/live] aquarium creature
|
||||
else if ( Hue != 0 )
|
||||
return Dead ? 1074425 : 1074423; // A [dead/live] aquarium creature of unusual color
|
||||
|
||||
return Dead ? 1073623 : 1073622; // A [dead/live] aquarium creature
|
||||
}
|
||||
|
||||
|
||||
public override void GetProperties( ObjectPropertyList list )
|
||||
{
|
||||
base.GetProperties( list );
|
||||
|
||||
if ( !Dead && ItemID > 0x3B0F )
|
||||
list.Add( 1074422 ); // A very unusual live aquarium creature
|
||||
else if ( !Dead && Hue > 0 )
|
||||
list.Add( 1074423 ); // A live aquarium creature of unusual color
|
||||
else if ( !Dead )
|
||||
list.Add( 1073622 ); // A live aquarium creature
|
||||
else if ( Dead && ItemID > 0x3B0F )
|
||||
list.Add( 1074424 ); // A very unusual dead aquarium creature
|
||||
else if ( Dead && Hue > 0 )
|
||||
list.Add( 1074425 ); // A dead aquarium creature of unusual color
|
||||
else if ( Dead )
|
||||
list.Add( 1073623 ); // A dead aquarium creature
|
||||
|
||||
|
||||
list.Add( GetDescription() );
|
||||
|
||||
if ( !Dead && m_Timer != null )
|
||||
list.Add( 1074507 ); // Gasping for air
|
||||
}
|
||||
|
|
@ -96,7 +92,7 @@ namespace Server.Items
|
|||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
|
||||
if ( !( Parent is Aquarium ) && !( Parent is FishBowl ) )
|
||||
StartTimer();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,77 +6,91 @@ using Server.ContextMenus;
|
|||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class FishBowl : Container
|
||||
{
|
||||
public class FishBowl : BaseContainer
|
||||
{
|
||||
public override int LabelNumber{ get{ return 1074499; } } // A fish bowl
|
||||
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public bool Empty
|
||||
{
|
||||
get{ return Items.Count == 0; }
|
||||
get{ return ( Items.Count == 0 ); }
|
||||
}
|
||||
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public BaseFish Fish
|
||||
{
|
||||
get
|
||||
{
|
||||
if ( Empty )
|
||||
return null;
|
||||
|
||||
|
||||
if ( Items[ 0 ] is BaseFish )
|
||||
return (BaseFish) Items[ 0 ];
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public override double DefaultWeight { get { return 2.0; } }
|
||||
|
||||
[Constructable]
|
||||
public FishBowl() : base( 0x241C )
|
||||
{
|
||||
Hue = 0x47E;
|
||||
Hue = 0x47E;
|
||||
MaxItems = 1;
|
||||
Weight = 1;
|
||||
}
|
||||
|
||||
public FishBowl( Serial serial ) : base( serial )
|
||||
{
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
public override bool OnDragDrop( Mobile from, Item dropped )
|
||||
{
|
||||
if ( dropped is BaseFish && Empty )
|
||||
if ( !IsAccessibleTo( from ) )
|
||||
{
|
||||
((BaseFish) dropped).StopTimer();
|
||||
InvalidateProperties();
|
||||
|
||||
return base.OnDragDrop( from, dropped );
|
||||
from.SendLocalizedMessage( 502436 ); // That is not accessible.
|
||||
return false;
|
||||
}
|
||||
else
|
||||
|
||||
if ( !( dropped is BaseFish ) )
|
||||
{
|
||||
from.SendLocalizedMessage( 1074836 ); // The container can not hold that type of object.
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( base.OnDragDrop( from, dropped ) )
|
||||
{
|
||||
((BaseFish) dropped).StopTimer();
|
||||
InvalidateProperties();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void GetProperties( ObjectPropertyList list )
|
||||
|
||||
public override void AddNameProperties( ObjectPropertyList list )
|
||||
{
|
||||
list.Add( 1074499 ); // A fish bowl
|
||||
list.Add( 1072788, Weight.ToString() ); // Weight: ~1_WEIGHT~ stone
|
||||
|
||||
base.AddNameProperties( list );
|
||||
|
||||
if ( !Empty )
|
||||
list.Add( 1074494, "#" + Fish.LabelNumber ); // Contains: ~1_CREATURE~
|
||||
|
||||
list.Add( 1073841, "{0}\t{1}\t{2}", Items.Count, MaxItems, GetTotal( TotalType.Weight ) ); // Contents: ~1_COUNT~/~2_MAXCOUNT~ items, ~3_WEIGHT~ stones
|
||||
{
|
||||
BaseFish fish = Fish;
|
||||
|
||||
if ( fish != null )
|
||||
list.Add( 1074494, "#{0}", fish.LabelNumber ); // Contains: ~1_CREATURE~
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public override void GetContextMenuEntries( Mobile from, List<ContextMenuEntry> list )
|
||||
{
|
||||
base.GetContextMenuEntries( from, list );
|
||||
|
||||
if ( !Empty )
|
||||
|
||||
if ( !Empty && IsAccessibleTo( from ) )
|
||||
list.Add( new RemoveCreature( this ) );
|
||||
}
|
||||
|
||||
|
|
@ -84,7 +98,7 @@ namespace Server.Items
|
|||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
writer.Write( (int) 1 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
|
|
@ -92,33 +106,42 @@ namespace Server.Items
|
|||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
if ( version == 0 )
|
||||
Weight = DefaultWeight;
|
||||
}
|
||||
|
||||
|
||||
private class RemoveCreature : ContextMenuEntry
|
||||
{
|
||||
private FishBowl m_Bowl;
|
||||
|
||||
public RemoveCreature( FishBowl bowl ) : base( 6242, 0 ) // Remove creature
|
||||
|
||||
public RemoveCreature( FishBowl bowl ) : base( 6242, 3 ) // Remove creature
|
||||
{
|
||||
m_Bowl = bowl;
|
||||
}
|
||||
|
||||
|
||||
public override void OnClick()
|
||||
{
|
||||
if ( m_Bowl == null || m_Bowl.Deleted )
|
||||
if ( m_Bowl == null || m_Bowl.Deleted || !m_Bowl.IsAccessibleTo( Owner.From ) )
|
||||
return;
|
||||
|
||||
|
||||
BaseFish fish = m_Bowl.Fish;
|
||||
|
||||
|
||||
if ( fish != null )
|
||||
{
|
||||
if ( !Owner.From.PlaceInBackpack( fish ) )
|
||||
if ( fish.IsLockedDown )
|
||||
{
|
||||
Owner.From.SendLocalizedMessage( 1010449 ); // You may not use this object while it is locked down.
|
||||
}
|
||||
else if ( !Owner.From.PlaceInBackpack( fish ) )
|
||||
{
|
||||
Owner.From.SendLocalizedMessage( 1074496 ); // There is no room in your pack for the creature.
|
||||
}
|
||||
else
|
||||
{
|
||||
Owner.From.SendLocalizedMessage( 1074495 ); // The creature has been removed from the fish bowl.
|
||||
Owner.From.SendLocalizedMessage( 1074495 ); // The creature has been removed from the fish bowl.
|
||||
fish.StartTimer();
|
||||
m_Bowl.InvalidateProperties();
|
||||
m_Bowl.InvalidateProperties();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,22 +5,22 @@ using Server.Items;
|
|||
namespace Server.Items
|
||||
{
|
||||
public class AquariumMessage : MessageInABottle
|
||||
{
|
||||
{
|
||||
public override int LabelNumber{ get{ return 1073894; } } // Message in a Bottle
|
||||
|
||||
|
||||
[Constructable]
|
||||
public AquariumMessage() : base()
|
||||
{
|
||||
}
|
||||
|
||||
public AquariumMessage( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void GetProperties( ObjectPropertyList list )
|
||||
{
|
||||
base.GetProperties( list );
|
||||
|
||||
}
|
||||
|
||||
public override void AddNameProperties( ObjectPropertyList list )
|
||||
{
|
||||
base.AddNameProperties( list );
|
||||
|
||||
list.Add( 1073634 ); // An aquarium decoration
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,22 +5,22 @@ using Server.Items;
|
|||
namespace Server.Items
|
||||
{
|
||||
public class CaptainBlackheartsFishingPole : FishingPole
|
||||
{
|
||||
{
|
||||
public override int LabelNumber{ get{ return 1074571; } } // Captain Blackheart's Fishing Pole
|
||||
|
||||
|
||||
[Constructable]
|
||||
public CaptainBlackheartsFishingPole() : base()
|
||||
{
|
||||
}
|
||||
|
||||
public CaptainBlackheartsFishingPole( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void GetProperties( ObjectPropertyList list )
|
||||
{
|
||||
base.GetProperties( list );
|
||||
|
||||
}
|
||||
|
||||
public override void AddNameProperties( ObjectPropertyList list )
|
||||
{
|
||||
base.AddNameProperties( list );
|
||||
|
||||
list.Add( 1073634 ); // An aquarium decoration
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,22 +5,31 @@ using Server.Items;
|
|||
namespace Server.Items
|
||||
{
|
||||
public class CraftysFishingHat : BaseHat
|
||||
{
|
||||
{
|
||||
public override int LabelNumber{ get{ return 1074572; } } // Crafty's Fishing Hat
|
||||
|
||||
|
||||
public override int BasePhysicalResistance{ get{ return 0; } }
|
||||
public override int BaseFireResistance{ get{ return 5; } }
|
||||
public override int BaseColdResistance{ get{ return 9; } }
|
||||
public override int BasePoisonResistance{ get{ return 5; } }
|
||||
public override int BaseEnergyResistance{ get{ return 5; } }
|
||||
|
||||
public override int InitMinHits{ get{ return 20; } }
|
||||
public override int InitMaxHits{ get{ return 30; } }
|
||||
|
||||
[Constructable]
|
||||
public CraftysFishingHat() : base( 0x1713 )
|
||||
{
|
||||
}
|
||||
|
||||
public CraftysFishingHat( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void GetProperties( ObjectPropertyList list )
|
||||
{
|
||||
base.GetProperties( list );
|
||||
|
||||
}
|
||||
|
||||
public override void AddNameProperties( ObjectPropertyList list )
|
||||
{
|
||||
base.AddNameProperties( list );
|
||||
|
||||
list.Add( 1073634 ); // An aquarium decoration
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,23 +4,23 @@ using Server;
|
|||
namespace Server.Items
|
||||
{
|
||||
public class FishBones : Item
|
||||
{
|
||||
{
|
||||
public override int LabelNumber{ get{ return 1074601; } } // Fish bones
|
||||
|
||||
public override double DefaultWeight{ get{ return 1.0; } }
|
||||
|
||||
[Constructable]
|
||||
public FishBones() : base( 0x3B0C )
|
||||
{
|
||||
Weight = 1;
|
||||
}
|
||||
|
||||
public FishBones( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void GetProperties( ObjectPropertyList list )
|
||||
{
|
||||
base.GetProperties( list );
|
||||
|
||||
}
|
||||
|
||||
public override void AddNameProperties( ObjectPropertyList list )
|
||||
{
|
||||
base.AddNameProperties( list );
|
||||
|
||||
list.Add( 1073634 ); // An aquarium decoration
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,20 +7,20 @@ namespace Server.Items
|
|||
public class IslandStatue : Item
|
||||
{
|
||||
public override int LabelNumber{ get{ return 1074600; } } // An island statue
|
||||
public override double DefaultWeight{ get{ return 1.0; } }
|
||||
|
||||
[Constructable]
|
||||
public IslandStatue() : base( 0x3B0F )
|
||||
{
|
||||
Weight = 1;
|
||||
}
|
||||
|
||||
public IslandStatue( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void GetProperties( ObjectPropertyList list )
|
||||
public override void AddNameProperties( ObjectPropertyList list )
|
||||
{
|
||||
base.GetProperties( list );
|
||||
base.AddNameProperties( list );
|
||||
|
||||
list.Add( 1073634 ); // An aquarium decoration
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,23 +5,23 @@ using Server.Items;
|
|||
namespace Server.Items
|
||||
{
|
||||
public class Shell : Item
|
||||
{
|
||||
{
|
||||
public override int LabelNumber{ get{ return 1074598; } } // A shell
|
||||
|
||||
public override double DefaultWeight{ get{ return 1.0; } }
|
||||
|
||||
[Constructable]
|
||||
public Shell() : base( Utility.RandomList( 0x3B12, 0x3B13 ) )
|
||||
{
|
||||
Weight = 1;
|
||||
}
|
||||
|
||||
public Shell( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void GetProperties( ObjectPropertyList list )
|
||||
{
|
||||
base.GetProperties( list );
|
||||
|
||||
}
|
||||
|
||||
public override void AddNameProperties( ObjectPropertyList list )
|
||||
{
|
||||
base.AddNameProperties( list );
|
||||
|
||||
list.Add( 1073634 ); // An aquarium decoration
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,23 +6,23 @@ namespace Server.Items
|
|||
{
|
||||
[FlipableAttribute( 0x14F3, 0x14F4 )]
|
||||
public class ToyBoat : Item
|
||||
{
|
||||
{
|
||||
public override int LabelNumber{ get{ return 1074363; } } // A toy boat
|
||||
|
||||
public override double DefaultWeight{ get{ return 1.0; } }
|
||||
|
||||
[Constructable]
|
||||
public ToyBoat() : base( 0x14F3 )
|
||||
public ToyBoat() : base( 0x14F4 )
|
||||
{
|
||||
Weight = 1;
|
||||
}
|
||||
|
||||
public ToyBoat( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void GetProperties( ObjectPropertyList list )
|
||||
{
|
||||
base.GetProperties( list );
|
||||
|
||||
}
|
||||
|
||||
public override void AddNameProperties( ObjectPropertyList list )
|
||||
{
|
||||
base.AddNameProperties( list );
|
||||
|
||||
list.Add( 1073634 ); // An aquarium decoration
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,14 +4,14 @@ using Server;
|
|||
namespace Server.Items
|
||||
{
|
||||
public class WaterloggedBoots : BaseShoes
|
||||
{
|
||||
{
|
||||
public override int LabelNumber{ get{ return 1074364; } } // Waterlogged boots
|
||||
|
||||
|
||||
[Constructable]
|
||||
public WaterloggedBoots() : base( 0x1711 )
|
||||
{
|
||||
if ( Utility.RandomBool() )
|
||||
{
|
||||
{
|
||||
// thigh boots
|
||||
ItemID = 0x1711;
|
||||
Weight = 4.0;
|
||||
|
|
@ -25,13 +25,13 @@ namespace Server.Items
|
|||
}
|
||||
|
||||
public WaterloggedBoots( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void GetProperties( ObjectPropertyList list )
|
||||
{
|
||||
base.GetProperties( list );
|
||||
|
||||
}
|
||||
|
||||
public override void AddNameProperties( ObjectPropertyList list )
|
||||
{
|
||||
base.AddNameProperties( list );
|
||||
|
||||
list.Add( 1073634 ); // An aquarium decoration
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,24 +5,32 @@ using Server.Mobiles;
|
|||
namespace Server.Items
|
||||
{
|
||||
public class VacationWafer : Item
|
||||
{
|
||||
{
|
||||
public const int VacationDays = 7;
|
||||
|
||||
public override int LabelNumber{ get{ return 1074431; } } // An aquarium flake sphere
|
||||
|
||||
|
||||
[Constructable]
|
||||
public VacationWafer() : base( 0x971 )
|
||||
public VacationWafer() : base( 0x973 )
|
||||
{
|
||||
}
|
||||
|
||||
public VacationWafer( Serial serial ) : base( serial )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void AddNameProperties( ObjectPropertyList list )
|
||||
{
|
||||
base.AddNameProperties( list );
|
||||
|
||||
list.Add( 1074432, VacationDays.ToString() ); // Vacation days: ~1_DAYS~
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
writer.Write( (int) 1 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
|
|
@ -30,6 +38,9 @@ namespace Server.Items
|
|||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
if ( version < 1 && ItemID == 0x971 )
|
||||
ItemID = 0x973;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,6 +11,13 @@ namespace Server.Items
|
|||
|
||||
private bool m_InUse;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public bool InUse
|
||||
{
|
||||
get{ return m_InUse; }
|
||||
set{ m_InUse = value; }
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public SpecialFishingNet() : base( 0x0DCA )
|
||||
{
|
||||
|
|
@ -48,6 +55,11 @@ namespace Server.Items
|
|||
{
|
||||
base.GetProperties( list );
|
||||
|
||||
AddNetProperties( list );
|
||||
}
|
||||
|
||||
protected virtual void AddNetProperties( ObjectPropertyList list )
|
||||
{
|
||||
// as if the name wasn't enough..
|
||||
list.Add( 1017410 ); // Special Fishing Net
|
||||
}
|
||||
|
|
@ -100,6 +112,9 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
|
||||
// TODO
|
||||
//public virtual bool RequireDeepWater{ get{ return true; } }
|
||||
|
||||
public void OnTarget( Mobile from, object obj )
|
||||
{
|
||||
if ( Deleted || m_InUse )
|
||||
|
|
@ -125,8 +140,11 @@ namespace Server.Items
|
|||
{
|
||||
Point3D p = new Point3D( x, y, map.GetAverageZ( x, y ) );
|
||||
|
||||
for ( int i = 1; i < Amount; ++i ) // these were stackable before, doh
|
||||
from.AddToBackpack( new SpecialFishingNet() );
|
||||
if ( GetType() == typeof( SpecialFishingNet ) )
|
||||
{
|
||||
for ( int i = 1; i < Amount; ++i ) // these were stackable before, doh
|
||||
from.AddToBackpack( new SpecialFishingNet() );
|
||||
}
|
||||
|
||||
m_InUse = true;
|
||||
Movable = false;
|
||||
|
|
@ -308,6 +326,10 @@ namespace Server.Items
|
|||
Hue = 0x481;
|
||||
}
|
||||
|
||||
protected override void AddNetProperties( ObjectPropertyList list )
|
||||
{
|
||||
}
|
||||
|
||||
protected override int GetSpawnCount()
|
||||
{
|
||||
return base.GetSpawnCount() + 4;
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ namespace Server.Mobiles
|
|||
Add( new GenericBuyInfo( typeof( FishingPole ), 15, 20, 0xDC0, 0 ) );
|
||||
|
||||
#region Mondain's Legacy
|
||||
Add( new GenericBuyInfo( typeof( AquariumFishingNet ), 250, 20, 0xDC8, 0x240 ) );
|
||||
Add( new GenericBuyInfo( typeof( AquariumFishNet ), 250, 20, 0xDC8, 0x240 ) );
|
||||
Add( new GenericBuyInfo( typeof( AquariumFood ), 62, 20, 0xEFC, 0 ) );
|
||||
Add( new GenericBuyInfo( typeof( FishBowl ), 6312, 20, 0x241C, 0x482 ) );
|
||||
Add( new GenericBuyInfo( typeof( VacationWafer ), 67, 20, 0x971, 0 ) );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue