diff options
Diffstat (limited to 'src/server/game/Handlers/ItemHandler.cpp')
-rw-r--r-- | src/server/game/Handlers/ItemHandler.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/server/game/Handlers/ItemHandler.cpp b/src/server/game/Handlers/ItemHandler.cpp index bffad4b84c2..1f017d77163 100644 --- a/src/server/game/Handlers/ItemHandler.cpp +++ b/src/server/game/Handlers/ItemHandler.cpp @@ -528,9 +528,7 @@ void WorldSession::HandleSellItemOpcode(WorldPacket& recvData) // special case at auto sell (sell all) if (count == 0) - { count = pItem->GetCount(); - } else { // prevent sell more items that exist in stack (possible only not from client) @@ -776,6 +774,13 @@ void WorldSession::SendListInventory(uint64 vendorGuid) continue; } + ConditionList conditions = sConditionMgr->GetConditionsForNpcVendorEvent(vendor->GetEntry(), vendorItem->item); + if (!sConditionMgr->IsObjectMeetToConditions(_player, vendor, conditions)) + { + sLog->outDebug(LOG_FILTER_CONDITIONSYS, "SendListInventory: conditions not met for creature entry %u item %u", vendor->GetEntry(), vendorItem->item); + continue; + } + int32 price = vendorItem->IsGoldRequired(itemTemplate) ? uint32(floor(itemTemplate->BuyPrice * discountMod)) : 0; if (int32 priceMod = _player->GetTotalAuraModifier(SPELL_AURA_MOD_VENDOR_ITEMS_PRICES)) |