EvEmu  0.8.4
11 September 2021
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Concord.cpp
Go to the documentation of this file.
1 
9 /* concord response time
10  * sysSec - no Spawn : existing Spawns
11  * 1.0 - 06:12
12  * 0.9 - 07:13
13  * 0.7 - 08:14
14  * 0.6 - 10:16
15  * 0.5 - 13:19
16  * 0.3 - 15:20
17  * 0.1 - 20:30
18  */
19 
20 /* note.....this taken straight from NPC */
21 
22 #include "Concord.h"
23 #include "EVEServerConfig.h"
25 #include "system/DestinyManager.h"
26 #include "system/Damage.h"
27 #include "system/SystemBubble.h"
28 #include "system/SystemManager.h"
29 
30 
33  PyServiceMgr& services,
34  InventoryItemRef self,
35  const GPoint& position,
36  ConcordSpawnMgr* spawnMgr )
37  : DynamicSystemEntity(this, system, self),
38  m_system(system),
39  m_services(services),
40  m_spawnMgr(spawnMgr),
41  m_orbitingID(0),
42  m_AI(new ConcordAI(this))
43  {
44  assert (m_AI != nullptr);
45 
47  m_allyID = 0;
49 
51  if (!m_orbitRange) {
54  else
56  }
57 
58  // Create default dynamic attributes in the AttributeMap:
62  m_self->SetAttribute(AttrWarpCapacitorNeed, 0.00001, false);
64  m_self->SetAttribute(AttrMass, m_self->type().mass(), false);
70 
72 
73  SetResists();
74 
75  /* Gets the value from the NPC and put on our own vars */
84 
85  //_log(CONCORD__TRACE, "Created Concord Police object for %s (%u)", self.get()->name(), self.get()->itemID());
86 }
87 
90 }
91 
93  if (m_killed)
94  return;
95  double profileStartTime = GetTimeUSeconds();
96 
97  /* Enable base call to Process Targeting and Movement */
99  m_AI->Process();
100 
101  if (sConfig.debug.UseProfiling)
102  sProfiler.AddTime(Profile::concord, GetTimeUSeconds() - profileStartTime);
103 }
104 
106  if (!who)
107  m_orbitingID = 0;
108  else
109  m_orbitingID = who->GetID();
110 }
111 
113  m_AI->TargetLost(who);
114 }
115 
117  m_AI->Targeted(who);
118 }
119 
120 void Concord::EncodeDestiny( Buffer& into ) const
121 {
122  using namespace Destiny;
123 
124  uint8 mode = m_destiny->GetState(); //Ball::Mode::STOP;
125 
126  BallHeader head = BallHeader();
127  head.entityID = GetID();
128  head.mode = mode;
129  head.radius = GetRadius();
130  head.posX = x();
131  head.posY = y();
132  head.posZ = z();
134  into.Append( head );
135  MassSector mass = MassSector();
136  mass.mass = m_destiny->GetMass();
137  mass.cloak = (m_destiny->IsCloaked() ? 1 : 0);
138  mass.harmonic = m_harmonic;
139  mass.corporationID = m_corpID;
140  mass.allianceID = (IsAlliance(m_allyID) ? m_allyID : -1);
141  into.Append( mass );
142  DataSector data = DataSector();
144  data.velX = m_destiny->GetVelocity().x;
145  data.velY = m_destiny->GetVelocity().y;
146  data.velZ = m_destiny->GetVelocity().z;
147  data.inertia = m_destiny->GetInertia();
149  into.Append( data );
150  switch (mode) {
151  case Ball::Mode::WARP: {
152  GPoint target = m_destiny->GetTargetPoint();
153  WARP_Struct warp;
154  warp.formationID = 0xFF;
155  warp.targX = target.x;
156  warp.targY = target.y;
157  warp.targZ = target.z;
158  warp.speed = m_destiny->GetWarpSpeed(); //ship warp speed x10 (dont ask...this is what it is...more dumb ccp shit)
159  // warp timing. see Ship::EncodeDestiny() for notes/updates
160  warp.effectStamp = -1; //m_destiny->GetStateStamp(); //timestamp when warp started
161  warp.followRange = 0; //this isnt right
162  warp.followID = 0; //this isnt right
163  into.Append( warp );
164  } break;
165  case Ball::Mode::FOLLOW: {
166  FOLLOW_Struct follow;
167  follow.followID = m_destiny->GetTargetID();
169  follow.formationID = 0xFF;
170  into.Append( follow );
171  } break;
172  case Ball::Mode::ORBIT: {
173  ORBIT_Struct orbit;
174  orbit.targetID = m_destiny->GetTargetID();
176  orbit.formationID = 0xFF;
177  into.Append( orbit );
178  } break;
179  case Ball::Mode::GOTO: {
180  GPoint target = m_destiny->GetTargetPoint();
181  GOTO_Struct go;
182  go.formationID = 0xFF;
183  go.x = target.x;
184  go.y = target.y;
185  go.z = target.z;
186  into.Append( go );
187  } break;
188  default: {
190  main.formationID = 0xFF;
191  into.Append( main );
192  } break;
193  }
194 
195  _log(SE__DESTINY, "Concord::EncodeDestiny(): %s - id:%li, mode:%u, flags:0x%X", GetName(), head.entityID, head.mode, head.flags);
196 }
197 
198 
199 void Concord::MakeDamageState(DoDestinyDamageState &into) const {
201  into.recharge = m_self->GetAttribute(AttrShieldRechargeRate).get_float() + 8;
202  into.timestamp = GetFileTimeNow();
203  into.armor = 1.0 - (m_armorDamage / m_self->GetAttribute(AttrArmorHP).get_float());
204  into.structure = 1.0 - (m_hullDamage / m_self->GetAttribute(AttrHP).get_float());
205 }
206 
208 {
209  // We recharge our shield until it's reaches the shield capacity.
210  if (GetSelf()->GetAttribute(AttrShieldCapacity) > m_shieldCharge)
211  {
213  if (m_shieldCharge > GetSelf()->GetAttribute(AttrShieldCapacity).get_float())
215  } else
216  AI()->DisableRepTimers();
217  // TODO: Need to send SpecialFX / amount update
218  _UpdateDamage();
219 }
220 
222 {
223  if( m_armorDamage > 0 )
224  {
226  if( m_armorDamage < 0.0 )
227  m_armorDamage = 0.0;
228  } else
229  AI()->DisableRepTimers();
230  // TODO: Need to send SpecialFX / amount update
231  _UpdateDamage();
232 }
233 
235 {
236  DamageDetails dmgState;
238  dmgState.recharge = m_self->GetAttribute(AttrShieldRechargeRate).get_float();
239  dmgState.timestamp = GetFileTimeNow();
241  dmgState.structure = 1.0 - m_self->GetAttribute(AttrDamage).get_float() / m_self->GetAttribute(AttrHP).get_float();
242  OnDamageStateChange dmgChange;
243  dmgChange.entityID = GetID();
244  dmgChange.state = dmgState.Encode();
245  PyTuple *up = dmgChange.Encode();
246  //source->QueueDestinyUpdate(&up);
247 }
248 
250  /* fix for missing resist attribs -allan 18April16 */
263 }
264 
265 
267 : m_state(Idle),
268 m_npc(who),
269 m_mainAttackTimer(1000),
270 m_processTimer(5000), //arbitrary.
271 m_shieldBoosterTimer(10000), //arbitrary.
272 m_armorRepairTimer(8000), //arbitrary.
273 m_beginFindTarget(5000), //arbitrary.
274 m_warpScramblerTimer(5000), //arbitrary.
275 m_webifierTimer(5000), //arbitrary.
276 m_sigRadius(who->GetSelf()->GetAttribute(AttrSignatureRadius).get_float()),
277 m_attackSpeed(who->GetSelf()->GetAttribute(AttrSpeed).get_float()),
278 m_cruiseSpeed(who->GetSelf()->GetAttribute(AttrEntityCruiseSpeed).get_int()),
279 m_chaseSpeed(who->GetSelf()->GetAttribute(AttrMaxVelocity).get_int()),
280 m_entityFlyRange(who->GetSelf()->GetAttribute(AttrEntityFlyRange).get_float() + who->GetSelf()->GetAttribute(AttrMaxRange).get_float()),
281 m_entityChaseRange(who->GetSelf()->GetAttribute(AttrEntityChaseMaxDistance).get_float() *2),
282 m_entityOrbitRange(who->GetSelf()->GetAttribute(AttrMaxRange).get_float()),
283 m_entityAttackRange(who->GetSelf()->GetAttribute(AttrEntityAttackRange).get_float() *2),
284 m_shieldBoosterDuration(who->GetSelf()->GetAttribute(AttrEntityShieldBoostDuration).get_int()),
285 m_armorRepairDuration(who->GetSelf()->GetAttribute(AttrEntityArmorRepairDuration).get_int())
286 {
287  m_processTimer.Start(5000); //arbitrary.
288 
289  m_webifierTimer.Disable(); //not implemented yet
290  m_beginFindTarget.Disable(); //arbitrary.
291  m_mainAttackTimer.Disable(); // dont start timer until we have a target
292  m_armorRepairTimer.Disable(); //waiting till engaged
293  m_warpScramblerTimer.Disable(); //not implemented yet
294  m_shieldBoosterTimer.Disable(); //waiting till engaged
295 
300 
305 
307  m_entityAttackRange = 300000;
308 }
309 
311  /* concord ai needs to be written, so for now we'll just return immediatly */
312  return;
313 
314  if ((!m_processTimer.Check()) || (!m_npc->SysBubble()->HasPlayers()) || m_npc->DestinyMgr()->IsWarping())
315  return;
316 
320 
324 
325  /* NPC::State definitions -allan 25July15
326  * Idle, // not doing anything, nothing in sight....idle.
327  * Chasing, // target out of range to attack or follow, but within npc sight range....use mwd/ab if equipped
328  * Following, // too close to chase, but to far to engage...use half of max speed
329  * Engaged, // actively fighting (in orbit)...use full cruise to quarter max speed.
330  * Fleeing, // running away....use mwd/ab (if equipped) then warp away when out of range (does this make sense??)
331  * Signaling // calling for help..use full cruise to half of max speed to speed tank while calling for reinforcements
332  */
333  switch(m_state) {
334  case Idle: {
335  /* make timer here for them to leave */
336  } break;
337 
338  case Chasing: {
339  //NOTE: getting our target like this is pretty weak...
340  SystemEntity* pTarget = m_npc->TargetMgr()->GetFirstTarget(true);
341  if (!pTarget) {
342  if (m_npc->TargetMgr()->HasNoTargets()) {
343  //_log(CONCORD__AI_TRACE, "%s(%u): Stopped chasing, GetFirstTarget() returned NULL.", m_npc->GetName(), m_npc->GetID());
344  m_state = Idle;
345  }
346  return;
347  } else if (!pTarget->SysBubble()) {
348 
349  m_npc->TargetMgr()->ClearTarget(pTarget);
350  //m_npc->TargetMgr()->OnTarget(pTarget, TargMgr::Mode::Lost);
351  return;
352  }
353  CheckDistance(pTarget);
354  } break;
355 
356  case Following: {
357  //NOTE: getting our target like this is pretty weak...
358  SystemEntity* pTarget = m_npc->TargetMgr()->GetFirstTarget(true);
359  if (!pTarget) {
360  if (m_npc->TargetMgr()->HasNoTargets()) {
361  //_log(CONCORD__AI_TRACE, "%s(%u): Stopped following, GetFirstTarget() returned NULL.", m_npc->GetName(), m_npc->GetID());
362  m_state = Idle;
363  }
364  return;
365  } else if (!pTarget->SysBubble()) {
366  m_npc->TargetMgr()->ClearTarget(pTarget);
367  //m_npc->TargetMgr()->OnTarget(pTarget, TargMgr::Mode::Lost);
368  return;
369  }
370  CheckDistance(pTarget);
371  } break;
372 
373  case Engaged: {
374  //NOTE: getting our pTarget like this is pretty weak...
375  SystemEntity* pTarget = m_npc->TargetMgr()->GetFirstTarget(true);
376  if (!pTarget) {
377  if (m_npc->TargetMgr()->HasNoTargets()) {
378  //_log(CONCORD__AI_TRACE, "%s(%u): Stopped engagement, GetFirstTarget() returned NULL.", m_npc->GetName(), m_npc->GetID());
379  SetIdle();
380  }
381  return;
382  } else if (!pTarget->SysBubble()) {
383  m_npc->TargetMgr()->ClearTarget(pTarget);
384  //m_npc->TargetMgr()->OnTarget(pTarget, TargMgr::Mode::Lost);
385  return;
386  }
387  CheckDistance(pTarget);
388  } break;
389 
390  case Fleeing: {
391  // not sure how im gonna do this one yet.
392  } break;
393 
394  case Signaling: {
395  // not sure how im gonna do this one yet.
396  } break;
397 
398  //no default on purpose
399  }
400 }
401 
403  if (m_state == Idle) return;
404  // not doing anything....idle.
405  //_log(CONCORD__AI_TRACE, "%s(%u): SetIdle: returning to idle.",
406  m_npc->GetName(), m_npc->GetID());
407  m_state = Idle;
408  m_npc->DestinyMgr()->Stop();
410 
417 
418  // write code to enable npcs to wander around when idle?
419  // sounds like a good idea, but will take process power away from other shit.
420 }
421 
423  if (m_state == Chasing) return;
424  //_log(CONCORD__AI_TRACE, "%s(%u): SetChasing: %s(%u) begin chasing.",
425  m_npc->GetName(), m_npc->GetID(), pTarget->GetName(), pTarget->GetID());
426  // target out of range to attack/follow, but within npc sight range....use mwd/ab if equiped
428  m_npc->DestinyMgr()->Follow(pTarget, m_entityOrbitRange); //try to get inside orbit range
429  m_state = Chasing;
430 }
431 
433  if (m_state == Following) return;
434  //_log(CONCORD__AI_TRACE, "%s(%u): SetFollowing: %s(%u) begin following.",
435  m_npc->GetName(), m_npc->GetID(), pTarget->GetName(), pTarget->GetID());
436  // too close to chase, but to far to engage
438  m_npc->DestinyMgr()->Follow(pTarget, m_entityOrbitRange); //try to get inside orbit range
439  m_state = Following;
440 }
441 
443  if (m_state == Engaged) return;
444  //_log(CONCORD__AI_TRACE, "%s(%u): SetEngaged: %s(%u) begin engaging.",
445  m_npc->GetName(), m_npc->GetID(), pTarget->GetName(), pTarget->GetID());
446  // actively fighting
447  // not sure of the actual orbit speed of npc's, but their 'cruise speed' seems a bit slow.
448  // this sets orbit speed between cruise speed and quarter of max speed (whether mwb or ab)
449  // this will also enable this npc to have a variable speed, instead of fixed upon creation.
451  m_npc->DestinyMgr()->Orbit(pTarget, m_entityOrbitRange); //try to get inside orbit range
452  m_state = Engaged;
453 }
454 
456  if (m_state == Fleeing) return;
457  //_log(CONCORD__AI_TRACE, "%s(%u): SetFleeing: %s(%u) begin fleeing.",
458  m_npc->GetName(), m_npc->GetID(), pTarget->GetName(), pTarget->GetID());
459  // actively fleeing
460  // use superspeed to disengage, then warp. << both these will need to be written.
461  // this state is only usable by higher-class npcs.
463  m_state = Fleeing;
464 }
465 
467  if (m_state == Signaling) return;
468  //_log(CONCORD__AI_TRACE, "%s(%u): SetSignaling: %s(%u) begin signaling.",
469  m_npc->GetName(), m_npc->GetID(), pTarget->GetName(), pTarget->GetID());
470  // actively signaling
471  // start speedtanking while signaling. (im sure this is cheating, but fuckem.)
472  // this state is only usable by higher-class npcs.
474  m_npc->DestinyMgr()->Orbit(pTarget, m_entityOrbitRange); //try to get inside orbit range
475  m_state = Signaling;
476 }
477 
479 {
480  //rewrote distance checks for correct logic this time
481  GVector usToThem(m_npc->GetPosition(), pSE->GetPosition());
482  //double dist = m_npc->GetPosition().distance(pSE->GetPosition()); // this throws occasional errors (segfault)
483  double dist = usToThem.length();
484  if (dist > m_entityAttackRange) {
485  _log(CONCORD__AI_TRACE, "%s(%u): CheckDistance: %s(%u) is too far away (%u). Return to Idle.", \
486  m_npc->GetName(), m_npc->GetID(), pSE->GetName(), pSE->GetID(), dist);
487  if (m_state != Idle) {
488  // target is no longer in npc's "sight range". unlock target and return to idle.
489  // should we do anything else here? search for another target? wander around?
490  m_npc->TargetMgr()->ClearTarget(pSE);
491  //m_npc->TargetMgr()->OnTarget(pSE, TargMgr::Mode::Lost);
492  if (m_npc->TargetMgr()->HasNoTargets())
493  SetIdle();
494  }
495  return;
496  } else if (dist < m_entityFlyRange) { //within weapon max (and within falloff)
497  SetEngaged(pSE); //engage and orbit
498  } else if (dist < m_entityChaseRange) { //within follow
499  SetFollowing(pSE);
500  } else if (dist < m_entityAttackRange) { //within sight
501  SetChasing(pSE);
502  return;
503  }
504 
509 
510  if (!m_mainAttackTimer.Enabled())
512 
513  Attack(pSE);
514 }
515 
518 }
519 
521 
522  //m_npc->TargetMgr()->ClearAllTargets();
524 }
525 
527  double targetTime = GetTargetTime();
528 
530  //_log(CONCORD__AI_TRACE, "%s(%u): Targeting of %s(%u) failed. Clear Target and Return to Idle.", \
531  m_npc->GetName(), m_npc->GetID(), pTarget->GetName(), pTarget->GetID());
532  ClearAllTargets();
533  SetIdle();
534  return;
535  }
537  CheckDistance(pTarget);
538 }
539 
541  double targetTime = GetTargetTime();
542 
543  switch(m_state) {
544  case Idle: {
545  _log(CONCORD__AI_TRACE, "%s(%u): Targeted by %s(%u) in Idle. Begin Approaching and start Targeting sequence.", \
546  m_npc->GetName(), m_npc->GetID(), pAgressor->GetName(), pAgressor->GetID());
547  SetChasing(pAgressor);
548 
550  SetIdle();
551  return;
552  }
554  CheckDistance(pAgressor);
555  } break;
556  case Chasing: {
557  _log(CONCORD__AI_TRACE, "%s(%u): Targeted by %s(%u) while chasing.",
558  m_npc->GetName(), m_npc->GetID(), pAgressor->GetName(), pAgressor->GetID());
559  } break;
560  case Following: {
561  _log(CONCORD__AI_TRACE, "%s(%u): Targeted by %s(%u) while following.",
562  m_npc->GetName(), m_npc->GetID(), pAgressor->GetName(), pAgressor->GetID());
563  } break;
564  case Engaged: {
565  _log(CONCORD__AI_TRACE, "%s(%u): Targeted by %s(%u) while engaged.",
566  m_npc->GetName(), m_npc->GetID(), pAgressor->GetName(), pAgressor->GetID());
567  } break;
568  case Fleeing: {
569  _log(CONCORD__AI_TRACE, "%s(%u): Targeted by %s(%u) while fleeing.",
570  m_npc->GetName(), m_npc->GetID(), pAgressor->GetName(), pAgressor->GetID());
571  } break;
572  case Signaling: {
573  _log(CONCORD__AI_TRACE, "%s(%u): Targeted by %s(%u) while signaling.",
574  m_npc->GetName(), m_npc->GetID(), pAgressor->GetName(), pAgressor->GetID());
575  } break;
576 
577  //no default on purpose
578  }
579 }
580 
582  switch(m_state) {
583  case Chasing:
584  case Following:
585  case Engaged: {
586  if (m_npc->TargetMgr()->HasNoTargets()) {
587  _log(CONCORD__AI_TRACE, "%s(%u): Target %s(%u) lost. No targets remain. Return to Idle.",
588  m_npc->GetName(), m_npc->GetID(), pTarget->GetName(), pTarget->GetID());
589  SetIdle();
590  } else {
591  _log(CONCORD__AI_TRACE, "%s(%u): Target %s(%u) lost, but more targets remain.",
592  m_npc->GetName(), m_npc->GetID(), pTarget->GetName(), pTarget->GetID());
593  }
594 
595  } break;
596 
597  default:
598  break;
599  }
600 }
601 
603 {
604  if (m_mainAttackTimer.Check()) {
605  if (!pSE) return;
606  // Check to see if the target still in the bubble (Client warped out)
607  if (!m_npc->SysBubble()->InBubble(pSE->GetPosition())) {
608  _log(CONCORD__AI_TRACE, "%s(%u): Target %s(%u) no longer in bubble. Clear target and move on",
609  m_npc->GetName(), m_npc->GetID(), pSE->GetName(), pSE->GetID());
610 
611  m_npc->TargetMgr()->ClearTarget(pSE);
612  //m_npc->TargetMgr()->OnTarget(pSE, TargMgr::Mode::Lost);
613  return;
614  }
615  DestinyManager* pDestiny = pSE->DestinyMgr();
616  if (!pDestiny) {
617  _log(CONCORD__AI_TRACE, "%s(%u): Target %s(%u) has no destiny manager. Clear target and move on",
618  m_npc->GetName(), m_npc->GetID(), pSE->GetName(), pSE->GetID());
619 
620  m_npc->TargetMgr()->ClearTarget(pSE);
621  //m_npc->TargetMgr()->OnTarget(pSE, TargMgr::Mode::Lost);
622  return;
623  }
624  // Check to see if the target is not cloaked:
625  if (pDestiny->IsCloaked()) {
626  _log(CONCORD__AI_TRACE, "%s(%u): Target %s(%u) is cloaked. Clear target and move on",
627  m_npc->GetName(), m_npc->GetID(), pSE->GetName(), pSE->GetID());
628  m_npc->TargetMgr()->ClearTarget(pSE);
629  //m_npc->TargetMgr()->OnTarget(pSE, TargMgr::Mode::Lost);
630  return;
631  }
632 
633  if (m_npc->TargetMgr()->CanAttack())
634  AttackTarget(pSE);
635  }
636 }
637 
638 //also check for special effects and write code to implement them
639 //modifyTargetSpeedRange, modifyTargetSpeedChance
640 //entityWarpScrambleChance
642  std::string guid = "effects.Laser";
644  m_npc->GetSelf()->itemID(),
645  m_npc->GetSelf()->typeID(), //m_npc->GetSelf()->GetAttribute(AttrGfxTurretID).get_int(),
646  pTarget->GetID(),
647  0,guid,1,1,1,m_attackSpeed,0);
648 
649  Damage d(m_npc,
650  m_npc->GetSelf(),
651  m_npc->GetKinetic(),
652  m_npc->GetThermal(),
653  m_npc->GetEM(),
654  m_npc->GetExplosive(),
655  m_formula.GetNPCToHit(m_npc, pTarget),
657  );
658 
660  pTarget->ApplyDamage(d);
661 }
662 
664 {
665  double targetTime = (m_npc->GetSelf()->GetAttribute(AttrScanSpeed).get_int());
666  float radius = m_npc->GetSelf()->GetAttribute(AttrRadius).get_float();
667  if (!targetTime) {
668  if (radius < 30)
669  targetTime = 1500;
670  else if (radius < 60)
671  targetTime = 2500;
672  else if (radius < 150)
673  targetTime = 4000;
674  else if (radius < 280)
675  targetTime = 6000;
676  else if (radius < 550)
677  targetTime = 8000;
678  else
679  targetTime = 13000;
680  }
681  return targetTime;
682 }
683 
685 {
688 }
689 
691 
692 }
void Append(const T &value)
Appends a single value to buffer.
Definition: Buffer.h:437
#define sConfig
A macro for easier access to the singleton.
unsigned __int8 uint8
Definition: eve-compat.h:46
virtual void Process()
double GetFollowDistance()
GaExpInl GaFloat length() const
Definition: GaTypes.h:156
#define _log(type, fmt,...)
Definition: logsys.h:124
void Disable()
Definition: timer.h:39
DestinyManager * m_destiny
Definition: SystemEntity.h:265
double GetRadius()
Definition: SystemEntity.h:208
double m_armorDamage
Definition: Concord.h:93
double m_entityOrbitRange
Definition: Concord.h:143
void ClearTarget(SystemEntity *tSE)
void SetChasing(SystemEntity *pTarget)
Definition: Concord.cpp:422
void UseShieldRecharge()
Definition: Concord.cpp:207
double GetTargetTime()
Definition: Concord.cpp:663
bool HasAttribute(const uint16 attrID) const
Concord * m_npc
Definition: Concord.h:156
uint32 m_orbitingID
Definition: Concord.h:85
double m_therDamage
Definition: Concord.h:91
void EncodeDestiny(Buffer &into) const
Definition: Concord.cpp:120
void DisableRepTimers()
Definition: Concord.cpp:684
SystemBubble * SysBubble()
Definition: SystemEntity.h:195
uint16 m_shieldBoosterDuration
Definition: Concord.h:152
bool InBubble(const GPoint &pt, bool inWarp=false) const
void CheckDistance(SystemEntity *pTarget)
Definition: Concord.cpp:478
float GetEM()
Definition: Concord.h:63
void SetEngaged(SystemEntity *pTarget)
Definition: Concord.cpp:442
double MakeRandomFloat(double low, double high)
Generates random real from interval [low; high].
Definition: misc.cpp:114
double y()
Definition: SystemEntity.h:214
#define sProfiler
Definition: dbcore.cpp:39
void SetSignaling(SystemEntity *pTarget)
Definition: Concord.cpp:466
void SetIdle()
Definition: Concord.cpp:402
double m_orbitRange
Definition: Concord.h:87
double m_expDamage
Definition: Concord.h:89
const GVector & GetVelocity() const
void SetMaxVelocity(float maxVelocity)
void Process()
Definition: Concord.cpp:92
float GetKinetic()
Definition: Concord.h:64
void ClearTargets(bool notify=true)
TargetManager * TargetMgr()
Definition: SystemEntity.h:197
Python tuple.
Definition: PyRep.h:567
GaFloat x
Definition: GaTypes.h:207
int32 m_harmonic
Definition: SystemEntity.h:276
float capacity() const
Definition: ItemType.h:71
uint32 GetTargetID()
const GPoint & GetPosition() const
Definition: SystemEntity.h:211
Timer m_mainAttackTimer
Definition: Concord.h:161
double m_armorRepairChance
Definition: Concord.h:146
EvilNumber EvilZero
Definition: EvilNumber.cpp:32
void SafeDelete(T *&p)
Deletes and nullifies a pointer.
Definition: SafeMem.h:83
void AttackTarget(SystemEntity *pTarget)
Definition: Concord.cpp:641
double m_attackSpeed
Definition: Concord.h:141
double m_shieldCharge
Definition: Concord.h:94
const ItemType & type() const
Timer m_beginFindTarget
Definition: Concord.h:164
float GetSpeedFraction()
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
void TargetedAdd(SystemEntity *who)
Definition: Concord.cpp:116
Definition: gpoint.h:33
SystemEntity * GetFirstTarget(bool need_locked=false)
Timer m_shieldBoosterTimer
Definition: Concord.h:162
InventoryItemRef m_self
Definition: SystemEntity.h:269
DestinyManager * DestinyMgr()
Definition: SystemEntity.h:198
Timer m_webifierTimer
Definition: Concord.h:166
double GetTimeUSeconds()
Definition: utils_time.cpp:116
Generic class for buffers.
Definition: Buffer.h:40
void Targeted(SystemEntity *by_who)
Definition: Concord.cpp:540
InventoryItemRef GetSelf()
Definition: SystemEntity.h:202
int32 GetWarpSpeed()
uint32 m_corpID
Definition: SystemEntity.h:281
bool Enabled() const
Definition: timer.h:41
PyTuple * MakeDamageState()
int64 get_int()
Definition: EvilNumber.cpp:166
void ClearTargets()
Definition: Concord.cpp:516
double m_entityChaseRange
Definition: Concord.h:144
void Orbit(SystemEntity *who)
Definition: Concord.cpp:105
Definition: Damage.h:33
float mass() const
Definition: ItemType.h:69
void UseArmorRepairer()
Definition: Concord.cpp:221
double GetMaxVelocity()
uint16 m_armorRepairDuration
Definition: Concord.h:151
float GetExplosive()
Definition: Concord.h:65
double GetInertia()
double z()
Definition: SystemEntity.h:215
void SetAttribute(uint16 attrID, int num, bool notify=true)
uint32 GetID()
Definition: SystemEntity.h:207
bool HasPlayers() const
Definition: SystemBubble.h:85
bool Check(bool reset=true)
Definition: timer.cpp:62
double m_shieldBoosterChance
Definition: Concord.h:147
void Target(SystemEntity *by_who)
Definition: Concord.cpp:526
Timer m_processTimer
Definition: Concord.h:160
const char * GetName() const
Definition: SystemEntity.h:210
uint16 m_chaseSpeed
Definition: Concord.h:149
void ClearAllTargets()
Definition: Concord.cpp:520
double m_entityAttackRange
Definition: Concord.h:145
double x()
Definition: SystemEntity.h:213
State m_state
Definition: Concord.h:136
void TargetLost(SystemEntity *who)
Definition: Concord.cpp:112
virtual ~Concord()
Definition: Concord.cpp:88
ConcordAI(Concord *who)
Definition: Concord.cpp:266
void Follow(SystemEntity *pSE, uint32 distance)
double m_entityFlyRange
Definition: Concord.h:142
void _UpdateDamage()
Definition: Concord.cpp:234
GaFloat y
Definition: GaTypes.h:207
double GetFileTimeNow()
Definition: utils_time.cpp:84
GPoint GetTargetPoint()
int main(int argc, char *argv[])
void TargetLost(SystemEntity *by_who)
Definition: Concord.cpp:581
bool HasNoTargets() const
void Orbit(SystemEntity *pSE, uint32 distance=0)
EvilNumber GetAttribute(const uint16 attrID) const
double m_kinDamage
Definition: Concord.h:90
void Attack(SystemEntity *pTarget)
Definition: Concord.cpp:602
ConcordAI * AI() const
Definition: Concord.h:70
Timer m_warpScramblerTimer
Definition: Concord.h:165
float radius() const
Definition: ItemType.h:68
float volume() const
Definition: ItemType.h:70
Concord(SystemManager *system, PyServiceMgr &services, InventoryItemRef self, const GPoint &position, ConcordSpawnMgr *spawnMgr)
Definition: Concord.cpp:31
double m_shieldCapacity
Definition: Concord.h:95
EvilNumber EvilOne
Definition: EvilNumber.cpp:34
#define IsAlliance(itemID)
Definition: EVE_Defines.h:244
float get_float()
Definition: EvilNumber.cpp:184
Definition: gpoint.h:70
void SetFollowing(SystemEntity *pTarget)
Definition: Concord.cpp:432
TurretFormulas m_formula
Definition: Concord.h:158
float GetNPCToHit(NPC *pNPC, SystemEntity *pTarget)
double m_emDamage
Definition: Concord.h:88
Timer m_armorRepairTimer
Definition: Concord.h:163
bool ApplyDamage(Damage &d)
Definition: Damage.cpp:108
float GetThermal()
Definition: Concord.h:62
uint16 typeID() const
void SetFleeing(SystemEntity *pTarget)
Definition: Concord.cpp:455
GaFloat z
Definition: GaTypes.h:207
ConcordAI * m_AI
Definition: Concord.h:82
bool StartTargeting(SystemEntity *tSE, ShipItemRef sRef)
uint32 itemID() const
Definition: InventoryItem.h:98
uint16 m_cruiseSpeed
Definition: Concord.h:150
void Process()
Definition: Concord.cpp:310
void SetResists()
Definition: Concord.cpp:249
double m_hullDamage
Definition: Concord.h:92
void Start(uint32 setTimerTime=0, bool changeResetTimer=true)
Definition: timer.cpp:81