[Quest API] Add DoAugmentSlotsMatch() to Perl/Lua. (#2687)

# Perl
- Add `quest::do_augment_slots_match(item_one, item_two)`.

# Lua
- Add `eq.do_augment_slots_match(item_one, item_two)`.

# Notes
- Allows operators to see if augments slots across two items match for something like moving augments from one item to another.
This commit is contained in:
Alex King
2023-01-01 11:25:37 -05:00
committed by GitHub
parent 501ea4b736
commit 3a4ba6f422
4 changed files with 33 additions and 0 deletions
+20
View File
@@ -3946,3 +3946,23 @@ void QuestManager::marquee(uint32 type, uint32 priority, uint32 fade_in, uint32
initiator->SendMarqueeMessage(type, priority, fade_in, fade_out, duration, message);
}
bool QuestManager::DoAugmentSlotsMatch(uint32 item_one, uint32 item_two) {
const auto* inst_one = database.GetItem(item_one);
if (!inst_one) {
return false;
}
const auto* inst_two = database.GetItem(item_two);
if (!inst_two) {
return false;
}
for (auto i = EQ::invaug::SOCKET_BEGIN; i <= EQ::invaug::SOCKET_END; i++) {
if (inst_one->AugSlotType[i] != inst_two->AugSlotType[i]) {
return false;
}
}
return true;
}