mirror of
https://github.com/brues-code/ClassicAPI.git
synced 2026-11-16 08:00:42 +00:00
CastAtCursor, UseAtCursor and UseAtUnit could commit a reticle the player had armed by hand: the cast dispatcher returns nothing and an attempt the engine refuses early leaves the old placement up. Placing calls now cancel any open placement first (0x6e4900, the engine's own new-cast cancel), and item calls commit only when CGItem::Use reports the spell began. The commit now honors 0x6e60f0's result: placed means bound AND no target left, since the engine sends the cast only when the targeting word empties. A spell still wanting a target is cancelled. UseAtUnit gains placeGroundSpell, returns true for a unit-target item used on the unit, and resolves the token once, matching CastAtUnit. The shared placement and dispatch code moves to Spell::Placement; item use goes through one Item::Use::UseItem; one macro extractor tags both spellIDs and quoted names for CastAtCursor, CastAtUnit and CastSpellNoToggle. UseAtCursor and UseAtUnit get doc descriptors.