Rehti MMORPG  1.0.0
Rehti MMORPG is a free and open source MMORPG game.
GameItems Struct Reference

Contains all the item data in the game. This is used to load item assets into memory and create item instances to the game. More...

#include <ItemReader.hpp>

Collaboration diagram for GameItems:
Collaboration graph

Public Member Functions

const bool containsId (const int id) const
 
const std::vector< int > getAllIds () const
 
std::optional< ItemTypegetItemType (int id)
 
const GeneralItemStructgetGeneralItem (int id)
 
const EquippableItemStructgetEquippableItem (int id)
 
const FoodItemStructgetFoodItem (int id)
 

Public Attributes

std::map< int, GeneralItemStructgeneralItems
 
std::map< int, EquippableItemStructequippableItems
 
std::map< int, FoodItemStructfoodItems
 

Detailed Description

Contains all the item data in the game. This is used to load item assets into memory and create item instances to the game.

Note
Does not contain item instances, only item definitions. For example, what is lobster like and what are its stats.

Member Function Documentation

◆ containsId()

const bool GameItems::containsId ( const int  id) const
inline
Here is the caller graph for this function:

◆ getAllIds()

const std::vector<int> GameItems::getAllIds ( ) const
inline
Here is the caller graph for this function:

◆ getEquippableItem()

const EquippableItemStruct& GameItems::getEquippableItem ( int  id)
inline
Here is the caller graph for this function:

◆ getFoodItem()

const FoodItemStruct& GameItems::getFoodItem ( int  id)
inline
Here is the caller graph for this function:

◆ getGeneralItem()

const GeneralItemStruct& GameItems::getGeneralItem ( int  id)
inline
Here is the caller graph for this function:

◆ getItemType()

std::optional<ItemType> GameItems::getItemType ( int  id)
inline
Here is the caller graph for this function:

Member Data Documentation

◆ equippableItems

std::map<int, EquippableItemStruct> GameItems::equippableItems

◆ foodItems

std::map<int, FoodItemStruct> GameItems::foodItems

◆ generalItems

std::map<int, GeneralItemStruct> GameItems::generalItems

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