- You can't anymore place castles or keeps in Malas facet
(http://www.runuo.com/bugs/index.php?cmd=view&id=38) - Unfilled commodity deeds now carry the etching "Unfilled" (http://www.runuo.com/bugs/index.php?cmd=view&id=40) - Empty scrolls can be deeded in a commodity deed (http://www.uodemise.com/discussion/showthread.php?t=127485) - Dying tubs, if locked down, can allow security level choices (http://www.uodemise.com/discussion/showthread.php?t=128546) - Changes in Energy Vortex skills: they'll have 120 wrestling (it was 100) and 100 tactics (it was 90) (http://www.uodemise.com/discussion/showthread.php?t=122733) - Wooden Footlockers now show the correct container gump (http://www.uodemise.com/discussion/showthread.php?t=126452) - Changes to Interior Decorator (still not includes the fix to turn paragon chests): --> single item addons can be raised/lowered --> the gump stays visible until target is cancelled --> target won't be cancelled automatically when the decorator is used on a target (http://www.uodemise.com/discussion/showthread.php?t=126668) - Doom Lever Puzzle item list changed to generics (http://www.uodemise.com/discussion/showthread.php?t=130396) - Morphed forms will check now the current skill level: the morph effect is lost if skill level goes under the minimum required. (http://www.uodemise.com/discussion/showthread.php?t=116542) - Mage NPC vendors now buy necro scrolls; the price of scrolls got tweaked (= raised) to match OSI (http://www.runuo.com/bugs/index.php?cmd=view&id=90) (http://www.runuo.com/bugs/index.php?cmd=view&id=113) - You can't anymore discord NPC vendors (http://www.runuo.com/bugs/index.php?cmd=view&id=33) - Removing a rune from runebook won't change the default rune set (http://www.runuo.com/bugs/index.php?cmd=view&id=41) - Various runebook security changes (see link for the list) (http://www.runuo.com/bugs/index.php?cmd=view&id=39) - You can't use the Sacrifice virtue while hidden (http://www.runuo.com/bugs/index.php?cmd=view&id=42) - Added the Deceit Brazier: doubleclicking it will summon a random "britannian" monster (check [props for delays) (http://www.uodemise.com/discussion/showthread.php?t=123805) - Casting spells will raise also the secondary skill associated (example: Necro and SpiritSpeak) (http://www.runuo.com/bugs/index.php?cmd=view&id=43) - Word of Death changes: --> the "pitful damage" is much powerful now --> you have to bring the target health below (5*arcanefocus)% to strike the powerful blast of 300 chaos damage --> the damage is influenced by SDI (http://www.runuo.com/bugs/index.php?cmd=view&id=36) - Teleporters generated by [telgen got corrected for the Wrong dungeon (http://www.runuo.com/bugs/index.php?cmd=view&id=34)
This commit is contained in:
parent
b54bf2c8bb
commit
95de3595cd
23 changed files with 586 additions and 115 deletions
|
|
@ -859,6 +859,7 @@ namespace Server.Items
|
|||
[Constructable]
|
||||
public WoodenFootLocker() : base( 0x2811 )
|
||||
{
|
||||
GumpID = 0x10B;
|
||||
}
|
||||
|
||||
public WoodenFootLocker( Serial serial ) : base( serial )
|
||||
|
|
@ -869,7 +870,7 @@ namespace Server.Items
|
|||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 1 ); // version
|
||||
writer.Write( (int) 2 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
|
|
@ -880,6 +881,9 @@ namespace Server.Items
|
|||
|
||||
if ( version == 0 && Weight == 15 )
|
||||
Weight = -1;
|
||||
|
||||
if ( version < 2 )
|
||||
GumpID = 0x10B;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -107,6 +107,8 @@ namespace Server.Items
|
|||
|
||||
if ( m_Commodity != null && m_Commodity is ICommodity )
|
||||
list.Add( 1060658, "#{0}\t{1}", ((ICommodity)m_Commodity).DescriptionNumber, m_Commodity.Amount ); // ~1_val~: ~2_val~
|
||||
else
|
||||
list.Add( 1060748 ); // unfilled
|
||||
}
|
||||
|
||||
public override void OnSingleClick( Mobile from )
|
||||
|
|
|
|||
299
Scripts/Items/Misc/DeceitBrazier.cs
Normal file
299
Scripts/Items/Misc/DeceitBrazier.cs
Normal file
|
|
@ -0,0 +1,299 @@
|
|||
/***************************************************************************
|
||||
* DeceitBrazier.cs
|
||||
* Author : phoenix_smasher7 (ps7)
|
||||
* Version : 3.0
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Description:
|
||||
*
|
||||
* Just a little spawning system OSI made and which RunUO lacked.
|
||||
* DClicking brazier will spawn a random creature listed in m_Creatures.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Clilocs used:
|
||||
*
|
||||
* 500760 - The brazier fizzes and pops, but nothing seems to happen.
|
||||
* 500761 - Heed this warning well, and use this brazier at your own peril.
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Changelog:
|
||||
*
|
||||
* v1.5
|
||||
* Label was incorrect.Corrected.
|
||||
* Brazier will now only warn you if brazier can spawn another creature.
|
||||
* Added many other creatures to spawn list.
|
||||
* v1.6
|
||||
* Added missing elementals.
|
||||
* Removed nonagressive critters.
|
||||
* v2.0
|
||||
* Added some other missing creatures.
|
||||
* Added spawn range so that it will not always spawn on top of the brazier.
|
||||
* Added the flamestrike effect when creature spawned.
|
||||
* v2.1
|
||||
* Removed Jukas from the list since they no longer spawn in Britannia.
|
||||
* v2.2
|
||||
* Code cleanup
|
||||
* v2.3
|
||||
* Changed cooldown message to display as overhead message.
|
||||
* v2.4
|
||||
* Added ability to control usage of the brazier.By returning the value to true
|
||||
* in game you will be able to use the brazier again without having to wait for 15 minutes.
|
||||
* v3.0
|
||||
* Medium code change.
|
||||
* Made the spawner more customizable so it can fit others needs too.
|
||||
* Just set the CanTalk true and Delay to anything you want ingame and use it and you are ready to go.
|
||||
* Also fixed the serialization error.
|
||||
* It is highly recommended that you remove any trace left by older scripts.
|
||||
* v3.1
|
||||
* Removed the delay between warnings.
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Notes:
|
||||
*
|
||||
* No Matter what I've tried I have failed to create a timer that will queue the effects.In OSI it's like
|
||||
* FireColumn01 Spawns
|
||||
* 1 Second passes
|
||||
* FireColumn02 Spawns along with our creature. // At least this is the Information I got from Erica.
|
||||
* If someone else could confirm it would remove further doubts.
|
||||
* Where I couldn't succeed was the coordinates where our second effect and creature spawn.
|
||||
* Creatures kept spawning at internal with coordinates of x0y0z0.
|
||||
* If anyone is willing to help out with that one it's more than appreciated.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
using System;
|
||||
using Server;
|
||||
using Server.Misc;
|
||||
using Server.Network;
|
||||
using System.Collections;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class DeceitBrazier : Item
|
||||
{
|
||||
private Timer m_Timer;
|
||||
private bool m_CanTalk;
|
||||
private int m_SpawnRange;
|
||||
private DateTime m_LastUse = DateTime.MinValue;
|
||||
private TimeSpan m_Delay;
|
||||
private DateTime m_NextUse;
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor, AccessLevel.GameMaster )]
|
||||
public DateTime LastUse
|
||||
{
|
||||
get{ return m_LastUse; }
|
||||
set{ m_LastUse = value; }
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public DateTime NextUse
|
||||
{
|
||||
get { return m_NextUse; }
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public TimeSpan Delay
|
||||
{
|
||||
get { return m_Delay; }
|
||||
set
|
||||
{
|
||||
m_NextUse = m_NextUse - m_Delay;
|
||||
m_Delay = value;
|
||||
m_NextUse = m_NextUse + m_Delay;
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public bool CanTalk
|
||||
{
|
||||
get{ return m_CanTalk; }
|
||||
set
|
||||
{
|
||||
m_CanTalk = value;
|
||||
}
|
||||
}
|
||||
|
||||
private static Type[] m_Creatures = new Type[]
|
||||
{
|
||||
#region Animals
|
||||
typeof( FireSteed ), //Set the tents up people!
|
||||
#endregion
|
||||
|
||||
#region Undead
|
||||
typeof( Skeleton ), typeof( SkeletalKnight ), typeof( SkeletalMage ), typeof( Mummy ),
|
||||
typeof( BoneKnight ), typeof( Lich ), typeof( LichLord ), typeof( BoneMagi ),
|
||||
typeof( Wraith ), typeof( Shade ), typeof( Spectre ), typeof( Zombie ),
|
||||
typeof( RottingCorpse ), typeof( Ghoul ),
|
||||
#endregion
|
||||
|
||||
#region Demons
|
||||
typeof( Balron ), typeof( Daemon ), typeof( Imp ), typeof( GreaterMongbat ),
|
||||
typeof( Mongbat ), typeof( IceFiend ), typeof( Gargoyle ), typeof( StoneGargoyle ),
|
||||
typeof( FireGargoyle ), typeof( HordeMinion ),
|
||||
#endregion
|
||||
|
||||
#region Gazers
|
||||
typeof( Gazer ), typeof( ElderGazer ), typeof( GazerLarva ),
|
||||
#endregion
|
||||
|
||||
#region Uncategorized
|
||||
typeof( Harpy ), typeof( StoneHarpy ), typeof( HeadlessOne ), typeof( HellHound ),
|
||||
typeof( HellCat ), typeof( Phoenix ), typeof( LavaLizard ), typeof( SandVortex ),
|
||||
typeof( ShadowWisp ), typeof( SwampTentacle ), typeof( PredatorHellCat ), typeof( Wisp ),
|
||||
#endregion
|
||||
|
||||
#region Arachnid
|
||||
typeof( GiantSpider ), typeof( DreadSpider ), typeof( FrostSpider ), typeof( Scorpion ),
|
||||
#endregion
|
||||
|
||||
#region Repond
|
||||
typeof( ArcticOgreLord ), typeof( Cyclops ), typeof( Ettin ), typeof( EvilMage ),
|
||||
typeof( FrostTroll ), typeof( Ogre ), typeof( OgreLord ), typeof( Orc ),
|
||||
typeof( OrcishLord ), typeof( OrcishMage ), typeof( OrcBrute ), typeof( Ratman ),
|
||||
typeof( RatmanMage ), typeof( OrcCaptain ), typeof( Troll ), typeof( Titan ),
|
||||
typeof( EvilMageLord ), typeof( OrcBomber ), typeof( RatmanArcher ),
|
||||
#endregion
|
||||
|
||||
#region Reptilian
|
||||
typeof( Dragon ), typeof( Drake ), typeof( Snake ), typeof( GreaterDragon ),
|
||||
typeof( IceSerpent ), typeof( GiantSerpent ), typeof( IceSnake ), typeof( LavaSerpent ),
|
||||
typeof( Lizardman ), typeof( Wyvern ), typeof( WhiteWyrm ),
|
||||
typeof( ShadowWyrm ), typeof( SilverSerpent ), typeof( LavaSnake ),
|
||||
#endregion
|
||||
|
||||
#region Elementals
|
||||
typeof( EarthElemental ), typeof( PoisonElemental ), typeof( FireElemental ), typeof( SnowElemental ),
|
||||
typeof( IceElemental ), typeof( ToxicElemental ), typeof( WaterElemental ), typeof( Efreet ),
|
||||
typeof( AirElemental ), typeof( Golem ),
|
||||
#endregion
|
||||
|
||||
#region Random Critters
|
||||
typeof( Sewerrat ), typeof( GiantRat ), typeof( DireWolf ), typeof( TimberWolf ),
|
||||
typeof( Cougar ), typeof( Alligator )
|
||||
#endregion
|
||||
};
|
||||
|
||||
public static Type[] Creatures { get { return m_Creatures; } }
|
||||
|
||||
public override int LabelNumber{ get{ return 1023633; } } // Brazier
|
||||
|
||||
[Constructable]
|
||||
public DeceitBrazier() : base( 0xE31 )
|
||||
{
|
||||
Movable = false;
|
||||
Light = LightType.Circle225;
|
||||
}
|
||||
|
||||
public DeceitBrazier( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
if ( from.InRange( GetWorldLocation(), 2 ) )
|
||||
{
|
||||
Mobile m = null;
|
||||
try
|
||||
{
|
||||
if(m_NextUse <= DateTime.Now)
|
||||
{
|
||||
Map map = Map;
|
||||
m = Activator.CreateInstance( m_Creatures[Utility.Random( m_Creatures.Length )] ) as Mobile;
|
||||
|
||||
Point3D loc = ( GetSpawnPosition() );
|
||||
|
||||
m.MoveToWorld( loc, map );
|
||||
Effects.SendLocationParticles( EffectItem.Create( m.Location, m.Map, EffectItem.DefaultDuration ), 0x3709, 10, 30, 5052 );
|
||||
|
||||
m_LastUse = DateTime.Now;
|
||||
m_NextUse = DateTime.Now + m_Delay;
|
||||
}
|
||||
else if ( m_NextUse > DateTime.Now )
|
||||
{
|
||||
PublicOverheadMessage( MessageType.Regular, 0x3B2, 500760 ); // The brazier fizzes and pops, but nothing seems to happen.
|
||||
}
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage( 500446 ); // That is too far away.
|
||||
}
|
||||
}
|
||||
|
||||
private void TalkAgain()
|
||||
{
|
||||
if( m_NextUse <= DateTime.Now )
|
||||
m_CanTalk = true;
|
||||
}
|
||||
|
||||
public Point3D GetSpawnPosition()
|
||||
{
|
||||
m_SpawnRange = 6;
|
||||
Map map = Map;
|
||||
|
||||
int x = Location.X + (Utility.Random( (m_SpawnRange * 2) + 1 ) - m_SpawnRange);
|
||||
int y = Location.Y + (Utility.Random( (m_SpawnRange * 2) + 1 ) - m_SpawnRange);
|
||||
|
||||
return new Point3D( x, y, this.Z );
|
||||
}
|
||||
|
||||
public override bool HandlesOnMovement{ get{ return true; } }
|
||||
|
||||
public override void OnMovement(Mobile m, Point3D oldLocation)
|
||||
{
|
||||
if ( m.InRange( this, 1 ) && m.Player && m_NextUse <= DateTime.Now && !( m.AccessLevel > AccessLevel.Player && m.Hidden ) && m_CanTalk )
|
||||
{
|
||||
PublicOverheadMessage( MessageType.Regular, 0x3B2, 500761 ); // Heed this warning well, and use this brazier at your own peril.
|
||||
base.OnMovement( m, oldLocation );
|
||||
|
||||
m_Timer = Timer.DelayCall( TimeSpan.FromMinutes( 15 ), new TimerCallback( TalkAgain ) );
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
|
||||
writer.Write( (bool) m_CanTalk );
|
||||
|
||||
writer.Write( (DateTime)m_LastUse );
|
||||
writer.Write( (DateTime)m_NextUse );
|
||||
writer.Write( (int)m_SpawnRange );
|
||||
writer.Write( (TimeSpan)m_Delay );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
m_CanTalk = reader.ReadBool();
|
||||
m_LastUse = reader.ReadDateTime();
|
||||
m_NextUse = reader.ReadDateTime();
|
||||
m_SpawnRange = reader.ReadInt();
|
||||
m_Delay = reader.ReadTimeSpan();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -62,10 +62,11 @@ namespace Server.Items
|
|||
{
|
||||
if ( !CheckUse( this, from ) )
|
||||
return;
|
||||
|
||||
if ( m_Command == DecorateCommand.None )
|
||||
|
||||
if ( from.FindGump( typeof( InteriorDecorator.InternalGump ) ) == null )
|
||||
from.SendGump( new InternalGump( this ) );
|
||||
else
|
||||
|
||||
if ( m_Command != DecorateCommand.None )
|
||||
from.Target = new InternalTarget( this );
|
||||
}
|
||||
|
||||
|
|
@ -99,13 +100,13 @@ namespace Server.Items
|
|||
|
||||
AddBackground( 0, 0, 200, 200, 2600 );
|
||||
|
||||
AddButton( 50, 45, 2152, 2154, 1, GumpButtonType.Reply, 0 );
|
||||
AddButton( 50, 45, ( decorator.Command == DecorateCommand.Turn ? 2154 : 2152 ), 2154, 1, GumpButtonType.Reply, 0 );
|
||||
AddHtmlLocalized( 90, 50, 70, 40, 1018323, false, false ); // Turn
|
||||
|
||||
AddButton( 50, 95, 2152, 2154, 2, GumpButtonType.Reply, 0 );
|
||||
AddButton( 50, 95, ( decorator.Command == DecorateCommand.Up ? 2154 : 2152 ), 2154, 2, GumpButtonType.Reply, 0 );
|
||||
AddHtmlLocalized( 90, 100, 70, 40, 1018324, false, false ); // Up
|
||||
|
||||
AddButton( 50, 145, 2152, 2154, 3, GumpButtonType.Reply, 0 );
|
||||
AddButton( 50, 145, ( decorator.Command == DecorateCommand.Down ? 2154 : 2152 ), 2154, 3, GumpButtonType.Reply, 0 );
|
||||
AddHtmlLocalized( 90, 150, 70, 40, 1018325, false, false ); // Down
|
||||
}
|
||||
|
||||
|
|
@ -123,8 +124,11 @@ namespace Server.Items
|
|||
if ( command != DecorateCommand.None )
|
||||
{
|
||||
m_Decorator.Command = command;
|
||||
sender.Mobile.SendGump( new InternalGump( m_Decorator ) );
|
||||
sender.Mobile.Target = new InternalTarget( m_Decorator );
|
||||
}
|
||||
else
|
||||
Target.Cancel( sender.Mobile );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -146,15 +150,16 @@ namespace Server.Items
|
|||
|
||||
protected override void OnTarget( Mobile from, object targeted )
|
||||
{
|
||||
if ( targeted == m_Decorator )
|
||||
{
|
||||
m_Decorator.Command = DecorateCommand.None;
|
||||
from.SendGump( new InternalGump( m_Decorator ) );
|
||||
}
|
||||
else if ( targeted is Item && InteriorDecorator.CheckUse( m_Decorator, from ) )
|
||||
if ( targeted is Item && InteriorDecorator.CheckUse( m_Decorator, from ) )
|
||||
{
|
||||
BaseHouse house = BaseHouse.FindHouseAt( from );
|
||||
Item item = (Item)targeted;
|
||||
|
||||
bool isDecorableComponent = false;
|
||||
|
||||
if ( item is AddonComponent )
|
||||
if ( ((AddonComponent)item).Addon.Components.Count == 1 && Core.SE )
|
||||
isDecorableComponent = true;
|
||||
|
||||
if ( house == null || !house.IsCoOwner( from ) )
|
||||
{
|
||||
|
|
@ -164,9 +169,14 @@ namespace Server.Items
|
|||
{
|
||||
from.SendLocalizedMessage( 1042270 ); // That is not in your house.
|
||||
}
|
||||
else if ( !house.IsLockedDown( item ) && !house.IsSecure( item ) )
|
||||
else if ( !house.IsLockedDown( item ) && !house.IsSecure( item ) && !isDecorableComponent )
|
||||
{
|
||||
from.SendLocalizedMessage( 1042271 ); // That is not locked down.
|
||||
if ( item is AddonComponent && m_Decorator.Command == DecorateCommand.Up )
|
||||
from.SendLocalizedMessage( 1042274 ); // You cannot raise it up any higher.
|
||||
else if ( item is AddonComponent && m_Decorator.Command == DecorateCommand.Down )
|
||||
from.SendLocalizedMessage( 1042275 ); // You cannot lower it down any further.
|
||||
else
|
||||
from.SendLocalizedMessage( 1042271 ); // That is not locked down.
|
||||
}
|
||||
else if ( item is VendorRentalContract )
|
||||
{
|
||||
|
|
@ -186,6 +196,14 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
from.Target = new InternalTarget( m_Decorator );
|
||||
}
|
||||
|
||||
protected override void OnTargetCancel( Mobile from, TargetCancelType cancelType )
|
||||
{
|
||||
if ( cancelType == TargetCancelType.Canceled )
|
||||
from.CloseGump( typeof( InteriorDecorator.InternalGump ) );
|
||||
}
|
||||
|
||||
private static void Turn( Item item, Mobile from )
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ using System;
|
|||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class BlankScroll : Item
|
||||
public class BlankScroll : Item, ICommodity
|
||||
{
|
||||
[Constructable]
|
||||
public BlankScroll() : this( 1 )
|
||||
|
|
@ -17,6 +17,16 @@ namespace Server.Items
|
|||
Amount = amount;
|
||||
}
|
||||
|
||||
string ICommodity.Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return String.Format( "blank scroll: {0}", Amount );
|
||||
}
|
||||
}
|
||||
|
||||
int ICommodity.DescriptionNumber { get { return LabelNumber; } }
|
||||
|
||||
public BlankScroll( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
|
|
|||
|
|
@ -215,7 +215,9 @@ namespace Server.Items
|
|||
|
||||
public void DropRune( Mobile from, RunebookEntry e, int index )
|
||||
{
|
||||
if ( m_DefaultIndex == index )
|
||||
if ( m_DefaultIndex > index )
|
||||
m_DefaultIndex -= 1;
|
||||
else if ( m_DefaultIndex == index )
|
||||
m_DefaultIndex = -1;
|
||||
|
||||
m_Entries.RemoveAt( index );
|
||||
|
|
@ -276,7 +278,7 @@ namespace Server.Items
|
|||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
if ( from.InRange( GetWorldLocation(), (Core.ML ? 3 : 1) ) )
|
||||
if ( from.InRange( GetWorldLocation(), (Core.ML ? 3 : 1) ) && CheckAccess( from ) )
|
||||
{
|
||||
if ( DateTime.Now < NextUse )
|
||||
{
|
||||
|
|
@ -328,9 +330,9 @@ namespace Server.Items
|
|||
{
|
||||
if ( dropped is RecallRune )
|
||||
{
|
||||
if ( !CheckAccess( from ) )
|
||||
if ( IsLockedDown && from.AccessLevel < AccessLevel.GameMaster )
|
||||
{
|
||||
from.SendLocalizedMessage( 502413 ); // That cannot be done while the book is locked down.
|
||||
from.SendLocalizedMessage( 502413, null, 0x35 ); // That cannot be done while the book is locked down.
|
||||
}
|
||||
else if ( IsOpen( from ) )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,7 +1,10 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
using Server.Multis;
|
||||
using Server.Targeting;
|
||||
using Server.ContextMenus;
|
||||
using Server.Gumps;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
|
|
@ -10,10 +13,11 @@ namespace Server.Items
|
|||
bool Dye( Mobile from, DyeTub sender );
|
||||
}
|
||||
|
||||
public class DyeTub : Item
|
||||
public class DyeTub : Item, ISecurable
|
||||
{
|
||||
private bool m_Redyable;
|
||||
private int m_DyedHue;
|
||||
private SecureLevel m_SecureLevel;
|
||||
|
||||
public virtual CustomHuePicker CustomHuePicker{ get{ return null; } }
|
||||
|
||||
|
|
@ -46,8 +50,9 @@ namespace Server.Items
|
|||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
|
||||
writer.Write( (int) 1 ); // version
|
||||
|
||||
writer.Write( (int)m_SecureLevel );
|
||||
writer.Write( (bool) m_Redyable );
|
||||
writer.Write( (int) m_DyedHue );
|
||||
}
|
||||
|
|
@ -60,6 +65,11 @@ namespace Server.Items
|
|||
|
||||
switch ( version )
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
m_SecureLevel = (SecureLevel)reader.ReadInt();
|
||||
goto case 0;
|
||||
}
|
||||
case 0:
|
||||
{
|
||||
m_Redyable = reader.ReadBool();
|
||||
|
|
@ -99,6 +109,19 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public SecureLevel Level
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_SecureLevel;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_SecureLevel = value;
|
||||
}
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public DyeTub() : base( 0xFAB )
|
||||
|
|
@ -106,6 +129,12 @@ namespace Server.Items
|
|||
Weight = 10.0;
|
||||
m_Redyable = true;
|
||||
}
|
||||
|
||||
public override void GetContextMenuEntries( Mobile from, List<ContextMenuEntry> list )
|
||||
{
|
||||
base.GetContextMenuEntries( from, list );
|
||||
SetSecureLevelEntry.AddTo( from, this, list );
|
||||
}
|
||||
|
||||
public DyeTub( Serial serial ) : base( serial )
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue