fix(Core/ZulGurub): Hazza'rah improvements (#12236)

* fix(Core/ZulGurub): Hazza'rah improvements

* dumb
This commit is contained in:
Nefertumm
2022-07-01 15:22:13 -03:00
committed by GitHub
parent b866c470d6
commit 298b08c9a5
3 changed files with 80 additions and 81 deletions
@@ -0,0 +1,2 @@
--
UPDATE `creature_template` SET `DamageModifier` = 26 WHERE `entry` = 15163;
@@ -4295,6 +4295,12 @@ void SpellMgr::LoadSpellInfoCorrections()
spellInfo->Dispel = DISPEL_NONE; spellInfo->Dispel = DISPEL_NONE;
}); });
// Summon Nightmare Illusions
ApplySpellFix({ 24681, 24728, 24729 }, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_0].MiscValueB = 64;
});
for (uint32 i = 0; i < GetSpellInfoStoreSize(); ++i) for (uint32 i = 0; i < GetSpellInfoStoreSize(); ++i)
{ {
SpellInfo* spellInfo = mSpellInfoMap[i]; SpellInfo* spellInfo = mSpellInfoMap[i];
@@ -15,13 +15,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>. * with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
/* ScriptData
SDName: Boss_Hazzarah
SD%Complete: 100
SDComment:
SDCategory: Zul'Gurub
EndScriptData */
#include "ScriptMgr.h" #include "ScriptMgr.h"
#include "ScriptedCreature.h" #include "ScriptedCreature.h"
#include "SpellScript.h" #include "SpellScript.h"
@@ -45,14 +38,9 @@ enum Events
EVENT_ILLUSIONS = 4 EVENT_ILLUSIONS = 4
}; };
class boss_hazzarah : public CreatureScript struct boss_hazzarah : public BossAI
{ {
public: boss_hazzarah(Creature* creature) : BossAI(creature, DATA_EDGE_OF_MADNESS) { }
boss_hazzarah() : CreatureScript("boss_hazzarah") { }
struct boss_hazzarahAI : public BossAI
{
boss_hazzarahAI(Creature* creature) : BossAI(creature, DATA_EDGE_OF_MADNESS) { }
void JustSummoned(Creature* summon) override void JustSummoned(Creature* summon) override
{ {
@@ -72,7 +60,13 @@ public:
summon->RemoveUnitFlag(UNIT_FLAG_DISABLE_MOVE); summon->RemoveUnitFlag(UNIT_FLAG_DISABLE_MOVE);
summon->SetReactState(REACT_AGGRESSIVE); summon->SetReactState(REACT_AGGRESSIVE);
summon->SetInCombatWithZone(); summon->SetInCombatWithZone();
}, 3500ms); }, 5s);
}
void SummonedCreatureDies(Creature* summon, Unit* /*killer*/) override
{
summons.Despawn(summon);
summon->DespawnOrUnsummon();
} }
void EnterCombat(Unit* /*who*/) override void EnterCombat(Unit* /*who*/) override
@@ -115,9 +109,12 @@ public:
events.ScheduleEvent(EVENT_EARTH_SHOCK, 8s, 18s); events.ScheduleEvent(EVENT_EARTH_SHOCK, 8s, 18s);
break; break;
case EVENT_CHAIN_BURN: case EVENT_CHAIN_BURN:
if (me->GetPowerPct(POWER_MANA) > 5.f) // totally guessed
{
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1, [&](Unit* u) { return u && !u->IsPet() && u->getPowerType() == POWER_MANA; })) if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1, [&](Unit* u) { return u && !u->IsPet() && u->getPowerType() == POWER_MANA; }))
{ {
DoCast(target, SPELL_CHAIN_BURN, false); DoCast(target, SPELL_CHAIN_BURN);
}
} }
events.ScheduleEvent(EVENT_CHAIN_BURN, 12s, 28s); events.ScheduleEvent(EVENT_CHAIN_BURN, 12s, 28s);
break; break;
@@ -125,7 +122,7 @@ public:
DoCastSelf(SPELL_SUMMON_NIGHTMARE_ILLUSION_LEFT, true); DoCastSelf(SPELL_SUMMON_NIGHTMARE_ILLUSION_LEFT, true);
DoCastSelf(SPELL_SUMMON_NIGHTMARE_ILLUSION_BACK, true); DoCastSelf(SPELL_SUMMON_NIGHTMARE_ILLUSION_BACK, true);
DoCastSelf(SPELL_SUMMON_NIGHTMARE_ILLUSION_RIGHT, true); DoCastSelf(SPELL_SUMMON_NIGHTMARE_ILLUSION_RIGHT, true);
events.ScheduleEvent(EVENT_ILLUSIONS, 16s, 24s); events.ScheduleEvent(EVENT_ILLUSIONS, 15s, 25s);
break; break;
default: default:
break; break;
@@ -134,12 +131,6 @@ public:
DoMeleeAttackIfReady(); DoMeleeAttackIfReady();
} }
};
CreatureAI* GetAI(Creature* creature) const override
{
return GetZulGurubAI<boss_hazzarahAI>(creature);
}
}; };
class spell_chain_burn : public SpellScript class spell_chain_burn : public SpellScript
@@ -164,6 +155,6 @@ class spell_chain_burn : public SpellScript
void AddSC_boss_hazzarah() void AddSC_boss_hazzarah()
{ {
new boss_hazzarah(); RegisterZulGurubCreatureAI(boss_hazzarah);
RegisterSpellScript(spell_chain_burn); RegisterSpellScript(spell_chain_burn);
} }