void UpdateAI(const uint32 diff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; //WebTrap_Timer if (WebWrap_Timer < diff) { m_creature->MonsterTextEmote("%s spins her web into a cocoon!", 0, true); DoCastWebWrap(); if (!m_bIsRegularMode) DoCastWebWrap(); WebWrap_Timer = 40000; }else WebWrap_Timer -= diff; //WebSpray_Timer if (WebSpray_Timer < diff) { m_creature->MonsterTextEmote("%s sprays strands of web everywhere!", 0, true); DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_WEBSPRAY : H_SPELL_WEBSPRAY); WebSpray_Timer = 40000; }else WebSpray_Timer -= diff; //PoisonShock_Timer if (PoisonShock_Timer < diff) { DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_POISONSHOCK : H_SPELL_POISONSHOCK); PoisonShock_Timer = 10000; }else PoisonShock_Timer -= diff; //NecroticPoison_Timer if (NecroticPoison_Timer < diff) { DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_NECROTICPOISON : H_SPELL_NECROTICPOISON); NecroticPoison_Timer = 30000; }else NecroticPoison_Timer -= diff; //SummonSpiderling_Timer if (SummonSpiderling_Timer < diff) { m_creature->MonsterTextEmote("Spiderlings appear on the web!", 0, true); for (uint8 i = 0; i < 8; ++i) if (Creature* pSpiderling = DoSpawnCreature(NPC_MAEXXNA_SPIDERLING, urand(0, 5), urand(0, 5), 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000)) if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) pSpiderling->AI()->AttackStart(pTarget); SummonSpiderling_Timer = 40000; }else SummonSpiderling_Timer -= diff; //Enrage if not already enraged and below 30% if (!Enraged && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 30) { DoCast(m_creature, m_bIsRegularMode ? SPELL_FRENZY : H_SPELL_FRENZY); Enraged = true; } DoMeleeAttackIfReady(); }
void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; // Web Wrap if (m_uiWebWrapTimer < uiDiff) { DoCastWebWrap(); m_uiWebWrapTimer = 40000; } else m_uiWebWrapTimer -= uiDiff; // Web Spray if (m_uiWebSprayTimer < uiDiff) { DoCastSpellIfCan(m_creature->getVictim(), SPELL_WEBSPRAY); m_uiWebSprayTimer = 40000; } else m_uiWebSprayTimer -= uiDiff; // Poison Shock if (m_uiPoisonShockTimer < uiDiff) { DoCastSpellIfCan(m_creature->getVictim(), SPELL_POISONSHOCK); m_uiPoisonShockTimer = 20000; } else m_uiPoisonShockTimer -= uiDiff; // Necrotic Poison if (m_uiNecroticPoisonTimer < uiDiff) { DoCastSpellIfCan(m_creature->getVictim(), SPELL_NECROTICPOISON); m_uiNecroticPoisonTimer = 30000; } else m_uiNecroticPoisonTimer -= uiDiff; // Summon Spiderling if (m_uiSummonSpiderlingTimer < uiDiff) { DoCastSpellIfCan(m_creature, SPELL_SUMMON_SPIDERLING); m_uiSummonSpiderlingTimer = 40000; } else m_uiSummonSpiderlingTimer -= uiDiff; //Enrage if not already enraged and below 30% if (!m_bEnraged && m_creature->GetHealthPercent() < 30.0f) { DoCastSpellIfCan(m_creature, SPELL_FRENZY); m_bEnraged = true; } DoMeleeAttackIfReady(); }
void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; // Web Wrap if (m_uiWebWrapTimer < uiDiff) { DoCastWebWrap(); m_uiWebWrapTimer = 40000; } else m_uiWebWrapTimer -= uiDiff; // Web Spray if (m_uiWebSprayTimer < uiDiff) { DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_WEBSPRAY : H_SPELL_WEBSPRAY); m_uiWebSprayTimer = 40000; } else m_uiWebSprayTimer -= uiDiff; // Poison Shock if (m_uiPoisonShockTimer < uiDiff) { DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_POISONSHOCK : H_SPELL_POISONSHOCK); m_uiPoisonShockTimer = 20000; } else m_uiPoisonShockTimer -= uiDiff; // Necrotic Poison if (m_uiNecroticPoisonTimer < uiDiff) { DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_NECROTICPOISON : H_SPELL_NECROTICPOISON); m_uiNecroticPoisonTimer = 30000; } else m_uiNecroticPoisonTimer -= uiDiff; // Summon Spiderling if (m_uiSummonSpiderlingTimer < uiDiff) { SummonSpiderling(); m_uiSummonSpiderlingTimer = 40000; } else m_uiSummonSpiderlingTimer -= uiDiff; //Enrage if not already enraged and below 30% if (!m_bEnraged && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 30) { DoCast(m_creature, m_bIsRegularMode ? SPELL_FRENZY : H_SPELL_FRENZY); m_bEnraged = true; } DoMeleeAttackIfReady(); }
void UpdateAI(const uint32 diff) { if (!UpdateVictim()) return; //WebTrap_Timer if (WebTrap_Timer <= diff) { DoCastWebWrap(); WebTrap_Timer = 40000; } else WebTrap_Timer -= diff; //WebSpray_Timer if (WebSpray_Timer <= diff) { DoCast(me->getVictim(), SPELL_WEBSPRAY); WebSpray_Timer = 40000; } else WebSpray_Timer -= diff; //PoisonShock_Timer if (PoisonShock_Timer <= diff) { DoCast(me->getVictim(), SPELL_POISONSHOCK); PoisonShock_Timer = 20000; } else PoisonShock_Timer -= diff; //NecroticPoison_Timer if (NecroticPoison_Timer <= diff) { DoCast(me->getVictim(), SPELL_NECROTICPOISON); NecroticPoison_Timer = 30000; } else NecroticPoison_Timer -= diff; //SummonSpiderling_Timer if (SummonSpiderling_Timer <= diff) { DoCast(me, SPELL_SUMMON_SPIDERLING); SummonSpiderling_Timer = 40000; } else SummonSpiderling_Timer -= diff; //Enrage if not already enraged and below 30% if (!Enraged && (me->GetHealth()*100 / me->GetMaxHealth()) < 30) { DoCast(me,SPELL_FRENZY); Enraged = true; } DoMeleeAttackIfReady(); }
void UpdateAI(const uint32 diff) { if (!CanDoSomething()) return; Tasks.UpdateEvent(diff); //WebTrap_Timer if (WebTrap_Timer < diff) { DoCastWebWrap(); WebTrap_Timer = 40000; } else WebTrap_Timer -= diff; //SummonSpiderling_Timer if (SummonSpiderling_Timer < diff) { //DoCastMe( SPELL_SUMMON_SPIDERLING); for(short i=0;i<urand(7,10);i++) { Creature* tmp = me->SummonCreature(17055,me->GetPositionX(),me->GetPositionY(),me->GetPositionZ(),me->GetOrientation(),TEMPSUMMON_DEAD_DESPAWN,600000); if(tmp) tmp->AddThreat(SelectUnit(SELECT_TARGET_RANDOM,0)); } SummonSpiderling_Timer = 40000; } else SummonSpiderling_Timer -= diff; //Enrage if not already enraged and below 30% if (!Enraged && (me->GetHealth()*100 / me->GetMaxHealth()) < 30) { DoCastMe(SPELL_FRENZY); Enraged = true; } DoMeleeAttackIfReady(); }
void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; // Web Wrap if (m_uiWebWrapTimer < uiDiff) { if (DoCastWebWrap()) DoScriptText(EMOTE_SPIN_WEB, m_creature); m_uiWebWrapTimer = 40000; } else m_uiWebWrapTimer -= uiDiff; // Web Spray if (m_uiWebSprayTimer < uiDiff) { if (DoCastSpellIfCan(m_creature, SPELL_WEBSPRAY) == CAST_OK) { DoScriptText(EMOTE_SPRAY, m_creature); m_uiWebSprayTimer = 40000; } } else m_uiWebSprayTimer -= uiDiff; // Poison Shock if (m_uiPoisonShockTimer < uiDiff) { if (DoCastSpellIfCan(m_creature, SPELL_POISONSHOCK) == CAST_OK) m_uiPoisonShockTimer = urand(10000, 20000); } else m_uiPoisonShockTimer -= uiDiff; // Necrotic Poison if (m_uiNecroticPoisonTimer < uiDiff) { if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_NECROTICPOISON) == CAST_OK) m_uiNecroticPoisonTimer = urand(20000, 30000); } else m_uiNecroticPoisonTimer -= uiDiff; // Summon Spiderling if (m_uiSummonSpiderlingTimer < uiDiff) { SummonSpiderlings(); DoScriptText(EMOTE_SPIDERLING, m_creature); m_uiSummonSpiderlingTimer = 30000; } else m_uiSummonSpiderlingTimer -= uiDiff; // Enrage if not already enraged and below 30% if (!m_bEnraged && m_creature->GetHealthPercent() < 30.0f) { if (DoCastSpellIfCan(m_creature, SPELL_FRENZY) == CAST_OK) { DoScriptText(EMOTE_BOSS_GENERIC_FRENZY, m_creature); m_bEnraged = true; } } DoMeleeAttackIfReady(); }