EvEmu  0.8.4
11 September 2021
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Sentry.h
Go to the documentation of this file.
1 
8 #ifndef __NPC_SENTRY_H
9 #define __NPC_SENTRY_H
10 
11 #include "system/SystemEntity.h"
12 
13 class PyServiceMgr;
14 class DestinyManager;
15 class InventoryItem;
16 class SentryAI;
17 class SystemManager;
18 class ServiceDB;
19 
20 class Sentry
21 : public ObjectSystemEntity
22 {
23 public:
24  Sentry(InventoryItemRef self, PyServiceMgr& services, SystemManager* system, const FactionData& data);
25  virtual ~Sentry();
26 
27  /* class type pointer querys. */
28  virtual Sentry* GetSentrySE() { return this; }
29  /* class type tests. */
30  virtual bool IsSentrySE() { return true; }
31 
32  /* SystemEntity interface */
33  virtual void Process();
34  virtual void TargetLost(SystemEntity* who);
35  virtual void TargetedAdd(SystemEntity* who);
36  virtual void EncodeDestiny(Buffer& into);
37 
38  /* virtual functions default to base class and overridden as needed */
39  virtual void Killed(Damage &fatal_blow);
40 
41  /* specific functions handled here. */
42  void SaveSentry();
43  void RemoveSentry();
44  void SetResists();
45 
46  float GetThermal() { return m_therDamage; }
47  float GetEM() { return m_emDamage; }
48  float GetKinetic() { return m_kinDamage; }
49  float GetExplosive() { return m_expDamage; }
50 
51  SentryAI* GetAIMgr() { return m_AI; }
52 
53 protected:
55 
56 private:
57  float m_emDamage = 0;
58  float m_expDamage = 0;
59  float m_kinDamage = 0;
60  float m_therDamage = 0;
61  float m_hullDamage = 0;
62  float m_armorDamage = 0;
63  float m_shieldCharge = 0;
64  float m_shieldCapacity = 0;
65 };
66 
67 #endif // __NPC_SENTRY_H
float m_kinDamage
Definition: Sentry.h:59
float m_shieldCapacity
Definition: Sentry.h:64
void SaveSentry()
Definition: Sentry.cpp:112
virtual void Killed(Damage &fatal_blow)
Definition: Sentry.cpp:139
virtual void EncodeDestiny(Buffer &into)
Definition: Sentry.cpp:85
virtual void Process()
Definition: Sentry.cpp:64
Definition: Sentry.h:20
float m_hullDamage
Definition: Sentry.h:61
virtual void TargetLost(SystemEntity *who)
Definition: Sentry.cpp:77
float m_shieldCharge
Definition: Sentry.h:63
Generic class for buffers.
Definition: Buffer.h:40
virtual ~Sentry()
Definition: Sentry.cpp:59
void RemoveSentry()
Definition: Sentry.cpp:117
Definition: Damage.h:33
float GetThermal()
Definition: Sentry.h:46
void SetResists()
Definition: Sentry.cpp:123
float GetExplosive()
Definition: Sentry.h:49
float m_emDamage
Definition: Sentry.h:57
SentryAI * GetAIMgr()
Definition: Sentry.h:51
virtual Sentry * GetSentrySE()
Definition: Sentry.h:28
Sentry(InventoryItemRef self, PyServiceMgr &services, SystemManager *system, const FactionData &data)
Definition: Sentry.cpp:24
virtual bool IsSentrySE()
Definition: Sentry.h:30
float GetEM()
Definition: Sentry.h:47
float GetKinetic()
Definition: Sentry.h:48
virtual void TargetedAdd(SystemEntity *who)
Definition: Sentry.cpp:81
float m_therDamage
Definition: Sentry.h:60
float m_armorDamage
Definition: Sentry.h:62
float m_expDamage
Definition: Sentry.h:58
SentryAI * m_AI
Definition: Sentry.h:54