mirror of
https://github.com/freekode/mod-reward-played-time-improved.git
synced 2026-01-13 08:37:18 +00:00
fixed an issue where timer wouldnt refresh
This commit is contained in:
@@ -25,6 +25,7 @@ public:
|
||||
{
|
||||
roll = urand(1, 1000); //Lets make a random number from 1 - 1000
|
||||
QueryResult result = CharacterDatabase.PQuery("SELECT item, quantity FROM reward_system WHERE roll = '%u'", roll);
|
||||
rewardtimer = urand(2 * HOUR*IN_MILLISECONDS, 4 * HOUR*IN_MILLISECONDS);
|
||||
|
||||
if (!result || player->isAFK())
|
||||
return;
|
||||
@@ -38,7 +39,6 @@ public:
|
||||
// now lets add the item
|
||||
player->AddItem(pItem, quantity);
|
||||
|
||||
rewardtimer = urand(2 * HOUR*IN_MILLISECONDS, 4 * HOUR*IN_MILLISECONDS);
|
||||
ChatHandler(player->GetSession()).PSendSysMessage("You have rolled %u which gave you item %u", roll, pItem);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user