23 m_mainAttackTimer(1000),
25 m_beginFindTarget(5000),
26 m_warpScramblerTimer(5000),
96 std::vector<Client*> clientVec;
100 for (
auto cur : clientVec) {
149 _log(NPC__AI_TRACE,
"%s(%u): Idle: returning to idle.", \
162 _log(NPC__AI_TRACE,
"%s(%u): Engaged: Begin engaging. Target is %s(%u).", \
171 _log(NPC__AI_TRACE,
"%s(%u): Signaling: Begin signaling. Target is %s(%u).", \
181 _log(NPC__AI_TRACE,
"%s(%u): CheckDistance: %s(%u) is too far away (%u). Return to Idle.", \
219 _log(NPC__AI_TRACE,
"%s(%u): Targeting of %s(%u) failed. Clear Target and Return to Idle.", \
233 _log(NPC__AI_TRACE,
"%s(%u): Targeted by %s(%u) in Idle. Begin Targeting sequence.", \
239 _log(NPC__AI_TRACE,
"%s(%u): Targeting of %s(%u) failed. Clear Target and Return to Idle.", \
248 _log(NPC__AI_TRACE,
"%s(%u): Targeted by %s(%u) while engaged.", \
252 _log(NPC__AI_TRACE,
"%s(%u): Targeted by %s(%u) while signaling.", \
261 _log(NPC__AI_TRACE,
"%s(%u): Target %s(%u) lost. No targets remain. Return to Idle.", \
265 _log(NPC__AI_TRACE,
"%s(%u): Target %s(%u) lost, but more targets remain.", \
275 if (!pTarget)
return;
278 _log(NPC__AI_TRACE,
"%s(%u): Target %s(%u) no longer in bubble. Clear target and move on",
284 _log(NPC__AI_TRACE,
"%s(%u): Target %s(%u) has no destiny manager. Clear target and move on",
291 _log(NPC__AI_TRACE,
"%s(%u): Target %s(%u) is cloaked. Clear target and move on",
306 std::string guid =
"effects.Laser";
335 }
else if (radius < 60) {
337 }
else if (radius < 150) {
339 }
else if (radius < 280) {
341 }
else if (radius < 550) {
#define _log(type, fmt,...)
void TargetLost(SystemEntity *by_who)
void ClearAllTargets(bool notify=true)
void ClearTarget(SystemEntity *tSE)
bool HasAttribute(const uint16 attrID) const
SystemBubble * SysBubble()
bool InBubble(const GPoint &pt, bool inWarp=false) const
std::string GetStateName(State name)
void SetEngaged(SystemEntity *pTarget)
uint16 m_preferedSigRadius
void Target(SystemEntity *by_who)
TargetManager * TargetMgr()
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 SetSignaling(SystemEntity *pTarget)
bool Check(bool reset=true)
const char * GetName() const
Timer m_warpScramblerTimer
uint16 m_damageMultiplier
void Attack(SystemEntity *pTarget)
bool HasNoTargets() const
EvilNumber GetAttribute(const uint16 attrID) const
void CheckDistance(SystemEntity *pTarget)
GaExpInl GaFloat distance(const GaVec3 &oth) const
void AttackTarget(SystemEntity *pTarget)
bool ApplyDamage(Damage &d)
bool IsTargetedBy(SystemEntity *pSE)
void Targeted(SystemEntity *by_who)
bool StartTargeting(SystemEntity *tSE, ShipItemRef sRef)
void ClearTarget(SystemEntity *pTarget)
void GetPlayers(std::vector< Client * > &into) const
void Start(uint32 setTimerTime=0, bool changeResetTimer=true)