Skip to content

Document the invmon "float" field#99

Open
rodarvus wants to merge 1 commit into
zzyzzyzzx:masterfrom
rodarvus:docs/invmon-float-comment
Open

Document the invmon "float" field#99
rodarvus wants to merge 1 commit into
zzyzzyzzx:masterfrom
rodarvus:docs/invmon-float-comment

Conversation

@rodarvus

Copy link
Copy Markdown

Summary

Spellups["GL"]["float"] is updated by the invmon handler in SpellupRecast/Hadar_Spellups.xml and consumed by OnPluginBroadcast when auto-aura fires, but the variable name doesn't say what role it plays. This adds a four-line comment above the function describing the round-trip: invmon remembers whatever non-aura item the user normally wears in the floating slot (loc 27) so the broadcast handler can re-wear it after the aura swap ("wear "..Spellups["GL"]["float"]).

Comment-only; no behavior change.

Before

function invmon(nm,ln,wc)
    if tonumber(wc.action) == 1 and tonumber(wc.loc) == 27 then
        if tonumber(Spellups["GL"]["auranumber"]) ~= tonumber(wc.id) then
            Spellups["GL"]["float"] = tonumber(wc.id)
        end
    end
end

After

-- Tracks the non-aura item worn in the floating slot (loc 27).
-- When auto-aura swaps the user's aura into slot 27 to cast sanctuary,
-- Spellups["GL"]["float"] remembers what was there before so OnPluginBroadcast
-- can re-wear it after the cast (see "wear "..Spellups["GL"]["float"]).
function invmon(nm,ln,wc)
    if tonumber(wc.action) == 1 and tonumber(wc.loc) == 27 then
        if tonumber(Spellups["GL"]["auranumber"]) ~= tonumber(wc.id) then
            Spellups["GL"]["float"] = tonumber(wc.id)
        end
    end
end

Test plan

  • Comment-only change. No behavior is altered.

🤖 Generated with Claude Code

Spellups["GL"]["float"] is updated by the invmon trigger handler but
the variable name doesn't say what role it plays. Add a four-line
comment above the function explaining that it remembers whatever
non-aura item the user normally wears in the floating slot (loc 27)
so OnPluginBroadcast can re-wear it after auto-aura swaps the aura
in to cast sanctuary.

Comment-only; no behavior change.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

1 participant