EvEmu  0.8.4
11 September 2021
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Concord Class Reference

#include "Concord.h"

Inheritance diagram for Concord:
Collaboration diagram for Concord:

Public Member Functions

bool ApplyDamage (Damage &d)
 
void Killed (Damage &fatal_blow)
 
void TargetAdded (SystemEntity *who)
 
void TargetedLost (SystemEntity *who)
 
void TargetsCleared ()
 
float GetThermal ()
 
float GetEM ()
 
float GetKinetic ()
 
float GetExplosive ()
 
double GetOrbitRange ()
 
SystemManagerSystemMgr () const
 
ConcordAIAI () const
 
- Public Member Functions inherited from DynamicSystemEntity
 DynamicSystemEntity (InventoryItemRef self, PyServiceMgr &services, SystemManager *system)
 
virtual ~DynamicSystemEntity ()
 
virtual DynamicSystemEntityGetDynamicSE ()
 
virtual bool IsDynamicEntity ()
 
virtual void UpdateDamage ()
 
virtual void EncodeDestiny (Buffer &into)
 
virtual void MakeDamageState (DoDestinyDamageState &into)
 
virtual PyDictMakeSlimItem ()
 
virtual bool Load ()
 
virtual bool IsInvul ()
 
virtual bool IsFrozen ()
 
void AwardBounty (Client *pClient)
 
void SetInvul (bool invul=false)
 
void SetFrozen (bool frozen=false)
 
- Public Member Functions inherited from SystemEntity
 SystemEntity (InventoryItemRef self, PyServiceMgr &services, SystemManager *system)
 
virtual ~SystemEntity ()
 
virtual bool ProcessTic ()
 
virtual SystemEntityGetSE ()
 
virtual StaticSystemEntityGetStaticSE ()
 
virtual StationSEGetStationSE ()
 
virtual PlanetSEGetPlanetSE ()
 
virtual MoonSEGetMoonSE ()
 
virtual StargateSEGetGateSE ()
 
virtual BeltSEGetBeltSE ()
 
virtual ItemSystemEntityGetItemSE ()
 
virtual ContainerSEGetContSE ()
 
virtual WreckSEGetWreckSE ()
 
virtual AnomalySEGetAnomalySE ()
 
virtual WormholeSEGetWormholeSE ()
 
virtual FieldSEGetFieldSE ()
 
virtual ProbeSEGetProbeSE ()
 
virtual ObjectSystemEntityGetObjectSE ()
 
virtual AsteroidSEGetAsteroidSE ()
 
virtual StructureSEGetPOSSE ()
 
virtual StructureSEGetJammerSE ()
 
virtual JumpBridgeSEGetJumpBridgeSE ()
 
virtual StructureSEGetOutpostSE ()
 
virtual TowerSEGetTowerSE ()
 
virtual ArraySEGetArraySE ()
 
virtual WeaponSEGetWeaponSE ()
 
virtual BatterySEGetBatterySE ()
 
virtual DeployableSEGetDeployableSE ()
 
virtual SentryGetSentrySE ()
 
virtual ModuleSEGetModuleSE ()
 
virtual ReactorSEGetReactorSE ()
 
virtual CustomsSEGetCOSE ()
 
virtual TCUSEGetTCUSE ()
 
virtual SBUSEGetSBUSE ()
 
virtual IHubSEGetIHubSE ()
 
virtual NPCGetNPCSE ()
 
virtual DroneSEGetDroneSE ()
 
virtual MissileGetMissileSE ()
 
virtual ShipSEGetShipSE ()
 
virtual ConcordGetConcordSE ()
 
virtual bool isGlobal ()
 
virtual bool IsSystemEntity ()
 
virtual bool IsInanimateSE ()
 
virtual bool IsStaticEntity ()
 
virtual bool IsBeltSE ()
 
virtual bool IsGateSE ()
 
virtual bool IsPlanetSE ()
 
virtual bool IsMoonSE ()
 
virtual bool IsStationSE ()
 
