Server.Items.Corpse.CheckLoot C# (CSharp) Method

CheckLoot() public method

public CheckLoot ( Server.Mobile from ) : bool
from Server.Mobile
return bool
		public bool CheckLoot( Mobile from )
		{
			if ( !CanLoot( from ) )
			{
				if ( m_Owner == null || !m_Owner.Player )
					from.SendLocalizedMessage( 1005035 ); // You did not earn the right to loot this creature!
				else
					from.SendLocalizedMessage( 1010049 ); // You may not loot this corpse.

				return false;
			}
			else if ( IsCriminalAction( from ) )
			{
				if ( m_Owner == null || !m_Owner.Player )
					from.SendLocalizedMessage( 1005036 ); // Looting this monster corpse will be a criminal act!
				else
					from.SendLocalizedMessage( 1005038 ); // Looting this corpse will be a criminal act!
			}

			return true;
		}

Usage Example

Ejemplo n.º 1
0
 private bool isCorpseLootable(PlayerMobile player, Corpse corpse)
 {
     if (corpse.Owner == null || corpse.Deleted || corpse.Owner is PlayerMobile ||
         (corpse.Owner is BaseCreature && ((BaseCreature)corpse.Owner).IsBonded) ||
         !corpse.CheckLoot(player) || corpse.IsCriminalAction(player)
         )
     {
         return(false);
     }
     return(true);
 }
All Usage Examples Of Server.Items.Corpse::CheckLoot