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

#include "Prospector.h"

Inheritance diagram for Prospector:
Collaboration diagram for Prospector:

Public Member Functions

virtual ~Prospector ()
 
virtual ProspectorGetProspectModule ()
 
virtual bool IsProspectModule () const
 
virtual bool IsSuccess ()
 
void TargetDestroyed ()
 
- Public Member Functions inherited from ActiveModule
virtual ~ActiveModule ()
 
virtual ActiveModuleGetActiveModule ()
 
virtual bool IsActiveModule () const
 
virtual void ApplyDamage ()
 
virtual uint16 GetReloadTime ()
 
virtual uint32 GetTargetID ()
 
SystemEntityGetTargetSE ()
 
 ActiveModule (ModuleItemRef mRef, ShipItemRef sRef)
 
virtual void Process ()
 
virtual void LoadCharge (InventoryItemRef charge)
 
virtual void UnloadCharge ()
 
virtual void Overload ()
 
virtual void AbortCycle ()
 
virtual void DeOverload ()
 
virtual void Deactivate (std::string effect="")
 
virtual void DeactivateCycle (bool abort=false)
 
virtual void RemoveTarget (SystemEntity *pSE)
 
virtual void ReprocessCharge ()
 
void LaunchProbe ()
 
void LaunchMissile ()
 
void LaunchSnowBall ()
 
void ApplyEffect (int8 state, bool active=false)
 
void ShowEffect (bool active=false, bool abort=false)
 
- Public Member Functions inherited from GenericModule
ModuleItemRef GetSelf ()
 
ShipItemRef GetShipRef ()
 
void Repair ()
 
bool HasAttribute (uint32 attrID)
 
void SetAttribute (uint32 attrID, EvilNumber val, bool update=true)
 
void ResetAttribute (uint32 attrID)
 
EvilNumber GetAttribute (uint32 attrID)
 
bool isWarpSafe ()
 
bool isTurretFitted ()
 
bool isLauncherFitted ()
 
virtual PassiveModuleGetPassiveModule ()
 
virtual MiningLaserGetMiningModule ()
 
virtual TurretModuleGetTurretModule ()
 
virtual SuperWeaponGetSuperWeapon ()
 
virtual RigModuleGetRigModule ()
 
virtual SubSystemModuleGetSubSystemModule ()
 
virtual CynoModuleGetCynoModule ()
 
virtual bool IsGenericModule () const
 
virtual bool IsPassiveModule () const
 
virtual bool IsMiningLaser () const
 
virtual bool IsCynoModule () const
 
virtual bool IsRigModule () const
 
virtual bool IsSubSystemModule () const
 
bool IsLoaded ()
 
bool IsTurretModule ()
 
bool IsLauncherModule ()
 
bool IsOverloaded ()
 
bool IsLinked ()
 
bool IsMaster ()
 
bool IsDamaged ()
 
bool IsActive ()
 
bool IsLoading ()
 
bool isOnline ()
 
bool isLowPower ()
 
bool isHighPower ()
 
bool isMediumPower ()
 
bool isRig ()
 
bool isSubSystem ()
 
uint32 itemID ()
 
uint32 typeID ()
 
uint32 groupID ()
 
EVEItemFlags flag ()
 
void SetChargeRef (InventoryItemRef iRef)
 
void SetModuleState (int8 state)
 
void SetChargeState (int8 state)
 
void SetLinked (bool set=false)
 
void SetLinkMaster (bool set=false)
 
int8 GetModuleState ()
 
int8 GetChargeState ()
 
InventoryItemRef GetLoadedChargeRef ()
 
virtual void ReloadCharge ()
 
virtual void RemoveRig ()
 
virtual void DestroyRig ()
 
 GenericModule (ModuleItemRef mRef, ShipItemRef sRef)
 
virtual ~GenericModule ()
 
void Online ()
 
void Offline ()
 
void ProcessEffects (int8 state, bool active=false)
 
void Repair (EvilNumber amount)
 
int8 GetModulePowerLevel ()
 

Protected Attributes

bool m_success:1
 
bool m_firstRun:1
 
bool m_salvager:1
 
bool m_dataMiner:1
 
