aboutsummaryrefslogtreecommitdiff
path: root/src/game/Player.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/Player.cpp')
-rw-r--r--src/game/Player.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index 0e7af6e9f83..24c1604fe06 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -18211,11 +18211,19 @@ bool Player::BuyItemFromVendor(uint64 vendorguid, uint32 item, uint8 count, uint
}
}
- if (uint32(GetReputationRank(pProto->RequiredReputationFaction)) < pProto->RequiredReputationRank)
+ if (pProto->RequiredReputationFaction && (uint32(GetReputationRank(pProto->RequiredReputationFaction)) < pProto->RequiredReputationRank))
{
SendBuyError( BUY_ERR_REPUTATION_REQUIRE, pCreature, item, 0);
return false;
}
+ else if (!pProto->RequiredReputationFaction && pProto->RequiredReputationRank > 0)
+ {
+ if (uint32(GetReputationRank(pCreature->getFaction())) < pProto->RequiredReputationRank)
+ {
+ SendBuyError( BUY_ERR_REPUTATION_REQUIRE, pCreature, item, 0);
+ return false;
+ }
+ }
if (crItem->ExtendedCost)
{