本文整理汇总了C#中Server.Item.CheckBlessed方法的典型用法代码示例。如果您正苦于以下问题:C# Item.CheckBlessed方法的具体用法?C# Item.CheckBlessed怎么用?C# Item.CheckBlessed使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Server.Item
的用法示例。
在下文中一共展示了Item.CheckBlessed方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TryStealItem
//.........这里部分代码省略.........
{
m_Thief.SendMessage( "The sigil has gone back to its home location because you already have a sigil." );
}
else if ( m_Thief.Backpack == null || !m_Thief.Backpack.CheckHold( m_Thief, sig, false, true ) )
{
m_Thief.SendAsciiMessage( "The sigil has gone home because your backpack is full." );
}
else
{
if ( sig.IsBeingCorrupted )
sig.GraceStart = DateTime.Now; // begin grace period
m_Thief.SendAsciiMessage( "YOU STOLE THE SIGIL!!!" );
if ( sig.LastMonolith != null )
sig.LastMonolith.Sigil = null;
sig.LastStolen = DateTime.Now;
return sig;
}
}
else
{
m_Thief.SendAsciiMessage( "You do not have enough skill to steal the sigil." );
}
}
else
{
m_Thief.SendAsciiMessage( "You must join a faction to do that." );
}
}
#endregion
else if ( toSteal.Parent == null || !toSteal.Movable || toSteal.LootType == LootType.Newbied || toSteal.CheckBlessed( root ) )
{
m_Thief.SendAsciiMessage( "You can't steal that!" );
}
else if ( Core.AOS && toSteal is Container )
{
m_Thief.SendAsciiMessage( "You can't steal that!" );
}
else if ( !m_Thief.InRange( toSteal.GetWorldLocation(), 1 ) )
{
m_Thief.SendAsciiMessage( "You must be standing next to an item to steal it." );
}
else if ( toSteal.Parent is Mobile )
{
m_Thief.SendAsciiMessage( "You cannot steal items which are equipped." );
}
else if ( root == m_Thief )
{
m_Thief.SendAsciiMessage( "You catch yourself red-handed." );
}
else if ( root is Mobile && ((Mobile)root).AccessLevel > AccessLevel.Player )
{
m_Thief.SendAsciiMessage( "You can't steal that!" );
}
else if ( root is Mobile && !m_Thief.CanBeHarmful( (Mobile)root ) )
{
}
else if ( root is Corpse )
{
m_Thief.SendAsciiMessage( "You can't steal that!" );
}
else
{
示例2: TryStealItem
//.........这里部分代码省略.........
{
m_Thief.SendLocalizedMessage( 1010259 ); // The sigil has gone home because your backpack is full
}
else
{
if ( sig.IsBeingCorrupted )
sig.GraceStart = DateTime.Now; // begin grace period
m_Thief.SendLocalizedMessage( 1010586 ); // YOU STOLE THE SIGIL!!! (woah, calm down now)
if ( sig.LastMonolith != null )
sig.LastMonolith.Sigil = null;
sig.LastStolen = DateTime.Now;
return sig;
}
}
else
{
m_Thief.SendLocalizedMessage( 1005594 ); // You do not have enough skill to steal the sigil
}
}
else
{
m_Thief.SendLocalizedMessage( 1005588 ); // You must join a faction to do that
}
}
#endregion
else if ( ( toSteal.Parent == null || !toSteal.Movable ) )
{
m_Thief.SendLocalizedMessage( 502710 ); // You can't steal that!
}
else if ( toSteal.LootType == LootType.Newbied || toSteal.CheckBlessed( root ) )
{
m_Thief.SendLocalizedMessage( 502710 ); // You can't steal that!
}
else if ( Core.AOS && toSteal is Container )
{
m_Thief.SendLocalizedMessage( 502710 ); // You can't steal that!
}
else if ( !m_Thief.InRange( toSteal.GetWorldLocation(), 1 ) )
{
m_Thief.SendLocalizedMessage( 502703 ); // You must be standing next to an item to steal it.
}
else if ( m_Thief.Skills[SkillName.Stealing].Value < 5.0 )
{
m_Thief.SendLocalizedMessage( 1060025, "", 0x66D ); // You're not skilled enough to attempt the theft of this item.
}
else if ( toSteal.Parent is Mobile )
{
m_Thief.SendLocalizedMessage( 1005585 ); // You cannot steal items which are equiped.
}
else if ( root == m_Thief )
{
m_Thief.SendLocalizedMessage( 502704 ); // You catch yourself red-handed.
}
else if ( root is Mobile && ((Mobile)root).AccessLevel > AccessLevel.Player )
{
m_Thief.SendLocalizedMessage( 502710 ); // You can't steal that!
}
else if ( root is Mobile && !m_Thief.CanBeHarmful( (Mobile)root ) )
{
}
else if ( root is Corpse )
{
示例3: TryStealItem
//.........这里部分代码省略.........
{
if (sig.IsBeingCorrupted)
sig.GraceStart = DateTime.Now; // begin grace period
m_Thief.SendLocalizedMessage(1010586); // YOU STOLE THE SIGIL!!! (woah, calm down now)
if (sig.LastMonolith != null)
sig.LastMonolith.Sigil = null;
sig.LastStolen = DateTime.Now;
return sig;
}
}
else
{
m_Thief.SendLocalizedMessage(1005594); // You do not have enough skill to steal the sigil
}
}
else
{
m_Thief.SendLocalizedMessage(1005588); // You must join a faction to do that
}
}
#endregion
//ARTEGORDONMOD
// allow stealing of STEALABLE items on the ground or in containers
else if (si == null && (toSteal.Parent == null || !toSteal.Movable) && !ItemFlags.GetStealable(toSteal))
{
m_Thief.SendLocalizedMessage(502710); // You can't steal that!
}
//ARTEGORDONMOD
// allow stealing of of STEALABLE newbied/blessed items
else if ((toSteal.LootType == LootType.Newbied || toSteal.CheckBlessed(root)) && !ItemFlags.GetStealable(toSteal))
{
m_Thief.SendLocalizedMessage(502710); // You can't steal that!
}
//ARTEGORDONMOD
// allow stealing of STEALABLE containers
else if (Core.AOS && si == null && toSteal is Container && !ItemFlags.GetStealable(toSteal))
{
m_Thief.SendLocalizedMessage(502710); // You can't steal that!
}
else if (!m_Thief.InRange(toSteal.GetWorldLocation(), 1))
{
m_Thief.SendLocalizedMessage(502703); // You must be standing next to an item to steal it.
}
else if (si != null && m_Thief.Skills[SkillName.Stealing].Value < 100.0)
{
m_Thief.SendLocalizedMessage(1060025, "", 0x66D); // You're not skilled enough to attempt the theft of this item.
}
else if (toSteal.Parent is Mobile)
{
m_Thief.SendLocalizedMessage(1005585); // You cannot steal items which are equiped.
}
else if (root == m_Thief)
{
m_Thief.SendLocalizedMessage(502704); // You catch yourself red-handed.
}
else if (root is Mobile && ((Mobile)root).AccessLevel > AccessLevel.Player)
{
m_Thief.SendLocalizedMessage(502710); // You can't steal that!
}
else if (root is Mobile && !m_Thief.CanBeHarmful((Mobile)root))
{
}
示例4: TryStealItem
//.........这里部分代码省略.........
if (sig.LastMonolith != null && sig.LastMonolith.Sigil != null)
{
sig.LastMonolith.Sigil = null;
sig.LastStolen = DateTime.UtcNow;
}
return sig;
}
}
else
{
if (m_Squire.m_SquireBeQuiet == false)
{
SquireDialog.DoSquireDialog(m_From, m_Squire, SquireDialogTree.NotSkilledEnoughToStealSigil, null, null);
}
}
}
else
{
if (m_Squire.m_SquireBeQuiet == false)
{
SquireDialog.DoSquireDialog(m_From, m_Squire, SquireDialogTree.NotInAFactionSteal, null, null);
}
}
}
#endregion
else if (si == null && (toSteal.Parent == null || !toSteal.Movable))
{
if (m_Squire.m_SquireBeQuiet == false)
{
SquireDialog.DoSquireDialog(m_From, m_Squire, SquireDialogTree.CannotStealThat, null, null);
}
}
else if (toSteal.LootType == LootType.Newbied || toSteal.CheckBlessed(root))
{
if (m_Squire.m_SquireBeQuiet == false)
{
SquireDialog.DoSquireDialog(m_From, m_Squire, SquireDialogTree.CannotStealThat, null, null);
}
}
else if (Core.AOS && si == null && toSteal is Container)
{
if (m_Squire.m_SquireBeQuiet == false)
{
SquireDialog.DoSquireDialog(m_From, m_Squire, SquireDialogTree.CannotStealThat, null, null);
}
}
else if (!m_Squire.InRange(toSteal.GetWorldLocation(), 1))
{
if (m_Squire.m_SquireBeQuiet == false)
{
SquireDialog.DoSquireDialog(m_From, m_Squire, SquireDialogTree.NeedToBeCloserToSteal, null, null);
}
}
else if (si != null && m_Squire.Skills[SkillName.Stealing].Value < 100.0)
{
if (m_Squire.m_SquireBeQuiet == false)
{
SquireDialog.DoSquireDialog(m_From, m_Squire, SquireDialogTree.NotSkilledEnoughToStealItem, null, null);
}
}
else if (toSteal.Parent is Mobile)
{
if (m_Squire.m_SquireBeQuiet == false)
{
SquireDialog.DoSquireDialog(m_From, m_Squire, SquireDialogTree.CannotStealFromTheirHands, null, null);
示例5: TryStealItem
private Item TryStealItem(Item toSteal, object root, int difficulty, ref bool ok, ref bool caught)
{
Item stolen = null;
if (toSteal is KeyRing)
toSteal.Weight = 1;
/*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 (root is BaseVendor || root is PlayerVendor)
{
m_Thief.SendLocalizedMessage(1005598); // You can't steal from shopkeepers.
}
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 (!m_Thief.CanSee(toSteal) || (root != null && !m_Thief.CanSee(root)))
{
m_Thief.SendLocalizedMessage(500237); // Target can not be seen.
}
else if (!toSteal.Movable || toSteal.LootType == LootType.Newbied || toSteal.CheckBlessed(root))
{
m_Thief.SendLocalizedMessage(502710); // You can't steal that!
}
else if (!m_Thief.InRange(toSteal.GetWorldLocation(), 1))
{
m_Thief.SendLocalizedMessage(502703); // You must be standing next to an item to steal it.
}
else if (toSteal.Parent is Mobile)
{
m_Thief.SendLocalizedMessage(1005585); // You cannot steal items which are equiped.
}
else if (root == m_Thief)
{
m_Thief.SendLocalizedMessage(502704); // You catch yourself red-handed.
}
else if (root is Mobile && (((Mobile)root).AccessLevel > AccessLevel.Player || !m_Thief.CanBeHarmful((Mobile)root)))
{
m_Thief.SendLocalizedMessage(502710); // You can't steal that!
}
else
{
for (Item p = toSteal.Parent as Item; p != null; p = p.Parent as Item)
{
if (p is LockableContainer && ((LockableContainer)p).Locked)
{
m_Thief.SendAsciiMessage("That is not accessable.");
return null;
}
}
if (toSteal.Weight + toSteal.TotalWeight > 10)
{
m_Thief.SendAsciiMessage("That is too heavy to steal from someone's backpack.");
}
else
{
ok = true;
double w = toSteal.PileWeight + toSteal.TotalWeight;
double check;
if (w >= 10)
{
//check = 10 * 3.0 * difficulty + 10.0;
check = 10 * 3.0 * (difficulty + 1) + 10.0;
caught = CheckDetect((10 * 5.0 * difficulty) / (m_Thief.Skills.Stealing.Value + 100.0), root as Mobile);
}
else
{
//check = w * 3.0 * difficulty + 10.0;
check = w * 3.0 * (difficulty + 1) + 10.0;
if (toSteal is Key || toSteal is Multis.Deeds.HouseDeed || toSteal is KeyRing)
w += 5;
caught = CheckDetect((w * 5.0 * difficulty) / (m_Thief.Skills.Stealing.Value + 100.0), root as Mobile);
}
if (m_Thief.CheckSkill(SkillName.Stealing, check - 25, check + 25))
{
m_Thief.SendLocalizedMessage(502724); // You succesfully steal the item.
if (toSteal.Stackable && toSteal.Amount > 1)
{
int amount;
/*int maxAmount = (int)( (m_Thief.Skills[SkillName.Stealing].Value / 10.0) / toSteal.Weight );
if ( maxAmount < 1 )
maxAmount = 1;
else if ( maxAmount > toSteal.Amount )
maxAmount = toSteal.Amount;
amount = Utility.Random( maxAmount ) + 1;*/
amount = Utility.Random(10) + 1;
//.........这里部分代码省略.........
示例6: TryStealItem
//.........这里部分代码省略.........
}
else
{
if ( sig.IsBeingCorrupted )
sig.GraceStart = DateTime.Now; // begin grace period
m_Thief.SendLocalizedMessage( 1010586 ); // YOU STOLE THE SIGIL!!! (woah, calm down now)
if ( sig.LastMonolith != null )
sig.LastMonolith.Sigil = null;
sig.LastStolen = DateTime.Now;
sig.OnStolen( m_Thief );
return sig;
}
}
else
{
m_Thief.SendLocalizedMessage( 1005594 ); // You do not have enough skill to steal the sigil
}
}
else
{
m_Thief.SendLocalizedMessage( 1005588 ); // You must join a faction to do that
}
}
#endregion
else if ( si == null && ( toSteal.Parent == null || !toSteal.Movable ) )
{
m_Thief.SendLocalizedMessage( 502710 ); // You can't steal that!
}
else if ( toSteal.LootType == LootType.Newbied || ( toSteal.CheckBlessed( root ) && !( root is FillableContainer ) ) )
{
m_Thief.SendLocalizedMessage( 502710 ); // You can't steal that!
}
else if ( si == null && toSteal is Container )
{
m_Thief.SendLocalizedMessage( 502710 ); // You can't steal that!
}
else if ( !m_Thief.InRange( toSteal.GetWorldLocation(), 1 ) )
{
m_Thief.SendLocalizedMessage( 502703 ); // You must be standing next to an item to steal it.
}
else if ( si != null && m_Thief.Skills[SkillName.Stealing].Value < 100.0 )
{
m_Thief.SendLocalizedMessage( 1060025, "", 0x66D ); // You're not skilled enough to attempt the theft of this item.
}
else if ( toSteal.Parent is Mobile )
{
m_Thief.SendLocalizedMessage( 1005585 ); // You cannot steal items which are equiped.
}
else if ( root == m_Thief )
{
m_Thief.SendLocalizedMessage( 502704 ); // You catch yourself red-handed.
}
else if ( root is Mobile && ( (Mobile) root ).AccessLevel > AccessLevel.Player )
{
m_Thief.SendLocalizedMessage( 502710 ); // You can't steal that!
}
else if ( root is Mobile && !m_Thief.CanBeHarmful( (Mobile) root ) )
{
}
else if ( root is Corpse )
{
示例7: TryStealItem
private Item TryStealItem( Item toSteal, ref bool caught )
{
//Zen make bankbox close when stealing!
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;
if ( !IsEmptyHanded( m_Thief ) )
{
m_Thief.SendLocalizedMessage( 1005584 ); // Both hands must be free to steal.
}
// stealing off a corpse is looting
else if (root is Corpse && CheckStealing(root as Corpse) == false)
{
m_Thief.SendMessage("You can't steal that!"); // You can't steal that!
}
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 ( toSteal.Parent == null || !toSteal.Movable || toSteal.LootType == LootType.Newbied || toSteal.CheckBlessed( root ) )
{
m_Thief.SendLocalizedMessage( 502710 ); // You can't steal that!
}
else if ( !m_Thief.InRange( toSteal.GetWorldLocation(), 1 ) )
{
m_Thief.SendLocalizedMessage( 502703 ); // You must be standing next to an item to steal it.
}
else if ( toSteal.Parent is Mobile )
{
m_Thief.SendLocalizedMessage( 1005585 ); // You cannot steal items which are equiped.
}
else if ( root == m_Thief )
{
m_Thief.SendLocalizedMessage( 502704 ); // You catch yourself red-handed.
}
else if ( root is Mobile && ((Mobile)root).AccessLevel > AccessLevel.Player )
{
m_Thief.SendLocalizedMessage( 502710 ); // You can't steal that!
}
else if ( root is Mobile && !m_Thief.CanBeHarmful( (Mobile)root ) )
{
m_Thief.SendMessage("You can't steal from them.");
}
else
{
double w = toSteal.Weight + toSteal.TotalWeight;
if ( w > 10 )
{
m_Thief.SendMessage( "That is too heavy to steal." );
}
else
{
if ( toSteal.Stackable && toSteal.Amount > 1 )
{
int minAmount = (int)((m_Thief.Skills[SkillName.Stealing].Value / 25.0) / toSteal.Weight);
int maxAmount = (int)((m_Thief.Skills[SkillName.Stealing].Value / 10.0) / toSteal.Weight);
if ( minAmount < 1 )
minAmount = 1;
if ( maxAmount < 1 )
maxAmount = 1;
else if ( maxAmount > toSteal.Amount )
maxAmount = toSteal.Amount;
int amount = Utility.RandomMinMax( minAmount, maxAmount );
if ( amount >= toSteal.Amount )
{
int pileWeight = (int)Math.Ceiling( toSteal.Weight * toSteal.Amount );
pileWeight *= 10;
//.........这里部分代码省略.........