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

Conversation

EricksOliveira
Copy link

This PR introduces a helper function to manage the IDs of spells that should be excluded from the aura nerf system. This improves the modularity of the code and makes it easier to add or remove new spells in the future.

This PR introduces a helper function to manage the IDs of spells that should be excluded from the aura nerf system. This improves the modularity of the code and makes it easier to add or remove new spells in the future.
@@ -47,6 +53,10 @@ class mod_zone_difficulty_unitscript : public UnitScript
if (spellInfo->HasAttribute(SPELL_ATTR0_NO_IMMUNITIES))
return;

// Use the function to skip excluded spells
if (IsExcludedSpell(spellInfo->Id))
Copy link
Member

Choose a reason for hiding this comment

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

just checkk for the spell ids here instead of adding another iteration please

@sogladev
Copy link
Member

sogladev commented Jan 3, 2025

This fixes Ardent Defender. But the root cause is the mod scaling -1 (infinite absorb) to 0 due to implicit casts. (fix: #58).

I do find adding a disables list a good choice as the current way of scaling with 1.0f is ugly. Is it possible to put ardent defender spells plus the other entries with scaling=1, mod=65 in a new disable table?

(53652, 0, 1, 65, 'Beacon of Light - Skip nerf.'),
That way scaling overrides and disables are separated, and there's no odd scaling with 1.0f anymore.

@Nyeriah
Copy link
Member

Nyeriah commented Jan 3, 2025

Mod 65 means present in mythic and normal iirc

if you can avoid the overhead of adding another iteration when spells are cast then feel free to redesign it

module atm is not performance friendly

…for Specific Spell IDs

1. std::unordered_set<uint32>: A static set to store the IDs of excluded spells. This maintains modularity and makes it easier to add new IDs.

2. Direct check on the set: The exclusion check (excludedSpells.count(spellInfo->Id)) is now done inline, eliminating the need to call a separate function.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants