mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 01:11:29 +00:00
[Bots] Add Lore Check for Augments. (#2874)
* [Bots] Add Lore Check for Augments. * Add bot name
This commit is contained in:
parent
924e91cf64
commit
1cc32d92cf
27
zone/bot.cpp
27
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));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user