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

Add fake death for saronite vapors. #27

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
19 changes: 17 additions & 2 deletions scripts/northrend/ulduar/ulduar/boss_general_vezax.cpp
Expand Up @@ -365,16 +365,31 @@ struct npc_saronite_vaporAI : public Scripted_NoMovementAI

void Reset() override { }

void JustDied(Unit* /*pKiller*/) override
void DamageTaken(Unit* /*pDoneBy*/, uint32& uiDamage) override
{
if (uiDamage >= m_creature->GetHealth())
{
uiDamage = 0;

m_creature->SetHealth(0);
m_creature->ClearComboPointHolders();
m_creature->CombatStop(true);
m_creature->ModifyAuraState(AURA_STATE_HEALTHLESS_20_PERCENT, false);
m_creature->ModifyAuraState(AURA_STATE_HEALTHLESS_35_PERCENT, false);
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
m_creature->ClearAllReactives();
m_creature->GetMotionMaster()->Clear();
m_creature->GetMotionMaster()->MoveIdle();
m_creature->SetStandState(UNIT_STAND_STATE_DEAD);

// inform Vezax of death
if (m_pInstance)
{
if (Creature* pVezax = m_pInstance->GetSingleCreatureFromStorage(NPC_VEZAX))
SendAIEvent(AI_EVENT_CUSTOM_A, m_creature, pVezax);
}

DoCastSpellIfCan(m_creature, SPELL_SARONITE_VAPORS, CAST_TRIGGERED);
DoCastSpellIfCan(m_creature, SPELL_SARONITE_VAPORS);
}

void MovementInform(uint32 uiType, uint32 uiPointId) override
Expand Down