载入中...
搜索中...
未找到
eve::inventory::EquipmentSet类 参考

#include <Equipment.h>

Public 成员函数

 EquipmentSet ()=default
 
 ~EquipmentSet ()=default
 
 EquipmentSet (const EquipmentSet &)=delete
 
EquipmentSetoperator= (const EquipmentSet &)=delete
 
void destroy ()
 
std::string getId () const
 
void setId (const std::string &id)
 
void defineSlot (const std::string &slotName)
 声明一个装备槽;已存在则保留当前物品,仅更新允许标签。
 
void clearSlotAllowedTags (const std::string &slotName)
 
void addSlotAllowedTag (const std::string &slotName, const std::string &tag)
 
bool hasSlot (const std::string &slotName) const
 
int getSlotCount () const
 
std::string getSlotName (int index) const
 
bool isSlotEmpty (const std::string &slotName) const
 
std::string getSlotItemId (const std::string &slotName) const
 
int getSlotQuantity (const std::string &slotName) const
 
int getSlotInstanceId (const std::string &slotName) const
 
bool canEquipFromBag (Bag *bag, int bagSlot, const std::string &equipSlot, std::string *reason=nullptr) const
 
bool equipFromBag (const std::string &equipSlot, Bag *bag, int bagSlot)
 
bool unequipToBag (const std::string &equipSlot, Bag *bag)
 
bool clearSlot (const std::string &slotName)
 直接清空槽位(物品丢弃,不回背包)。
 
const ItemStackstackAt (const std::string &slotName) const
 
ItemStackstackAt (const std::string &slotName)
 
const std::vector< std::string > * allowedTags (const std::string &slotName) const
 

友元

class InventorySystem
 

详细描述

在文件 Equipment.h15 行定义.

构造及析构函数说明

◆ EquipmentSet() [1/2]

eve::inventory::EquipmentSet::EquipmentSet ( )
default

◆ ~EquipmentSet()

eve::inventory::EquipmentSet::~EquipmentSet ( )
default

◆ EquipmentSet() [2/2]

eve::inventory::EquipmentSet::EquipmentSet ( const EquipmentSet )
delete

成员函数说明

◆ addSlotAllowedTag()

void eve::inventory::EquipmentSet::addSlotAllowedTag ( const std::string &  slotName,
const std::string &  tag 
)

在文件 Equipment.cpp26 行定义.

引用了 defineSlot().

◆ allowedTags()

const std::vector< std::string > * eve::inventory::EquipmentSet::allowedTags ( const std::string &  slotName) const

在文件 Equipment.cpp78 行定义.

◆ canEquipFromBag()

bool eve::inventory::EquipmentSet::canEquipFromBag ( Bag bag,
int  bagSlot,
const std::string &  equipSlot,
std::string *  reason = nullptr 
) const

◆ clearSlot()

bool eve::inventory::EquipmentSet::clearSlot ( const std::string &  slotName)

◆ clearSlotAllowedTags()

void eve::inventory::EquipmentSet::clearSlotAllowedTags ( const std::string &  slotName)

在文件 Equipment.cpp20 行定义.

◆ defineSlot()

void eve::inventory::EquipmentSet::defineSlot ( const std::string &  slotName)

声明一个装备槽;已存在则保留当前物品,仅更新允许标签。

在文件 Equipment.cpp12 行定义.

被这些函数引用 addSlotAllowedTag().

◆ destroy()

void eve::inventory::EquipmentSet::destroy ( )

在文件 Equipment.cpp10 行定义.

◆ equipFromBag()

bool eve::inventory::EquipmentSet::equipFromBag ( const std::string &  equipSlot,
Bag bag,
int  bagSlot 
)

◆ getId()

std::string eve::inventory::EquipmentSet::getId ( ) const
inline

在文件 Equipment.h25 行定义.

◆ getSlotCount()

int eve::inventory::EquipmentSet::getSlotCount ( ) const

在文件 Equipment.cpp37 行定义.

◆ getSlotInstanceId()

int eve::inventory::EquipmentSet::getSlotInstanceId ( const std::string &  slotName) const

在文件 Equipment.cpp62 行定义.

◆ getSlotItemId()

std::string eve::inventory::EquipmentSet::getSlotItemId ( const std::string &  slotName) const

在文件 Equipment.cpp50 行定义.

◆ getSlotName()

std::string eve::inventory::EquipmentSet::getSlotName ( int  index) const

在文件 Equipment.cpp39 行定义.

◆ getSlotQuantity()

int eve::inventory::EquipmentSet::getSlotQuantity ( const std::string &  slotName) const

在文件 Equipment.cpp56 行定义.

◆ hasSlot()

bool eve::inventory::EquipmentSet::hasSlot ( const std::string &  slotName) const

在文件 Equipment.cpp33 行定义.

◆ isSlotEmpty()

bool eve::inventory::EquipmentSet::isSlotEmpty ( const std::string &  slotName) const

在文件 Equipment.cpp44 行定义.

◆ operator=()

EquipmentSet & eve::inventory::EquipmentSet::operator= ( const EquipmentSet )
delete

◆ setId()

void eve::inventory::EquipmentSet::setId ( const std::string &  id)
inline

在文件 Equipment.h26 行定义.

引用了 id.

◆ stackAt() [1/2]

ItemStack * eve::inventory::EquipmentSet::stackAt ( const std::string &  slotName)

在文件 Equipment.cpp73 行定义.

◆ stackAt() [2/2]

const ItemStack * eve::inventory::EquipmentSet::stackAt ( const std::string &  slotName) const

◆ unequipToBag()

bool eve::inventory::EquipmentSet::unequipToBag ( const std::string &  equipSlot,
Bag bag 
)

友元及相关函数文档

◆ InventorySystem

friend class InventorySystem
friend

在文件 Equipment.h53 行定义.


该类的文档由以下文件生成: