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

C# Mobiles.BaseCreature类代码示例

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

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



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


示例16: Deserialize

        public override void Deserialize( GenericReader reader )
        {
            base.Deserialize( reader );

            int version = reader.ReadInt();

            switch ( version )
            {
                case 1:
                {
                    m_BondOwner = reader.ReadMobile();
                    goto case 0;
                }
                case 0:
                {
                    m_link = (BaseCreature)reader.ReadMobile();
                    m_toDeletePet = reader.ReadBool();
                    break;
                }

            }

            if ( m_link != null )
                m_link.IsStabled = true;
        }
开发者ID:greeduomacro,项目名称:DimensionsNewAge,代码行数:25,代码来源:ShrinkItem.cs


示例17: ScaleStats

		public static void ScaleStats(BaseCreature bc, double scalar)
		{
			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.RawInt > 0)
			{
				bc.RawInt = (int)Math.Max(1, bc.RawInt * 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;
			}
		}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:29,代码来源:AnimalTaming.cs


示例18: ChangeToSetManeuver

 public virtual void ChangeToSetManeuver( BaseCreature bc )
 {
     bc.CombatManeuver = bc.SetManeuver;
     bc.OffensiveFeat = bc.CombatManeuver.ListedName;
     bc.ManeuverAccuracyBonus = bc.CombatManeuver.AccuracyBonus * bc.CombatManeuver.FeatLevel;
     bc.ManeuverDamageBonus = bc.CombatManeuver.DamageBonus * bc.CombatManeuver.FeatLevel;
 }
开发者ID:justdanofficial,项目名称:khaeros,代码行数:7,代码来源:BaseImprovedAI.cs


示例19: Target

        public void Target( BaseCreature bc )
        {
            if ( !Caster.CanSee( bc ) )
            {
                Caster.SendLocalizedMessage( 500237 ); // Target can not be seen.
            }
            if ( !Caster.InRange( bc, 6 ) )
            {
                Caster.SendLocalizedMessage( 500643 ); // Target is too far away.
            }
            else if ( !Caster.CanBeHarmful( bc ) || !bc.CanBeDamaged() )
            {
                Caster.SendLocalizedMessage( 1074379 ); // You cannot charm that!
            }
            else if ( bc.Controlled || bc.Name == null )
            {
                Caster.SendLocalizedMessage( 1074379 ); // You cannot charm that!
            }
            else if ( bc is BaseChampion || bc.IsParagon || bc is Medusa || bc is Lurg || !SlayerGroup.GetEntryByName( SlayerName.Repond ).Slays( bc ) )
            {
                Caster.SendLocalizedMessage( 1074379 ); // You cannot charm that!
            }
            else if ( CheckSequence() )
            {
                double chance = Caster.Skills[SkillName.Spellweaving].Fixed / 1000;

                chance += ( SpellweavingSpell.GetFocusLevel( Caster ) * 2 ) / 100;

                if ( chance > Utility.RandomDouble() )
                {
                    SpellHelper.Turn( Caster, bc );

                    bc.ControlSlots = 3;

                    bc.ActiveSpeed = 2;
                    bc.PassiveSpeed = 2;

                    bc.Owners.Add( Caster );

                    bc.SetControlMaster( Caster );

                    bc.IsBonded = false;

                    Caster.SendLocalizedMessage( 1072527 ); // You allure the humanoid to follow and protect you.

                    Caster.PlaySound( 0x5C4 );
                }
                else
                {
                    bc.Combatant = Caster;

                    Caster.SendLocalizedMessage( 1072528 ); // The humanoid becomes enraged by your charming attempt and attacks you.

                    Caster.PlaySound( 0x5C5 );
                }
            }

            FinishSequence();
        }
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:59,代码来源:DryadAllure.cs


示例20: AnimateFlying

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

               		fbc.PlaySound( 0x2D0 );
			fbc.Animate( 24, 5, 1, true, false, 0 );
		}
开发者ID:greeduomacro,项目名称:cov-shard-svn-1,代码行数:8,代码来源:FlyingAI.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# Mobiles.BaseVendor类代码示例发布时间:2022-05-26
下一篇:
C# Mobiles.BaseAI类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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