mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-18 03:15:41 +00:00
feat(Core/Common): add new helpers for time utility (#10207)
This commit is contained in:
@@ -532,11 +532,9 @@ struct npc_dark_iron_attack_generator : public ScriptedAI
|
||||
|
||||
bool AllowStart()
|
||||
{
|
||||
time_t curtime = time(nullptr);
|
||||
tm strDate;
|
||||
localtime_r(&curtime, &strDate);
|
||||
auto minutes = Acore::Time::GetMinutes();
|
||||
|
||||
if (strDate.tm_min == 0 || strDate.tm_min == 30)
|
||||
if (!minutes || minutes == 30)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user