This commit is contained in:
mark 2008-05-29 03:57:42 +00:00
parent e41632fe95
commit 9c5abc3b0d
48 changed files with 261 additions and 70 deletions

View file

@ -108,7 +108,9 @@ namespace Server.Misc
if( map != null && (map.Rules & MapRules.HarmfulRestrictions) == 0 )
return true; // In felucca, anything goes
if( !from.Player && !(from is BaseCreature && (((BaseCreature)from).Controlled || ((BaseCreature)from).Summoned)) )
BaseCreature bc = from as BaseCreature;
if( !from.Player && !(bc != null && bc.GetMaster() != null && bc.GetMaster().AccessLevel == AccessLevel.Player ) )
{
if( !CheckAggressor( from.Aggressors, target ) && !CheckAggressed( from.Aggressed, target ) && target is PlayerMobile && ((PlayerMobile)target).CheckYoungProtection( from ) )
return false;
@ -273,6 +275,11 @@ namespace Server.Misc
{
BaseCreature bc = (BaseCreature)target;
Mobile master = bc.GetMaster();
if ( master != null && master.AccessLevel > AccessLevel.Player )
return Notoriety.CanBeAttacked;
if( !bc.Summoned && !bc.Controlled && ((PlayerMobile)source).EnemyOfOneType == target.GetType() )
return Notoriety.Enemy;
}