Fixes dupe exception (#258)

- [X] Cleans up ActivatorUtil
- [X] Fixes dupe exception
- [X] Fixes a bug in BasePotion
- [X] Fixes a few possible memory leaks

Bumps release version
This commit is contained in:
Kamron Batman 2020-09-19 15:46:07 -07:00 • committed by GitHub
parent 4d6e584b6c
commit e9c1e4cbba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
66 changed files with 597 additions and 496 deletions

View file

@ -343,7 +343,7 @@ namespace Server.Spells.Necromancy
try
{
summoned = ActivatorUtil.CreateInstance(toSummon) as Mobile;
summoned = toSummon.CreateInstance<Mobile>();
}
catch
{

View file

@ -181,7 +181,7 @@ namespace Server.Spells.Necromancy
{
try
{
var bc = (BaseCreature)ActivatorUtil.CreateInstance(entry.Type);
var bc = entry.Type.CreateInstance<BaseCreature>();
// TODO: Is this right?
bc.Skills.MagicResist.Base = m_From.Skills.MagicResist.Base;