public bool CanCastSpell(NWPlayer oPC, NWObject oTarget) { if (oPC.Equals(oTarget)) { return(true); } foreach (NWPlayer member in oPC.GetPartyMembers()) { if (oTarget.Equals(member)) { return(true); } } return(false); }