• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# SpellbookType类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: ValidateSpellbook

		public static bool ValidateSpellbook( Spellbook book, int spellID, SpellbookType type )
		{
			return ( book.SpellbookType == type && ( spellID == -1 || book.HasSpell( spellID ) ) );
		}
开发者ID:ITLongwell,项目名称:mondains-legacy,代码行数:4,代码来源:Spellbook.cs


示例2: RandomScroll

		public static SpellScroll RandomScroll( int minIndex, int maxIndex, SpellbookType type )
		{
			Type[] types;

			switch ( type )
			{
				default:
				case SpellbookType.Regular: types = m_RegularScrollTypes; break;
				case SpellbookType.Necromancer: types = (Core.SE ? m_SENecromancyScrollTypes : m_NecromancyScrollTypes ); break;
				case SpellbookType.Paladin: types = m_PaladinScrollTypes; break;
				case SpellbookType.Arcanist: types = m_ArcaneScrollTypes; break;
			}

			return Construct( types, Utility.RandomMinMax( minIndex, maxIndex ) ) as SpellScroll;
		}
开发者ID:nick12344356,项目名称:The-Basement,代码行数:15,代码来源:Loot.cs


示例3: Find

		public static Spellbook Find( Mobile from, int spellID, SpellbookType type )
		{
			if ( from == null )
				return null;

			ArrayList list = (ArrayList)m_Table[from];

			if ( from.Deleted )
			{
				m_Table.Remove( from );
				return null;
			}

			bool searchAgain = false;

			if ( list == null )
				m_Table[from] = list = FindAllSpellbooks( from );
			else
				searchAgain = true;

			Spellbook book = FindSpellbookInList( list, from, spellID, type );

			if ( book == null && searchAgain )
			{
				m_Table[from] = list = FindAllSpellbooks( from );

				book = FindSpellbookInList( list, from, spellID, type );
			}

			return book;
		}
开发者ID:ITLongwell,项目名称:mondains-legacy,代码行数:31,代码来源:Spellbook.cs


示例4: FindSpellbookInList

		public static Spellbook FindSpellbookInList( ArrayList list, Mobile from, int spellID, SpellbookType type )
		{
			Container pack = from.Backpack;

			for ( int i = list.Count - 1; i >= 0; --i )
			{
				if ( i >= list.Count )
					continue;

				Spellbook book = (Spellbook)list[i];

				if ( !book.Deleted && (book.Parent == from || (pack != null && book.Parent == pack)) && ValidateSpellbook( book, spellID, type ) )
					return book;

				list.Remove( i );
			}

			return null;
		}
开发者ID:ITLongwell,项目名称:mondains-legacy,代码行数:19,代码来源:Spellbook.cs


示例5: Find

		public static Spellbook Find(Mobile from, int spellID, SpellbookType type)
		{
			if (from == null)
			{
				return null;
			}

			if (from.Deleted)
			{
				m_Table.Remove(from);
				return null;
			}

			List<Spellbook> list = null;

			m_Table.TryGetValue(from, out list);

			bool searchAgain = false;

			if (list == null)
			{
				m_Table[from] = list = FindAllSpellbooks(from);
			}
			else
			{
				searchAgain = true;
			}

			Spellbook book = FindSpellbookInList(list, from, spellID, type);

			if (book == null && searchAgain)
			{
				m_Table[from] = list = FindAllSpellbooks(from);

				book = FindSpellbookInList(list, from, spellID, type);
			}

			return book;
		}
开发者ID:mtPrimo,项目名称:ServUO,代码行数:39,代码来源:Spellbook.cs


示例6: CollectionSpellbook

 public CollectionSpellbook(SpellbookType type, int itemID, int tooltip, double points)
     : base(typeof(Spellbook), itemID, tooltip, 0x0, points)
 {
     this.m_Type = type;
 }
开发者ID:Ziden,项目名称:ServUO-EC-Test-Fork,代码行数:5,代码来源:CollectionItem.cs


示例7: FindSpellbookInList

		public static Spellbook FindSpellbookInList( List<Spellbook> list, Mobile from, int spellID, SpellbookType type )
		{
            // Scriptiz 25/04/12 : on fait un check propre pour voir si il y a un spellbook équippé, si oui, et s'il s'agit
            // d'un spellbook du même type que le sort casté, il faut trouvé le sort uniquement dans ce livre équippé !
            Spellbook sb = FindEquippedSpellbook(from);
            if (sb != null && sb.SpellbookType == GetTypeForSpell(spellID))
                return sb;

			Container pack = from.Backpack;

			for ( int i = list.Count - 1; i >= 0; --i )
			{
				if ( i >= list.Count )
					continue;

				Spellbook book = list[i];

				if ( !book.Deleted && (book.Parent == from || (pack != null && book.Parent == pack)) && ValidateSpellbook( book, spellID, type ) )
					return book;

				list.RemoveAt( i );
			}

			return null;
		}
开发者ID:greeduomacro,项目名称:vivre-uo,代码行数:25,代码来源:Spellbook.cs


示例8: Find

		public static Spellbook Find( Mobile from, int spellID, SpellbookType type )
		{
			if ( from == null )
				return null;

			if ( from.Deleted )
			{
				m_Table.Remove( from );
				return null;
			}

			List<Spellbook> list = null;

			m_Table.TryGetValue( from, out list );

			bool searchAgain = false;

			if ( list == null )
				m_Table[from] = list = FindAllSpellbooks( from );
			else
				searchAgain = true;

			Spellbook book = FindSpellbookInList( list, from, spellID, type );

            // Scriptiz : Si le bouquin contenant le sort n'est pas le bouquin équippé, on refait une recherche !
            // Ajout :  || (GetTypeForSpell(spellID) != SpellbookType.Regular && book != FindEquippedSpellbook(from))
            // Scriptiz edit 24/04/12 : on retire les modifs dégueu
            if ((book == null && searchAgain))// || (GetTypeForSpell(spellID) != SpellbookType.Regular && book != FindEquippedSpellbook(from)))
			{
				m_Table[from] = list = FindAllSpellbooks( from );

				book = FindSpellbookInList( list, from, spellID, type );
			}

			return book;
		}
开发者ID:greeduomacro,项目名称:vivre-uo,代码行数:36,代码来源:Spellbook.cs


示例9: RandomScroll

        public static SpellScroll RandomScroll( int minIndex, int maxIndex, SpellbookType type )
        {
            Type[] types;

            switch( type )
            {
                default:
                case SpellbookType.Regular: types = m_RegularScrollTypes; break;
            }

            return Construct(types, Utility.RandomMinMax(minIndex, maxIndex)) as SpellScroll;
        }
开发者ID:ITLongwell,项目名称:Ulmeta,代码行数:12,代码来源:Loot.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Sphere类代码示例发布时间:2022-05-24
下一篇:
C# SpellbookStopCastEventArgs类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap