From 2c2e8e1c29c7b85939c71fb1fb4b087261c545a7 Mon Sep 17 00:00:00 2001 From: talamortis Date: Tue, 13 Feb 2018 11:25:24 +0000 Subject: [PATCH] Fixed crash on linux build. --- conf/reward_system.conf.dist | 9 ++++++++- src/reward_system.cpp | 4 ++-- 2 files changed, 10 insertions(+), 3 deletions(-) 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); } } };