Skip to content

Commit

Permalink
[Bots] Add Lore Check for Augments. (#2874)
Browse files Browse the repository at this point in the history
* [Bots] Add Lore Check for Augments.

* Add bot name
  • Loading branch information
Aeadoin authored Feb 12, 2023
1 parent 924e91c commit 1cc32d9
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions zone/bot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 1cc32d9

Please sign in to comment.