示例#1
0
 public InternalTimer(DuelWall item, TimeSpan duration, Mobile from, Mobile to) : base(duration)
 {
     Priority = TimerPriority.OneSecond;
     m_Item   = item;
     m_From   = from;
     m_To     = to;
 }
示例#2
0
 public InternalItem(DuelWall wall, int xoffset, int yoffset) : base(0x80)
 {
     Movable = false;
     m_Wall  = wall;
     X       = m_Wall.X + xoffset;
     Y       = m_Wall.Y + yoffset;
 }
示例#3
0
 public InternalTimer( DuelWall item, TimeSpan duration, Mobile from, Mobile to )
     : base(duration)
 {
     Priority = TimerPriority.OneSecond;
     m_Item = item;
     m_From = from;
     m_To = to;
 }
示例#4
0
 public InternalItem( DuelWall wall, int xoffset, int yoffset )
     : base(0x80)
 {
     Movable = false;
     m_Wall = wall;
     X = m_Wall.X + xoffset;
     Y = m_Wall.Y + yoffset;
 }
示例#5
0
        public virtual void DoDuel( Mobile from, Mobile to )
        {
            NetState fromns = from.NetState;
            NetState tons = to.NetState;

            m_FromMount = from.Mount;

            if ( m_FromMount != null )
                m_FromMount.Rider = null;

            m_From.MoveToWorld( FromStart, Map.Felucca );
            from.Direction = Direction.South;
            from.MagicDamageAbsorb = 0;
            from.MeleeDamageAbsorb = 0;
            from.StunReady = false;
            from.DisarmReady = false;
            from.Mana = from.ManaMax;
            from.Stam = from.StamMax;
            //from.Target.Cancel( from );
            if ( fromns != null )
                fromns.Send( CancelTarget.Instance );

            Target fromtarg = from.Target;

            //if ( fromtarg != null )
            //	fromtarg.OnTargetCancel( from, TargetCancelType.Canceled );

            from.Frozen = true;

            m_ToMount = to.Mount;

            if ( m_ToMount != null )
                m_ToMount.Rider = null;

            m_To.MoveToWorld( ToStart, Map.Felucca );
            to.Direction = Direction.North;
            to.MagicDamageAbsorb = 0;
            to.MeleeDamageAbsorb = 0;
            to.StunReady = false;
            to.DisarmReady = false;
            to.Mana = to.ManaMax;
            to.Stam = to.StamMax;
            //to.Target.Cancel( to );
            if ( tons != null )
                tons.Send( CancelTarget.Instance );

            Target totarg = to.Target;

            //if ( totarg != null )
            //	totarg.OnTargetCancel( to, TargetCancelType.Canceled );

            to.Frozen = true;

            ((PlayerMobile)m_From).PermaFlags.Add( (PlayerMobile)to );
            ((PlayerMobile)m_To).PermaFlags.Add( (PlayerMobile)from );
            ((PlayerMobile)m_From).Delta( MobileDelta.Noto );
            ((PlayerMobile)m_To).Delta( MobileDelta.Noto );

            DuelWall wall = new DuelWall( NorthSouth, from, to );
            wall.MoveToWorld( WallArea, Map.Felucca );

            m_From.SendAsciiMessage( "Duel Started" );
            m_To.SendAsciiMessage( "Duel Started" );
        }
示例#6
0
        public virtual void DoDuel(Mobile from, Mobile to)
        {
            NetState fromns = from.NetState;
            NetState tons   = to.NetState;

            m_FromMount = from.Mount;

            if (m_FromMount != null)
            {
                m_FromMount.Rider = null;
            }

            m_From.MoveToWorld(FromStart, Map.Felucca);
            from.Direction         = Direction.South;
            from.MagicDamageAbsorb = 0;
            from.MeleeDamageAbsorb = 0;
            from.StunReady         = false;
            from.DisarmReady       = false;
            from.Mana = from.ManaMax;
            from.Stam = from.StamMax;
            //from.Target.Cancel( from );
            if (fromns != null)
            {
                fromns.Send(CancelTarget.Instance);
            }

            Target fromtarg = from.Target;

            //if ( fromtarg != null )
            //	fromtarg.OnTargetCancel( from, TargetCancelType.Canceled );

            from.Frozen = true;

            m_ToMount = to.Mount;

            if (m_ToMount != null)
            {
                m_ToMount.Rider = null;
            }

            m_To.MoveToWorld(ToStart, Map.Felucca);
            to.Direction         = Direction.North;
            to.MagicDamageAbsorb = 0;
            to.MeleeDamageAbsorb = 0;
            to.StunReady         = false;
            to.DisarmReady       = false;
            to.Mana = to.ManaMax;
            to.Stam = to.StamMax;
            //to.Target.Cancel( to );
            if (tons != null)
            {
                tons.Send(CancelTarget.Instance);
            }

            Target totarg = to.Target;

            //if ( totarg != null )
            //	totarg.OnTargetCancel( to, TargetCancelType.Canceled );

            to.Frozen = true;

            ((PlayerMobile)m_From).PermaFlags.Add((PlayerMobile)to);
            ((PlayerMobile)m_To).PermaFlags.Add((PlayerMobile)from);
            ((PlayerMobile)m_From).Delta(MobileDelta.Noto);
            ((PlayerMobile)m_To).Delta(MobileDelta.Noto);

            DuelWall wall = new DuelWall(NorthSouth, from, to);

            wall.MoveToWorld(WallArea, Map.Felucca);

            m_From.SendAsciiMessage("Duel Started");
            m_To.SendAsciiMessage("Duel Started");
        }