mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-22 13:16:23 +00:00
feat(Core/Time): Implement saparated manager for game time (#8630)
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "GameTime.h"
|
||||
#include "Group.h"
|
||||
#include "Player.h"
|
||||
#include "ScriptMgr.h"
|
||||
@@ -348,7 +349,7 @@ public:
|
||||
c->DespawnOrUnsummon(10000);
|
||||
if( Creature* c = instance->GetCreature(NPC_DreadscaleGUID) )
|
||||
c->DespawnOrUnsummon(10000);
|
||||
if( AchievementTimer + 10 >= time(nullptr) )
|
||||
if( AchievementTimer + 10 >= GameTime::GetGameTime().count() )
|
||||
DoUpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET, SPELL_JORMUNGAR_ACHIEV);
|
||||
AchievementTimer = 0;
|
||||
|
||||
@@ -365,7 +366,7 @@ public:
|
||||
}
|
||||
else // first one died, start timer for achievement
|
||||
{
|
||||
AchievementTimer = time(nullptr);
|
||||
AchievementTimer = GameTime::GetGameTime().count();
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -447,14 +448,14 @@ public:
|
||||
|
||||
HandleGameObject(GO_EnterGateGUID, true);
|
||||
|
||||
if( AchievementTimer + 60 >= time(nullptr) )
|
||||
if( AchievementTimer + 60 >= GameTime::GetGameTime().count() )
|
||||
DoUpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET, SPELL_RESILIENCE_WILL_FIX_IT_CREDIT);
|
||||
AchievementTimer = 0;
|
||||
|
||||
SaveToDB();
|
||||
}
|
||||
else if( Counter == 1 )
|
||||
AchievementTimer = time(nullptr);
|
||||
AchievementTimer = GameTime::GetGameTime().count();
|
||||
}
|
||||
break;
|
||||
case TYPE_FACTION_CHAMPIONS_START:
|
||||
|
||||
Reference in New Issue
Block a user