diff options
author | Vincent-Michael <Vincent_Michael@gmx.de> | 2012-12-01 01:49:44 +0100 |
---|---|---|
committer | Vincent-Michael <Vincent_Michael@gmx.de> | 2012-12-01 01:52:20 +0100 |
commit | f957dd462f0618158236d851807b463e3f8a96c6 (patch) | |
tree | 6a68875701f173e12efd9ffb8b3dfe2e19750322 /src/server/game/Handlers/ItemHandler.cpp | |
parent | 8a0bb236c670535830ceb5be85c24c0508465965 (diff) |
Core/Conditions: Implemented CONDITION_SOURCE_TYPE_NPC_VENDOR = 23
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 17d1e31c399..523a1b9453e 100644 --- a/src/server/game/Handlers/ItemHandler.cpp +++ b/src/server/game/Handlers/ItemHandler.cpp @@ -538,9 +538,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) @@ -779,6 +777,13 @@ void WorldSession::SendListInventory(uint64 vendorGuid) if (!_player->isGameMaster() && !leftInStock) continue; + ConditionList conditions = sConditionMgr->GetConditionsForNpcVendorEvent(vendor->GetEntry(), item->item); + if (!sConditionMgr->IsObjectMeetToConditions(_player, vendor, conditions)) + { + sLog->outError(LOG_FILTER_CONDITIONSYS, "SendListInventory: conditions not met for creature entry %u item %u", vendor->GetEntry(), item->item); + continue; + } + ++count; // reputation discount |