This commit is contained in:
mark 2012-11-10 20:06:36 +00:00
parent 8ff1a903a0
commit 14873aaa3e
78 changed files with 360 additions and 231 deletions

View file

@ -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.

View file

@ -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 )

View file

@ -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 ) );
}

View file

@ -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;

View file

@ -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

View file

@ -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 ) );
}
}

View file

@ -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 );

View file

@ -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 );

View file

@ -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 );

View file

@ -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 ),

View file

@ -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

View file

@ -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 );

View file

@ -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();

View file

@ -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;
}

View file

@ -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;

View file

@ -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 ) );
}