int8 m_accessChance
 
- Protected Attributes inherited from ActiveModule
SystemBubblem_bubble
 
SystemEntitym_targetSE
 
DestinyManagerm_destinyMgr
 
SystemManagerm_sysMgr
 
TargetManagerm_targMgr
 
uint16 m_reloadTime
 
uint16 m_effectID
 
uint32 m_targetID
 
bool m_Stop:1
 
bool m_usesCharge:1
 
bool m_needsCharge:1
 
bool m_needsTarget:1
 
- Protected Attributes inherited from GenericModule
ModuleItemRef m_modRef
 
ShipItemRef m_shipRef
 
InventoryItemRef m_chargeRef
 
int8 m_ModuleState
 
int8 m_ChargeState
 
int16 m_repeat
 
bool m_linkMaster:1
 
bool m_linked:1
 
bool m_isWarpSafe:1
 
bool m_hiPower:1
 
bool m_medPower:1
 
bool m_loPower:1
 
bool m_rigSlot:1
 
bool m_subSystem:1
 
bool m_launcher:1
 
bool m_turret:1
 
bool m_overLoaded:1
 
bool m_chargeLoaded:1
 

Private Attributes

CharacterpChar
 
EVEItemFlags m_holdFlag
 

Prospector.cpp

prospector module class (salvage, hacking, data mining) : Allan

Date
: 11 August 2016 -UD/RW 12 April 2017 -UD/RW 10 February 2018
 Prospector (ModuleItemRef mRef, ShipItemRef sRef)
 
virtual void Update ()
 
virtual void Activate (uint16 effectID, uint32 targetID=0, int16 repeat=0)
 
uint32 DoCycle ()
 
virtual bool CanActivate ()
 
void SendFailure ()
 
void CheckSuccess ()
 
void DropSalvage ()
 
void DropItems ()
 

Additional Inherited Members

- Protected Member Functions inherited from ActiveModule
uint32 GetRemainingCycleTimeMS ()
 
void StopTimer ()
 
void Clear ()
 
void ProcessActiveCycle ()
 
void UpdateCharge (uint16 attrID, uint16 testAttrID, uint16 srcAttrID, InventoryItemRef iRef)
 
void UpdateDamage (uint16 attrID, uint16 srcAttrID, InventoryItemRef iRef)
 
void SetSlaveData (ShipSE *pShip)
 
void ConsumeCharge ()
 
void SetTimer (uint32 time)
 
- Protected Member Functions inherited from GenericModule
const char * GetModuleStateName (int8 state)
 

Detailed Description

Definition at line 15 of file Prospector.h.

Constructor & Destructor Documentation

Prospector::Prospector ( ModuleItemRef  mRef,
ShipItemRef  sRef 
)

Definition at line 18 of file Prospector.cpp.

References AttrDuration, AttrSalvageHoldCapacity, EVEDB::invGroups::Data_Miner, flagCargoHold, flagSalvageHold, RefPtr< X >::get(), EvilNumber::get_float(), GenericModule::GetAttribute(), Client::GetChar(), ShipItem::GetPilot(), Character::GetSkillLevel(), InventoryItem::groupID(), InventoryItem::HasAttribute(), ShipItem::HasPilot(), m_accessChance, m_dataMiner, m_firstRun, m_holdFlag, GenericModule::m_modRef, m_salvager, GenericModule::m_shipRef, m_success, pChar, EVEDB::invGroups::Salvager, GenericModule::SetAttribute(), and EvESkill::Survey.

