void UpdateAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; if (m_bFakeDeath) return; // ToDo: research if this is correct and how can this be done by spell if (m_uiBurnTimer < uiDiff) { // spell Burn should possible do this, but it doesn't, so do this for now. uint32 uiDmg = urand(1650, 2050); if (uiDmg > m_creature->GetHealth()) DoSetFakeDeath(); else m_creature->DealDamage(m_creature, uiDmg, 0, DOT, SPELL_SCHOOL_MASK_FIRE, nullptr, false); m_uiBurnTimer = 2000; } else m_uiBurnTimer -= uiDiff; DoMeleeAttackIfReady(); }
void DamageTaken(Unit* /*pDoneBy*/, uint32& uiDamage, DamageEffectType /*damagetype*/) override { if (uiDamage < m_creature->GetHealth()) return; uiDamage = 0; if (m_bIsFakingDeath) return; if (m_Phase == PHASE_JULIANNE) { // Prepare fake death if (DoCastSpellIfCan(m_creature, SPELL_DRINK_POISON, CAST_INTERRUPT_PREVIOUS) == CAST_OK) { m_Phase = PHASE_BOTH; m_bIsFakingDeath = true; m_uiSummonRomuloTimer = 12000; } } else if (m_Phase == PHASE_BOTH) { // set fake death and allow 10 sec timer to kill Romulos DoScriptText(SAY_JULIANNE_DEATH02, m_creature); DoSetFakeDeath(); m_uiResurrectSelfTimer = 10000; } }
void DamageTaken(Unit* /*pDoneBy*/, uint32& uiDamage, DamageEffectType /*damagetype*/) override { if (uiDamage < m_creature->GetHealth()) return; uiDamage = 0; if (m_bIsFakingDeath) return; if (m_Phase == PHASE_ROMULO) { DoScriptText(SAY_ROMULO_DEATH, m_creature); DoSetFakeDeath(); m_Phase = PHASE_BOTH; m_uiResurrectTimer = 10000; } else if (m_Phase == PHASE_BOTH) { // set fake death and allow 10 sec timer to kill Julianne DoSetFakeDeath(); m_uiResurrectSelfTimer = 10000; } }
void DamageTaken(Unit* /*pKiller*/, uint32& uiDamage, DamageEffectType /*damagetype*/) override { if (uiDamage < m_creature->GetHealth()) return; // Prevent glitch if in fake death if (m_bFakeDeath) { uiDamage = 0; return; } // prevent death uiDamage = 0; DoSetFakeDeath(); }