diff options
author | megamage <none@none> | 2009-05-29 21:27:28 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-05-29 21:27:28 -0500 |
commit | 38c22f419036c35076e6b725053eaedea1630681 (patch) | |
tree | ba62ec458b590eabbf1ecfd53a7c723d3b58714c | |
parent | cc022341ac728a51991a5c1a2572c734403643c6 (diff) |
*make the Rate.Reputation.Gain config option apply to reputation gains inside battlegrounds as well By BudIcePenguin
--HG--
branch : trunk
-rw-r--r-- | src/game/Player.cpp | 2 | ||||
-rw-r--r-- | src/game/ReputationMgr.cpp | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 46975d18fa9..2e96a13dc61 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -5794,7 +5794,7 @@ int32 Player::CalculateReputationGain(uint32 creatureOrQuestLevel, int32 rep, in if (percent <= 0.0f) return 0; - return int32(sWorld.getRate(RATE_REPUTATION_GAIN)*rep*percent/100.0f); + return int32(rep*percent*0.01f); } //Calculates how many reputation points player gains in victim's enemy factions diff --git a/src/game/ReputationMgr.cpp b/src/game/ReputationMgr.cpp index 62b9504daff..5b42e616ac7 100644 --- a/src/game/ReputationMgr.cpp +++ b/src/game/ReputationMgr.cpp @@ -20,6 +20,7 @@ #include "DBCStores.h" #include "Player.h" #include "WorldPacket.h" +#include "World.h" const int32 ReputationMgr::PointsInRank[MAX_REPUTATION_RANK] = {36000, 3000, 3000, 3000, 6000, 12000, 21000, 1000}; @@ -252,7 +253,10 @@ bool ReputationMgr::SetOneFactionReputation(FactionEntry const* factionEntry, in int32 BaseRep = GetBaseReputation(factionEntry); if(incremental) + { + standing *= sWorld.getRate(RATE_REPUTATION_GAIN); //multiply gain by config rate standing += itr->second.Standing + BaseRep; + } if (standing > Reputation_Cap) standing = Reputation_Cap; |