mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-21 20:56:23 +00:00
i.e. world update start
This commit is contained in:
committed by
Francesco Borzì
parent
1b7522ff0e
commit
51b8773528
@@ -5,6 +5,7 @@
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "SpellScript.h"
|
||||
#include "GameTime.h"
|
||||
#include "ulduar.h"
|
||||
#include "Vehicle.h"
|
||||
#include "SpellAuras.h"
|
||||
@@ -261,10 +262,10 @@ public:
|
||||
if (id == 1337)
|
||||
{
|
||||
if (lastShatterMSTime)
|
||||
if (getMSTimeDiff(lastShatterMSTime, World::GetGameTimeMS()) <= 5000)
|
||||
if (getMSTimeDiff(lastShatterMSTime, GameTime::GetGameTimeMS()) <= 5000)
|
||||
bShattered = true;
|
||||
|
||||
lastShatterMSTime = World::GetGameTimeMS();
|
||||
lastShatterMSTime = GameTime::GetGameTimeMS();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "SpellScript.h"
|
||||
#include "GameTime.h"
|
||||
#include "ulduar.h"
|
||||
#include "Vehicle.h"
|
||||
#include "Spell.h"
|
||||
@@ -452,7 +453,7 @@ public:
|
||||
case EVENT_SPAWN_FLAMES_INITIAL:
|
||||
{
|
||||
if (changeAllowedFlameSpreadTime)
|
||||
allowedFlameSpreadTime = time(NULL);
|
||||
allowedFlameSpreadTime = GameTime::GetGameTime();
|
||||
|
||||
std::vector<Player*> pg;
|
||||
Map::PlayerList const &pl = me->GetMap()->GetPlayers();
|
||||
@@ -2236,7 +2237,7 @@ public:
|
||||
|
||||
bool Load()
|
||||
{
|
||||
lastMSTime = World::GetGameTimeMS();
|
||||
lastMSTime = GameTime::GetGameTimeMS();
|
||||
lastOrientation = -1.0f;
|
||||
return true;
|
||||
}
|
||||
@@ -2247,14 +2248,14 @@ public:
|
||||
{
|
||||
if (c->GetTypeId() != TYPEID_UNIT)
|
||||
return;
|
||||
uint32 diff = getMSTimeDiff(lastMSTime, World::GetGameTimeMS());
|
||||
uint32 diff = getMSTimeDiff(lastMSTime, GameTime::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 = World::GetGameTimeMS();
|
||||
lastMSTime = GameTime::GetGameTimeMS();
|
||||
lastOrientation = new_o;
|
||||
c->SetOrientation(new_o);
|
||||
c->SetFacingTo(new_o);
|
||||
@@ -2316,7 +2317,7 @@ public:
|
||||
{
|
||||
npc_ulduar_flames_initialAI(Creature *pCreature) : NullCreatureAI(pCreature)
|
||||
{
|
||||
CreateTime = time(NULL);
|
||||
CreateTime = GameTime::GetGameTime();
|
||||
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,6 +7,7 @@
|
||||
#include "ulduar.h"
|
||||
#include "Vehicle.h"
|
||||
#include "Player.h"
|
||||
#include "GameTime.h"
|
||||
#include "WorldPacket.h"
|
||||
#include "WorldSession.h"
|
||||
#include "Transport.h"
|
||||
@@ -887,10 +888,10 @@ public:
|
||||
}
|
||||
else if (unit->GetTypeId() == TYPEID_UNIT && unit->GetAreaId() == 4656 /*Conservatory of Life*/)
|
||||
{
|
||||
if (time(NULL) > (m_conspeedatoryAttempt + DAY))
|
||||
if (GameTime::GetGameTime() > (m_conspeedatoryAttempt + DAY))
|
||||
{
|
||||
DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, 21597 /*CON-SPEED-ATORY_TIMED_CRITERIA*/);
|
||||
m_conspeedatoryAttempt = time(NULL);
|
||||
m_conspeedatoryAttempt = GameTime::GetGameTime();
|
||||
SaveToDB();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user