Fixes code according to modern code style. Fixes a few expression bugs.
This commit is contained in:
parent
89eea25e5f
commit
970fd563b2
3324 changed files with 441118 additions and 433755 deletions
|
|
@ -2,26 +2,27 @@ using Server.Targeting;
|
|||
|
||||
namespace Server.Engines.PartySystem
|
||||
{
|
||||
public class RemovePartyTarget : Target
|
||||
{
|
||||
public RemovePartyTarget() : base( 8, false, TargetFlags.None )
|
||||
{
|
||||
}
|
||||
public class RemovePartyTarget : Target
|
||||
{
|
||||
public RemovePartyTarget() : base(8, false, TargetFlags.None)
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnTarget( Mobile from, object o )
|
||||
{
|
||||
if ( o is Mobile m )
|
||||
{
|
||||
Party p = Party.Get( from );
|
||||
protected override void OnTarget(Mobile from, object o)
|
||||
{
|
||||
if (o is Mobile m)
|
||||
{
|
||||
Party p = Party.Get(from);
|
||||
|
||||
if ( p == null || p.Leader != from || !p.Contains( m ) )
|
||||
return;
|
||||
if (p == null || p.Leader != from || !p.Contains(m))
|
||||
return;
|
||||
|
||||
if ( from == m )
|
||||
from.SendLocalizedMessage( 1005446 ); // You may only remove yourself from a party if you are not the leader.
|
||||
else
|
||||
p.Remove( m );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (from == m)
|
||||
from.SendLocalizedMessage(
|
||||
1005446); // You may only remove yourself from a party if you are not the leader.
|
||||
else
|
||||
p.Remove(m);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue