From 1cc32d92cf546d0b22a152949f864659fbfc0571 Mon Sep 17 00:00:00 2001 From: Aeadoin <109764533+Aeadoin@users.noreply.github.com> Date: Sun, 12 Feb 2023 16:43:58 -0500 Subject: [PATCH] [Bots] Add Lore Check for Augments. (#2874) * [Bots] Add Lore Check for Augments. * Add bot name --- zone/bot.cpp | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/zone/bot.cpp b/zone/bot.cpp index 17ef84743..16106994f 100644 --- a/zone/bot.cpp +++ b/zone/bot.cpp @@ -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));