This commit is contained in:
parent
7ad00dceac
commit
0b4c3b15d9
41 changed files with 976 additions and 144 deletions
|
|
@ -7,6 +7,7 @@ using Server.Accounting;
|
|||
using Server.Commands;
|
||||
using Server.Engines.Help;
|
||||
using Server.Network;
|
||||
using Server.Regions;
|
||||
|
||||
namespace Server.Misc
|
||||
{
|
||||
|
|
@ -192,11 +193,16 @@ namespace Server.Misc
|
|||
state.Send( new DeleteResult( DeleteResultType.CharTooYoung ) );
|
||||
state.Send( new CharacterListUpdate( acct ) );
|
||||
}
|
||||
else if ( m.AccessLevel == AccessLevel.Player && Region.Find( m.LogoutLocation, m.LogoutMap ).GetRegion( typeof( Jail ) ) != null ) //Don't need to check current location, if netstate is null, they're logged out
|
||||
{
|
||||
state.Send( new DeleteResult( DeleteResultType.BadRequest ) );
|
||||
state.Send( new CharacterListUpdate( acct ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine( "Client: {0}: Deleting character {1} (0x{2:X})", state, index, m.Serial.Value );
|
||||
|
||||
acct.Comments.Add( new AccountComment( "System", String.Format( "Character #{0} {1} deleted by {2}", index+1, m, state ) ) );
|
||||
acct.Comments.Add( new AccountComment( "System", String.Format( "Character #{0} {1} deleted by {2}", index + 1, m, state ) ) );
|
||||
|
||||
m.Delete();
|
||||
state.Send( new CharacterListUpdate( acct ) );
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@ namespace Server.Commands
|
|||
from.SendMessage( "Property ({0}) not found.", propName );
|
||||
else if ( from.AccessLevel < attr.WriteLevel )
|
||||
from.SendMessage( "Setting this property ({0}) requires at least {1} access level.", propName, Mobile.GetAccessLevelName( attr.WriteLevel ) );
|
||||
else if ( !thisProp.CanWrite )
|
||||
else if ( !thisProp.CanWrite || attr.ReadOnly )
|
||||
from.SendMessage( "Property ({0}) is read only.", propName );
|
||||
else
|
||||
realProps[i] = thisProp;
|
||||
|
|
|
|||
|
|
@ -135,7 +135,7 @@ namespace Server.Commands
|
|||
failReason = String.Format( "Property '{0}' is write only.", propertyName );
|
||||
return null;
|
||||
}
|
||||
else if ( (access & PropertyAccess.Write) != 0 && !p.CanWrite && isFinal )
|
||||
else if ( (access & PropertyAccess.Write) != 0 && (!p.CanWrite || attr.ReadOnly) && isFinal )
|
||||
{
|
||||
failReason = String.Format( "Property '{0}' is read only.", propertyName );
|
||||
return null;
|
||||
|
|
@ -718,7 +718,7 @@ namespace Server
|
|||
if ( ( access & PropertyAccess.Read ) != 0 && from.AccessLevel < security.ReadLevel )
|
||||
throw new ReadAccessException( this, from.AccessLevel, security.ReadLevel );
|
||||
|
||||
if ( ( access & PropertyAccess.Write ) != 0 && from.AccessLevel < security.WriteLevel )
|
||||
if ( ( access & PropertyAccess.Write ) != 0 && (from.AccessLevel < security.WriteLevel || security.ReadOnly) )
|
||||
throw new WriteAccessException( this, from.AccessLevel, security.ReadLevel );
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -278,19 +278,6 @@ namespace Server.Engines.Doom
|
|||
{
|
||||
Point3D loc = GetWorldLocation();
|
||||
|
||||
/*
|
||||
Sector sec = map.GetSector( loc );
|
||||
ArrayList regions = sec.Regions;
|
||||
|
||||
for ( int i = 0; playerCount == 0 && i < regions.Count; ++i )
|
||||
{
|
||||
Region reg = (Region)regions[i];
|
||||
|
||||
if ( reg != null && reg != m_Region && reg.Contains( loc ) )
|
||||
playerCount = reg.GetPlayerCount();
|
||||
}
|
||||
*/
|
||||
|
||||
Region reg = Region.Find( loc, map ).GetRegion( "Doom Gauntlet" );
|
||||
|
||||
if ( reg != null )
|
||||
|
|
@ -575,11 +562,11 @@ namespace Server.Engines.Doom
|
|||
dealer.Female = false;
|
||||
dealer.Hue = 0x8835;
|
||||
|
||||
ArrayList items = new ArrayList( dealer.Items );
|
||||
List<Item> items = new List<Item>( dealer.Items );
|
||||
|
||||
for ( int i = 0; i < items.Count; ++i )
|
||||
{
|
||||
Item item = (Item)items[i];
|
||||
Item item = items[i];
|
||||
|
||||
if ( item.Layer != Layer.ShopBuy && item.Layer != Layer.ShopResale && item.Layer != Layer.ShopSell )
|
||||
item.Delete();
|
||||
|
|
|
|||
31
Scripts/Engines/Harvest/Core/BonusHarvestResource.cs
Normal file
31
Scripts/Engines/Harvest/Core/BonusHarvestResource.cs
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
using System;
|
||||
|
||||
namespace Server.Engines.Harvest
|
||||
{
|
||||
public class BonusHarvestResource
|
||||
{
|
||||
private Type m_Type;
|
||||
private double m_ReqSkill, m_Chance;
|
||||
private TextDefinition m_SuccessMessage;
|
||||
|
||||
public Type Type { get { return m_Type; } set { m_Type = value; } }
|
||||
public double ReqSkill { get { return m_ReqSkill; } set { m_ReqSkill = value; } }
|
||||
public double Chance { get { return m_Chance; } set { m_Chance = value; } }
|
||||
|
||||
public TextDefinition SuccessMessage { get { return m_SuccessMessage; } }
|
||||
|
||||
public void SendSuccessTo( Mobile m )
|
||||
{
|
||||
TextDefinition.SendMessageTo( m, m_SuccessMessage );
|
||||
}
|
||||
|
||||
public BonusHarvestResource( double reqSkill, double chance, TextDefinition message, Type type )
|
||||
{
|
||||
m_ReqSkill = reqSkill;
|
||||
|
||||
m_Chance = chance;
|
||||
m_Type = type;
|
||||
m_SuccessMessage = message;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -9,6 +9,13 @@ namespace Server.Engines.Harvest
|
|||
private DateTime m_NextRespawn;
|
||||
private HarvestVein m_Vein, m_DefaultVein;
|
||||
|
||||
HarvestDefinition m_Definition;
|
||||
|
||||
public HarvestDefinition Definition
|
||||
{
|
||||
get { return m_Definition; }
|
||||
}
|
||||
|
||||
public int Current
|
||||
{
|
||||
get
|
||||
|
|
@ -46,23 +53,31 @@ namespace Server.Engines.Harvest
|
|||
return;
|
||||
|
||||
m_Current = m_Maximum;
|
||||
m_Vein = m_DefaultVein;
|
||||
|
||||
if ( m_Definition.RandomizeVeins )
|
||||
{
|
||||
m_Vein = m_Definition.GetVeinFrom( Utility.RandomDouble() );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Vein = m_DefaultVein;
|
||||
}
|
||||
}
|
||||
|
||||
public void Consume( HarvestDefinition def, int amount, Mobile from )
|
||||
public void Consume( int amount, Mobile from )
|
||||
{
|
||||
CheckRespawn();
|
||||
|
||||
if ( m_Current == m_Maximum )
|
||||
{
|
||||
double min = def.MinRespawn.TotalMinutes;
|
||||
double max = def.MaxRespawn.TotalMinutes;
|
||||
double min = m_Definition.MinRespawn.TotalMinutes;
|
||||
double max = m_Definition.MaxRespawn.TotalMinutes;
|
||||
double rnd = Utility.RandomDouble();
|
||||
|
||||
m_Current = m_Maximum - amount;
|
||||
|
||||
double minutes = min + (rnd * (max - min));
|
||||
if( def.RaceBonus && from.Race == Race.Elf ) //def.RaceBonus = Core.ML
|
||||
if ( m_Definition.RaceBonus && from.Race == Race.Elf ) //def.RaceBonus = Core.ML
|
||||
minutes *= .75; //25% off the time.
|
||||
|
||||
m_NextRespawn = DateTime.Now + TimeSpan.FromMinutes( minutes );
|
||||
|
|
@ -82,6 +97,8 @@ namespace Server.Engines.Harvest
|
|||
m_Current = m_Maximum;
|
||||
m_DefaultVein = defaultVein;
|
||||
m_Vein = m_DefaultVein;
|
||||
|
||||
m_Definition = def;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -22,7 +22,9 @@ namespace Server.Engines.Harvest
|
|||
private object m_NoResourcesMessage, m_OutOfRangeMessage, m_TimedOutOfRangeMessage, m_DoubleHarvestMessage, m_FailMessage, m_PackFullMessage, m_ToolBrokeMessage;
|
||||
private HarvestResource[] m_Resources;
|
||||
private HarvestVein[] m_Veins;
|
||||
private BonusHarvestResource[] m_BonusResources;
|
||||
private bool m_RaceBonus;
|
||||
private bool m_RandomizeVeins;
|
||||
|
||||
public int BankWidth{ get{ return m_BankWidth; } set{ m_BankWidth = value; } }
|
||||
public int BankHeight{ get{ return m_BankHeight; } set{ m_BankHeight = value; } }
|
||||
|
|
@ -51,7 +53,9 @@ namespace Server.Engines.Harvest
|
|||
public object ToolBrokeMessage{ get{ return m_ToolBrokeMessage; } set{ m_ToolBrokeMessage = value; } }
|
||||
public HarvestResource[] Resources{ get{ return m_Resources; } set{ m_Resources = value; } }
|
||||
public HarvestVein[] Veins{ get{ return m_Veins; } set{ m_Veins = value; } }
|
||||
public BonusHarvestResource[] BonusResources{ get { return m_BonusResources; } set { m_BonusResources = value; } }
|
||||
public bool RaceBonus { get { return m_RaceBonus; } set { m_RaceBonus = value; } }
|
||||
public bool RandomizeVeins { get { return m_RandomizeVeins; } set { m_RandomizeVeins = value; } }
|
||||
|
||||
private Dictionary<Map, Dictionary<Point2D, HarvestBank>> m_BanksByMap;
|
||||
|
||||
|
|
@ -94,8 +98,27 @@ namespace Server.Engines.Harvest
|
|||
if ( m_Veins.Length == 1 )
|
||||
return m_Veins[0];
|
||||
|
||||
Random random = new Random( (x*17)+(y*11)+(map.MapID * 3) );
|
||||
double randomValue = random.NextDouble() * 100;
|
||||
double randomValue;
|
||||
|
||||
if ( m_RandomizeVeins )
|
||||
{
|
||||
randomValue = Utility.RandomDouble();
|
||||
}
|
||||
else
|
||||
{
|
||||
Random random = new Random( ( x * 17 ) + ( y * 11 ) + ( map.MapID * 3 ) );
|
||||
randomValue = random.NextDouble();
|
||||
}
|
||||
|
||||
return GetVeinFrom( randomValue );
|
||||
}
|
||||
|
||||
public HarvestVein GetVeinFrom( double randomValue )
|
||||
{
|
||||
if ( m_Veins.Length == 1 )
|
||||
return m_Veins[0];
|
||||
|
||||
randomValue *= 100;
|
||||
|
||||
for ( int i = 0; i < m_Veins.Length; ++i )
|
||||
{
|
||||
|
|
@ -108,6 +131,24 @@ namespace Server.Engines.Harvest
|
|||
return null;
|
||||
}
|
||||
|
||||
public BonusHarvestResource GetBonusResource()
|
||||
{
|
||||
if ( m_BonusResources == null )
|
||||
return null;
|
||||
|
||||
double randomValue = Utility.RandomDouble() * 100;
|
||||
|
||||
for ( int i = 0; i < m_BonusResources.Length; ++i )
|
||||
{
|
||||
if ( randomValue <= m_BonusResources[i].Chance )
|
||||
return m_BonusResources[i];
|
||||
|
||||
randomValue -= m_BonusResources[i].Chance;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public HarvestDefinition()
|
||||
{
|
||||
m_BanksByMap = new Dictionary<Map, Dictionary<Point2D, HarvestBank>>();
|
||||
|
|
|
|||
|
|
@ -186,7 +186,7 @@ namespace Server.Engines.Harvest
|
|||
item.Amount = amount;
|
||||
}
|
||||
|
||||
bank.Consume( def, item.Amount, from );
|
||||
bank.Consume( item.Amount, from );
|
||||
|
||||
if ( Give( from, item, def.PlaceAtFeetIfFull ) )
|
||||
{
|
||||
|
|
@ -198,6 +198,22 @@ namespace Server.Engines.Harvest
|
|||
item.Delete();
|
||||
}
|
||||
|
||||
BonusHarvestResource bonus = def.GetBonusResource();
|
||||
|
||||
if ( bonus != null && bonus.Type != null && skillBase >= bonus.ReqSkill )
|
||||
{
|
||||
Item bonusItem = Construct( bonus.Type, from );
|
||||
|
||||
if ( Give( from, bonusItem, true ) ) //Bonuses always allow placing at feet, even if pack is full irregrdless of def
|
||||
{
|
||||
bonus.SendSuccessTo( from );
|
||||
}
|
||||
else
|
||||
{
|
||||
item.Delete();
|
||||
}
|
||||
}
|
||||
|
||||
if ( tool is IUsesRemaining )
|
||||
{
|
||||
IUsesRemaining toolWithUses = (IUsesRemaining)tool;
|
||||
|
|
@ -266,14 +282,14 @@ namespace Server.Engines.Harvest
|
|||
if ( map == null )
|
||||
return false;
|
||||
|
||||
ArrayList atFeet = new ArrayList();
|
||||
List<Item> atFeet = new List<Item>();
|
||||
|
||||
foreach ( Item obj in m.GetItemsInRange( 0 ) )
|
||||
atFeet.Add( obj );
|
||||
|
||||
for ( int i = 0; i < atFeet.Count; ++i )
|
||||
{
|
||||
Item check = (Item)atFeet[i];
|
||||
Item check = atFeet[i];
|
||||
|
||||
if ( check.StackWith( m, item, false ) )
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -481,17 +481,23 @@ namespace Server.Engines.Harvest
|
|||
Point3D loc;
|
||||
|
||||
if ( GetHarvestDetails( from, tool, toHarvest, out tileID, out map, out loc ) )
|
||||
Timer.DelayCall( TimeSpan.FromSeconds( 1.5 ), new TimerStateCallback( Splash_Callback ), new object[]{ loc, map } );
|
||||
Timer.DelayCall( TimeSpan.FromSeconds( 1.5 ),
|
||||
delegate
|
||||
{
|
||||
if( Core.ML )
|
||||
from.RevealingAction();
|
||||
|
||||
Effects.SendLocationEffect( loc, map, 0x352D, 16, 4 );
|
||||
Effects.PlaySound( loc, map, 0x364 );
|
||||
} );
|
||||
}
|
||||
|
||||
private void Splash_Callback( object state )
|
||||
public override void OnHarvestFinished( Mobile from, Item tool, HarvestDefinition def, HarvestVein vein, HarvestBank bank, HarvestResource resource, object harvested )
|
||||
{
|
||||
object[] args = (object[])state;
|
||||
Point3D loc = (Point3D)args[0];
|
||||
Map map = (Map)args[1];
|
||||
base.OnHarvestFinished( from, tool, def, vein, bank, resource, harvested );
|
||||
|
||||
Effects.SendLocationEffect( loc, map, 0x352D, 16, 4 );
|
||||
Effects.PlaySound( loc, map, 0x364 );
|
||||
if ( Core.ML )
|
||||
from.RevealingAction();
|
||||
}
|
||||
|
||||
public override object GetLock( Mobile from, Item tool, HarvestDefinition def, object toHarvest )
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ namespace Server.Engines.Harvest
|
|||
// The chopping effect
|
||||
lumber.EffectActions = new int[]{ 13 };
|
||||
lumber.EffectSounds = new int[]{ 0x13E };
|
||||
lumber.EffectCounts = new int[]{ 1, 2, 2, 2, 3 };
|
||||
lumber.EffectCounts = (Core.AOS ? new int[]{ 1 } : new int[]{ 1, 2, 2, 2, 3 });
|
||||
lumber.EffectDelay = TimeSpan.FromSeconds( 1.6 );
|
||||
lumber.EffectSoundDelay = TimeSpan.FromSeconds( 0.9 );
|
||||
|
||||
|
|
@ -72,20 +72,59 @@ namespace Server.Engines.Harvest
|
|||
lumber.PackFullMessage = 500497; // You can't place any wood into your backpack!
|
||||
lumber.ToolBrokeMessage = 500499; // You broke your axe.
|
||||
|
||||
res = new HarvestResource[]
|
||||
if ( Core.ML )
|
||||
{
|
||||
res = new HarvestResource[]
|
||||
{
|
||||
new HarvestResource( 00.0, 00.0, 100.0, 1072540, typeof( Log ) ),
|
||||
new HarvestResource( 65.0, 25.0, 105.0, 1072541, typeof( OakLog ) ),
|
||||
new HarvestResource( 80.0, 40.0, 120.0, 1072542, typeof( AshLog ) ),
|
||||
new HarvestResource( 95.0, 55.0, 135.0, 1072543, typeof( YewLog ) ),
|
||||
new HarvestResource( 100.0, 60.0, 140.0, 1072544, typeof( HeartwoodLog ) ),
|
||||
new HarvestResource( 100.0, 60.0, 140.0, 1072545, typeof( BloodwoodLog ) ),
|
||||
new HarvestResource( 100.0, 60.0, 140.0, 1072546, typeof( FrostwoodLog ) ),
|
||||
};
|
||||
|
||||
|
||||
veins = new HarvestVein[]
|
||||
{
|
||||
new HarvestVein( 58.4, 0.0, res[0], null ), // Ordinary Logs
|
||||
new HarvestVein( 30.0, 0.5, res[1], res[0] ), // Oak
|
||||
new HarvestVein( 10.0, 0.5, res[2], res[0] ), // Ash
|
||||
new HarvestVein( 01.0, 0.5, res[3], res[0] ), // Yew
|
||||
new HarvestVein( 00.3, 0.5, res[4], res[0] ), // Heartwood
|
||||
new HarvestVein( 00.2, 0.5, res[5], res[0] ), // Bloodwood
|
||||
new HarvestVein( 00.1, 0.5, res[6], res[0] ), // Frostwood
|
||||
};
|
||||
|
||||
lumber.BonusResoucres = new BonusHarvestResource[]
|
||||
{
|
||||
new BonusHarvestResource( 0, 83.9, null, null ), //Nothing
|
||||
new BonusHarvestResource( 100, 10.0, 1072548, typeof( BarkFragment ) ),
|
||||
new BonusHarvestResource( 100, 03.0, 1072550, typeof( LuminescentFungi ) ),
|
||||
new BonusHarvestResource( 100, 02.0, 1072547, typeof( SwitchItem ) ),
|
||||
new BonusHarvestResource( 100, 01.0, 1072549, typeof( ParasiticPlant ) ),
|
||||
new BonusHarvestResource( 100, 00.1, 1072551, typeof( BrilliantAmber ) )
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
res = new HarvestResource[]
|
||||
{
|
||||
new HarvestResource( 00.0, 00.0, 100.0, 500498, typeof( Log ) )
|
||||
};
|
||||
|
||||
veins = new HarvestVein[]
|
||||
veins = new HarvestVein[]
|
||||
{
|
||||
new HarvestVein( 100.0, 0.0, res[0], null )
|
||||
};
|
||||
}
|
||||
|
||||
lumber.Resources = res;
|
||||
lumber.Veins = veins;
|
||||
|
||||
lumber.RaceBonus = Core.ML;
|
||||
lumber.RandomizeVeins = Core.ML;
|
||||
|
||||
m_Definition = lumber;
|
||||
Definitions.Add( lumber );
|
||||
|
|
@ -125,6 +164,14 @@ namespace Server.Engines.Harvest
|
|||
from.SendLocalizedMessage( 500489 ); // You can't use an axe on that.
|
||||
}
|
||||
|
||||
public override void OnHarvestStarted( Mobile from, Item tool, HarvestDefinition def, object toHarvest )
|
||||
{
|
||||
base.OnHarvestStarted( from, tool, def, toHarvest );
|
||||
|
||||
if( Core.ML )
|
||||
from.RevealingAction();
|
||||
}
|
||||
|
||||
public static void Initialize()
|
||||
{
|
||||
Array.Sort( m_TreeTiles );
|
||||
|
|
|
|||
|
|
@ -110,7 +110,22 @@ namespace Server.Engines.Harvest
|
|||
oreAndStone.Resources = res;
|
||||
oreAndStone.Veins = veins;
|
||||
|
||||
if ( Core.ML )
|
||||
{
|
||||
oreAndStone.BonusResoucres = new BonusHarvestResource[]
|
||||
{
|
||||
new BonusHarvestResource( 0, 99.8998, null, null ), //Nothing //Note: Rounded the below to .0167 instead of 1/6th of a %. Close enough
|
||||
new BonusHarvestResource( 100, .0167, 1072562, typeof( BlueDiamond ) ),
|
||||
new BonusHarvestResource( 100, .0167, 1072567, typeof( DarkSapphire ) ),
|
||||
new BonusHarvestResource( 100, .0167, 1072570, typeof( EcruCitrine ) ),
|
||||
new BonusHarvestResource( 100, .0167, 1072564, typeof( FireRuby ) ),
|
||||
new BonusHarvestResource( 100, .0167, 1072566, typeof( PerfectEmerald ) ),
|
||||
new BonusHarvestResource( 100, .0167, 1072568, typeof( Turquoise ) )
|
||||
};
|
||||
}
|
||||
|
||||
oreAndStone.RaceBonus = Core.ML;
|
||||
oreAndStone.RandomizeVeins = Core.ML;
|
||||
|
||||
Definitions.Add( oreAndStone );
|
||||
#endregion
|
||||
|
|
@ -330,6 +345,14 @@ namespace Server.Engines.Harvest
|
|||
return true;
|
||||
}
|
||||
|
||||
public override void OnHarvestStarted( Mobile from, Item tool, HarvestDefinition def, object toHarvest )
|
||||
{
|
||||
base.OnHarvestStarted( from, tool, def, toHarvest );
|
||||
|
||||
if ( Core.ML )
|
||||
from.RevealingAction();
|
||||
}
|
||||
|
||||
public override void OnBadHarvestTarget( Mobile from, Item tool, object toHarvest )
|
||||
{
|
||||
if ( toHarvest is LandTarget )
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Server.Engines.VeteranRewards
|
||||
{
|
||||
|
|
@ -7,22 +8,22 @@ namespace Server.Engines.VeteranRewards
|
|||
{
|
||||
private int m_Name;
|
||||
private string m_NameString;
|
||||
private ArrayList m_Entries;
|
||||
private List<RewardEntry> m_Entries;
|
||||
|
||||
public int Name{ get{ return m_Name; } }
|
||||
public string NameString{ get{ return m_NameString; } }
|
||||
public ArrayList Entries{ get{ return m_Entries; } }
|
||||
public List<RewardEntry> Entries { get { return m_Entries; } }
|
||||
|
||||
public RewardCategory( int name )
|
||||
{
|
||||
m_Name = name;
|
||||
m_Entries = new ArrayList();
|
||||
m_Entries = new List<RewardEntry>();
|
||||
}
|
||||
|
||||
public RewardCategory( string name )
|
||||
{
|
||||
m_NameString = name;
|
||||
m_Entries = new ArrayList();
|
||||
m_Entries = new List<RewardEntry>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
using Server.Gumps;
|
||||
using Server.Network;
|
||||
|
|
@ -90,11 +91,11 @@ namespace Server.Engines.VeteranRewards
|
|||
{
|
||||
AddPage( 2 + index );
|
||||
|
||||
ArrayList entries = category.Entries;
|
||||
List<RewardEntry> entries = category.Entries;
|
||||
|
||||
for ( int i = 0; i < entries.Count; ++i )
|
||||
{
|
||||
RewardEntry entry = (RewardEntry)entries[i];
|
||||
RewardEntry entry = entries[i];
|
||||
|
||||
if ( !RewardSystem.HasAccess( m_From, entry ) )
|
||||
break;
|
||||
|
|
@ -146,7 +147,7 @@ namespace Server.Engines.VeteranRewards
|
|||
|
||||
if ( index >= 0 && index < category.Entries.Count )
|
||||
{
|
||||
RewardEntry entry = (RewardEntry)category.Entries[index];
|
||||
RewardEntry entry = category.Entries[index];
|
||||
|
||||
if ( !RewardSystem.HasAccess( m_From, entry ) )
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -65,11 +65,8 @@ namespace Server.Gumps
|
|||
|
||||
if ( from.Backpack != null )
|
||||
totalGold += from.Backpack.GetAmount( typeof( Gold ) );
|
||||
|
||||
BankBox bank = from.FindBankNoCreate();
|
||||
|
||||
if ( bank != null )
|
||||
totalGold += bank.GetAmount( typeof( Gold ) );
|
||||
|
||||
totalGold += Banker.GetBalance( from );
|
||||
|
||||
if ( totalGold < m_VI.Price )
|
||||
{
|
||||
|
|
@ -85,9 +82,9 @@ namespace Server.Gumps
|
|||
|
||||
if ( from.Backpack != null )
|
||||
leftPrice -= from.Backpack.ConsumeUpTo( typeof( Gold ), leftPrice );
|
||||
|
||||
if ( leftPrice > 0 && bank != null )
|
||||
bank.ConsumeUpTo( typeof( Gold ), leftPrice );
|
||||
|
||||
if ( leftPrice > 0 )
|
||||
Banker.Withdraw( from, leftPrice );
|
||||
|
||||
m_Vendor.HoldGold += m_VI.Price;
|
||||
|
||||
|
|
|
|||
|
|
@ -208,7 +208,7 @@ namespace Server.Gumps
|
|||
|
||||
CPA cpa = GetCPA( prop );
|
||||
|
||||
if ( prop.CanWrite && cpa != null && m_Mobile.AccessLevel >= cpa.WriteLevel )
|
||||
if ( prop.CanWrite && cpa != null && m_Mobile.AccessLevel >= cpa.WriteLevel && !cpa.ReadOnly )
|
||||
AddButton( x + SetOffsetX, y + SetOffsetY, SetButtonID1, SetButtonID2, i + 3, GumpButtonType.Reply, 0 );
|
||||
}
|
||||
}
|
||||
|
|
@ -282,7 +282,7 @@ namespace Server.Gumps
|
|||
|
||||
CPA attr = GetCPA( prop );
|
||||
|
||||
if ( !prop.CanWrite || attr == null || from.AccessLevel < attr.WriteLevel )
|
||||
if ( !prop.CanWrite || attr == null || from.AccessLevel < attr.WriteLevel || attr.ReadOnly )
|
||||
return;
|
||||
|
||||
Type type = prop.PropertyType;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using Server.Network;
|
||||
|
|
@ -89,7 +90,7 @@ namespace Server.Gumps
|
|||
AddHtmlLocalized( 158, 22, 100, 18, 1011299, false, false ); // Rename book
|
||||
|
||||
// List of entries
|
||||
ArrayList entries = m_Book.Entries;
|
||||
List<RunebookEntry> entries = m_Book.Entries;
|
||||
|
||||
for ( int i = 0; i < 16; ++i )
|
||||
{
|
||||
|
|
@ -98,8 +99,8 @@ namespace Server.Gumps
|
|||
|
||||
if ( i < entries.Count )
|
||||
{
|
||||
desc = GetName( ((RunebookEntry)entries[i]).Description );
|
||||
hue = GetMapHue( ((RunebookEntry)entries[i]).Map );
|
||||
desc = GetName( entries[i].Description );
|
||||
hue = GetMapHue( entries[i].Map );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ namespace Server.Gumps
|
|||
{
|
||||
Mobile m = states[i].Mobile;
|
||||
|
||||
if ( m != null && (m == owner ||!m.Hidden || owner.AccessLevel > m.AccessLevel || (m is PlayerMobile && ((PlayerMobile)m).VisibilityList.Contains( owner ) ) ) )
|
||||
if ( m != null && (m == owner || !m.Hidden || owner.AccessLevel > m.AccessLevel || (m is PlayerMobile && ((PlayerMobile)m).VisibilityList.Contains( owner ) ) ) )
|
||||
{
|
||||
if ( filter != null && ( m.Name == null || m.Name.ToLower().IndexOf( filter ) < 0 ) )
|
||||
continue;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
using Server.Network;
|
||||
using Server.Engines.Craft;
|
||||
|
|
@ -17,7 +18,7 @@ namespace Server.Items
|
|||
private bool m_Protected;
|
||||
private bool m_Editable;
|
||||
|
||||
private ArrayList m_Pins = new ArrayList();
|
||||
private List<Point2D> m_Pins = new List<Point2D>();
|
||||
|
||||
private const int MaxUserPins = 50;
|
||||
|
||||
|
|
@ -49,7 +50,7 @@ namespace Server.Items
|
|||
set { m_Height = value; }
|
||||
}
|
||||
|
||||
public ArrayList Pins
|
||||
public List<Point2D> Pins
|
||||
{
|
||||
get { return m_Pins; }
|
||||
}
|
||||
|
|
@ -105,7 +106,7 @@ namespace Server.Items
|
|||
from.Send( new MapDisplay( this ) );
|
||||
|
||||
for ( int i = 0; i < m_Pins.Count; ++i )
|
||||
from.Send( new MapAddPin( this, (Point2D) m_Pins[i] ) );
|
||||
from.Send( new MapAddPin( this, m_Pins[i] ) );
|
||||
|
||||
from.Send( new MapSetEditable( this, ValidateEdit( from ) ) );
|
||||
}
|
||||
|
|
@ -265,7 +266,7 @@ namespace Server.Items
|
|||
|
||||
writer.Write( m_Pins.Count );
|
||||
for ( int i = 0; i < m_Pins.Count; ++i )
|
||||
writer.Write( (Point2D) m_Pins[i] );
|
||||
writer.Write( m_Pins[i] );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
|
|
|
|||
|
|
@ -568,7 +568,7 @@ namespace Server.Items
|
|||
return false;
|
||||
|
||||
if ( item != this )
|
||||
return CanLoot( from );
|
||||
return CanLoot( from, item );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
@ -578,7 +578,7 @@ namespace Server.Items
|
|||
if ( !base.CheckLift( from, item, ref reject ) )
|
||||
return false;
|
||||
|
||||
return CanLoot( from );
|
||||
return CanLoot( from,item );
|
||||
}
|
||||
|
||||
public override void OnItemUsed( Mobile from, Item item )
|
||||
|
|
@ -664,7 +664,7 @@ namespace Server.Items
|
|||
m_RestoreTable = null;
|
||||
}
|
||||
|
||||
public bool CanLoot( Mobile from )
|
||||
public bool CanLoot( Mobile from, Item item )
|
||||
{
|
||||
if ( !IsCriminalAction( from ) )
|
||||
return true;
|
||||
|
|
@ -677,9 +677,9 @@ namespace Server.Items
|
|||
return true;
|
||||
}
|
||||
|
||||
public bool CheckLoot( Mobile from )
|
||||
public bool CheckLoot( Mobile from, Item item )
|
||||
{
|
||||
if ( !CanLoot( from ) )
|
||||
if ( !CanLoot( from, item ) )
|
||||
{
|
||||
if ( m_Owner == null || !m_Owner.Player )
|
||||
from.SendLocalizedMessage( 1005035 ); // You did not earn the right to loot this creature!
|
||||
|
|
@ -786,7 +786,7 @@ namespace Server.Items
|
|||
|
||||
#endregion
|
||||
|
||||
if ( !CheckLoot( from ) )
|
||||
if ( !CheckLoot( from, null ) )
|
||||
return;
|
||||
|
||||
#region Quests
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
using Server.Gumps;
|
||||
using Server.Multis;
|
||||
|
|
@ -72,11 +73,11 @@ namespace Server.Items
|
|||
public abstract class BasePlayerBB : Item, ISecurable
|
||||
{
|
||||
private PlayerBBMessage m_Greeting;
|
||||
private ArrayList m_Messages;
|
||||
private List<PlayerBBMessage> m_Messages;
|
||||
private string m_Title;
|
||||
private SecureLevel m_Level;
|
||||
|
||||
public ArrayList Messages
|
||||
public List<PlayerBBMessage> Messages
|
||||
{
|
||||
get{ return m_Messages; }
|
||||
}
|
||||
|
|
@ -103,7 +104,7 @@ namespace Server.Items
|
|||
|
||||
public BasePlayerBB( int itemID ) : base( itemID )
|
||||
{
|
||||
m_Messages = new ArrayList();
|
||||
m_Messages = new List<PlayerBBMessage>();
|
||||
m_Level = SecureLevel.Anyone;
|
||||
}
|
||||
|
||||
|
|
@ -140,7 +141,7 @@ namespace Server.Items
|
|||
writer.WriteEncodedInt( m_Messages.Count );
|
||||
|
||||
for ( int i = 0; i < m_Messages.Count; ++i )
|
||||
((PlayerBBMessage)m_Messages[i]).Serialize( writer );
|
||||
m_Messages[i].Serialize( writer );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
|
|
@ -168,7 +169,7 @@ namespace Server.Items
|
|||
|
||||
int count = reader.ReadEncodedInt();
|
||||
|
||||
m_Messages = new ArrayList( count );
|
||||
m_Messages = new List<PlayerBBMessage>( count );
|
||||
|
||||
for ( int i = 0; i < count; ++i )
|
||||
m_Messages.Add( new PlayerBBMessage( reader ) );
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ using System;
|
|||
using Server;
|
||||
using Server.Network;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
|
|
@ -106,16 +107,16 @@ namespace Server.Items
|
|||
|
||||
if ( NeighborRange >= 0 )
|
||||
{
|
||||
ArrayList list = new ArrayList();
|
||||
List<WarningItem> list = new List<WarningItem>();
|
||||
|
||||
foreach ( Item item in GetItemsInRange( NeighborRange ) )
|
||||
{
|
||||
if ( item != this && item is WarningItem )
|
||||
list.Add( item );
|
||||
list.Add( (WarningItem)item );
|
||||
}
|
||||
|
||||
for ( int i = 0; i < list.Count; i++ )
|
||||
( (WarningItem) list[i] ).Broadcast( triggerer );
|
||||
list[i].Broadcast( triggerer );
|
||||
}
|
||||
|
||||
Timer.DelayCall( TimeSpan.Zero, new TimerCallback( InternalCallback ) );
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
|
|
@ -41,6 +42,7 @@ namespace Server.Items
|
|||
{
|
||||
from.FixedEffect( 0x375A, 10, 15 );
|
||||
from.PlaySound( 0x1E7 );
|
||||
from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 501774 ); // You swallow the fish whole!
|
||||
Delete();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1003,4 +1003,46 @@ namespace Server.Items
|
|||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class SwitchItem : Item
|
||||
{
|
||||
[Constructable]
|
||||
public SwitchItem()
|
||||
: this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public SwitchItem( int amountFrom, int amountTo )
|
||||
: this( Utility.RandomMinMax( amountFrom, amountTo ) )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public SwitchItem( int amount )
|
||||
: base( 0x2F5F )
|
||||
{
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
}
|
||||
|
||||
public SwitchItem( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
using Server.Network;
|
||||
using Server.Mobiles;
|
||||
|
|
|
|||
|
|
@ -5,11 +5,20 @@ namespace Server.Items
|
|||
[FlipableAttribute( 0x1BD7, 0x1BDA )]
|
||||
public class Board : Item, ICommodity
|
||||
{
|
||||
private CraftResource m_Resource;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public CraftResource Resource
|
||||
{
|
||||
get { return m_Resource; }
|
||||
set { m_Resource = value; InvalidateProperties(); }
|
||||
}
|
||||
|
||||
string ICommodity.Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return String.Format( Amount == 1 ? "{0} board" : "{0} boards", Amount );
|
||||
return String.Format( Amount == 1 ? "{0} {1} board" : "{0} {1} boards", Amount, CraftResources.IsStandard( m_Resource ) ? String.Empty : CraftResources.GetName( m_Resource ).ToLower() );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -21,10 +30,8 @@ namespace Server.Items
|
|||
|
||||
[Constructable]
|
||||
public Board( int amount )
|
||||
: base( 0x1BD7 )
|
||||
: this( CraftResource.RegularWood, amount )
|
||||
{
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
}
|
||||
|
||||
public Board( Serial serial )
|
||||
|
|
@ -32,13 +39,47 @@ namespace Server.Items
|
|||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Board( CraftResource resource ) : this( resource, 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Board( CraftResource resource, int amount )
|
||||
: base( 0x1BD7 )
|
||||
{
|
||||
Stackable = true;
|
||||
Weight = 2.0;
|
||||
Amount = amount;
|
||||
|
||||
m_Resource = resource;
|
||||
Hue = CraftResources.GetHue( resource );
|
||||
}
|
||||
|
||||
public override void GetProperties( ObjectPropertyList list )
|
||||
{
|
||||
base.GetProperties( list );
|
||||
|
||||
if ( !CraftResources.IsStandard( m_Resource ) )
|
||||
{
|
||||
int num = CraftResources.GetLocalizationNumber( m_Resource );
|
||||
|
||||
if ( num > 0 )
|
||||
list.Add( num );
|
||||
else
|
||||
list.Add( CraftResources.GetName( m_Resource ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 1 );
|
||||
writer.Write( (int) 2 );
|
||||
|
||||
writer.Write( (int)m_Resource );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
|
|
@ -47,8 +88,225 @@ namespace Server.Items
|
|||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 2:
|
||||
{
|
||||
m_Resource = (CraftResource)reader.ReadInt();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ( version == 0 && Weight == 0.1 )
|
||||
Weight = -1;
|
||||
|
||||
if ( version <= 1 )
|
||||
m_Resource = CraftResource.RegularWood;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public class HeartwoodBoard : Board
|
||||
{
|
||||
[Constructable]
|
||||
public HeartwoodBoard()
|
||||
: this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public HeartwoodBoard( int amount )
|
||||
: base( CraftResource.Heartwood )
|
||||
{
|
||||
}
|
||||
|
||||
public HeartwoodBoard( 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();
|
||||
}
|
||||
}
|
||||
|
||||
public class BloodwoodBoard : Board
|
||||
{
|
||||
[Constructable]
|
||||
public BloodwoodBoard()
|
||||
: this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public BloodwoodBoard( int amount )
|
||||
: base( CraftResource.Bloodwood )
|
||||
{
|
||||
}
|
||||
|
||||
public BloodwoodBoard( 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();
|
||||
}
|
||||
}
|
||||
|
||||
public class FrostwoodBoard : Board
|
||||
{
|
||||
[Constructable]
|
||||
public FrostwoodBoard()
|
||||
: this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public FrostwoodBoard( int amount )
|
||||
: base( CraftResource.Frostwood )
|
||||
{
|
||||
}
|
||||
|
||||
public FrostwoodBoard( 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();
|
||||
}
|
||||
}
|
||||
|
||||
public class OakBoard : Board
|
||||
{
|
||||
[Constructable]
|
||||
public OakBoard()
|
||||
: this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public OakBoard( int amount )
|
||||
: base( CraftResource.OakWood )
|
||||
{
|
||||
}
|
||||
|
||||
public OakBoard( 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();
|
||||
}
|
||||
}
|
||||
|
||||
public class AshBoard : Board
|
||||
{
|
||||
[Constructable]
|
||||
public AshBoard()
|
||||
: this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public AshBoard( int amount )
|
||||
: base( CraftResource.AshWood )
|
||||
{
|
||||
}
|
||||
|
||||
public AshBoard( 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();
|
||||
}
|
||||
}
|
||||
|
||||
public class YewBoard : Board
|
||||
{
|
||||
[Constructable]
|
||||
public YewBoard()
|
||||
: this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public YewBoard( int amount )
|
||||
: base( CraftResource.YewWood )
|
||||
{
|
||||
}
|
||||
|
||||
public YewBoard( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -6,11 +6,20 @@ namespace Server.Items
|
|||
[FlipableAttribute( 0x1bdd, 0x1be0 )]
|
||||
public class Log : Item, ICommodity
|
||||
{
|
||||
private CraftResource m_Resource;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public CraftResource Resource
|
||||
{
|
||||
get { return m_Resource; }
|
||||
set { m_Resource = value; InvalidateProperties(); }
|
||||
}
|
||||
|
||||
string ICommodity.Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return String.Format( Amount == 1 ? "{0} log" : "{0} logs", Amount );
|
||||
return String.Format( Amount == 1 ? "{0} {1} log" : "{0} {1} logs", Amount, CraftResources.IsStandard( m_Resource ) ? String.Empty : CraftResources.GetName( m_Resource ).ToLower() );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -20,24 +29,267 @@ namespace Server.Items
|
|||
}
|
||||
|
||||
[Constructable]
|
||||
public Log( int amount ) : base( 0x1BDD )
|
||||
public Log( int amount ) : this( CraftResource.RegularWood )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Log( CraftResource resource )
|
||||
: this( resource, 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Log( CraftResource resource, int amount )
|
||||
: base( 0x1BDD )
|
||||
{
|
||||
Stackable = true;
|
||||
Weight = 2.0;
|
||||
Amount = amount;
|
||||
|
||||
m_Resource = resource;
|
||||
Hue = CraftResources.GetHue( resource );
|
||||
}
|
||||
|
||||
public override void GetProperties( ObjectPropertyList list )
|
||||
{
|
||||
base.GetProperties( list );
|
||||
|
||||
if ( !CraftResources.IsStandard( m_Resource ) )
|
||||
{
|
||||
int num = CraftResources.GetLocalizationNumber( m_Resource );
|
||||
|
||||
if ( num > 0 )
|
||||
list.Add( num );
|
||||
else
|
||||
list.Add( CraftResources.GetName( m_Resource ) );
|
||||
}
|
||||
}
|
||||
|
||||
public Log( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 1 ); // version
|
||||
|
||||
writer.Write( (int)m_Resource );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
m_Resource = (CraftResource)reader.ReadInt();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ( version == 0 )
|
||||
m_Resource = CraftResource.RegularWood;
|
||||
}
|
||||
}
|
||||
|
||||
public class HeartwoodLog : Log
|
||||
{
|
||||
[Constructable]
|
||||
public HeartwoodLog() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public HeartwoodLog( int amount ) : base( CraftResource.Heartwood )
|
||||
{
|
||||
}
|
||||
|
||||
public HeartwoodLog( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
writer.Write( (int)0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class BloodwoodLog : Log
|
||||
{
|
||||
[Constructable]
|
||||
public BloodwoodLog()
|
||||
: this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public BloodwoodLog( int amount )
|
||||
: base( CraftResource.Bloodwood )
|
||||
{
|
||||
}
|
||||
|
||||
public BloodwoodLog( 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();
|
||||
}
|
||||
}
|
||||
|
||||
public class FrostwoodLog : Log
|
||||
{
|
||||
[Constructable]
|
||||
public FrostwoodLog()
|
||||
: this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public FrostwoodLog( int amount )
|
||||
: base( CraftResource.Frostwood )
|
||||
{
|
||||
}
|
||||
|
||||
public FrostwoodLog( 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();
|
||||
}
|
||||
}
|
||||
|
||||
public class OakLog : Log
|
||||
{
|
||||
[Constructable]
|
||||
public OakLog()
|
||||
: this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public OakLog( int amount )
|
||||
: base( CraftResource.OakWood )
|
||||
{
|
||||
}
|
||||
|
||||
public OakLog( 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();
|
||||
}
|
||||
}
|
||||
|
||||
public class AshLog : Log
|
||||
{
|
||||
[Constructable]
|
||||
public AshLog()
|
||||
: this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public AshLog( int amount )
|
||||
: base( CraftResource.AshWood )
|
||||
{
|
||||
}
|
||||
|
||||
public AshLog( 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();
|
||||
}
|
||||
}
|
||||
|
||||
public class YewLog : Log
|
||||
{
|
||||
[Constructable]
|
||||
public YewLog()
|
||||
: this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public YewLog( int amount )
|
||||
: base( CraftResource.YewWood )
|
||||
{
|
||||
}
|
||||
|
||||
public YewLog( Serial serial )
|
||||
: base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int)0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ namespace Server.Items
|
|||
{
|
||||
public static readonly TimeSpan UseDelay = TimeSpan.FromSeconds( 7.0 );
|
||||
|
||||
private ArrayList m_Entries;
|
||||
private List<RunebookEntry> m_Entries;
|
||||
private string m_Description;
|
||||
private int m_CurCharges, m_MaxCharges;
|
||||
private int m_DefaultIndex;
|
||||
|
|
@ -95,7 +95,7 @@ namespace Server.Items
|
|||
|
||||
Layer = (Core.AOS ? Layer.Invalid : Layer.OneHanded);
|
||||
|
||||
m_Entries = new ArrayList();
|
||||
m_Entries = new List<RunebookEntry>();
|
||||
|
||||
m_MaxCharges = maxCharges;
|
||||
|
||||
|
|
@ -109,7 +109,7 @@ namespace Server.Items
|
|||
{
|
||||
}
|
||||
|
||||
public ArrayList Entries
|
||||
public List<RunebookEntry> Entries
|
||||
{
|
||||
get
|
||||
{
|
||||
|
|
@ -122,7 +122,7 @@ namespace Server.Items
|
|||
get
|
||||
{
|
||||
if ( m_DefaultIndex >= 0 && m_DefaultIndex < m_Entries.Count )
|
||||
return (RunebookEntry)m_Entries[m_DefaultIndex];
|
||||
return m_Entries[m_DefaultIndex];
|
||||
|
||||
return null;
|
||||
}
|
||||
|
|
@ -163,7 +163,7 @@ namespace Server.Items
|
|||
writer.Write( m_Entries.Count );
|
||||
|
||||
for ( int i = 0; i < m_Entries.Count; ++i )
|
||||
((RunebookEntry)m_Entries[i]).Serialize( writer );
|
||||
m_Entries[i].Serialize( writer );
|
||||
|
||||
writer.Write( m_Description );
|
||||
writer.Write( m_CurCharges );
|
||||
|
|
@ -198,7 +198,7 @@ namespace Server.Items
|
|||
{
|
||||
int count = reader.ReadInt();
|
||||
|
||||
m_Entries = new ArrayList( count );
|
||||
m_Entries = new List<RunebookEntry>( count );
|
||||
|
||||
for ( int i = 0; i < count; ++i )
|
||||
m_Entries.Add( new RunebookEntry( reader ) );
|
||||
|
|
@ -294,29 +294,6 @@ namespace Server.Items
|
|||
NextUse = DateTime.Now + UseDelay;
|
||||
}
|
||||
|
||||
/*
|
||||
public override Item Dupe( int amount )
|
||||
{
|
||||
Runebook book = new Runebook();
|
||||
|
||||
book.m_Level = m_Level;
|
||||
book.m_CurCharges = m_CurCharges;
|
||||
book.m_MaxCharges = m_MaxCharges;
|
||||
book.m_DefaultIndex = m_DefaultIndex;
|
||||
book.m_Description = m_Description;
|
||||
book.m_Level = m_Level;
|
||||
book.LootType = this.LootType;
|
||||
|
||||
for( int i = 0; i < m_Entries.Count; i++ )
|
||||
{
|
||||
RunebookEntry entry = m_Entries[i] as RunebookEntry;
|
||||
|
||||
book.m_Entries.Add( new RunebookEntry( entry.Location, entry.Map, entry.Description, entry.House ) );
|
||||
}
|
||||
|
||||
return base.Dupe( book, amount );
|
||||
}*/
|
||||
|
||||
public override void OnAfterDuped( Item newItem )
|
||||
{
|
||||
Runebook book = newItem as Runebook;
|
||||
|
|
@ -324,11 +301,11 @@ namespace Server.Items
|
|||
if ( book == null )
|
||||
return;
|
||||
|
||||
book.m_Entries = new ArrayList(); //Currently, when duping, it just copies over the ref over the already made blank ArrayList
|
||||
book.m_Entries = new List<RunebookEntry>(); //Currently, when duping, it just copies over the ref over the already made blank ArrayList
|
||||
|
||||
for ( int i = 0; i < m_Entries.Count; i++ )
|
||||
{
|
||||
RunebookEntry entry = m_Entries[i] as RunebookEntry;
|
||||
RunebookEntry entry = m_Entries[i];
|
||||
|
||||
book.m_Entries.Add( new RunebookEntry( entry.Location, entry.Map, entry.Description, entry.House ) );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -227,6 +227,9 @@ namespace Server.Items
|
|||
|
||||
if ( darts.PoisonCharges <= 0 )
|
||||
darts.Poison = null;
|
||||
|
||||
m_UsesRemaining += need;
|
||||
darts.UsesRemaining -= need;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -126,6 +126,9 @@ namespace Server.Misc
|
|||
NetState state = e.State;
|
||||
ClientVersion version = e.Version;
|
||||
|
||||
if ( state.Mobile.AccessLevel > AccessLevel.Player )
|
||||
return;
|
||||
|
||||
if( Required != null && version < Required && ( m_OldClientResponse == OldClientResponse.Kick ||( m_OldClientResponse == OldClientResponse.LenientKick && (DateTime.Now - state.Mobile.CreationTime) > m_AgeLeniency && state.Mobile is PlayerMobile && ((PlayerMobile)state.Mobile).GameTime > m_GameTimeLeniency )))
|
||||
{
|
||||
kickMessage = String.Format( "This server requires your client version be at least {0}.", Required );
|
||||
|
|
|
|||
|
|
@ -26,7 +26,15 @@ namespace Server.Items
|
|||
BlackScales,
|
||||
GreenScales,
|
||||
WhiteScales,
|
||||
BlueScales
|
||||
BlueScales,
|
||||
|
||||
RegularWood = 301,
|
||||
OakWood,
|
||||
AshWood,
|
||||
YewWood,
|
||||
Heartwood,
|
||||
Bloodwood,
|
||||
Frostwood
|
||||
}
|
||||
|
||||
public enum CraftResourceType
|
||||
|
|
@ -34,7 +42,8 @@ namespace Server.Items
|
|||
None,
|
||||
Metal,
|
||||
Leather,
|
||||
Scales
|
||||
Scales,
|
||||
Wood
|
||||
}
|
||||
|
||||
public class CraftAttributeInfo
|
||||
|
|
@ -95,6 +104,7 @@ namespace Server.Items
|
|||
public static readonly CraftAttributeInfo DullCopper, ShadowIron, Copper, Bronze, Golden, Agapite, Verite, Valorite;
|
||||
public static readonly CraftAttributeInfo Spined, Horned, Barbed;
|
||||
public static readonly CraftAttributeInfo RedScales, YellowScales, BlackScales, GreenScales, WhiteScales, BlueScales;
|
||||
public static readonly CraftAttributeInfo OakWood, AshWood, YewWood, Heartwood, Bloodwood, Frostwood;
|
||||
|
||||
static CraftAttributeInfo()
|
||||
{
|
||||
|
|
@ -271,6 +281,20 @@ namespace Server.Items
|
|||
|
||||
blue.ArmorPoisonResist = -3;
|
||||
blue.ArmorEnergyResist = 10;
|
||||
|
||||
//public static readonly CraftAttributeInfo OakWood, AshWood, YewWood, Heartwood, Bloodwood, Frostwood;
|
||||
|
||||
CraftAttributeInfo oak = OakWood = new CraftAttributeInfo();
|
||||
|
||||
CraftAttributeInfo ash = AshWood = new CraftAttributeInfo();
|
||||
|
||||
CraftAttributeInfo yew = YewWood = new CraftAttributeInfo();
|
||||
|
||||
CraftAttributeInfo heart = Heartwood = new CraftAttributeInfo();
|
||||
|
||||
CraftAttributeInfo blood = Bloodwood = new CraftAttributeInfo();
|
||||
|
||||
CraftAttributeInfo frost = Frostwood = new CraftAttributeInfo();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -335,7 +359,7 @@ namespace Server.Items
|
|||
new CraftResourceInfo( 0x283, 1049354, "Spined", CraftAttributeInfo.Spined, CraftResource.SpinedLeather, typeof( SpinedLeather ), typeof( SpinedHides ) ),
|
||||
new CraftResourceInfo( 0x227, 1049355, "Horned", CraftAttributeInfo.Horned, CraftResource.HornedLeather, typeof( HornedLeather ), typeof( HornedHides ) ),
|
||||
new CraftResourceInfo( 0x1C1, 1049356, "Barbed", CraftAttributeInfo.Barbed, CraftResource.BarbedLeather, typeof( BarbedLeather ), typeof( BarbedHides ) )
|
||||
};
|
||||
};
|
||||
|
||||
private static CraftResourceInfo[] m_AOSLeatherInfo = new CraftResourceInfo[]
|
||||
{
|
||||
|
|
@ -343,14 +367,25 @@ namespace Server.Items
|
|||
new CraftResourceInfo( 0x8AC, 1049354, "Spined", CraftAttributeInfo.Spined, CraftResource.SpinedLeather, typeof( SpinedLeather ), typeof( SpinedHides ) ),
|
||||
new CraftResourceInfo( 0x845, 1049355, "Horned", CraftAttributeInfo.Horned, CraftResource.HornedLeather, typeof( HornedLeather ), typeof( HornedHides ) ),
|
||||
new CraftResourceInfo( 0x851, 1049356, "Barbed", CraftAttributeInfo.Barbed, CraftResource.BarbedLeather, typeof( BarbedLeather ), typeof( BarbedHides ) ),
|
||||
};
|
||||
};
|
||||
|
||||
private static CraftResourceInfo[] m_WoodInfo = new CraftResourceInfo[]
|
||||
{
|
||||
new CraftResourceInfo( 0x000, 1011542, "Normal", CraftAttributeInfo.Blank, CraftResource.RegularWood, typeof( Log ), typeof( Board ) ),
|
||||
new CraftResourceInfo( 0x7DA, 1072533, "Oak", CraftAttributeInfo.OakWood, CraftResource.OakWood, typeof( OakLog ), typeof( OakBoard ) ),
|
||||
new CraftResourceInfo( 0x4A7, 1072534, "Ash", CraftAttributeInfo.AshWood, CraftResource.AshWood, typeof( AshLog ), typeof( AshBoard ) ),
|
||||
new CraftResourceInfo( 0x4A8, 1072535, "Yew", CraftAttributeInfo.YewWood, CraftResource.YewWood, typeof( YewLog ), typeof( YewBoard ) ),
|
||||
new CraftResourceInfo( 0x4A9, 1072536, "Heartwood", CraftAttributeInfo.Heartwood, CraftResource.Heartwood, typeof( HeartwoodLog ), typeof( HeartwoodBoard ) ),
|
||||
new CraftResourceInfo( 0x4AA, 1072538, "Bloodwood", CraftAttributeInfo.Bloodwood, CraftResource.Bloodwood, typeof( BloodwoodLog ), typeof( BloodwoodBoard ) ),
|
||||
new CraftResourceInfo( 0x47F, 1072539, "Frostwood", CraftAttributeInfo.Frostwood, CraftResource.Frostwood, typeof( FrostwoodLog ), typeof( FrostwoodBoard ) )
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if '<paramref name="resource"/>' is None, Iron, or RegularLeather. False if otherwise.
|
||||
/// Returns true if '<paramref name="resource"/>' is None, Iron, RegularLeather or RegularWood. False if otherwise.
|
||||
/// </summary>
|
||||
public static bool IsStandard( CraftResource resource )
|
||||
{
|
||||
return ( resource == CraftResource.None || resource == CraftResource.Iron || resource == CraftResource.RegularLeather );
|
||||
return ( resource == CraftResource.None || resource == CraftResource.Iron || resource == CraftResource.RegularLeather || resource == CraftResource.RegularWood );
|
||||
}
|
||||
|
||||
private static Hashtable m_TypeTable;
|
||||
|
|
@ -394,6 +429,7 @@ namespace Server.Items
|
|||
case CraftResourceType.Metal: list = m_MetalInfo; break;
|
||||
case CraftResourceType.Leather: list = Core.AOS ? m_AOSLeatherInfo : m_LeatherInfo; break;
|
||||
case CraftResourceType.Scales: list = m_ScaleInfo; break;
|
||||
case CraftResourceType.Wood: list = m_WoodInfo; break;
|
||||
}
|
||||
|
||||
if ( list != null )
|
||||
|
|
@ -421,6 +457,9 @@ namespace Server.Items
|
|||
if ( resource >= CraftResource.RedScales && resource <= CraftResource.BlueScales )
|
||||
return CraftResourceType.Scales;
|
||||
|
||||
if ( resource >= CraftResource.RegularWood && resource <= CraftResource.Frostwood )
|
||||
return CraftResourceType.Wood;
|
||||
|
||||
return CraftResourceType.None;
|
||||
}
|
||||
|
||||
|
|
@ -434,6 +473,7 @@ namespace Server.Items
|
|||
case CraftResourceType.Metal: return CraftResource.Iron;
|
||||
case CraftResourceType.Leather: return CraftResource.RegularLeather;
|
||||
case CraftResourceType.Scales: return CraftResource.RedScales;
|
||||
case CraftResourceType.Wood: return CraftResource.RegularWood;
|
||||
}
|
||||
|
||||
return CraftResource.None;
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ namespace Server.Misc
|
|||
m.SendLocalizedMessage( 1019063 ); // You have lost a little karma.
|
||||
}
|
||||
|
||||
if ( wasPositiveKarma && m.Karma < 0 && m is PlayerMobile && !((PlayerMobile)m).KarmaLocked )
|
||||
if ( !Core.AOS && wasPositiveKarma && m.Karma < 0 && m is PlayerMobile && !((PlayerMobile)m).KarmaLocked )
|
||||
{
|
||||
((PlayerMobile)m).KarmaLocked = true;
|
||||
m.SendLocalizedMessage( 1042511, "", 0x22 ); // Karma is locked. A mantra spoken at a shrine will unlock it again.
|
||||
|
|
|
|||
|
|
@ -164,13 +164,22 @@ namespace Server.Mobiles
|
|||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( (int) 0 );
|
||||
writer.Write( (int) 1 );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
|
||||
if ( version == 0 && PhysicalResistance > 60 )
|
||||
{
|
||||
SetResistance( ResistanceType.Physical, 40, 60 );
|
||||
SetResistance( ResistanceType.Fire, 70, 90 );
|
||||
SetResistance( ResistanceType.Cold, 40, 60 );
|
||||
SetResistance( ResistanceType.Poison, 40, 60 );
|
||||
SetResistance( ResistanceType.Energy, 40, 60 );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -101,16 +101,16 @@ namespace Server.Mobiles
|
|||
|
||||
Add( typeof( JesterHat ), 6 );
|
||||
Add( typeof( FloppyHat ), 3 );
|
||||
Add( typeof( WideBrimHat ), 13 );
|
||||
Add( typeof( WideBrimHat ), 4 );
|
||||
Add( typeof( Cap ), 5 );
|
||||
Add( typeof( SkullCap ), 3 );
|
||||
Add( typeof( Bandana ), 6 );
|
||||
Add( typeof( Bandana ), 3 );
|
||||
Add( typeof( TallStrawHat ), 4 );
|
||||
Add( typeof( StrawHat ), 4 );
|
||||
Add( typeof( WizardsHat ), 5 );
|
||||
Add( typeof( Bonnet ), 4 );
|
||||
Add( typeof( FeatheredHat ), 5 );
|
||||
Add( typeof( TricorneHat ), 13 );
|
||||
Add( typeof( TricorneHat ), 4 );
|
||||
|
||||
Add( typeof( SpoolOfThread ), 9 );
|
||||
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ namespace Server.Multis
|
|||
|
||||
TreasureMapChest.Fill( chest, 2 );
|
||||
|
||||
AddItem( chest, 4, 4, 0 );
|
||||
AddItem( chest, 4, 4, 1 );
|
||||
|
||||
AddMobile( new Orc(), 15, 0, -2, 0 );
|
||||
AddMobile( new Orc(), 15, 0, 1, 0 );
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ namespace Server.Multis
|
|||
|
||||
TreasureMapChest.Fill( chest, 2 );
|
||||
|
||||
AddItem( chest, 4, 4, 0 );
|
||||
AddItem( chest, 4, 4, 1 );
|
||||
|
||||
AddMobile( new Ratman(), 15, 0, -2, 0 );
|
||||
AddMobile( new Ratman(), 15, 0, 1, 0 );
|
||||
|
|
|
|||
|
|
@ -24,11 +24,11 @@ namespace Server.Spells.Necromancy
|
|||
public override int Body{ get{ return Caster.Female ? 747 : 748; } }
|
||||
public override int Hue{ get{ return Caster.Female ? 0 : 0x4001; } }
|
||||
|
||||
public override int PhysResistOffset{ get{ return +10; } }
|
||||
public override int FireResistOffset{ get{ return -25; } }
|
||||
public override int ColdResistOffset{ get{ return -05; } }
|
||||
public override int PoisResistOffset{ get{ return -05; } }
|
||||
public override int NrgyResistOffset{ get{ return -05; } }
|
||||
public override int PhysResistOffset{ get{ return +15; } }
|
||||
public override int FireResistOffset{ get{ return -5; } }
|
||||
public override int ColdResistOffset{ get{ return 0; } }
|
||||
public override int PoisResistOffset{ get{ return 0; } }
|
||||
public override int NrgyResistOffset{ get{ return -5; } }
|
||||
|
||||
public WraithFormSpell( Mobile caster, Item scroll ) : base( caster, scroll, m_Info )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ namespace Server.Spells.Third
|
|||
{
|
||||
item.OnSnoop( Caster );
|
||||
}
|
||||
else if ( item is Corpse && !((Corpse)item).CheckLoot( Caster ) )
|
||||
else if ( item is Corpse && !((Corpse)item).CheckLoot( Caster, null ) )
|
||||
{
|
||||
}
|
||||
else if ( Caster.Region.OnDoubleClick( Caster, item ) )
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ namespace Server.Targets
|
|||
}
|
||||
else
|
||||
{
|
||||
bank.Consume( def, 5, from );
|
||||
bank.Consume( 5, from );
|
||||
|
||||
Item item = new Kindling();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue