- Added the [Message command to send players a page reply style message. - Added a more robust version of the [DesignInsert command, supporting the [Area modifier and conditionals, and only allowing insertion of Static items unless otherwise specified (using [DesignInsert true). Items can also be inserted into multiple house plots at the same time. - Added the ObjectTypes check to the [Serial command implementor, fixing potential server crashes on invalid casts. - Grammar fixes for page gump replies. - Removed the runebook use delay for Core.SA. - Ridgeback, SavageRidgeback and ScaledSwampDragon now override bonding requirements. - Added a PlayerMobile type check to BaseVendor.OnDragDrop to prevent invalid casts. - Players can now return filled bulk orders without having any points in the bulk order crafting skill. - Added ArcaneFocus constructor overloads to make it addable in game.
67 lines
No EOL
1.6 KiB
C#
67 lines
No EOL
1.6 KiB
C#
using System;
|
|
using Server;
|
|
|
|
namespace Server.Items
|
|
{
|
|
public class ArcaneFocus : TransientItem
|
|
{
|
|
public override int LabelNumber { get { return 1032629; } } // Arcane Focus
|
|
|
|
private int m_StrengthBonus;
|
|
|
|
[CommandProperty( AccessLevel.GameMaster )]
|
|
public int StrengthBonus
|
|
{
|
|
get { return m_StrengthBonus; }
|
|
set { m_StrengthBonus = value; }
|
|
}
|
|
|
|
[Constructable]
|
|
public ArcaneFocus()
|
|
: this( TimeSpan.FromHours( 1 ), 1 )
|
|
{
|
|
}
|
|
|
|
[Constructable]
|
|
public ArcaneFocus( int lifeSpan, int strengthBonus )
|
|
: this( TimeSpan.FromSeconds( lifeSpan ), strengthBonus )
|
|
{
|
|
}
|
|
|
|
public ArcaneFocus( TimeSpan lifeSpan, int strengthBonus ) : base( 0x3155, lifeSpan )
|
|
{
|
|
LootType = LootType.Blessed;
|
|
m_StrengthBonus = strengthBonus;
|
|
}
|
|
|
|
public ArcaneFocus( Serial serial ) : base( serial )
|
|
{
|
|
}
|
|
|
|
public override void GetProperties( ObjectPropertyList list )
|
|
{
|
|
base.GetProperties( list );
|
|
|
|
list.Add( 1060485, m_StrengthBonus.ToString() ); // strength bonus ~1_val~
|
|
}
|
|
|
|
public override TextDefinition InvalidTransferMessage{ get { return 1073480; } } // Your arcane focus disappears.
|
|
public override bool Nontransferable { get { return true; } }
|
|
|
|
public override void Serialize( GenericWriter writer )
|
|
{
|
|
base.Serialize( writer );
|
|
writer.Write( (int)0 );
|
|
|
|
writer.Write( m_StrengthBonus );
|
|
}
|
|
|
|
public override void Deserialize( GenericReader reader )
|
|
{
|
|
base.Deserialize( reader );
|
|
int version = reader.ReadInt();
|
|
|
|
m_StrengthBonus = reader.ReadInt();
|
|
}
|
|
}
|
|
} |