aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Entities/Creature/Creature.cpp3
-rw-r--r--src/server/game/Movement/PathGenerator.cpp1
-rw-r--r--src/server/scripts/Kalimdor/OnyxiasLair/boss_onyxia.cpp19
-rw-r--r--src/server/scripts/Kalimdor/OnyxiasLair/onyxias_lair.h2
4 files changed, 16 insertions, 9 deletions
diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp
index 6a6caa72e76..8f4788aa79a 100644
--- a/src/server/game/Entities/Creature/Creature.cpp
+++ b/src/server/game/Entities/Creature/Creature.cpp
@@ -814,6 +814,9 @@ bool Creature::Create(uint32 guidlow, Map* map, uint32 /*phaseMask*/, uint32 ent
m_serverSideVisibilityDetect.SetValue(SERVERSIDE_VISIBILITY_GHOST, GHOST_VISIBILITY_GHOST);
}
+ if (GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_IGNORE_PATHFINDING)
+ AddUnitState(UNIT_STATE_IGNORE_PATHFINDING);
+
return true;
}
diff --git a/src/server/game/Movement/PathGenerator.cpp b/src/server/game/Movement/PathGenerator.cpp
index 6acee7f7a9c..2ef465f6775 100644
--- a/src/server/game/Movement/PathGenerator.cpp
+++ b/src/server/game/Movement/PathGenerator.cpp
@@ -76,7 +76,6 @@ bool PathGenerator::CalculatePath(float destX, float destY, float destZ, bool fo
// make sure navMesh works - we can run on map w/o mmap
// check if the start and end point have a .mmtile loaded (can we pass via not loaded tile on the way?)
if (!_navMesh || !_navMeshQuery || _sourceUnit->HasUnitState(UNIT_STATE_IGNORE_PATHFINDING) ||
- (_sourceUnit->GetTypeId() == TYPEID_UNIT && _sourceUnit->ToCreature()->GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_IGNORE_PATHFINDING) ||
!HaveTile(start) || !HaveTile(dest))
{
BuildShortcut();
diff --git a/src/server/scripts/Kalimdor/OnyxiasLair/boss_onyxia.cpp b/src/server/scripts/Kalimdor/OnyxiasLair/boss_onyxia.cpp
index 3c8e06b59a9..62c85491a20 100644
--- a/src/server/scripts/Kalimdor/OnyxiasLair/boss_onyxia.cpp
+++ b/src/server/scripts/Kalimdor/OnyxiasLair/boss_onyxia.cpp
@@ -131,16 +131,11 @@ public:
{
boss_onyxiaAI(Creature* creature) : BossAI(creature, DATA_ONYXIA)
{
- Reset();
+ Initialize();
}
- void Reset() override
+ void Initialize()
{
- if (!IsCombatMovementAllowed())
- SetCombatMovement(true);
-
- _Reset();
-
Phase = PHASE_START;
MovePoint = urand(0, 5);
PointData = GetMoveData();
@@ -148,6 +143,16 @@ public:
triggerGUID = 0;
tankGUID = 0;
IsMoving = false;
+ }
+
+ void Reset() override
+ {
+ Initialize();
+
+ if (!IsCombatMovementAllowed())
+ SetCombatMovement(true);
+
+ _Reset();
instance->SetData(DATA_ONYXIA_PHASE, Phase);
instance->DoStopTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT);
diff --git a/src/server/scripts/Kalimdor/OnyxiasLair/onyxias_lair.h b/src/server/scripts/Kalimdor/OnyxiasLair/onyxias_lair.h
index 9fd73f7a977..c31988843fe 100644
--- a/src/server/scripts/Kalimdor/OnyxiasLair/onyxias_lair.h
+++ b/src/server/scripts/Kalimdor/OnyxiasLair/onyxias_lair.h
@@ -37,7 +37,7 @@ enum Data32
enum Data64
{
DATA_ONYXIA_GUID = 0,
- DATA_FLOOR_ERUPTION_GUID = 1,
+ DATA_FLOOR_ERUPTION_GUID = 1
};
enum OnyxiaPhases