Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct stop the fight for Madrigosa after the fight with Brutallus, creating a normal flight for Madrigosa and Felmyst. #29

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp
Expand Up @@ -221,6 +221,7 @@ struct boss_brutallusAI : public ScriptedAI, private DialogueHelper
if (pSummoned->GetEntry() == NPC_MADRIGOSA)
{
pSummoned->SetWalk(false);
pSummoned->SetByteValue(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_FLY_ANIM);
pSummoned->SetLevitate(true);
pSummoned->GetMotionMaster()->MovePoint(0, aMadrigosaLoc[1].m_fX, aMadrigosaLoc[1].m_fY, aMadrigosaLoc[1].m_fZ, false);
}
Expand All @@ -234,6 +235,7 @@ struct boss_brutallusAI : public ScriptedAI, private DialogueHelper
return;

if (uiPointId == POINT_MOVE_GROUND)
pSummoned->RemoveByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_FLY_ANIM);
pSummoned->SetLevitate(false);
}

Expand All @@ -243,13 +245,15 @@ struct boss_brutallusAI : public ScriptedAI, private DialogueHelper
if (pTarget->GetEntry() == NPC_MADRIGOSA && pSpell->Id == SPELL_CHARGE)
{
DoScriptText(YELL_MADR_DEATH, pTarget);
pTarget->CombatStop(true);
pTarget->InterruptNonMeleeSpells(true);
pTarget->SetHealth(0);
pTarget->StopMoving();
pTarget->ClearComboPointHolders();
pTarget->RemoveAllAurasOnDeath();
pTarget->ModifyAuraState(AURA_STATE_HEALTHLESS_20_PERCENT, false);
pTarget->ModifyAuraState(AURA_STATE_HEALTHLESS_35_PERCENT, false);
pTarget->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE);
pTarget->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
pTarget->ClearAllReactives();
pTarget->GetMotionMaster()->Clear();
Expand Down Expand Up @@ -298,6 +302,7 @@ struct boss_brutallusAI : public ScriptedAI, private DialogueHelper
{
pMadrigosa->GetMotionMaster()->MovePoint(POINT_MOVE_ICE_BLOCK, aMadrigosaLoc[1].m_fX, aMadrigosaLoc[1].m_fY, aMadrigosaLoc[1].m_fZ);
pMadrigosa->HandleEmote(EMOTE_ONESHOT_LIFTOFF);
pMadrigosa->SetByteValue(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_FLY_ANIM);
pMadrigosa->SetLevitate(true);
}
// Temporary! This will make Brutallus not follow Madrigosa through the air until mmaps are implemented
Expand Down
3 changes: 3 additions & 0 deletions scripts/eastern_kingdoms/sunwell_plateau/boss_felmyst.cpp
Expand Up @@ -168,6 +168,7 @@ struct boss_felmystAI : public ScriptedAI
if (m_creature->isAlive())
{
float fX, fY, fZ;
m_creature->SetByteValue(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_FLY_ANIM);
m_creature->SetLevitate(true);
m_creature->GetRespawnCoord(fX, fY, fZ);
m_creature->GetMotionMaster()->MovePoint(PHASE_GROUND, fX, fY, 50.083f, false);
Expand Down Expand Up @@ -281,6 +282,7 @@ struct boss_felmystAI : public ScriptedAI
// switch back to ground combat from flight transition
m_uiPhase = PHASE_GROUND;
SetCombatMovement(true);
m_creature->RemoveByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_FLY_ANIM);
m_creature->SetLevitate(false);
DoStartMovement(m_creature->getVictim());
break;
Expand Down Expand Up @@ -371,6 +373,7 @@ struct boss_felmystAI : public ScriptedAI
DoScriptText(SAY_TAKEOFF, m_creature);

SetCombatMovement(false);
m_creature->SetByteValue(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_FLY_ANIM);
m_creature->SetLevitate(true);
m_creature->GetMotionMaster()->MoveIdle();
m_creature->GetMotionMaster()->MovePoint(PHASE_AIR, m_creature->GetPositionX(), m_creature->GetPositionY(), 50.083f, false);
Expand Down