mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 16:38:42 +01:00
Ulduar: Halls of Stone, Krystallus: Fix Shatter usage
--HG-- branch : trunk
This commit is contained in:
@@ -20,6 +20,9 @@ enum Spells
|
||||
SPELL_GROUND_SLAM = 50827,
|
||||
SPELL_SHATTER = 50810,
|
||||
H_SPELL_SHATTER = 61546,
|
||||
SPELL_SHATTER_EFFECT = 50811,
|
||||
H_SPELL_SHATTER_EFFECT = 61547,
|
||||
SPELL_STONED = 50812,
|
||||
SPELL_STOMP = 48131,
|
||||
H_SPELL_STOMP = 59744
|
||||
};
|
||||
@@ -108,8 +111,7 @@ struct boss_krystallusAI : public ScriptedAI
|
||||
{
|
||||
if (uiShatterTimer <= diff)
|
||||
{
|
||||
DoCast(me, SPELL_SHATTER);
|
||||
bIsSlam = false;
|
||||
DoCast(me, DUNGEON_MODE(SPELL_SHATTER, H_SPELL_SHATTER));
|
||||
} else uiShatterTimer -= diff;
|
||||
}
|
||||
|
||||
@@ -130,6 +132,32 @@ struct boss_krystallusAI : public ScriptedAI
|
||||
return;
|
||||
DoScriptText(SAY_KILL, me);
|
||||
}
|
||||
|
||||
void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell)
|
||||
{
|
||||
//this part should be in the core
|
||||
if (pSpell->Id == SPELL_SHATTER || pSpell->Id == H_SPELL_SHATTER)
|
||||
{
|
||||
//this spell must have custom handling in the core, dealing damage based on distance
|
||||
pTarget->CastSpell(pTarget, DUNGEON_MODE(SPELL_SHATTER_EFFECT, H_SPELL_SHATTER_EFFECT), true);
|
||||
|
||||
if (pTarget->HasAura(SPELL_STONED))
|
||||
pTarget->RemoveAurasDueToSpell(SPELL_STONED);
|
||||
|
||||
//clear this, if we are still performing
|
||||
if (bIsSlam)
|
||||
{
|
||||
bIsSlam = false;
|
||||
|
||||
//and correct movement, if not already
|
||||
if (me->GetMotionMaster()->GetCurrentMovementGeneratorType() != TARGETED_MOTION_TYPE)
|
||||
{
|
||||
if (me->getVictim())
|
||||
me->GetMotionMaster()->MoveChase(me->getVictim());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_boss_krystallus(Creature* pCreature)
|
||||
|
||||
Reference in New Issue
Block a user