コード例 #1
0
ファイル: DuelWall.cs プロジェクト: StoryOfTheBard/UOLegends
 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
ファイル: DuelWall.cs プロジェクト: StoryOfTheBard/UOLegends
 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
ファイル: DuelWall.cs プロジェクト: cynricthehun/UOLegends
 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
ファイル: DuelWall.cs プロジェクト: cynricthehun/UOLegends
 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
ファイル: DuelRegion.cs プロジェクト: cynricthehun/UOLegends
        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");
        }