Skip to content

Spells/Mage: Update Ring of Frost#31781

Open
MoltenCrystal wants to merge 2 commits intoTrinityCore:masterfrom
MoltenCrystal:mage/ring_of_frost
Open

Spells/Mage: Update Ring of Frost#31781
MoltenCrystal wants to merge 2 commits intoTrinityCore:masterfrom
MoltenCrystal:mage/ring_of_frost

Conversation

@MoltenCrystal
Copy link
Copy Markdown
Contributor

Changes proposed:

Fixes incap upon entering or leaving the ring

Tests performed:

Builds, and incaps targets as expected

Comment on lines +1864 to +1872
{
Unit* unit = target->ToUnit();
if (!unit)
return true;
return unit->HasAura(SPELL_MAGE_RING_OF_FROST_DUMMY)
|| unit->HasAura(SPELL_MAGE_RING_OF_FROST_FREEZE)
|| unit->GetExactDist(dest) > outRadius
|| unit->GetExactDist(dest) < inRadius;
});
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this entire code block has no changes, revert

WorldLocation const* dest = GetExplTargetDest();
float outRadius = sSpellMgr->AssertSpellInfo(SPELL_MAGE_RING_OF_FROST_SUMMON, GetCastDifficulty())->GetEffect(EFFECT_0).CalcRadius(nullptr, SpellTargetIndex::TargetB);
float inRadius = 6.5f;
SpellEffectInfo const& ringEffect = sSpellMgr->GetSpellInfo(SPELL_MAGE_RING_OF_FROST_SUMMON, GetCastDifficulty())->GetEffect(EFFECT_2);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AssertSpellInfo to silence static analysis tools

{
std::list<TempSummon*> minions;
GetTarget()->GetAllMinionsByEntry(minions, sSpellMgr->AssertSpellInfo(SPELL_MAGE_RING_OF_FROST_SUMMON, GetCastDifficulty())->GetEffect(EFFECT_0).MiscValue);
GetTarget()->GetAllMinionsByEntry(minions, sSpellMgr->GetSpellInfo(SPELL_MAGE_RING_OF_FROST_SUMMON, GetCastDifficulty())->GetEffect(EFFECT_0).MiscValue);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AssertSpellInfo

Comment on lines +1799 to +1800
if (ringOfFrost->IsInCombat())
ringOfFrost->CombatStop();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this still required after setting ignore combat static flag?

return;

if (GetTargetApplication()->GetRemoveMode() == AURA_REMOVE_BY_EXPIRE)
caster->CastSpell(GetTarget(), SPELL_MAGE_RING_OF_FROST_SLOW, CastSpellExtraArgs(TRIGGERED_FULL_MASK));
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

try to not use TRIGGERED_FULL_MASK directly, usually we only need TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR

Suggested change
caster->CastSpell(GetTarget(), SPELL_MAGE_RING_OF_FROST_SLOW, CastSpellExtraArgs(TRIGGERED_FULL_MASK));
caster->CastSpell(GetTarget(), SPELL_MAGE_RING_OF_FROST_SLOW, CastSpellExtraArgsInit{
.TriggerFlags = TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR
});

if (GetTargetApplication()->GetRemoveMode() == AURA_REMOVE_BY_EXPIRE)
caster->CastSpell(GetTarget(), SPELL_MAGE_RING_OF_FROST_SLOW, CastSpellExtraArgs(TRIGGERED_FULL_MASK));

caster->CastSpell(GetTarget(), SPELL_MAGE_RING_OF_FROST_DUMMY, CastSpellExtraArgs(TRIGGERED_FULL_MASK));
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

Suggested change
caster->CastSpell(GetTarget(), SPELL_MAGE_RING_OF_FROST_DUMMY, CastSpellExtraArgs(TRIGGERED_FULL_MASK));
caster->CastSpell(GetTarget(), SPELL_MAGE_RING_OF_FROST_DUMMY, CastSpellExtraArgsInit{
.TriggerFlags = TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR
});

Comment on lines +1802 to +1803
ringOfFrost->CastSpell(ringOfFrost->GetPosition(), SPELL_MAGE_RING_OF_FROST_FREEZE,
CastSpellExtraArgs(TRIGGERED_FULL_MASK).SetOriginalCaster(GetTarget()->GetGUID()));
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
ringOfFrost->CastSpell(ringOfFrost->GetPosition(), SPELL_MAGE_RING_OF_FROST_FREEZE,
CastSpellExtraArgs(TRIGGERED_FULL_MASK).SetOriginalCaster(GetTarget()->GetGUID()));
ringOfFrost->CastSpell(ringOfFrost->GetPosition(), SPELL_MAGE_RING_OF_FROST_FREEZE, CastSpellExtraArgsInit{
.TriggerFlags = TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR,
.OriginalCaster = GetTarget()->GetGUID()
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants