diff --git a/dGame/dComponents/InventoryComponent.cpp b/dGame/dComponents/InventoryComponent.cpp index aaa815a3..2231a680 100644 --- a/dGame/dComponents/InventoryComponent.cpp +++ b/dGame/dComponents/InventoryComponent.cpp @@ -1315,23 +1315,6 @@ void InventoryComponent::RemoveDatabasePet(LWOOBJID id) { m_Pets.erase(id); } -BehaviorSlot InventoryComponent::FindBehaviorSlot(const eItemType type) { - switch (type) { - case eItemType::HAT: - return BehaviorSlot::Head; - case eItemType::NECK: - return BehaviorSlot::Neck; - case eItemType::LEFT_HAND: - return BehaviorSlot::Offhand; - case eItemType::RIGHT_HAND: - return BehaviorSlot::Primary; - case eItemType::CONSUMABLE: - return BehaviorSlot::Consumable; - default: - return BehaviorSlot::Invalid; - } -} - BehaviorSlot InventoryComponent::FindBehaviorSlotByEquipLocation(const std::string& equipLocation) { if (equipLocation == "special_r") { return BehaviorSlot::Primary; diff --git a/dGame/dComponents/InventoryComponent.h b/dGame/dComponents/InventoryComponent.h index 5121f9a4..7de17dd3 100644 --- a/dGame/dComponents/InventoryComponent.h +++ b/dGame/dComponents/InventoryComponent.h @@ -361,13 +361,6 @@ public: */ void RemoveDatabasePet(LWOOBJID id); - /** - * Returns the current behavior slot active for the passed item type - * @param type the item type to find the behavior slot for - * @return the current behavior slot active for the passed item type - */ - static BehaviorSlot FindBehaviorSlot(eItemType type); - /** * Returns the behavior slot for the given equipment location * @param equipLocation the equipment location to find the behavior slot for diff --git a/tests/dGameTests/dComponentsTests/InventoryComponentTests.cpp b/tests/dGameTests/dComponentsTests/InventoryComponentTests.cpp index 88fb084b..fb98e946 100644 --- a/tests/dGameTests/dComponentsTests/InventoryComponentTests.cpp +++ b/tests/dGameTests/dComponentsTests/InventoryComponentTests.cpp @@ -4,7 +4,6 @@ #include "InventoryComponent.h" #include "BehaviorSlot.h" #include "Entity.h" -#include "eItemType.h" class InventoryComponentTest : public GameDependenciesTest { protected: @@ -32,16 +31,4 @@ TEST_F(InventoryComponentTest, FindBehaviorSlotByEquipLocationTest) { EXPECT_EQ(InventoryComponent::FindBehaviorSlotByEquipLocation(""), BehaviorSlot::Invalid); EXPECT_EQ(InventoryComponent::FindBehaviorSlotByEquipLocation("root"), BehaviorSlot::Invalid); EXPECT_EQ(InventoryComponent::FindBehaviorSlotByEquipLocation("leftHand"), BehaviorSlot::Invalid); -} - -/** - * Test that the original FindBehaviorSlot by itemType still works correctly - */ -TEST_F(InventoryComponentTest, FindBehaviorSlotByItemTypeTest) { - // Test that the original method still works for backward compatibility scenarios - EXPECT_EQ(InventoryComponent::FindBehaviorSlot(eItemType::HAT), BehaviorSlot::Head); - EXPECT_EQ(InventoryComponent::FindBehaviorSlot(eItemType::NECK), BehaviorSlot::Neck); - EXPECT_EQ(InventoryComponent::FindBehaviorSlot(eItemType::LEFT_HAND), BehaviorSlot::Offhand); - EXPECT_EQ(InventoryComponent::FindBehaviorSlot(eItemType::RIGHT_HAND), BehaviorSlot::Primary); - EXPECT_EQ(InventoryComponent::FindBehaviorSlot(eItemType::CONSUMABLE), BehaviorSlot::Consumable); } \ No newline at end of file