chore: Fixes variable types for possible performance issues (#2172)

This commit is contained in:
Kamron Batman 2025-05-01 21:54:41 -07:00 • committed by GitHub
parent 6d43f2549c
commit da517f56c4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
82 changed files with 332 additions and 343 deletions

View file

@ -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)
{