[Bots] Add Lore Check for Augments. (#2874)

* [Bots] Add Lore Check for Augments.

* Add bot name
This commit is contained in:
Aeadoin 2023-02-12 16:43:58 -05:00 committed by GitHub
parent 924e91cf64
commit 1cc32d92cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4743,6 +4743,33 @@ void Bot::PerformTradeWithClient(int16 begin_slot_id, int16 end_slot_id, Client*
}
}
for (int m = EQ::invaug::SOCKET_BEGIN; m <= EQ::invaug::SOCKET_END; ++m) {
const auto augment = trade_instance->GetAugment(m);
if (!augment) {
continue;
}
if (!CheckLoreConflict(augment->GetItem())) {
continue;
}
linker.SetLinkType(EQ::saylink::SayLinkItemInst);
linker.SetItemInst(augment);
item_link = linker.GenerateLink();
client->Message(
Chat::Yellow,
fmt::format(
"{} already has {}, the trade has been cancelled!",
GetCleanName(),
item_link
).c_str()
);
client->ResetTrade();
return;
}
if (CheckLoreConflict(trade_instance->GetItem())) {
if (trade_event_exists) {
event_trade.push_back(ClientTrade(trade_instance, trade_index));