virtual bool IsItemEntity ()
 
virtual bool IsAnomalySE ()
 
virtual bool IsWormholeSE ()
 
virtual bool IsCelestialSE ()
 
virtual bool IsContainerSE ()
 
virtual bool IsFieldSE ()
 
virtual bool IsProbeSE ()
 
virtual bool IsObjectEntity ()
 
virtual bool IsSentrySE ()
 
virtual bool IsPOSSE ()
 
virtual bool IsCOSE ()
 
virtual bool IsTCUSE ()
 
virtual bool IsSBUSE ()
 
virtual bool IsIHubSE ()
 
virtual bool IsTowerSE ()
 
virtual bool IsArraySE ()
 
virtual bool IsJammerSE ()
 
virtual bool IsWeaponSE ()
 
virtual bool IsBatterySE ()
 
virtual bool IsModuleSE ()
 
virtual bool IsMoonMiner ()
 
virtual bool IsOutpostSE ()
 
virtual bool IsAsteroidSE ()
 
virtual bool IsDeployableSE ()
 
virtual bool IsJumpBridgeSE ()
 
virtual bool IsReactorSE ()
 
virtual bool IsOperSE ()
 
virtual bool IsLogin ()
 
virtual bool IsNPCSE ()
 
virtual bool IsDroneSE ()
 
virtual bool IsWreckSE ()
 
virtual bool IsMissileSE ()
 
virtual bool IsShipSE ()
 
virtual bool IsConcord ()
 
PyServiceMgrGetServices ()
 
SystemBubbleSysBubble ()
 
SystemManagerSystemMgr ()
 
TargetManagerTargetMgr ()
 
DestinyManagerDestinyMgr ()
 
InventoryItemRef GetSelf ()
 
uint16 GetTypeID ()
 
uint32 GetGroupID ()
 
uint8 GetCategoryID ()
 
EVEItemFlags GetFlag ()
 
uint32 GetID ()
 
double GetRadius ()
 
uint32 GetLocationID ()
 
const char * GetName () const
 
const GPointGetPosition () const
 
void SetPosition (const GPoint &pos)
 
double x ()
 
double y ()
 
double z ()
 
int32 GetAllianceID ()
 
int32 GetWarFactionID ()
 
uint32 GetCorporationID ()
 
uint32 GetOwnerID ()
 
uint32 GetFleetID ()
 
void SetFleetID (uint32 set)
 
int8 GetHarmonic ()
 
void SetHarmonic (int8 set)
 
void DropLoot (WreckContainerRef wreckRef, uint32 groupID, uint32 owner)
 
void AwardSecurityStatus (InventoryItemRef iRef, Character *pChar)
 
void SendDamageStateChanged ()
 
bool ApplyDamage (Damage &d)
 
double DistanceTo2 (const SystemEntity *other)
 
PyTupleMakeDamageState ()
 
virtual void Abandon ()
 
const bool IsDead ()
 
const GVectorGetVelocity ()
 
virtual void MissileLaunched (Missile *pMissile)
 
virtual bool LoadExtras ()
 
virtual void Delete ()
 
virtual void SetPilot (Client *pClient)
 
virtual bool HasPilot ()
 
virtual ClientGetPilot ()
 

Protected Member Functions

void _AwardBounty (SystemEntity *who)
 
void DropLoot (uint32 groupID, uint32 owner, uint32 locationID)
 

Protected Attributes

SystemManager *const m_system
 
PyServiceMgrm_services
 
ConcordSpawnMgrm_spawnMgr
 
ConcordAIm_AI
 
- Protected Attributes inherited from SystemEntity
SystemBubblem_bubble
 
SystemManagerm_system
 
TargetManagerm_targMgr
 
DestinyManagerm_destiny
 
PyServiceMgrm_services
 
InventoryItemRef m_self
 
bool m_killed
 
double m_radius
 
int32 m_harmonic
 
int32 m_warID
 
int32 m_allyID
 
uint32 m_corpID
 
uint32 m_fleetID
 
