Skip to content

Commit

Permalink
Fix Classic encounters broken after a60f977#diff-68c5353a8ef8645fc9b5…
Browse files Browse the repository at this point in the history
  • Loading branch information
cala committed Nov 8, 2017
1 parent 11a2123 commit 1b87d54
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 4 deletions.
Expand Up @@ -336,7 +336,7 @@ void instance_blackrock_depths::SetData(uint32 uiType, uint32 uiData)
pSummoned->SetWalk(false);
// The cronies should not engage anyone until their boss does so
// the linking is done by DB
pSummoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_NPC);
pSummoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PLAYER);
// The movement toward the kegs is handled by Hurley EscortAI
// and we want the cronies to follow him there
pSummoned->GetMotionMaster()->MoveFollow(pHurley, 1.0f, 0);
Expand Down
Expand Up @@ -75,6 +75,7 @@ struct boss_pyroguard_emberseerAI : public ScriptedAI
m_uiGrowingStacks = 0;

m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PLAYER);
}

void JustDied(Unit* /*pKiller*/) override
Expand Down Expand Up @@ -115,6 +116,7 @@ struct boss_pyroguard_emberseerAI : public ScriptedAI
}

m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PLAYER);
}
}

Expand Down
Expand Up @@ -207,7 +207,7 @@ struct boss_ragnarosAI : public Scripted_NoMovementAI
{
m_uiEnterCombatTimer = 0;
// If we don't remove this passive flag, he will be unattackable after evading, this way he will enter combat
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_NPC);
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PLAYER);
if (m_pInstance)
{
if (Player* pPlayer = m_pInstance->GetPlayerInMap(true, false))
Expand Down
Expand Up @@ -238,7 +238,7 @@ struct boss_mandokirAI : public ScriptedAI

if (uiPointId == POINT_DOWNSTAIRS)
{
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_NPC);
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PLAYER);
m_creature->SetInCombatWithZone();
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/game/Entities/Creature.h
Expand Up @@ -520,7 +520,7 @@ enum TemporaryFactionFlags // Used at real fact
TEMPFACTION_RESTORE_REACH_HOME = 0x04, // ... at reaching home in home movement (evade), if not already done at CombatStop()
TEMPFACTION_TOGGLE_NON_ATTACKABLE = 0x08, // Remove UNIT_FLAG_NON_ATTACKABLE(0x02) when faction is changed (reapply when temp-faction is removed)
TEMPFACTION_TOGGLE_IMMUNE_TO_PLAYER = 0x10, // Remove UNIT_FLAG_IMMUNE_TO_PLAYER(0x100) when faction is changed (reapply when temp-faction is removed)
TEMPFACTION_TOGGLE_IMMUNE_TO_NPC = 0x20, // Remove UNIT_FLAG_IMMUNE_TO_NPC(0x200) when faction is changed (reapply when temp-faction is removed)
TEMPFACTION_TOGGLE_IMMUNE_TO_NPC = 0x20, // Remove UNIT_FLAG_IMMUNE_TO_NPC(0x200) when faction is changed (reapply when temp-faction is removed)
TEMPFACTION_TOGGLE_PACIFIED = 0x40, // Remove UNIT_FLAG_PACIFIED(0x20000) when faction is changed (reapply when temp-faction is removed)
TEMPFACTION_TOGGLE_NOT_SELECTABLE = 0x80, // Remove UNIT_FLAG_NOT_SELECTABLE(0x2000000) when faction is changed (reapply when temp-faction is removed)
TEMPFACTION_ALL,
Expand Down

0 comments on commit 1b87d54

Please sign in to comment.