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 && !ClaimConfig.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 <= ClaimConfig.FreelyLootableFame )
result = true;
else
result = corpse.CheckLoot( from ) && !( corpse.IsCriminalAction( from ) );
}
if ( false == result && notify )
{
from.PlaySound( 1074 ); // no
from.SendMessage( notification );
}
return result;
}