Server.Mobiles.BaseCreature.IsFriend C# (CSharp) Method

IsFriend() public method

public IsFriend ( Mobile m ) : bool
m Mobile
return bool
        public virtual bool IsFriend( Mobile m )
        {
            OppositionGroup g = this.OppositionGroup;

            if ( g != null && g.IsEnemy( this, m ) )
                return false;

            if ( !(m is BaseCreature) )
                return false;

            BaseCreature c = (BaseCreature)m;

            return ( m_iTeam == c.m_iTeam && ( (m_bSummoned || m_bControlled) == (c.m_bSummoned || c.m_bControlled) )/* && c.Combatant != this */);
        }
BaseCreature