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]
|
default |
Equipment set.
◆ ~EquipmentSet()
|
default |
Equipment set.
◆ EquipmentSet() [2/2]
|
delete |
成员函数说明
◆ addSlotAllowedTag()
| void eve::inventory::EquipmentSet::addSlotAllowedTag | ( | const std::string & | slotName, |
| const std::string & | 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 |
Can equip from bag.
在文件 Equipment.cpp 第 83 行定义.
引用了 eve::inventory::ItemDefinition::equipSlot, eve::inventory::ItemRegistry::find(), eve::inventory::Bag::getSlotCount(), eve::inventory::ItemDefinition::hasTag(), ok, eve::inventory::Bag::slots() , 以及 t.
◆ 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 | ) |
◆ 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 | ||
| ) |
◆ getId()
|
inline |
Returns the id.
在文件 Equipment.h 第 33 行定义.
◆ getSlotCount()
| int eve::inventory::EquipmentSet::getSlotCount | ( | ) | const |
Returns the slot count.
在文件 Equipment.cpp 第 37 行定义.
被这些函数引用 eve::inventory::InventoryContainerAdapter::prepare(), eve::inventory::InventoryContainerAdapter::snapshot(), eve::avatar::AvatarInstance::syncEquipmentAppearance(), eve::rpg::EquipmentSystem::syncEquipModifiers() , 以及 eve::inventory::InventoryContainerAdapter::validateInsert().
◆ 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 行定义.
◆ operator=()
|
delete |
◆ setId()
|
inline |
◆ 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 | ||
| ) |
友元及相关函数文档
◆ InventorySaveSession
|
friend |
在文件 Equipment.h 第 78 行定义.
◆ InventorySystem
|
friend |
在文件 Equipment.h 第 77 行定义.
该类的文档由以下文件生成:
- src/modules/inventory/Equipment.h
- src/modules/inventory/Equipment.cpp