Horizon Official Technical Documentation
item_entry_data Struct Reference

Structure used to store and convey item data in the state machine and in communication with the client. More...

#include <ItemDefinitions.hpp>

+ Collaboration diagram for item_entry_data:

Classes

struct  item_entry_info
 
struct  options
 

Public Member Functions

 item_entry_data ()
 
bool is_equipment ()
 
bool is_stackable ()
 
bool operator== (item_entry_data const &right)
 
bool operator!= (item_entry_data const &right)
 
item_entry_data operator= (item_entry_data const &right)
 
bool is_favorite ()
 
void set_favorite (bool val)
 
bool is_broken ()
 
void set_broken (bool val)
 
bool is_identified ()
 
void set_identified (bool val)
 
uint32_t get_item_id ()
 
void set_item_id (uint32_t id)
 
uint16_t get_amount ()
 
void set_amount (uint16_t amt)
 
uint32_t get_current_equip_location_mask ()
 
void set_current_equip_location_mask (uint32_t mask)
 
uint32_t get_actual_equip_location_mask ()
 
void set_actual_equip_location_mask (uint32_t mask)
 
uint8_t get_refine_level ()
 
void set_refine_level (int lvl)
 
uint32_t get_hire_expire_date ()
 
void set_hire_expire_date (int date)
 
item_bind_type get_bind_type ()
 
void set_bind_type (item_bind_type val)
 
uint8_t get_option_count ()
 
void set_option_count (uint8_t count)
 
uint16_t get_sprite_id ()
 
void set_sprite_id (uint16_t id)
 

Public Attributes

union {
   uint16_t   inventory
 
   uint16_t   storage
 
index
 
item_storage_type storage_type {ITEM_STORE_INVENTORY}
 
uint32_t item_id {0}
 
item_type type {IT_TYPE_ETC}
 
uint16_t amount {0}
 
uint32_t current_equip_location_mask {0}
 
uint32_t actual_equip_location_mask {0}
 
uint8_t refine_level {0}
 
uint32_t slot_item_id [MAX_ITEM_SLOTS] {0}
 
uint32_t hire_expire_date {0}
 
uint16_t sprite_id {0}
 
element_type ele_type {ELE_NEUTRAL}
 
uint8_t option_count {0}
 
struct item_entry_data::options option_data [MAX_ITEM_OPTIONS]
 
struct item_entry_data::item_entry_info info
 
item_bind_type bind_type {IT_BIND_NONE}
 
uint64_t unique_id {0}
 
std::shared_ptr< const item_config_dataconfig
 

Detailed Description

Structure used to store and convey item data in the state machine and in communication with the client.

Constructor & Destructor Documentation

◆ item_entry_data()

item_entry_data::item_entry_data ( )
inline
415{ memset(this, 0, sizeof(*this)); }

Member Function Documentation

◆ get_actual_equip_location_mask()

uint32_t item_entry_data::get_actual_equip_location_mask ( )
inline
uint32_t actual_equip_location_mask
Definition: ItemDefinitions.hpp:539

References actual_equip_location_mask.

◆ get_amount()

uint16_t item_entry_data::get_amount ( )
inline
499{ return amount; }
uint16_t amount
Definition: ItemDefinitions.hpp:537

References amount.

◆ get_bind_type()

item_bind_type item_entry_data::get_bind_type ( )
inline
514{ return bind_type; }
item_bind_type bind_type
Definition: ItemDefinitions.hpp:571

References bind_type.

Referenced by Horizon::Zone::ItemComponent::sync_data_types().

+ Here is the caller graph for this function:

◆ get_current_equip_location_mask()

uint32_t item_entry_data::get_current_equip_location_mask ( )
inline
uint32_t current_equip_location_mask
Definition: ItemDefinitions.hpp:538

References current_equip_location_mask.

◆ get_hire_expire_date()

uint32_t item_entry_data::get_hire_expire_date ( )
inline
511{ return hire_expire_date; }
uint32_t hire_expire_date
Definition: ItemDefinitions.hpp:548

References hire_expire_date.

Referenced by Horizon::Zone::ItemComponent::sync_data_types().

+ Here is the caller graph for this function:

◆ get_item_id()

uint32_t item_entry_data::get_item_id ( )
inline
496{ return item_id; }
uint32_t item_id
Definition: ItemDefinitions.hpp:532

References item_id.

◆ get_option_count()

uint8_t item_entry_data::get_option_count ( )
inline
517{ return option_count; }
uint8_t option_count
Definition: ItemDefinitions.hpp:552

References option_count.

Referenced by Horizon::Zone::ItemComponent::sync_data_types().

+ Here is the caller graph for this function:

◆ get_refine_level()

uint8_t item_entry_data::get_refine_level ( )
inline
508{ return refine_level; }
uint8_t refine_level
Definition: ItemDefinitions.hpp:540

References refine_level.

Referenced by Horizon::Zone::ItemComponent::sync_data_types().

+ Here is the caller graph for this function:

◆ get_sprite_id()

uint16_t item_entry_data::get_sprite_id ( )
inline
520{ return sprite_id; }
uint16_t sprite_id
Definition: ItemDefinitions.hpp:549

References sprite_id.

◆ is_broken()

bool item_entry_data::is_broken ( )
inline
490{ return info.is_broken; }
unsigned is_broken
Definition: ItemDefinitions.hpp:567
struct item_entry_data::item_entry_info info

References info, and item_entry_data::item_entry_info::is_broken.

◆ is_equipment()

bool item_entry_data::is_equipment ( )
inline
417{ return type == IT_TYPE_WEAPON || type == IT_TYPE_ARMOR; }
@ IT_TYPE_ARMOR
Definition: ItemDefinitions.hpp:259
@ IT_TYPE_WEAPON
Definition: ItemDefinitions.hpp:258
item_type type
Definition: ItemDefinitions.hpp:536

References IT_TYPE_ARMOR, IT_TYPE_WEAPON, and type.

Referenced by Horizon::Zone::ItemComponent::sync_data_types().

+ Here is the caller graph for this function:

◆ is_favorite()

bool item_entry_data::is_favorite ( )
inline
487{ return info.is_favorite; }
unsigned is_favorite
Definition: ItemDefinitions.hpp:568

References info, and item_entry_data::item_entry_info::is_favorite.

◆ is_identified()

bool item_entry_data::is_identified ( )
inline
493{ return info.is_identified; }
unsigned is_identified
Definition: ItemDefinitions.hpp:566

References info, and item_entry_data::item_entry_info::is_identified.

◆ is_stackable()

bool item_entry_data::is_stackable ( )
inline
420 {
423 || hire_expire_date > 0
424 )
425 return false;
426 return true;
427 }
@ IT_TYPE_PET_ARMOR
Definition: ItemDefinitions.hpp:262
@ IT_TYPE_PET_EGG
Definition: ItemDefinitions.hpp:261

References hire_expire_date, IT_TYPE_ARMOR, IT_TYPE_PET_ARMOR, IT_TYPE_PET_EGG, IT_TYPE_WEAPON, and type.

Referenced by Horizon::Zone::ItemComponent::sync_data_types().

+ Here is the caller graph for this function:

◆ operator!=()

bool item_entry_data::operator!= ( item_entry_data const &  right)
inline
444 {
445 return !(*this == right);
446 }

◆ operator=()

item_entry_data item_entry_data::operator= ( item_entry_data const &  right)
inline
450 {
452 index.inventory = right.index.inventory;
454 index.storage = right.index.storage;
455
456 item_id = right.item_id;
457 type = right.type;
458 amount = right.amount;
459 current_equip_location_mask = right.current_equip_location_mask;
460 actual_equip_location_mask = right.actual_equip_location_mask;
461 refine_level = right.refine_level;
462
463 for (int i = 0; i < MAX_ITEM_SLOTS; ++i)
464 slot_item_id[i] = right.slot_item_id[i];
465
466 hire_expire_date = right.hire_expire_date;
467 option_count = right.option_count;
468 ele_type = right.ele_type;
469
470 for (int i = 0; i < MAX_ITEM_OPTIONS; ++i)
471 {
472 option_data[i].index = right.option_data[i].index;
473 option_data[i].value = right.option_data[i].value;
474 option_data[i].param = right.option_data[i].param;
475 }
476 bind_type = right.bind_type;
477 info.is_favorite = right.info.is_favorite;
478 info.is_broken = right.info.is_broken;
479 info.is_identified = right.info.is_identified;
480 sprite_id = right.sprite_id;
481
482 unique_id = right.unique_id;
483 config = right.config;
484 return *this;
485 }
#define MAX_ITEM_SLOTS
Definition: ItemDefinitions.hpp:42
@ ITEM_STORE_INVENTORY
Definition: ItemDefinitions.hpp:405
@ ITEM_STORE_STORAGE
Definition: ItemDefinitions.hpp:406
#define MAX_ITEM_OPTIONS
Definition: ItemDefinitions.hpp:41
int16_t index
Definition: ItemDefinitions.hpp:560
int16_t value
Definition: ItemDefinitions.hpp:561
uint8_t param
Definition: ItemDefinitions.hpp:562
uint64_t unique_id
Definition: ItemDefinitions.hpp:572
struct item_entry_data::options option_data[MAX_ITEM_OPTIONS]
element_type ele_type
Definition: ItemDefinitions.hpp:551
uint32_t slot_item_id[MAX_ITEM_SLOTS]
Definition: ItemDefinitions.hpp:544
union item_entry_data::@131 index
std::shared_ptr< const item_config_data > config
Definition: ItemDefinitions.hpp:574
item_storage_type storage_type
Definition: ItemDefinitions.hpp:528

References actual_equip_location_mask, amount, bind_type, config, current_equip_location_mask, ele_type, hire_expire_date, index, item_entry_data::options::index, info, inventory, item_entry_data::item_entry_info::is_broken, item_entry_data::item_entry_info::is_favorite, item_entry_data::item_entry_info::is_identified, item_id, ITEM_STORE_INVENTORY, ITEM_STORE_STORAGE, MAX_ITEM_OPTIONS, MAX_ITEM_SLOTS, option_count, option_data, item_entry_data::options::param, refine_level, slot_item_id, sprite_id, storage, storage_type, type, unique_id, and item_entry_data::options::value.

◆ operator==()

bool item_entry_data::operator== ( item_entry_data const &  right)
inline
430 {
431 if (item_id != right.item_id
432 || bind_type != right.bind_type
433 || hire_expire_date != right.hire_expire_date
434 || unique_id != right.unique_id
435 || type != right.type
436 || info.is_favorite != right.info.is_favorite
437 )
438 return false;
439
440 return true;
441 }

References bind_type, hire_expire_date, info, item_entry_data::item_entry_info::is_favorite, item_id, type, and unique_id.

◆ set_actual_equip_location_mask()

void item_entry_data::set_actual_equip_location_mask ( uint32_t  mask)
inline
static const uint8_t mask[8]
Bitmask for accessing individual bits of a byte.
Definition: DES.cpp:71

References actual_equip_location_mask, and mask.

◆ set_amount()

void item_entry_data::set_amount ( uint16_t  amt)
inline
500{ amount = amt; }

References amount.

◆ set_bind_type()

void item_entry_data::set_bind_type ( item_bind_type  val)
inline
515{ bind_type = val; }

References bind_type.

Referenced by Horizon::Zone::ItemComponent::sync_data_types().

+ Here is the caller graph for this function:

◆ set_broken()

void item_entry_data::set_broken ( bool  val)
inline

◆ set_current_equip_location_mask()

void item_entry_data::set_current_equip_location_mask ( uint32_t  mask)
inline

◆ set_favorite()

void item_entry_data::set_favorite ( bool  val)
inline

◆ set_hire_expire_date()

void item_entry_data::set_hire_expire_date ( int  date)
inline
512{ hire_expire_date = date; }

References hire_expire_date.

Referenced by Horizon::Zone::ItemComponent::sync_data_types().

+ Here is the caller graph for this function:

◆ set_identified()

void item_entry_data::set_identified ( bool  val)
inline

◆ set_item_id()

void item_entry_data::set_item_id ( uint32_t  id)
inline
497{ item_id = id; }

References item_id.

◆ set_option_count()

void item_entry_data::set_option_count ( uint8_t  count)
inline
518{ option_count = count; }
size_t count(GridTypeListContainer< SPECIFIC_TYPE > const &elements, SPECIFIC_TYPE *)
Definition: GridReferenceContainer.hpp:100

References GridTypeListIterator::count(), and option_count.

Referenced by Horizon::Zone::ItemComponent::sync_data_types().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ set_refine_level()

void item_entry_data::set_refine_level ( int  lvl)
inline
509{ refine_level = lvl; }

References refine_level.

Referenced by Horizon::Zone::ItemComponent::sync_data_types().

+ Here is the caller graph for this function:

◆ set_sprite_id()

void item_entry_data::set_sprite_id ( uint16_t  id)
inline
521{ sprite_id = id; }

References sprite_id.

Member Data Documentation

◆ actual_equip_location_mask

◆ amount

◆ bind_type

◆ config

◆ current_equip_location_mask

◆ ele_type

◆ hire_expire_date

◆ 

◆ info

◆ inventory

◆ item_id

◆ option_count

◆ option_data

◆ refine_level

◆ slot_item_id

◆ sprite_id

◆ storage

uint16_t item_entry_data::storage

◆ storage_type

◆ type

◆ unique_id


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