Core/Creatures: Remove resetting of UNIT_FLAG_IMMUNE_TO_PC on combat clearing

This commit is contained in:
Aokromes
2016-07-20 15:39:16 +02:00
parent d59e84fcb2
commit 2387591f1a
3 changed files with 5 additions and 9 deletions

View File

@@ -507,6 +507,7 @@ class boss_the_lich_king : public CreatureScript
void SetupEncounter()
{
_Reset();
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
me->SetReactState(REACT_PASSIVE);
events.SetPhase(PHASE_INTRO);
Initialize();

View File

@@ -376,6 +376,8 @@ public:
me->SetDisableGravity(true);
me->SetByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_HOVER);
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
// TO DO: find what in core is making boss slower than in retail (when correct speed data) or find missing movement flag update or forced spline change
me->SetSpeed(MOVE_FLIGHT, _flySpeed * 0.25f);
if (_despawned)
@@ -464,7 +466,7 @@ public:
pos.m_positionZ = alexstraszaBunny->GetPositionZ();
alexstraszaBunny->GetNearPoint2D(pos.m_positionX, pos.m_positionY, 30.0f, alexstraszaBunny->GetAngle(me));
me->GetMotionMaster()->MoveLand(POINT_LAND_P_ONE, pos);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_NPC);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC);
me->SetReactState(REACT_AGGRESSIVE);
me->SetInCombatWithZone();
events.ScheduleEvent(EVENT_LAND_START_ENCOUNTER, 7*IN_MILLISECONDS, 1, PHASE_NOT_STARTED);
@@ -604,8 +606,6 @@ public:
// Set speed to normal value
me->SetSpeed(MOVE_FLIGHT, _flySpeed);
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
me->RemoveAllAuras();
me->CombatStop(); // Sometimes threat can remain, so it's a safety measure