mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
[Build] Most errors fixed
This commit is contained in:
parent
868302dd0b
commit
778052084e
70 changed files with 619 additions and 602 deletions
|
|
@ -59,7 +59,7 @@ void PetAI::MoveInLineOfSight(Unit* u)
|
|||
if (!m_creature->GetCharmInfo() || !m_creature->GetCharmInfo()->HasReactState(REACT_AGGRESSIVE))
|
||||
return;
|
||||
|
||||
if (u->isTargetableForAttack() && m_creature->IsHostileTo(u) &&
|
||||
if (u->IsTargetableForAttack() && m_creature->IsHostileTo(u) &&
|
||||
u->isInAccessablePlaceFor(m_creature))
|
||||
{
|
||||
float attackRadius = m_creature->GetAttackDistance(u);
|
||||
|
|
@ -105,7 +105,7 @@ bool PetAI::_needToStop() const
|
|||
if (m_creature->isCharmed() && m_creature->getVictim() == m_creature->GetCharmer())
|
||||
return true;
|
||||
|
||||
return !m_creature->getVictim()->isTargetableForAttack();
|
||||
return !m_creature->getVictim()->IsTargetableForAttack();
|
||||
}
|
||||
|
||||
void PetAI::_stopAttack()
|
||||
|
|
@ -128,7 +128,7 @@ void PetAI::_stopAttack()
|
|||
|
||||
void PetAI::UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!m_creature->isAlive())
|
||||
if (!m_creature->IsAlive())
|
||||
return;
|
||||
|
||||
Unit* owner = m_creature->GetCharmerOrOwner();
|
||||
|
|
@ -180,7 +180,7 @@ void PetAI::UpdateAI(const uint32 diff)
|
|||
}
|
||||
else if (owner && m_creature->GetCharmInfo())
|
||||
{
|
||||
if (owner->isInCombat() && !(m_creature->GetCharmInfo()->HasReactState(REACT_PASSIVE) || m_creature->GetCharmInfo()->HasCommandState(COMMAND_STAY)))
|
||||
if (owner->IsInCombat() && !(m_creature->GetCharmInfo()->HasReactState(REACT_PASSIVE) || m_creature->GetCharmInfo()->HasCommandState(COMMAND_STAY)))
|
||||
{
|
||||
AttackStart(owner->getAttackerForHelper());
|
||||
}
|
||||
|
|
@ -310,7 +310,7 @@ void PetAI::UpdateAI(const uint32 diff)
|
|||
bool PetAI::_isVisible(Unit* u) const
|
||||
{
|
||||
return m_creature->IsWithinDist(u, sWorld.getConfig(CONFIG_FLOAT_SIGHT_GUARDER))
|
||||
&& u->isVisibleForOrDetect(m_creature, m_creature, true);
|
||||
&& u->IsVisibleForOrDetect(m_creature, m_creature, true);
|
||||
}
|
||||
|
||||
void PetAI::UpdateAllies()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue