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

#include "Blueprint.h"

Inheritance diagram for BlueprintType:
Collaboration diagram for BlueprintType:

Public Member Functions

const BlueprintTypeparentBlueprintType () const
 
const ItemTypeproductType () const
 
uint8 techLevel () const
 
uint16 wasteFactor () const
 
uint16 productTypeID () const
 
uint32 productionTime () const
 
uint32 researchCopyTime () const
 
uint32 researchTechTime () const
 
uint32 materialModifier () const
 
uint32 maxProductionLimit () const
 
uint32 researchMaterialTime () const
 
uint32 productivityModifier () const
 
uint32 researchProductivityTime () const
 
uint16 parentBlueprintTypeID () const
 
float chanceOfRE () const
 
- Public Member Functions inherited from ItemType
virtual ~ItemType ()
 
uint16 id () const
 
uint16 groupID () const
 
const std::string & groupName () const
 
uint8 categoryID () const
 
float radius () const
 
float mass () const
 
float volume () const
 
float capacity () const
 
uint8 race () const
 
const std::string & name () const
 
const std::string & description () const
 
uint16 portionSize () const
 
double basePrice () const
 
uint32 marketGroupID () const
 
float chanceOfDuplicating () const
 
bool published () const
 
bool refinable () const
 
bool recyclable () const
 
const bool HasAttribute (const uint16 attributeID) const
 
EvilNumber GetAttribute (const uint16 attributeID) const
 
const void CopyAttributes (InventoryItem &itemRef) const
 
bool HasReqSkill (const uint16 skillID) const
 
void GetEffectMap (const int8 state, std::map< uint16, Effect > &effectMap) const
 
uint16 GetDefaultEffect () const
 
bool HasEffect (uint16 effectID) const
 

Static Public Member Functions

static BlueprintTypeLoad (uint16 typeID)
 
- Static Public Member Functions inherited from ItemType
static ItemTypeLoad (uint16 typeID)
 

Protected Member Functions

 BlueprintType (uint16 _id, const Inv::TypeData &_data, const BlueprintType *_parentBlueprintType, const ItemType &_productType, const EvERam::bpTypeData &_tData)
 
- Protected Member Functions inherited from ItemType
 ItemType (uint16 _id, const Inv::TypeData &_data)
 
virtual bool _Load ()
 
void LoadEffects ()
 

Static Protected Member Functions

template<class _Ty >
static _Ty * _LoadType (uint16 typeID, const Inv::TypeData &data)
 
- Static Protected Member Functions inherited from ItemType
template<class _Ty >
static _Ty * Load (uint16 typeID)
 
template<class _Ty >
static _Ty * _Load (uint16 typeID)
 
template<class _Ty >
static _Ty * _LoadType (uint16 typeID, const Inv::TypeData &data)
 

Protected Attributes

const BlueprintTypem_parentBlueprintType
 
const ItemTypem_productType
 
EvERam::bpTypeData m_data
 

Friends

class ItemType
 

Additional Inherited Members

- Public Attributes inherited from ItemType
std::unordered_multimap< int8,
Effect
m_stateFxMap
 

Detailed Description

Definition at line 39 of file Blueprint.h.

Constructor & Destructor Documentation

BlueprintType::BlueprintType ( uint16  _id,
const Inv::TypeData _data,
const BlueprintType _parentBlueprintType,
const ItemType _productType,
const EvERam::bpTypeData _tData 
)
protected
Todo:
load the bp material list from invTypeMaterials

Definition at line 37 of file Blueprint.cpp.

References ItemType::id(), m_data, m_parentBlueprintType, m_productType, EvERam::bpTypeData::parentBlueprintTypeID, and EvERam::bpTypeData::productTypeID.

Referenced by _LoadType().

39 : ItemType(_id, _data),
40  m_parentBlueprintType(_parentBlueprintType),
41  m_productType(_productType)
42 { // asserts for data consistency
43  assert(_tData.productTypeID == m_productType.id());
44  if (m_parentBlueprintType != nullptr)
45  assert(_tData.parentBlueprintTypeID == m_parentBlueprintType->id());
46 
47  m_data = _tData;
48 }
uint16 productTypeID
Definition: EVE_RAM.h:118
const ItemType & m_productType
Definition: Blueprint.h:108
uint16 id() const
Definition: ItemType.h:63
EvERam::bpTypeData m_data
Definition: Blueprint.h:110
uint16 parentBlueprintTypeID
Definition: EVE_RAM.h:119
const BlueprintType * m_parentBlueprintType
Definition: Blueprint.h:107
friend class ItemType
Definition: Blueprint.h:42

Here is the call graph for this function:

Here is the caller graph for this function:

Member Function Documentation

template<class _Ty >
static _Ty* BlueprintType::_LoadType ( uint16  typeID,
const Inv::TypeData data 
)
inlinestaticprotected

Definition at line 75 of file Blueprint.h.

References _log, EVEDB::invCategories::Blueprint, BlueprintType(), Inv::GrpData::catID, Inv::TypeData::groupID, parentBlueprintType(), EvERam::bpTypeData::parentBlueprintTypeID, productType(), EvERam::bpTypeData::productTypeID, sDataMgr, and sItemFactory.

75  {
76  // check if we are really loading a blueprint
77  Inv::GrpData gdata = Inv::GrpData();
78  sDataMgr.GetGroup(data.groupID, gdata);
79  if (gdata.catID != EVEDB::invCategories::Blueprint ) {
80  _log( ITEM__ERROR, "Trying to load %s as BlueprintType.", sDataMgr.GetCategoryName(gdata.catID));
81  return nullptr;
82  }
83 
84  // get blueprint type data
86  sDataMgr.GetBpTypeData(typeID, tData);
87 
88  // obtain parent blueprint type (might be NULL)
89  const BlueprintType* parentBlueprintType(nullptr);
90  if (tData.parentBlueprintTypeID) {
91  parentBlueprintType = sItemFactory.GetBlueprintType( tData.parentBlueprintTypeID );
92  if (parentBlueprintType == nullptr)
93  return nullptr;
94  }
95 
96  // obtain product type
97  const ItemType* productType = sItemFactory.GetType( tData.productTypeID );
98  if (productType == nullptr)
99  return nullptr;
100 
101  return new BlueprintType(typeID, data, parentBlueprintType, *productType, tData);
102  }
uint16 productTypeID
Definition: EVE_RAM.h:118
#define _log(type, fmt,...)
Definition: logsys.h:124
const BlueprintType * parentBlueprintType() const
Definition: Blueprint.h:47
BlueprintType(uint16 _id, const Inv::TypeData &_data, const BlueprintType *_parentBlueprintType, const ItemType &_productType, const EvERam::bpTypeData &_tData)
Definition: Blueprint.cpp:37
uint16 parentBlueprintTypeID
Definition: EVE_RAM.h:119
const ItemType & productType() const
Definition: Blueprint.h:48
#define sItemFactory
Definition: ItemFactory.h:165
#define sDataMgr

Here is the call graph for this function:

float BlueprintType::chanceOfRE ( ) const
inline

Definition at line 61 of file Blueprint.h.

References EvERam::bpTypeData::chanceOfRE, and m_data.

61 { return m_data.chanceOfRE; }
EvERam::bpTypeData m_data
Definition: Blueprint.h:110
BlueprintType * BlueprintType::Load ( uint16  typeID)
static

Definition at line 50 of file Blueprint.cpp.

51 {
52  return ItemType::Load<BlueprintType>(typeID);
53 }
uint32 BlueprintType::materialModifier ( ) const
inline

Definition at line 55 of file Blueprint.h.

References m_data, and EvERam::bpTypeData::materialModifier.

55 { return m_data.materialModifier; }
uint32 materialModifier
Definition: EVE_RAM.h:126
EvERam::bpTypeData m_data
Definition: Blueprint.h:110
uint32 BlueprintType::maxProductionLimit ( ) const
inline

Definition at line 56 of file Blueprint.h.

References m_data, and EvERam::bpTypeData::maxProductionLimit.

Referenced by Blueprint::GetBlueprintAttributes().

56 { return m_data.maxProductionLimit; }
EvERam::bpTypeData m_data
Definition: Blueprint.h:110
uint32 maxProductionLimit
Definition: EVE_RAM.h:127

Here is the caller graph for this function:

const BlueprintType* BlueprintType::parentBlueprintType ( ) const
inline

Definition at line 47 of file Blueprint.h.

References m_parentBlueprintType.

Referenced by _LoadType(), and parentBlueprintTypeID().

47 { return m_parentBlueprintType; }
const BlueprintType * m_parentBlueprintType
Definition: Blueprint.h:107

Here is the caller graph for this function:

uint16 BlueprintType::parentBlueprintTypeID ( ) const
inline

Definition at line 60 of file Blueprint.h.

References m_parentBlueprintType, and parentBlueprintType().

60 { return (m_parentBlueprintType == nullptr ? 0 : parentBlueprintType()->id()); }
const BlueprintType * parentBlueprintType() const
Definition: Blueprint.h:47
const BlueprintType * m_parentBlueprintType
Definition: Blueprint.h:107

Here is the call graph for this function:

uint32 BlueprintType::productionTime ( ) const
inline

Definition at line 52 of file Blueprint.h.

References m_data, and EvERam::bpTypeData::productionTime.

Referenced by Blueprint::GetBlueprintAttributes().

52 { return m_data.productionTime; }
EvERam::bpTypeData m_data
Definition: Blueprint.h:110
uint32 productionTime
Definition: EVE_RAM.h:120

Here is the caller graph for this function:

uint32 BlueprintType::productivityModifier ( ) const
inline

Definition at line 58 of file Blueprint.h.

References m_data, and EvERam::bpTypeData::productivityModifier.

58 { return m_data.productivityModifier; }
EvERam::bpTypeData m_data
Definition: Blueprint.h:110
uint32 productivityModifier
Definition: EVE_RAM.h:125
const ItemType& BlueprintType::productType ( ) const
inline

Definition at line 48 of file Blueprint.h.

References m_productType.

Referenced by _LoadType(), Blueprint::productType(), and productTypeID().

48 { return m_productType; }
const ItemType & m_productType
Definition: Blueprint.h:108

Here is the caller graph for this function:

uint16 BlueprintType::productTypeID ( ) const
inline

Definition at line 51 of file Blueprint.h.

References ItemType::id(), and productType().

Referenced by Blueprint::GetBlueprintAttributes(), and Blueprint::productTypeID().

51 { return productType().id(); }
uint16 id() const
Definition: ItemType.h:63
const ItemType & productType() const
Definition: Blueprint.h:48

Here is the call graph for this function:

Here is the caller graph for this function:

uint32 BlueprintType::researchCopyTime ( ) const
inline

Definition at line 53 of file Blueprint.h.

References m_data, and EvERam::bpTypeData::researchCopyTime.

Referenced by Blueprint::GetBlueprintAttributes().

53 { return m_data.researchCopyTime; }
uint32 researchCopyTime
Definition: EVE_RAM.h:123
EvERam::bpTypeData m_data
Definition: Blueprint.h:110

Here is the caller graph for this function:

uint32 BlueprintType::researchMaterialTime ( ) const
inline

Definition at line 57 of file Blueprint.h.

References m_data, and EvERam::bpTypeData::researchMaterialTime.

Referenced by Blueprint::GetBlueprintAttributes().

57 { return m_data.researchMaterialTime; }
EvERam::bpTypeData m_data
Definition: Blueprint.h:110
uint32 researchMaterialTime
Definition: EVE_RAM.h:122

Here is the caller graph for this function:

uint32 BlueprintType::researchProductivityTime ( ) const
inline

Definition at line 59 of file Blueprint.h.

References m_data, and EvERam::bpTypeData::researchProductivityTime.

Referenced by Blueprint::GetBlueprintAttributes().

EvERam::bpTypeData m_data
Definition: Blueprint.h:110
uint32 researchProductivityTime
Definition: EVE_RAM.h:121

Here is the caller graph for this function:

uint32 BlueprintType::researchTechTime ( ) const
inline

Definition at line 54 of file Blueprint.h.

References m_data, and EvERam::bpTypeData::researchTechTime.

Referenced by Blueprint::GetBlueprintAttributes().

54 { return m_data.researchTechTime; }
uint32 researchTechTime
Definition: EVE_RAM.h:124
EvERam::bpTypeData m_data
Definition: Blueprint.h:110

Here is the caller graph for this function:

uint8 BlueprintType::techLevel ( ) const
inline

Definition at line 49 of file Blueprint.h.

References m_data, and EvERam::bpTypeData::techLevel.

49 { return m_data.techLevel; }
EvERam::bpTypeData m_data
Definition: Blueprint.h:110
uint16 BlueprintType::wasteFactor ( ) const
inline

Definition at line 50 of file Blueprint.h.

References m_data, and EvERam::bpTypeData::wasteFactor.

Referenced by Blueprint::GetME().

50 { return m_data.wasteFactor; }
uint16 wasteFactor
Definition: EVE_RAM.h:117
EvERam::bpTypeData m_data
Definition: Blueprint.h:110

Here is the caller graph for this function:

Friends And Related Function Documentation

friend class ItemType
friend

Definition at line 42 of file Blueprint.h.

Member Data Documentation

const BlueprintType* BlueprintType::m_parentBlueprintType
protected

Definition at line 107 of file Blueprint.h.

Referenced by BlueprintType(), parentBlueprintType(), and parentBlueprintTypeID().

const ItemType& BlueprintType::m_productType
protected

Definition at line 108 of file Blueprint.h.

Referenced by BlueprintType(), and productType().


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