*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
This commit is contained in:
+5
-5
@@ -560,11 +560,11 @@ class TRINITY_DLL_SPEC WorldObject : public Object
|
||||
bool IsTempWorldObject;
|
||||
|
||||
#ifdef MAP_BASED_RAND_GEN
|
||||
int32 irand(int32 min, int32 max) const { int32 (GetMap()->mtRand.randInt(max - min)) + min; }
|
||||
uint32 urand(uint32 min, uint32 max) const { GetMap()->mtRand.randInt(max - min) + min}
|
||||
int32 rand32() const { GetMap()->mtRand.randInt()}
|
||||
double rand_norm() const { GetMap()->mtRand.randExc()}
|
||||
double rand_chance() const { GetMap()->mtRand.randExc(100.0)}
|
||||
int32 irand(int32 min, int32 max) const { return int32 (GetMap()->mtRand.randInt(max - min)) + min; }
|
||||
uint32 urand(uint32 min, uint32 max) const { return GetMap()->mtRand.randInt(max - min) + min;}
|
||||
int32 rand32() const { return GetMap()->mtRand.randInt();}
|
||||
double rand_norm() const { return GetMap()->mtRand.randExc();}
|
||||
double rand_chance() const { return GetMap()->mtRand.randExc(100.0);}
|
||||
#endif
|
||||
|
||||
protected:
|
||||
|
||||
+2
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user