diff options
author | Kudlaty <none@none> | 2009-09-21 05:52:58 +0200 |
---|---|---|
committer | Kudlaty <none@none> | 2009-09-21 05:52:58 +0200 |
commit | 45e2f9c002f58e7dc01207ab88f6ffa052860611 (patch) | |
tree | d4acaa9a79090995ef91852719b47457c307a2e5 /src/game/Player.cpp | |
parent | 96cbf2f75b55c14a549829d3848145bef0dcf836 (diff) |
* Add two flags for items with no stack limit
* Added proper checking of faction based on seller for items with RequiredReputaionFaction=0
* This will allow 100% proper WDB data to be used
Thx to Malcrom and Brian
--HG--
branch : trunk
Diffstat (limited to 'src/game/Player.cpp')
-rw-r--r-- | src/game/Player.cpp | 10 |
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) { |