public RoleActor FindHatredTarget() { List <RoleActor> roleList = new List <RoleActor>(); UInt32 actorTypes = (1 << (Int32)eActorGameType.Player) | (1 << (Int32)eActorGameType.Npc) | (1 << (Int32)eActorGameType.PlayerImage); var pos = GetPosition(); if (!HostMap.TourRoles(ref pos, 10.0f, actorTypes, roleList)) { return(null); } foreach (var tar in roleList) { if (CanAttack(tar)) { return(tar); } } return(null); }