mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-02 10:33:46 +00:00
Fix Evading issue
This commit is contained in:
@@ -212,7 +212,6 @@ Unit::Unit(bool isWorldObject) : WorldObject(isWorldObject),
|
||||
m_vehicleKit(nullptr),
|
||||
m_unitTypeMask(UNIT_MASK_NONE),
|
||||
m_HostileRefMgr(this),
|
||||
m_cannotReachTarget(false),
|
||||
m_comboTarget(nullptr),
|
||||
m_comboPoints(0)
|
||||
{
|
||||
@@ -20787,18 +20786,6 @@ bool Unit::CanRestoreMana(SpellInfo const* spellInfo) const
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Unit::SetCannotReachTarget(bool cannotReach, bool /*isChase = true*/)
|
||||
{
|
||||
if (cannotReach == m_cannotReachTarget)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
m_cannotReachTarget = cannotReach;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Unit::IsInDisallowedMountForm() const
|
||||
{
|
||||
if (SpellInfo const* transformSpellInfo = sSpellMgr->GetSpellInfo(getTransForm()))
|
||||
@@ -20864,3 +20851,18 @@ std::string Unit::GetDebugInfo() const
|
||||
<< " Class: " << std::to_string(getClass());
|
||||
return sstr.str();
|
||||
}
|
||||
|
||||
void Unit::SetCannotReachTargetUnit(bool cannotReach, bool isChase)
|
||||
{
|
||||
if (cannotReach == m_cannotReachTarget)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
m_cannotReachTarget = cannotReach;
|
||||
}
|
||||
|
||||
bool Unit::CanNotReachTarget() const
|
||||
{
|
||||
return m_cannotReachTarget;
|
||||
}
|
||||
|
||||
@@ -2428,10 +2428,11 @@ public:
|
||||
|
||||
[[nodiscard]] bool CanRestoreMana(SpellInfo const* spellInfo) const;
|
||||
|
||||
virtual bool SetCannotReachTarget(bool cannotReach, bool isChase = true);
|
||||
[[nodiscard]] bool CanNotReachTarget() const { return m_cannotReachTarget; }
|
||||
|
||||
std::string GetDebugInfo() const override;
|
||||
void SetCannotReachTargetUnit(bool target, bool isChase);
|
||||
[[nodiscard]] bool CanNotReachTarget() const;
|
||||
|
||||
bool m_cannotReachTarget;
|
||||
|
||||
protected:
|
||||
explicit Unit (bool isWorldObject);
|
||||
@@ -2513,8 +2514,6 @@ protected:
|
||||
bool IsAlwaysDetectableFor(WorldObject const* seer) const override;
|
||||
bool _instantCast;
|
||||
|
||||
bool m_cannotReachTarget;
|
||||
|
||||
private:
|
||||
bool IsTriggeredAtSpellProcEvent(Unit* victim, Aura* aura, WeaponAttackType attType, bool isVictim, bool active, SpellProcEventEntry const*& spellProcEvent, ProcEventInfo const& eventInfo);
|
||||
bool HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggeredByAura, SpellInfo const* procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown, Spell const* spellProc = nullptr);
|
||||
|
||||
Reference in New Issue
Block a user