uint32 m_ownerID
 

Private Attributes

uint32 m_orbitingID = 0
 
double m_orbitRange = 0
 
double m_emDamage = 0
 
double m_expDamage = 0
 
double m_kinDamage = 0
 
double m_therDamage = 0
 
double m_hullDamage = 0
 
double m_armorDamage = 0
 
double m_shieldCharge = 0
 
double m_shieldCapacity = 0
 

Concord.cpp

this file is for Concord AI and other concord-specific code as it is written.

: Allan

Date
: 09 March 2016
 Concord (SystemManager *system, PyServiceMgr &services, InventoryItemRef self, const GPoint &position, ConcordSpawnMgr *spawnMgr)
 
virtual ~Concord ()
 
void Orbit (SystemEntity *who)
 
void Process ()
 
void EncodeDestiny (Buffer &into) const
 
void MakeDamageState (DoDestinyDamageState &into) const
 
void TargetLost (SystemEntity *who)
 
void TargetedAdd (SystemEntity *who)
 
void UseShieldRecharge ()
 
void UseArmorRepairer ()
 
void _UpdateDamage ()
 
void SetResists ()
 

Detailed Description

Definition at line 36 of file Concord.h.

Constructor & Destructor Documentation

Concord::Concord ( SystemManager system,
PyServiceMgr services,
InventoryItemRef  self,
const GPoint position,
ConcordSpawnMgr spawnMgr 
)

Definition at line 31 of file Concord.cpp.

References AttrArmorDamage, AttrCapacitorCapacity, AttrCapacitorCharge, AttrCapacity, AttrDamage, AttrEmDamage, AttrExplosiveDamage, AttrFalloff, AttrInertia, AttrKineticDamage, AttrMass, AttrMaxRange, AttrOrbitRange, AttrRadius, AttrShieldCapacity, AttrShieldCharge, AttrThermalDamage, AttrVolume, AttrWarpCapacitorNeed, ItemType::capacity(), corpCONCORD, EvilOne, EvilZero, factionCONCORD, EvilNumber::get_float(), EvilNumber::get_int(), InventoryItem::GetAttribute(), m_AI, SystemEntity::m_allyID, m_armorDamage, SystemEntity::m_corpID, SystemEntity::m_destiny, m_emDamage, m_expDamage, m_hullDamage, m_kinDamage, m_orbitRange, SystemEntity::m_self, m_shieldCapacity, m_shieldCharge, m_therDamage, SystemEntity::m_warID, ItemType::mass(), ItemType::radius(), InventoryItem::SetAttribute(), SetResists(), InventoryItem::type(), DestinyManager::UpdateShipVariables(), and ItemType::volume().

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 }
DestinyManager * m_destiny
Definition: SystemEntity.h:265
double m_armorDamage
Definition: Concord.h:93
uint32 m_orbitingID
Definition: Concord.h:85
double m_therDamage
Definition: Concord.h:91
ConcordSpawnMgr * m_spawnMgr
Definition: Concord.h:81
double m_orbitRange
Definition: Concord.h:87
double m_expDamage
Definition: Concord.h:89
SystemManager *const m_system
Definition: Concord.h:79
float capacity() const
Definition: ItemType.h:71
EvilNumber EvilZero
Definition: EvilNumber.cpp:32
PyServiceMgr & m_services
Definition: Concord.h:80
double m_shieldCharge
Definition: Concord.h:94
const ItemType & type() const
InventoryItemRef m_self
Definition: SystemEntity.h:269
uint32 m_corpID
Definition: SystemEntity.h:281
int64 get_int()
Definition: EvilNumber.cpp:166
float mass() const
Definition: ItemType.h:69
void SetAttribute(uint16 attrID, int num, bool notify=true)
EvilNumber GetAttribute(const uint16 attrID) const
double m_kinDamage
Definition: Concord.h:90
float radius() const
Definition: ItemType.h:68
float volume() const
Definition: ItemType.h:70
double m_shieldCapacity
Definition: Concord.h:95
EvilNumber EvilOne
Definition: EvilNumber.cpp:34
float get_float()
Definition: EvilNumber.cpp:184
DynamicSystemEntity(InventoryItemRef self, PyServiceMgr &services, SystemManager *system)
double m_emDamage
Definition: Concord.h:88
ConcordAI * m_AI
Definition: Concord.h:82
void SetResists()
Definition: Concord.cpp:249
double m_hullDamage
Definition: Concord.h:92

Here is the call graph for this function:

Concord::~Concord ( )
virtual

Definition at line 88 of file Concord.cpp.

References m_AI, and SafeDelete().

88  {
90 }
void SafeDelete(T *&p)
Deletes and nullifies a pointer.
Definition: SafeMem.h:83
ConcordAI * m_AI
Definition: Concord.h:82

Here is the call graph for this function:

Member Function Documentation

void Concord::_AwardBounty ( SystemEntity who)
protected
void Concord::_UpdateDamage ( )
protected

Definition at line 234 of file Concord.cpp.

References AttrArmorDamage, AttrArmorHP, AttrDamage, AttrHP, AttrShieldCapacity, AttrShieldCharge, AttrShieldRechargeRate, EvilNumber::get_float(), InventoryItem::GetAttribute(), GetFileTimeNow(), SystemEntity::GetID(), and SystemEntity::m_self.

Referenced by UseArmorRepairer(), and UseShieldRecharge().

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 }
Python tuple.
Definition: PyRep.h:567
InventoryItemRef m_self
Definition: SystemEntity.h:269
uint32 GetID()
Definition: SystemEntity.h:207
double GetFileTimeNow()
Definition: utils_time.cpp:84
EvilNumber GetAttribute(const uint16 attrID) const
float get_float()
Definition: EvilNumber.cpp:184

Here is the call graph for this function:

Here is the caller graph for this function:

ConcordAI* Concord::AI ( ) const
inline

Definition at line 70 of file Concord.h.

References m_AI.

Referenced by UseArmorRepairer(), and UseShieldRecharge().

70 { return m_AI; }
ConcordAI * m_AI
Definition: Concord.h:82

Here is the caller graph for this function:

bool Concord::ApplyDamage ( Damage d)
void Concord::DropLoot ( uint32  groupID,
uint32  owner,
uint32  locationID 
)
protected
Todo:
finish this...
void Concord::EncodeDestiny ( Buffer into) const

Definition at line 120 of file Concord.cpp.

References _log, Destiny::MassSector::allianceID, Buffer::Append(), Destiny::MassSector::cloak, Destiny::MassSector::corporationID, Destiny::WARP_Struct::effectStamp, Destiny::BallHeader::entityID, Destiny::BallHeader::flags, Destiny::Ball::Mode::FOLLOW, Destiny::FOLLOW_Struct::followID, Destiny::WARP_Struct::followID, Destiny::FOLLOW_Struct::followRange, Destiny::WARP_Struct::followRange, Destiny::ORBIT_Struct::followRange, Destiny::GOTO_Struct::formationID, Destiny::FOLLOW_Struct::formationID, Destiny::STOP_Struct::formationID, Destiny::WARP_Struct::formationID, Destiny::ORBIT_Struct::formationID, DestinyManager::GetFollowDistance(), SystemEntity::GetID(), DestinyManager::GetInertia(), DestinyManager::GetMass(), DestinyManager::GetMaxVelocity(), SystemEntity::GetName(), SystemEntity::GetRadius(), DestinyManager::GetSpeedFraction(), DestinyManager::GetState(), DestinyManager::GetTargetID(), DestinyManager::GetTargetPoint(), DestinyManager::GetVelocity(), DestinyManager::GetWarpSpeed(), Destiny::Ball::Mode::GOTO, Destiny::MassSector::harmonic, Destiny::DataSector::inertia, IsAlliance, DestinyManager::IsCloaked(), Destiny::Ball::Flag::IsFree, Destiny::Ball::Flag::IsMassive, SystemEntity::m_allyID, SystemEntity::m_corpID, SystemEntity::m_destiny, SystemEntity::m_harmonic, main(), Destiny::MassSector::mass, Destiny::DataSector::maxSpeed, Destiny::BallHeader::mode, Destiny::Ball::Mode::ORBIT, Destiny::BallHeader::posX, Destiny::BallHeader::posY, Destiny::BallHeader::posZ, Destiny::BallHeader::radius, Destiny::WARP_Struct::speed, Destiny::DataSector::speedfraction, Destiny::ORBIT_Struct::targetID, Destiny::WARP_Struct::targX, Destiny::WARP_Struct::targY, Destiny::WARP_Struct::targZ, Destiny::DataSector::velX, Destiny::DataSector::velY, Destiny::DataSector::velZ, Destiny::Ball::Mode::WARP, Destiny::GOTO_Struct::x, Ga::GaVec3::x, SystemEntity::x(), Destiny::GOTO_Struct::y, Ga::GaVec3::y, SystemEntity::y(), Destiny::GOTO_Struct::z, Ga::GaVec3::z, and SystemEntity::z().

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 }
void Append(const T &value)
Appends a single value to buffer.
Definition: Buffer.h:437
unsigned __int8 uint8
Definition: eve-compat.h:46
double GetFollowDistance()
#define _log(type, fmt,...)
Definition: logsys.h:124
DestinyManager * m_destiny
Definition: SystemEntity.h:265
double GetRadius()
Definition: SystemEntity.h:208
double y()
Definition: SystemEntity.h:214
const GVector & GetVelocity() const
GaFloat x
Definition: GaTypes.h:207
int32 m_harmonic
Definition: SystemEntity.h:276
uint32 GetTargetID()
float GetSpeedFraction()
Definition: gpoint.h:33
int32 GetWarpSpeed()
uint32 m_corpID
Definition: SystemEntity.h:281
double GetMaxVelocity()
double GetInertia()
double z()
Definition: SystemEntity.h:215
uint32 GetID()
Definition: SystemEntity.h:207
const char * GetName() const
Definition: SystemEntity.h:210
double x()
Definition: SystemEntity.h:213
GaFloat y
Definition: GaTypes.h:207
GPoint GetTargetPoint()
int main(int argc, char *argv[])
#define IsAlliance(itemID)
Definition: EVE_Defines.h:244
GaFloat z
Definition: GaTypes.h:207

Here is the call graph for this function:

float Concord::GetEM ( )
inline

Definition at line 63 of file Concord.h.

References m_emDamage.

Referenced by ConcordAI::AttackTarget().

63 { return m_emDamage; }
double m_emDamage
Definition: Concord.h:88

Here is the caller graph for this function:

float Concord::GetExplosive ( )
inline

Definition at line 65 of file Concord.h.

References m_expDamage.

Referenced by ConcordAI::AttackTarget().

65 { return m_expDamage; }
double m_expDamage
Definition: Concord.h:89

Here is the caller graph for this function:

float Concord::GetKinetic ( )
inline

Definition at line 64 of file Concord.h.

References m_kinDamage.

Referenced by ConcordAI::AttackTarget().

64 { return m_kinDamage; }
double m_kinDamage
Definition: Concord.h:90

Here is the caller graph for this function:

double Concord::GetOrbitRange ( )
inline

Definition at line 67 of file Concord.h.

References m_orbitRange.

67 { return m_orbitRange; }
double m_orbitRange
Definition: Concord.h:87
float Concord::GetThermal ( )
inline

Definition at line 62 of file Concord.h.

References m_therDamage.

Referenced by ConcordAI::AttackTarget().

62 { return m_therDamage; }
double m_therDamage
Definition: Concord.h:91

Here is the caller graph for this function:

void Concord::Killed ( Damage fatal_blow)
virtual

Reimplemented from SystemEntity.

void Concord::MakeDamageState ( DoDestinyDamageState &  into) const

Definition at line 199 of file Concord.cpp.

References AttrArmorHP, AttrHP, AttrShieldCapacity, AttrShieldRechargeRate, EvilNumber::get_float(), InventoryItem::GetAttribute(), GetFileTimeNow(), m_armorDamage, m_hullDamage, SystemEntity::m_self, and m_shieldCharge.

199  {
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 }
double m_armorDamage
Definition: Concord.h:93
double m_shieldCharge
Definition: Concord.h:94
InventoryItemRef m_self
Definition: SystemEntity.h:269
double GetFileTimeNow()
Definition: utils_time.cpp:84
EvilNumber GetAttribute(const uint16 attrID) const
float get_float()
Definition: EvilNumber.cpp:184
double m_hullDamage
Definition: Concord.h:92

Here is the call graph for this function:

void Concord::Orbit ( SystemEntity who)

Definition at line 105 of file Concord.cpp.

References SystemEntity::GetID(), and m_orbitingID.

105  {
106  if (!who)
107  m_orbitingID = 0;
108  else
109  m_orbitingID = who->GetID();
110 }
uint32 m_orbitingID
Definition: Concord.h:85
uint32 GetID()
Definition: SystemEntity.h:207

Here is the call graph for this function:

void Concord::Process ( )
virtual

Reimplemented from SystemEntity.

Definition at line 92 of file Concord.cpp.

References Profile::concord, GetTimeUSeconds(), m_AI, SystemEntity::m_killed, SystemEntity::Process(), ConcordAI::Process(), sConfig, and sProfiler.

92  {
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 }
#define sConfig
A macro for easier access to the singleton.
virtual void Process()
#define sProfiler
Definition: dbcore.cpp:39
double GetTimeUSeconds()
Definition: utils_time.cpp:116
ConcordAI * m_AI
Definition: Concord.h:82
void Process()
Definition: Concord.cpp:310

Here is the call graph for this function:

void Concord::SetResists ( )
protected

Definition at line 249 of file Concord.cpp.

References AttrArmorEmDamageResonance, AttrArmorExplosiveDamageResonance, AttrArmorKineticDamageResonance, AttrArmorThermalDamageResonance, AttrEmDamageResonance, AttrExplosiveDamageResonance, AttrKineticDamageResonance, AttrShieldEmDamageResonance, AttrShieldExplosiveDamageResonance, AttrShieldKineticDamageResonance, AttrShieldThermalDamageResonance, AttrThermalDamageResonance, EvilOne, InventoryItem::HasAttribute(), SystemEntity::m_self, and InventoryItem::SetAttribute().

Referenced by Concord().

249  {
250  /* fix for missing resist attribs -allan 18April16 */
263 }
bool HasAttribute(const uint16 attrID) const
InventoryItemRef m_self
Definition: SystemEntity.h:269
void SetAttribute(uint16 attrID, int num, bool notify=true)
EvilNumber EvilOne
Definition: EvilNumber.cpp:34

Here is the call graph for this function:

Here is the caller graph for this function:

SystemManager* Concord::SystemMgr ( ) const
inline

Definition at line 69 of file Concord.h.

References m_system.

69 { return m_system; }
SystemManager *const m_system
Definition: Concord.h:79
void Concord::TargetAdded ( SystemEntity who)
inline

Definition at line 55 of file Concord.h.

55 {}
void Concord::TargetedAdd ( SystemEntity who)

Definition at line 116 of file Concord.cpp.

References m_AI, and ConcordAI::Targeted().

116  {
117  m_AI->Targeted(who);
118 }
void Targeted(SystemEntity *by_who)
Definition: Concord.cpp:540
ConcordAI * m_AI
Definition: Concord.h:82

Here is the call graph for this function:

void Concord::TargetedLost ( SystemEntity who)
inline

Definition at line 56 of file Concord.h.

56 {}
void Concord::TargetLost ( SystemEntity who)

Definition at line 112 of file Concord.cpp.

References m_AI, and ConcordAI::TargetLost().

112  {
113  m_AI->TargetLost(who);
114 }
void TargetLost(SystemEntity *by_who)
Definition: Concord.cpp:581
ConcordAI * m_AI
Definition: Concord.h:82

Here is the call graph for this function:

void Concord::TargetsCleared ( )
inline

Definition at line 57 of file Concord.h.

57 {}
void Concord::UseArmorRepairer ( )

Definition at line 221 of file Concord.cpp.

References _UpdateDamage(), AI(), AttrEntityArmorRepairAmount, ConcordAI::DisableRepTimers(), EvilNumber::get_float(), InventoryItem::GetAttribute(), SystemEntity::GetSelf(), and m_armorDamage.

Referenced by ConcordAI::Process().

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 }
double m_armorDamage
Definition: Concord.h:93
void DisableRepTimers()
Definition: Concord.cpp:684
InventoryItemRef GetSelf()
Definition: SystemEntity.h:202
void _UpdateDamage()
Definition: Concord.cpp:234
EvilNumber GetAttribute(const uint16 attrID) const
ConcordAI * AI() const
Definition: Concord.h:70
float get_float()
Definition: EvilNumber.cpp:184

Here is the call graph for this function:

Here is the caller graph for this function:

void Concord::UseShieldRecharge ( )

Definition at line 207 of file Concord.cpp.

References _UpdateDamage(), AI(), AttrEntityShieldBoostAmount, AttrShieldCapacity, ConcordAI::DisableRepTimers(), EvilNumber::get_float(), InventoryItem::GetAttribute(), SystemEntity::GetSelf(), and m_shieldCharge.

Referenced by ConcordAI::Process().

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 }
void DisableRepTimers()
Definition: Concord.cpp:684
double m_shieldCharge
Definition: Concord.h:94
InventoryItemRef GetSelf()
Definition: SystemEntity.h:202
void _UpdateDamage()
Definition: Concord.cpp:234
EvilNumber GetAttribute(const uint16 attrID) const
ConcordAI * AI() const
Definition: Concord.h:70
float get_float()
Definition: EvilNumber.cpp:184

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

ConcordAI* Concord::m_AI
protected

Definition at line 82 of file Concord.h.

Referenced by AI(), Concord(), Process(), TargetedAdd(), TargetLost(), and ~Concord().

double Concord::m_armorDamage = 0
private

Definition at line 93 of file Concord.h.

Referenced by Concord(), MakeDamageState(), and UseArmorRepairer().

double Concord::m_emDamage = 0
private

Definition at line 88 of file Concord.h.

Referenced by Concord(), and GetEM().

double Concord::m_expDamage = 0
private

Definition at line 89 of file Concord.h.

Referenced by Concord(), and GetExplosive().

double Concord::m_hullDamage = 0
private

Definition at line 92 of file Concord.h.

Referenced by Concord(), and MakeDamageState().

double Concord::m_kinDamage = 0
private

Definition at line 90 of file Concord.h.

Referenced by Concord(), and GetKinetic().

uint32 Concord::m_orbitingID = 0
private

Definition at line 85 of file Concord.h.

Referenced by Orbit().

double Concord::m_orbitRange = 0
private

Definition at line 87 of file Concord.h.

Referenced by Concord(), and GetOrbitRange().

PyServiceMgr& Concord::m_services
protected

Definition at line 80 of file Concord.h.

double Concord::m_shieldCapacity = 0
private

Definition at line 95 of file Concord.h.

Referenced by Concord().

double Concord::m_shieldCharge = 0
private

Definition at line 94 of file Concord.h.

Referenced by Concord(), MakeDamageState(), and UseShieldRecharge().

ConcordSpawnMgr* Concord::m_spawnMgr
protected

Definition at line 81 of file Concord.h.

SystemManager* const Concord::m_system
protected

Definition at line 79 of file Concord.h.

Referenced by SystemMgr().

double Concord::m_therDamage = 0
private

Definition at line 91 of file Concord.h.

Referenced by Concord(), and GetThermal().


The documentation for this class was generated from the following files: