fix(Core/CreatureAI): revert NPC repositioning and path system (temporarily) (#4274)

This commit is contained in:
Stefano Borzì
2021-01-14 19:17:34 +01:00
committed by GitHub
parent b42f2386c2
commit df600f9946
22 changed files with 773 additions and 1418 deletions

View File

@@ -1254,26 +1254,6 @@ private:
GlobalCooldownMgr _GlobalCooldownMgr;
};
struct AttackPosition {
AttackPosition(Position pos) : _pos(pos), _taken(false) {}
bool operator==(const int val)
{
return !val;
};
int operator=(const int val)
{
if (!val)
{
// _pos = NULL;
_taken = false;
return 0; // NULL
}
return 0; // NULL
};
Position _pos;
bool _taken;
};
// for clearing special attacks
#define REACTIVE_TIMER_START 5000
@@ -1424,7 +1404,6 @@ public:
virtual void SetCanDualWield(bool value) { m_canDualWield = value; }
[[nodiscard]] float GetCombatReach() const override { return m_floatValues[UNIT_FIELD_COMBATREACH]; }
[[nodiscard]] float GetMeleeReach() const { float reach = m_floatValues[UNIT_FIELD_COMBATREACH]; return reach > MIN_MELEE_REACH ? reach : MIN_MELEE_REACH; }
[[nodiscard]] bool IsWithinRange(Unit const* obj, float dist) const;
bool IsWithinCombatRange(const Unit* obj, float dist2compare) const;
bool IsWithinMeleeRange(const Unit* obj, float dist = MELEE_RANGE) const;
bool GetRandomContactPoint(const Unit* target, float& x, float& y, float& z, bool force = false) const;
@@ -1454,7 +1433,6 @@ public:
bool AttackStop();
void RemoveAllAttackers();
[[nodiscard]] AttackerSet const& getAttackers() const { return m_attackers; }
[[nodiscard]] Position* GetMeleeAttackPoint(Unit* attacker);
[[nodiscard]] bool isAttackingPlayer() const;
[[nodiscard]] Unit* GetVictim() const { return m_attacking; }
@@ -2195,7 +2173,7 @@ public:
uint32 GetDisplayId() { return GetUInt32Value(UNIT_FIELD_DISPLAYID); }
virtual void SetDisplayId(uint32 modelId);
[[nodiscard]] uint32 GetNativeDisplayId() const { return GetUInt32Value(UNIT_FIELD_NATIVEDISPLAYID); }
uint32 GetNativeDisplayId() { return GetUInt32Value(UNIT_FIELD_NATIVEDISPLAYID); }
void RestoreDisplayId();
void SetNativeDisplayId(uint32 modelId) { SetUInt32Value(UNIT_FIELD_NATIVEDISPLAYID, modelId); }
void setTransForm(uint32 spellid) { m_transform = spellid;}
@@ -2472,8 +2450,6 @@ public:
// Movement info
Movement::MoveSpline* movespline;
[[nodiscard]] float GetCollisionHeight() const override;
protected:
explicit Unit (bool isWorldObject);
@@ -2589,7 +2565,6 @@ private:
HostileRefManager m_HostileRefManager;
FollowerRefManager m_FollowingRefManager;
Unit* m_comboTarget;
ComboPointHolderSet m_ComboPointHolders;