mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 18:40:28 +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 "Player.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
@@ -198,7 +199,7 @@ public:
|
||||
Position pos;
|
||||
pos.Relocate(posVec.at(num));
|
||||
me->m_last_notify_position.Relocate(0.0f, 0.0f, 0.0f);
|
||||
me->m_last_notify_mstime = World::GetGameTimeMS() + 10000;
|
||||
me->m_last_notify_mstime = GameTime::GetGameTimeMS().count() + 10000;
|
||||
|
||||
me->NearTeleportTo(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), pos.GetOrientation());
|
||||
}
|
||||
@@ -310,7 +311,7 @@ public:
|
||||
}
|
||||
|
||||
// Achievement
|
||||
if ((time(nullptr) - GetApplyTime()) > 60 && target->GetTypeId() == TYPEID_PLAYER)
|
||||
if ((GameTime::GetGameTime().count() - GetApplyTime()) > 60 && target->GetTypeId() == TYPEID_PLAYER)
|
||||
target->ToPlayer()->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET, 58934, 0, target);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user