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

LibDispellable:CanDispel function? #161

Closed
alexandersoto opened this issue Sep 13, 2024 · 3 comments
Closed

LibDispellable:CanDispel function? #161

alexandersoto opened this issue Sep 13, 2024 · 3 comments

Comments

@alexandersoto
Copy link

LibDispellable-1.0 is still being used by GladiusEx and a bug exists where curses won't show as dispellable for mages. I think that's due to remove curse missing from this check here.

However AdiAddons/LibDispellable-1.0#6 says the library is abandoned.

Ideally LibPlayerSpells could provide an equivalent LibDispellable:CanDispel function. Would that be possible? If not do you have guidance on how to best approach? Happy to help however I can.

@Rainrider
Copy link
Member

There is a dispel category in LPS. You should be able to do something like LPS:IterateSpells('DISPEL MAGE') to retrieve mage dispels.

@alexandersoto
Copy link
Author

I'm looking for a function like LibDispellable:CanDispel(unit, isBuff, dispelType, spellID). In AdiAddons/LibDispellable-1.0#6 you said:

Thus there are no alternatives to: LibDispellable:CanDispel ... If you'd prefer some higher abstraction API to somewhat mimic LibDispellable, feel free to open an issue for LibPlayerSpells-1.0.

Are you saying it's best to build that functionality outside the library using LPS:IterateSpells?

@Rainrider
Copy link
Member

Yes, because tracking known player spells is out of scope for LPS. LPS can answer the question "Can a mage dispel a curse", but not "can YOUR mage dispel a curse". You could take a look at https://github.com/Rainrider/oUF_Dispellable/blob/refs%2Fheads%2Fmain/oUF_Dispellable.lua for an example implementation. There is also LibSpellbook which keeps track on spells known by the player and their pet (however this whole lib might be unneeded as the last expansion)

@Rainrider Rainrider closed this as not planned Won't fix, can't repro, duplicate, stale Oct 19, 2024
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

No branches or pull requests

2 participants