diff --git a/conf/reward_system.conf.dist b/conf/reward_system.conf.dist index e310e11..a929549 100644 --- a/conf/reward_system.conf.dist +++ b/conf/reward_system.conf.dist @@ -12,4 +12,11 @@ RewardSystemEnable = 1 # Description: Time in hours to reward the player # Default: 1 - (Enabled) # -RewardTime = 1 \ No newline at end of file +RewardTime = 1 + +# +# MaxRoll +# Description: Max roll the player will do +# Default: 1000 - (Enabled) +# +MaxRoll = 1000 \ No newline at end of file diff --git a/src/reward_system.cpp b/src/reward_system.cpp index 7c0db66..996a983 100644 --- a/src/reward_system.cpp +++ b/src/reward_system.cpp @@ -8,6 +8,7 @@ #include "GossipDef.h" bool RewardSystem_Enable; +uint32 Max_roll; class reward_system : public PlayerScript { @@ -16,7 +17,6 @@ public: uint32 RewardTimer; int32 roll; - uint32 Max_roll; void OnLogin(Player* p) { @@ -49,7 +49,6 @@ public: } //Lets now get the item - do { Field* fields = result->Fetch(); @@ -90,6 +89,7 @@ public: sConfigMgr->LoadMore(cfg_def_file.c_str()); sConfigMgr->LoadMore(cfg_file.c_str()); RewardSystem_Enable = sConfigMgr->GetBoolDefault("RewardSystemEnable", true); + Max_roll = sConfigMgr->GetIntDefault("MaxRoll", 1000); } } };