mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 10:30:27 +00:00
feat(Core/Time): Implement saparated manager for game time (#8630)
This commit is contained in:
@@ -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