massive branch sync
This commit is contained in:
parent
489bbabe93
commit
b3e8ec0a08
192 changed files with 1249 additions and 1124 deletions
|
|
@ -884,25 +884,28 @@ namespace Server.Factions
|
|||
public const double SkillLossFactor = 1.0 / 3;
|
||||
public static readonly TimeSpan SkillLossPeriod = TimeSpan.FromMinutes( 20.0 );
|
||||
|
||||
private static Hashtable m_SkillLoss = new Hashtable();
|
||||
private static Dictionary<Mobile, SkillLossContext> m_SkillLoss = new Dictionary<Mobile, SkillLossContext>();
|
||||
|
||||
private class SkillLossContext
|
||||
{
|
||||
public Timer m_Timer;
|
||||
public ArrayList m_Mods;
|
||||
public List<SkillMod> m_Mods;
|
||||
}
|
||||
|
||||
public static bool InSkillLoss( Mobile mob )
|
||||
{
|
||||
return m_SkillLoss.ContainsKey( mob );
|
||||
}
|
||||
|
||||
public static void ApplySkillLoss( Mobile mob )
|
||||
{
|
||||
SkillLossContext context = (SkillLossContext)m_SkillLoss[mob];
|
||||
|
||||
if ( context != null )
|
||||
if ( InSkillLoss( mob ) )
|
||||
return;
|
||||
|
||||
context = new SkillLossContext();
|
||||
SkillLossContext context = new SkillLossContext();
|
||||
m_SkillLoss[mob] = context;
|
||||
|
||||
ArrayList mods = context.m_Mods = new ArrayList();
|
||||
List<SkillMod> mods = context.m_Mods = new List<SkillMod>();
|
||||
|
||||
for ( int i = 0; i < mob.Skills.Length; ++i )
|
||||
{
|
||||
|
|
@ -928,18 +931,17 @@ namespace Server.Factions
|
|||
|
||||
public static bool ClearSkillLoss( Mobile mob )
|
||||
{
|
||||
SkillLossContext context = (SkillLossContext)m_SkillLoss[mob];
|
||||
SkillLossContext context;
|
||||
|
||||
if ( context == null ) {
|
||||
if ( !m_SkillLoss.TryGetValue( mob, out context ) )
|
||||
return false;
|
||||
}
|
||||
|
||||
m_SkillLoss.Remove( mob );
|
||||
|
||||
ArrayList mods = context.m_Mods;
|
||||
List<SkillMod> mods = context.m_Mods;
|
||||
|
||||
for ( int i = 0; i < mods.Count; ++i )
|
||||
mob.RemoveSkillMod( (SkillMod) mods[i] );
|
||||
mob.RemoveSkillMod( mods[i] );
|
||||
|
||||
context.m_Timer.Stop();
|
||||
|
||||
|
|
|
|||
|
|
@ -673,7 +673,7 @@ namespace Server.Factions
|
|||
int dexMod = GetStatMod( m_Guard, StatType.Dex );
|
||||
int intMod = GetStatMod( m_Guard, StatType.Int );
|
||||
|
||||
ArrayList types = new ArrayList();
|
||||
List<Type> types = new List<Type>();
|
||||
|
||||
if ( strMod <= 0 )
|
||||
types.Add( typeof( StrengthSpell ) );
|
||||
|
|
@ -689,7 +689,7 @@ namespace Server.Factions
|
|||
if ( types.Count > 1 )
|
||||
spell = new BlessSpell( m_Guard, null );
|
||||
else if ( types.Count == 1 )
|
||||
spell = (Spell) Activator.CreateInstance( (Type) types[0], new object[]{ m_Guard, null } );
|
||||
spell = (Spell) Activator.CreateInstance( types[0], new object[]{ m_Guard, null } );
|
||||
}
|
||||
else if ( types.Count > 0 )
|
||||
{
|
||||
|
|
@ -712,7 +712,7 @@ namespace Server.Factions
|
|||
int dexMod = GetStatMod( combatant, StatType.Dex );
|
||||
int intMod = GetStatMod( combatant, StatType.Int );
|
||||
|
||||
ArrayList types = new ArrayList();
|
||||
List<Type> types = new List<Type>();
|
||||
|
||||
if ( strMod >= 0 )
|
||||
types.Add( typeof( WeakenSpell ) );
|
||||
|
|
@ -726,7 +726,7 @@ namespace Server.Factions
|
|||
if ( types.Count > 1 )
|
||||
spell = new CurseSpell( m_Guard, null );
|
||||
else if ( types.Count == 1 )
|
||||
spell = (Spell) Activator.CreateInstance( (Type) types[0], new object[]{ m_Guard, null } );
|
||||
spell = (Spell) Activator.CreateInstance( types[0], new object[]{ m_Guard, null } );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
using Server.Mobiles;
|
||||
|
||||
|
|
@ -44,8 +44,8 @@ namespace Server.Factions
|
|||
m_Town.UnregisterVendor( this );
|
||||
}
|
||||
|
||||
private ArrayList m_SBInfos = new ArrayList();
|
||||
protected override ArrayList SBInfos{ get { return m_SBInfos; } }
|
||||
private List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
protected override List<SBInfo> SBInfos{ get { return m_SBInfos; } }
|
||||
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
|
@ -47,7 +47,7 @@ namespace Server.Factions
|
|||
|
||||
public class SBFactionBoard : SBInfo
|
||||
{
|
||||
private ArrayList m_BuyInfo = new InternalBuyInfo();
|
||||
private List<GenericBuyInfo> m_BuyInfo = new InternalBuyInfo();
|
||||
private IShopSellInfo m_SellInfo = new InternalSellInfo();
|
||||
|
||||
public SBFactionBoard()
|
||||
|
|
@ -55,9 +55,9 @@ namespace Server.Factions
|
|||
}
|
||||
|
||||
public override IShopSellInfo SellInfo { get { return m_SellInfo; } }
|
||||
public override ArrayList BuyInfo { get { return m_BuyInfo; } }
|
||||
public override List<GenericBuyInfo> BuyInfo { get { return m_BuyInfo; } }
|
||||
|
||||
public class InternalBuyInfo : ArrayList
|
||||
public class InternalBuyInfo : List<GenericBuyInfo>
|
||||
{
|
||||
public InternalBuyInfo()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
|
@ -52,7 +52,7 @@ namespace Server.Factions
|
|||
|
||||
public class SBFactionBottle : SBInfo
|
||||
{
|
||||
private ArrayList m_BuyInfo = new InternalBuyInfo();
|
||||
private List<GenericBuyInfo> m_BuyInfo = new InternalBuyInfo();
|
||||
private IShopSellInfo m_SellInfo = new InternalSellInfo();
|
||||
|
||||
public SBFactionBottle()
|
||||
|
|
@ -60,9 +60,9 @@ namespace Server.Factions
|
|||
}
|
||||
|
||||
public override IShopSellInfo SellInfo { get { return m_SellInfo; } }
|
||||
public override ArrayList BuyInfo { get { return m_BuyInfo; } }
|
||||
public override List<GenericBuyInfo> BuyInfo { get { return m_BuyInfo; } }
|
||||
|
||||
public class InternalBuyInfo : ArrayList
|
||||
public class InternalBuyInfo : List<GenericBuyInfo>
|
||||
{
|
||||
public InternalBuyInfo()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ using Server;
|
|||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
using Server.Network;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Server.Factions
|
||||
{
|
||||
|
|
@ -55,12 +56,12 @@ namespace Server.Factions
|
|||
{
|
||||
}
|
||||
|
||||
public override bool OnBuyItems( Mobile buyer, ArrayList list )
|
||||
public override bool OnBuyItems( Mobile buyer, List<BuyItemResponse> list )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool OnSellItems( Mobile seller, ArrayList list )
|
||||
public override bool OnSellItems( Mobile seller, List<SellItemResponse> list )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
|
@ -48,7 +48,7 @@ namespace Server.Factions
|
|||
|
||||
public class SBFactionOre : SBInfo
|
||||
{
|
||||
private ArrayList m_BuyInfo = new InternalBuyInfo();
|
||||
private List<GenericBuyInfo> m_BuyInfo = new InternalBuyInfo();
|
||||
private IShopSellInfo m_SellInfo = new InternalSellInfo();
|
||||
|
||||
public SBFactionOre()
|
||||
|
|
@ -56,9 +56,9 @@ namespace Server.Factions
|
|||
}
|
||||
|
||||
public override IShopSellInfo SellInfo { get { return m_SellInfo; } }
|
||||
public override ArrayList BuyInfo { get { return m_BuyInfo; } }
|
||||
public override List<GenericBuyInfo> BuyInfo { get { return m_BuyInfo; } }
|
||||
|
||||
public class InternalBuyInfo : ArrayList
|
||||
public class InternalBuyInfo : List<GenericBuyInfo>
|
||||
{
|
||||
public InternalBuyInfo()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
|
@ -57,7 +57,7 @@ namespace Server.Factions
|
|||
|
||||
public class SBFactionReagent : SBInfo
|
||||
{
|
||||
private ArrayList m_BuyInfo = new InternalBuyInfo();
|
||||
private List<GenericBuyInfo> m_BuyInfo = new InternalBuyInfo();
|
||||
private IShopSellInfo m_SellInfo = new InternalSellInfo();
|
||||
|
||||
public SBFactionReagent()
|
||||
|
|
@ -65,9 +65,9 @@ namespace Server.Factions
|
|||
}
|
||||
|
||||
public override IShopSellInfo SellInfo { get { return m_SellInfo; } }
|
||||
public override ArrayList BuyInfo { get { return m_BuyInfo; } }
|
||||
public override List<GenericBuyInfo> BuyInfo { get { return m_BuyInfo; } }
|
||||
|
||||
public class InternalBuyInfo : ArrayList
|
||||
public class InternalBuyInfo : List<GenericBuyInfo>
|
||||
{
|
||||
public InternalBuyInfo()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue