本文整理匯總了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;
}