void SpellHit(Unit* /*pCaster*/, const SpellInfo* pSpell) { if (HasFollowState(STATE_FOLLOW_INPROGRESS | STATE_FOLLOW_PAUSED) && pSpell->Id == SPELL_REVIVE_RINGO) ClearFaint(); }
void UpdateFollowerAI(const uint32 Diff) { if (!UpdateVictim()) { if (HasFollowState(STATE_FOLLOW_POSTEVENT)) { if (EndEventTimer <= Diff) { Unit* pSpraggle = Unit::GetUnit(*me, SpraggleGUID); if (!pSpraggle || !pSpraggle->isAlive()) { SetFollowComplete(); return; } switch (EndEventProgress) { case 1: DoScriptText(SAY_RIN_END_1, me); EndEventTimer = 3000; break; case 2: DoScriptText(SAY_SPR_END_2, pSpraggle); EndEventTimer = 5000; break; case 3: DoScriptText(SAY_RIN_END_3, me); EndEventTimer = 1000; break; case 4: DoScriptText(EMOTE_RIN_END_4, me); SetFaint(); EndEventTimer = 9000; break; case 5: DoScriptText(EMOTE_RIN_END_5, me); ClearFaint(); EndEventTimer = 1000; break; case 6: DoScriptText(SAY_RIN_END_6, me); EndEventTimer = 3000; break; case 7: DoScriptText(SAY_SPR_END_7, pSpraggle); EndEventTimer = 10000; break; case 8: DoScriptText(EMOTE_RIN_END_8, me); EndEventTimer = 5000; break; case 9: SetFollowComplete(); break; } ++EndEventProgress; } else EndEventTimer -= Diff; } else if (HasFollowState(STATE_FOLLOW_INPROGRESS) && !HasFollowState(STATE_FOLLOW_PAUSED)) { if (FaintTimer <= Diff) { SetFaint(); FaintTimer = urand(60000, 120000); } else FaintTimer -= Diff; } return; } DoMeleeAttackIfReady(); }
void UpdateFollowerAI(uint32 Diff) override { if (!UpdateVictim()) { if (HasFollowState(STATE_FOLLOW_POSTEVENT)) { if (EndEventTimer <= Diff) { Creature* spraggle = ObjectAccessor::GetCreature(*me, SpraggleGUID); if (!spraggle || !spraggle->IsAlive()) { SetFollowComplete(); return; } switch (EndEventProgress) { case 1: Talk(SAY_RIN_END_1); EndEventTimer = 3000; break; case 2: spraggle->AI()->Talk(SAY_SPR_END_2); EndEventTimer = 5000; break; case 3: Talk(SAY_RIN_END_3); EndEventTimer = 1000; break; case 4: Talk(EMOTE_RIN_END_4); SetFaint(); EndEventTimer = 9000; break; case 5: Talk(EMOTE_RIN_END_5); ClearFaint(); EndEventTimer = 1000; break; case 6: Talk(SAY_RIN_END_6); EndEventTimer = 3000; break; case 7: spraggle->AI()->Talk(SAY_SPR_END_7); EndEventTimer = 10000; break; case 8: Talk(EMOTE_RIN_END_8); EndEventTimer = 5000; break; case 9: SetFollowComplete(); break; } ++EndEventProgress; } else EndEventTimer -= Diff; } else if (HasFollowState(STATE_FOLLOW_INPROGRESS) && !HasFollowState(STATE_FOLLOW_PAUSED)) { if (FaintTimer <= Diff) { SetFaint(); FaintTimer = urand(60000, 120000); } else FaintTimer -= Diff; } return; } DoMeleeAttackIfReady(); }
void UpdateFollowerAI(const uint32 uiDiff) override { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) { if (HasFollowState(STATE_FOLLOW_POSTEVENT)) { if (m_uiEndEventTimer < uiDiff) { if (!pSpraggle || !pSpraggle->isAlive()) { SetFollowComplete(); return; } switch (m_uiEndEventProgress) { case 1: DoScriptText(SAY_RIN_END_1, m_creature); m_uiEndEventTimer = 3000; break; case 2: DoScriptText(SAY_SPR_END_2, pSpraggle); m_uiEndEventTimer = 5000; break; case 3: DoScriptText(SAY_RIN_END_3, m_creature); m_uiEndEventTimer = 1000; break; case 4: DoScriptText(EMOTE_RIN_END_4, m_creature); SetFaint(); m_uiEndEventTimer = 9000; break; case 5: DoScriptText(EMOTE_RIN_END_5, m_creature); ClearFaint(); m_uiEndEventTimer = 1000; break; case 6: DoScriptText(SAY_RIN_END_6, m_creature); m_uiEndEventTimer = 3000; break; case 7: DoScriptText(SAY_SPR_END_7, pSpraggle); m_uiEndEventTimer = 10000; break; case 8: DoScriptText(EMOTE_RIN_END_8, m_creature); m_uiEndEventTimer = 5000; break; case 9: SetFollowComplete(); break; } ++m_uiEndEventProgress; } else m_uiEndEventTimer -= uiDiff; } else if (HasFollowState(STATE_FOLLOW_INPROGRESS)) { if (!HasFollowState(STATE_FOLLOW_PAUSED)) { if (m_uiFaintTimer < uiDiff) { SetFaint(); m_uiFaintTimer = urand(60000, 120000); } else m_uiFaintTimer -= uiDiff; } } return; } DoMeleeAttackIfReady(); }
void UpdateFollowerAI(const uint32 uiDiff) { if (!UpdateVictim()) { if (HasFollowState(STATE_FOLLOW_POSTEVENT)) { if (m_uiEndEventTimer <= uiDiff) { Unit* pSpraggle = Unit::GetUnit(*me, SpraggleGUID); if (!pSpraggle || !pSpraggle->isAlive()) { SetFollowComplete(); return; } switch (m_uiEndEventProgress) { case 1: Talk(SAY_RIN_END_1); m_uiEndEventTimer = 3000; break; case 2: if (pSpraggle->ToCreature()) pSpraggle->ToCreature()->AI()->Talk(SAY_SPR_END_2); m_uiEndEventTimer = 5000; break; case 3: Talk(SAY_RIN_END_3); m_uiEndEventTimer = 1000; break; case 4: Talk(EMOTE_RIN_END_4); SetFaint(); m_uiEndEventTimer = 9000; break; case 5: Talk(EMOTE_RIN_END_5); ClearFaint(); m_uiEndEventTimer = 1000; break; case 6: Talk(SAY_RIN_END_6); m_uiEndEventTimer = 3000; break; case 7: if (pSpraggle->ToCreature()) pSpraggle->ToCreature()->AI()->Talk(SAY_SPR_END_7); m_uiEndEventTimer = 10000; break; case 8: Talk(EMOTE_RIN_END_8); m_uiEndEventTimer = 5000; break; case 9: SetFollowComplete(); break; } ++m_uiEndEventProgress; } else m_uiEndEventTimer -= uiDiff; } else if (HasFollowState(STATE_FOLLOW_INPROGRESS)) { if (!HasFollowState(STATE_FOLLOW_PAUSED)) { if (m_uiFaintTimer <= uiDiff) { SetFaint(); m_uiFaintTimer = urand(60000, 120000); } else m_uiFaintTimer -= uiDiff; } } return; } DoMeleeAttackIfReady(); }