mirror of
https://github.com/freekode/mod-reward-played-time-improved.git
synced 2026-01-13 00:28:34 +00:00
Fixed crash on linux build.
This commit is contained in:
@@ -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
|
||||||
@@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user