mirror of
https://github.com/noisiver/mod-weekendbonus.git
synced 2026-01-13 00:58:36 +00:00
Fix
Fixed an issue that caused Monday to also count as the weekend.
This commit is contained in:
@@ -84,13 +84,13 @@ class WeekendBonusWorld : WorldScript
|
|||||||
{
|
{
|
||||||
localTime = time(NULL);
|
localTime = time(NULL);
|
||||||
|
|
||||||
if (localtime(&localTime)->tm_wday == Day::FRIDAY && localtime(&localTime)->tm_hour == 0 && localtime(&localTime)->tm_min == 0 && !triggered)
|
if (localtime(&localTime)->tm_wday == Day::FRIDAY && !triggered)
|
||||||
{
|
{
|
||||||
sWorld->SendServerMessage(SERVER_MSG_STRING, "The weekend bonus is now active, granting you bonuses!");
|
sWorld->SendServerMessage(SERVER_MSG_STRING, "The weekend bonus is now active, granting you bonuses!");
|
||||||
SetWorldRates(true);
|
SetWorldRates(true);
|
||||||
triggered = true;
|
triggered = true;
|
||||||
}
|
}
|
||||||
else if (localtime(&localTime)->tm_wday == Day::MONDAY && localtime(&localTime)->tm_hour == 0 && localtime(&localTime)->tm_min == 0 && triggered)
|
else if (localtime(&localTime)->tm_wday == Day::MONDAY && triggered)
|
||||||
{
|
{
|
||||||
sWorld->SendServerMessage(SERVER_MSG_STRING, "The weekend bonus is no longer active.");
|
sWorld->SendServerMessage(SERVER_MSG_STRING, "The weekend bonus is no longer active.");
|
||||||
SetWorldRates(false);
|
SetWorldRates(false);
|
||||||
|
|||||||
Reference in New Issue
Block a user