-
Notifications
You must be signed in to change notification settings - Fork 46
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
[UI][CORE] Add ability to item swap all gear #1253
base: master
Are you sure you want to change the base?
Conversation
Here's some thought : trinkets can only be swapped during prepull/you need to trigger ICDs for trinkets that are procs If you want to take a look at what i was doing : https://github.com/Polynomix/wowsims-cata/tree/itemswap. Its not so differnt from what you did. The part where i changed the Armor Spec talent is what i was last trying to fix and can be ignored. I probably wont be working on this until my PoE hype dies down. |
@Polynomix Thanks so much. I will take your ideas, esp the limitation of not being able to swap non-weapon slots during combat. |
@Polynomix I migrated your changes into here. |
@Polynomix @NerdEgghead I think this is ready for review 👍 |
…sims/cata into feature/add-trinket-swapping
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thought we'd be done for sure this time, but found another scenario that might be broken and needs investigation :(
if !swap.ItemExistsInSwapSet(itemID, slots) { | ||
return | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm now also questioning whether this will behave correctly as well. In the reverse scenario where you swap from a gear set with an on-use trinket to a pre-pull set without any, I think this code would allow the APL to activate the unequipped on-use trinket from the main set even after the swap, since no callback was registered for it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nope, corect.
if !swap.CanRegisterItemCallback(itemID, slots) {
return
}
This will check both equips, however doesn't the code only register items part of your equip regardless? 🤔 Thus making this check obsolete?
if !swap.IsEnabled() || !swap.IsValidSwap(swapSet) { | ||
return | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the issue I pointed out with missing possible callbacks for unequipped items is real, then a potential solution would be
if !swap.IsValidSwap(swapSet) && isReset {
swap.runAllCallbacks()
}
if !swap.IsEnabled() || !swap.IsValidSwap(swapSet) {
return
}
When adding this I realised that when swapping items they are never actually "unequipped" (for the sim) since we only check for the existence of spells and disable proc auras for enchants. However for actual on-use items this didn't work because the spell just exists and the Sim keeps thinking it can use it.
Also fixed that the
Activate Aura
APL would not trigger the actual ICD of the aura.Update 2024/01/11