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


C# Items.RunebookEntry类代码示例

本文整理汇总了C#中Server.Items.RunebookEntry的典型用法代码示例。如果您正苦于以下问题:C# RunebookEntry类的具体用法?C# RunebookEntry怎么用?C# RunebookEntry使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


RunebookEntry类属于Server.Items命名空间,在下文中一共展示了RunebookEntry类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GateTravelSpell

 public GateTravelSpell(Mobile caster, Item scroll, RunebookEntry entry, Runebook book)
     : base(caster, scroll, m_Info)
 {
     m_Entry = entry;
     m_Book = book;
     m_Scroll = scroll;
 }
开发者ID:FreeReign,项目名称:imaginenation,代码行数:7,代码来源:GateTravel.cs

示例2: NaturesPassageSpell

		public NaturesPassageSpell( Mobile caster, Item scroll, RunebookEntry entry, Runebook book ) : base( caster, scroll, m_Info )
		{
			m_Entry = entry;
			m_Book = book;
		}
开发者ID:greeduomacro,项目名称:unknown-shard-1,代码行数:5,代码来源:NaturesPassageSpell.cs

示例3: RemoveRunebook_Callback

        public static void RemoveRunebook_Callback(Mobile from, bool okay, MasterRunebook master, InternalRunebook book, int id)
        {
            if (okay)
            {
                Container pack = from.Backpack;
                if (pack == null || pack.Deleted)
                {
                    from.SendMessage("Unable to find a backpack in which to place a new Runebook.");
                    return;
                }
                int count = book.Entries.Count;
                if (count > 0)
                {
                    if (from.AccessLevel < AccessLevel.GameMaster)
                    {
                        if (from.Backpack.ConsumeTotal(new Type[] { typeof(BlankScroll), typeof(RecallScroll), typeof(GateTravelScroll) },
                            new int[] { 10, 1, 1 }) >= 0)
                        {
                            from.SendMessage("You do not have the materials needed to create the runebook.");
                            return;
                        }
                        if (from.CheckSkill(SkillName.Inscribe, 100, 120))
                        {
                            from.SendMessage("You failed to extract the book. Some materials were lost.");
                            return;
                        }
                    }

                    Runebook runebook = new Runebook(book.MaxCharges);
                    for (int x = 0; x < count; x++)
                    {
                        RunebookEntry rbe = new RunebookEntry(
                            ((RunebookEntry)book.Entries[0]).Location, ((RunebookEntry)book.Entries[0]).Map,
                            ((RunebookEntry)book.Entries[0]).Description, ((RunebookEntry)book.Entries[0]).House);
                        runebook.Entries.Add(rbe);
                        book.Entries.RemoveAt(0);
                    }
                    runebook.CurCharges = book.CurCharges;
                    runebook.Name = book.Name;
                    book.Name = string.Format("Book #{0}", ((int)(id + 1)).ToString());
                    pack.DropItem(runebook);
                    from.SendMessage("Runebook extracted. Some materials were used.");
                }
                else
                {
                    from.SendMessage("You cannot remove an empty Runebook.");
                }
                from.CloseGump(typeof(InternalRunebookGump));
                from.SendGump(new InternalRunebookGump(from, book, master, id));
            }
            else
            {
                from.CloseGump(typeof(InternalRunebookGump));
                from.SendGump(new InternalRunebookGump(from, book, master, id));
            }
        }
开发者ID:greeduomacro,项目名称:DimensionsNewAge,代码行数:56,代码来源:InternalRunebookGump.cs

示例4: DropRune

		public void DropRune( Mobile from, RunebookEntry e, int index )
		{
            if (CheckAccess(from))
            {
                if (m_DefaultIndex > index)
                    m_DefaultIndex -= 1;
                else if (m_DefaultIndex == index)
                    m_DefaultIndex = -1;

                m_Entries.RemoveAt(index);

                RecallRune rune = new RecallRune();

                rune.Target = e.Location;
                rune.TargetMap = e.Map;
                rune.Description = e.Description;
                rune.House = e.House;
                rune.Marked = true;
                rune.ChargesLeft = e.ChargesLeft;

                from.AddToBackpack(rune);

                from.SendLocalizedMessage(502421); // You have removed the rune.
            }

            else
            {
                from.SendLocalizedMessage(502413); // That cannot be done while the book is locked down.
            }
		}
开发者ID:FreeReign,项目名称:imaginenation,代码行数:30,代码来源:Runebook.cs

示例5: DropRune

		public void DropRune( Mobile from, RunebookEntry e, int index )
		{
			if ( m_DefaultIndex == index )
				m_DefaultIndex = -1;

			m_Entries.RemoveAt( index );

			RecallRune rune = new RecallRune();

			rune.Target = e.Location;
			rune.TargetMap = e.Map;
			rune.Description = e.Description;
			rune.House = e.House;
			rune.Marked = true;

			from.AddToBackpack( rune );

            //al: fix for default rune changing
            if (index == m_DefaultIndex)
            {
                //case 1: default rune removed => disable default rune.
                m_DefaultIndex = -1;
            }
            else if (index < m_DefaultIndex)
            {
                //case 2: index of removed rune < m_DefaultIndex => fix m_DefaultIndex
                m_DefaultIndex--;
            }
            //--
			from.SendLocalizedMessage( 502421 ); // You have removed the rune.
		}
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:31,代码来源:Runebook.cs

示例6: MushroomGatewaySpell

		public MushroomGatewaySpell( Mobile caster, Item scroll, RunebookEntry entry ) : base( caster, scroll, m_Info )
		{
			m_Entry = entry;
		}
开发者ID:greeduomacro,项目名称:vivre-uo,代码行数:4,代码来源:MushroomGatewaySpell.cs

示例7: AvatarHeavensGateSpell

 public AvatarHeavensGateSpell( Mobile caster, Item scroll, RunebookEntry entry )
     : base(caster, scroll, m_Info)
 {
     m_Entry = entry;
 }
开发者ID:evildude807,项目名称:kaltar,代码行数:5,代码来源:HeavensGateSpell.cs

示例8: DropRune

        public void DropRune(Mobile from, RunebookEntry e, int index)
        {
            if (this.m_DefaultIndex > index)
                this.m_DefaultIndex -= 1;
            else if (this.m_DefaultIndex == index)
                this.m_DefaultIndex = -1;

            this.m_Entries.RemoveAt(index);

            RecallRune rune = new RecallRune();

            rune.Target = e.Location;
            rune.TargetMap = e.Map;
            rune.Description = e.Description;
            rune.House = e.House;
            rune.Marked = true;

            from.AddToBackpack(rune);

            from.SendLocalizedMessage(502421); // You have removed the rune.
        }
开发者ID:aj9251,项目名称:ServUO,代码行数:21,代码来源:Runebook.cs

示例9: DropRune

        public void DropRune(Mobile from, RunebookEntry e, int index)
        {
            if (this.m_DefaultIndex > index)
                this.m_DefaultIndex -= 1;
            else if (this.m_DefaultIndex == index)
                this.m_DefaultIndex = -1;

            this.m_Entries.RemoveAt(index);

            if (e.Galleon != null)
            {
                if (e.Galleon.Deleted)
                {
                    from.SendMessage("You discard the rune as the galleon is no longer available.");
                    return;
                }
                else
                {
                    ShipRune rune = new ShipRune(e.Galleon);
                    from.AddToBackpack(rune);
                }
            }
            else
            {
                RecallRune rune = new RecallRune();

                rune.Target = e.Location;
                rune.TargetMap = e.Map;
                rune.Description = e.Description;
                rune.House = e.House;
                rune.Marked = true;

                from.AddToBackpack(rune);
            }

            from.SendLocalizedMessage(502421); // You have removed the rune.
        }
开发者ID:Crome696,项目名称:ServUO,代码行数:37,代码来源:Runebook.cs

示例10: RangerPhoenixFlightSpell

 public RangerPhoenixFlightSpell( Mobile caster, Item scroll, RunebookEntry entry, Runebook book )
     : base(caster, scroll, m_Info)
 {
     m_Entry = entry;
     m_Book = book;
 }
开发者ID:evildude807,项目名称:kaltar,代码行数:6,代码来源:PhoenixFlightSpell.cs

示例11: UndeadTravelByPoisonSpell

 public UndeadTravelByPoisonSpell( Mobile caster, Item scroll, RunebookEntry entry, Runebook book )
     : base(caster, scroll, m_Info)
 {
     m_Entry = entry;
     m_Book = book;
 }
开发者ID:evildude807,项目名称:kaltar,代码行数:6,代码来源:TravelByPoison.cs

示例12: UndeadGraveyardGatewaySpell

 public UndeadGraveyardGatewaySpell( Mobile caster, Item scroll, RunebookEntry entry )
     : base(caster, scroll, m_Info)
 {
     m_Entry = entry;
 }
开发者ID:evildude807,项目名称:kaltar,代码行数:5,代码来源:GraveyardGateway.cs

示例13: DropRune

        public void DropRune( Mobile from, RunebookEntry e, int index )
        {
            if ( m_DefaultIndex == index )
                m_DefaultIndex = -1;

            m_Entries.RemoveAt( index );

            RecallRune rune = new RecallRune();

            rune.Target = e.Location;
            rune.TargetMap = e.Map;
            rune.Description = e.Description;
            rune.House = e.House;
            rune.Marked = true;

            from.AddToBackpack( rune );

            from.SendAsciiMessage( "You have removed the rune." );
        }
开发者ID:cynricthehun,项目名称:UOLegends,代码行数:19,代码来源:Runebook.cs

示例14: DropRune

		public void DropRune(Mobile from, RunebookEntry e, int index)
		{
			if (m_DefaultIndex > index)
			{
				m_DefaultIndex -= 1;
			}
			else if (m_DefaultIndex == index)
			{
				m_DefaultIndex = -1;
			}

			Entries.RemoveAt(index);

			from.AddToBackpack(
				new RecallRune
				{
					Target = e.Location,
					TargetMap = e.Map,
					Description = e.Description,
					House = e.House,
					Marked = true,
                    Hue = e.Hue
				});

			from.SendLocalizedMessage(502421); // You have removed the rune.
		}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:26,代码来源:Runebook.cs

示例15: SacredJourneySpell

 public SacredJourneySpell(Mobile caster, Item scroll, RunebookEntry entry, Runebook book)
     : base(caster, scroll, m_Info)
 {
     this.m_Entry = entry;
     this.m_Book = book;
 }
开发者ID:Ziden,项目名称:ServUO-EC-Test-Fork,代码行数:6,代码来源:SacredJourney.cs


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