mirror of
https://github.com/EQEmu/Server.git
synced 2026-08-28 11:47:55 +00:00
[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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user