mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-22 21:26:23 +00:00
fix(Core/AI): Reduce movement leash extension interval. (#19923)
* Init. * Use GetGameTime() instead of system call. Co-Authored-By: Anton Popovichenko <walkline.ua@gmail.com> * Update leash timer if rooted. * Remove unnecessary checks, add extension for fanning. More parity with VMaNGOS implementation. --------- Co-authored-by: Anton Popovichenko <walkline.ua@gmail.com>
This commit is contained in:
@@ -3678,7 +3678,7 @@ bool Creature::IsNotReachableAndNeedRegen() const
|
||||
std::shared_ptr<time_t> const& Creature::GetLastLeashExtensionTimePtr() const
|
||||
{
|
||||
if (m_lastLeashExtensionTime == nullptr)
|
||||
m_lastLeashExtensionTime = std::make_shared<time_t>(time(nullptr));
|
||||
m_lastLeashExtensionTime = std::make_shared<time_t>(GameTime::GetGameTime().count());
|
||||
return m_lastLeashExtensionTime;
|
||||
}
|
||||
|
||||
@@ -3699,7 +3699,7 @@ time_t Creature::GetLastLeashExtensionTime() const
|
||||
|
||||
void Creature::UpdateLeashExtensionTime()
|
||||
{
|
||||
(*GetLastLeashExtensionTimePtr()) = time(nullptr);
|
||||
(*GetLastLeashExtensionTimePtr()) = GameTime::GetGameTime().count();
|
||||
}
|
||||
|
||||
bool Creature::CanPeriodicallyCallForAssistance() const
|
||||
|
||||
Reference in New Issue
Block a user