Fixes code according to modern code style. Fixes a few expression bugs.

This commit is contained in:
Kamron Batman 2018-09-15 09:58:51 -07:00
parent 89eea25e5f
commit 970fd563b2
3324 changed files with 441118 additions and 433755 deletions

View file

@ -2,28 +2,28 @@ using Server.Engines.PartySystem;
namespace Server.ContextMenus
{
public class RemoveFromPartyEntry : ContextMenuEntry
{
private Mobile m_From;
private Mobile m_Target;
public RemoveFromPartyEntry( Mobile from, Mobile target ) : base( 0198, 12 )
{
m_From = from;
m_Target = target;
}
public class RemoveFromPartyEntry : ContextMenuEntry
{
private Mobile m_From;
private Mobile m_Target;
public override void OnClick()
{
Party p = Party.Get( m_From );
public RemoveFromPartyEntry(Mobile from, Mobile target) : base(0198, 12)
{
m_From = from;
m_Target = target;
}
if ( p == null || p.Leader != m_From || !p.Contains( m_Target ) )
return;
public override void OnClick()
{
Party p = Party.Get(m_From);
if ( m_From == m_Target )
m_From.SendLocalizedMessage( 1005446 ); // You may only remove yourself from a party if you are not the leader.
else
p.Remove( m_Target );
}
}
}
if (p == null || p.Leader != m_From || !p.Contains(m_Target))
return;
if (m_From == m_Target)
m_From.SendLocalizedMessage(1005446); // You may only remove yourself from a party if you are not the leader.
else
p.Remove(m_Target);
}
}
}