fixes [decorate and adds timestamp to world save (#87)
This commit is contained in:
parent
d7f0227268
commit
717e192cf7
65 changed files with 261 additions and 118 deletions
|
|
@ -1,3 +1,4 @@
|
|||
using Server.Utilities;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
|
|
@ -19,7 +20,7 @@ namespace Server.Factions
|
|||
{
|
||||
try
|
||||
{
|
||||
return Activator.CreateInstance(Definition.Type) as BaseFactionGuard;
|
||||
return ActivatorUtil.CreateInstance(Definition.Type) as BaseFactionGuard;
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
|
@ -27,4 +28,4 @@ namespace Server.Factions
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
using Server.Utilities;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
|
|
@ -36,7 +37,7 @@ namespace Server.Factions
|
|||
{
|
||||
try
|
||||
{
|
||||
return Activator.CreateInstance(type);
|
||||
return ActivatorUtil.CreateInstance(type);
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
using Server.Utilities;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
|
|
@ -19,7 +20,7 @@ namespace Server.Factions
|
|||
{
|
||||
try
|
||||
{
|
||||
return Activator.CreateInstance(Definition.Type, town, faction) as BaseFactionVendor;
|
||||
return ActivatorUtil.CreateInstance(Definition.Type, town, faction) as BaseFactionVendor;
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
|
@ -27,4 +28,4 @@ namespace Server.Factions
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ using System.IO;
|
|||
using Server.Factions;
|
||||
using Server.Mobiles;
|
||||
using Server.Network;
|
||||
using Server.Utilities;
|
||||
|
||||
namespace Server
|
||||
{
|
||||
|
|
@ -174,7 +175,7 @@ namespace Server
|
|||
|
||||
public Type Type{ get; }
|
||||
|
||||
public Item Construct() => Activator.CreateInstance(Type) as Item;
|
||||
public Item Construct() => ActivatorUtil.CreateInstance(Type) as Item;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
using System;
|
||||
using Server.Engines.Craft;
|
||||
using Server.Items;
|
||||
using Server.Utilities;
|
||||
|
||||
namespace Server.Factions
|
||||
{
|
||||
|
|
@ -50,7 +51,7 @@ namespace Server.Factions
|
|||
{
|
||||
try
|
||||
{
|
||||
return Activator.CreateInstance(TrapType, m_Faction, from) as BaseFactionTrap;
|
||||
return ActivatorUtil.CreateInstance(TrapType, m_Faction, from) as BaseFactionTrap;
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue