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

@ -196,6 +196,11 @@ namespace Server
{
}
public AosAttributes( Item owner, AosAttributes other )
: base( owner, other )
{
}
public AosAttributes( Item owner, GenericReader reader )
: base( owner, reader )
{
@ -377,6 +382,11 @@ namespace Server
{
}
public AosWeaponAttributes( Item owner, AosWeaponAttributes other )
: base( owner, other )
{
}
public AosWeaponAttributes( Item owner, GenericReader reader )
: base( owner, reader )
{
@ -514,6 +524,11 @@ namespace Server
{
}
public AosArmorAttributes( Item owner, AosArmorAttributes other )
: base( owner, other )
{
}
public static int GetValue( Mobile m, AosArmorAttribute attribute )
{
if( !Core.AOS )
@ -571,7 +586,7 @@ namespace Server
public sealed class AosSkillBonuses : BaseAttributes
{
private ArrayList m_Mods;
private List<SkillMod> m_Mods;
public AosSkillBonuses( Item owner )
: base( owner )
@ -583,6 +598,11 @@ namespace Server
{
}
public AosSkillBonuses( Item owner, AosSkillBonuses other )
: base( owner, other )
{
}
public void GetProperties( ObjectPropertyList list )
{
for( int i = 0; i < 5; ++i )
@ -610,7 +630,7 @@ namespace Server
continue;
if( m_Mods == null )
m_Mods = new ArrayList();
m_Mods = new List<SkillMod>();
SkillMod sk = new DefaultSkillMod( skill, true, bonus );
sk.ObeyCap = true;
@ -625,7 +645,7 @@ namespace Server
return;
for( int i = 0; i < m_Mods.Count; ++i )
((SkillMod)m_Mods[i]).Remove();
m_Mods[i].Remove();
m_Mods = null;
}
@ -756,6 +776,11 @@ namespace Server
{
}
public AosElementAttributes( Item owner, AosElementAttributes other )
: base( owner, other )
{
}
public AosElementAttributes( Item owner, GenericReader reader )
: base( owner, reader )
{
@ -806,6 +831,14 @@ namespace Server
m_Values = m_Empty;
}
public BaseAttributes( Item owner, BaseAttributes other )
{
m_Owner = owner;
m_Values = new int[other.m_Values.Length];
other.m_Values.CopyTo( m_Values, 0 );
m_Names = other.m_Names;
}
public BaseAttributes( Item owner, GenericReader reader )
{
m_Owner = owner;

View file

@ -65,17 +65,18 @@ namespace Server.Misc
if( from == null || target == null || from.AccessLevel > AccessLevel.Player || target.AccessLevel > AccessLevel.Player )
return true;
Map map = from.Map;
#region Factions
Faction targetFaction = Faction.Find( target, true );
if( targetFaction != null )
if( (!Core.ML || map == Faction.Facet) && targetFaction != null )
{
if( Faction.Find( from, true ) != targetFaction )
return false;
}
#endregion
Map map = from.Map;
if( map != null && (map.Rules & MapRules.BeneficialRestrictions) == 0 )
return true; // In felucca, anything goes