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

#include "Probes.h"

Inheritance diagram for ProbeItem:
Collaboration diagram for ProbeItem:

Public Member Functions

virtual ~ProbeItem ()
 
- Public Member Functions inherited from InventoryItem
 InventoryItem (uint32 _itemID, const ItemType &_type, const ItemData &_data)
 
 InventoryItem (const InventoryItem &oth)
 
 InventoryItem (InventoryItem &&oth) noexcept
 
InventoryItemoperator= (const InventoryItem &oth)=delete
 
InventoryItemoperator= (InventoryItem &&oth)=delete
 
virtual ~InventoryItem () noexcept
 
virtual ShipItemGetShipItem ()
 
virtual ModuleItemGetModuleItem ()
 
virtual bool IsShipItem ()
 
virtual bool IsModuleItem ()
 
virtual void Rename (std::string name)
 
InventoryGetMyInventory ()
 
bool contraband () const
 
bool isSingleton () const
 
int32 quantity () const
 
uint32 itemID () const
 
uint32 ownerID () const
 
uint32 locationID () const
 
EVEItemFlags flag () const
 
const GPointposition () const
 
const ItemTypetype () const
 
const std::string & itemName () const
 
const std::string & customInfo () const
 
const char * name ()
 
uint16 typeID () const
 
uint16 groupID () const
 
double radius () const
 
uint8 categoryID () const
 
bool isGlobal () const
 
bool IsOnline ()
 
void SetPosition (const GPoint &pos)
 
void SetCustomInfo (const char *ci)
 
void ChangeOwner (uint32 new_owner, bool notify=false)
 
void Move (uint32 new_location=locTemp, EVEItemFlags flag=flagNone, bool notify=false)
 
void Donate (uint32 new_owner=ownerSystem, uint32 new_location=locTemp, EVEItemFlags new_flag=flagNone, bool notify=true)
 
void SendItemChange (uint32 toID, std::map< int32, PyRep * > &changes)
 
void MergeTypesInCargo (ShipItem *pShip, EVEItemFlags flag=flagNone)
 
bool ChangeSingleton (bool singleton, bool notify=false)
 
bool AlterQuantity (int32 qty, bool notify=false)
 
bool SetQuantity (int32 qty, bool notify=false, bool deleteOnZero=true)
 
bool SetFlag (EVEItemFlags flag, bool notify=false)
 
void SetOwner (uint32 ownerID)
 
void SaveItem ()
 
void UpdateLocation ()
 
void UpdateLocation (uint32 locID)
 
virtual InventoryItemRef Split (int32 qty=0, bool notify=true, bool silent=false)
 
virtual bool Merge (InventoryItemRef to_merge, int32 qty=0, bool notify=true)
 
virtual void Relocate (uint32 locID=0, EVEItemFlags flag=flagNone)
 
virtual void AddItem (InventoryItemRef iRef)
 
virtual void RemoveItem (InventoryItemRef iRef)
 
double GetPackagedVolume ()
 
virtual void SetPlayer (Client *pClient)
 
virtual bool HasPilot ()
 
virtual ClientGetPilot ()
 
void ToVirtual (uint32 locationID)
 
virtual bool _Load ()
 
PyRepGetItem () const
 
void GetItemRow (PyPackedRow *into) const
 
void GetItemStatusRow (PyPackedRow *into) const
 
void GetChargeStatusRow (uint32 shipID, PyPackedRow *into) const
 
bool Populate (Rsp_CommonGetInfo_Entry &into)
 
PyListGetItemInfo () const
 
PyObjectItemGetInfo ()
 
PyPackedRowGetItemRow () const
 
PyPackedRowGetItemStatusRow () const
 
PyPackedRowGetChargeStatusRow (uint32 shipID) const
 
bool SkillCheck (InventoryItemRef refItem)
 
void ClearModifiers ()
 
void AddModifier (fxData &data)
 
void RemoveModifier (fxData &data)
 
void ResetAttributes ()
 
bool HasReqSkill (const uint16 skillID)
 
AttributeMapGetAttributeMap ()
 
int64 GetTimeStamp ()
 
void SetAttribute (uint16 attrID, int num, bool notify=true)
 
void SetAttribute (uint16 attrID, uint32 num, bool notify=true)
 
void SetAttribute (uint16 attrID, int64 num, bool notify=true)
 
void SetAttribute (uint16 attrID, float num, bool notify=true)
 
void SetAttribute (uint16 attrID, double num, bool notify=true)
 
void SetAttribute (uint16 attrID, EvilNumber num, bool notify=true)
 
void MultiplyAttribute (uint16 attrID, EvilNumber num, bool notify=false)
 
bool HasAttribute (const uint16 attrID) const
 
bool HasAttribute (const uint16 attrID, EvilNumber &value) const
 
bool SaveAttributes ()
 
void ResetAttribute (uint16 attrID, bool notify=false)
 
void DeleteAttribute (uint16 attrID)
 
EvilNumber GetAttribute (const uint16 attrID) const
 
EvilNumber GetDefaultAttribute (const uint16 attrID) const
 
- Public Member Functions inherited from RefObject
 RefObject (size_t initRefCount)
 Initializes reference count. More...
 
virtual ~RefObject ()
 Destructor; must be virtual. More...
 
size_t GetCount ()
 

Static Protected Member Functions

template<class _Ty >
static RefPtr< _Ty > _LoadItem (uint32 itemID, const ItemType &type, const ItemData &data)
 
- Static Protected Member Functions inherited from InventoryItem
template<class _Ty >
static RefPtr< _Ty > Load (uint32 itemID)
 
template<class _Ty >
static RefPtr< _Ty > _Load (uint32 itemID)
 
template<class _Ty >
static RefPtr< _Ty > _LoadItem (uint32 itemID, const ItemType &type, const ItemData &data)
 

Friends

class InventoryItem
 

ProbeItems.cpp

Probe Item/SE class for EVEmu

: Allan

Date
: 10 March 2018
 ProbeItem (uint32 itemID, const ItemType &_type, const ItemData &_data)
 
virtual void Delete ()
 
static ProbeItemRef Load (uint32 itemID)
 
static ProbeItemRef Spawn (ItemData &data)
 
static uint32 CreateItemID (ItemData &data)
 

Additional Inherited Members

- Static Public Member Functions inherited from InventoryItem
static uint32 CreateItemID (ItemData &data)
 
static uint32 CreateTempItemID (ItemData &data)
 
static InventoryItemRef Load (uint32 itemID)
 
static InventoryItemRef SpawnItem (uint32 itemID, const ItemData &data)
 
static InventoryItemRef Spawn (ItemData &data)
 
static InventoryItemRef SpawnTemp (ItemData &data)
 
- Public Attributes inherited from InventoryItem
std::multimap< int8, fxDatam_modifiers
 
- Protected Member Functions inherited from RefObject
void IncRef () const
 Increments reference count of object by one. More...
 
void DecRef () const
 Decrements reference count of object by one. More...
 
- Protected Attributes inherited from InventoryItem
InventorypInventory
 
uint32 m_itemID
 
AttributeMappAttributeMap
 
- Protected Attributes inherited from RefObject
size_t mRefCount
 Reference count of instance. More...
 
bool mDeleted
 

Detailed Description

InventoryItem for probe object.

Definition at line 24 of file Probes.h.

Constructor & Destructor Documentation

ProbeItem::ProbeItem ( uint32  itemID,
const ItemType _type,
const ItemData _data 
)

Definition at line 31 of file Probes.cpp.

Referenced by _LoadItem().

32 : InventoryItem(itemID, _type, _data)
33 {
34 
35 }
friend class InventoryItem
Definition: Probes.h:27
uint32 itemID() const
Definition: InventoryItem.h:98

Here is the caller graph for this function:

virtual ProbeItem::~ProbeItem ( )
inlinevirtual

Definition at line 30 of file Probes.h.

30 { /* Do nothing here */ }

Member Function Documentation

template<class _Ty >
static RefPtr<_Ty> ProbeItem::_LoadItem ( uint32  itemID,
const ItemType type,
const ItemData data 
)
inlinestaticprotected

Definition at line 45 of file Probes.h.

References _log, ItemType::categoryID(), ItemType::groupID(), EVEDB::invGroups::Obsolete_Probes, ProbeItem(), EVEDB::invGroups::Scanner_Probe, sConfig, sDataMgr, EVEDB::invGroups::Survey_Probe, and EvE::traceStack().

46  {
49  //and (type.groupID() != EVEDB::invGroups::Warp_Disruption_Probe) this wont work here...
51  _log(ITEM__ERROR, "Trying to load %s as Probe.", sDataMgr.GetCategoryName(type.categoryID()));
52  if (sConfig.debug.StackTrace)
54  return RefPtr<_Ty>();
55  }
56 
57  return ProbeItemRef( new ProbeItem(itemID, type, data));
58  }
#define sConfig
A macro for easier access to the singleton.
#define _log(type, fmt,...)
Definition: logsys.h:124
uint16 groupID() const
Definition: ItemType.h:64
RefPtr< ProbeItem > ProbeItemRef
Definition: ItemRef.h:56
uint8 categoryID() const
Definition: ItemType.h:66
void traceStack(void)
Definition: misc.cpp:169
uint32 itemID() const
Definition: InventoryItem.h:98
ProbeItem(uint32 itemID, const ItemType &_type, const ItemData &_data)
Definition: Probes.cpp:31
Reference-counting-based smart pointer.
Definition: RefPtr.h:133
#define sDataMgr

Here is the call graph for this function:

uint32 ProbeItem::CreateItemID ( ItemData data)
staticprotected

Definition at line 42 of file Probes.cpp.

References InventoryItem::CreateItemID().

Referenced by Spawn().

43 {
44  return InventoryItem::CreateItemID(data);
45 }
static uint32 CreateItemID(ItemData &data)

Here is the call graph for this function:

Here is the caller graph for this function:

void ProbeItem::Delete ( )
virtual

Reimplemented from InventoryItem.

Definition at line 61 of file Probes.cpp.

References _log, ItemDB::DeleteItem(), RefPtr< X >::get(), InventoryItem::GetMyInventory(), IsValidLocation, InventoryItem::locationID(), InventoryItem::m_itemID, InventoryItem::name(), Inventory::RemoveItem(), and sItemFactory.

61  {
62  // remove from current container's inventory.
63  // this should be SolarSystem, but just in case, run tests anyway
64  if (IsValidLocation(locationID())) {
65  InventoryItemRef iRef = sItemFactory.GetItem(locationID());
66  if (iRef.get() != nullptr) {
68  } else {
69  _log(ITEM__ERROR, "ProbeItem::Delete() - Cant find location %u containing %s.", locationID(), name());
70  }
71  } else {
72  _log(ITEM__ERROR, "ProbeItem::Delete() - Location %u containing %s is invalid.", locationID(), name());
73  }
74 
75  // remove from DB
77  // remove from factory cache
78  sItemFactory.RemoveItem(m_itemID);
79 }
#define _log(type, fmt,...)
Definition: logsys.h:124
void RemoveItem(InventoryItemRef iRef)
Definition: Inventory.cpp:243
const char * name()
uint32 locationID() const
X * get() const
Definition: RefPtr.h:213
RefPtr< InventoryItem > InventoryItemRef
Definition: ItemRef.h:52
static bool DeleteItem(uint32 itemID)
Definition: ItemDB.cpp:348
#define sItemFactory
Definition: ItemFactory.h:165
Inventory * GetMyInventory()
Definition: InventoryItem.h:91
#define IsValidLocation(itemID)
Definition: EVE_Defines.h:209

Here is the call graph for this function:

ProbeItemRef ProbeItem::Load ( uint32  itemID)
static

Definition at line 47 of file Probes.cpp.

References InventoryItem::itemID().

Referenced by Spawn().

48 {
49  return InventoryItem::Load<ProbeItem>(itemID );
50 }
uint32 itemID() const
Definition: InventoryItem.h:98

Here is the call graph for this function:

Here is the caller graph for this function:

ProbeItemRef ProbeItem::Spawn ( ItemData data)
static

Definition at line 52 of file Probes.cpp.

References CreateItemID(), InventoryItem::itemID(), and Load().

Referenced by InventoryItem::Spawn(), and ItemFactory::SpawnProbe().

53 {
55  if (itemID == 0 )
56  return ProbeItemRef(nullptr);
57 
58  return ProbeItem::Load(itemID);
59 }
RefPtr< ProbeItem > ProbeItemRef
Definition: ItemRef.h:56
unsigned __int32 uint32
Definition: eve-compat.h:50
static uint32 CreateItemID(ItemData &data)
Definition: Probes.cpp:42
static ProbeItemRef Load(uint32 itemID)
Definition: Probes.cpp:47
uint32 itemID() const
Definition: InventoryItem.h:98

Here is the call graph for this function:

Here is the caller graph for this function:

Friends And Related Function Documentation

friend class InventoryItem
friend

Definition at line 27 of file Probes.h.


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