diff options
author | QAston <none@none> | 2009-08-03 16:35:33 +0200 |
---|---|---|
committer | QAston <none@none> | 2009-08-03 16:35:33 +0200 |
commit | 7569bb343a532ca6d080ad48bcb8275b3a182ddb (patch) | |
tree | 4d2111fce42ae760a1feabea207eb2f3c089b911 /src/game/Player.cpp | |
parent | b4a2ece56cf0ea04f972d73982e8a3af33c62135 (diff) |
*Add Rate.RepairCost config option - by MaXiMiUS
*Apply tc sql coding style to 4737_world_TDB.sql - by Drahy
*Fix build with MAP_BASED_RAND_GEN option.
--HG--
branch : trunk
Diffstat (limited to 'src/game/Player.cpp')
-rw-r--r-- | src/game/Player.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp index a319bf4317e..2da613aab8e 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -20,6 +20,7 @@ #include "Common.h" #include "Language.h" +#include "Config/ConfigEnv.h" #include "Database/DatabaseEnv.h" #include "Log.h" #include "Opcodes.h" @@ -4531,7 +4532,7 @@ uint32 Player::DurabilityRepair(uint16 pos, bool cost, float discountMod, bool g uint32 dmultiplier = dcost->multiplier[ItemSubClassToDurabilityMultiplierId(ditemProto->Class,ditemProto->SubClass)]; uint32 costs = uint32(LostDurability*dmultiplier*double(dQualitymodEntry->quality_mod)); - costs = uint32(costs * discountMod); + costs = uint32(costs * discountMod) * sConfig.GetFloatDefault("Rate.RepairCost", 1); if (costs==0) //fix for ITEM_QUALITY_ARTIFACT costs = 1; |