[Bug Fix] Fix trading with bots when in an illusion. (#2645)

Trade check was not checking GetBaseRace and would fail if the bot's illusion couldn't equip the item.

Co-authored-by: toxin06 <53322305+toxin06@users.noreply.github.com>
This commit is contained in:
nytmyr 2022-12-14 20:32:34 -06:00 committed by GitHub
parent 0fd4d82553
commit 1338d21823
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4761,7 +4761,7 @@ void Bot::PerformTradeWithClient(int16 begin_slot_id, int16 end_slot_id, Client*
if (
!trade_instance->IsClassEquipable(GetClass()) ||
GetLevel() < trade_instance->GetItem()->ReqLevel ||
(!trade_instance->IsRaceEquipable(GetRace()) && !RuleB(Bots, AllowBotEquipAnyRaceGear))
(!trade_instance->IsRaceEquipable(GetBaseRace()) && !RuleB(Bots, AllowBotEquipAnyRaceGear))
) {
if (trade_event_exists) {
event_trade.push_back(ClientTrade(trade_instance, trade_index));