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
|
|
@ -70,7 +70,7 @@ namespace Server.Engines.Quests.Ambitious
|
|||
{
|
||||
if (bagOfSending)
|
||||
{
|
||||
Item reward = new BagOfSending();
|
||||
var reward = new BagOfSending();
|
||||
|
||||
if (player.PlaceInBackpack(reward))
|
||||
{
|
||||
|
|
@ -85,7 +85,7 @@ namespace Server.Engines.Quests.Ambitious
|
|||
|
||||
if (powderOfTranslocation)
|
||||
{
|
||||
Item reward = new PowderOfTranslocation(Utility.RandomMinMax(10, 12));
|
||||
var reward = new PowderOfTranslocation(Utility.RandomMinMax(10, 12));
|
||||
|
||||
if (player.PlaceInBackpack(reward))
|
||||
{
|
||||
|
|
@ -100,7 +100,7 @@ namespace Server.Engines.Quests.Ambitious
|
|||
|
||||
if (gold)
|
||||
{
|
||||
Item reward = new Gold(Utility.RandomMinMax(250, 350));
|
||||
var reward = new Gold(Utility.RandomMinMax(250, 350));
|
||||
|
||||
if (player.PlaceInBackpack(reward))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ public partial class KronusScrollBox : MetalBox
|
|||
|
||||
if (obj?.Completed == false || DarkTidesQuest.HasLostCallingScroll(from))
|
||||
{
|
||||
Item scroll = new KronusScroll();
|
||||
var scroll = new KronusScroll();
|
||||
|
||||
if (pm.PlaceInBackpack(scroll))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -64,13 +64,15 @@ public partial class Mardoth : BaseQuester
|
|||
HairItemID = 0x203C;
|
||||
HairHue = 0x482;
|
||||
|
||||
Item gloves = new BoneGloves();
|
||||
gloves.Hue = 0x66D;
|
||||
AddItem(gloves);
|
||||
AddItem(new BoneGloves
|
||||
{
|
||||
Hue = 0x66D
|
||||
});
|
||||
|
||||
Item gorget = new PlateGorget();
|
||||
gorget.Hue = 0x1;
|
||||
AddItem(gorget);
|
||||
AddItem(new PlateGorget
|
||||
{
|
||||
Hue = 0x1
|
||||
});
|
||||
}
|
||||
|
||||
public override int GetAutoTalkRange(PlayerMobile m) => 3;
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ public partial class EminosKatanaChest : WoodenChest
|
|||
{
|
||||
if (EminosUndertakingQuest.HasLostEminosKatana(from))
|
||||
{
|
||||
Item katana = new EminosKatana();
|
||||
var katana = new EminosKatana();
|
||||
|
||||
if (!player.PlaceInBackpack(katana))
|
||||
{
|
||||
|
|
@ -64,7 +64,7 @@ public partial class EminosKatanaChest : WoodenChest
|
|||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
Item katana = new EminosKatana();
|
||||
var katana = new EminosKatana();
|
||||
|
||||
if (player.PlaceInBackpack(katana))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ public partial class Emino : BaseQuester
|
|||
|
||||
if (EminosUndertakingQuest.HasLostNoteForZoel(player))
|
||||
{
|
||||
Item note = new NoteForZoel();
|
||||
var note = new NoteForZoel();
|
||||
|
||||
if (player.PlaceInBackpack(note))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ public partial class HaochisKatanaGenerator : Item
|
|||
|
||||
if (HaochisTrialsQuest.HasLostHaochisKatana(player))
|
||||
{
|
||||
Item katana = new HaochisKatana();
|
||||
var katana = new HaochisKatana();
|
||||
|
||||
if (!player.PlaceInBackpack(katana))
|
||||
{
|
||||
|
|
@ -46,7 +46,7 @@ public partial class HaochisKatanaGenerator : Item
|
|||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
Item katana = new HaochisKatana();
|
||||
var katana = new HaochisKatana();
|
||||
|
||||
if (player.PlaceInBackpack(katana))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ public partial class DaemonBloodChest : MetalChest
|
|||
return;
|
||||
}
|
||||
|
||||
Item vial = new QuestDaemonBlood();
|
||||
var vial = new QuestDaemonBlood();
|
||||
|
||||
if (player.PlaceInBackpack(vial))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ public partial class Dryad : BaseQuester
|
|||
{
|
||||
FocusTo(player);
|
||||
|
||||
Item fertileDirt = new QuestFertileDirt();
|
||||
var fertileDirt = new QuestFertileDirt();
|
||||
|
||||
if (!player.PlaceInBackpack(fertileDirt))
|
||||
{
|
||||
|
|
@ -111,7 +111,7 @@ public partial class Dryad : BaseQuester
|
|||
|
||||
FocusTo(from);
|
||||
|
||||
Item fertileDirt = new QuestFertileDirt();
|
||||
var fertileDirt = new QuestFertileDirt();
|
||||
|
||||
if (!player.PlaceInBackpack(fertileDirt))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -328,7 +328,7 @@ namespace Server.Engines.Quests.Haven
|
|||
1049330
|
||||
); // You have been ambushed! Fight for your honor!!!
|
||||
|
||||
BaseCreature creature = new HordeMinion();
|
||||
var creature = new HordeMinion();
|
||||
creature.MoveToWorld(new Point3D(x, y, z), Map.Trammel);
|
||||
creature.Combatant = player;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ namespace Server.Engines.Quests.Hag
|
|||
Effects.SendLocationEffect(m_CorpseLocation, map, 0x3728, 10);
|
||||
Effects.PlaySound(m_CorpseLocation, map, 0x1FE);
|
||||
|
||||
Mobile imp = new Zeefzorpul();
|
||||
var imp = new Zeefzorpul();
|
||||
imp.MoveToWorld(m_CorpseLocation, map);
|
||||
|
||||
// * You see a strange imp stealing a scrap of paper from the bloodied corpse *
|
||||
|
|
@ -216,7 +216,7 @@ namespace Server.Engines.Quests.Hag
|
|||
Effects.SendLocationEffect(ImpLocation, map, 0x3728, 10);
|
||||
Effects.PlaySound(ImpLocation, map, 0x1FE);
|
||||
|
||||
Mobile imp = new Zeefzorpul();
|
||||
var imp = new Zeefzorpul();
|
||||
imp.MoveToWorld(ImpLocation, map);
|
||||
|
||||
imp.Direction = imp.GetDirectionTo(from);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue