#W# Initial Commit: Avatars Conquest
This commit is contained in:
commit
5df497787a
7510 changed files with 416048 additions and 0 deletions
31
Scripts/Context Menus/EjectPlayer.cs
Normal file
31
Scripts/Context Menus/EjectPlayer.cs
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
using Server.Multis;
|
||||
|
||||
namespace Server.ContextMenus
|
||||
{
|
||||
public class EjectPlayerEntry : ContextMenuEntry
|
||||
{
|
||||
private Mobile m_From;
|
||||
private Mobile m_Target;
|
||||
private BaseHouse m_TargetHouse;
|
||||
|
||||
public EjectPlayerEntry( Mobile from, Mobile target ) : base( 6206, 12 )
|
||||
{
|
||||
m_From = from;
|
||||
m_Target = target;
|
||||
m_TargetHouse = BaseHouse.FindHouseAt( m_Target );
|
||||
}
|
||||
|
||||
public override void OnClick()
|
||||
{
|
||||
if ( !m_From.Alive || m_TargetHouse.Deleted || !m_TargetHouse.IsFriend( m_From ) )
|
||||
return;
|
||||
|
||||
if ( m_Target is Mobile )
|
||||
{
|
||||
m_TargetHouse.Kick( m_From, (Mobile)m_Target );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue