Merge pull request #1 from talamortis/master

fixed an issue
This commit is contained in:
Lee
2017-11-02 20:35:42 +00:00
committed by GitHub

View File

@@ -25,7 +25,8 @@ 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;
else
@@ -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);
}
}