Adds style cop (#109)
This commit is contained in:
parent
3e715bcb60
commit
556a17aba8
1725 changed files with 33831 additions and 38046 deletions
|
|
@ -5,8 +5,9 @@ namespace Server.Engines.PartySystem
|
|||
{
|
||||
public class DeclineTimer : Timer
|
||||
{
|
||||
private static Dictionary<Mobile, DeclineTimer> m_Table = new Dictionary<Mobile, DeclineTimer>();
|
||||
private Mobile m_Mobile, m_Leader;
|
||||
private static readonly Dictionary<Mobile, DeclineTimer> m_Table = new Dictionary<Mobile, DeclineTimer>();
|
||||
private readonly Mobile m_Mobile;
|
||||
private readonly Mobile m_Leader;
|
||||
|
||||
private DeclineTimer(Mobile m, Mobile leader) : base(TimeSpan.FromSeconds(30.0))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -8,10 +8,10 @@ namespace Server.Engines.PartySystem
|
|||
{
|
||||
EnsureCapacity(7);
|
||||
|
||||
m_Stream.Write((short)0x0006);
|
||||
m_Stream.Write((byte)0x02);
|
||||
m_Stream.Write((byte)0);
|
||||
m_Stream.Write(m.Serial);
|
||||
Stream.Write((short)0x0006);
|
||||
Stream.Write((byte)0x02);
|
||||
Stream.Write((byte)0);
|
||||
Stream.Write(m.Serial);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -21,12 +21,12 @@ namespace Server.Engines.PartySystem
|
|||
{
|
||||
EnsureCapacity(7 + p.Count * 4);
|
||||
|
||||
m_Stream.Write((short)0x0006);
|
||||
m_Stream.Write((byte)0x01);
|
||||
m_Stream.Write((byte)p.Count);
|
||||
Stream.Write((short)0x0006);
|
||||
Stream.Write((byte)0x01);
|
||||
Stream.Write((byte)p.Count);
|
||||
|
||||
for (int i = 0; i < p.Count; ++i)
|
||||
m_Stream.Write(p[i].Mobile.Serial);
|
||||
Stream.Write(p[i].Mobile.Serial);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -36,14 +36,14 @@ namespace Server.Engines.PartySystem
|
|||
{
|
||||
EnsureCapacity(11 + p.Count * 4);
|
||||
|
||||
m_Stream.Write((short)0x0006);
|
||||
m_Stream.Write((byte)0x02);
|
||||
m_Stream.Write((byte)p.Count);
|
||||
Stream.Write((short)0x0006);
|
||||
Stream.Write((byte)0x02);
|
||||
Stream.Write((byte)p.Count);
|
||||
|
||||
m_Stream.Write(removed.Serial);
|
||||
Stream.Write(removed.Serial);
|
||||
|
||||
for (int i = 0; i < p.Count; ++i)
|
||||
m_Stream.Write(p[i].Mobile.Serial);
|
||||
Stream.Write(p[i].Mobile.Serial);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -56,10 +56,10 @@ namespace Server.Engines.PartySystem
|
|||
|
||||
EnsureCapacity(12 + text.Length * 2);
|
||||
|
||||
m_Stream.Write((short)0x0006);
|
||||
m_Stream.Write((byte)(toAll ? 0x04 : 0x03));
|
||||
m_Stream.Write(from.Serial);
|
||||
m_Stream.WriteBigUniNull(text);
|
||||
Stream.Write((short)0x0006);
|
||||
Stream.Write((byte)(toAll ? 0x04 : 0x03));
|
||||
Stream.Write(from.Serial);
|
||||
Stream.WriteBigUniNull(text);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -69,9 +69,9 @@ namespace Server.Engines.PartySystem
|
|||
{
|
||||
EnsureCapacity(10);
|
||||
|
||||
m_Stream.Write((short)0x0006);
|
||||
m_Stream.Write((byte)0x07);
|
||||
m_Stream.Write(leader.Serial);
|
||||
Stream.Write((short)0x0006);
|
||||
Stream.Write((byte)0x07);
|
||||
Stream.Write(leader.Serial);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -9,7 +9,7 @@ namespace Server.Engines.PartySystem
|
|||
public class Party : IParty
|
||||
{
|
||||
public const int Capacity = 10;
|
||||
private List<Mobile> m_Listeners; // staff listening
|
||||
private readonly List<Mobile> m_Listeners; // staff listening
|
||||
|
||||
public Party(Mobile leader)
|
||||
{
|
||||
|
|
@ -24,11 +24,11 @@ namespace Server.Engines.PartySystem
|
|||
|
||||
public int Count => Members.Count;
|
||||
public bool Active => Members.Count > 1;
|
||||
public Mobile Leader{ get; }
|
||||
public Mobile Leader { get; }
|
||||
|
||||
public List<PartyMemberInfo> Members{ get; }
|
||||
public List<PartyMemberInfo> Members { get; }
|
||||
|
||||
public List<Mobile> Candidates{ get; }
|
||||
public List<Mobile> Candidates { get; }
|
||||
|
||||
public PartyMemberInfo this[int index] => Members[index];
|
||||
|
||||
|
|
@ -217,7 +217,7 @@ namespace Server.Engines.PartySystem
|
|||
if (!force && ourFaction != null && theirFaction != null && ourFaction != theirFaction)
|
||||
return;
|
||||
|
||||
// : joined the party.
|
||||
// : joined the party.
|
||||
SendToAll(new MessageLocalizedAffix(Serial.MinusOne, -1, MessageType.Label, 0x3B2, 3, 1008094, "",
|
||||
AffixType.Prepend | AffixType.System, from.Name, ""));
|
||||
|
||||
|
|
@ -229,7 +229,7 @@ namespace Server.Engines.PartySystem
|
|||
|
||||
public void OnDecline(Mobile from, Mobile leader)
|
||||
{
|
||||
// : Does not wish to join the party.
|
||||
// : Does not wish to join the party.
|
||||
leader.SendLocalizedMessage(1008091, false, from.Name);
|
||||
|
||||
from.SendLocalizedMessage(1008092); // You notify them that you do not wish to join the party.
|
||||
|
|
@ -316,7 +316,7 @@ namespace Server.Engines.PartySystem
|
|||
if (!p.Candidates.Contains(target))
|
||||
p.Candidates.Add(target);
|
||||
|
||||
// : You are invited to join the party. Type /accept to join or /decline to decline the offer.
|
||||
// : You are invited to join the party. Type /accept to join or /decline to decline the offer.
|
||||
target.Send(new MessageLocalizedAffix(Serial.MinusOne, -1, MessageType.Label, 0x3B2, 3, 1008089, "",
|
||||
AffixType.Prepend | AffixType.System, from.Name, ""));
|
||||
|
||||
|
|
@ -421,7 +421,7 @@ namespace Server.Engines.PartySystem
|
|||
|
||||
private class RejoinTimer : Timer
|
||||
{
|
||||
private Mobile m_Mobile;
|
||||
private readonly Mobile m_Mobile;
|
||||
|
||||
public RejoinTimer(Mobile m) : base(TimeSpan.FromSeconds(1.0)) => m_Mobile = m;
|
||||
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@ namespace Server.Engines.PartySystem
|
|||
CanLoot = !Core.ML;
|
||||
}
|
||||
|
||||
public Mobile Mobile{ get; }
|
||||
public Mobile Mobile { get; }
|
||||
|
||||
public bool CanLoot{ get; set; }
|
||||
public bool CanLoot { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -4,8 +4,8 @@ namespace Server.ContextMenus
|
|||
{
|
||||
public class RemoveFromPartyEntry : ContextMenuEntry
|
||||
{
|
||||
private Mobile m_From;
|
||||
private Mobile m_Target;
|
||||
private readonly Mobile m_From;
|
||||
private readonly Mobile m_Target;
|
||||
|
||||
public RemoveFromPartyEntry(Mobile from, Mobile target) : base(0198, 12)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue