* 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
This commit is contained in:
Brian
2010-03-15 06:19:27 -06:00
parent f9566e08ac
commit 8268adc932
+7 -1
View File
@@ -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