public bool AddRange(Unit unit) { if (!HasUnit()) { return(false); } if (CombatInterface.IsEnemy(GetUnit(), unit)) { if ((unit.Realm == Realms.REALMS_REALM_NEUTRAL && !unit.Aggressive) || (!unit.IsPlayer() && !unit.Aggressive) || (!GetUnit().IsPlayer() && !GetUnit().Aggressive) || (unit is Creature && ((Creature)unit).Entry == 47) /*|| (unit is Creature && !unit.IsPlayer() && !unit.IsGameObject() && IsNeutralFaction(unit as Creature))*/) { return(true); } lock (RangedEnemies) RangedEnemies.Add(unit.GetUnit()); } else { lock (RangedAllies) RangedAllies.Add(unit.GetUnit()); } return(true); }
public bool AddRange(Unit Obj) { if (!HasUnit()) return false; if (CombatInterface.IsEnemy(GetUnit(), Obj)) RangedEnemies.Add(Obj.GetUnit()); else RangedAllies.Add(Obj.GetUnit()); return true; }
public bool AddRange(Unit Obj) { if (!HasUnit()) { return(false); } if (CombatInterface.IsEnemy(GetUnit(), Obj)) { RangedEnemies.Add(Obj.GetUnit()); } else { RangedAllies.Add(Obj.GetUnit()); } return(true); }