Adds style cop (#109)
This commit is contained in:
parent
3e715bcb60
commit
556a17aba8
1725 changed files with 33831 additions and 38046 deletions
|
|
@ -170,22 +170,22 @@ namespace Server.Items
|
|||
switch (version)
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
m_Recharges = reader.ReadEncodedInt();
|
||||
goto case 0;
|
||||
}
|
||||
{
|
||||
m_Recharges = reader.ReadEncodedInt();
|
||||
goto case 0;
|
||||
}
|
||||
case 0:
|
||||
{
|
||||
m_Charges = Math.Min(reader.ReadEncodedInt(), MaxCharges);
|
||||
m_BagOfSendingHue = (BagOfSendingHue)reader.ReadEncodedInt();
|
||||
break;
|
||||
}
|
||||
{
|
||||
m_Charges = Math.Min(reader.ReadEncodedInt(), MaxCharges);
|
||||
m_BagOfSendingHue = (BagOfSendingHue)reader.ReadEncodedInt();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private class UseBagEntry : ContextMenuEntry
|
||||
{
|
||||
private BagOfSending m_Bag;
|
||||
private readonly BagOfSending m_Bag;
|
||||
|
||||
public UseBagEntry(BagOfSending bag, bool enabled) : base(6189)
|
||||
{
|
||||
|
|
@ -209,7 +209,7 @@ namespace Server.Items
|
|||
|
||||
private class SendTarget : Target
|
||||
{
|
||||
private BagOfSending m_Bag;
|
||||
private readonly BagOfSending m_Bag;
|
||||
|
||||
public SendTarget(BagOfSending bag) : base(-1, false, TargetFlags.None) => m_Bag = bag;
|
||||
|
||||
|
|
@ -265,7 +265,7 @@ namespace Server.Items
|
|||
}
|
||||
else if (Core.ML && reqCharges > m_Bag.Charges)
|
||||
{
|
||||
from.SendLocalizedMessage(1079932); //You don't have enough charges to send that much weight
|
||||
from.SendLocalizedMessage(1079932); // You don't have enough charges to send that much weight
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ namespace Server.Items
|
|||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public string PetName{ get; private set; }
|
||||
public string PetName { get; private set; }
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public int Charges
|
||||
|
|
@ -134,8 +134,7 @@ namespace Server.Items
|
|||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (RootParent != from
|
||||
) // TODO: Previous implementation allowed use on ground, without house protection checks. What is the correct behavior?
|
||||
if (RootParent != from) // TODO: Previous implementation allowed use on ground, without house protection checks. What is the correct behavior?
|
||||
{
|
||||
from.LocalOverheadMessage(MessageType.Regular, 0x3B2,
|
||||
1042001); // That must be in your pack for you to use it.
|
||||
|
|
@ -221,7 +220,6 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
public void SummonPet(Mobile from)
|
||||
{
|
||||
BaseCreature pet = Pet;
|
||||
|
|
@ -300,17 +298,17 @@ namespace Server.Items
|
|||
switch (version)
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
m_Recharges = reader.ReadEncodedInt();
|
||||
goto case 0;
|
||||
}
|
||||
{
|
||||
m_Recharges = reader.ReadEncodedInt();
|
||||
goto case 0;
|
||||
}
|
||||
case 0:
|
||||
{
|
||||
m_Charges = Math.Min(reader.ReadEncodedInt(), MaxCharges);
|
||||
Pet = (BaseCreature)reader.ReadMobile();
|
||||
PetName = reader.ReadString();
|
||||
break;
|
||||
}
|
||||
{
|
||||
m_Charges = Math.Min(reader.ReadEncodedInt(), MaxCharges);
|
||||
Pet = (BaseCreature)reader.ReadMobile();
|
||||
PetName = reader.ReadString();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -318,7 +316,7 @@ namespace Server.Items
|
|||
|
||||
private class BallEntry : ContextMenuEntry
|
||||
{
|
||||
private BallCallback m_Callback;
|
||||
private readonly BallCallback m_Callback;
|
||||
|
||||
public BallEntry(BallCallback callback, int number) : base(number, 2) => m_Callback = callback;
|
||||
|
||||
|
|
@ -333,7 +331,7 @@ namespace Server.Items
|
|||
|
||||
private class PetLinkTarget : Target
|
||||
{
|
||||
private BallOfSummoning m_Ball;
|
||||
private readonly BallOfSummoning m_Ball;
|
||||
|
||||
public PetLinkTarget(BallOfSummoning ball) : base(-1, false, TargetFlags.None) => m_Ball = ball;
|
||||
|
||||
|
|
@ -382,10 +380,10 @@ namespace Server.Items
|
|||
|
||||
private class PetSummoningSpell : Spell
|
||||
{
|
||||
private static SpellInfo m_Info = new SpellInfo("Ball Of Summoning", "", 230);
|
||||
private static readonly SpellInfo m_Info = new SpellInfo("Ball Of Summoning", "", 230);
|
||||
|
||||
private BallOfSummoning m_Ball;
|
||||
private Mobile m_Caster;
|
||||
private readonly BallOfSummoning m_Ball;
|
||||
private readonly Mobile m_Caster;
|
||||
|
||||
private bool m_Stop;
|
||||
|
||||
|
|
|
|||
|
|
@ -327,17 +327,17 @@ namespace Server.Items
|
|||
switch (version)
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
m_Recharges = reader.ReadEncodedInt();
|
||||
goto case 0;
|
||||
}
|
||||
{
|
||||
m_Recharges = reader.ReadEncodedInt();
|
||||
goto case 0;
|
||||
}
|
||||
case 0:
|
||||
{
|
||||
m_Charges = Math.Min(reader.ReadEncodedInt(), MaxCharges);
|
||||
m_Inscription = reader.ReadString();
|
||||
Bound = (BraceletOfBinding)reader.ReadItem();
|
||||
break;
|
||||
}
|
||||
{
|
||||
m_Charges = Math.Min(reader.ReadEncodedInt(), MaxCharges);
|
||||
m_Inscription = reader.ReadString();
|
||||
Bound = (BraceletOfBinding)reader.ReadItem();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -345,7 +345,7 @@ namespace Server.Items
|
|||
|
||||
private class BraceletEntry : ContextMenuEntry
|
||||
{
|
||||
private BraceletCallback m_Callback;
|
||||
private readonly BraceletCallback m_Callback;
|
||||
|
||||
public BraceletEntry(BraceletCallback callback, int number, bool enabled) : base(number)
|
||||
{
|
||||
|
|
@ -366,8 +366,8 @@ namespace Server.Items
|
|||
|
||||
private class TransportTimer : Timer
|
||||
{
|
||||
private BraceletOfBinding m_Bracelet;
|
||||
private Mobile m_From;
|
||||
private readonly BraceletOfBinding m_Bracelet;
|
||||
private readonly Mobile m_From;
|
||||
|
||||
public TransportTimer(BraceletOfBinding bracelet, Mobile from) : base(TimeSpan.FromSeconds(2.0))
|
||||
{
|
||||
|
|
@ -397,7 +397,7 @@ namespace Server.Items
|
|||
|
||||
private class BindTarget : Target
|
||||
{
|
||||
private BraceletOfBinding m_Bracelet;
|
||||
private readonly BraceletOfBinding m_Bracelet;
|
||||
|
||||
public BindTarget(BraceletOfBinding bracelet) : base(-1, false, TargetFlags.None) => m_Bracelet = bracelet;
|
||||
|
||||
|
|
@ -438,7 +438,7 @@ namespace Server.Items
|
|||
|
||||
private class InscribePrompt : Prompt
|
||||
{
|
||||
private BraceletOfBinding m_Bracelet;
|
||||
private readonly BraceletOfBinding m_Bracelet;
|
||||
|
||||
public InscribePrompt(BraceletOfBinding bracelet) => m_Bracelet = bracelet;
|
||||
|
||||
|
|
|
|||
|
|
@ -5,11 +5,11 @@ namespace Server.Items
|
|||
{
|
||||
public interface TranslocationItem
|
||||
{
|
||||
int Charges{ get; set; }
|
||||
int Recharges{ get; set; }
|
||||
int MaxCharges{ get; }
|
||||
int MaxRecharges{ get; }
|
||||
string TranslocationItemName{ get; }
|
||||
int Charges { get; set; }
|
||||
int Recharges { get; set; }
|
||||
int MaxCharges { get; }
|
||||
int MaxRecharges { get; }
|
||||
string TranslocationItemName { get; }
|
||||
}
|
||||
|
||||
public class PowderOfTranslocation : Item
|
||||
|
|
@ -50,7 +50,7 @@ namespace Server.Items
|
|||
|
||||
private class InternalTarget : Target
|
||||
{
|
||||
private PowderOfTranslocation m_Powder;
|
||||
private readonly PowderOfTranslocation m_Powder;
|
||||
|
||||
public InternalTarget(PowderOfTranslocation powder) : base(-1, false, TargetFlags.None) => m_Powder = powder;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue