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


C# Mobiles.BaseCreature类代码示例

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


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

示例1: BaseAI

		public BaseAI(BaseCreature m)
		{
			m_Mobile = m;

			m_Timer = new AITimer(this);

			bool activate;

			if (!m.PlayerRangeSensitive)
			{
				activate = true;
			}
			else if (World.Loading)
			{
				activate = false;
			}
			else if (m.Map == null || m.Map == Map.Internal || !m.Map.GetSector(m).Active)
			{
				activate = false;
			}
			else
			{
				activate = true;
			}

			if (activate)
			{
				m_Timer.Start();
			}

			Action = ActionType.Wander;
		}
开发者ID:Crome696,项目名称:ServUO,代码行数:32,代码来源:BaseAI.cs

示例2: Scale

        public static void Scale(BaseCreature bc, double scalar, bool scaleStats)
        {
            if (scaleStats)
            {
                if (bc.RawStr > 0)
                    bc.RawStr = (int)Math.Max(1, bc.RawStr * scalar);

                if (bc.RawDex > 0)
                    bc.RawDex = (int)Math.Max(1, bc.RawDex * scalar);

                if (bc.HitsMaxSeed > 0)
                {
                    bc.HitsMaxSeed = (int)Math.Max(1, bc.HitsMaxSeed * scalar);
                    bc.Hits = bc.Hits;
                }

                if (bc.StamMaxSeed > 0)
                {
                    bc.StamMaxSeed = (int)Math.Max(1, bc.StamMaxSeed * scalar);
                    bc.Stam = bc.Stam;
                }
            }

            for (int i = 0; i < bc.Skills.Length; ++i)
                bc.Skills[i].Base *= scalar;
        }
开发者ID:greeduomacro,项目名称:divinity,代码行数:26,代码来源:AnimalTaming.cs

示例3: RandomFarmableItems

 public RandomFarmableItems(BaseCreature creature)
     : base(creature, EnumChance.Normal)
 {
     this.AddSortableItem(new Cotton(3));
     this.AddSortableItem(new Flax(3));
     this.AddSortableItem(new WheatSheaf(3));
 }
开发者ID:brodock,项目名称:genova-project,代码行数:7,代码来源:RandomFarmableItem.cs

示例4: CreatureDamagedEventArgs

 public CreatureDamagedEventArgs( BaseCreature bc, int amount, Mobile from, bool willKill )
 {
     Aggressor = from;
     Creature = bc;
     DamageAmount = amount;
     WillKill = willKill;
 }
开发者ID:greeduomacro,项目名称:hubroot,代码行数:7,代码来源:EventArgs.cs

示例5: OnKill

		public override void OnKill( BaseCreature creature, Container corpse )
		{
			if ( creature is CursedSoul )
			{
				if ( m_CursedSoulsKilled == 0 )
					System.AddConversation( new GainKarmaConversation( true ) );

				m_CursedSoulsKilled++;

				// Cursed Souls killed:  ~1_COUNT~
				System.From.SendLocalizedMessage( 1063038, m_CursedSoulsKilled.ToString() );
			}
			else if ( creature is YoungRonin )
			{
				if ( m_YoungRoninKilled == 0 )
					System.AddConversation( new GainKarmaConversation( false ) );

				m_YoungRoninKilled++;

				// Young Ronin killed:  ~1_COUNT~
				System.From.SendLocalizedMessage( 1063039, m_YoungRoninKilled.ToString() );
			}

			CurProgress = Math.Max( m_CursedSoulsKilled, m_YoungRoninKilled );
		}
开发者ID:FreeReign,项目名称:imaginenation,代码行数:25,代码来源:Objectives.cs

示例6: RunFly

		public static void RunFly( BaseCreature fbc )
		{
			if ( NullCheck( fbc ))
				return;

			fbc.Direction |= Direction.Running;
		}
开发者ID:greeduomacro,项目名称:cov-shard-svn-1,代码行数:7,代码来源:FlyingAI.cs

示例7: IsFireBreathingCreature

        private static bool IsFireBreathingCreature(BaseCreature bc)
        {
            if (bc == null)
                return false;

            return bc.HasBreath;
        }
开发者ID:jasegiffin,项目名称:JustUO,代码行数:7,代码来源:LevelItemManager.cs

示例8: CombineBackpacks

        public static void CombineBackpacks( BaseCreature animal )
        {
            if ( Core.AOS )
                return;

            //if ( animal.IsBonded || animal.IsDeadPet )
            //	return;

            Container pack = animal.Backpack;

            if ( pack != null )
            {
                Container newPack = new Backpack();

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

                    newPack.DropItem( pack.Items[i] );
                }

                pack.DropItem( newPack );
            }
        }
开发者ID:Godkong,项目名称:Origins,代码行数:25,代码来源:PackHorse.cs

示例9: CharmedMobile

 public CharmedMobile(BaseCreature owner)
     : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
 {
     owner = m_Owner;
     Body = 777;
     Title = " The Mystic Lama Herder";
 }
开发者ID:evildude807,项目名称:kaltar,代码行数:7,代码来源:CharmedMobile.cs

示例10: PetResurrectGump

        public PetResurrectGump(Mobile from, BaseCreature pet, double hitsScalar) : base(50, 50)
        {
            from.CloseGump(typeof (PetResurrectGump));

            m_Pet = pet;
            m_HitsScalar = hitsScalar;

            AddPage(0);

            AddBackground(10, 10, 265, 140, 0x242C);

            AddItem(205, 40, 0x4);
            AddItem(227, 40, 0x5);

            AddItem(180, 78, 0xCAE);
            AddItem(195, 90, 0xCAD);
            AddItem(218, 95, 0xCB0);

            AddHtmlLocalized(30, 30, 150, 75, 1049665, false, false);
                // <div align=center>Wilt thou sanctify the resurrection of:</div>
            AddHtml(30, 70, 150, 25, String.Format("<div align=CENTER>{0}</div>", pet.Name), true, false);

            AddButton(40, 105, 0x81A, 0x81B, 0x1, GumpButtonType.Reply, 0); // Okay
            AddButton(110, 105, 0x819, 0x818, 0x2, GumpButtonType.Reply, 0); // Cancel
        }
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:25,代码来源:PetResurrectGump.cs

示例11: UnsummonTimer

 public UnsummonTimer(Mobile caster, BaseCreature creature, TimeSpan delay)
     : base(delay)
 {
     this.m_Caster = caster;
     this.m_Creature = creature;
     this.Priority = TimerPriority.OneSecond;
 }
开发者ID:Crome696,项目名称:ServUO,代码行数:7,代码来源:UnsummonTimer.cs

示例12: Check

			private static void Check(Mobile from, BaseCreature c, double min)
			{
				if (from.CheckTargetSkill(SkillName.AnimalLore, c, min, 120.0))
					SendGump(from, c);
				else
					from.SendLocalizedMessage(500334); // You can't think of anything you know offhand.
			}
开发者ID:Crome696,项目名称:ServUO,代码行数:7,代码来源:AnimalLore.cs

示例13: CouncilMemberAI

		public CouncilMemberAI(BaseCreature m)
			: base(m)
		{
			DmgSlowsMovement = false;
			CanRun = false;
			UsesPotions = false; //CanDrinkPots = false;
		}
开发者ID:zerodowned,项目名称:angelisland,代码行数:7,代码来源:CouncilMemberAI.cs

示例14: TokenTest

		public static void TokenTest(Mobile m, BaseCreature bc)
		{
			if ( m.Backpack == null )
				return;

			int karma = Math.Abs( bc.Karma );
			int tokenbase = ( bc.TotalGold + karma + bc.Fame + ((bc.Hits+bc.Stam+bc.Mana)/3)) / 6000;
			int maxtokens = 6 + ( 100 * tokenbase );
			int mintokens = TokenSettings.Loot_Difference*(maxtokens/100);

			int tokenstogive = Utility.Random( mintokens, maxtokens );
			bool tokensgiven = false;

			foreach( Item i in m.Backpack.Items )
			{
				if( i is TokenBag && !tokensgiven)
				{
					Tokens t = new Tokens( tokenstogive );
					if ( ((Container)i).TryDropItem( m, t, true ) )
					{
						m.SendMessage( "You have received {0} tokens", tokenstogive );
						tokensgiven = true;
					}
					else
						t.Delete();
				}
				if ( tokensgiven )
					break;
			}
		}
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:30,代码来源:TokenTest.cs

示例15: KillEntry

        /// <summary>
        /// Represents an entry in the killTable
        /// pkKillEntryID, fkMonsterEntryID, PlayersKilled, PlayerCount, BSCount, EVcount
        /// </summary>
        /// <param name="creatureKilled"></param>
        /// <param name="damageEntries"></param>
        /// <param name="mobilesKilled"></param>
        /// <param name="lootItems"></param>
        public KillEntry(BaseCreature creatureKilled, IList<DamageEntry> damageEntries, Dictionary<Mobile, int> mobilesKilled, IList<Item> lootItems)
        {
            m_CreatureKilled = creatureKilled;

            m_KillTime = m_CreatureKilled.KillDuration;

            //Used to determine if a killer has accoured
            List<Mobile> monsterKillerList = GetKillerList(damageEntries);
            
            SetKillerTypes(monsterKillerList);

            SetPlayersDied(mobilesKilled, monsterKillerList);

            //Initialize the list and add the gold entry to it
            m_DatabaseEntries = new List<DatabaseEntry>(lootItems.Count + 1) { new GoldValueEntry(lootItems) };

            //Loop through the remaining items (gold and stones excluded) and add them to the DatabaseEntry list
            for (int i = 0; i < lootItems.Count; i++)
            {
                Item item = lootItems[i];

                if (item is BaseWeapon)
                    m_DatabaseEntries.Add(new WeaponEntry((BaseWeapon)item));
                else if (item is BaseArmor)
                    m_DatabaseEntries.Add(new ArmorEntry((BaseArmor)item));
                else
                    m_DatabaseEntries.Add(new ItemEntry(item));
            }
        }
开发者ID:FreeReign,项目名称:imaginenation,代码行数:37,代码来源:KillEntry.cs


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