本文整理汇总了C#中Server.Items.Corpse.CheckLoot方法的典型用法代码示例。如果您正苦于以下问题:C# Corpse.CheckLoot方法的具体用法?C# Corpse.CheckLoot怎么用?C# Corpse.CheckLoot使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Server.Items.Corpse
的用法示例。
在下文中一共展示了Corpse.CheckLoot方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CheckLoot
public static bool CheckLoot(Corpse corpse, PlayerMobile player)
{
#if RunUO2_2
return corpse.CheckLoot(player, null);
#else
return corpse.CheckLoot(player);
#endif
}
示例2: CorpseIsLootable
// determine if the corpse is ok to loot
private static bool CorpseIsLootable( Mobile from, Corpse corpse, bool notify )
{
if ( null == corpse )
return false;
bool result = false;
string notification = "";
if ( corpse.Owner == from )
notification = "You may not claim your own corpses.";
else if ( corpse.Owner is PlayerMobile && !LootPlayers )
notification = "You may not loot player corpses.";
else
{
BaseCreature creature = corpse.Owner as BaseCreature;
if ( null != creature && creature.IsBonded )
notification = "You may not loot the corpses of bonded pets.";
else if ( null != creature && creature.Fame <= FreelyLootableFame )
result = true;
else
result = corpse.CheckLoot( from, null ) && !( corpse.IsCriminalAction( from ) );
}
if ( false == result && notify )
{
from.PlaySound( 1074 ); // no
from.SendMessage( notification );
}
return result;
}