For example.
http://wowhead.com/npc=32216 this vendor show http://wowhead.com/item=44689 only for Alliance
and show http://wowhead.com/item=44690 only for Horde
diff --git a/src/game/ItemHandler.cpp b/src/game/ItemHandler.cpp
index 41796a7..3d9057e 100644
--- a/src/game/ItemHandler.cpp
+++ b/src/game/ItemHandler.cpp
@@ -756,7 +756,8 @@ void WorldSession::SendListInventory(uint64 vendorguid)
{
if((pProto->AllowableClass & _player->getClassMask()) == 0 && pProto->Bonding == BIND_WHEN_PICKED_UP && !_player->isGameMaster())
continue;
-
+ if((pProto->AllowableRace & _player->getRaceMask()) == 0 && pProto->Bonding == BIND_WHEN_PICKED_UP && !_player->isGameMaster())
+ continue;
+
++count;
// reputation discount
and another small fix
If after use filters from vendors will not be a single object that he can offer for sale then the vendor will not open the window
diff --git a/src/game/ItemHandler.cpp b/src/game/ItemHandler.cpp
index 41796a7..ce94160 100644
--- a/src/game/ItemHandler.cpp
+++ b/src/game/ItemHandler.cpp
@@ -774,9 +775,11 @@ void WorldSession::SendListInventory(uint64 vendorguid)
}
}
- if ( count == 0 || data.size() != 8 + 1 + size_t(count) * 8 * 4 )
- return;
-
+ if(data.size() != 8 + 1 + size_t(count) * 8 * 4)
+ return;
+ if ( count == 0 )
+ data << uint8(0);
+
data.put<uint8>(count_pos, count);
SendPacket( &data );
}
+ if ( count == 0 )
+ data << uint8(0);
package from Offy has length of 10 bytes
but we have if vendor does not offer any item for sale, package have length 9 bytes
This actually appends bytes