mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-15 16:26:08 +00:00
feat(Core/Time): Implement saparated manager for game time (#8630)
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
#include "Cell.h"
|
||||
#include "CellImpl.h"
|
||||
#include "Chat.h"
|
||||
#include "GameTime.h"
|
||||
#include "GridNotifiers.h"
|
||||
#include "Group.h"
|
||||
#include "InstanceScript.h"
|
||||
@@ -2250,12 +2251,12 @@ class spell_gen_turkey_marker : public AuraScript
|
||||
{
|
||||
if (GetStackAmount() > stackAmount)
|
||||
{
|
||||
_applyTimes.push_back(World::GetGameTimeMS());
|
||||
_applyTimes.push_back(GameTime::GetGameTimeMS().count());
|
||||
stackAmount++;
|
||||
}
|
||||
|
||||
// pop stack if it expired for us
|
||||
if (_applyTimes.front() + GetMaxDuration() < World::GetGameTimeMS())
|
||||
if (_applyTimes.front() + GetMaxDuration() < GameTime::GetGameTimeMS().count())
|
||||
{
|
||||
stackAmount--;
|
||||
ModStackAmount(-1, AURA_REMOVE_BY_EXPIRE);
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
*/
|
||||
|
||||
#include "Battleground.h"
|
||||
#include "GameTime.h"
|
||||
#include "Player.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
@@ -2716,11 +2717,13 @@ class spell_item_crystal_prison_dummy_dnd : public SpellScript
|
||||
void HandleDummy(SpellEffIndex /* effIndex */)
|
||||
{
|
||||
if (Creature* target = GetHitCreature())
|
||||
{
|
||||
if (target->isDead() && !target->IsPet())
|
||||
{
|
||||
GetCaster()->SummonGameObject(OBJECT_IMPRISONED_DOOMGUARD, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), target->GetOrientation(), 0, 0, 0, 0, uint32(target->GetRespawnTime() - time(nullptr)));
|
||||
GetCaster()->SummonGameObject(OBJECT_IMPRISONED_DOOMGUARD, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), target->GetOrientation(), 0, 0, 0, 0, uint32(target->GetRespawnTime() - GameTime::GetGameTime().count()));
|
||||
target->DespawnOrUnsummon();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Register() override
|
||||
|
||||
Reference in New Issue
Block a user