mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-30 09:03:47 +00:00
Revert "feat(core): Ensure that all actions are compared to fixed point in time (#1236) (#1458)" (#1471)
This reverts commit 51b8773528.
This commit is contained in:
@@ -5,7 +5,6 @@
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "SpellScript.h"
|
||||
#include "GameTime.h"
|
||||
#include "ulduar.h"
|
||||
#include "Vehicle.h"
|
||||
#include "SpellAuras.h"
|
||||
@@ -262,10 +261,10 @@ public:
|
||||
if (id == 1337)
|
||||
{
|
||||
if (lastShatterMSTime)
|
||||
if (getMSTimeDiff(lastShatterMSTime, GameTime::GetGameTimeMS()) <= 5000)
|
||||
if (getMSTimeDiff(lastShatterMSTime, World::GetGameTimeMS()) <= 5000)
|
||||
bShattered = true;
|
||||
|
||||
lastShatterMSTime = GameTime::GetGameTimeMS();
|
||||
lastShatterMSTime = World::GetGameTimeMS();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "SpellScript.h"
|
||||
#include "GameTime.h"
|
||||
#include "ulduar.h"
|
||||
#include "Vehicle.h"
|
||||
#include "Spell.h"
|
||||
@@ -453,7 +452,7 @@ public:
|
||||
case EVENT_SPAWN_FLAMES_INITIAL:
|
||||
{
|
||||
if (changeAllowedFlameSpreadTime)
|
||||
allowedFlameSpreadTime = GameTime::GetGameTime();
|
||||
allowedFlameSpreadTime = time(NULL);
|
||||
|
||||
std::vector<Player*> pg;
|
||||
Map::PlayerList const &pl = me->GetMap()->GetPlayers();
|
||||
@@ -2237,7 +2236,7 @@ public:
|
||||
|
||||
bool Load()
|
||||
{
|
||||
lastMSTime = GameTime::GetGameTimeMS();
|
||||
lastMSTime = World::GetGameTimeMS();
|
||||
lastOrientation = -1.0f;
|
||||
return true;
|
||||
}
|
||||
@@ -2248,14 +2247,14 @@ public:
|
||||
{
|
||||
if (c->GetTypeId() != TYPEID_UNIT)
|
||||
return;
|
||||
uint32 diff = getMSTimeDiff(lastMSTime, GameTime::GetGameTimeMS());
|
||||
uint32 diff = getMSTimeDiff(lastMSTime, World::GetGameTimeMS());
|
||||
if (lastOrientation == -1.0f)
|
||||
{
|
||||
lastOrientation = (c->ToCreature()->AI()->GetData(0)*2*M_PI)/100.0f;
|
||||
diff = 0;
|
||||
}
|
||||
float new_o = Position::NormalizeOrientation(lastOrientation-(M_PI/60)*(diff/250.0f));
|
||||
lastMSTime = GameTime::GetGameTimeMS();
|
||||
lastMSTime = World::GetGameTimeMS();
|
||||
lastOrientation = new_o;
|
||||
c->SetOrientation(new_o);
|
||||
c->SetFacingTo(new_o);
|
||||
@@ -2317,7 +2316,7 @@ public:
|
||||
{
|
||||
npc_ulduar_flames_initialAI(Creature *pCreature) : NullCreatureAI(pCreature)
|
||||
{
|
||||
CreateTime = GameTime::GetGameTime();
|
||||
CreateTime = time(NULL);
|
||||
events.Reset();
|
||||
events.ScheduleEvent(EVENT_FLAMES_SPREAD, 5750);
|
||||
if( Creature* flame = me->SummonCreature(NPC_FLAMES_SPREAD, me->GetPositionX(), me->GetPositionY(), 364.32f, 0.0f) )
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
#include "ulduar.h"
|
||||
#include "Vehicle.h"
|
||||
#include "Player.h"
|
||||
#include "GameTime.h"
|
||||
#include "WorldPacket.h"
|
||||
#include "WorldSession.h"
|
||||
#include "Transport.h"
|
||||
@@ -888,10 +887,10 @@ public:
|
||||
}
|
||||
else if (unit->GetTypeId() == TYPEID_UNIT && unit->GetAreaId() == 4656 /*Conservatory of Life*/)
|
||||
{
|
||||
if (GameTime::GetGameTime() > (m_conspeedatoryAttempt + DAY))
|
||||
if (time(NULL) > (m_conspeedatoryAttempt + DAY))
|
||||
{
|
||||
DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, 21597 /*CON-SPEED-ATORY_TIMED_CRITERIA*/);
|
||||
m_conspeedatoryAttempt = GameTime::GetGameTime();
|
||||
m_conspeedatoryAttempt = time(NULL);
|
||||
SaveToDB();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user