23 m_assignedShip(nullptr),
27 m_warpScramblerTimer(0),
30 m_attackSpeed(who->GetSelf()->GetAttribute(
AttrSpeed).get_float()),
35 m_entityOrbitRange(who->GetSelf()->GetAttribute(
AttrMaxRange).get_float()),
82 if (pTarget ==
nullptr) {
88 }
else if (pTarget->
SysBubble() ==
nullptr) {
117 if (
sConfig.debug.UseProfiling)
146 _log(DRONE__AI_TRACE,
"Drone %s(%u): SetIdle: returning to idle.",
163 _log(DRONE__AI_TRACE,
"Drone %s(%u): SetEngaged: %s(%u) begin engaging.",
179 _log(DRONE__AI_TRACE,
"Drone %s(%u): CheckDistance: %s(%u) is too far away (%u). Return to Idle.",
214 _log(DRONE__AI_TRACE,
"Drone %s(%u): Targeting of %s(%u) failed. Clear Target and Return to Idle.",
232 _log(DRONE__AI_TRACE,
"Drone %s(%u): Targeted by %s(%u) while %s.",
270 _log(DRONE__AI_TRACE,
"Drone %s(%u): Target %s(%u) lost. No targets remain. Return to Idle.",
274 _log(DRONE__AI_TRACE,
"Drone %s(%u): Target %s(%u) lost, but more targets remain.",
293 _log(DRONE__AI_TRACE,
"Drone %s(%u): Target %s(%u) no longer in bubble. Clear target and move on",
299 if (pDestiny ==
nullptr) {
300 _log(DRONE__AI_TRACE,
"Drone %s(%u): Target %s(%u) has no destiny manager. Clear target and move on",
307 _log(DRONE__AI_TRACE,
"Drone %s(%u): Target %s(%u) is cloaked. Clear target and move on",
336 std::string guid =
"effects.Laser";
380 default:
return "Invalid";
#define sConfig
A macro for easier access to the singleton.
void CheckDistance(SystemEntity *pTarget)
std::string GetStateName(int8 stateID)
double m_entityOrbitRange
#define _log(type, fmt,...)
void AttackTarget(SystemEntity *pTarget)
void ClearAllTargets(bool notify=true)
void ClearTarget(SystemEntity *tSE)
bool HasAttribute(const uint16 attrID) const
Timer m_warpScramblerTimer
SystemBubble * SysBubble()
bool InBubble(const GPoint &pt, bool inWarp=false) const
double MakeRandomFloat(double low, double high)
Generates random real from interval [low; high].
void SetMaxVelocity(float maxVelocity)
double m_entityChaseRange
void ClearTargets(bool notify=true)
TargetManager * TargetMgr()
void SetEngaged(SystemEntity *pTarget)
const GPoint & GetPosition() const
void SendSpecialEffect(uint32 entityID, uint32 moduleID, uint32 moduleTypeID, uint32 targetID, uint32 chargeTypeID, std::string guid, bool isOffensive, bool start, bool isActive, int32 duration, uint32 repeat, int32 graphicInfo=0) const
SystemEntity * GetFirstTarget(bool need_locked=false)
DestinyManager * DestinyMgr()
InventoryItemRef GetSelf()
void Targeted(SystemEntity *by_who)
bool Check(bool reset=true)
const char * GetName() const
void ClearTarget(SystemEntity *pTarget)
void Attack(SystemEntity *pTarget)
void Follow(SystemEntity *pSE, uint32 distance)
void TargetLost(SystemEntity *by_who)
double m_entityAttackRange
bool HasNoTargets() const
void Orbit(SystemEntity *pSE, uint32 distance=0)
EvilNumber GetAttribute(const uint16 attrID) const
GaExpInl GaFloat distance(const GaVec3 &oth) const
bool ApplyDamage(Damage &d)
void Target(SystemEntity *by_who)
bool StartTargeting(SystemEntity *tSE, ShipItemRef sRef)
void IdleOrbit(ShipSE *pShipSE=nullptr)
void Start(uint32 setTimerTime=0, bool changeResetTimer=true)