当前位置: 首页>>代码示例>>C#>>正文


C# Item.SetLastMoved方法代码示例

本文整理汇总了C#中Item.SetLastMoved方法的典型用法代码示例。如果您正苦于以下问题:C# Item.SetLastMoved方法的具体用法?C# Item.SetLastMoved怎么用?C# Item.SetLastMoved使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Item的用法示例。


在下文中一共展示了Item.SetLastMoved方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SetLockdown

        private void SetLockdown(Item i, bool locked, bool checkContains)
        {
            if (this.m_LockDowns == null)
                return;

            #region Mondain's Legacy
            if (i is BaseAddonContainer)
                i.Movable = false;
            else
            #endregion

                i.Movable = !locked;
            i.IsLockedDown = locked;

            if (locked)
            {
                if (i is VendorRentalContract)
                {
                    if (!this.VendorRentalContracts.Contains(i))
                        this.VendorRentalContracts.Add(i);
                }
                else
                {
                    if (!checkContains || !this.m_LockDowns.Contains(i))
                        this.m_LockDowns.Add(i);
                }
            }
            else
            {
                this.VendorRentalContracts.Remove(i);
                this.m_LockDowns.Remove(i);
            }

            if (!locked)
                i.SetLastMoved();

            if ((i is Container) && (!locked || !(i is BaseBoard || i is Aquarium || i is FishBowl)))
            {
                foreach (Item c in i.Items)
                    this.SetLockdown(c, locked, checkContains);
            }
        }
开发者ID:Crylian,项目名称:ServUO,代码行数:42,代码来源:BaseHouse.cs

示例2: ReleaseSecure

        public void ReleaseSecure(Mobile m, Item item)
        {
            if (this.m_Secures == null || !this.IsOwner(m) || item is StrongBox || !this.IsActive)
                return;

            for (int i = 0; i < this.m_Secures.Count; ++i)
            {
                SecureInfo info = (SecureInfo)this.m_Secures[i];

                if (info.Item == item && this.HasSecureAccess(m, info.Level))
                {
                    item.IsLockedDown = false;
                    item.IsSecure = false;

                    #region Mondain's Legacy
                    if (item is BaseAddonContainer)
                        item.Movable = false;
                    else
                    #endregion

                        item.Movable = true;
                    item.SetLastMoved();
                    item.PublicOverheadMessage(Server.Network.MessageType.Label, 0x3B2, 501656);//[no longer secure]
                    this.m_Secures.RemoveAt(i);
                    return;
                }
            }

            m.SendLocalizedMessage(501717);//This isn't secure...
        }
开发者ID:Crylian,项目名称:ServUO,代码行数:30,代码来源:BaseHouse.cs

示例3: Lift


