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

#include "Probes.h"

Inheritance diagram for ProbeSE:
Collaboration diagram for ProbeSE:

Public Member Functions

virtual ProbeSEGetProbeSE ()
 
virtual bool IsProbeSE ()
 
void SetScan (Scan *pScan)
 
void RemoveScan ()
 
void StartStateTimer (uint16 time)
 
void SetState (uint8 state=Probe::State::Idle)
 
uint8 GetState ()
 
uint8 GetRangeStep ()
 
uint16 GetMoveTime ()
 
int64 GetExpiryTime ()
 
float GetScanRange ()
 
GPoint GetDestination ()
 
bool CanScanShips ()
 
bool IsRing ()
 
bool IsSphere ()
 
void SetRing (bool set=false)
 
void SetSphere (bool set=false)
 
ProbeItems.cpp

Probe Item/SE class for EVEmu

: Allan

Date
: 10 March 2018
 ProbeSE (ProbeItemRef self, PyServiceMgr &services, SystemManager *system)
 
 ProbeSE (ProbeItemRef self, PyServiceMgr &services, SystemManager *system, InventoryItemRef moduleRef, ShipItemRef shipRef)
 
virtual ~ProbeSE ()
 
virtual bool ProcessTic ()
 
virtual void MakeDamageState (DoDestinyDamageState &into)
 
virtual PyDictMakeSlimItem ()
 
void RecoverProbe (PyList *list)
 
void UpdateProbe (ProbeData &data)
 
void RemoveProbe ()
 
void SendNewProbe ()
 
void SendSlimChange ()
 
void SendStateChange (uint8 state)
 
void SendWarpStart (float travelTime)
 
void SendWarpEnd ()
 
bool IsMoving ()
 
float GetDeviation ()
 
float GetRangeModifier (float dist)
 
float GetScanStrength ()
 
const char * GetStateName (uint8 state)
 
bool HasMaxSkill ()
 
- 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 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 void Process ()
 
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 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 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 Killed (Damage &fatal_blow)
 
virtual void MissileLaunched (Missile *pMissile)
 
virtual bool LoadExtras ()
 
virtual void Delete ()
 
virtual void SetPilot (Client *pClient)
 
virtual bool HasPilot ()
 
virtual ClientGetPilot ()
 

Private Attributes

Timer m_lifeTimer
 
Timer m_returnTimer
 
Timer m_stateTimer
 
Scanm_scan
 
Clientm_client
 
GPoint m_destination
 
ShipItemRef m_shipRef
 
InventoryItemRef m_moduleRef
 
bool m_scanShips
 
bool m_ring
 
bool m_sphere
 
uint8 m_state
 
uint8 m_rangeStep
 
uint8 m_rangeFactor
 
uint32 m_baseScanRange
 
int64 m_expiry
 
float m_secStatus
 
float m_scanRange
 
float m_scanStrength
 
float m_scanDeviation
 

Additional Inherited Members

- 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
 

Detailed Description

Definition at line 71 of file Probes.h.

Constructor & Destructor Documentation

ProbeSE::ProbeSE ( ProbeItemRef  self,
PyServiceMgr services,
SystemManager system 
)

Definition at line 83 of file Probes.cpp.

References _log, AttrProbeCanScanShips, GetFileTimeNow(), EvE::Time::Hour, Probe::State::Inactive, InventoryItem::itemID(), m_expiry, m_lifeTimer, m_scanShips, SystemEntity::m_self, m_state, and Timer::Start().

84 : DynamicSystemEntity(self, services, system),
85 m_scan(nullptr),
86 m_client(nullptr),
87 m_shipRef(nullptr),
88 m_moduleRef(nullptr),
89 m_secStatus(0),
90 m_lifeTimer(0),
91 m_rangeStep(0),
92 m_scanRange(0),
93 m_stateTimer(0),
94 m_returnTimer(0),
97 m_ring(false),
98 m_sphere(false),
99 m_scanShips(false)
100 {
102 
103  if (self->HasAttribute(AttrProbeCanScanShips))
104  m_scanShips = self->GetAttribute(AttrProbeCanScanShips).get_bool();
105 
106  // set probe lifetime of 5h
107  m_expiry = GetFileTimeNow() + (EvE::Time::Hour *5); // 5h abandoned lifespan
108  m_lifeTimer.Start(5*60*60*1000); // 5h to ms
109 
110  _log(SCAN__INFO, "Created Abandoned ProbeSE for %u. expiry: %li", m_self->itemID(), m_expiry);
111 }
int64 m_expiry
Definition: Probes.h:165
bool m_ring
Definition: Probes.h:156
#define _log(type, fmt,...)
Definition: logsys.h:124
float m_secStatus
Definition: Probes.h:167
Timer m_returnTimer
Definition: Probes.h:144
InventoryItemRef m_self
Definition: SystemEntity.h:269
Timer m_stateTimer
Definition: Probes.h:145
uint8 m_rangeStep
Definition: Probes.h:160
Client * m_client
Definition: Probes.h:148
ShipItemRef m_shipRef
Definition: Probes.h:152
double GetFileTimeNow()
Definition: utils_time.cpp:84
float m_scanStrength
Definition: Probes.h:169
float m_scanRange
Definition: Probes.h:168
InventoryItemRef m_moduleRef
Definition: Probes.h:153
float m_scanDeviation
Definition: Probes.h:170
bool m_scanShips
Definition: Probes.h:155
bool m_sphere
Definition: Probes.h:157
Scan * m_scan
Definition: Probes.h:147
uint8 m_state
Definition: Probes.h:159
DynamicSystemEntity(InventoryItemRef self, PyServiceMgr &services, SystemManager *system)
uint32 itemID() const
Definition: InventoryItem.h:98
Timer m_lifeTimer
Definition: Probes.h:143
void Start(uint32 setTimerTime=0, bool changeResetTimer=true)
Definition: timer.cpp:81

Here is the call graph for this function:

ProbeSE::ProbeSE ( ProbeItemRef  self,
PyServiceMgr services,
SystemManager system,
InventoryItemRef  moduleRef,
ShipItemRef  shipRef 
)

Definition at line 113 of file Probes.cpp.

References _log, EvESkill::AmarrFrigate, EvESkill::AstrometricRangefinding, AttrBaseMaxScanDeviation, AttrBaseScanRange, AttrBaseSensorStrength, AttrExplosionDelay, AttrProbeCanScanShips, AttrRangeFactor, AttrScanStrengthBonus, EvESkill::CaldariFrigate, EvESkill::CovertOps, EvESkill::GallenteFrigate, RefPtr< X >::get(), EvilNumber::get_float(), Client::GetAllianceID(), InventoryItem::GetAttribute(), Client::GetChar(), Client::GetCharacterID(), Client::GetCorporationID(), GetFileTimeNow(), ShipItem::GetModuleManager(), ModuleManager::GetRigScanBonus(), Client::GetSecurityRating(), Character::GetSkillLevel(), Client::GetWarFactionID(), InventoryItem::HasAttribute(), InventoryItem::itemID(), SystemEntity::m_allyID, m_baseScanRange, m_client, SystemEntity::m_corpID, m_expiry, m_lifeTimer, SystemEntity::m_ownerID, m_rangeFactor, m_scanDeviation, m_scanShips, m_scanStrength, m_secStatus, SystemEntity::m_self, SystemEntity::m_warID, EvESkill::MinmatarFrigate, EvE::Time::Minute, ONE_AU_IN_METERS, Timer::Start(), EVEDB::invGroups::Survey_Probe, and InventoryItem::typeID().

114 : DynamicSystemEntity(self, services, system),
115 m_scan(nullptr),
117 m_client(shipRef->GetPilot()),
118 m_shipRef(shipRef),
119 m_moduleRef(moduleRef),
120 m_lifeTimer(0),
121 m_rangeStep(0),
122 m_scanRange(0),
123 m_stateTimer(0),
124 m_returnTimer(0),
125 m_rangeFactor(0),
126 m_scanStrength(0),
127 m_scanDeviation(0),
128 m_baseScanRange(0),
129 m_ring(false),
130 m_sphere(false),
131 m_scanShips(false)
132 {
137 
139 
140  if (self->HasAttribute(AttrProbeCanScanShips))
141  m_scanShips = self->GetAttribute(AttrProbeCanScanShips).get_bool();
142 
143  // set probe lifetime
144  m_expiry = GetFileTimeNow() + (self->GetAttribute(AttrExplosionDelay).get_float() *10000); // ms to filetime
145  if (m_expiry < GetFileTimeNow()) {
146  m_expiry = GetFileTimeNow() + (EvE::Time::Minute *30); // 30m default lifespan
147  m_lifeTimer.Start(30*60*1000); // 30m to ms
148  } else {
149  m_lifeTimer.Start(self->GetAttribute(AttrExplosionDelay).get_uint32());
150  }
151 
152  // set base str, deviation and range
153  m_rangeFactor = self->GetAttribute(AttrRangeFactor).get_uint32();
154  m_scanStrength = self->GetAttribute(AttrBaseSensorStrength).get_float();
155  m_scanDeviation = self->GetAttribute(AttrBaseMaxScanDeviation).get_float();
156  m_baseScanRange = self->GetAttribute(AttrBaseScanRange).get_float() * (ONE_AU_IN_METERS /100);
157 
158  // not sure about this one yet....moon survey. will need special initializers here
159  if (self->groupID() == EVEDB::invGroups::Survey_Probe) {
160  // 5% reduction to flight time? 10% for t2 ship
161  }
162 
163  // i think we may have to do probe modifiers here....they are not being done thru fx system
164  Character* pChar = m_client->GetChar().get();
165  // skills
166  m_scanStrength *= (1 + (0.1 * pChar->GetSkillLevel(EvESkill::AstrometricRangefinding))); // +10% strength per level
167  // skill bonuses unique to EVEmu
168  //m_scanStrength *= (1 + (0.01 * pChar->GetSkillLevel(EvESkill::Astrometrics))); // +1% strength per level
169  //m_scanStrength *= (1 + (0.01 * pChar->GetSkillLevel(EvESkill::SignatureAnalysis))); // +1% strength per level
170  //m_scanDeviation *= (1 - (0.01 * pChar->GetSkillLevel(EvESkill::Astrometrics))); // -1% deviation per level
171  //m_scanDeviation *= (1 - (0.01 * pChar->GetSkillLevel(EvESkill::SensorLinking))); // -1% deviation per level
172 
173  // ship
174  switch (shipRef->typeID()) {
175  //t1
176  case 29248: { /* Magnate */
177  m_scanStrength *= (1 + (0.05f * (pChar->GetSkillLevel(EvESkill::AmarrFrigate)))); // +5% strength per level
178  } break;
179  case 605: { /* Heron */
180  m_scanStrength *= (1 + (0.05f * (pChar->GetSkillLevel(EvESkill::CaldariFrigate)))); // +5% strength per level
181  } break;
182  case 607: { /* Imicus */
183  m_scanStrength *= (1 + (0.05f * (pChar->GetSkillLevel(EvESkill::GallenteFrigate)))); // +5% strength per level
184  } break;
185  case 586: { /* Probe */
186  m_scanStrength *= (1 + (0.05f * (pChar->GetSkillLevel(EvESkill::MinmatarFrigate)))); // +5% strength per level
187  } break;
188  //t2 - Anathema, Buzzard, Cheetah, Helios
189  case 11188: /* Anathema */
190  case 11192: /* Buzzard */
191  case 11172: /* Helios */
192  case 11182: { /* Cheetah */
193  m_scanStrength *= (1 + (0.1f * (pChar->GetSkillLevel(EvESkill::CovertOps)))); // +10% strength per level
194  } break;
195  //t3
196  // just test for subsystem here... typeIDs 30042, 30052, 30062, 30072
197  // use same general code as GetRigScanBonus() in MM below...
198  }
199 
200  // modules (launchers - 5 or 10)
201  if (moduleRef->HasAttribute(AttrScanStrengthBonus))
202  m_scanStrength *= (1 + (0.01f * moduleRef->GetAttribute(AttrScanStrengthBonus).get_float()));
203 
204  // rigs (10 or 15)
205  m_scanStrength *= (1 + shipRef->GetModuleManager()->GetRigScanBonus());
206 
207  // implants (virtue - 1-5, hardwire 2,6,10)
208  // skill (AstrometricRangefinding @ 10%/lvl) <-- this doesnt get set on character object - checked above...
209  // this is just a placeholder. not sure if this will be how it works yet
210  // also, the bonus will be determined by the implant fx, which would be set in attrib.
212  m_scanStrength *= (1 + (0.01f * pChar->GetAttribute(AttrScanStrengthBonus).get_float()));
213 
214  _log(SCAN__INFO, "Created ProbeSE for %u. timeNow: %.0f, expiry: %li, scan Str: %.4f, deviation: %.5f, ship: %s", \
216 }
int64 m_expiry
Definition: Probes.h:165
uint32 m_baseScanRange
Definition: Probes.h:163
bool m_ring
Definition: Probes.h:156
#define _log(type, fmt,...)
Definition: logsys.h:124
float GetSecurityRating() const
Definition: Client.h:172
uint32 m_ownerID
Definition: SystemEntity.h:283
bool HasAttribute(const uint16 attrID) const
ModuleManager * GetModuleManager()
Definition: Ship.h:80
int32 GetCharacterID() const
Definition: Client.h:113
int32 GetWarFactionID() const
Definition: Client.h:126
float m_secStatus
Definition: Probes.h:167
uint8 m_rangeFactor
Definition: Probes.h:161
int32 GetCorporationID() const
Definition: Client.h:123
CharacterRef GetChar() const
Definition: Client.h:164
int32 GetAllianceID() const
Definition: Client.h:125
Timer m_returnTimer
Definition: Probes.h:144
InventoryItemRef m_self
Definition: SystemEntity.h:269
uint32 m_corpID
Definition: SystemEntity.h:281
Timer m_stateTimer
Definition: Probes.h:145
X * get() const
Definition: RefPtr.h:213
uint8 m_rangeStep
Definition: Probes.h:160
Client * m_client
Definition: Probes.h:148
ShipItemRef m_shipRef
Definition: Probes.h:152
double GetFileTimeNow()
Definition: utils_time.cpp:84
float m_scanStrength
Definition: Probes.h:169
float m_scanRange
Definition: Probes.h:168
InventoryItemRef m_moduleRef
Definition: Probes.h:153
float m_scanDeviation
Definition: Probes.h:170
virtual Client * GetPilot()
Definition: Ship.h:72
EvilNumber GetAttribute(const uint16 attrID) const
bool m_scanShips
Definition: Probes.h:155
int8 GetSkillLevel(uint16 skillTypeID, bool zeroForNotInjected=true) const
Definition: Character.cpp:575
bool m_sphere
Definition: Probes.h:157
Scan * m_scan
Definition: Probes.h:147
uint8 m_state
Definition: Probes.h:159
float get_float()
Definition: EvilNumber.cpp:184
DynamicSystemEntity(InventoryItemRef self, PyServiceMgr &services, SystemManager *system)
uint16 typeID() const
float GetRigScanBonus()
uint32 itemID() const
Definition: InventoryItem.h:98
static const int64 ONE_AU_IN_METERS
Definition: EVE_Consts.h:40
Timer m_lifeTimer
Definition: Probes.h:143
void Start(uint32 setTimerTime=0, bool changeResetTimer=true)
Definition: timer.cpp:81

Here is the call graph for this function:

ProbeSE::~ProbeSE ( )
virtual

Definition at line 244 of file Probes.cpp.

References m_scan, and Scan::RemoveProbe().

244  {
245  if (m_scan != nullptr)
246  m_scan->RemoveProbe(this);
247 }
void RemoveProbe(ProbeSE *pProbe)
Definition: Scan.cpp:51
Scan * m_scan
Definition: Probes.h:147

Here is the call graph for this function:

Member Function Documentation

bool ProbeSE::CanScanShips ( )
inline

Definition at line 130 of file Probes.h.

References m_scanShips.

130 { return m_scanShips; }
bool m_scanShips
Definition: Probes.h:155
GPoint ProbeSE::GetDestination ( )
inline

Definition at line 127 of file Probes.h.

References m_destination.

127 { return m_destination; }
GPoint m_destination
Definition: Probes.h:150
float ProbeSE::GetDeviation ( )

Definition at line 463 of file Probes.cpp.

References m_scanDeviation, and m_scanRange.

464 {
465  // % of current range based on bonuses
467 }
float m_scanRange
Definition: Probes.h:168
float m_scanDeviation
Definition: Probes.h:170
int64 ProbeSE::GetExpiryTime ( )
inline

Definition at line 116 of file Probes.h.

References m_expiry.

116 { return m_expiry; }
int64 m_expiry
Definition: Probes.h:165
uint16 ProbeSE::GetMoveTime ( )
inline

Definition at line 115 of file Probes.h.

References Timer::GetRemainingTime(), and m_stateTimer.

115 { return m_stateTimer.GetRemainingTime(); }
uint32 GetRemainingTime() const
Definition: timer.cpp:114
Timer m_stateTimer
Definition: Probes.h:145

Here is the call graph for this function:

virtual ProbeSE* ProbeSE::GetProbeSE ( )
inlinevirtual

Reimplemented from SystemEntity.

Definition at line 83 of file Probes.h.

83 { return this; }
float ProbeSE::GetRangeModifier ( float  dist)

Definition at line 475 of file Probes.cpp.

References m_baseScanRange, m_rangeFactor, and m_rangeStep.

475  {
476  // e^-((targ rang / max range)^2)
477  float tmp = pow(dist/(m_baseScanRange *m_rangeStep), m_rangeFactor);
478  return log(tmp);
479 }
uint32 m_baseScanRange
Definition: Probes.h:163
uint8 m_rangeFactor
Definition: Probes.h:161
uint8 m_rangeStep
Definition: Probes.h:160
uint8 ProbeSE::GetRangeStep ( )
inline

Definition at line 112 of file Probes.h.

References m_rangeStep.

112 { return m_rangeStep; }
uint8 m_rangeStep
Definition: Probes.h:160
float ProbeSE::GetScanRange ( )
inline

Definition at line 121 of file Probes.h.

References m_scanRange.

121 { return m_scanRange; }
float m_scanRange
Definition: Probes.h:168
float ProbeSE::GetScanStrength ( )

Definition at line 469 of file Probes.cpp.

References m_rangeStep, and m_scanStrength.

470 {
471  // factor of range
472  return m_scanStrength /pow(2, (m_rangeStep -1));
473 }
uint8 m_rangeStep
Definition: Probes.h:160
float m_scanStrength
Definition: Probes.h:169
uint8 ProbeSE::GetState ( )
inline

Definition at line 111 of file Probes.h.

References m_state.

111 { return m_state; }
uint8 m_state
Definition: Probes.h:159
const char * ProbeSE::GetStateName ( uint8  state)

Definition at line 449 of file Probes.cpp.

References Probe::State::Idle, Probe::State::Inactive, Probe::State::Moving, Probe::State::Returning, Probe::State::Scanning, and Probe::State::Warping.

Referenced by ProcessTic(), SendStateChange(), and UpdateProbe().

450 {
451  switch(state) {
452  case Probe::State::Inactive: return "Inactive";
453  case Probe::State::Idle: return "Idle";
454  case Probe::State::Moving: return "Moving";
455  case Probe::State::Warping: return "Warping";
456  case Probe::State::Scanning: return "Scanning";
457  case Probe::State::Returning: return "Returning";
458  }
459 
460  return "Undefined";
461 }
entityID heal the character with the entityID note giving you detailed ship status information gives a list of all dynamic entities and players and their destinyState in this bubble shows some current destiny variables save all kick all and halt server immediate command list all items in current location s gives list of cargo contents and volumes in all holds list current session values show current ship DNA show current objects in their destiny state

Here is the caller graph for this function:

bool ProbeSE::HasMaxSkill ( )

Definition at line 482 of file Probes.cpp.

References EvESkill::AstrometricAcquisition, Client::GetChar(), Character::HasSkillTrainedToLevel(), m_client, and EvESkill::SensorLinking.

482  {
485  return true;
486  return false;
487 }
CharacterRef GetChar() const
Definition: Client.h:164
Client * m_client
Definition: Probes.h:148
bool HasSkillTrainedToLevel(uint16 skillTypeID, uint8 skillLevel) const
Definition: Character.cpp:584

Here is the call graph for this function:

bool ProbeSE::IsMoving ( )

Definition at line 283 of file Probes.cpp.

References Probe::State::Idle, Probe::State::Inactive, m_state, Probe::State::Moving, Probe::State::Returning, Probe::State::Scanning, Probe::State::Waiting, and Probe::State::Warping.

Referenced by ProcessTic().

284 {
285  switch (m_state) {
286  case Probe::State::Idle:
290  return false;
294  return true;
295  }
296  return false;
297 }
uint8 m_state
Definition: Probes.h:159

Here is the caller graph for this function:

virtual bool ProbeSE::IsProbeSE ( )
inlinevirtual

Reimplemented from SystemEntity.

Definition at line 86 of file Probes.h.

86 { return true; }
bool ProbeSE::IsRing ( )
inline

Definition at line 132 of file Probes.h.

References m_ring.

132 { return m_ring; }
bool m_ring
Definition: Probes.h:156
bool ProbeSE::IsSphere ( )
inline

Definition at line 133 of file Probes.h.

References m_sphere.

133 { return m_sphere; }
bool m_sphere
Definition: Probes.h:157
void ProbeSE::MakeDamageState ( DoDestinyDamageState &  into)
virtual

Reimplemented from DynamicSystemEntity.

Definition at line 505 of file Probes.cpp.

References AttrDamage, AttrHP, EvilNumber::get_double(), InventoryItem::GetAttribute(), GetFileTimeNow(), and SystemEntity::m_self.

505  {
506  into.shield = 1.0;
507  into.recharge = 1000000;
508  into.timestamp = GetFileTimeNow();
509  into.armor = 1.0;
510  into.structure = 1.0 - (m_self->GetAttribute(AttrDamage).get_double() / m_self->GetAttribute(AttrHP).get_double());
511 }
InventoryItemRef m_self
Definition: SystemEntity.h:269
double GetFileTimeNow()
Definition: utils_time.cpp:84
EvilNumber GetAttribute(const uint16 attrID) const
double get_double()
Definition: EvilNumber.cpp:191

Here is the call graph for this function:

PyDict * ProbeSE::MakeSlimItem ( )
virtual

Reimplemented from DynamicSystemEntity.

Definition at line 489 of file Probes.cpp.

References _log, RefPtr< X >::get(), SystemEntity::GetName(), IsAlliance, IsCorp, IsFaction, InventoryItem::itemID(), SystemEntity::m_allyID, SystemEntity::m_corpID, m_moduleRef, SystemEntity::m_ownerID, m_secStatus, SystemEntity::m_self, SystemEntity::m_warID, PyStatic, and InventoryItem::typeID().

490 {
491  _log(SE__SLIMITEM, "MakeSlimItem for ProbeSE %s(%u)", GetName(), m_self->itemID());
492  PyDict* slim = new PyDict();
493  slim->SetItemString("itemID", new PyLong(m_self->itemID()));
494  slim->SetItemString("typeID", new PyInt(m_self->typeID()));
495  slim->SetItemString("ownerID", new PyInt(m_ownerID));
496  slim->SetItemString("corpID", IsCorp(m_corpID) ? new PyInt(m_corpID) : PyStatic.NewNone());
497  slim->SetItemString("allianceID", IsAlliance(m_allyID) ? new PyInt(m_allyID) : PyStatic.NewNone());
498  slim->SetItemString("warFactionID", IsFaction(m_warID) ? new PyInt(m_warID) : PyStatic.NewNone());
499  slim->SetItemString("numLaunchers", PyStatic.NewOne());
500  slim->SetItemString("sourceModuleID", m_moduleRef.get() != nullptr? new PyInt(m_moduleRef->itemID()): PyStatic.NewNone());
501  slim->SetItemString("securityStatus", new PyFloat(m_secStatus));
502  return slim;
503 }
#define _log(type, fmt,...)
Definition: logsys.h:124
Python's dictionary.
Definition: PyRep.h:719
uint32 m_ownerID
Definition: SystemEntity.h:283
Python floating point number.
Definition: PyRep.h:292
float m_secStatus
Definition: Probes.h:167
InventoryItemRef m_self
Definition: SystemEntity.h:269
uint32 m_corpID
Definition: SystemEntity.h:281
Python integer.
Definition: PyRep.h:231
#define PyStatic
Definition: PyRep.h:1209
X * get() const
Definition: RefPtr.h:213
const char * GetName() const
Definition: SystemEntity.h:210
#define IsCorp(itemID)
Definition: EVE_Defines.h:234
InventoryItemRef m_moduleRef
Definition: Probes.h:153
#define IsFaction(itemID)
Definition: EVE_Defines.h:250
#define IsAlliance(itemID)
Definition: EVE_Defines.h:244
uint16 typeID() const
uint32 itemID() const
Definition: InventoryItem.h:98
Python long integer.
Definition: PyRep.h:261

Here is the call graph for this function:

bool ProbeSE::ProcessTic ( )
virtual

Reimplemented from SystemEntity.

Definition at line 249 of file Probes.cpp.

References _log, Timer::Check(), SystemEntity::Delete(), Timer::Disable(), Timer::Enabled(), flagCargoHold, RefPtr< X >::get(), GetStateName(), Probe::State::Idle, IsMoving(), InventoryItem::itemID(), m_destination, m_lifeTimer, m_returnTimer, SystemEntity::m_self, m_shipRef, m_state, m_stateTimer, InventoryItem::MergeTypesInCargo(), RemoveProbe(), SendStateChange(), SendWarpEnd(), InventoryItem::SetPosition(), and Probe::State::Warping.

250 {
251  if (m_lifeTimer.Check()) {
252  Delete();
253  delete(this);
254  // delete from entity map
255  return false;
256  }
257  if (m_returnTimer.Enabled())
258  if (m_returnTimer.Check()) {
260  _log(SCAN__INFO, "ProbeSE::Process() return timer hit for probeID %u", m_self->itemID());
262  SendWarpEnd();
263  RemoveProbe();
265  delete(this);
266  // delete from entity map
267  return false;
268  }
269  if (m_stateTimer.Enabled())
270  if (m_stateTimer.Check()) {
272  _log(SCAN__INFO, "ProbeSE::Process() state timer hit for probeID %u state: %s", \
274  if (IsMoving())
277  SendWarpEnd();
279  }
280  return true;
281 }
GPoint m_destination
Definition: Probes.h:150
void RemoveProbe()
Definition: Probes.cpp:384
#define _log(type, fmt,...)
Definition: logsys.h:124
void Disable()
Definition: timer.h:39
void SetPosition(const GPoint &pos)
Timer m_returnTimer
Definition: Probes.h:144
virtual void Delete()
InventoryItemRef m_self
Definition: SystemEntity.h:269
bool Enabled() const
Definition: timer.h:41
Timer m_stateTimer
Definition: Probes.h:145
bool Check(bool reset=true)
Definition: timer.cpp:62
X * get() const
Definition: RefPtr.h:213
void SendStateChange(uint8 state)
Definition: Probes.cpp:369
ShipItemRef m_shipRef
Definition: Probes.h:152
const char * GetStateName(uint8 state)
Definition: Probes.cpp:449
uint8 m_state
Definition: Probes.h:159
void SendWarpEnd()
Definition: Probes.cpp:438
void MergeTypesInCargo(ShipItem *pShip, EVEItemFlags flag=flagNone)
uint32 itemID() const
Definition: InventoryItem.h:98
Timer m_lifeTimer
Definition: Probes.h:143
bool IsMoving()
Definition: Probes.cpp:283

Here is the call graph for this function:

void ProbeSE::RecoverProbe ( PyList list)
Todo:
verify probe status and controller before adding to "recover success list"

Definition at line 324 of file Probes.cpp.

References _log, PyList::AddItem(), AttrMaxVelocity, AttrWarpSpeedMultiplier, BUBBLE_RADIUS_METERS, Ga::GaVec3::distance(), EvilNumber::get_float(), EvilNumber::get_uint32(), InventoryItem::GetAttribute(), SystemEntity::GetID(), SystemEntity::GetPosition(), InventoryItem::itemID(), m_client, m_destination, m_returnTimer, SystemEntity::m_self, m_shipRef, EvE::max(), ONE_AU_IN_METERS, InventoryItem::position(), Probe::State::Returning, SendStateChange(), and Timer::Start().

325 {
326  if (m_client == nullptr)
327  return;
328  m_destination = m_shipRef->position() + 250;
329  float time(1), dist = GetPosition().distance(m_destination);
330  if (dist > BUBBLE_RADIUS_METERS){
332  time = EvE::max(dist / wsm, 1);
333  //SendWarpStart(time);
334  } else {
336  time = EvE::max(dist / mv, 1);
337  }
338 
340  // add to list if still controlled by player
341  list->AddItem(new PyInt(m_self->itemID()));
342  m_returnTimer.Start(time * 1000);
344  _log(SCAN__TRACE, "ProbeSE::RecoverProbe() Probe %u returning. Return time is %.2fs", \
345  GetID(), time);
346 }
GPoint m_destination
Definition: Probes.h:150
#define _log(type, fmt,...)
Definition: logsys.h:124
const GPoint & position() const
const GPoint & GetPosition() const
Definition: SystemEntity.h:211
Timer m_returnTimer
Definition: Probes.h:144
void AddItem(PyRep *i)
Definition: PyRep.h:701
InventoryItemRef m_self
Definition: SystemEntity.h:269
uint32 get_uint32()
Definition: EvilNumber.cpp:173
Python integer.
Definition: PyRep.h:231
uint32 GetID()
Definition: SystemEntity.h:207
void SendStateChange(uint8 state)
Definition: Probes.cpp:369
Client * m_client
Definition: Probes.h:148
unsigned __int32 uint32
Definition: eve-compat.h:50
ShipItemRef m_shipRef
Definition: Probes.h:152
int64 max(int64 x, int64 y=0)
Definition: misc.h:103
EvilNumber GetAttribute(const uint16 attrID) const
float get_float()
Definition: EvilNumber.cpp:184
GaExpInl GaFloat distance(const GaVec3 &oth) const
Definition: GaTypes.h:158
uint32 itemID() const
Definition: InventoryItem.h:98
static const int64 ONE_AU_IN_METERS
Definition: EVE_Consts.h:40
void Start(uint32 setTimerTime=0, bool changeResetTimer=true)
Definition: timer.cpp:81
static const float BUBBLE_RADIUS_METERS
Definition: BubbleManager.h:32

Here is the call graph for this function:

void ProbeSE::RemoveProbe ( )

Definition at line 384 of file Probes.cpp.

References InventoryItem::itemID(), m_client, m_scan, SystemEntity::m_self, SystemEntity::m_system, NULL_ORIGIN(), SystemManager::RemoveEntity(), Scan::RemoveProbe(), Client::SendNotification(), sEntityList, PyTuple::SetItem(), and InventoryItem::SetPosition().

Referenced by ProcessTic().

385 {
386  // remove from scan map, but check for abandoned probes (no scan)
387  if (m_scan != nullptr) {
388  m_scan->RemoveProbe(this);
389  m_scan = nullptr;
390  }
391  // remove from system
392  m_system->RemoveEntity(this);
393  // set item loc to null
395  // remove from entity list
396  sEntityList.RemoveProbe(m_self->itemID());
397 
398  if (m_client == nullptr)
399  return;
400  PyTuple* ev = new PyTuple(1);
401  ev->SetItem(0, new PyLong(m_self->itemID()));
402  m_client->SendNotification("OnRemoveProbe", "clientID", &ev); // this is sequenced
403 }
void SendNotification(const PyAddress &dest, EVENotificationStream &noti, bool seq=true)
Definition: Client.cpp:2245
void RemoveProbe(ProbeSE *pProbe)
Definition: Scan.cpp:51
#define sEntityList
Definition: EntityList.h:208
void SetPosition(const GPoint &pos)
Python tuple.
Definition: PyRep.h:567
InventoryItemRef m_self
Definition: SystemEntity.h:269
void SetItem(size_t index, PyRep *object)
Stores Python object.
Definition: PyRep.h:610
static const GPoint NULL_ORIGIN(0, 0, 0)
void RemoveEntity(SystemEntity *pSE)
SystemManager * m_system
Definition: SystemEntity.h:263
Client * m_client
Definition: Probes.h:148
Scan * m_scan
Definition: Probes.h:147
uint32 itemID() const
Definition: InventoryItem.h:98
Python long integer.
Definition: PyRep.h:261

Here is the call graph for this function:

Here is the caller graph for this function:

void ProbeSE::RemoveScan ( )
inline

Definition at line 105 of file Probes.h.

References m_scan.

105 { m_scan = nullptr; }
Scan * m_scan
Definition: Probes.h:147
void ProbeSE::SendNewProbe ( )

Definition at line 348 of file Probes.cpp.

References SystemEntity::GetPosition(), InventoryItem::itemID(), m_client, m_expiry, m_scanRange, SystemEntity::m_self, Client::SendNotification(), PyTuple::SetItem(), PyDict::SetItemString(), InventoryItem::typeID(), Ga::GaVec3::x, Ga::GaVec3::y, and Ga::GaVec3::z.

Referenced by ActiveModule::LaunchProbe().

349 {
350  ScanResultPos ssr_oed;
351  ssr_oed.x = GetPosition().x;
352  ssr_oed.y = GetPosition().y;
353  ssr_oed.z = GetPosition().z;
354  PyToken* token = new PyToken("foo.Vector3");
355  PyTuple* oed_tuple = new PyTuple(2);
356  oed_tuple->SetItem(0, token);
357  oed_tuple->SetItem(1, ssr_oed.Encode());
358  PyDict* newProbe = new PyDict();
359  newProbe->SetItemString("probeID", new PyLong(m_self->itemID()));
360  newProbe->SetItemString("typeID", new PyInt(m_self->typeID()));
361  newProbe->SetItemString("scanRange", new PyFloat(m_scanRange));
362  newProbe->SetItemString("expiry", new PyLong(m_expiry));
363  newProbe->SetItemString("pos", new PyObjectEx(false, oed_tuple));
364  PyTuple* ev = new PyTuple(1);
365  ev->SetItem(0, new PyObject("util.KeyVal", newProbe));
366  m_client->SendNotification("OnNewProbe", "clientID", &ev); // this is sequenced
367 }
int64 m_expiry
Definition: Probes.h:165
void SendNotification(const PyAddress &dest, EVENotificationStream &noti, bool seq=true)
Definition: Client.cpp:2245
Python's dictionary.
Definition: PyRep.h:719
Python floating point number.
Definition: PyRep.h:292
Python tuple.
Definition: PyRep.h:567
GaFloat x
Definition: GaTypes.h:207
const GPoint & GetPosition() const
Definition: SystemEntity.h:211
InventoryItemRef m_self
Definition: SystemEntity.h:269
Python extended object.
Definition: PyRep.h:861
Python object.
Definition: PyRep.h:826
void SetItem(size_t index, PyRep *object)
Stores Python object.
Definition: PyRep.h:610
Python integer.
Definition: PyRep.h:231
Client * m_client
Definition: Probes.h:148
Python token (eg. class name).
Definition: PyRep.h:522
GaFloat y
Definition: GaTypes.h:207
float m_scanRange
Definition: Probes.h:168
uint16 typeID() const
GaFloat z
Definition: GaTypes.h:207
uint32 itemID() const
Definition: InventoryItem.h:98
void SetItemString(const char *key, PyRep *value)
SetItemString adds or sets a database entry.
Definition: PyRep.h:812
Python long integer.
Definition: PyRep.h:261

Here is the call graph for this function:

Here is the caller graph for this function:

void ProbeSE::SendSlimChange ( )

Definition at line 513 of file Probes.cpp.

References InventoryItem::categoryID(), RefPtr< X >::get(), IsAlliance, IsCorp, IsFaction, InventoryItem::itemID(), SystemEntity::m_allyID, SystemEntity::m_corpID, SystemEntity::m_destiny, m_moduleRef, SystemEntity::m_ownerID, m_secStatus, SystemEntity::m_self, m_state, SystemEntity::m_warID, PyStatic, Probe::State::Returning, DestinyManager::SendSingleDestinyUpdate(), PyTuple::SetItem(), PyDict::SetItemString(), and InventoryItem::typeID().

514 {
515  PyDict* slim = new PyDict();
516  slim->SetItemString("itemID", new PyLong(m_self->itemID()));
517  slim->SetItemString("typeID", new PyInt(m_self->typeID()));
518  slim->SetItemString("categoryID", new PyInt(m_self->categoryID()));
519  slim->SetItemString("ownerID", new PyInt(m_ownerID));
520  slim->SetItemString("corpID", IsCorp(m_corpID) ? new PyInt(m_corpID) : PyStatic.NewNone());
521  slim->SetItemString("allianceID", IsAlliance(m_allyID) ? new PyInt(m_allyID) : PyStatic.NewNone());
522  slim->SetItemString("warFactionID", IsFaction(m_warID) ? new PyInt(m_warID) : PyStatic.NewNone());
523  slim->SetItemString("numLaunchers", PyStatic.NewOne());
524  slim->SetItemString("sourceModuleID", m_moduleRef.get() != nullptr? new PyInt(m_moduleRef->itemID()):PyStatic.NewNone());
525  slim->SetItemString("securityStatus", new PyFloat(m_secStatus));
526  slim->SetItemString("warpingAway", m_state == Probe::State::Returning ? PyStatic.NewFalse() : PyStatic.NewTrue()); // this is sent when probe warps
527  PyTuple* probeData = new PyTuple(2);
528  probeData->SetItem(0, new PyLong(m_self->itemID()));
529  probeData->SetItem(1, new PyObject("foo.SlimItem", slim));
530  PyTuple* updates = new PyTuple(2);
531  updates->SetItem(0, new PyString("OnSlimItemChange"));
532  updates->SetItem(1, probeData);
533  m_destiny->SendSingleDestinyUpdate(&updates, true);
534 }
Python string.
Definition: PyRep.h:430
DestinyManager * m_destiny
Definition: SystemEntity.h:265
Python's dictionary.
Definition: PyRep.h:719
uint32 m_ownerID
Definition: SystemEntity.h:283
Python floating point number.
Definition: PyRep.h:292
float m_secStatus
Definition: Probes.h:167
Python tuple.
Definition: PyRep.h:567
InventoryItemRef m_self
Definition: SystemEntity.h:269
Python object.
Definition: PyRep.h:826
uint32 m_corpID
Definition: SystemEntity.h:281
void SetItem(size_t index, PyRep *object)
Stores Python object.
Definition: PyRep.h:610
Python integer.
Definition: PyRep.h:231
#define PyStatic
Definition: PyRep.h:1209
X * get() const
Definition: RefPtr.h:213
void SendSingleDestinyUpdate(PyTuple **up, bool self_only=false) const
#define IsCorp(itemID)
Definition: EVE_Defines.h:234
InventoryItemRef m_moduleRef
Definition: Probes.h:153
#define IsFaction(itemID)
Definition: EVE_Defines.h:250
uint8 m_state
Definition: Probes.h:159
#define IsAlliance(itemID)
Definition: EVE_Defines.h:244
uint16 typeID() const
uint8 categoryID() const
uint32 itemID() const
Definition: InventoryItem.h:98
void SetItemString(const char *key, PyRep *value)
SetItemString adds or sets a database entry.
Definition: PyRep.h:812
Python long integer.
Definition: PyRep.h:261

Here is the call graph for this function:

void ProbeSE::SendStateChange ( uint8  state)

Definition at line 369 of file Probes.cpp.

References _log, SystemEntity::GetID(), GetStateName(), InventoryItem::itemID(), m_client, SystemEntity::m_self, m_state, Client::SendNotification(), PyTuple::SetItem(), and state.

Referenced by ProcessTic(), RecoverProbe(), and UpdateProbe().

370 {
371  if (m_state == state)
372  return;
373 
374  _log(SCAN__TRACE, "ProbeSE::SendStateChange() Probe %u changing state to %s.", GetID(), GetStateName(state));
375  m_state = state;
376  if (m_client == nullptr)
377  return;
378  PyTuple* tuple = new PyTuple(2);
379  tuple->SetItem(0, new PyLong(m_self->itemID()));
380  tuple->SetItem(1, new PyInt(state));
381  m_client->SendNotification("OnProbeStateChanged", "clientID", &tuple); // this is sequenced
382 }
void SendNotification(const PyAddress &dest, EVENotificationStream &noti, bool seq=true)
Definition: Client.cpp:2245
#define _log(type, fmt,...)
Definition: logsys.h:124
Python tuple.
Definition: PyRep.h:567
InventoryItemRef m_self
Definition: SystemEntity.h:269
void SetItem(size_t index, PyRep *object)
Stores Python object.
Definition: PyRep.h:610
Python integer.
Definition: PyRep.h:231
uint32 GetID()
Definition: SystemEntity.h:207
Client * m_client
Definition: Probes.h:148
const char * GetStateName(uint8 state)
Definition: Probes.cpp:449
uint8 m_state
Definition: Probes.h:159
entityID heal the character with the entityID note giving you detailed ship status information gives a list of all dynamic entities and players and their destinyState in this bubble shows some current destiny variables save all kick all and halt server immediate command list all items in current location s gives list of cargo contents and volumes in all holds list current session values show current ship DNA show current objects in their destiny state
uint32 itemID() const
Definition: InventoryItem.h:98
Python long integer.
Definition: PyRep.h:261

Here is the call graph for this function:

Here is the caller graph for this function:

void ProbeSE::SendWarpEnd ( )

Definition at line 438 of file Probes.cpp.

References InventoryItem::itemID(), m_client, m_destination, SystemEntity::m_self, sBubbleMgr, Client::SendNotification(), PyTuple::SetItem(), and InventoryItem::SetPosition().

Referenced by ProcessTic().

439 {
441  sBubbleMgr.Add(this);
442  if (m_client == nullptr)
443  return;
444  PyTuple* tuple = new PyTuple(1);
445  tuple->SetItem(0, new PyLong(m_self->itemID()));
446  m_client->SendNotification("OnProbeWarpEnd", "clientID", &tuple); // this is sequenced
447 }
GPoint m_destination
Definition: Probes.h:150
void SendNotification(const PyAddress &dest, EVENotificationStream &noti, bool seq=true)
Definition: Client.cpp:2245
void SetPosition(const GPoint &pos)
Python tuple.
Definition: PyRep.h:567
InventoryItemRef m_self
Definition: SystemEntity.h:269
void SetItem(size_t index, PyRep *object)
Stores Python object.
Definition: PyRep.h:610
Client * m_client
Definition: Probes.h:148
#define sBubbleMgr
uint32 itemID() const
Definition: InventoryItem.h:98
Python long integer.
Definition: PyRep.h:261

Here is the call graph for this function:

Here is the caller graph for this function:

void ProbeSE::SendWarpStart ( float  travelTime)

Definition at line 405 of file Probes.cpp.

References GetFileTimeNow(), InventoryItem::itemID(), SystemEntity::m_bubble, m_client, m_destination, SystemEntity::m_self, InventoryItem::position(), SystemBubble::Remove(), Client::SendNotification(), PyTuple::SetItem(), Ga::GaVec3::x, Ga::GaVec3::y, and Ga::GaVec3::z.

Referenced by UpdateProbe().

406 {
407  // remove from bubble
408  m_bubble->Remove(this);
409 
410  PyToken* token = new PyToken("foo.Vector3");
411  ScanResultPos posFrom;
412  posFrom.x = m_self->position().x;
413  posFrom.y = m_self->position().y;
414  posFrom.z = m_self->position().z;
415  ScanResultPos posTo;
416  posTo.x = m_destination.x;
417  posTo.y = m_destination.y;
418  posTo.z = m_destination.z;
419  PyTuple* from = new PyTuple(2);
420  from->SetItem(0, token);
421  from->SetItem(1, posFrom.Encode());
422  PyTuple* to = new PyTuple(2);
423  to->SetItem(0, token);
424  to->SetItem(1, posTo.Encode());
425  // OnProbeWarpStart(self, probeID, fromPos, toPos, startTime, duration)
426  PyTuple* tuple = new PyTuple(5);
427  tuple->SetItem(0, new PyLong(m_self->itemID())); //probeID
428  tuple->SetItem(1, new PyObjectEx(false, from)); //from
429  tuple->SetItem(2, new PyObjectEx(false, to)); //to
430  tuple->SetItem(3, new PyLong(GetFileTimeNow())); //startTime
431  tuple->SetItem(4, new PyFloat(travelTime)); //duration in ms
432  m_client->SendNotification("OnProbeWarpStart", "clientID", &tuple); // this is sequenced
433 
434  // not sure if this will work right...slimItem is removed when probe warps out
435  //SendSlimChange();
436 }
GPoint m_destination
Definition: Probes.h:150
void SendNotification(const PyAddress &dest, EVENotificationStream &noti, bool seq=true)
Definition: Client.cpp:2245
const GPoint & position() const
Python floating point number.
Definition: PyRep.h:292
SystemBubble * m_bubble
Definition: SystemEntity.h:262
Python tuple.
Definition: PyRep.h:567
GaFloat x
Definition: GaTypes.h:207
InventoryItemRef m_self
Definition: SystemEntity.h:269
Python extended object.
Definition: PyRep.h:861
void SetItem(size_t index, PyRep *object)
Stores Python object.
Definition: PyRep.h:610
Client * m_client
Definition: Probes.h:148
Python token (eg. class name).
Definition: PyRep.h:522
GaFloat y
Definition: GaTypes.h:207
double GetFileTimeNow()
Definition: utils_time.cpp:84
void Remove(SystemEntity *pSE)
GaFloat z
Definition: GaTypes.h:207
uint32 itemID() const
Definition: InventoryItem.h:98
Python long integer.
Definition: PyRep.h:261

Here is the call graph for this function:

Here is the caller graph for this function:

void ProbeSE::SetRing ( bool  set = false)
inline

Definition at line 134 of file Probes.h.

References m_ring.

134 { m_ring = set; }
bool m_ring
Definition: Probes.h:156
void ProbeSE::SetScan ( Scan pScan)
inline

Definition at line 104 of file Probes.h.

References m_scan.

Referenced by Scan::AddProbe().

104 { m_scan = pScan; }
Scan * m_scan
Definition: Probes.h:147

Here is the caller graph for this function:

void ProbeSE::SetSphere ( bool  set = false)
inline

Definition at line 135 of file Probes.h.

References m_sphere.

135 { m_sphere = set; }
bool m_sphere
Definition: Probes.h:157
void ProbeSE::SetState ( uint8  state = Probe::State::Idle)
inline

Definition at line 110 of file Probes.h.

References m_state, and state.

110 { m_state = state; }
uint8 m_state
Definition: Probes.h:159
entityID heal the character with the entityID note giving you detailed ship status information gives a list of all dynamic entities and players and their destinyState in this bubble shows some current destiny variables save all kick all and halt server immediate command list all items in current location s gives list of cargo contents and volumes in all holds list current session values show current ship DNA show current objects in their destiny state
void ProbeSE::StartStateTimer ( uint16  time)
inline

Definition at line 106 of file Probes.h.

References m_stateTimer, and Timer::Start().

106 { m_stateTimer.Start(time); }
Timer m_stateTimer
Definition: Probes.h:145
void Start(uint32 setTimerTime=0, bool changeResetTimer=true)
Definition: timer.cpp:81

Here is the call graph for this function:

void ProbeSE::UpdateProbe ( ProbeData data)

Definition at line 299 of file Probes.cpp.

References _log, AttrMaxVelocity, AttrWarpSpeedMultiplier, BUBBLE_RADIUS_METERS, ProbeData::dest, Ga::GaVec3::distance(), EvilNumber::get_float(), EvilNumber::get_uint32(), InventoryItem::GetAttribute(), SystemEntity::GetID(), SystemEntity::GetPosition(), GetStateName(), m_destination, m_rangeStep, m_scanRange, SystemEntity::m_self, m_state, m_stateTimer, EvE::max(), Probe::State::Moving, ONE_AU_IN_METERS, ProbeData::rangeStep, ProbeData::scanRange, SendStateChange(), SendWarpStart(), Timer::Start(), and Probe::State::Warping.

300 {
301  m_scanRange = data.scanRange;
302  m_rangeStep = data.rangeStep;
303  m_destination = data.dest;
304 
305  float time(1), dist = GetPosition().distance(m_destination);
306  if (dist < 100) {
307  time = 0.5f;
308  } else if (dist > BUBBLE_RADIUS_METERS){
310  time = EvE::max(dist / wsm, 1);
312  SendWarpStart(time);
313  } else {
316  time = EvE::max(dist / mv, 1);
317  }
318 
319  m_stateTimer.Start(time *1000);
320  _log(SCAN__TRACE, "ProbeSE::UpdateProbe() id:%u, state: %s, scanRange: %.2f, step: %u, dist:%.2f, time: %.2f", \
321  GetID(), GetStateName(m_state), m_scanRange, m_rangeStep, dist, time );
322 }
GPoint m_destination
Definition: Probes.h:150
#define _log(type, fmt,...)
Definition: logsys.h:124
const GPoint & GetPosition() const
Definition: SystemEntity.h:211
InventoryItemRef m_self
Definition: SystemEntity.h:269
uint32 get_uint32()
Definition: EvilNumber.cpp:173
Timer m_stateTimer
Definition: Probes.h:145
uint32 GetID()
Definition: SystemEntity.h:207
void SendStateChange(uint8 state)
Definition: Probes.cpp:369
uint8 m_rangeStep
Definition: Probes.h:160
unsigned __int32 uint32
Definition: eve-compat.h:50
uint8 rangeStep
float m_scanRange
Definition: Probes.h:168
int64 max(int64 x, int64 y=0)
Definition: misc.h:103
EvilNumber GetAttribute(const uint16 attrID) const
const char * GetStateName(uint8 state)
Definition: Probes.cpp:449
uint8 m_state
Definition: Probes.h:159
float get_float()
Definition: EvilNumber.cpp:184
void SendWarpStart(float travelTime)
Definition: Probes.cpp:405
GaExpInl GaFloat distance(const GaVec3 &oth) const
Definition: GaTypes.h:158
float scanRange
static const int64 ONE_AU_IN_METERS
Definition: EVE_Consts.h:40
void Start(uint32 setTimerTime=0, bool changeResetTimer=true)
Definition: timer.cpp:81
static const float BUBBLE_RADIUS_METERS
Definition: BubbleManager.h:32

Here is the call graph for this function:

Member Data Documentation

uint32 ProbeSE::m_baseScanRange
private

Definition at line 163 of file Probes.h.

Referenced by GetRangeModifier(), and ProbeSE().

Client* ProbeSE::m_client
private
GPoint ProbeSE::m_destination
private
int64 ProbeSE::m_expiry
private

Definition at line 165 of file Probes.h.

Referenced by GetExpiryTime(), ProbeSE(), and SendNewProbe().

Timer ProbeSE::m_lifeTimer
private

Definition at line 143 of file Probes.h.

Referenced by ProbeSE(), and ProcessTic().

InventoryItemRef ProbeSE::m_moduleRef
private

Definition at line 153 of file Probes.h.

Referenced by MakeSlimItem(), and SendSlimChange().

uint8 ProbeSE::m_rangeFactor
private

Definition at line 161 of file Probes.h.

Referenced by GetRangeModifier(), and ProbeSE().

uint8 ProbeSE::m_rangeStep
private

Definition at line 160 of file Probes.h.

Referenced by GetRangeModifier(), GetRangeStep(), GetScanStrength(), and UpdateProbe().

Timer ProbeSE::m_returnTimer
private

Definition at line 144 of file Probes.h.

Referenced by ProcessTic(), and RecoverProbe().

bool ProbeSE::m_ring
private

Definition at line 156 of file Probes.h.

Referenced by IsRing(), and SetRing().

Scan* ProbeSE::m_scan
private

Definition at line 147 of file Probes.h.

Referenced by RemoveProbe(), RemoveScan(), SetScan(), and ~ProbeSE().

float ProbeSE::m_scanDeviation
private

Definition at line 170 of file Probes.h.

Referenced by GetDeviation(), and ProbeSE().

float ProbeSE::m_scanRange
private

Definition at line 168 of file Probes.h.

Referenced by GetDeviation(), GetScanRange(), SendNewProbe(), and UpdateProbe().

bool ProbeSE::m_scanShips
private

Definition at line 155 of file Probes.h.

Referenced by CanScanShips(), and ProbeSE().

float ProbeSE::m_scanStrength
private

Definition at line 169 of file Probes.h.

Referenced by GetScanStrength(), and ProbeSE().

float ProbeSE::m_secStatus
private

Definition at line 167 of file Probes.h.

Referenced by MakeSlimItem(), ProbeSE(), and SendSlimChange().

ShipItemRef ProbeSE::m_shipRef
private

Definition at line 152 of file Probes.h.

Referenced by ProcessTic(), and RecoverProbe().

bool ProbeSE::m_sphere
private

Definition at line 157 of file Probes.h.

Referenced by IsSphere(), and SetSphere().

uint8 ProbeSE::m_state
private
Timer ProbeSE::m_stateTimer
private

Definition at line 145 of file Probes.h.

Referenced by GetMoveTime(), ProcessTic(), StartStateTimer(), and UpdateProbe().


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