#W# Initial Commit: Avatars Conquest
This commit is contained in:
commit
5df497787a
7510 changed files with 416048 additions and 0 deletions
31
Scripts/Engines/Party/RemoveFromParty.cs
Normal file
31
Scripts/Engines/Party/RemoveFromParty.cs
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
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 override void OnClick()
|
||||
{
|
||||
Party p = Party.Get( m_From );
|
||||
|
||||
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 );
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue