ACR_CreatureBehavior.AIParty.CanPartySee C# (CSharp) Method

CanPartySee() public method

This function assesses whether or not a creature is visible to any member of the party.
public CanPartySee ( CreatureObject Creature ) : bool
Creature CreatureObject The creature that the party is looking for
return bool
        public bool CanPartySee(CreatureObject Creature)
        {
            if (Creature == null) return false;
            if (Creature.ObjectId == null || Creature.ObjectId == 0) return false;
            if (PartyMembers == null) return false; // If there's no one in the party, well, obviously.
            foreach (CreatureObject PartyMember in PartyMembers)
            {
                if (PartyMember != null &&
                    PartyMember.Script.GetObjectSeen(PartyMember.ObjectId, Creature.ObjectId) == CLRScriptBase.TRUE)
                    return true;
            }
            return false;
        }