diff options
author | Vincent-Michael <Vincent_Michael@gmx.de> | 2014-09-09 19:22:01 +0200 |
---|---|---|
committer | Vincent-Michael <Vincent_Michael@gmx.de> | 2014-09-09 19:22:41 +0200 |
commit | 48297860f1f26df444d04293418984226d84a0dd (patch) | |
tree | 342516968bf1f32ec88d95c8347b17fd12edd475 /src | |
parent | 8b41754854c978551233584ec3582cc3898d218e (diff) | |
parent | a2ba49afa428ed9297f98bf8a5e00f6f7a6f4c3a (diff) |
Merge commit 'a2ba49afa428ed9297f98bf8a5e00f6f7a6f4c3a' into 4.3.4
Diffstat (limited to 'src')
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 |