Jump to content

[11641] ArenapointDistributionTime - Shifting


Guest DaC

Recommended Posts

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

Arenapoint Distribution Time can shift every week

For which repository revision was the patch created?

MaNGOS One - latest revision

Who has been writing this patch? Please include either forum user names or email addresses.

me

The core checks (per default) all 10 minutes, if it's time to distribute the arena points. Without this patch, the new distribution time would be shifted by the elapsed time from timer, every week!

From f3969a9615287ce9b5b1c2c739aca5b26ba2e76c Mon Sep 17 00:00:00 2001
From: DaC <[email protected]>
Date: Sat, 11 Jun 2011 19:12:34 +0200
Subject: [PATCH] Fix shifting of ArenaPointDistributionTime

---
src/game/BattleGroundMgr.cpp |    2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/game/BattleGroundMgr.cpp b/src/game/BattleGroundMgr.cpp
index 05a3690..8e24d38 100644
--- a/src/game/BattleGroundMgr.cpp
+++ b/src/game/BattleGroundMgr.cpp
@@ -1186,7 +1186,7 @@ void BattleGroundMgr::Update(uint32 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(m_NextAutoDistributionTime + 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
-- 
1.7.0.2.msysgit.0

regards, DaC

Link to comment
Share on other sites

×
×
  • 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