Fixed crash on linux build.

This commit is contained in:
talamortis
2018-02-13 11:25:24 +00:00
parent 9b4be84789
commit 2c2e8e1c29
2 changed files with 10 additions and 3 deletions

View File

@@ -12,4 +12,11 @@ RewardSystemEnable = 1
# Description: Time in hours to reward the player # Description: Time in hours to reward the player
# Default: 1 - (Enabled) # Default: 1 - (Enabled)
# #
RewardTime = 1 RewardTime = 1
#
# MaxRoll
# Description: Max roll the player will do
# Default: 1000 - (Enabled)
#
MaxRoll = 1000

View File

@@ -8,6 +8,7 @@
#include "GossipDef.h" #include "GossipDef.h"
bool RewardSystem_Enable; bool RewardSystem_Enable;
uint32 Max_roll;
class reward_system : public PlayerScript class reward_system : public PlayerScript
{ {
@@ -16,7 +17,6 @@ public:
uint32 RewardTimer; uint32 RewardTimer;
int32 roll; int32 roll;
uint32 Max_roll;
void OnLogin(Player* p) void OnLogin(Player* p)
{ {
@@ -49,7 +49,6 @@ public:
} }
//Lets now get the item //Lets now get the item
do do
{ {
Field* fields = result->Fetch(); Field* fields = result->Fetch();
@@ -90,6 +89,7 @@ public:
sConfigMgr->LoadMore(cfg_def_file.c_str()); sConfigMgr->LoadMore(cfg_def_file.c_str());
sConfigMgr->LoadMore(cfg_file.c_str()); sConfigMgr->LoadMore(cfg_file.c_str());
RewardSystem_Enable = sConfigMgr->GetBoolDefault("RewardSystemEnable", true); RewardSystem_Enable = sConfigMgr->GetBoolDefault("RewardSystemEnable", true);
Max_roll = sConfigMgr->GetIntDefault("MaxRoll", 1000);
} }
} }
}; };