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


C# Craft.CraftSystem类代码示例

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


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

示例1: OnCraft

        public int OnCraft(int quality, bool makersMark, Mobile from, CraftSystem craftSystem, Type typeRes, BaseTool tool, CraftItem craftItem, int resHue)
        {
            this.ItemID = 0x14F0;
            this.Faction = Faction.Find(from);

            return 1;
        }
开发者ID:FreeReign,项目名称:forkuo,代码行数:7,代码来源:BaseFactionTrapDeed.cs

示例2: RepairSkillInfo

			public RepairSkillInfo( CraftSystem system, Type[] nearbyTypes, TextDefinition notNearbyMessage, TextDefinition name )
			{
				m_System = system;
				m_NearbyTypes = nearbyTypes;
				m_NotNearbyMessage = notNearbyMessage;
				m_Name = name;
			}
开发者ID:greeduomacro,项目名称:hubroot,代码行数:7,代码来源:RepairDeed.cs

示例3: Process

        public static void Process( CraftSystem system, Mobile from, object targeted, bool playSound, out bool success, out bool isStoreBought, out bool lackMining )
        {
            success = false;
            isStoreBought = false;
            lackMining = false;

            if ( targeted is BaseArmor )
            {
                success = DoResmelt( system, from, (BaseArmor) targeted, ( (BaseArmor) targeted ).Resource, playSound );
                isStoreBought = !( (BaseArmor) targeted ).PlayerConstructed;
                lackMining = !( CheckResourceSkill( ( (BaseArmor) targeted ).Resource, from.Skills[SkillName.Mining].Value ) );
            }
            else if ( targeted is BaseWeapon )
            {
                success = DoResmelt( system, from, (BaseWeapon) targeted, ( (BaseWeapon) targeted ).Resource, playSound );
                isStoreBought = !( (BaseWeapon) targeted ).PlayerConstructed;
                lackMining = !( CheckResourceSkill( ( (BaseWeapon) targeted ).Resource, from.Skills[SkillName.Mining].Value ) );
            }
            else if ( targeted is DragonBardingDeed )
            {
                success = DoResmelt( system, from, (DragonBardingDeed) targeted, ( (DragonBardingDeed) targeted ).Resource, playSound );
                isStoreBought = false;
                lackMining = false;
            }
        }
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:25,代码来源:Resmelt.cs

示例4: OnCraft

		public override int OnCraft( int quality, bool makersMark, Mobile from, CraftSystem craftSystem, Type typeRes, BaseTool tool, CraftItem craftItem, int resHue )
		{
			double magery = from.Skills.Magery.Value - 100;
			
			if ( magery < 0 )
				magery = 0;
					
			int count = (int) Math.Round( magery * Utility.RandomDouble() / 5 );
			
			if ( count > 2 )
				count = 2;
				
			if ( Utility.RandomDouble() < 0.5 )
				count = 0;
			else
				BaseRunicTool.ApplyAttributesTo( this, false, 0, count, 70, 80 );
				
			Attributes.SpellDamage = 25;
			Attributes.LowerManaCost = 10;
			Attributes.CastSpeed = 1;
			Attributes.CastRecovery = 1;
			
			if ( makersMark )
				Crafter = from;
				
			return quality;
		}
开发者ID:PepeBiondi,项目名称:runsa,代码行数:27,代码来源:ScrappersCompendium.cs

示例5: OnCraft

        public override bool OnCraft( bool exceptional, bool makersMark, Mobile from, CraftSystem craftSystem, Type typeRes, BaseTool tool, CraftItem craftItem, int resHue )
        {
            if ( exceptional )
                ArmorAttributes.MageArmor = 1;

            return base.OnCraft( exceptional, makersMark, from, craftSystem, typeRes, tool, craftItem, resHue );
        }
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:7,代码来源:SmallPlateJingasa.cs

示例6: Craft

        public static void Craft( Mobile from, CraftSystem craftSystem, Type typeRes, BaseTool tool, CraftItem craftItem )
        {
            if ( from.Backpack == null )
            {
                from.EndAction( typeof( CraftSystem ) );
                return;
            }

            Timer.DelayCall( TimeSpan.FromSeconds( craftSystem.Delay ), new TimerCallback(
                delegate
                {
                    if ( from.Backpack.GetAmount( typeof( Bottle ) ) < 1 || from.Backpack.GetAmount( typeof( PlantClippings ) ) < 1 )
                    {
                        from.EndAction( typeof( CraftSystem ) );

                        // You don't have the components needed to make that.
                        from.SendGump( new CraftGump( from, craftSystem, tool, 1044253 ) );
                    }
                    else if ( ShouldChooseHue( from ) )
                    {
                        from.SendLocalizedMessage( 1074794 ); // Target the material to use:
                        from.Target = new ClippingsTarget( craftSystem, typeRes, tool, craftItem );
                    }
                    else
                    {
                        from.EndAction( typeof( CraftSystem ) );
                        DoCraft( from, craftSystem, typeRes, tool, craftItem, from.Backpack.FindItemByType<PlantClippings>() );
                    }
                }
            ) );
        }
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:31,代码来源:PlantPigment.cs

示例7: QueryMakersMarkGump

        public QueryMakersMarkGump( bool exceptional, Mobile from, CraftItem craftItem, CraftSystem craftSystem, Type typeRes, BaseTool tool, bool questItem )
            : base(100, 200)
        {
            from.CloseGump( typeof( QueryMakersMarkGump ) );

            m_Exceptional = exceptional;
            m_From = from;
            m_CraftItem = craftItem;
            m_CraftSystem = craftSystem;
            m_TypeRes = typeRes;
            m_Tool = tool;
            m_QuestItem = questItem;

            AddPage( 0 );

            AddBackground( 0, 0, 220, 170, 5054 );
            AddBackground( 10, 10, 200, 150, 3000 );

            AddHtmlLocalized( 20, 20, 180, 80, 1018317, false, false ); // Do you wish to place your maker's mark on this item?

            AddHtmlLocalized( 55, 100, 140, 25, 1011036, false, false ); // OKAY
            AddButton( 20, 100, 4005, 4007, 2, GumpButtonType.Reply, 0 );

            AddHtmlLocalized( 55, 125, 140, 25, 1011012, false, false ); // CANCEL
            AddButton( 20, 125, 4005, 4007, 1, GumpButtonType.Reply, 0 );
        }
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:26,代码来源:QueryMakersMarkGump.cs

示例8: MakeNumberCraftPrompt

 public MakeNumberCraftPrompt(Mobile from, CraftSystem system, CraftItem item, BaseTool tool)
 {
     m_From = from;
     m_CraftSystem = system;
     m_CraftItem = item;
     m_Tool = tool;
 }
开发者ID:Crome696,项目名称:ServUO,代码行数:7,代码来源:AutoCraft.cs

示例9: QueryMakersMarkGump

        public QueryMakersMarkGump(int quality, Mobile from, CraftItem craftItem, CraftSystem craftSystem, Type typeRes, BaseTool tool)
            : base(100, 200)
        {
            from.CloseGump(typeof(QueryMakersMarkGump));

            this.m_Quality = quality;
            this.m_From = from;
            this.m_CraftItem = craftItem;
            this.m_CraftSystem = craftSystem;
            this.m_TypeRes = typeRes;
            this.m_Tool = tool;

            this.AddPage(0);

            this.AddBackground(0, 0, 220, 170, 5054);
            this.AddBackground(10, 10, 200, 150, 3000);

            this.AddHtmlLocalized(20, 20, 180, 80, 1018317, false, false); // Do you wish to place your maker's mark on this item?

            this.AddHtmlLocalized(55, 100, 140, 25, 1011011, false, false); // CONTINUE
            this.AddButton(20, 100, 4005, 4007, 1, GumpButtonType.Reply, 0);

            this.AddHtmlLocalized(55, 125, 140, 25, 1011012, false, false); // CANCEL
            this.AddButton(20, 125, 4005, 4007, 0, GumpButtonType.Reply, 0);
        }
开发者ID:FreeReign,项目名称:forkuo,代码行数:25,代码来源:QueryMakersMarkGump.cs

示例10: AutoCraftTimer

        public AutoCraftTimer(Mobile from, CraftSystem system, CraftItem item, BaseTool tool, int amount, TimeSpan delay, TimeSpan interval)
            : base(delay, interval)
        {
            m_From = from;
            m_CraftSystem = system;
            m_CraftItem = item;
            m_Tool = tool;
            m_Amount = amount;
            m_Ticks = 0;
            m_Success = 0;

            CraftContext context = m_CraftSystem.GetContext(m_From);

            if (context != null)
            {
                CraftSubResCol res = (m_CraftItem.UseSubRes2 ? m_CraftSystem.CraftSubRes2 : m_CraftSystem.CraftSubRes);
                int resIndex = (m_CraftItem.UseSubRes2 ? context.LastResourceIndex2 : context.LastResourceIndex);

                if (resIndex > -1)
                    m_TypeRes = res.GetAt(resIndex).ItemType;
            }

            m_AutoCraftTable[from] = this;

            this.Start();
        }
开发者ID:Ziden,项目名称:ServUO-EC-Test-Fork,代码行数:26,代码来源:AutoCraft.cs

示例11: CheckSkill

        public static void CheckSkill( ref int baseChance, Mobile from, CraftSystem craftSystem )
        {
            int skill = from.Skills[craftSystem.MainSkill].Fixed / 10;

            if ( skill >= 100 )
                baseChance -= (skill - 90) / 10;
        }
开发者ID:kamronbatman,项目名称:Defiance-AOS-Pre-2012,代码行数:7,代码来源:Enhance.cs

示例12: InternalTarget

 public InternalTarget( CraftSystem craftSystem, double skill_level, Item contract )
     : base(2, false, TargetFlags.None)
 {
     m_CraftSystem = craftSystem;
     m_Tool = null;
     m_SkillLevel = skill_level;
     m_Contract = contract;
 }
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:8,代码来源:Repair.cs

示例13: AddRecipe

		protected void AddRecipe( CraftSystem system )
		{
			// TODO: change craftable artifact recipes to a rarer drop
			int recipeID = system.RandomRecipe();

			if ( recipeID != -1 )
				DropItem( new RecipeScroll( recipeID ) );
		}
开发者ID:greeduomacro,项目名称:last-wish,代码行数:8,代码来源:CraftmansSatchel.cs

示例14: CraftGumpItem

        public CraftGumpItem( Mobile from, CraftSystem craftSystem, CraftItem craftItem, BaseTool tool )
            : base(40, 40)
        {
            m_From = from;
            m_CraftSystem = craftSystem;
            m_CraftItem = craftItem;
            m_Tool = tool;

            from.CloseGump( typeof( CraftGump ) );
            from.CloseGump( typeof( CraftGumpItem ) );

            AddPage( 0 );
            AddBackground( 0, 0, 530, 417, 5054 );
            AddImageTiled( 10, 10, 510, 22, 2624 );
            AddImageTiled( 10, 37, 150, 148, 2624 );
            AddImageTiled( 165, 37, 355, 90, 2624 );
            AddImageTiled( 10, 190, 155, 22, 2624 );
            AddImageTiled( 10, 217, 150, 53, 2624 );
            AddImageTiled( 165, 132, 355, 80, 2624 );
            AddImageTiled( 10, 275, 155, 22, 2624 );
            AddImageTiled( 10, 302, 150, 53, 2624 );
            AddImageTiled( 165, 217, 355, 80, 2624 );
            AddImageTiled( 10, 360, 155, 22, 2624 );
            AddImageTiled( 165, 302, 355, 80, 2624 );
            AddImageTiled( 10, 387, 510, 22, 2624 );
            AddAlphaRegion( 10, 10, 510, 399 );

            AddHtmlLocalized( 170, 40, 150, 20, 1044053, LabelColor, false, false ); // ITEM
            AddHtmlLocalized( 10, 192, 150, 22, 1044054, LabelColor, false, false ); // <CENTER>SKILLS</CENTER>
            AddHtmlLocalized( 10, 277, 150, 22, 1044055, LabelColor, false, false ); // <CENTER>MATERIALS</CENTER>
            AddHtmlLocalized( 10, 362, 150, 22, 1044056, LabelColor, false, false ); // <CENTER>OTHER</CENTER>

            if ( craftSystem.GumpTitleNumber > 0 )
                AddHtmlLocalized( 10, 12, 510, 20, craftSystem.GumpTitleNumber, LabelColor, false, false );
            else
                AddHtml( 10, 12, 510, 20, craftSystem.GumpTitleString, false, false );

            AddButton( 15, 387, 4014, 4016, 0, GumpButtonType.Reply, 0 );
            AddHtmlLocalized( 50, 390, 150, 18, 1044150, LabelColor, false, false ); // BACK

            AddButton( 270, 387, 4005, 4007, 1, GumpButtonType.Reply, 0 );
            AddHtmlLocalized( 305, 390, 150, 18, 1044151, LabelColor, false, false ); // MAKE NOW

            if ( craftItem.NameNumber > 0 )
                AddHtmlLocalized( 330, 40, 180, 18, craftItem.NameNumber, LabelColor, false, false );
            else
                AddLabel( 330, 40, LabelHue, craftItem.NameString );

            if ( craftItem.UseAllRes )
                AddHtmlLocalized( 170, 302 + (m_OtherCount++ * 20), 310, 18, 1048176, LabelColor, false, false ); // Makes as many as possible at once

            DrawItem();
            DrawSkill();
            DrawRessource();

            if( craftItem.RequiresSE )
                AddHtmlLocalized( 170, 302 + (m_OtherCount++ * 20), 310, 18, 1063363, LabelColor, false, false ); //* Requires the "Samurai Empire" expansion
        }
开发者ID:cynricthehun,项目名称:UOLegends,代码行数:58,代码来源:CraftGumpItem.cs

示例15: OnCraft

		public virtual int OnCraft( int quality, bool makersMark, Mobile from, CraftSystem craftSystem, Type typeRes, BaseTool tool, CraftItem craftItem, int resHue )
		{
			if ( makersMark )
				Crafter = from;

			m_Quality = (RuneQuality)quality;

			return quality;
		}
开发者ID:romeov007,项目名称:imagine-uo,代码行数:9,代码来源:BaseSupremeRune.cs


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