From 8268adc93236214986a08f6f58b6ce65037f6749 Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 15 Mar 2010 06:19:27 -0600 Subject: [PATCH] * Added support for only displaying items from vendors for the team the * player is on. Faction field in item_template is actually team, and will * be renamed in a later patch. * 1 == Horde / 2 == Alliance * Thanks Aokromes for helping research / test --HG-- branch : trunk --- src/game/ItemHandler.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/game/ItemHandler.cpp b/src/game/ItemHandler.cpp index b36fd84492..4cc3758f26 100644 --- a/src/game/ItemHandler.cpp +++ b/src/game/ItemHandler.cpp @@ -746,7 +746,13 @@ void WorldSession::SendListInventory( uint64 vendorguid ) { if((pProto->AllowableClass & _player->getClassMask()) == 0 && pProto->Bonding == BIND_WHEN_PICKED_UP && !_player->isGameMaster()) continue; - + // Only display items in vendor lists for the team the + // player is on. If GM on, display all items. + // `item_template`.`Faction` is actually `Team`. + // 1 == Horde / 2 == Alliance. Field will be renamed in later + // patch. + if (pProto->Faction == 1 && _player->GetTeam() == ALLIANCE || pProto->Faction == 2 && _player->GetTeam() == HORDE && !_player->isGameMaster()) + continue; ++count; // reputation discount