Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds support for deleting multiple spells in the aura nerf system. #57

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/mod_zone_difficulty_scripts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,14 @@ class mod_zone_difficulty_unitscript : public UnitScript
uint32 mapId = target->GetMapId();
bool nerfInDuel = sZoneDifficulty->ShouldNerfInDuels(target);

//Check if the map of the target is subject of a nerf at all OR if the target is subject of a nerf in a duel
// Check if the map of the target is subject to a nerf at all OR if the target is subject to a nerf in a duel
if (sZoneDifficulty->ShouldNerfMap(mapId) || nerfInDuel)
{
if (SpellInfo const* spellInfo = aura->GetSpellInfo())
{
// Skip spells not affected by vulnerability (potions)
if (spellInfo->HasAttribute(SPELL_ATTR0_NO_IMMUNITIES))
static const std::unordered_set<uint32> excludedSpells = { 31852, 31851, 31850 };
if (spellInfo->HasAttribute(SPELL_ATTR0_NO_IMMUNITIES) || excludedSpells.count(spellInfo->Id))
return;

if (spellInfo->HasAura(SPELL_AURA_SCHOOL_ABSORB))
Expand Down Expand Up @@ -81,7 +82,7 @@ class mod_zone_difficulty_unitscript : public UnitScript
absorb = eff->GetAmount() * sZoneDifficulty->NerfInfo[DUEL_INDEX][0].AbsorbNerfPct;
}

//This check must be last and override duel and map adjustments
// This check must be last and override duel and map adjustments
if (sZoneDifficulty->SpellNerfOverrides.find(spellInfo->Id) != sZoneDifficulty->SpellNerfOverrides.end())
{
if (sZoneDifficulty->SpellNerfOverrides[spellInfo->Id].find(mapId) != sZoneDifficulty->SpellNerfOverrides[spellInfo->Id].end())
Expand Down