Set ADD_ITEM_EQEFFECT defaults to target 1 and timing 2 - #371
Open
4Luke4 wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ADD_ITEM_EQEFFECTfunction defaults fromtarget = 0andtiming = 0totarget = 1andtiming = 2doc/base.texRationale
ADD_ITEM_EQEFFECTadds an equipping effect to an item. When callers omit thetargetandtimingparameters, the built-in patch-function wrapper should supply the appropriate equipping-effect defaults:target = 1(Self)timing = 2(Instant/While equipped)The change is intentionally limited to
DEFINE_PATCH_FUNCTION ~ADD_ITEM_EQEFFECT~.The shared
ADD_ITEM_EQEFFECTmacro remains unchanged because it is also used byADD_SPELL_CFEFFECT. Consequently,ADD_SPELL_CFEFFECTretains its existingtarget = 0andtiming = 0defaults, and the shared macro's field-writing and cleanup behavior is unaffected.Validation
ADD_ITEM_EQEFFECTdefaults totarget = 1andtiming = 2ADD_SPELL_CFEFFECTremains attarget = 0andtiming = 0ADD_ITEM_EQEFFECTmacro's field writes and cleanup values remain unchangedgit diff --checkocaml-option-default-unsafe-string, and Elkhound 1.0.3