Reorganizes Project (#41)

This commit is contained in:
Kamron Batman 2019-08-02 18:13:40 -07:00 committed by GitHub
parent 08bf44af9a
commit 3614a66aee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3499 changed files with 79 additions and 55 deletions

View file

@ -0,0 +1,27 @@
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 mobile)
m_TargetHouse.Kick(m_From, mobile);
}
}
}