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:
parent
4d6e584b6c
commit
e9c1e4cbba
66 changed files with 597 additions and 496 deletions
|
|
@ -340,16 +340,11 @@ namespace Server.Engines.Doom
|
|||
return;
|
||||
}
|
||||
|
||||
var obj = ActivatorUtil.CreateInstance(type);
|
||||
var mob = type.CreateEntityInstance<Mobile>();
|
||||
|
||||
if (obj is Item item)
|
||||
{
|
||||
item.Delete();
|
||||
}
|
||||
else if (obj is Mobile mob)
|
||||
if (mob != null)
|
||||
{
|
||||
mob.MoveToWorld(GetWorldLocation(), Map);
|
||||
|
||||
Creatures.Add(mob);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue