ManaPlus
Public Member Functions | Data Fields
Ea::InventoryItem Class Reference

#include <inventoryitem.h>

Public Member Functions

 InventoryItem (const int slot0, const int id0, const ItemTypeT type0, const int *const cards0, ItemOptionsList *options0, const int quantity0, const uint8_t refine0, const ItemColor color0, const Identified identified0, const Damaged damaged0, const Favorite favorite0, Equipm equip0, int equipIndex0)
 
 InventoryItem (const InventoryItem &c)
 
 ~InventoryItem ()
 

Data Fields

int cards [4]
 
ItemOptionsListoptions
 
int slot
 
int id
 
int quantity
 
int equipIndex
 
ItemTypeT type
 
ItemColor color
 
Identified identified
 
Damaged damaged
 
Favorite favorite
 
Equipm equip
 
uint8_t refine
 

Detailed Description

Used to cache storage data until we get size data for it.

Definition at line 49 of file inventoryitem.h.

Constructor & Destructor Documentation

◆ InventoryItem() [1/2]

Ea::InventoryItem::InventoryItem ( const int  slot0,
const int  id0,
const ItemTypeT  type0,
const int *const  cards0,
ItemOptionsList options0,
const int  quantity0,
const uint8_t  refine0,
const ItemColor  color0,
const Identified  identified0,
const Damaged  damaged0,
const Favorite  favorite0,
Equipm  equip0,
int  equipIndex0 
)
inline

Definition at line 66 of file inventoryitem.h.

78  :
79  cards(),
80  options(ItemOptionsList::copy(options0)),
81  slot(slot0),
82  id(id0),
83  quantity(quantity0),
84  equipIndex(equipIndex0),
85  type(type0),
86  color(color0),
87  identified(identified0),
88  damaged(damaged0),
89  favorite(favorite0),
90  equip(equip0),
91  refine(refine0)
92  {
93  if (cards0 == nullptr)
94  return;
95  for (int f = 0; f < 4; f ++)
96  cards[f] = cards0[f];
97  }
Identified identified
Definition: inventoryitem.h:60
ItemOptionsList * options
Definition: inventoryitem.h:53
static ItemOptionsList * copy(const ItemOptionsList *const options0)

References cards.

◆ InventoryItem() [2/2]

Ea::InventoryItem::InventoryItem ( const InventoryItem c)
inline

Definition at line 99 of file inventoryitem.h.

99  :
100  cards(),
101  options(ItemOptionsList::copy(c.options)),
102  slot(c.slot),
103  id(c.id),
104  quantity(c.quantity),
105  equipIndex(c.equipIndex),
106  type(c.type),
107  color(c.color),
108  identified(c.identified),
109  damaged(c.damaged),
110  favorite(c.favorite),
111  equip(c.equip),
112  refine(c.refine)
113  {
114  for (int f = 0; f < 4; f ++)
115  cards[f] = c.cards[f];
116  }

References cards.

◆ ~InventoryItem()

Ea::InventoryItem::~InventoryItem ( )
inline

Definition at line 120 of file inventoryitem.h.

121  {
122  delete options;
123  }

References options.

Field Documentation

◆ cards

int Ea::InventoryItem::cards[4]

Definition at line 52 of file inventoryitem.h.

Referenced by InventoryItem().

◆ color

ItemColor Ea::InventoryItem::color

Definition at line 59 of file inventoryitem.h.

◆ damaged

Damaged Ea::InventoryItem::damaged

Definition at line 61 of file inventoryitem.h.

◆ equip

Equipm Ea::InventoryItem::equip

Definition at line 63 of file inventoryitem.h.

◆ equipIndex

int Ea::InventoryItem::equipIndex

Definition at line 57 of file inventoryitem.h.

◆ favorite

Favorite Ea::InventoryItem::favorite

Definition at line 62 of file inventoryitem.h.

◆ id

int Ea::InventoryItem::id

Definition at line 55 of file inventoryitem.h.

◆ identified

Identified Ea::InventoryItem::identified

Definition at line 60 of file inventoryitem.h.

◆ options

ItemOptionsList* Ea::InventoryItem::options

Definition at line 53 of file inventoryitem.h.

Referenced by ~InventoryItem().

◆ quantity

int Ea::InventoryItem::quantity

Definition at line 56 of file inventoryitem.h.

◆ refine

uint8_t Ea::InventoryItem::refine

Definition at line 64 of file inventoryitem.h.

◆ slot

int Ea::InventoryItem::slot

Definition at line 54 of file inventoryitem.h.

◆ type

ItemTypeT Ea::InventoryItem::type

Definition at line 58 of file inventoryitem.h.


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