fixes [decorate and adds timestamp to world save (#87)

This commit is contained in:
Andrew Fryer 2020-02-19 20:37:12 -05:00 committed by GitHub
parent d7f0227268
commit 717e192cf7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
65 changed files with 261 additions and 118 deletions

View file

@ -23,6 +23,7 @@ using Server.Spells.Necromancy;
using Server.Spells.Sixth;
using Server.Spells.Spellweaving;
using Server.Targeting;
using Server.Utilities;
namespace Server.Mobiles
{
@ -2170,7 +2171,7 @@ namespace Server.Mobiles
return null;
Type type = m_SpellAttack[Utility.Random(m_SpellAttack.Count)];
return Activator.CreateInstance(type, this, null) as Spell;
return ActivatorUtil.CreateInstance(type, this, null) as Spell;
}
public Spell GetDefenseSpellRandom()
@ -2179,7 +2180,7 @@ namespace Server.Mobiles
return null;
Type type = m_SpellDefense[Utility.Random(m_SpellDefense.Count)];
return Activator.CreateInstance(type, this, null) as Spell;
return ActivatorUtil.CreateInstance(type, this, null) as Spell;
}
public Spell GetSpellSpecific(Type type)
@ -2188,11 +2189,11 @@ namespace Server.Mobiles
for (i = 0; i < m_SpellAttack.Count; i++)
if (m_SpellAttack[i] == type)
return Activator.CreateInstance(type, this, null) as Spell;
return ActivatorUtil.CreateInstance(type, this, null) as Spell;
for (i = 0; i < m_SpellDefense.Count; i++)
if (m_SpellDefense[i] == type)
return Activator.CreateInstance(type, this, null) as Spell;
return ActivatorUtil.CreateInstance(type, this, null) as Spell;
return null;
}