public void Carve( Mobile from, Item item )
{
if ( IsCriminalAction( from ) && this.Map != null && (this.Map.Rules & MapRules.HarmfulRestrictions) != 0 )
{
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;
}
Mobile dead = m_Owner;
if ( GetFlag( CorpseFlag.Carved ) || dead == null )
{
from.SendLocalizedMessage( 500485 ); // You see nothing useful to carve from the corpse.
}
else if ( ((Body)Amount).IsHuman && ItemID == 0x2006 )
{
new Blood( 0x122D ).MoveToWorld( Location, Map );
new Torso().MoveToWorld( Location, Map );
new LeftLeg().MoveToWorld( Location, Map );
new LeftArm().MoveToWorld( Location, Map );
new RightLeg().MoveToWorld( Location, Map );
new RightArm().MoveToWorld( Location, Map );
new Head( dead.Name ).MoveToWorld( Location, Map );
SetFlag( CorpseFlag.Carved, true );
ProcessDelta();
SendRemovePacket();
ItemID = Utility.Random( 0xECA, 9 ); // bone graphic
Hue = 0;
ProcessDelta();
if ( IsCriminalAction( from ) )
from.CriminalAction( true );
}
else if ( dead is BaseCreature )
{
((BaseCreature)dead).OnCarve( from, this, item );
}
else
{
from.SendLocalizedMessage( 500485 ); // You see nothing useful to carve from the corpse.
}
}
}