本文整理汇总了C#中LRReason类的典型用法代码示例。如果您正苦于以下问题:C# LRReason类的具体用法?C# LRReason怎么用?C# LRReason使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
LRReason类属于命名空间,在下文中一共展示了LRReason类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CheckLift
public override bool CheckLift(Mobile from, Item item, ref LRReason reject)
{
if (Transport == null || !Transport.IsOnBoard(from) || Transport.IsMoving)
return false;
return base.CheckLift(from, item, ref reject);
}
示例2: CheckLift
public override bool CheckLift( Mobile from, Item item, ref LRReason reject )
{
if ( m_Boat == null || !m_Boat.Contains( from ) || m_Boat.IsMoving )
return false;
return base.CheckLift( from, item, ref reject );
}
示例3: CheckLift
public override bool CheckLift( Mobile from, Item item, ref LRReason reject )
{
if ( m_Boat == null || !m_Boat.Contains( from ) )
return false;
if ( m_Boat.IsMoving )
{
if ( m_Boat.TillerMan != null )
m_Boat.TillerMan.Say( 502491 ); // I can not open the hold while the ship is moving.
return false;
}
return base.CheckLift( from, item, ref reject );
}
示例4: CheckLift
public override bool CheckLift(Mobile from, Item item, ref LRReason reject)
{
// allow staff to pick it up
if (from != null && from.AccessLevel > AccessLevel.Player)
{
return base.CheckLift(from, item, ref reject);
}
// prevent non-participants from picking it up
XmlPoints afrom = (XmlPoints)XmlAttach.FindAttachment(from, typeof(XmlPoints));
if (afrom != null && afrom.ChallengeGame != null && ((afrom.ChallengeGame is DeathBallGauntlet && (((DeathBallGauntlet)(afrom.ChallengeGame)).Ball == item)) ||
(afrom.ChallengeGame is TeamDeathballGauntlet && (((TeamDeathballGauntlet)(afrom.ChallengeGame)).Ball == item))))
{
return base.CheckLift(from, item, ref reject);
}
else
return false;
}
示例5: CheckLift
public override bool CheckLift(Mobile from, Item item, ref LRReason reject)
{
if (from.AccessLevel >= AccessLevel.GameMaster)
return true;
PlayerMobile player = from as PlayerMobile;
if (player != null && player.Quest is HaochisTrialsQuest)
{
FifthTrialIntroObjective obj = player.Quest.FindObjective(typeof(FifthTrialIntroObjective)) as FifthTrialIntroObjective;
if (obj != null)
{
if (obj.StolenTreasure)
from.SendLocalizedMessage(1063247); // The guard is watching you carefully! It would be unwise to remove another item from here.
else
return true;
}
}
return false;
}
示例6: CheckLift
public override bool CheckLift( Mobile from, Item item, ref LRReason reject )
{
if ( !base.CheckLift( from, item, ref reject ) )
return false;
if (Felladrin.Automations.AutoSplitGold.Split(from, item))
return false;
return CanLoot( from,item );
}
示例7: CheckLift
public override bool CheckLift(Mobile from, Item item, ref LRReason reject)
{
if ((int)from.AccessLevel > (int)AccessLevel.Player)
return base.CheckLift(from, item, ref reject);
else
reject = LRReason.CannotLift;
return false;
}
示例8: Lift
public virtual void Lift( Item item, int amount, out bool rejected, out LRReason reject )
{
rejected = true;
reject = LRReason.Inspecific;
if ( item == null )
return;
Mobile from = this;
NetState state = m_NetState;
if ( from.AccessLevel >= AccessLevel.GameMaster || Core.Now >= from.NextActionTime )
{
if ( from.CheckAlive() )
{
from.DisruptiveAction();
if ( from.Holding != null )
{
reject = LRReason.AreHolding;
}
else if ( from.AccessLevel < AccessLevel.GameMaster && !from.InRange( item.GetWorldLocation(), 2 ) )
{
reject = LRReason.OutOfRange;
}
else if ( !from.CanSee( item ) || !from.InLOS( item ) )
{
reject = LRReason.OutOfSight;
}
else if ( !item.VerifyMove( from ) )
{
reject = LRReason.CannotLift;
}
else if ( item.InSecureTrade || !item.IsAccessibleTo( from ) )
{
reject = LRReason.CannotLift;
}
else if ( !item.CheckLift( from, item ) )
{
reject = LRReason.Inspecific;
}
else
{
object root = item.RootParent;
if ( root != null && root is Mobile && !((Mobile)root).CheckNonlocalLift( from, item ) )
{
reject = LRReason.TryToSteal;
}
else if ( !from.OnDragLift( item ) || !item.OnDragLift( from ) )
{
reject = LRReason.Inspecific;
}
else if ( !from.CheckAlive() )
{
reject = LRReason.Inspecific;
}
else
{
item.SetLastMoved();
if ( amount == 0 )
amount = 1;
if ( amount > item.Amount )
amount = item.Amount;
int oldAmount = item.Amount;
item.Amount = amount;
if ( amount < oldAmount )
item.Dupe( oldAmount - amount );
Map map = from.Map;
if ( Mobile.DragEffects && map != null && (root == null || root is Item))
{
IPooledEnumerable eable = map.GetClientsInRange( from.Location );
Packet p = null;
foreach ( NetState ns in eable )
{
if ( ns.Mobile != from && ns.Mobile.CanSee( from ) )
{
if ( p == null )
{
IEntity src;
if ( root == null )
src = new Entity( Serial.Zero, item.Location, map );
else
src = new Entity( ((Item)root).Serial, ((Item)root).Location, map );
p = new DragEffect( src, from, item.ItemID, item.Hue, amount );
}
ns.Send( p );
}
}
//.........这里部分代码省略.........
示例9: CheckLift
public override bool CheckLift(Mobile from, Item item, ref LRReason reject)
{
if (m_Quest == null)
return base.CheckLift(from, item, ref reject);
FishQuestObjective obj = m_Quest.GetObjective();
if (obj != null && obj.CheckLift(item))
{
reject = LRReason.CannotLift;
return false;
}
return true;
}
示例10: CheckLift
public override bool CheckLift(Mobile m, Item item, ref LRReason reject)
{
if (m == null)
{
return false;
}
if (m.AccessLevel <= AccessLevel.Counselor && Renaming)
{
m.SendMessage(0x22, "You can not move this talisman while the entity is being named.");
reject = LRReason.CannotLift;
return false;
}
return base.CheckLift(m, item, ref reject);
}
示例11: CheckLift
public override bool CheckLift( Mobile from, Item item, ref LRReason reject )
{
if ( m_Owner != null && m_Owner.Account == null )
CancelRent();
return ( m_Owner == null || from.Account.Username == m_Owner.Account.Username ) || base.CheckLift( from, item, ref reject );
}
示例12: CheckLift
public override bool CheckLift(Mobile from, Item item, ref LRReason reject)
{
reject = LRReason.CannotLift;
return false;
}
示例13: CheckLift
public override bool CheckLift(Mobile from, Item item, ref LRReason reject)
{ // Thwart lift macros
TimeSpan ts = DateTime.Now - lastLift;
lastLift = DateTime.Now;
if (ts.TotalSeconds < 1.8)
{ // throttle
from.SendMessage("You thrust your hand into the chest but come up empty handed.");
reject = LRReason.Inspecific;
return false;
}
// get the normal "it is locked" message
bool bResult = base.CheckLift (from, item, ref reject);
// if a Player had the chest open when we auto-load it, prevent them from taking stuff untill it is opened leagally.
if (bResult == true && item != this)
if (from != null && from.AccessLevel == AccessLevel.Player)
if ( this.Locked == true || this.TrapPower > 0 )
{
from.SendMessage("The chest is locked, so you cannot access that.");
bResult = false;
}
return bResult;
}
示例14: Lift
public override void Lift(Item item, int amount, out bool rejected, out LRReason reject)
{
rejected = true;
reject = LRReason.Inspecific;
if (item == null)
return;
Mobile from = this;
NetState state = NetState;
if (from.AccessLevel >= AccessLevel.GameMaster || DateTime.Now >= from.NextActionTime)
{
if (from.CheckAlive())
{
from.DisruptiveAction();
if (from.Holding != null)
{
reject = LRReason.AreHolding;
}
else if (from.AccessLevel < AccessLevel.GameMaster && !from.InRange(item.GetWorldLocation(), 3))
{
reject = LRReason.OutOfRange;
}
else if (!from.CanSee(item) || !from.InLOS(item))
{
reject = LRReason.OutOfSight;
}
else if (!item.VerifyMove(from))
{
reject = LRReason.CannotLift;
}
else if (!item.IsAccessibleTo(from))
{
reject = LRReason.CannotLift;
}
else if (from.AccessLevel == AccessLevel.Player && (from.Frozen || from.Paralyzed))
{
reject = LRReason.CannotLift;
}
else if (!item.CheckLift(from, item, ref reject))
{
}
else
{
object root = item.RootParent;
bool canLoot;
if (root is Corpse)
{
Corpse corpse = (Corpse)root;
CustomRegion cs = Region.Find(corpse.Location, corpse.Map) as CustomRegion;
if (cs != null)
{
if (AccessLevel >= AccessLevel.GameMaster || (cs.Controller.CanLootOwnCorpse && cs.Controller.CanLootPlayerCorpse))
canLoot = true;
else if (corpse.Owner == this)
canLoot = cs.Controller.CanLootOwnCorpse;
else if (corpse.Owner is PlayerMobile)
canLoot = cs.Controller.CanLootPlayerCorpse;
else
canLoot = cs.Controller.CanLootNPCCorpse;
}
else
canLoot = true;
}
else
canLoot = true;
if (!canLoot)
{
SendAsciiMessage("You can't loot here.");
reject = LRReason.Inspecific;
}
else if (root != null && root is Mobile && !((Mobile) root).CheckNonlocalLift(from, item))
{
reject = LRReason.TryToSteal;
}
else if (!from.OnDragLift(item) || !item.OnDragLift(from))
{
reject = LRReason.Inspecific;
}
else if (!from.CheckAlive())
{
reject = LRReason.Inspecific;
}
else if (item.EventItem && !IsInEvent && AccessLevel < AccessLevel.GameMaster)
{
SendAsciiMessage("You can't use event items!");
reject = LRReason.Inspecific;
}
else if (!item.EventItem && IsInEvent && AccessLevel < AccessLevel.GameMaster)
{
SendAsciiMessage("You can only use event items!");
reject = LRReason.Inspecific;
}
else
{
//.........这里部分代码省略.........
示例15: CheckLift
// called when dragging item that belongs to somebody or some container
public override bool CheckLift(Mobile from, Item item, ref LRReason reject)
{
if (XmlScript.HasTrigger(from, TriggerName.onDragLift) && UberScriptTriggers.Trigger(from, from, TriggerName.onDragLift, item))
{
reject = LRReason.Inspecific;
return false;
}
if (XmlScript.HasTrigger(item, TriggerName.onDragLift) && UberScriptTriggers.Trigger(item, from, TriggerName.onDragLift, item))
{
reject = LRReason.Inspecific;
return false;
}
return base.CheckLift(from, item, ref reject);
}