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
|
|
@ -3,6 +3,7 @@ using System.Collections.Generic;
|
|||
using Server.ContextMenus;
|
||||
using Server.Multis;
|
||||
using Server.Network;
|
||||
using Server.Utilities;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
|
|
@ -692,7 +693,7 @@ namespace Server.Items
|
|||
|
||||
try
|
||||
{
|
||||
item = Activator.CreateInstance(m_Decorations[random]) as Item;
|
||||
item = ActivatorUtil.CreateInstance(m_Decorations[random]) as Item;
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ using Server.Engines.Craft;
|
|||
using Server.Ethics;
|
||||
using Server.Factions;
|
||||
using Server.Network;
|
||||
using Server.Utilities;
|
||||
using AMA = Server.Items.ArmorMeditationAllowance;
|
||||
using AMT = Server.Items.ArmorMaterialType;
|
||||
|
||||
|
|
@ -560,7 +561,7 @@ namespace Server.Items
|
|||
if (item?.Resources.Count == 1 && item.Resources.GetAt(0).Amount >= 2)
|
||||
try
|
||||
{
|
||||
Item res = (Item)Activator.CreateInstance(CraftResources.GetInfo(m_Resource).ResourceTypes[0]);
|
||||
Item res = (Item)ActivatorUtil.CreateInstance(CraftResources.GetInfo(m_Resource).ResourceTypes[0]);
|
||||
|
||||
ScissorHelper(from, res, PlayerConstructed ? item.Resources.GetAt(0).Amount / 2 : 1);
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ using Server.Engines.Craft;
|
|||
using Server.Ethics;
|
||||
using Server.Factions;
|
||||
using Server.Network;
|
||||
using Server.Utilities;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
|
|
@ -210,7 +211,7 @@ namespace Server.Items
|
|||
|
||||
Type resourceType = info.ResourceTypes?[0] ?? item.Resources.GetAt(0).ItemType;
|
||||
|
||||
Item res = (Item)Activator.CreateInstance(resourceType);
|
||||
Item res = (Item)ActivatorUtil.CreateInstance(resourceType);
|
||||
|
||||
ScissorHelper(from, res, PlayerConstructed ? item.Resources.GetAt(0).Amount / 2 : 1);
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ using System.Linq;
|
|||
using Server.ContextMenus;
|
||||
using Server.Engines.Craft;
|
||||
using Server.Network;
|
||||
using Server.Utilities;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
|
|
@ -77,7 +78,7 @@ namespace Server.Items
|
|||
};
|
||||
|
||||
Type resourceType = info.ResourceTypes[0];
|
||||
Item ingot = (Item)Activator.CreateInstance(resourceType);
|
||||
Item ingot = (Item)ActivatorUtil.CreateInstance(resourceType);
|
||||
|
||||
if (item is DragonBardingDeed || item is BaseArmor armor && armor.PlayerConstructed ||
|
||||
item is BaseWeapon weapon && weapon.PlayerConstructed ||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ using Server.ContextMenus;
|
|||
using Server.Engines.PartySystem;
|
||||
using Server.Gumps;
|
||||
using Server.Network;
|
||||
using Server.Utilities;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
|
|
@ -286,7 +287,7 @@ namespace Server.Items
|
|||
}
|
||||
|
||||
if (level == 6 && Core.AOS)
|
||||
cont.DropItem((Item)Activator.CreateInstance(Artifacts[Utility.Random(Artifacts.Length)]));
|
||||
cont.DropItem((Item)ActivatorUtil.CreateInstance(Artifacts[Utility.Random(Artifacts.Length)]));
|
||||
}
|
||||
|
||||
public override bool CheckLocked(Mobile from)
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
using Server.Utilities;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
|
|
@ -316,7 +317,7 @@ namespace Server.Items
|
|||
|
||||
public Item CreateInstance()
|
||||
{
|
||||
Item item = (Item)Activator.CreateInstance(Type);
|
||||
Item item = (Item)ActivatorUtil.CreateInstance(Type);
|
||||
|
||||
if (Hue > 0)
|
||||
item.Hue = Hue;
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ using Server.Engines.Harvest;
|
|||
using Server.Mobiles;
|
||||
using Server.Network;
|
||||
using Server.Targeting;
|
||||
using Server.Utilities;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
|
|
@ -224,7 +225,7 @@ namespace Server.Items
|
|||
|
||||
try
|
||||
{
|
||||
bc = (BaseCreature)Activator.CreateInstance(
|
||||
bc = (BaseCreature)ActivatorUtil.CreateInstance(
|
||||
m_SpawnTypes[level][Utility.Random(m_SpawnTypes[level].Length)]);
|
||||
}
|
||||
catch
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
using Server.Network;
|
||||
using Server.Utilities;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
|
|
@ -195,7 +196,7 @@ namespace Server.Items
|
|||
{
|
||||
Map map = Map;
|
||||
BaseCreature bc =
|
||||
(BaseCreature)Activator.CreateInstance(Creatures[Utility.Random(Creatures.Length)]);
|
||||
(BaseCreature)ActivatorUtil.CreateInstance(Creatures[Utility.Random(Creatures.Length)]);
|
||||
|
||||
Point3D spawnLoc = GetSpawnPosition();
|
||||
|
||||
|
|
@ -230,4 +231,4 @@ namespace Server.Items
|
|||
from.SendLocalizedMessage(500446); // That is too far away.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ using System;
|
|||
using System.Collections.Generic;
|
||||
using Server.Engines.ConPVP;
|
||||
using Server.Engines.Craft;
|
||||
using Server.Utilities;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
|
|
@ -141,7 +142,7 @@ namespace Server.Items
|
|||
{
|
||||
if (this is BaseExplosionPotion && Amount > 1)
|
||||
{
|
||||
BasePotion pot = (BasePotion)Activator.CreateInstance(GetType());
|
||||
BasePotion pot = (BasePotion)ActivatorUtil.CreateInstance(GetType());
|
||||
|
||||
Amount--;
|
||||
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ using Server.Spells.Chivalry;
|
|||
using Server.Spells.Necromancy;
|
||||
using Server.Spells.Ninjitsu;
|
||||
using Server.Targeting;
|
||||
using Server.Utilities;
|
||||
|
||||
/*
|
||||
* There really was no prettier way to do this, other than the one
|
||||
|
|
@ -85,7 +86,7 @@ namespace Server.Items
|
|||
{
|
||||
if (weapon.UsesRemaining > 0)
|
||||
{
|
||||
INinjaAmmo ammo = Activator.CreateInstance(weapon.AmmoType, weapon.UsesRemaining) as INinjaAmmo;
|
||||
INinjaAmmo ammo = ActivatorUtil.CreateInstance(weapon.AmmoType, weapon.UsesRemaining) as INinjaAmmo;
|
||||
|
||||
ammo.Poison = weapon.Poison;
|
||||
ammo.PoisonCharges = weapon.PoisonCharges;
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ using Server.Spells.Fourth;
|
|||
using Server.Spells.Necromancy;
|
||||
using Server.Spells.Second;
|
||||
using Server.Targeting;
|
||||
using Server.Utilities;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
|
|
@ -228,7 +229,7 @@ namespace Server.Items
|
|||
|
||||
try
|
||||
{
|
||||
obj = Activator.CreateInstance(type);
|
||||
obj = ActivatorUtil.CreateInstance(type);
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
|
@ -260,7 +261,7 @@ namespace Server.Items
|
|||
from.PlaceInBackpack(item);
|
||||
|
||||
if (i + 1 < count)
|
||||
item = Activator.CreateInstance(type) as Item;
|
||||
item = ActivatorUtil.CreateInstance(type) as Item;
|
||||
}
|
||||
|
||||
if (item is Board)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue