[Quest API] Add Augment Slot support to does_augment_fit (#2813)

* [Quest API] Add Augment Slot support to does_augment_fit

# Notes
- Allows you to check if the supplied augment ID fits in the specified augment slot of the item instance provided.

* Update item_instance.cpp
This commit is contained in:
Alex King
2023-01-30 21:18:16 -05:00
committed by GitHub
parent a25952910a
commit 040c092795
6 changed files with 42 additions and 11 deletions
+8 -1
View File
@@ -3969,7 +3969,7 @@ bool QuestManager::DoAugmentSlotsMatch(uint32 item_one, uint32 item_two)
return true;
}
int8 QuestManager::DoesAugmentFit(EQ::ItemInstance* inst, uint32 augment_id)
int8 QuestManager::DoesAugmentFit(EQ::ItemInstance* inst, uint32 augment_id, uint8 augment_slot)
{
if (!inst) {
return INVALID_INDEX;
@@ -3980,5 +3980,12 @@ int8 QuestManager::DoesAugmentFit(EQ::ItemInstance* inst, uint32 augment_id)
return INVALID_INDEX;
}
if (
augment_slot != 255 &&
!inst->IsAugmentSlotAvailable(aug_inst->AugType, augment_slot)
) {
return INVALID_INDEX;
}
return inst->AvailableAugmentSlot(aug_inst->AugType);
}