19 : ActiveModule(mRef, sRef)
20 {
21  m_success = false;
22  m_firstRun = true;
23  m_salvager = false;
24  m_dataMiner = false;
25 
27  m_salvager = true;
29  m_dataMiner = true;
30  }
31 
32  m_accessChance = 0;
33 
37 
38  if (!m_shipRef->HasPilot())
39  return;
40 
42 
43  // increase scan speed by level of survey skill
44  float cycleTime = GetAttribute(AttrDuration).get_float();
45  cycleTime *= (1 + (0.03f * (pChar->GetSkillLevel(EvESkill::Survey, true))));
46  SetAttribute(AttrDuration, cycleTime);
47 }
Character * pChar
Definition: Prospector.h:52
bool HasAttribute(const uint16 attrID) const
ActiveModule(ModuleItemRef mRef, ShipItemRef sRef)
virtual bool HasPilot()
Definition: Ship.h:71
bool m_dataMiner
Definition: Prospector.h:47
CharacterRef GetChar() const
Definition: Client.h:164
void SetAttribute(uint32 attrID, EvilNumber val, bool update=true)
Definition: GenericModule.h:51
ModuleItemRef m_modRef
uint16 groupID() const
ShipItemRef m_shipRef
bool m_salvager
Definition: Prospector.h:46
bool m_firstRun
Definition: Prospector.h:45
X * get() const
Definition: RefPtr.h:213
EVEItemFlags m_holdFlag
Definition: Prospector.h:54
virtual Client * GetPilot()
Definition: Ship.h:72
int8 GetSkillLevel(uint16 skillTypeID, bool zeroForNotInjected=true) const
Definition: Character.cpp:575
float get_float()
Definition: EvilNumber.cpp:184
EvilNumber GetAttribute(uint32 attrID)
Definition: GenericModule.h:53
int8 m_accessChance
Definition: Prospector.h:49
bool m_success
Definition: Prospector.h:44

Here is the call graph for this function:

virtual Prospector::~Prospector ( )
inlinevirtual

Definition at line 19 of file Prospector.h.

19 { /* do nothing here */ }

Member Function Documentation

void Prospector::Activate ( uint16  effectID,
uint32  targetID = 0,
int16  repeat = 0 
)
virtual

Reimplemented from ActiveModule.

Definition at line 64 of file Prospector.cpp.

References ActiveModule::Activate(), AttrAccessDifficulty, ActiveModule::Deactivate(), EvilNumber::get_int(), InventoryItem::GetAttribute(), SystemEntity::GetSelf(), m_accessChance, m_firstRun, ActiveModule::m_needsTarget, m_success, and ActiveModule::m_targetSE.

65 {
66  // reset for each activation MUST reset BEFORE ActiveModule::Activate() is called.....it calls salvage check.
67  m_success = false;
68  m_firstRun = true;
69 
70  ActiveModule::Activate(effectID, targetID, repeat);
71 
72  if (!m_needsTarget or (m_targetSE == nullptr)) {
74  return;
75  }
77  // are there any modifiers for access here?
78  // are rigs/skills added to module access chance?
79 }
SystemEntity * m_targetSE
Definition: ActiveModule.h:78
InventoryItemRef GetSelf()
Definition: SystemEntity.h:202
bool m_firstRun
Definition: Prospector.h:45
int64 get_int()
Definition: EvilNumber.cpp:166
EvilNumber GetAttribute(const uint16 attrID) const
bool m_needsTarget
Definition: ActiveModule.h:107
virtual void Deactivate(std::string effect="")
int8 m_accessChance
Definition: Prospector.h:49
virtual void Activate(uint16 effectID, uint32 targetID=0, int16 repeat=0)
bool m_success
Definition: Prospector.h:44

Here is the call graph for this function:

bool Prospector::CanActivate ( )
virtual

Reimplemented from ActiveModule.

Definition at line 81 of file Prospector.cpp.

References ActiveModule::CanActivate(), SystemEntity::IsContainerSE(), SystemEntity::IsWreckSE(), m_dataMiner, m_salvager, and ActiveModule::m_targetSE.

82 {
83  if (m_salvager)
84  if (m_targetSE->IsWreckSE())
86  if (m_dataMiner)
89 
90  throw UserError ("DeniedActivateTargetModuleDisallowed");
91 }
bool m_dataMiner
Definition: Prospector.h:47
SystemEntity * m_targetSE
Definition: ActiveModule.h:78
bool m_salvager
Definition: Prospector.h:46
virtual bool IsContainerSE()
Definition: SystemEntity.h:157
Python object "ccp_exceptions.UserError".
Definition: PyExceptions.h:121
virtual bool CanActivate()
virtual bool IsWreckSE()
Definition: SystemEntity.h:188

Here is the call graph for this function:

