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

@ -12,6 +12,7 @@ using Server.Spells.Seventh;
using Server.Spells.Sixth;
using Server.Spells.Third;
using Server.Targeting;
using Server.Utilities;
namespace Server.Factions
{
@ -86,7 +87,7 @@ namespace Server.Factions
if (entry.Chance > Utility.Random(100))
{
releaseTime = DateTime.UtcNow + entry.Hold;
return (Spell)Activator.CreateInstance(entry.Spell, mob, null);
return (Spell)ActivatorUtil.CreateInstance(entry.Spell, mob, null);
}
}
@ -656,7 +657,7 @@ namespace Server.Factions
if (types.Count > 1)
spell = new BlessSpell(m_Guard);
else if (types.Count == 1)
spell = Activator.CreateInstance(types[0], m_Guard, null) as Spell;
spell = ActivatorUtil.CreateInstance(types[0], m_Guard, null) as Spell;
}
else if (types.Count > 0)
{
@ -694,7 +695,7 @@ namespace Server.Factions
if (types.Count > 1)
spell = new CurseSpell(m_Guard);
else if (types.Count == 1)
spell = (Spell)Activator.CreateInstance(types[0], m_Guard, null);
spell = (Spell)ActivatorUtil.CreateInstance(types[0], m_Guard, null);
}
}
}