This commit is contained in:
parent
8ff1a903a0
commit
14873aaa3e
78 changed files with 360 additions and 231 deletions
|
|
@ -81,6 +81,9 @@ namespace Server.Commands
|
|||
|
||||
public Item Construct()
|
||||
{
|
||||
if ( m_Type == null )
|
||||
return null;
|
||||
|
||||
Item item;
|
||||
|
||||
try
|
||||
|
|
|
|||
|
|
@ -78,6 +78,9 @@ namespace Server.Commands
|
|||
|
||||
public Item Construct()
|
||||
{
|
||||
if ( m_Type == null )
|
||||
return null;
|
||||
|
||||
Item item;
|
||||
|
||||
try
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ using System.Collections;
|
|||
using Server;
|
||||
using Server.Items;
|
||||
using System.Collections.Generic;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.BulkOrders
|
||||
{
|
||||
|
|
@ -117,9 +118,19 @@ namespace Server.Engines.BulkOrders
|
|||
list.Add( 1060658 + i, "#{0}\t{1}", m_Entries[i].Details.Number, m_Entries[i].Amount ); // ~1_val~: ~2_val~
|
||||
}
|
||||
|
||||
public override void OnDoubleClickNotAccessible( Mobile from )
|
||||
{
|
||||
OnDoubleClick( from );
|
||||
}
|
||||
|
||||
public override void OnDoubleClickSecureTrade( Mobile from )
|
||||
{
|
||||
OnDoubleClick( from );
|
||||
}
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
if ( IsChildOf( from.Backpack ) )
|
||||
if ( IsChildOf( from.Backpack ) || InSecureTrade || RootParent is PlayerVendor )
|
||||
from.SendGump( new LargeBODGump( from, this ) );
|
||||
else
|
||||
from.SendLocalizedMessage( 1045156 ); // You must have the deed in your backpack to use it.
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ using System.Collections;
|
|||
using Server;
|
||||
using Server.Items;
|
||||
using System.Collections.Generic;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.BulkOrders
|
||||
{
|
||||
|
|
@ -96,12 +97,22 @@ namespace Server.Engines.BulkOrders
|
|||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
if ( IsChildOf( from.Backpack ) )
|
||||
if ( IsChildOf( from.Backpack ) || InSecureTrade || RootParent is PlayerVendor )
|
||||
from.SendGump( new SmallBODGump( from, this ) );
|
||||
else
|
||||
from.SendLocalizedMessage( 1045156 ); // You must have the deed in your backpack to use it.
|
||||
}
|
||||
|
||||
public override void OnDoubleClickNotAccessible( Mobile from )
|
||||
{
|
||||
OnDoubleClick( from );
|
||||
}
|
||||
|
||||
public override void OnDoubleClickSecureTrade( Mobile from )
|
||||
{
|
||||
OnDoubleClick( from );
|
||||
}
|
||||
|
||||
public void BeginCombine( Mobile from )
|
||||
{
|
||||
if ( m_AmountCur < m_AmountMax )
|
||||
|
|
|
|||
|
|
@ -1682,6 +1682,8 @@ namespace Server.Engines.ConPVP
|
|||
mob.MeleeDamageAbsorb = 0;
|
||||
Spells.Second.ProtectionSpell.Registry.Remove( mob );
|
||||
|
||||
Spells.Fourth.ArchProtectionSpell.RemoveEntry( mob );
|
||||
|
||||
mob.EndAction( typeof( DefensiveSpell ) );
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -81,7 +81,6 @@ namespace Server.Engines.Craft
|
|||
m_Recipe = new Recipe( id, system, this );
|
||||
}
|
||||
|
||||
|
||||
private static Dictionary<Type, int> _itemIds = new Dictionary<Type, int>();
|
||||
|
||||
public static int ItemIDOf( Type type ) {
|
||||
|
|
@ -396,11 +395,6 @@ namespace Server.Engines.Craft
|
|||
|
||||
public bool RetainsColorFrom( CraftSystem system, Type type )
|
||||
{
|
||||
if (DefTailoring.IsNonColorable(m_Type))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( system.RetainsColorFrom( this, type ) )
|
||||
return true;
|
||||
|
||||
|
|
|
|||
|
|
@ -316,6 +316,10 @@ namespace Server.Engines.Craft
|
|||
{
|
||||
number = 1044275; // The item must be in your backpack to repair it.
|
||||
}
|
||||
else if ( !Core.AOS && weapon.PoisonCharges != 0 )
|
||||
{
|
||||
number = 1005012; // You cannot repair an item while a caustic substance is on it.
|
||||
}
|
||||
else if ( weapon.MaxHitPoints <= 0 || weapon.HitPoints == weapon.MaxHitPoints )
|
||||
{
|
||||
number = 1044281; // That item is in full repair
|
||||
|
|
|
|||
|
|
@ -48,6 +48,10 @@ namespace Server.Engines.Craft
|
|||
{
|
||||
try
|
||||
{
|
||||
|
||||
if ( Ethics.Ethic.IsImbued( item ) )
|
||||
return SmeltResult.Invalid;
|
||||
|
||||
if ( CraftResources.GetType( resource ) != CraftResourceType.Metal )
|
||||
return SmeltResult.Invalid;
|
||||
|
||||
|
|
@ -122,7 +126,7 @@ namespace Server.Engines.Craft
|
|||
else if ( !forge )
|
||||
num = 1044265; // You must be near a forge.
|
||||
}
|
||||
|
||||
|
||||
from.SendGump( new CraftGump( from, m_CraftSystem, m_Tool, num ) );
|
||||
}
|
||||
else
|
||||
|
|
@ -154,7 +158,7 @@ namespace Server.Engines.Craft
|
|||
case SmeltResult.NoSkill: message = 1044269; break; // You have no idea how to work this metal.
|
||||
case SmeltResult.Success: message = isStoreBought ? 500418 : 1044270; break; // You melt the item down into ingots.
|
||||
}
|
||||
|
||||
|
||||
from.SendGump( new CraftGump( from, m_CraftSystem, m_Tool, message ) );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -231,7 +231,6 @@ namespace Server.Engines.Craft
|
|||
|
||||
if( Core.SE )
|
||||
{
|
||||
|
||||
index = AddCraft( typeof( PlateMempo ), 1011078, 1030180, 80.0, 130.0, typeof( IronIngot ), 1044036, 18, 1044037 );
|
||||
SetNeededExpansion( index, Expansion.SE );
|
||||
|
||||
|
|
@ -256,7 +255,7 @@ namespace Server.Engines.Craft
|
|||
AddCraft( typeof( Helmet ), 1011079, 1025130, 37.9, 87.9, typeof( IronIngot ), 1044036, 15, 1044037 );
|
||||
AddCraft( typeof( NorseHelm ), 1011079, 1025134, 37.9, 87.9, typeof( IronIngot ), 1044036, 15, 1044037 );
|
||||
AddCraft( typeof( PlateHelm ), 1011079, 1025138, 62.6, 112.6, typeof( IronIngot ), 1044036, 15, 1044037 );
|
||||
|
||||
|
||||
if( Core.SE )
|
||||
{
|
||||
index = AddCraft( typeof( ChainHatsuburi ), 1011079, 1030175, 30.0, 80.0, typeof( IronIngot ), 1044036, 20, 1044037 );
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ namespace Server.Engines.Craft
|
|||
AddCraft( typeof( EmptyVialsWRack ), 1044050, 1044616, 65.0, 115.0, typeof( Sand ), 1044625, 8, 1044627 );
|
||||
AddCraft( typeof( FullVialsWRack ), 1044050, 1044617, 65.0, 115.0, typeof( Sand ), 1044625, 9, 1044627 );
|
||||
AddCraft( typeof( SpinningHourglass ), 1044050, 1044618, 75.0, 125.0, typeof( Sand ), 1044625, 10, 1044627 );
|
||||
|
||||
|
||||
if ( Core.ML )
|
||||
{
|
||||
index = AddCraft( typeof( HollowPrism ), 1044050, 1072895, 100.0, 150.0, typeof( Sand ), 1044625, 8, 1044627 );
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ namespace Server.Engines.Craft
|
|||
// Decorations
|
||||
AddCraft( typeof( Vase ), 1044501, 1022888, 52.5, 102.5, typeof( Granite ), 1044514, 1, 1044513 );
|
||||
AddCraft( typeof( LargeVase ), 1044501, 1022887, 52.5, 102.5, typeof( Granite ), 1044514, 3, 1044513 );
|
||||
|
||||
|
||||
if( Core.SE )
|
||||
{
|
||||
int index = AddCraft( typeof( SmallUrn ), 1044501, 1029244, 82.0, 132.0, typeof( Granite ), 1044514, 3, 1044513 );
|
||||
|
|
|
|||
|
|
@ -49,24 +49,6 @@ namespace Server.Engines.Craft
|
|||
return 0;
|
||||
}
|
||||
|
||||
public static bool IsNonColorable(Type type)
|
||||
{
|
||||
for (int i = 0; i < m_TailorNonColorables.Length; ++i)
|
||||
{
|
||||
if (m_TailorNonColorables[i] == type)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private static Type[] m_TailorNonColorables = new Type[]
|
||||
{
|
||||
typeof( OrcHelm )
|
||||
};
|
||||
|
||||
private static Type[] m_TailorColorables = new Type[]
|
||||
{
|
||||
typeof( GozaMatEastDeed ), typeof( GozaMatSouthDeed ),
|
||||
|
|
|
|||
|
|
@ -201,7 +201,7 @@ namespace Server.Engines.Craft
|
|||
AddCraft( typeof( BarrelHoops ), 1044047, 1024321, -15.0, 35.0, typeof( IronIngot ), 1044036, 5, 1044037 );
|
||||
AddCraft( typeof( Hinge ), 1044047, 1024181, 5.0, 55.0, typeof( IronIngot ), 1044036, 2, 1044037 );
|
||||
AddCraft( typeof( BolaBall ), 1044047, 1023699, 45.0, 95.0, typeof( IronIngot ), 1044036, 10, 1044037 );
|
||||
|
||||
|
||||
if ( Core.ML )
|
||||
{
|
||||
index = AddCraft( typeof( JeweledFiligree ), 1044047, 1072894, 70.0, 110.0, typeof( IronIngot ), 1044036, 2, 1044037 );
|
||||
|
|
@ -209,7 +209,6 @@ namespace Server.Engines.Craft
|
|||
AddRes( index, typeof( Ruby ), 1044234, 1, 1044253 );
|
||||
SetNeededExpansion( index, Expansion.ML );
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Utensils
|
||||
|
|
@ -256,7 +255,6 @@ namespace Server.Engines.Craft
|
|||
|
||||
index = AddCraft( typeof( FancyWindChimes ), 1044050, 1030291, 80.0, 130.0, typeof( IronIngot ), 1044036, 15, 1044037 );
|
||||
SetNeededExpansion( index, Expansion.SE );
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ using System;
|
|||
using Server;
|
||||
using Server.Gumps;
|
||||
using Server.Mobiles;
|
||||
using Server.Multis;
|
||||
using Server.Network;
|
||||
using Server.Targeting;
|
||||
using System.Collections.Generic;
|
||||
|
|
@ -255,6 +256,9 @@ namespace Server.Factions
|
|||
{
|
||||
m_From.SendLocalizedMessage( 1010306 ); // You currently have too many of this enhancement type to place another
|
||||
}
|
||||
else if ( BaseBoat.FindBoatAt( m_From.Location, m_From.Map ) != null ) {
|
||||
m_From.SendMessage( "You cannot place a vendor here" );
|
||||
}
|
||||
else if ( m_Town.Silver >= vendorList.Definition.Price )
|
||||
{
|
||||
BaseFactionVendor vendor = vendorList.Construct( m_Town, m_Faction );
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ using System;
|
|||
using Server;
|
||||
using Server.Gumps;
|
||||
using Server.Mobiles;
|
||||
using Server.Multis;
|
||||
using Server.Network;
|
||||
using Server.Targeting;
|
||||
using System.Collections.Generic;
|
||||
|
|
@ -157,6 +158,9 @@ namespace Server.Factions
|
|||
{
|
||||
m_From.SendLocalizedMessage( 1010306 ); // You currently have too many of this enhancement type to place another
|
||||
}
|
||||
else if ( BaseBoat.FindBoatAt( m_From.Location, m_From.Map ) != null ) {
|
||||
m_From.SendMessage( "You cannot place a guard here" );
|
||||
}
|
||||
else if ( m_Town.Silver >= guardList.Definition.Price )
|
||||
{
|
||||
BaseFactionGuard guard = guardList.Construct();
|
||||
|
|
|
|||
|
|
@ -135,7 +135,13 @@ namespace Server.Engines.Harvest
|
|||
public override bool CheckHarvest( Mobile from, Item tool )
|
||||
{
|
||||
if ( !base.CheckHarvest( from, tool ) )
|
||||
return false;
|
||||
return false;
|
||||
|
||||
if ( tool.Parent != from )
|
||||
{
|
||||
from.SendLocalizedMessage( 500487 ); // The axe must be equipped for any serious wood chopping.
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,20 +10,20 @@ namespace Server.Engines.MyRunUO
|
|||
public static bool Enabled = false;
|
||||
|
||||
// Details required for database connection string
|
||||
public static string DatabaseDriver = "{MySQL ODBC 3.51 Driver}";
|
||||
public static string DatabaseServer = "localhost";
|
||||
public static string DatabaseName = "MyRunUO";
|
||||
public static string DatabaseUserID = "username";
|
||||
public static string DatabasePassword = "password";
|
||||
public const string DatabaseDriver = "{MySQL ODBC 3.51 Driver}";
|
||||
public const string DatabaseServer = "localhost";
|
||||
public const string DatabaseName = "MyRunUO";
|
||||
public const string DatabaseUserID = "username";
|
||||
public const string DatabasePassword = "password";
|
||||
|
||||
// Should the database use transactions? This is recommended
|
||||
public static bool UseTransactions = true;
|
||||
public const bool UseTransactions = true;
|
||||
|
||||
// Use optimized table loading techniques? (LOAD DATA INFILE)
|
||||
public static bool LoadDataInFile = true;
|
||||
public const bool LoadDataInFile = true;
|
||||
|
||||
// This must be enabled if the database server is on a remote machine.
|
||||
public static bool DatabaseNonLocal = ( DatabaseServer != "localhost" );
|
||||
public const bool DatabaseNonLocal = ( DatabaseServer != "localhost" );
|
||||
|
||||
// Text encoding used
|
||||
public static Encoding EncodingIO = Encoding.ASCII;
|
||||
|
|
|
|||
|
|
@ -248,7 +248,7 @@ namespace Server.Engines.VeteranRewards
|
|||
|
||||
public static int GetRewardYearLabel( Item item, object[] args )
|
||||
{
|
||||
int level = GetRewardYear( item, args );
|
||||
int level = GetRewardYear( item, args );
|
||||
|
||||
return 1076216 + ( ( level < 10 ) ? level : ( level < 12 ) ? (( level - 9 ) + 4240 ) : (( level - 11 ) + 37585 ) );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ namespace Server.Gumps
|
|||
ai.CanReportMurder = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ( ai.Attacker.Player && (DateTime.Now - ai.LastCombatTime) < TimeSpan.FromSeconds( 30.0 ) && !toGive.Contains( ai.Attacker ) )
|
||||
toGive.Add( ai.Attacker );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ namespace Server.Gumps
|
|||
}
|
||||
else
|
||||
{
|
||||
m_Info.Level = level;
|
||||
m_Info.Level = level;
|
||||
state.Mobile.SendLocalizedMessage( 1061280 ); // New access level set.
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ namespace Server.Items
|
|||
|
||||
public override ArmorMaterialType MaterialType{ get{ return ArmorMaterialType.Leather; } }
|
||||
public override CraftResource DefaultResource{ get{ return CraftResource.RegularLeather; } }
|
||||
|
||||
|
||||
public override ArmorMeditationAllowance DefMedAllowance{ get{ return ArmorMeditationAllowance.None; } }
|
||||
|
||||
[Constructable]
|
||||
|
|
@ -38,7 +38,7 @@ namespace Server.Items
|
|||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( (int) 0 );
|
||||
writer.Write( (int) 1 );
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
|
|
@ -46,9 +46,9 @@ namespace Server.Items
|
|||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
|
||||
if( version == 0 && Weight == 1 )
|
||||
if( version == 0 && ( Weight == 1 || Weight == 5 ) )
|
||||
{
|
||||
Weight = 5;
|
||||
Weight = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -753,8 +753,8 @@ namespace Server.Items
|
|||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
if ( Hue != 0x8A4 )
|
||||
Hue = 0x8A4;
|
||||
/*if ( Hue != 0x8A4 )
|
||||
Hue = 0x8A4;*/
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -813,8 +813,8 @@ namespace Server.Items
|
|||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
if ( Hue != 0 && (Hue < 2101 || Hue > 2130) )
|
||||
Hue = GetRandomHue();
|
||||
/*if ( Hue != 0 && (Hue < 2101 || Hue > 2130) )
|
||||
Hue = GetRandomHue();*/
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
using System;
|
||||
using Server.Gumps;
|
||||
using Server.Misc;
|
||||
using Server.Network;
|
||||
using Server.Prompts;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
|
|
@ -15,7 +16,7 @@ namespace Server.Items
|
|||
[Constructable]
|
||||
public NameChangeDeed() : base( 0x14F0 )
|
||||
{
|
||||
base.Weight = 1.0;
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
|
||||
public NameChangeDeed( Serial serial ) : base( serial )
|
||||
|
|
@ -38,9 +39,91 @@ namespace Server.Items
|
|||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
// Do namechange
|
||||
if ( this.RootParent == from )
|
||||
{
|
||||
from.CloseGump( typeof( NameChangeDeedGump ) );
|
||||
from.SendGump( new NameChangeDeedGump( this ) );
|
||||
}
|
||||
else
|
||||
from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class NameChangeDeedGump : Gump
|
||||
{
|
||||
Item m_Sender;
|
||||
|
||||
public void AddBlackAlpha( int x, int y, int width, int height )
|
||||
{
|
||||
AddImageTiled( x, y, width, height, 2624 );
|
||||
AddAlphaRegion( x, y, width, height );
|
||||
}
|
||||
|
||||
public void AddTextField( int x, int y, int width, int height, int index )
|
||||
{
|
||||
AddBackground( x - 2, y - 2, width + 4, height + 4, 0x2486 );
|
||||
AddTextEntry( x + 2, y + 2, width - 4, height - 4, 0, index, "" );
|
||||
}
|
||||
|
||||
public string Center( string text )
|
||||
{
|
||||
return String.Format( "<CENTER>{0}</CENTER>", text );
|
||||
}
|
||||
|
||||
public string Color( string text, int color )
|
||||
{
|
||||
return String.Format( "<BASEFONT COLOR=#{0:X6}>{1}</BASEFONT>", color, text );
|
||||
}
|
||||
|
||||
public void AddButtonLabeled( int x, int y, int buttonID, string text )
|
||||
{
|
||||
AddButton( x, y - 1, 4005, 4007, buttonID, GumpButtonType.Reply, 0 );
|
||||
AddHtml( x + 35, y, 240, 20, Color( text, 0xFFFFFF ), false, false );
|
||||
}
|
||||
|
||||
public NameChangeDeedGump( Item sender ) : base( 50, 50 )
|
||||
{
|
||||
m_Sender = sender;
|
||||
|
||||
Closable=true;
|
||||
Dragable=true;
|
||||
Resizable=false;
|
||||
|
||||
AddPage(0);
|
||||
|
||||
AddBlackAlpha( 10, 120, 250, 85 );
|
||||
AddHtml( 10, 125, 250, 20, Color( Center( "Name Change Deed" ), 0xFFFFFF ), false, false );
|
||||
|
||||
AddLabel( 73, 15, 1152, "" );
|
||||
AddLabel( 20, 150, 0x480, "New Name:" );
|
||||
AddTextField( 100, 150, 150, 20, 0 );
|
||||
|
||||
AddButtonLabeled( 75, 180, 1, "Submit" );
|
||||
}
|
||||
|
||||
public override void OnResponse( NetState sender, RelayInfo info )
|
||||
{
|
||||
if ( m_Sender == null || m_Sender.Deleted || info.ButtonID != 1 || m_Sender.RootParent != sender.Mobile )
|
||||
return;
|
||||
|
||||
Mobile m = sender.Mobile;
|
||||
TextRelay nameEntry = info.GetTextEntry( 0 );
|
||||
|
||||
string newName = ( nameEntry == null ? null : nameEntry.Text.Trim() );
|
||||
|
||||
|
||||
if ( !NameVerification.Validate( newName, 2, 16, true, true, true, 1, NameVerification.SpaceDashPeriodQuote ) )
|
||||
{
|
||||
m.SendMessage( "That name is unacceptable." );
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
m.RawName = newName;
|
||||
m.SendMessage( "Your name has been changed!" );
|
||||
m.SendMessage( String.Format( "You are now known as {0}", newName ) );
|
||||
m_Sender.Delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -685,7 +685,10 @@ namespace Server.Items
|
|||
|
||||
from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 503019 ); // You successfully decode a treasure map!
|
||||
Decoder = from;
|
||||
LootType = LootType.Blessed;
|
||||
|
||||
if ( Core.AOS )
|
||||
LootType = LootType.Blessed;
|
||||
|
||||
DisplayTo( from );
|
||||
}
|
||||
|
||||
|
|
@ -887,10 +890,9 @@ namespace Server.Items
|
|||
break;
|
||||
}
|
||||
}
|
||||
if (m_Decoder != null && LootType == LootType.Regular)
|
||||
{
|
||||
|
||||
if ( Core.AOS && m_Decoder != null && LootType == LootType.Regular)
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -52,14 +52,16 @@ namespace Server.Items
|
|||
{
|
||||
EtherealMount.StopMounting( from );
|
||||
|
||||
Item one = from.FindItemOnLayer( Layer.OneHanded );
|
||||
Item two = from.FindItemOnLayer( Layer.TwoHanded );
|
||||
if ( Core.AOS ) {
|
||||
Item one = from.FindItemOnLayer( Layer.OneHanded );
|
||||
Item two = from.FindItemOnLayer( Layer.TwoHanded );
|
||||
|
||||
if ( one != null )
|
||||
from.AddToBackpack( one );
|
||||
if ( one != null )
|
||||
from.AddToBackpack( one );
|
||||
|
||||
if ( two != null )
|
||||
from.AddToBackpack( two );
|
||||
if ( two != null )
|
||||
from.AddToBackpack( two );
|
||||
}
|
||||
|
||||
from.Target = new BolaTarget( this );
|
||||
from.LocalOverheadMessage( MessageType.Emote, 0x3B2, 1049632 ); // * You begin to swing the bola...*
|
||||
|
|
@ -143,14 +145,16 @@ namespace Server.Items
|
|||
{
|
||||
EtherealMount.StopMounting( from );
|
||||
|
||||
Item one = from.FindItemOnLayer( Layer.OneHanded );
|
||||
Item two = from.FindItemOnLayer( Layer.TwoHanded );
|
||||
if ( Core.AOS ) {
|
||||
Item one = from.FindItemOnLayer( Layer.OneHanded );
|
||||
Item two = from.FindItemOnLayer( Layer.TwoHanded );
|
||||
|
||||
if ( one != null )
|
||||
from.AddToBackpack( one );
|
||||
if ( one != null )
|
||||
from.AddToBackpack( one );
|
||||
|
||||
if ( two != null )
|
||||
from.AddToBackpack( two );
|
||||
if ( two != null )
|
||||
from.AddToBackpack( two );
|
||||
}
|
||||
|
||||
from.DoHarmful( to );
|
||||
|
||||
|
|
|
|||
|
|
@ -34,9 +34,6 @@ namespace Server.Items
|
|||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
if ( Hue == 0 )
|
||||
Hue = 0x8AC;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -39,7 +39,7 @@ namespace Server.Items
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ( version < 1 )
|
||||
Stackable = Core.ML;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -134,13 +134,11 @@ namespace Server.Items
|
|||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
|
||||
|
||||
public bool Scissor( Mobile from, Scissors scissors )
|
||||
{
|
||||
if ( Deleted || !from.CanSee( this ) ) return false;
|
||||
|
||||
if ( !IsChildOf ( from.Backpack ) )
|
||||
if ( Core.AOS && !IsChildOf ( from.Backpack ) )
|
||||
{
|
||||
from.SendLocalizedMessage ( 502437 ); // Items you wish to cut must be in your backpack
|
||||
return false;
|
||||
|
|
@ -182,13 +180,11 @@ namespace Server.Items
|
|||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
|
||||
|
||||
public bool Scissor( Mobile from, Scissors scissors )
|
||||
{
|
||||
if ( Deleted || !from.CanSee( this ) ) return false;
|
||||
|
||||
if ( !IsChildOf ( from.Backpack ) )
|
||||
if ( Core.AOS && !IsChildOf ( from.Backpack ) )
|
||||
{
|
||||
from.SendLocalizedMessage ( 502437 ); // Items you wish to cut must be in your backpack
|
||||
return false;
|
||||
|
|
@ -231,13 +227,11 @@ namespace Server.Items
|
|||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
|
||||
|
||||
public bool Scissor( Mobile from, Scissors scissors )
|
||||
{
|
||||
if ( Deleted || !from.CanSee( this ) ) return false;
|
||||
|
||||
if ( !IsChildOf ( from.Backpack ) )
|
||||
if ( Core.AOS && !IsChildOf ( from.Backpack ) )
|
||||
{
|
||||
from.SendLocalizedMessage ( 502437 ); // Items you wish to cut must be in your backpack
|
||||
return false;
|
||||
|
|
@ -280,13 +274,11 @@ namespace Server.Items
|
|||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
|
||||
|
||||
public bool Scissor( Mobile from, Scissors scissors )
|
||||
{
|
||||
if ( Deleted || !from.CanSee( this ) ) return false;
|
||||
|
||||
if ( !IsChildOf ( from.Backpack ) )
|
||||
if ( Core.AOS && !IsChildOf ( from.Backpack ) )
|
||||
{
|
||||
from.SendLocalizedMessage ( 502437 ); // Items you wish to cut must be in your backpack
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -145,40 +145,33 @@ namespace Server.Items
|
|||
|
||||
if( 25 > Utility.Random( 100 ) ) // 25% chance to lower durability
|
||||
{
|
||||
if( Core.AOS && ArmorAttributes.SelfRepair > Utility.Random( 10 ) )
|
||||
{
|
||||
HitPoints += 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
int wear = Utility.Random( 2 );
|
||||
int wear = Utility.Random( 2 );
|
||||
|
||||
if( wear > 0 && MaxHitPoints > 0 )
|
||||
if( wear > 0 && MaxHitPoints > 0 )
|
||||
{
|
||||
if( HitPoints >= wear )
|
||||
{
|
||||
if( HitPoints >= wear )
|
||||
HitPoints -= wear;
|
||||
wear = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
wear -= HitPoints;
|
||||
HitPoints = 0;
|
||||
}
|
||||
|
||||
if( wear > 0 )
|
||||
{
|
||||
if( MaxHitPoints > wear )
|
||||
{
|
||||
HitPoints -= wear;
|
||||
wear = 0;
|
||||
MaxHitPoints -= wear;
|
||||
|
||||
if( Parent is Mobile )
|
||||
((Mobile)Parent).LocalOverheadMessage( MessageType.Regular, 0x3B2, 1061121 ); // Your equipment is severely damaged.
|
||||
}
|
||||
else
|
||||
{
|
||||
wear -= HitPoints;
|
||||
HitPoints = 0;
|
||||
}
|
||||
|
||||
if( wear > 0 )
|
||||
{
|
||||
if( MaxHitPoints > wear )
|
||||
{
|
||||
MaxHitPoints -= wear;
|
||||
|
||||
if( Parent is Mobile )
|
||||
((Mobile)Parent).LocalOverheadMessage( MessageType.Regular, 0x3B2, 1061121 ); // Your equipment is severely damaged.
|
||||
}
|
||||
else
|
||||
{
|
||||
Delete();
|
||||
}
|
||||
Delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -288,7 +288,7 @@ namespace Server.Items
|
|||
public override void GetProperties( ObjectPropertyList list )
|
||||
{
|
||||
base.GetProperties( list );
|
||||
|
||||
|
||||
if ( m_Quality == BookQuality.Exceptional )
|
||||
list.Add( 1063341 ); // exceptional
|
||||
|
||||
|
|
|
|||
|
|
@ -3,13 +3,16 @@ using Server;
|
|||
|
||||
namespace Server.Items
|
||||
{
|
||||
[Furniture]
|
||||
[FlipableAttribute( 0x2bd9, 0x2bda )]
|
||||
public class GreenStocking : BaseContainer
|
||||
{
|
||||
public override int DefaultGumpID{ get{ return 0x103; } }
|
||||
public override int DefaultDropSound{ get{ return 0x42; } }
|
||||
|
||||
[Constructable]
|
||||
public GreenStocking() : base ( 0x2bd9 )
|
||||
public GreenStocking() : base ( Utility.Random( 0x2BD9, 2 ) )
|
||||
{
|
||||
GumpID = 0x103;
|
||||
}
|
||||
|
||||
public GreenStocking( Serial serial ) : base( serial )
|
||||
|
|
@ -29,13 +32,16 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
|
||||
[Furniture]
|
||||
[FlipableAttribute( 0x2bdb, 0x2bdc )]
|
||||
public class RedStocking : BaseContainer
|
||||
{
|
||||
public override int DefaultGumpID{ get{ return 0x103; } }
|
||||
public override int DefaultDropSound{ get{ return 0x42; } }
|
||||
|
||||
[Constructable]
|
||||
public RedStocking() : base ( 0x2bdb )
|
||||
public RedStocking() : base ( Utility.Random( 0x2BDB, 2 ) )
|
||||
{
|
||||
GumpID = 0x103;
|
||||
}
|
||||
|
||||
public RedStocking( Serial serial ) : base( serial )
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ using Server;
|
|||
using Server.Items;
|
||||
using Server.Engines.Harvest;
|
||||
using Server.ContextMenus;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
|
|
@ -80,7 +81,7 @@ namespace Server.Items
|
|||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
if ( HarvestSystem == null )
|
||||
if ( HarvestSystem == null || Deleted )
|
||||
return;
|
||||
|
||||
Point3D loc = GetWorldLocation();
|
||||
|
|
@ -90,8 +91,13 @@ namespace Server.Items
|
|||
from.LocalOverheadMessage( Server.Network.MessageType.Regular, 0x3E9, 1019045 ); // I can't reach that
|
||||
return;
|
||||
}
|
||||
|
||||
if ( !( HarvestSystem is Mining ) )
|
||||
else if ( !this.IsAccessibleTo( from ) )
|
||||
{
|
||||
this.PublicOverheadMessage( MessageType.Regular, 0x3E9, 1061637 ); // You are not allowed to access this.
|
||||
return;
|
||||
}
|
||||
|
||||
if ( !(this.HarvestSystem is Mining) )
|
||||
from.SendLocalizedMessage( 1010018 ); // What do you want to use this item on?
|
||||
|
||||
HarvestSystem.BeginHarvesting( from, this );
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ namespace Server.Items
|
|||
|
||||
if ( Core.AOS )
|
||||
return damage;
|
||||
|
||||
|
||||
int absorb = defender.MeleeDamageAbsorb;
|
||||
|
||||
if ( absorb > 0 )
|
||||
|
|
|
|||
|
|
@ -1243,6 +1243,10 @@ namespace Server.Items
|
|||
if ( Core.AOS )
|
||||
return AbsorbDamageAOS( attacker, defender, damage );
|
||||
|
||||
BaseShield shield = defender.FindItemOnLayer( Layer.TwoHanded ) as BaseShield;
|
||||
if ( shield != null )
|
||||
damage = shield.OnHit( this, damage );
|
||||
|
||||
double chance = Utility.RandomDouble();
|
||||
|
||||
Item armorItem;
|
||||
|
|
@ -1265,10 +1269,6 @@ namespace Server.Items
|
|||
if ( armor != null )
|
||||
damage = armor.OnHit( this, damage );
|
||||
|
||||
BaseShield shield = defender.FindItemOnLayer( Layer.TwoHanded ) as BaseShield;
|
||||
if ( shield != null )
|
||||
damage = shield.OnHit( this, damage );
|
||||
|
||||
int virtualArmor = defender.VirtualArmor + defender.VirtualArmorMod;
|
||||
|
||||
if ( virtualArmor > 0 )
|
||||
|
|
@ -2345,7 +2345,13 @@ namespace Server.Items
|
|||
if ( Core.AOS )
|
||||
return ComputeDamageAOS( attacker, defender );
|
||||
|
||||
return (int)ScaleDamageOld( attacker, GetBaseDamage( attacker ), true );
|
||||
int damage = (int)ScaleDamageOld( attacker, GetBaseDamage( attacker ), true );
|
||||
|
||||
// pre-AOS, halve damage if the defender is a player or the attacker is not a player
|
||||
if ( defender is PlayerMobile || !( attacker is PlayerMobile ) )
|
||||
damage = (int)(damage / 2.0);
|
||||
|
||||
return damage;
|
||||
}
|
||||
|
||||
public virtual void PlayHurtAnimation( Mobile from )
|
||||
|
|
|
|||
|
|
@ -1054,7 +1054,6 @@ namespace Server.Misc
|
|||
|
||||
regs.LootType = LootType.Regular;
|
||||
|
||||
|
||||
EquipItem( new BoneHelm() );
|
||||
|
||||
if ( elf )
|
||||
|
|
@ -1125,7 +1124,7 @@ namespace Server.Misc
|
|||
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
case 6: // Samurai
|
||||
{
|
||||
addSkillItems = false;
|
||||
|
|
@ -1279,7 +1278,7 @@ namespace Server.Misc
|
|||
return item;
|
||||
}
|
||||
|
||||
private static void AddSkillItems( SkillName skill, Mobile m )
|
||||
private static void AddSkillItems( SkillName skill, Mobile m )
|
||||
{
|
||||
bool elf = (m.Race == Race.Elf);
|
||||
|
||||
|
|
@ -1320,14 +1319,12 @@ namespace Server.Misc
|
|||
}
|
||||
else
|
||||
{
|
||||
EquipItem( new Robe( Utility.RandomPinkHue() ) );
|
||||
EquipItem( new Robe( hue ) );
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SkillName.AnimalLore:
|
||||
{
|
||||
|
||||
|
||||
int hue = Utility.RandomBlueHue();
|
||||
|
||||
if ( elf )
|
||||
|
|
@ -1483,7 +1480,7 @@ namespace Server.Misc
|
|||
}
|
||||
else
|
||||
{
|
||||
EquipItem( new FloppyHat( Utility.RandomYellowHue() ) );
|
||||
EquipItem( new FloppyHat( hue ) );
|
||||
}
|
||||
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -97,7 +97,8 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
|
||||
Utility.Intern( ref m_Dipper );
|
||||
if ( m_Dipper != null )
|
||||
m_Dipper = String.Intern( m_Dipper );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -61,7 +61,7 @@ namespace Server.Misc
|
|||
{
|
||||
Mobile from = e.Mobile;
|
||||
|
||||
if ( !from.Alive || from.AccessLevel > AccessLevel.Player )
|
||||
if ( !from.Alive || from.AccessLevel > AccessLevel.Player )
|
||||
return;
|
||||
|
||||
if ( !from.Player )
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using Server.Targeting;
|
||||
|
|
@ -904,7 +905,7 @@ namespace Server.Mobiles
|
|||
|
||||
public virtual bool DoActionCombat()
|
||||
{
|
||||
if ( CheckHerding() )
|
||||
if ( Core.AOS && CheckHerding() )
|
||||
{
|
||||
m_Mobile.DebugSay( "Praise the shepherd!" );
|
||||
}
|
||||
|
|
@ -923,7 +924,7 @@ namespace Server.Mobiles
|
|||
|
||||
public virtual bool DoActionGuard()
|
||||
{
|
||||
if ( CheckHerding() )
|
||||
if ( Core.AOS && CheckHerding() )
|
||||
{
|
||||
m_Mobile.DebugSay( "Praise the shepherd!" );
|
||||
}
|
||||
|
|
@ -1298,7 +1299,8 @@ namespace Server.Mobiles
|
|||
else
|
||||
{
|
||||
m_Mobile.Warmode = false;
|
||||
m_Mobile.CurrentSpeed = 0.1;
|
||||
if ( Core.AOS )
|
||||
m_Mobile.CurrentSpeed = 0.1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1467,7 +1469,8 @@ namespace Server.Mobiles
|
|||
m_Mobile.DebugSay( "Nothing to guard from" );
|
||||
|
||||
m_Mobile.Warmode = false;
|
||||
m_Mobile.CurrentSpeed = 0.1;
|
||||
if ( Core.AOS )
|
||||
m_Mobile.CurrentSpeed = 0.1;
|
||||
|
||||
WalkMobileRange( controlMaster, 1, false, 0, 1 );
|
||||
}
|
||||
|
|
@ -1484,8 +1487,13 @@ namespace Server.Mobiles
|
|||
{
|
||||
m_Mobile.DebugSay( "I think he might be dead. He's not anywhere around here at least. That's cool. I'm glad he's dead." );
|
||||
|
||||
m_Mobile.ControlTarget = m_Mobile.ControlMaster;
|
||||
m_Mobile.ControlOrder = OrderType.Follow;
|
||||
if ( Core.AOS ) {
|
||||
m_Mobile.ControlTarget = m_Mobile.ControlMaster;
|
||||
m_Mobile.ControlOrder = OrderType.Follow;
|
||||
} else {
|
||||
m_Mobile.ControlTarget = null;
|
||||
m_Mobile.ControlOrder = OrderType.None;
|
||||
}
|
||||
|
||||
if( m_Mobile.FightMode == FightMode.Closest || m_Mobile.FightMode == FightMode.Aggressor )
|
||||
{
|
||||
|
|
@ -1623,7 +1631,7 @@ namespace Server.Mobiles
|
|||
Name = FriendlyNameAttribute.GetFriendlyNameFor( creature.GetType() ).ToString();
|
||||
|
||||
//(As Per OSI)No name. Normally, set by the ItemID of the Shrink Item unless we either explicitly set it with an Attribute, or, no lookup found
|
||||
|
||||
|
||||
Hue = creature.Hue & 0x0FFF;
|
||||
}
|
||||
|
||||
|
|
@ -1975,6 +1983,14 @@ namespace Server.Mobiles
|
|||
if( delay < 0.0 )
|
||||
delay = 0.0;
|
||||
|
||||
if ( double.IsNaN( delay ) ) {
|
||||
using( StreamWriter op = new StreamWriter( "nan_transform.txt", true ) ) {
|
||||
op.WriteLine( String.Format( "NaN in TransformMoveDelay: {0}, {1}, {2}, {3}", DateTime.Now, this.GetType().ToString(), m_Mobile == null ? "null" : m_Mobile.GetType().ToString(), m_Mobile.HitsMax ) );
|
||||
}
|
||||
|
||||
return 1.0;
|
||||
}
|
||||
|
||||
return delay;
|
||||
}
|
||||
|
||||
|
|
@ -2520,7 +2536,7 @@ namespace Server.Mobiles
|
|||
// Ignore players with activated honor
|
||||
if ( m is PlayerMobile && ( (PlayerMobile)m ).HonorActive && !( m_Mobile.Combatant == m ))
|
||||
continue;
|
||||
|
||||
|
||||
if( acqType == FightMode.Aggressor || acqType == FightMode.Evil )
|
||||
{
|
||||
// Only acquire this mobile if it attacked us, or if it's evil.
|
||||
|
|
@ -2542,7 +2558,7 @@ namespace Server.Mobiles
|
|||
if( m is BaseCreature && ((BaseCreature)m).Controlled && ((BaseCreature)m).ControlMaster != null )
|
||||
bValid = ( ((BaseCreature)m).ControlMaster.Karma < 0 );
|
||||
else
|
||||
bValid = ( m.Karma < 0 );
|
||||
bValid = ( (Core.AOS || m.Player) && m.Karma < 0 );
|
||||
}
|
||||
|
||||
if ( !bValid )
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ namespace Server.Mobiles
|
|||
|
||||
public virtual bool IsNecromancer
|
||||
{
|
||||
get { return ( m_Mobile.Skills[ SkillName.Necromancy ].Value > 50 ); }
|
||||
get { return ( Core.AOS && m_Mobile.Skills[ SkillName.Necromancy ].Value > 50 ); }
|
||||
}
|
||||
|
||||
private const double HealChance = 0.10; // 10% chance to heal at gm magery
|
||||
|
|
@ -385,7 +385,7 @@ namespace Server.Mobiles
|
|||
}
|
||||
case 5: // Paralyze them
|
||||
{
|
||||
if (m_Mobile.Skills[ SkillName.Magery ].Value <= 50.0)
|
||||
if (c.Paralyzed || m_Mobile.Skills[ SkillName.Magery ].Value <= 50.0)
|
||||
goto default;
|
||||
|
||||
m_Mobile.DebugSay( "Attempting to paralyze" );
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ namespace Server
|
|||
typeof( FactionHenchman ), typeof( FactionMercenary ), typeof( FactionNecromancer ),
|
||||
typeof( FactionSorceress ), typeof( FactionWizard ), typeof( FactionBerserker ),
|
||||
typeof( FactionPaladin ), typeof( Leviathan ), typeof( FireBeetle ),
|
||||
typeof( FanDancer )
|
||||
typeof( FanDancer ), typeof( FactionDeathKnight )
|
||||
} ),
|
||||
/* Medium */
|
||||
new SpeedInfo( 0.25, 0.5, new Type[]
|
||||
|
|
|
|||
|
|
@ -187,8 +187,8 @@ namespace Server.Mobiles
|
|||
if ( Core.AOS )
|
||||
return;
|
||||
|
||||
//if ( animal.IsBonded || animal.IsDeadPet )
|
||||
// return;
|
||||
if ( animal.IsBonded || animal.IsDeadPet )
|
||||
return;
|
||||
|
||||
Container pack = animal.Backpack;
|
||||
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ namespace Server.Mobiles
|
|||
case 8: PackItem( new BonePile() ); break;
|
||||
case 9: PackItem( new BonePile() ); break;
|
||||
}
|
||||
|
||||
|
||||
if ( 0.025 > Utility.RandomDouble() )
|
||||
PackItem( new GlacialStaff() );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
|
||||
|
||||
switch( version )
|
||||
{
|
||||
case 1:
|
||||
|
|
|
|||
|
|
@ -137,7 +137,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
|
||||
|
||||
switch( version )
|
||||
{
|
||||
case 1:
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
|
||||
|
||||
switch( version )
|
||||
{
|
||||
case 1:
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
|
||||
|
||||
switch( version )
|
||||
{
|
||||
case 1:
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ namespace Server.Mobiles
|
|||
|
||||
Fame = 1000;
|
||||
Karma = -1000;
|
||||
|
||||
|
||||
PackReg( 10, 15 );
|
||||
PackItem( new Bandage( Utility.RandomMinMax( 1, 15 ) ) );
|
||||
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ namespace Server.Mobiles
|
|||
Karma = -3000;
|
||||
|
||||
VirtualArmor = 40;
|
||||
|
||||
|
||||
switch ( Utility.Random( 6 ) )
|
||||
{
|
||||
case 0: PackItem( new PlateArms() ); break;
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ namespace Server.Mobiles
|
|||
Karma = -600;
|
||||
|
||||
VirtualArmor = 18;
|
||||
|
||||
|
||||
switch ( Utility.Random( 10 ))
|
||||
{
|
||||
case 0: PackItem( new LeftArm() ); break;
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ namespace Server.Mobiles
|
|||
while ( spirtsOrVortexes.Count > 6 )
|
||||
{
|
||||
int index = Utility.Random( spirtsOrVortexes.Count );
|
||||
//TODO: Confim if it's the dispel with all the pretty effects or just a Deletion of it.
|
||||
//TODO: Confirm if it's the dispel with all the pretty effects or just a deletion of it.
|
||||
Dispel( ( (Mobile) spirtsOrVortexes[index] ) );
|
||||
spirtsOrVortexes.RemoveAt( index );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@ namespace Server.Mobiles
|
|||
public class WhiteWyrm : BaseCreature
|
||||
{
|
||||
[Constructable]
|
||||
public WhiteWyrm () : base( AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4 )
|
||||
public WhiteWyrm() : base( AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Body = (Utility.Random(1,2)==1) ? 180 : 49;
|
||||
Body = Utility.RandomBool() ? 180 : 49;
|
||||
Name = "a white wyrm";
|
||||
BaseSoundID = 362;
|
||||
|
||||
|
|
@ -80,9 +80,6 @@ namespace Server.Mobiles
|
|||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
|
||||
if ( Core.AOS && Body == 49 )
|
||||
Body = 180;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -39,7 +39,7 @@ namespace Server.Mobiles
|
|||
Karma = -4000;
|
||||
|
||||
VirtualArmor = 40;
|
||||
|
||||
|
||||
PackItem( new LesserPoisonPotion() );
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -205,7 +205,10 @@ namespace Server.Mobiles
|
|||
{
|
||||
base.InitBody();
|
||||
|
||||
Hue = 0x83F4; // hue is not random
|
||||
if ( BodyValue == 0x340 || BodyValue == 0x402 )
|
||||
Hue = 0;
|
||||
else
|
||||
Hue = 0x83F4; // hue is not random
|
||||
|
||||
Container pack = this.Backpack;
|
||||
|
||||
|
|
@ -971,14 +974,16 @@ namespace Server.Mobiles
|
|||
AddButton( 130, 120, 4005, 4007, GetButtonID( 5, 0 ), GumpButtonType.Reply, 0 );
|
||||
AddHtml( 170, 120, 120, 20, "Title", false, false );
|
||||
|
||||
AddButton( 130, 200, 4005, 4007, GetButtonID( 5, 1 ), GumpButtonType.Reply, 0 );
|
||||
AddHtml( 170, 200, 120, 20, "Appearance", false, false );
|
||||
if ( m_Barkeeper.BodyValue != 0x340 && m_Barkeeper.BodyValue != 0x402 ) {
|
||||
AddButton( 130, 200, 4005, 4007, GetButtonID( 5, 1 ), GumpButtonType.Reply, 0 );
|
||||
AddHtml( 170, 200, 120, 20, "Appearance", false, false );
|
||||
|
||||
AddButton( 130, 280, 4005, 4007, GetButtonID( 5, 2 ), GumpButtonType.Reply, 0 );
|
||||
AddHtml( 170, 280, 120, 20, "Male / Female", false, false );
|
||||
AddButton( 130, 280, 4005, 4007, GetButtonID( 5, 2 ), GumpButtonType.Reply, 0 );
|
||||
AddHtml( 170, 280, 120, 20, "Male / Female", false, false );
|
||||
|
||||
AddButton( 338, 437, 4014, 4016, 0, GumpButtonType.Page, 1 );
|
||||
AddHtml( 290, 440, 35, 40, "Back", false, false );
|
||||
AddButton( 338, 437, 4014, 4016, 0, GumpButtonType.Page, 1 );
|
||||
AddHtml( 290, 440, 35, 40, "Back", false, false );
|
||||
}
|
||||
|
||||
AddItem( 580, 44, 4033 );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,7 +44,6 @@ namespace Server.Mobiles
|
|||
Add( typeof( LeatherLegs ), 40 );
|
||||
Add( typeof( LeatherCap ), 5 );
|
||||
|
||||
|
||||
Add( typeof( FemaleLeatherChest ), 18 );
|
||||
Add( typeof( FemaleStuddedChest ), 25 );
|
||||
Add( typeof( LeatherShorts ), 14 );
|
||||
|
|
|
|||
|
|
@ -26,7 +26,6 @@ namespace Server.Mobiles
|
|||
Add( new GenericBuyInfo( typeof( HeaterShield ), 231, 20, 0x1B76, 0 ) );
|
||||
Add( new GenericBuyInfo( typeof( WoodenKiteShield ), 70, 20, 0x1B78, 0 ) );
|
||||
Add( new GenericBuyInfo( typeof( MetalShield ), 121, 20, 0x1B7B, 0 ) );
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@ namespace Server.Mobiles
|
|||
Add( new GenericBuyInfo( typeof( PlateLegs ), 218, 20, 0x1411, 0 ) );
|
||||
Add( new GenericBuyInfo( typeof( PlateArms ), 188, 20, 0x1410, 0 ) );
|
||||
Add( new GenericBuyInfo( typeof( PlateGloves ), 155, 20, 0x1414, 0 ) );
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -19,14 +19,14 @@ namespace Server.Mobiles
|
|||
public class InternalBuyInfo : List<GenericBuyInfo>
|
||||
{
|
||||
public InternalBuyInfo()
|
||||
{
|
||||
{
|
||||
Add( new GenericBuyInfo( typeof( RefreshPotion ), 15, 10, 0xF0B, 0 ) );
|
||||
Add( new GenericBuyInfo( typeof( AgilityPotion ), 15, 10, 0xF08, 0 ) );
|
||||
Add( new GenericBuyInfo( typeof( NightSightPotion ), 15, 10, 0xF06, 0 ) );
|
||||
Add( new GenericBuyInfo( typeof( LesserHealPotion ), 15, 10, 0xF0C, 0 ) );
|
||||
Add( new GenericBuyInfo( typeof( StrengthPotion ), 15, 10, 0xF09, 0 ) );
|
||||
Add( new GenericBuyInfo( typeof( LesserPoisonPotion ), 15, 10, 0xF0A, 0 ) );
|
||||
Add( new GenericBuyInfo( typeof( LesserCurePotion ), 15, 10, 0xF07, 0 ) );
|
||||
Add( new GenericBuyInfo( typeof( LesserCurePotion ), 15, 10, 0xF07, 0 ) );
|
||||
Add( new GenericBuyInfo( typeof( LesserExplosionPotion ), 21, 10, 0xF0D, 0 ) );
|
||||
Add( new GenericBuyInfo( typeof( MortarPestle ), 8, 10, 0xE9B, 0 ) );
|
||||
|
||||
|
|
@ -43,10 +43,6 @@ namespace Server.Mobiles
|
|||
Add( new GenericBuyInfo( typeof( HeatingStand ), 2, 100, 0x1849, 0 ) );
|
||||
|
||||
Add( new GenericBuyInfo( "1041060", typeof( HairDye ), 37, 10, 0xEFF, 0 ) );
|
||||
|
||||
Add( new GenericBuyInfo( typeof( HeatingStand ), 2, 100, 0x1849, 0 ) ); // This is on OSI :-P
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ namespace Server.Mobiles
|
|||
Add( new AnimalBuyInfo( 1, typeof( TimberWolf ), 768, 10, 225, 0 ) );
|
||||
Add( new AnimalBuyInfo( 1, typeof( Rat ), 107, 10, 238, 0 ) );
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ namespace Server.Mobiles
|
|||
Add( new GenericBuyInfo( typeof( Muffins ), 3, 20, 0x9EA, 0 ) );
|
||||
Add( new GenericBuyInfo( typeof( SackFlour ), 3, 20, 0x1039, 0 ) );
|
||||
Add( new GenericBuyInfo( typeof( FrenchBread ), 5, 20, 0x98C, 0 ) );
|
||||
Add( new GenericBuyInfo( typeof( Cookies ), 3, 20, 0x160b, 0 ) );
|
||||
Add( new GenericBuyInfo( typeof( Cookies ), 3, 20, 0x160b, 0 ) );
|
||||
Add( new GenericBuyInfo( typeof( CheesePizza ), 8, 10, 0x1040, 0 ) ); // OSI just has Pizza
|
||||
Add( new GenericBuyInfo( typeof( JarHoney ), 3, 20, 0x9ec, 0 ) );
|
||||
Add (new GenericBuyInfo( typeof( BowlFlour ), 7, 20, 0xA1E, 0 ) );
|
||||
|
|
|
|||
|
|
@ -23,8 +23,7 @@ namespace Server.Mobiles
|
|||
Add( new GenericBuyInfo( typeof( Drums ), 21, ( 10 ), 0x0E9C, 0 ) );
|
||||
Add( new GenericBuyInfo( typeof( Tambourine ), 21, ( 10 ), 0x0E9E, 0 ) );
|
||||
Add( new GenericBuyInfo( typeof( LapHarp ), 21, ( 10 ), 0x0EB2, 0 ) );
|
||||
Add( new GenericBuyInfo( typeof( Lute ), 21, ( 10 ), 0x0EB3, 0 ) );
|
||||
|
||||
Add( new GenericBuyInfo( typeof( Lute ), 21, ( 10 ), 0x0EB3, 0 ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -30,15 +30,6 @@ namespace Server.Mobiles
|
|||
Add( new GenericBuyInfo( typeof( ButcherKnife ), 13, 20, 0x13F6, 0 ) );
|
||||
Add( new GenericBuyInfo( typeof( Cleaver ), 13, 20, 0xEC3, 0 ) );
|
||||
Add( new GenericBuyInfo( typeof( SkinningKnife ), 13, 20, 0xEC4, 0 ) );
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -26,8 +26,7 @@ namespace Server.Mobiles
|
|||
Add( new GenericBuyInfo( typeof( Nightshade ), 3, 20, 0xF88, 0 ) );
|
||||
Add( new GenericBuyInfo( typeof( Bloodmoss ), 5, 20, 0xF7B, 0 ) );
|
||||
Add( new GenericBuyInfo( typeof( MortarPestle ), 8, 20, 0xE9B, 0 ) );
|
||||
Add( new GenericBuyInfo( typeof( Bottle ), 5, 20, 0xF0E, 0 ) );
|
||||
|
||||
Add( new GenericBuyInfo( typeof( Bottle ), 5, 20, 0xF0E, 0 ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ namespace Server.Mobiles
|
|||
Add( new GenericBuyInfo( typeof( BlankMap ), 5, 40, 0x14EC, 0 ) );
|
||||
Add( new GenericBuyInfo( typeof( MapmakersPen ), 8, 20, 0x0FBF, 0 ) );
|
||||
Add( new GenericBuyInfo( typeof( BlankScroll ), 12, 40, 0xEF3, 0 ) );
|
||||
|
||||
|
||||
for ( int i = 0; i < PresetMapEntry.Table.Length; ++i )
|
||||
Add( new PresetMapBuyInfo( PresetMapEntry.Table[i], Utility.RandomMinMax( 7, 10 ), 20 ) );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
public InternalBuyInfo()
|
||||
{
|
||||
Add( new GenericBuyInfo( typeof( MonkRobe ), 136, 20, 0x2687, 0x21E ) );
|
||||
if ( Core.AOS ) Add( new GenericBuyInfo( typeof( MonkRobe ), 136, 20, 0x2687, 0x21E ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@ namespace Server.Mobiles
|
|||
{
|
||||
public InternalBuyInfo()
|
||||
{
|
||||
|
||||
Add( new GenericBuyInfo( typeof( SewingKit ), 3, 20, 0xF9D, 0 ) );
|
||||
Add( new GenericBuyInfo( typeof( Scissors ), 11, 20, 0xF9F, 0 ) );
|
||||
Add( new GenericBuyInfo( typeof( DyeTub ), 8, 20, 0xFAB, 0 ) );
|
||||
|
|
|
|||
|
|
@ -51,7 +51,6 @@ namespace Server.Mobiles
|
|||
Add( new GenericBuyInfo( typeof( SkinningKnife ), 15, 20, 0xEC4, 0 ) );
|
||||
|
||||
Add( new GenericBuyInfo( "1041279", typeof( TaxidermyKit ), 100000, 20, 0x1EBA, 0 ) );
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@ namespace Server.Mobiles
|
|||
{
|
||||
public InternalBuyInfo()
|
||||
{
|
||||
|
||||
Add( new GenericBuyInfo( typeof( Clock ), 22, 20, 0x104B, 0 ) );
|
||||
Add( new GenericBuyInfo( typeof( Nails ), 3, 20, 0x102E, 0 ) );
|
||||
Add( new GenericBuyInfo( typeof( ClockParts ), 3, 20, 0x104F, 0 ) );
|
||||
|
|
@ -75,7 +74,6 @@ namespace Server.Mobiles
|
|||
Add( new GenericBuyInfo( typeof( Tambourine ), 21, 20, 0x0E9E, 0 ) );
|
||||
Add( new GenericBuyInfo( typeof( LapHarp ), 21, 20, 0x0EB2, 0 ) );
|
||||
Add( new GenericBuyInfo( typeof( Lute ), 21, 20, 0x0EB3, 0 ) );
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -40,10 +40,6 @@ namespace Server.Mobiles
|
|||
Add( new GenericBuyInfo( typeof( Tourmaline ), 75, 20, 0xF2D, 0 ) );
|
||||
Add( new GenericBuyInfo( typeof( Amber ), 50, 20, 0xF25, 0 ) );
|
||||
Add( new GenericBuyInfo( typeof( Diamond ), 200, 20, 0xF26, 0 ) );
|
||||
|
||||
Add( new GenericBuyInfo( typeof( Board ), 3, 20, 0x1BD7, 0 ) );
|
||||
Add( new GenericBuyInfo( typeof( IronIngot ), 6, 20, 0x1BF2, 0 ) );
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using Server;
|
||||
using Server.Factions;
|
||||
using Server.Multis;
|
||||
|
||||
namespace Server.Items
|
||||
|
|
@ -140,6 +141,9 @@ namespace Server.Items
|
|||
{
|
||||
if ( IsOpen )
|
||||
{
|
||||
if ( from is BaseFactionGuard )
|
||||
return false;
|
||||
|
||||
if ( (from.Direction & Direction.Running) != 0 || (m_Boat != null && !m_Boat.Contains( from )) )
|
||||
return true;
|
||||
|
||||
|
|
|
|||
|
|
@ -3,11 +3,11 @@ using Server.Items;
|
|||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Multis
|
||||
{
|
||||
{
|
||||
public class OrcCamp : BaseCamp
|
||||
{
|
||||
public virtual Mobile Orcs{ get{ return new Orc(); } }
|
||||
|
||||
|
||||
private Mobile m_Prisoner;
|
||||
|
||||
[Constructable]
|
||||
|
|
|
|||
|
|
@ -3,11 +3,11 @@ using Server.Items;
|
|||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Multis
|
||||
{
|
||||
{
|
||||
public class RatCamp : BaseCamp
|
||||
{
|
||||
public virtual Mobile Ratmen{ get{ return new Ratman(); } }
|
||||
|
||||
|
||||
private Mobile m_Prisoner;
|
||||
|
||||
[Constructable]
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ using Server.Gumps;
|
|||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
using Server.Network;
|
||||
using Server.Spells;
|
||||
using Server.Targeting;
|
||||
|
||||
namespace Server.Multis
|
||||
|
|
@ -646,8 +647,12 @@ namespace Server.Multis
|
|||
|
||||
public void BeginCustomize( Mobile m )
|
||||
{
|
||||
if( !m.CheckAlive() )
|
||||
if( !m.CheckAlive() ) {
|
||||
return;
|
||||
} else if ( SpellHelper.CheckCombat( m, true ) ) {
|
||||
m.SendLocalizedMessage( 1005564, "", 0x22 ); // Wouldst thou flee during the heat of battle??
|
||||
return;
|
||||
}
|
||||
|
||||
RelocateEntities();
|
||||
|
||||
|
|
|
|||
|
|
@ -239,10 +239,10 @@ namespace Server.Regions
|
|||
|
||||
if ( !isFriend )
|
||||
return;
|
||||
|
||||
|
||||
if ( !from.Alive )
|
||||
return;
|
||||
|
||||
|
||||
if ( Core.ML && Insensitive.Equals( e.Speech, "I wish to resize my house" ) )
|
||||
{
|
||||
if ( from.Map != sign.Map || !from.InRange( sign, 0 ) )
|
||||
|
|
@ -264,10 +264,9 @@ namespace Server.Regions
|
|||
from.SendLocalizedMessage( 501320 ); // Only the house owner may do this.
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ( !m_House.IsInside( from ) || !m_House.IsActive )
|
||||
return;
|
||||
|
||||
else if ( e.HasKeyword( 0x33 ) ) // remove thyself
|
||||
{
|
||||
if ( isFriend )
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ namespace Server.SkillHandlers
|
|||
{
|
||||
bc.HitsMaxSeed = (int)Math.Max( 1, bc.HitsMaxSeed * scalar );
|
||||
bc.Hits = bc.Hits;
|
||||
}
|
||||
}
|
||||
|
||||
if ( bc.StamMaxSeed > 0 )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ namespace Server.SkillHandlers
|
|||
else
|
||||
number = 500402; // You are too far away to beg from her.
|
||||
}
|
||||
else if (!( Core.ML ) && from.Mounted ) // If we're on a mount, who would give us money? TODO: guessed it's removed since ML
|
||||
else if ( !Core.ML && from.Mounted ) // If we're on a mount, who would give us money? TODO: guessed it's removed since ML
|
||||
{
|
||||
number = 500404; // They seem unwilling to give you any money.
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ namespace Server.SkillHandlers
|
|||
}
|
||||
else if ( from.Region.IsPartOf( typeof( Engines.ConPVP.SafeZone ) ) )
|
||||
{
|
||||
from.SendMessage( "You may not peacemake here." );
|
||||
from.SendMessage( "You may not peacemake in this area." );
|
||||
}
|
||||
else if ( ((Mobile)targeted).Region.IsPartOf( typeof( Engines.ConPVP.SafeZone ) ) )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -90,7 +90,9 @@ namespace Server.Spells.Fourth
|
|||
{
|
||||
Caster.DoBeneficial( m );
|
||||
m.VirtualArmorMod += val;
|
||||
new InternalTimer( m, Caster, val ).Start();
|
||||
|
||||
AddEntry( m, val );
|
||||
new InternalTimer( m, Caster ).Start();
|
||||
|
||||
m.FixedParticles( 0x375A, 9, 20, 5027, EffectLayer.Waist );
|
||||
m.PlaySound( 0x1F7 );
|
||||
|
|
@ -103,12 +105,30 @@ namespace Server.Spells.Fourth
|
|||
FinishSequence();
|
||||
}
|
||||
|
||||
private static Dictionary<Mobile, Int32> _Table = new Dictionary<Mobile, Int32>();
|
||||
|
||||
private static void AddEntry( Mobile m, Int32 v )
|
||||
{
|
||||
_Table[m] = v;
|
||||
}
|
||||
|
||||
public static void RemoveEntry( Mobile m )
|
||||
{
|
||||
if ( _Table.ContainsKey( m ) ) {
|
||||
int v = _Table[m];
|
||||
_Table.Remove( m );
|
||||
m.EndAction( typeof( ArchProtectionSpell ) );
|
||||
m.VirtualArmorMod -= v;
|
||||
if ( m.VirtualArmorMod < 0 )
|
||||
m.VirtualArmorMod = 0;
|
||||
}
|
||||
}
|
||||
|
||||
private class InternalTimer : Timer
|
||||
{
|
||||
private Mobile m_Owner;
|
||||
private int m_Val;
|
||||
|
||||
public InternalTimer( Mobile target, Mobile caster, int val ) : base( TimeSpan.FromSeconds( 0 ) )
|
||||
public InternalTimer( Mobile target, Mobile caster ) : base( TimeSpan.FromSeconds( 0 ) )
|
||||
{
|
||||
double time = caster.Skills[SkillName.Magery].Value * 1.2;
|
||||
if ( time > 144 )
|
||||
|
|
@ -117,15 +137,11 @@ namespace Server.Spells.Fourth
|
|||
Priority = TimerPriority.OneSecond;
|
||||
|
||||
m_Owner = target;
|
||||
m_Val = val;
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
{
|
||||
m_Owner.EndAction( typeof( ArchProtectionSpell ) );
|
||||
m_Owner.VirtualArmorMod -= m_Val;
|
||||
if ( m_Owner.VirtualArmorMod < 0 )
|
||||
m_Owner.VirtualArmorMod = 0;
|
||||
ArchProtectionSpell.RemoveEntry( m_Owner );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue