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


C# Item.GetSavedFlag方法代码示例

本文整理汇总了C#中Item.GetSavedFlag方法的典型用法代码示例。如果您正苦于以下问题:C# Item.GetSavedFlag方法的具体用法?C# Item.GetSavedFlag怎么用?C# Item.GetSavedFlag使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Item的用法示例。


在下文中一共展示了Item.GetSavedFlag方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetTaken

 public static bool GetTaken(Item target)
 {
     if (target != null)
         return target.GetSavedFlag(TakenFlag);
     else
         return false;
 }
开发者ID:jasegiffin,项目名称:JustUO,代码行数:7,代码来源:ItemFlags.cs

示例2: GetStealable

 public static bool GetStealable(Item target)
 {
     if (target != null)
         return target.GetSavedFlag(StealableFlag);
     else
         return false;
 }
开发者ID:jasegiffin,项目名称:JustUO,代码行数:7,代码来源:ItemFlags.cs

示例3: CheckLift

		public override bool CheckLift(Mobile from, Item item, ref LRReason reject)
		{
			if (item.GetSavedFlag(0x01)) //Not lootable
			{
				reject = LRReason.CannotLift;
				from.PublicOverheadMessage(MessageType.Regular, 33, false, "[Looting] Attempted to loot sticky item!");
				return false;
			}

			if (!base.CheckLift(from, item, ref reject))
			{
				return false;
			}

			return CanLoot(from, item);
		}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:16,代码来源:Corpse.cs

示例4: TryStealItem

			private Item TryStealItem(Item toSteal, ref bool caught)
			{
				//Close bank box on steal attempt -Adam
				BankBox box = m_Thief.FindBankNoCreate();

				if (box != null && box.Opened)
				{
					box.Close();
					m_Thief.Send(new MobileUpdate(m_Thief));
				}

				Item stolen = null;

				object root = toSteal.RootParent;

				var contParent = toSteal.Parent as Container;

				StealableArtifactsSpawner.StealableInstance si = null;
				if (toSteal.Parent == null || !toSteal.Movable)
				{
					si = StealableArtifactsSpawner.GetStealableInstance(toSteal);
				}

				BaseAddon addon = null;

				if (toSteal is AddonComponent)
				{
					addon = ((AddonComponent)toSteal).Addon;
				}

				bool stealflag = (addon != null && addon.GetSavedFlag(ItemFlags.StealableFlag)) ||
								 toSteal.GetSavedFlag(ItemFlags.StealableFlag);

				if (!IsEmptyHanded(m_Thief))
				{
					m_Thief.SendLocalizedMessage(1005584); // Both hands must be free to steal.
				}
				else if (root is Mobile && ((Mobile)root).Player && IsInnocentTo(m_Thief, (Mobile)root) && !IsInGuild(m_Thief))
				{
					m_Thief.SendLocalizedMessage(1005596); // You must be in the thieves guild to steal from other players.
				}
				else if (SuspendOnMurder && root is Mobile && ((Mobile)root).Player && IsInGuild(m_Thief) && m_Thief.Kills > 0)
				{
					m_Thief.SendLocalizedMessage(502706); // You are currently suspended from the thieves guild.
				}
				else if (root is BaseVendor && ((BaseVendor)root).IsInvulnerable)
				{
					m_Thief.SendLocalizedMessage(1005598); // You can't steal from shopkeepers.
				}
				else if (root is PlayerVendor)
				{
					m_Thief.SendLocalizedMessage(502709); // You can't steal from vendors.
				}
				else if (!m_Thief.CanSee(toSteal))
				{
					m_Thief.SendLocalizedMessage(500237); // Target can not be seen.
				}
				else if (m_Thief.Backpack == null || !m_Thief.Backpack.CheckHold(m_Thief, toSteal, false, true))
				{
					m_Thief.SendLocalizedMessage(1048147); // Your backpack can't hold anything else.
				}
					#region Sigils
				else if (toSteal is Sigil)
				{
					PlayerState pl = PlayerState.Find(m_Thief);
					Faction faction = (pl == null ? null : pl.Faction);

					var sig = (Sigil)toSteal;

					if (!m_Thief.InRange(toSteal.GetWorldLocation(), 1))
					{
						m_Thief.SendLocalizedMessage(502703); // You must be standing next to an item to steal it.
					}
					else if (root != null) // not on the ground
					{
						m_Thief.SendLocalizedMessage(502710); // You can't steal that!
					}
					else if (faction != null)
					{
						if (!m_Thief.CanBeginAction(typeof(IncognitoSpell)))
						{
							m_Thief.SendLocalizedMessage(1010581); //	You cannot steal the sigil when you are incognito
						}
						else if (DisguiseTimers.IsDisguised(m_Thief))
						{
							m_Thief.SendLocalizedMessage(1010583); //	You cannot steal the sigil while disguised
						}
						else if (!m_Thief.CanBeginAction(typeof(PolymorphSpell)))
						{
							m_Thief.SendLocalizedMessage(1010582); //	You cannot steal the sigil while polymorphed
						}
						else if (TransformationSpellHelper.UnderTransformation(m_Thief))
						{
							m_Thief.SendLocalizedMessage(1061622); // You cannot steal the sigil while in that form.
						}
						else if (m_Thief is PlayerMobile && ((PlayerMobile)m_Thief).SavagePaintExpiration > TimeSpan.Zero)
						{
							m_Thief.SendLocalizedMessage(1114352); // You cannot steal the sigil while disguised in savage paint.
						}
						else if (pl.IsLeaving)
//.........这里部分代码省略.........
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:101,代码来源:Stealing.cs


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