aboutsummaryrefslogtreecommitdiff
path: root/src/game/ItemHandler.cpp
diff options
context:
space:
mode:
authorBrian <runningnak3d@gmail.com>2010-03-15 06:19:27 -0600
committerBrian <runningnak3d@gmail.com>2010-03-15 06:19:27 -0600
commit8268adc93236214986a08f6f58b6ce65037f6749 (patch)
tree0ee4faac9ddf21ace7b6e6b4f69640194de1f5ec /src/game/ItemHandler.cpp
parentf9566e08ac05fd0f3cfca069e0fed4f885550efb (diff)
* 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
Diffstat (limited to 'src/game/ItemHandler.cpp')
-rw-r--r--src/game/ItemHandler.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/game/ItemHandler.cpp b/src/game/ItemHandler.cpp
index b36fd844923..4cc3758f269 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