void Prospector::CheckSuccess ( )
protected

Definition at line 148 of file Prospector.cpp.

References _log, AttrAccessDifficultyBonus, EvilNumber::get_int(), GenericModule::GetAttribute(), m_accessChance, m_success, and MakeRandomInt().

Referenced by DoCycle().

149 {
150  int8 chance = m_accessChance;
152 
153  uint8 roll = MakeRandomInt(0,100);
154  if (roll < chance)
155  m_success = true;
156 
157  _log(MODULE__DEBUG, "Prospector::CheckSuccess - chance: %i, roll: %u, success: %s", chance, roll, (m_success ? "true" : "false"));
158 }
unsigned __int8 uint8
Definition: eve-compat.h:46
#define _log(type, fmt,...)
Definition: logsys.h:124
signed __int8 int8
Definition: eve-compat.h:45
int64 get_int()
Definition: EvilNumber.cpp:166
int64 MakeRandomInt(int64 low, int64 high)
Generates random integer from interval [low; high].
Definition: misc.cpp:109
EvilNumber GetAttribute(uint32 attrID)
Definition: GenericModule.h:53
int8 m_accessChance
Definition: Prospector.h:49
bool m_success
Definition: Prospector.h:44

Here is the call graph for this function:

Here is the caller graph for this function:

uint32 Prospector::DoCycle ( )
virtual

Reimplemented from ActiveModule.

Definition at line 93 of file Prospector.cpp.

References _log, ActiveModule::AbortCycle(), CheckSuccess(), ActiveModule::DoCycle(), DropSalvage(), m_firstRun, m_success, and SendFailure().

94 {
95  if (m_firstRun) {
96  m_firstRun = false;
97  } else if (!m_success) {
98  SendFailure();
99  CheckSuccess();
100  } else if (m_success) {
101  DropSalvage();
102  AbortCycle();
103  return 0;
104  } else {
105  _log(MODULE__ERROR, "Prospector::DoCycle() hit end of conditional.");
106  }
107 
108  return ActiveModule::DoCycle();
109 }
#define _log(type, fmt,...)
Definition: logsys.h:124
void CheckSuccess()
Definition: Prospector.cpp:148
void DropSalvage()
Definition: Prospector.cpp:160
bool m_firstRun
Definition: Prospector.h:45
virtual void AbortCycle()
void SendFailure()
Definition: Prospector.cpp:129
virtual uint32 DoCycle()
bool m_success
Definition: Prospector.h:44

Here is the call graph for this function:

void Prospector::DropItems ( )
protected

Definition at line 243 of file Prospector.cpp.

244 {
245  // this will be for data miners and hacking/archaeology shit. dunno what all we'll need at this point.
246  // update StaticDataMgr for these items also.
247 }
void Prospector::DropSalvage ( )
protected

Definition at line 160 of file Prospector.cpp.

References _log, SystemManager::AddEntity(), FactionData::allianceID, FactionData::corporationID, InventoryItem::customInfo(), SystemEntity::DestinyMgr(), FactionData::factionID, flagNone, RefPtr< X >::get(), SystemEntity::GetAllianceID(), SystemEntity::GetCorporationID(), Inventory::GetInventoryMap(), InventoryItem::GetMyInventory(), ShipItem::GetPilot(), SystemEntity::GetPosition(), SystemEntity::GetSelf(), SystemEntity::GetServices(), SystemEntity::GetWarFactionID(), SystemEntity::GetWreckSE(), Inventory::IsEmpty(), IsEven(), InventoryItem::itemID(), locTemp, m_accessChance, m_holdFlag, GenericModule::m_shipRef, ActiveModule::m_sysMgr, ActiveModule::m_targetSE, MakeRandomInt(), InventoryItem::name(), InventoryItem::ownerID(), FactionData::ownerID, pChar, WreckSE::Salvaged(), sConfig, sDataMgr, DestinyManager::SendJettisonPacket(), Client::SendNotifyMsg(), Stat::shipsSalvaged, sItemFactory, and sStatMgr.

Referenced by DoCycle().

161 {
162  if (m_targetSE == nullptr)
163  return;
164 
165  std::vector<uint32> list;
166  list.clear();
167  sDataMgr.GetSalvage(atoi(m_targetSE->GetSelf()->customInfo().c_str()), list);
168 
169  if (!list.empty()) {
170  uint8 drop = 0;
171  switch (m_accessChance) { // drop qty * rate in config
172  case 30: drop = 1; break; // 1 to 3
173  case 20: drop = 2; break; // 2 to 6
174  case 10: drop = 3; break; // 3 to 9
175  case 0: drop = 4; break; // 4 to 12
176  case -10: drop = 5; break; // 5 to 15
177  case -20: drop = 6; break; // 6 to 18
178  }
179 
180  InventoryItemRef iRef(nullptr);
182  uint32 quantity = 0, minDrop = drop, maxDrop = (drop * sConfig.rates.DropSalvage);
183  for (auto cur : list) {
184  // each drop has 50/50 chance. may need to change this later. base on char's salvage skill?
185  if (IsEven(MakeRandomInt(0,10)))
186  continue;
187  quantity = (MakeRandomInt(minDrop, maxDrop));
188  ItemData iLoot(cur, pChar->itemID(), locTemp, flagNone, quantity);
189  iRef = sItemFactory.SpawnItem(iLoot);
190  if (iRef.get() == nullptr) // we'll get over it...continue
191  continue;
192  if (sInv->HasAvailableSpace(m_holdFlag, iRef)) {
193  //iRef->Move(m_shipRef->itemID(), m_holdFlag, true);
194  iRef->MergeTypesInCargo(m_shipRef.get(), m_holdFlag);
195  _log(MODULE__DEBUG, "Prospector::DropSalvage - dropped %u %s of %u/%u", quantity, iRef->name(), minDrop, maxDrop);
196  } else {
197  _log(MODULE__DEBUG, "Prospector::DropSalvage - %s's %s is full.", m_shipRef->name(), sDataMgr.GetFlagName(m_holdFlag));
198  m_shipRef->GetPilot()->SendNotifyMsg("Your %s is full. Remaining salvage is lost.", sDataMgr.GetFlagName(m_holdFlag));
199  break;
200  }
201  }
202  }
203 
204  if (!m_targetSE->GetSelf()->GetMyInventory()->IsEmpty()) {
205 
206  //{'FullPath': u'UI/Messages', 'messageID': 258062, 'label': u'SalvageTooMuchLootBody'}(u'You cannot salvage this wreck because it contains too much loot to fit into a single cargo container. <br>\r\nThe wreck contains <b>{[numeric]volume, useGrouping} m3</b> but can contain no more than <b>{[numeric]maxvolume, useGrouping} m3</b> to be salvageable.', None, {u'{[numeric]maxvolume, useGrouping}': {'conditionalValues': [], 'variableType': 9, 'propertyName': None, 'args': 32, 'kwargs': {}, 'variableName': 'maxvolume'}, u'{[numeric]volume, useGrouping}': {'conditionalValues': [], 'variableType': 9, 'propertyName': None, 'args': 32, 'kwargs': {}, 'variableName': 'volume'}})
207 
208  // tell wreck it's being salvaged, so do not broadcast slim updates...may no longer need this. jetcan set to initial location 0
210 
211  std::map<uint32, InventoryItemRef> shipLoot;
212  shipLoot.clear();
214 
215  // create new container
216  ItemData p_idata(23, // 23 = cargo container
217  m_targetSE->GetSelf()->ownerID(),
218  locTemp,
219  flagNone,
220  "Jettisoned Loot Container",
222 
223  CargoContainerRef jetCanRef = sItemFactory.SpawnCargoContainer(p_idata);
224  if (jetCanRef.get() != nullptr) {
225  for (auto cur : shipLoot)
226  cur.second->Move(jetCanRef->itemID(),flagNone);
227  FactionData data = FactionData();
231  data.ownerID = m_targetSE->GetSelf()->ownerID();
232  ContainerSE* cSE = new ContainerSE(jetCanRef, m_targetSE->GetServices(), m_sysMgr, data);
233  jetCanRef->SetMySE(cSE);
234  m_sysMgr->AddEntity(cSE);
236  }
237  }
238 
239  // add data to StatisticMgr
240  sStatMgr.Increment(Stat::shipsSalvaged);
241 }
#define sConfig
A macro for easier access to the singleton.
unsigned __int8 uint8
Definition: eve-compat.h:46
#define sStatMgr
Definition: StatisticMgr.h:68
void AddEntity(SystemEntity *pSE, bool addSignal=true)
Character * pChar
Definition: Prospector.h:52
#define _log(type, fmt,...)
Definition: logsys.h:124
uint32 ownerID() const
Definition: InventoryItem.h:99
void SendJettisonPacket() const
const std::string & customInfo() const
SystemManager * m_sysMgr
Definition: ActiveModule.h:80
const char * name()
void SendNotifyMsg(const char *fmt,...)
Definition: Client.cpp:2776
virtual WreckSE * GetWreckSE()
Definition: SystemEntity.h:108
const GPoint & GetPosition() const
Definition: SystemEntity.h:211
ShipItemRef m_shipRef
SystemEntity * m_targetSE
Definition: ActiveModule.h:78
DestinyManager * DestinyMgr()
Definition: SystemEntity.h:198
bool IsEven(int64 number)
Definition: misc.h:88
InventoryItemRef GetSelf()
Definition: SystemEntity.h:202
void Salvaged()
Definition: Container.h:262
int32 GetAllianceID()
Definition: SystemEntity.h:216
X * get() const
Definition: RefPtr.h:213
unsigned __int32 uint32
Definition: eve-compat.h:50
uint32 corporationID
EVEItemFlags m_holdFlag
Definition: Prospector.h:54
void GetInventoryMap(std::map< uint32, InventoryItemRef > &invMap)
Definition: Inventory.cpp:453
int64 MakeRandomInt(int64 low, int64 high)
Generates random integer from interval [low; high].
Definition: misc.cpp:109
PyServiceMgr & GetServices()
Definition: SystemEntity.h:194
uint32 GetCorporationID()
Definition: SystemEntity.h:218
virtual Client * GetPilot()
Definition: Ship.h:72
#define sItemFactory
Definition: ItemFactory.h:165
bool IsEmpty()
Definition: Inventory.h:55
Inventory * GetMyInventory()
Definition: InventoryItem.h:91
int8 m_accessChance
Definition: Prospector.h:49
uint32 itemID() const
Definition: InventoryItem.h:98
int32 GetWarFactionID()
Definition: SystemEntity.h:217
#define sDataMgr

Here is the call graph for this function:

Here is the caller graph for this function:

virtual Prospector* Prospector::GetProspectModule ( )
inlinevirtual

Reimplemented from GenericModule.

Definition at line 21 of file Prospector.h.

21 { return this; }
virtual bool Prospector::IsProspectModule ( ) const
inlinevirtual

Reimplemented from GenericModule.

Definition at line 22 of file Prospector.h.

22 { return true; }
virtual bool Prospector::IsSuccess ( )
inlinevirtual

Reimplemented from GenericModule.

Definition at line 33 of file Prospector.h.

References m_success.

33 { return m_success; }
bool m_success
Definition: Prospector.h:44
void Prospector::SendFailure ( )
protected

Definition at line 129 of file Prospector.cpp.

References ShipItem::GetPilot(), SystemEntity::GetTypeID(), m_dataMiner, m_salvager, GenericModule::m_shipRef, ActiveModule::m_targetSE, Client::QueueDestinyEvent(), PyTuple::SetItem(), and PyDict::SetItemString().

Referenced by DoCycle().

130 {
131  if (m_salvager) {
132  PyTuple* type = new PyTuple(2);
133  type->SetItem(0, new PyInt(4));
134  type->SetItem(1, new PyInt(m_targetSE->GetTypeID()));
135  PyDict* dict = new PyDict;
136  dict->SetItemString("type", type);
137  PyTuple* tup = new PyTuple(3);
138  tup->SetItem(0, new PyString("OnRemoteMessage"));
139  tup->SetItem(1, new PyString("SalvagingFailure"));
140  tup->SetItem(2, dict);
142  }
143  if (m_dataMiner) {
144  // not sure what client needs from this
145  }
146 }
Python string.
Definition: PyRep.h:430
Python's dictionary.
Definition: PyRep.h:719
void QueueDestinyEvent(PyTuple **multiEvent)
Definition: Client.cpp:2124
bool m_dataMiner
Definition: Prospector.h:47
Python tuple.
Definition: PyRep.h:567
ShipItemRef m_shipRef
SystemEntity * m_targetSE
Definition: ActiveModule.h:78
bool m_salvager
Definition: Prospector.h:46
void SetItem(size_t index, PyRep *object)
Stores Python object.
Definition: PyRep.h:610
Python integer.
Definition: PyRep.h:231
virtual Client * GetPilot()
Definition: Ship.h:72
uint16 GetTypeID()
Definition: SystemEntity.h:203
void SetItemString(const char *key, PyRep *value)
SetItemString adds or sets a database entry.
Definition: PyRep.h:812

Here is the call graph for this function:

Here is the caller graph for this function:

void Prospector::TargetDestroyed ( )
inline

Definition at line 36 of file Prospector.h.

References m_success.

Referenced by ActiveModule::Deactivate(), and TargetManager::Destroyed().

36 { m_success = false; }
bool m_success
Definition: Prospector.h:44

Here is the caller graph for this function:

void Prospector::Update ( )
virtual

Reimplemented from ActiveModule.

Definition at line 49 of file Prospector.cpp.

References AttrDuration, RefPtr< X >::get(), EvilNumber::get_float(), GenericModule::GetAttribute(), Client::GetChar(), ShipItem::GetPilot(), Character::GetSkillLevel(), ShipItem::HasPilot(), GenericModule::m_shipRef, pChar, GenericModule::SetAttribute(), EvESkill::Survey, and ActiveModule::Update().

50 {
51  if (!m_shipRef->HasPilot())
52  return;
53 
55 
56  // increase scan speed by level of survey skill
57  float cycleTime = GetAttribute(AttrDuration).get_float();
58  cycleTime *= (1 + (0.03f * (pChar->GetSkillLevel(EvESkill::Survey, true))));
59  SetAttribute(AttrDuration, cycleTime);
60 
62 }
Character * pChar
Definition: Prospector.h:52
virtual bool HasPilot()
Definition: Ship.h:71
CharacterRef GetChar() const
Definition: Client.h:164
void SetAttribute(uint32 attrID, EvilNumber val, bool update=true)
Definition: GenericModule.h:51
ShipItemRef m_shipRef
X * get() const
Definition: RefPtr.h:213
virtual void Update()
virtual Client * GetPilot()
Definition: Ship.h:72
int8 GetSkillLevel(uint16 skillTypeID, bool zeroForNotInjected=true) const
Definition: Character.cpp:575
float get_float()
Definition: EvilNumber.cpp:184
EvilNumber GetAttribute(uint32 attrID)
Definition: GenericModule.h:53

Here is the call graph for this function:

Member Data Documentation

int8 Prospector::m_accessChance
protected

Definition at line 49 of file Prospector.h.

Referenced by Activate(), CheckSuccess(), DropSalvage(), and Prospector().

bool Prospector::m_dataMiner
protected

Definition at line 47 of file Prospector.h.

Referenced by CanActivate(), Prospector(), and SendFailure().

bool Prospector::m_firstRun
protected

Definition at line 45 of file Prospector.h.

Referenced by Activate(), DoCycle(), and Prospector().

EVEItemFlags Prospector::m_holdFlag
private

Definition at line 54 of file Prospector.h.

Referenced by DropSalvage(), and Prospector().

bool Prospector::m_salvager
protected

Definition at line 46 of file Prospector.h.

Referenced by CanActivate(), Prospector(), and SendFailure().

bool Prospector::m_success
protected

Definition at line 44 of file Prospector.h.

Referenced by Activate(), CheckSuccess(), DoCycle(), IsSuccess(), Prospector(), and TargetDestroyed().

Character* Prospector::pChar
private

Definition at line 52 of file Prospector.h.

Referenced by DropSalvage(), Prospector(), and Update().


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