//.........这里部分代码省略.........
                        }
                        else
                            canLoot = true;

                        if (!canLoot)
                        {
                            SendAsciiMessage("You can't loot here.");
                            reject = LRReason.Inspecific;
                        }
                        else if (root != null && root is Mobile && !((Mobile) root).CheckNonlocalLift(from, item))
                        {
                            reject = LRReason.TryToSteal;
                        }
                        else if (!from.OnDragLift(item) || !item.OnDragLift(from))
                        {
                            reject = LRReason.Inspecific;
                        }
                        else if (!from.CheckAlive())
                        {
                            reject = LRReason.Inspecific;
                        }
                        else if (item.EventItem && !IsInEvent && AccessLevel < AccessLevel.GameMaster)
                        {
                            SendAsciiMessage("You can't use event items!");
                            reject = LRReason.Inspecific;
                        }
                        else if (!item.EventItem && IsInEvent && AccessLevel < AccessLevel.GameMaster)
                        {
                            SendAsciiMessage("You can only use event items!");
                            reject = LRReason.Inspecific;
                        }
                        else
                        {
                            item.SetLastMoved();

                            if (item.Spawner != null)
                            {
                                item.Spawner.Remove(item);
                                item.Spawner = null;
                            }

                            if (amount == 0)
                                amount = 1;

                            if (amount > item.Amount)
                                amount = item.Amount;

                            int oldAmount = item.Amount;
                            //item.Amount = amount; //Set in LiftItemDupe

                            if (amount < oldAmount)
                                LiftItemDupe(item, amount);
                            //item.Dupe( oldAmount - amount );

                            Map map = from.Map;

                            if (DragEffects && map != null && (root == null || root is Item))
                            {
                                IPooledEnumerable eable = map.GetClientsInRange(from.Location);
                                Packet p = null;

                                foreach (NetState ns in eable)
                                {
                                    if (ns.Mobile != from && ns.Mobile.CanSee(from) && (!ns.Mobile.HasFilter || InLOS(ns.Mobile)))
                                    {
                                        if (p == null)
开发者ID:FreeReign,项目名称:imaginenation,代码行数:67,代码来源:PlayerMobile.cs

示例4: SetSecure

        private void SetSecure(Item i, bool locked, bool checkContains)
        {
            if (m_Secures == null)
                return;

            i.Movable = !locked;
            i.IsLockedDown = locked;

            if (locked)
            {
                if (!checkContains || !m_Secures.Contains(i))
                    m_Secures.Add(i);
            }
            else
            {
                m_Secures.Remove(i);
            }

            if (!locked)
                i.SetLastMoved();
        }
开发者ID:Grimoric,项目名称:RunUO.T2A,代码行数:21,代码来源:BaseHouse.cs

示例5: SetLockdown

        private void SetLockdown( Item i, bool locked, bool checkContains )
        {
            if( m_LockDowns == null )
                return;

            if( i is HitchingPost )
            {
                i.Movable = !locked;
                return;
            }
            #region Mondain's Legacy
            if( i is BaseAddonContainer )
                i.Movable = false;
            else
            #endregion

                i.Movable = !locked;
            i.IsLockedDown = locked;

            if( locked )
            {
                if( i is VendorRentalContract )
                {
                    if( !VendorRentalContracts.Contains(i) )
                        VendorRentalContracts.Add(i);
                }
                else
                {
                    if( !checkContains || !m_LockDowns.Contains(i) )
                        m_LockDowns.Add(i);
                }
            }
            else
            {
                VendorRentalContracts.Remove(i);
                m_LockDowns.Remove(i);
            }

            if( !locked )
                i.SetLastMoved();

            if( (i is Container) && (!locked || !(i is BaseBoard)) )
            {
                foreach( Item c in i.Items )
                    SetLockdown(c, locked, checkContains);
            }
        }
开发者ID:ITLongwell,项目名称:Ulmeta,代码行数:47,代码来源:BaseHouse.cs

示例6: SetLockdown

        private void SetLockdown( Item i, bool locked, bool checkContains )
        {
            if ( m_LockDowns == null )
            {
                return;
            }

            i.Movable = !locked;
            i.IsLockedDown = locked;

            if ( locked )
            {
                if ( i is VendorRentalContract )
                {
                    if ( !VendorRentalContracts.Contains( i ) )
                    {
                        VendorRentalContracts.Add( i );
                    }
                }
                else
                {
                    if ( !checkContains || !m_LockDowns.Contains( i ) )
                    {
                        m_LockDowns.Add( i );
                    }
                }
            }
            else
            {
                VendorRentalContracts.Remove( i );
                m_LockDowns.Remove( i );
            }

            if ( !locked )
            {
                i.SetLastMoved();
            }

            if ( ( i is Container ) && ( !locked || !( i is BaseBoard ) ) )
            {
                foreach ( Item c in i.Items )
                {
                    SetLockdown( c, locked, checkContains );
                }
            }
        }
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:46,代码来源:BaseHouse.cs

示例7: ReleaseSecure

        public void ReleaseSecure( Mobile m, Item item )
        {
            if ( m_Secures == null || !IsOwner( m ) || item is StrongBox || !IsActive )
            {
                return;
            }

            for ( int i = 0; i < m_Secures.Count; ++i )
            {
                SecureInfo info = (SecureInfo) m_Secures[i];

                if ( info.Item == item && HasSecureAccess( m, info.Level ) )
                {
                    item.IsLockedDown = false;
                    item.IsSecure = false;
                    item.Movable = true;
                    item.SetLastMoved();
                    item.PublicOverheadMessage( Server.Network.MessageType.Label, 0x3B2, 501656 ); //[no longer secure]
                    m_Secures.RemoveAt( i );
                    return;
                }
            }

            m.SendLocalizedMessage( 501717 ); //This isn't secure...
        }
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:25,代码来源:BaseHouse.cs


注:本文中的Item.SetLastMoved方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。