Split itemType enum into it's own header (#647)

* Split itemType enum into it's own header
add mount item type

* fix whitespace
This commit is contained in:
Aaron Kimbrell
2022-07-16 20:36:09 -05:00
committed by GitHub
parent f5ae5aa13e
commit 9287e5bc4b
5 changed files with 74 additions and 60 deletions

View File

@@ -25,6 +25,7 @@
#include "PropertyManagementComponent.h"
#include "DestroyableComponent.h"
#include "dConfig.h"
#include "eItemType.h"
InventoryComponent::InventoryComponent(Entity* parent, tinyxml2::XMLDocument* document) : Component(parent)
{
@@ -1024,13 +1025,13 @@ void InventoryComponent::EquipItem(Item* item, const bool skipChecks)
return;
}
if (type == ITEM_TYPE_LOOT_MODEL || type == ITEM_TYPE_VEHICLE)
if (type == eItemType::ITEM_TYPE_LOOT_MODEL || type == eItemType::ITEM_TYPE_VEHICLE)
{
return;
}
}
if (type != ITEM_TYPE_LOOT_MODEL && type != ITEM_TYPE_MODEL)
if (type != eItemType::ITEM_TYPE_LOOT_MODEL && type != eItemType::ITEM_TYPE_MODEL)
{
if (!item->GetBound() && !item->GetPreconditionExpression()->Check(m_Parent))
{
@@ -1411,15 +1412,15 @@ void InventoryComponent::RemoveDatabasePet(LWOOBJID id)
BehaviorSlot InventoryComponent::FindBehaviorSlot(const eItemType type)
{
switch (type) {
case ITEM_TYPE_HAT:
case eItemType::ITEM_TYPE_HAT:
return BehaviorSlot::Head;
case ITEM_TYPE_NECK:
case eItemType::ITEM_TYPE_NECK:
return BehaviorSlot::Neck;
case ITEM_TYPE_LEFT_HAND:
case eItemType::ITEM_TYPE_LEFT_HAND:
return BehaviorSlot::Offhand;
case ITEM_TYPE_RIGHT_HAND:
case eItemType::ITEM_TYPE_RIGHT_HAND:
return BehaviorSlot::Primary;
case ITEM_TYPE_CONSUMABLE:
case eItemType::ITEM_TYPE_CONSUMABLE:
return BehaviorSlot::Consumable;
default:
return BehaviorSlot::Invalid;