branch sync #2

This commit is contained in:
mark 2009-01-31 00:02:21 +00:00
parent 96a37544fd
commit 4e6256b8cd
39 changed files with 415 additions and 137 deletions

View file

@ -3324,8 +3324,13 @@ namespace Server.Mobiles
{
Skills[name].BaseFixedPoint = (int)(val * 10);
if ( Skills[name].Base > Skills[name].Cap )
if ( Skills[name].Base > Skills[name].Cap )
{
if ( Core.SE )
this.SkillsCap += ( Skills[name].BaseFixedPoint - Skills[name].CapFixedPoint );
Skills[name].Cap = Skills[name].Base;
}
}
public void SetSkill( SkillName name, double min, double max )
@ -3335,8 +3340,13 @@ namespace Server.Mobiles
Skills[name].BaseFixedPoint = Utility.RandomMinMax( minFixed, maxFixed );
if ( Skills[name].Base > Skills[name].Cap )
if ( Skills[name].Base > Skills[name].Cap )
{
if ( Core.SE )
this.SkillsCap += ( Skills[name].BaseFixedPoint - Skills[name].CapFixedPoint );
Skills[name].Cap = Skills[name].Base;
}
}
public void SetFameLevel( int level )
@ -3990,6 +4000,11 @@ namespace Server.Mobiles
}
public static List<DamageStore> GetLootingRights( List<DamageEntry> damageEntries, int hitsMax )
{
return GetLootingRights( damageEntries, hitsMax, false );
}
public static List<DamageStore> GetLootingRights( List<DamageEntry> damageEntries, int hitsMax, bool partyAsIndividual )
{
List<DamageStore> rights = new List<DamageStore>();
@ -4664,7 +4679,7 @@ namespace Server.Mobiles
return base.CanBeDamaged();
}
public virtual bool PlayerRangeSensitive{ get{ return true; } }
public virtual bool PlayerRangeSensitive{ get{ return (this.CurrentWayPoint == null); } } //If they are following a waypoint, they'll continue to follow it even if players aren't around
public override void OnSectorDeactivate()
{

View file

@ -313,6 +313,12 @@ namespace Server.Engines.Craft
private static Type[][] m_TypesTable = new Type[][]
{
new Type[]{ typeof( Log ), typeof( Board ) },
new Type[]{ typeof( HeartwoodLog ), typeof( HeartwoodBoard ) },
new Type[]{ typeof( BloodwoodLog ), typeof( BloodwoodBoard ) },
new Type[]{ typeof( FrostwoodLog ), typeof( FrostwoodBoard ) },
new Type[]{ typeof( OakLog ), typeof( OakBoard ) },
new Type[]{ typeof( AshLog ), typeof( YewBoard ) },
new Type[]{ typeof( YewLog ), typeof( YewBoard ) },
new Type[]{ typeof( Leather ), typeof( Hides ) },
new Type[]{ typeof( SpinedLeather ), typeof( SpinedHides ) },
new Type[]{ typeof( HornedLeather ), typeof( HornedHides ) },

View file

@ -352,6 +352,18 @@ namespace Server.Engines.Craft
MarkOption = true;
Repair = Core.AOS;
SetSubRes( typeof( Log ), 1072643 );
// Add every material you want the player to be able to choose from
// This will override the overridable material TODO: Verify the required skill amount
AddSubRes( typeof( Log ), 1072643, 00.0, 1044041, 1072652 );
AddSubRes( typeof( OakLog ), 1072644, 65.0, 1044041, 1072652 );
AddSubRes( typeof( AshLog ), 1072645, 80.0, 1044041, 1072652 );
AddSubRes( typeof( YewLog ), 1072646, 95.0, 1044041, 1072652 );
AddSubRes( typeof( HeartwoodLog ), 1072647, 100.0, 1044041, 1072652 );
AddSubRes( typeof( BloodwoodLog ), 1072648, 100.0, 1044041, 1072652 );
AddSubRes( typeof( FrostwoodLog ), 1072649, 100.0, 1044041, 1072652 );
}
}
}

View file

@ -202,7 +202,7 @@ namespace Server.Engines.Craft
AddSpell( typeof( FireballScroll ), Reg.BlackPearl );
AddSpell( typeof( MagicLockScroll ), Reg.Bloodmoss, Reg.Garlic, Reg.SulfurousAsh );
AddSpell( typeof( PoisonScroll ), Reg.Nightshade );
AddSpell( typeof( TelekinisisScroll ), Reg.Garlic, Reg.SpidersSilk, Reg.SulfurousAsh );
AddSpell( typeof( TelekinisisScroll ), Reg.Bloodmoss, Reg.MandrakeRoot );
AddSpell( typeof( TeleportScroll ), Reg.Bloodmoss, Reg.MandrakeRoot );
AddSpell( typeof( UnlockScroll ), Reg.Bloodmoss, Reg.SulfurousAsh );
AddSpell( typeof( WallOfStoneScroll ), Reg.Bloodmoss, Reg.Garlic );

View file

@ -424,7 +424,9 @@ namespace Server.Factions
else if ( !Guild.NewGuildSystem && guild.Type != GuildType.Regular )
pm.SendLocalizedMessage( 1042161 ); // You cannot join a faction because your guild is an Order or Chaos type.
else if ( !Guild.NewGuildSystem && guild.Enemies != null && guild.Enemies.Count > 0 ) //CAN join w/wars in new system
pm.SendLocalizedMessage( 1005056 ); // You cannot join a faction with active Wars
pm.SendLocalizedMessage( 1005056 ); // You cannot join a faction with active Wars
else if ( Guild.NewGuildSystem && guild.Alliance != null )
pm.SendLocalizedMessage( 1080454 ); // Your guild cannot join a faction while in alliance with non-factioned guilds.
else if ( !CanHandleInflux( guild.Members.Count ) )
pm.SendLocalizedMessage( 1018031 ); // In the interest of faction stability, this faction declines to accept new members for now.
else

View file

@ -16,6 +16,7 @@ namespace Server.Factions
private string m_FriendlyName;
private string m_Keyword;
private string m_Abbreviation;
private TextDefinition m_Name;
private TextDefinition m_PropName;
@ -46,6 +47,7 @@ namespace Server.Factions
public string FriendlyName{ get{ return m_FriendlyName; } }
public string Keyword{ get{ return m_Keyword; } }
public string Abbreviation{ get { return m_Abbreviation; } }
public TextDefinition Name{ get{ return m_Name; } }
public TextDefinition PropName{ get{ return m_PropName; } }
@ -66,7 +68,7 @@ namespace Server.Factions
public RankDefinition[] Ranks{ get{ return m_Ranks; } }
public GuardDefinition[] Guards{ get{ return m_Guards; } }
public FactionDefinition( int sort, int huePrimary, int hueSecondary, int hueJoin, int hueBroadcast, int warHorseBody, int warHorseItem, string friendlyName, string keyword, TextDefinition name, TextDefinition propName, TextDefinition header, TextDefinition about, TextDefinition cityControl, TextDefinition sigilControl, TextDefinition signupName, TextDefinition factionStoneName, TextDefinition ownerLabel, TextDefinition guardIgnore, TextDefinition guardWarn, TextDefinition guardAttack, StrongholdDefinition stronghold, RankDefinition[] ranks, GuardDefinition[] guards )
public FactionDefinition( int sort, int huePrimary, int hueSecondary, int hueJoin, int hueBroadcast, int warHorseBody, int warHorseItem, string friendlyName, string keyword, string abbreviation, TextDefinition name, TextDefinition propName, TextDefinition header, TextDefinition about, TextDefinition cityControl, TextDefinition sigilControl, TextDefinition signupName, TextDefinition factionStoneName, TextDefinition ownerLabel, TextDefinition guardIgnore, TextDefinition guardWarn, TextDefinition guardAttack, StrongholdDefinition stronghold, RankDefinition[] ranks, GuardDefinition[] guards )
{
m_Sort = sort;
m_HuePrimary = huePrimary;
@ -77,6 +79,7 @@ namespace Server.Factions
m_WarHorseItem = warHorseItem;
m_FriendlyName = friendlyName;
m_Keyword = keyword;
m_Abbreviation = abbreviation;
m_Name = name;
m_PropName = propName;
m_Header = header;

View file

@ -21,7 +21,7 @@ namespace Server.Factions
1325, // join stone : blue
1325, // broadcast : blue
0x77, 0x3EB1, // war horse
"Council of Mages", "council",
"Council of Mages", "council", "CoM",
new TextDefinition( 1011535, "COUNCIL OF MAGES" ),
new TextDefinition( 1060770, "Council of Mages faction" ),
new TextDefinition( 1011422, "<center>COUNCIL OF MAGES</center>" ),

View file

@ -21,7 +21,7 @@ namespace Server.Factions
1645, // join stone : dark red
1645, // broadcast : dark red
0x78, 0x3EAF, // war horse
"Minax", "minax",
"Minax", "minax", "Min",
new TextDefinition( 1011534, "MINAX" ),
new TextDefinition( 1060769, "Minax faction" ),
new TextDefinition( 1011421, "<center>FOLLOWERS OF MINAX</center>" ),

View file

@ -21,7 +21,7 @@ namespace Server.Factions
1109, // join stone : shadow
2211, // broadcast : green
0x79, 0x3EB0, // war horse
"Shadowlords", "shadow",
"Shadowlords", "shadow", "SL",
new TextDefinition( 1011537, "SHADOWLORDS" ),
new TextDefinition( 1060772, "Shadowlords faction" ),
new TextDefinition( 1011424, "<center>SHADES OF DARKNESS</center>" ),

View file

@ -21,7 +21,7 @@ namespace Server.Factions
2214, // join stone : gold
2125, // broadcast : gold
0x76, 0x3EB2, // war horse
"True Britannians", "true",
"True Britannians", "true", "TB",
new TextDefinition( 1011536, "LORD BRITISH" ),
new TextDefinition( 1060771, "True Britannians faction" ),
new TextDefinition( 1011423, "<center>TRUE BRITANNIANS</center>" ),

View file

@ -30,6 +30,14 @@ namespace Server.Factions
m_Town.RegisterVendor( this );
}
public override bool OnMoveOver( Mobile m )
{
if ( Core.ML )
return true;
return base.OnMoveOver( m );
}
public void Unregister()
{
if ( m_Town != null )

View file

@ -88,13 +88,13 @@ namespace Server.Engines.Harvest
veins = new HarvestVein[]
{
new HarvestVein( 58.4, 0.0, res[0], null ), // Ordinary Logs
new HarvestVein( 49.0, 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
new HarvestVein( 05.0, 0.5, res[3], res[0] ), // Yew
new HarvestVein( 03.0, 0.5, res[4], res[0] ), // Heartwood
new HarvestVein( 02.0, 0.5, res[5], res[0] ), // Bloodwood
new HarvestVein( 01.0, 0.5, res[6], res[0] ), // Frostwood
};
lumber.BonusResources = new BonusHarvestResource[]

View file

@ -38,6 +38,8 @@ namespace Server.Mobiles
}
}
public virtual int CreaturesNameCount { get { return m_CreaturesName.Count; } }
public override void OnAfterDuped( Item newItem )
{
Spawner s = newItem as Spawner;
@ -244,7 +246,7 @@ namespace Server.Mobiles
{
if ( !m_Running )
{
if ( m_CreaturesName.Count > 0 )
if ( CreaturesNameCount > 0 )
{
m_Running = true;
DoTimer();
@ -346,8 +348,8 @@ namespace Server.Mobiles
public void Spawn()
{
if ( m_CreaturesName.Count > 0 )
Spawn( Utility.Random( m_CreaturesName.Count ) );
if ( CreaturesNameCount > 0 )
Spawn( Utility.Random( CreaturesNameCount ) );
}
public void Spawn( string creatureName )
@ -362,17 +364,11 @@ namespace Server.Mobiles
}
}
public void Spawn( int index )
protected virtual IEntity CreateSpawnedObject( int index )
{
Map map = Map;
if ( index >= m_CreaturesName.Count )
return null;
if ( map == null || map == Map.Internal || m_CreaturesName.Count == 0 || index >= m_CreaturesName.Count || Parent != null )
return;
Defrag();
if ( m_Creatures.Count >= m_Count )
return;
Type type = SpawnerType.GetType( m_CreaturesName[index] );
@ -382,60 +378,81 @@ namespace Server.Mobiles
{
object o = Activator.CreateInstance( type );
if ( o is Mobile )
{
Mobile m = (Mobile)o;
m_Creatures.Add( m );
Point3D loc = ( m is BaseVendor ? this.Location : GetSpawnPosition() );
m.OnBeforeSpawn( loc, map );
InvalidateProperties();
m.MoveToWorld( loc, map );
if ( m is BaseCreature )
{
BaseCreature c = (BaseCreature)m;
if( m_WalkingRange >= 0 )
c.RangeHome = m_WalkingRange;
else
c.RangeHome = m_HomeRange;
c.CurrentWayPoint = m_WayPoint;
if ( m_Team > 0 )
c.Team = m_Team;
c.Home = this.Location;
}
m.OnAfterSpawn();
}
else if ( o is Item )
{
Item item = (Item)o;
m_Creatures.Add( item );
Point3D loc = GetSpawnPosition();
item.OnBeforeSpawn( loc, map );
InvalidateProperties();
item.MoveToWorld( loc, map );
item.OnAfterSpawn();
}
return ( o as IEntity );
}
catch
{
}
}
return null;
}
public void Spawn( int index )
{
Map map = Map;
if ( map == null || map == Map.Internal || CreaturesNameCount == 0 || index >= CreaturesNameCount || Parent != null )
return;
Defrag();
if ( m_Creatures.Count >= m_Count )
return;
IEntity ent = CreateSpawnedObject( index );
if ( ent is Mobile )
{
Mobile m = (Mobile)ent;
m_Creatures.Add( m );
Point3D loc = ( m is BaseVendor ? this.Location : GetSpawnPosition() );
m.OnBeforeSpawn( loc, map );
InvalidateProperties();
m.MoveToWorld( loc, map );
if ( m is BaseCreature )
{
BaseCreature c = (BaseCreature)m;
if( m_WalkingRange >= 0 )
c.RangeHome = m_WalkingRange;
else
c.RangeHome = m_HomeRange;
c.CurrentWayPoint = m_WayPoint;
if ( m_Team > 0 )
c.Team = m_Team;
c.Home = this.Location;
}
m.OnAfterSpawn();
}
else if ( ent is Item )
{
Item item = (Item)ent;
m_Creatures.Add( item );
Point3D loc = GetSpawnPosition();
item.OnBeforeSpawn( loc, map );
InvalidateProperties();
item.MoveToWorld( loc, map );
item.OnAfterSpawn();
}
}
public Point3D GetSpawnPosition()