chore: Fixes variable types for possible performance issues (#2172)
This commit is contained in:
parent
6d43f2549c
commit
da517f56c4
82 changed files with 332 additions and 343 deletions
|
|
@ -1,7 +1,6 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using ModernUO.CodeGeneratedEvents;
|
||||
using Server.Engines.Quests;
|
||||
using Server.Engines.Quests.Necro;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
|
@ -115,13 +114,9 @@ public class AnimateDeadSpell : NecromancerSpell, ITargetingSpell<Item>
|
|||
|
||||
if (comp?.Addon is MaabusCoffin addon)
|
||||
{
|
||||
var pm = Caster as PlayerMobile;
|
||||
|
||||
var qs = pm?.Quest;
|
||||
|
||||
if (qs is DarkTidesQuest)
|
||||
if (Caster is PlayerMobile { Quest : DarkTidesQuest quest })
|
||||
{
|
||||
QuestObjective objective = qs.FindObjective<AnimateMaabusCorpseObjective>();
|
||||
var objective = quest.FindObjective<AnimateMaabusCorpseObjective>();
|
||||
|
||||
if (objective?.Completed == false)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -57,8 +57,7 @@ public class EnergyFieldSpell : MagerySpell, ITargetingSpell<IPoint3D>
|
|||
continue;
|
||||
}
|
||||
|
||||
Item item = new EnergyField(targetLoc, Caster.Map, duration, itemID, Caster);
|
||||
item.ProcessDelta();
|
||||
new EnergyField(targetLoc, Caster.Map, duration, itemID, Caster).ProcessDelta();
|
||||
|
||||
Effects.SendLocationParticles(
|
||||
EffectItem.Create(targetLoc, Caster.Map, EffectItem.DefaultDuration),
|
||||
|
|
|
|||
|
|
@ -57,8 +57,7 @@ public class ParalyzeFieldSpell : MagerySpell, ITargetingSpell<IPoint3D>
|
|||
continue;
|
||||
}
|
||||
|
||||
Item item = new ParalyzeField(Caster, itemID, targetLoc, Caster.Map, duration);
|
||||
item.ProcessDelta();
|
||||
new ParalyzeField(Caster, itemID, targetLoc, Caster.Map, duration).ProcessDelta();
|
||||
|
||||
Effects.SendLocationParticles(
|
||||
EffectItem.Create(targetLoc, Caster.Map, EffectItem.DefaultDuration),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue