EvEmu  0.8.4
11 September 2021
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Missile.h
Go to the documentation of this file.
1 /*
2  ------------------------------------------------------------------------------------
3  LICENSE:
4  ------------------------------------------------------------------------------------
5  This file is part of EVEmu: EVE Online Server Emulator
6  Copyright 2006 - 2008 The EVEmu Team
7  For the latest information visit http://evemu.mmoforge.org
8  ------------------------------------------------------------------------------------
9  This program is free software; you can redistribute it and/or modify it under
10  the terms of the GNU Lesser General Public License as published by the Free Software
11  Foundation; either version 2 of the License, or (at your option) any later
12  version.
13 
14  This program is distributed in the hope that it will be useful, but WITHOUT
15  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16  FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
17 
18  You should have received a copy of the GNU Lesser General Public License along with
19  this program; if not, write to the Free Software Foundation, Inc., 59 Temple
20  Place - Suite 330, Boston, MA 02111-1307, USA, or go to
21  http://www.gnu.org/copyleft/lesser.txt.
22  ------------------------------------------------------------------------------------
23  Author: Allan
24 */
25 
26 #ifndef EVE_SHIP_MISSILE_H
27 #define EVE_SHIP_MISSILE_H
28 
29 #include "system/SystemEntity.h"
30 
31 class PyServiceMgr;
32 class InventoryItem;
33 class DestinyManager;
34 class SystemManager;
35 class ShipItem;
36 class GenericModule;
37 
38 class Missile
39 : public DynamicSystemEntity {
40 public:
41  Missile(InventoryItemRef self, PyServiceMgr& services, SystemManager* pSystem, InventoryItemRef modRef, SystemEntity* tSE, SystemEntity* pSE, GenericModule* pMod=nullptr);
42  virtual ~Missile();
43 
44  /* class type pointer querys. */
45  virtual Missile* GetMissileSE() { return this; }
46  /* Dynamic */
47  virtual bool IsMissileSE() { return true; }
48 
49  /* SystemEntity interface */
50  virtual void Delete();
51  virtual void Process();
52  virtual void EncodeDestiny( Buffer& into );
53  virtual void MakeDamageState(DoDestinyDamageState &into);
54  virtual PyDict *MakeSlimItem();
55 
56  /* specific functions handled here. */
59 
60  void SetHitTimer(uint32 setTime) { m_hitTimer.Start(setTime); }
61  void SetSpeed(double speed) { m_speed = speed; }
62 
63  bool IsAlive() { return m_alive; }
64  bool IsOverloaded() { return false; }
65 
66  double GetSpeed() { return m_speed; }
67 
68 protected:
72 
73  void HitTarget();
74  void EndOfLife();
75 
78 
79  bool m_alive;
80 
82 
83  float m_damageMod;
84 
85  double m_speed;
86  double m_hullHP;
87 
88 };
89 
90 #endif //EVE_SHIP_MISSILE_H
91 
92 
SystemEntity * m_fromSE
Definition: Missile.h:70
double GetSpeed()
Definition: Missile.h:66
virtual void Delete()
Definition: Missile.cpp:285
bool IsAlive()
Definition: Missile.h:63
SystemEntity * GetTargetSE()
Definition: Missile.h:58
Python's dictionary.
Definition: PyRep.h:719
virtual void Process()
Definition: Missile.cpp:151
void SetHitTimer(uint32 setTime)
Definition: Missile.h:60
virtual PyDict * MakeSlimItem()
Definition: Missile.cpp:213
double m_speed
Definition: Missile.h:85
InventoryItemRef m_modRef
Definition: Missile.h:71
double m_hullHP
Definition: Missile.h:86
Missile(InventoryItemRef self, PyServiceMgr &services, SystemManager *pSystem, InventoryItemRef modRef, SystemEntity *tSE, SystemEntity *pSE, GenericModule *pMod=nullptr)
Definition: Missile.cpp:39
Generic class for buffers.
Definition: Buffer.h:40
void HitTarget()
Definition: Missile.cpp:240
PyTuple * MakeDamageState()
uint32 GetID()
Definition: SystemEntity.h:207
void SetSpeed(double speed)
Definition: Missile.h:61
bool m_alive
Definition: Missile.h:79
uint32 GetLauncherID()
Definition: Missile.h:57
unsigned __int32 uint32
Definition: eve-compat.h:50
Timer m_lifeTimer
Definition: Missile.h:77
void EndOfLife()
Definition: Missile.cpp:280
Definition: Ship.h:46
virtual bool IsMissileSE()
Definition: Missile.h:47
uint32 m_orbitingID
Definition: Missile.h:81
SystemEntity * m_targetSE
Definition: Missile.h:69
virtual ~Missile()
Definition: Missile.cpp:146
virtual Missile * GetMissileSE()
Definition: Missile.h:45
Definition: timer.h:30
bool IsOverloaded()
Definition: Missile.h:64
float m_damageMod
Definition: Missile.h:83
Timer m_hitTimer
Definition: Missile.h:76
void Start(uint32 setTimerTime=0, bool changeResetTimer=true)
Definition: timer.cpp:81
virtual void EncodeDestiny(Buffer &into)
Definition: Missile.cpp:172