Skip to content

Commit

Permalink
Merge branch 'master' of github.com:Da-Teach/Questor
Browse files Browse the repository at this point in the history
  • Loading branch information
Da-Teach committed Jun 22, 2011
2 parents 03fdb64 + bb2426f commit 489d62d
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 2 deletions.
5 changes: 5 additions & 0 deletions Questor.Modules/Drones.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,11 @@ private void EngageTarget()
if (target == null)
return;

if (target.IsPlayerShip)
{
Logging.Log("Drones: Attempting to engage player: " + target.Name);
return;
}
// Is our current target still the same and is the last Engage command no longer then 15s ago?
if (_lastTarget == target.Id && DateTime.Now.Subtract(_lastEngageCommand).TotalSeconds < 15)
return;
Expand Down
16 changes: 15 additions & 1 deletion Questor.Modules/EntityCache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -389,9 +389,23 @@ public bool IsContainer
return false;
}
}

public bool IsPlayerShip
{
get
{
if (GroupId == (int)Group.Concord1 || GroupId == (int)Group.Concord2 || GroupId == (int)Group.Concord3 || GroupId == (int)Group.Indy || GroupId == (int)Group.HAC
|| GroupId == (int)Group.Covops || GroupId == (int)Group.StrategicCruiser || GroupId == (int)Group.Marauder || GroupId == (int)Group.AssaultFrigate)
return true;
else return false;
}
}
public void LockTarget()
{
if (IsPlayerShip)
{
Logging.Log("EntityCache: Attempting to target player!" + this.Name);
return;
}
if (Cache.Instance.TargetingIDs.ContainsKey(Id))
{
var lastTargeted = Cache.Instance.TargetingIDs[Id];
Expand Down
16 changes: 15 additions & 1 deletion Questor.Modules/GroupID.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ public enum Group
{
Star = 6,
Station = 15,
Stargate = 10,

Capsule = 29,

Expand All @@ -24,8 +25,21 @@ public enum Group
ArmorRepairer = 62,
ArmorHardeners = 328,
DamageControl = 60,

ECCM = 202,
Concord1 = 25, //frigate - concord and player
Concord2 = 26, //cruiser - concord and player
Concord3 = 27, //battleship - concord and player
Concord4 = 301,
Concord5 = 446,
ConcBillboard = 323,

Indy = 28,
Ceptor = 831,
HAC = 358,
AssaultFrigate = 324,
Covops = 830,
StrategicCruiser = 963,
Marauder = 900,

SensorBooster = 212,
TrackingComputer = 213,
Expand Down

0 comments on commit 489d62d

Please sign in to comment.