Skip to content

Commit

Permalink
Ulduar: Fix Stone Grip for Kologarn
Browse files Browse the repository at this point in the history
  • Loading branch information
insunaa committed Aug 9, 2024
1 parent 7fe17e5 commit 392a6f6
Showing 1 changed file with 14 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ struct boss_kologarnAI : public BossAI

void Reset() override
{
BossAI::Reset();
m_armStatus[LEFT_ARM] = 0;
m_armStatus[RIGHT_ARM] = 0;
m_disarmedStatus = false;
Expand Down Expand Up @@ -564,27 +565,27 @@ struct FocusedEyebeamSummon : SpellScript
// 64224 - Stone Grip Absorb
struct StoneGripAbsorb : AuraScript
{
void OnApply(Aura* /*aura*/, bool apply) const override
void OnApply(Aura* aura, bool apply) const override
{
sLog.outError("Apply: %b", apply);
if (apply)
return;
Unit* player = aura->GetCaster();
if (!player->IsAlive())
return;
uint32 auraToRemove = aura->GetSpellProto()->CalculateSimpleValue(EFFECT_INDEX_2);
player->RemoveAurasDueToSpell(auraToRemove);
player->RemoveAurasDueToSpell(64290);
Unit* target = aura->GetTarget();
if (!target || !target->IsAlive())
return;
}

void OnAbsorb(Aura* aura, int32& currentAbsorb, int32& remainingDamage, uint32& /*reflectedSpellId*/, int32& /*reflectDamage*/, bool& /*preventedDeath*/, bool& /*dropCharge*/) const override
{
currentAbsorb = 0;
if (aura->GetEffIndex() != EFFECT_INDEX_0)
return;
if (remainingDamage < aura->GetModifier()->m_amount)
{
aura->GetModifier()->m_amount -= remainingDamage;
return;
}
Unit* player = aura->GetCaster();
if (!player->IsAlive())
return;
uint32 auraToRemove = aura->GetSpellProto()->CalculateSimpleValue(EFFECT_INDEX_2);
player->RemoveAurasDueToSpell(auraToRemove);
aura->GetModifier()->m_amount = 0;
aura->GetModifier()->m_amount = std::max(0, aura->GetModifier()->m_amount - remainingDamage);
}
};

Expand Down

0 comments on commit 392a6f6

Please sign in to comment.