void UpdateAI(const uint32 diff) { if (!UpdateVictim()) return; OozesMeetCheck(); if (m_uiSlimeSprayTimer <= diff) { Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0); DoScriptText(SAY_SLIME_SPRAY, me); me->MonsterTextEmote(EMOTE_SLIME_SPRAY, 0, true); DoCast(SPELL_SLIME_SPRAY); m_uiSlimeSprayTimer = 26000; } else m_uiSlimeSprayTimer -= diff; if (m_uiResetTimer <= diff) { if (me->GetDistance2d(me->GetHomePosition().GetPositionX(), me->GetHomePosition().GetPositionY()) > 40) EnterEvadeMode(); m_uiResetTimer = 5000; } else m_uiResetTimer -= diff; if (m_uiFloodTimer <= diff) { uiPutricide = (m_pInstance ? m_pInstance->GetData64(DATA_PROFESSOR_PUTRICIDE) : 0); switch (rand() % 4) { case 0: if (Creature *pPutricide = me->GetCreature(*me, uiPutricide)) DoScriptText(SAY_PUTRI_SLIME, pPutricide); me->PlayDirectSound(17126); me->SummonCreature(CREATURE_PUDDLE_STALKER, LR_X, LR_Y, SPAWN_Z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 24000); me->SummonCreature(CREATURE_PUDDLE_STALKER, LR2_X, LR2_Y, SPAWN_Z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 24000); break; case 1: if (Creature *pPutricide = me->GetCreature(*me, uiPutricide)) DoScriptText(SAY_PUTRI_SLIME, pPutricide); me->PlayDirectSound(17126); me->SummonCreature(CREATURE_PUDDLE_STALKER, UR_X, UR_Y, SPAWN_Z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 24000); me->SummonCreature(CREATURE_PUDDLE_STALKER, UR2_X, UR2_Y, SPAWN_Z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 24000); break; case 2: if (Creature *pPutricide = me->GetCreature(*me, uiPutricide)) DoScriptText(SAY_PUTRI_SLIME_2, pPutricide); me->PlayDirectSound(17123); me->SummonCreature(CREATURE_PUDDLE_STALKER, LL_X, LL_Y, SPAWN_Z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 24000); me->SummonCreature(CREATURE_PUDDLE_STALKER, LL2_X, LL2_Y, SPAWN_Z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 24000); break; case 3: if (Creature *pPutricide = me->GetCreature(*me, uiPutricide)) DoScriptText(SAY_PUTRI_SLIME_2, pPutricide); me->PlayDirectSound(17123); me->SummonCreature(CREATURE_PUDDLE_STALKER, UL_X, UL_Y, SPAWN_Z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 24000); me->SummonCreature(CREATURE_PUDDLE_STALKER, UL2_X, UL2_Y, SPAWN_Z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 24000); break; } m_uiFloodTimer = 25000; } else m_uiFloodTimer -= diff; if (m_uiMutatedInfectionTimer <= diff) { Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 1); if(pTarget && !pTarget->HasAura(RAID_MODE(SPELL_MUTATED_INFECTION_N, SPELL_MUTATED_INFECTION_N, SPELL_MUTATED_INFECTION_H, SPELL_MUTATED_INFECTION_H))) { //me->CastCustomSpell(SPELL_MUTATED_INFECTION, SPELLVALUE_MAX_TARGETS, 1); me->AddAura(RAID_MODE(SPELL_MUTATED_INFECTION_N, SPELL_MUTATED_INFECTION_N, SPELL_MUTATED_INFECTION_H, SPELL_MUTATED_INFECTION_H), pTarget); } m_uiMutatedInfectionTimer = 30000; } else m_uiMutatedInfectionTimer -= diff; if (m_uiBerserkTimer <= diff) { DoScriptText(SAY_BERSERK, me); DoCast(me, SPELL_BERSERK); m_uiBerserkTimer = 600000; } else m_uiBerserkTimer -= diff; DoMeleeAttackIfReady(); }
void UpdateAI(const uint32 diff) { if (!UpdateVictim()) return; OozesMeetCheck(); if (m_uiSlimeSprayTimer <= diff) { Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0); DoScriptText(SAY_SLIME_SPRAY, me); me->MonsterTextEmote(EMOTE_SLIME_SPRAY,NULL); DoCast(SPELL_SLIME_SPRAY); m_uiSlimeSprayTimer = 26000; } else m_uiSlimeSprayTimer -= diff; if (m_uiResetTimer <= diff) { if (me->GetDistance2d(me->GetHomePosition().GetPositionX(), me->GetHomePosition().GetPositionY()) > 40) EnterEvadeMode(); m_uiResetTimer = 5000; } else m_uiResetTimer -= diff; if (m_uiFloodTimer <= diff) { switch (rand() % 4) { case 0: DoScriptText(SAY_PUTRI_SLIME, me); me->SummonCreature(CREATURE_PUDDLE_STALKER, LR_X, LR_Y, SPAWN_Z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 24000); me->SummonCreature(CREATURE_PUDDLE_STALKER, LR2_X, LR2_Y, SPAWN_Z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 24000); break; case 1: me->SummonCreature(CREATURE_PUDDLE_STALKER, UR_X, UR_Y, SPAWN_Z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 24000); me->SummonCreature(CREATURE_PUDDLE_STALKER, UR2_X, UR2_Y, SPAWN_Z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 24000); DoScriptText(SAY_PUTRI_SLIME, me); break; case 2: me->SummonCreature(CREATURE_PUDDLE_STALKER, LL_X, LL_Y, SPAWN_Z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 24000); me->SummonCreature(CREATURE_PUDDLE_STALKER, LL2_X, LL2_Y, SPAWN_Z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 24000); DoScriptText(SAY_PUTRI_SLIME_2, me); break; case 3: me->SummonCreature(CREATURE_PUDDLE_STALKER, UL_X, UL_Y, SPAWN_Z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 24000); me->SummonCreature(CREATURE_PUDDLE_STALKER, UL2_X, UL2_Y, SPAWN_Z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 24000); DoScriptText(SAY_PUTRI_SLIME_2, me); break; } m_uiFloodTimer = 25000; } else m_uiFloodTimer -= diff; if (m_uiMutatedInfectionTimer <= diff) { Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 1); if(pTarget && !pTarget->HasAura(SPELL_MUTATED_INFECTION)) { me->CastCustomSpell(SPELL_MUTATED_INFECTION, SPELLVALUE_MAX_TARGETS, 1); } m_uiMutatedInfectionTimer = 30000; } else m_uiMutatedInfectionTimer -= diff; if (m_uiBerserkTimer <= diff) { DoScriptText(SAY_BERSERK, me); DoCast(me, SPELL_BERSERK); m_uiBerserkTimer = 600000; } else m_uiBerserkTimer -= diff; DoMeleeAttackIfReady(); }