refactor(Core): code cleanup (part 1) (#6361)

This commit is contained in:
Francesco Borzì
2021-06-16 12:58:14 +02:00
committed by GitHub
parent 7dd97ae679
commit 7d9fe22e28
13 changed files with 98 additions and 97 deletions

View File

@@ -13,7 +13,6 @@
#include "Player.h"
#include "SpellMgr.h"
#include "Vehicle.h"
#include "World.h"
//Disable CreatureAI when charmed
void CreatureAI::OnCharmed(bool /*apply*/)
@@ -103,8 +102,10 @@ void CreatureAI::DoZoneInCombat(Creature* creature /*= nullptr*/, float maxRange
// MoveInLineOfSight can be called inside another MoveInLineOfSight and cause stack overflow
void CreatureAI::MoveInLineOfSight_Safe(Unit* who)
{
if (m_MoveInLineOfSight_locked == true)
if (m_MoveInLineOfSight_locked)
{
return;
}
m_MoveInLineOfSight_locked = true;
MoveInLineOfSight(who);
m_MoveInLineOfSight_locked = false;