mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
Correction made to file name
Correction made to file name
This commit is contained in:
parent
2cffff301e
commit
ada080f9c0
8 changed files with 11 additions and 11 deletions
|
|
@ -55,7 +55,7 @@ AggressorAI::MoveInLineOfSight(Unit* u)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (m_creature->CanInitiateAttack() && u->IsTargetableForAttack() &&
|
if (m_creature->CanInitiateAttack() && u->IsTargetableForAttack() &&
|
||||||
m_creature->IsHostileTo(u) && u->IsInAccessablePlaceFor(m_creature))
|
m_creature->IsHostileTo(u) && u->isInAccessablePlaceFor(m_creature))
|
||||||
{
|
{
|
||||||
float attackRadius = m_creature->GetAttackDistance(u);
|
float attackRadius = m_creature->GetAttackDistance(u);
|
||||||
if (m_creature->IsWithinDistInMap(u, attackRadius) && m_creature->IsWithinLOSInMap(u))
|
if (m_creature->IsWithinDistInMap(u, attackRadius) && m_creature->IsWithinLOSInMap(u))
|
||||||
|
|
|
||||||
|
|
@ -2092,7 +2092,7 @@ bool Creature::IsOutOfThreatArea(Unit* pVictim) const
|
||||||
if (!pVictim->IsTargetableForAttack())
|
if (!pVictim->IsTargetableForAttack())
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (!pVictim->IsInAccessablePlaceFor(this))
|
if (!pVictim->isInAccessablePlaceFor(this))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (!pVictim->IsVisibleForOrDetect(this, this, false))
|
if (!pVictim->IsVisibleForOrDetect(this, this, false))
|
||||||
|
|
|
||||||
|
|
@ -1270,7 +1270,7 @@ void CreatureEventAI::MoveInLineOfSight(Unit* who)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (m_creature->CanInitiateAttack() && who->IsTargetableForAttack() &&
|
if (m_creature->CanInitiateAttack() && who->IsTargetableForAttack() &&
|
||||||
m_creature->IsHostileTo(who) && who->IsInAccessablePlaceFor(m_creature))
|
m_creature->IsHostileTo(who) && who->isInAccessablePlaceFor(m_creature))
|
||||||
{
|
{
|
||||||
if (!m_creature->CanFly() && m_creature->GetDistanceZ(who) > CREATURE_Z_ATTACK_RANGE)
|
if (!m_creature->CanFly() && m_creature->GetDistanceZ(who) > CREATURE_Z_ATTACK_RANGE)
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ void GuardAI::MoveInLineOfSight(Unit* u)
|
||||||
|
|
||||||
if (!m_creature->getVictim() && u->IsTargetableForAttack() &&
|
if (!m_creature->getVictim() && u->IsTargetableForAttack() &&
|
||||||
(u->IsHostileToPlayers() || m_creature->IsHostileTo(u) /*|| u->getVictim() && m_creature->IsFriendlyTo(u->getVictim())*/) &&
|
(u->IsHostileToPlayers() || m_creature->IsHostileTo(u) /*|| u->getVictim() && m_creature->IsFriendlyTo(u->getVictim())*/) &&
|
||||||
u->IsInAccessablePlaceFor(m_creature))
|
u->isInAccessablePlaceFor(m_creature))
|
||||||
{
|
{
|
||||||
float attackRadius = m_creature->GetAttackDistance(u);
|
float attackRadius = m_creature->GetAttackDistance(u);
|
||||||
if (m_creature->IsWithinDistInMap(u, attackRadius))
|
if (m_creature->IsWithinDistInMap(u, attackRadius))
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ void PetAI::MoveInLineOfSight(Unit* u)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (u->IsTargetableForAttack() && m_creature->IsHostileTo(u) &&
|
if (u->IsTargetableForAttack() && m_creature->IsHostileTo(u) &&
|
||||||
u->IsInAccessablePlaceFor(m_creature))
|
u->isInAccessablePlaceFor(m_creature))
|
||||||
{
|
{
|
||||||
float attackRadius = m_creature->GetAttackDistance(u);
|
float attackRadius = m_creature->GetAttackDistance(u);
|
||||||
if (m_creature->IsWithinDistInMap(u, attackRadius) && m_creature->GetDistanceZ(u) <= CREATURE_Z_ATTACK_RANGE)
|
if (m_creature->IsWithinDistInMap(u, attackRadius) && m_creature->GetDistanceZ(u) <= CREATURE_Z_ATTACK_RANGE)
|
||||||
|
|
|
||||||
|
|
@ -4033,7 +4033,7 @@ void Unit::SetFacingToObject(WorldObject* pObject)
|
||||||
SetFacingTo(GetAngle(pObject));
|
SetFacingTo(GetAngle(pObject));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Unit::IsInAccessablePlaceFor(Creature const* c) const
|
bool Unit::isInAccessablePlaceFor(Creature const* c) const
|
||||||
{
|
{
|
||||||
if (IsInWater())
|
if (IsInWater())
|
||||||
return c->CanSwim();
|
return c->CanSwim();
|
||||||
|
|
@ -9545,7 +9545,7 @@ bool Unit::SelectHostileTarget()
|
||||||
for (AuraList::const_reverse_iterator aura = tauntAuras.rbegin(); aura != tauntAuras.rend(); ++aura)
|
for (AuraList::const_reverse_iterator aura = tauntAuras.rbegin(); aura != tauntAuras.rend(); ++aura)
|
||||||
{
|
{
|
||||||
if ((caster = (*aura)->GetCaster()) && caster->IsInMap(this) &&
|
if ((caster = (*aura)->GetCaster()) && caster->IsInMap(this) &&
|
||||||
caster->IsTargetableForAttack() && caster->IsInAccessablePlaceFor((Creature*)this) &&
|
caster->IsTargetableForAttack() && caster->isInAccessablePlaceFor((Creature*)this) &&
|
||||||
!IsSecondChoiceTarget(caster, true))
|
!IsSecondChoiceTarget(caster, true))
|
||||||
{
|
{
|
||||||
target = caster;
|
target = caster;
|
||||||
|
|
@ -9608,7 +9608,7 @@ bool Unit::SelectHostileTarget()
|
||||||
{
|
{
|
||||||
for (AttackerSet::const_iterator itr = m_attackers.begin(); itr != m_attackers.end(); ++itr)
|
for (AttackerSet::const_iterator itr = m_attackers.begin(); itr != m_attackers.end(); ++itr)
|
||||||
{
|
{
|
||||||
if ((*itr)->IsInMap(this) && (*itr)->IsTargetableForAttack() && (*itr)->IsInAccessablePlaceFor((Creature*)this))
|
if ((*itr)->IsInMap(this) && (*itr)->IsTargetableForAttack() && (*itr)->isInAccessablePlaceFor((Creature*)this))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2415,9 +2415,9 @@ class Unit : public WorldObject
|
||||||
* accessible.
|
* accessible.
|
||||||
* @param c The \ref Creature to check accessibility for
|
* @param c The \ref Creature to check accessibility for
|
||||||
* @return true if this \ref Unit is accessible to the \ref Creature given, false otherwise
|
* @return true if this \ref Unit is accessible to the \ref Creature given, false otherwise
|
||||||
* \todo Rename to IsInAccessablePlaceFor to follow standards?
|
* \todo Rename to isInAccessablePlaceFor to follow standards?
|
||||||
*/
|
*/
|
||||||
bool IsInAccessablePlaceFor(Creature const* c) const;
|
bool isInAccessablePlaceFor(Creature const* c) const;
|
||||||
|
|
||||||
void SendHealSpellLog(Unit* pVictim, uint32 SpellID, uint32 Damage, uint32 OverHeal, bool critical = false, uint32 absorb = 0);
|
void SendHealSpellLog(Unit* pVictim, uint32 SpellID, uint32 Damage, uint32 OverHeal, bool critical = false, uint32 absorb = 0);
|
||||||
void SendEnergizeSpellLog(Unit* pVictim, uint32 SpellID, uint32 Damage, Powers powertype);
|
void SendEnergizeSpellLog(Unit* pVictim, uint32 SpellID, uint32 Damage, Powers powertype);
|
||||||
|
|
|
||||||
|
|
@ -148,7 +148,7 @@ void HostileReference::updateOnlineStatus()
|
||||||
!getTarget()->IsTaxiFlying()))
|
!getTarget()->IsTaxiFlying()))
|
||||||
{
|
{
|
||||||
Creature* creature = (Creature*) getSourceUnit();
|
Creature* creature = (Creature*) getSourceUnit();
|
||||||
online = getTarget()->IsInAccessablePlaceFor(creature);
|
online = getTarget()->isInAccessablePlaceFor(creature);
|
||||||
if (!online)
|
if (!online)
|
||||||
{
|
{
|
||||||
if (creature->AI()->canReachByRangeAttack(getTarget()))
|
if (creature->AI()->canReachByRangeAttack(getTarget()))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue