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

EVENGINE_API_FOUNDATION public API. 更多...

#include <Equipment.h>

Public 成员函数

 EquipmentSet ()=default
 Equipment set.
 
 ~EquipmentSet ()=default
 Equipment set.
 
 EquipmentSet (const EquipmentSet &)=delete
 
EquipmentSet & operator= (const EquipmentSet &)=delete
 
void destroy ()
 Destroys destroy.
 
std::string getId () const
 Returns the id.
 
void setId (const std::string &id)
 Sets the id.
 
void defineSlot (const std::string &slotName)
 声明一个装备槽;已存在则保留当前物品,仅更新允许标签。
 
void clearSlotAllowedTags (const std::string &slotName)
 Clears slot allowed tags.
 
void addSlotAllowedTag (const std::string &slotName, const std::string &tag)
 Adds slot allowed tag.
 
bool hasSlot (const std::string &slotName) const
 True when slot.
 
int getSlotCount () const
 Returns the slot count.
 
std::string getSlotName (int index) const
 Returns the slot name.
 
bool isSlotEmpty (const std::string &slotName) const
 True when slot empty.
 
std::string getSlotItemId (const std::string &slotName) const
 Returns the slot item id.
 
int getSlotQuantity (const std::string &slotName) const
 Returns the slot quantity.
 
int getSlotInstanceId (const std::string &slotName) const
 Returns the slot instance id.
 
bool canEquipFromBag (Bag *bag, int bagSlot, const std::string &equipSlot, std::string *reason=nullptr) const
 Can equip from bag.
 
bool equipFromBag (const std::string &equipSlot, Bag *bag, int bagSlot)
 Equip from bag.
 
bool unequipToBag (const std::string &equipSlot, Bag *bag)
 Unequip to bag.
 
bool clearSlot (const std::string &slotName)
 直接清空槽位(物品丢弃,不回背包)。
 
const ItemStack * stackAt (const std::string &slotName) const
 Stack at.
 
ItemStack * stackAt (const std::string &slotName)
 Stack at.
 
const std::vector< std::string > * allowedTags (const std::string &slotName) const
 Allowed tags.
 

友元

class InventorySystem
 
class InventorySaveSession
 

详细描述

EVENGINE_API_FOUNDATION public API.

在文件 Equipment.h 第 19 行定义.

构造及析构函数说明

◆ EquipmentSet() [1/2]

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

Equipment set.

◆ ~EquipmentSet()

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

Equipment set.

◆ EquipmentSet() [2/2]

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

成员函数说明

◆ addSlotAllowedTag()

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

Adds slot allowed tag.

在文件 Equipment.cpp 第 26 行定义.

引用了 defineSlot() , 以及 tag.

◆ allowedTags()

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

Allowed tags.

在文件 Equipment.cpp 第 78 行定义.

被这些函数引用 eve::inventory::InventoryContainerAdapter::validateInsert().

◆ 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)

Clears slot allowed tags.

在文件 Equipment.cpp 第 20 行定义.

◆ defineSlot()

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

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

在文件 Equipment.cpp 第 12 行定义.

被这些函数引用 addSlotAllowedTag().

◆ destroy()

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

Destroys destroy.

在文件 Equipment.cpp 第 10 行定义.

◆ equipFromBag()

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

Equip from bag.

在文件 Equipment.cpp 第 131 行定义.

引用了 eve::inventory::InventorySystem::equipFromBag().

◆ getId()

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

Returns the id.

在文件 Equipment.h 第 33 行定义.

◆ getSlotCount()

◆ getSlotInstanceId()

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

Returns the slot instance id.

在文件 Equipment.cpp 第 62 行定义.

被这些函数引用 eve::avatar::AvatarInstance::syncEquipmentAppearance().

◆ getSlotItemId()

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

Returns the slot item id.

在文件 Equipment.cpp 第 50 行定义.

被这些函数引用 eve::avatar::AvatarInstance::syncEquipmentAppearance() , 以及 eve::rpg::EquipmentSystem::syncEquipModifiers().

◆ getSlotName()

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

Returns the slot name.

在文件 Equipment.cpp 第 39 行定义.

引用了 index.

被这些函数引用 eve::avatar::AvatarInstance::syncEquipmentAppearance() , 以及 eve::rpg::EquipmentSystem::syncEquipModifiers().

◆ getSlotQuantity()

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

Returns the slot quantity.

在文件 Equipment.cpp 第 56 行定义.

◆ hasSlot()

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

True when slot.

在文件 Equipment.cpp 第 33 行定义.

◆ isSlotEmpty()

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

True when slot empty.

在文件 Equipment.cpp 第 44 行定义.

被这些函数引用 eve::rpg::EquipmentSystem::syncEquipModifiers().

◆ operator=()

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

◆ setId()

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

Sets the id.

在文件 Equipment.h 第 35 行定义.

引用了 id.

◆ stackAt() [1/2]

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

Stack at.

在文件 Equipment.cpp 第 73 行定义.

◆ 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 
)

Unequip to bag.

在文件 Equipment.cpp 第 135 行定义.

引用了 eve::inventory::InventorySystem::unequipToBag().

友元及相关函数文档

◆ InventorySaveSession

friend class InventorySaveSession
friend

在文件 Equipment.h 第 78 行定义.

◆ InventorySystem

friend class InventorySystem
friend

在文件 Equipment.h 第 77 行定义.


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