Jump to content

[fix] Arena auto distribution points time delaying problem


Guest Casso

Recommended Posts

What bug does the patch fix? What features does the patch add?

This fix removes problem with delaying time of auto pointsdistribution. Every week the time of distribution is delayed by 0-10 minutes. Servers with 1 day distribution period has serious problem (1 week makes about 30-40 min. delay).

For which repository revision was the patch created?

Most master & 0.12 rev.

Who has been writing this patch?

Casso

src/game/BattleGroundMgr.cpp

@@ -1201,11 +1201,11 @@ void BattleGroundMgr::Update(uint32 diff)
        if (m_AutoDistributionTimeChecker < diff)
        {
            if (sWorld.GetGameTime() > m_NextAutoDistributionTime)
            {
                DistributeArenaPoints();
-                m_NextAutoDistributionTime = time_t(sWorld.GetGameTime() + BATTLEGROUND_ARENA_POINT_DISTRIBUTION_DAY * sWorld.getConfig(CONFIG_UINT32_ARENA_AUTO_DISTRIBUTE_INTERVAL_DAYS));
+                m_NextAutoDistributionTime += time_t(BATTLEGROUND_ARENA_POINT_DISTRIBUTION_DAY * sWorld.getConfig(CONFIG_UINT32_ARENA_AUTO_DISTRIBUTE_INTERVAL_DAYS));
                CharacterDatabase.PExecute("UPDATE saved_variables SET NextArenaPointDistributionTime = '"UI64FMTD"'", uint64(m_NextAutoDistributionTime));
            }
            m_AutoDistributionTimeChecker = 600000; // check 10 minutes
        }
        else

(Sorry for my english, I am from slovakia)

Link to comment
Share on other sites

  • 1 year later...
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use