Files

7.3 KiB

Native normal casts and shared form state

Actual Forever70334/local Tortoise1.18.1, external gateway stopped. This is a record of the initial stationary unit/item-target implementation. See the absolute location request coverage below for ground targeting. Originals, source server rules and legitimate SRP/M2 remain unchanged; no new engine-call patch or Lua-C registration is enabled.

Source and actual request

The pinned original ClassicClientOpcodes.inc maps actual3E0176 to CMSG_CAST_SPELL3D0174. Actual693840 emitted68bytes for Battle Stance2457; evidence/gameplay/native-spell-cast-request.json contains this strictly public owned-module gameplay specimen. The separate exported diagnostic record accepts only this declared opcode, up to256bytes, after authenticated self-create. Item requests remain in their separate record. Credential/auth/session packets cannot enter either; malformed/unrelated records fail the decoder tests.

Original Server/Packets/SpellPackets.cpp::CastSpell::Read reads the same SpellCastRequest used inside UseItem: actual castGUID, flags, three misc fields, real spellID, visual, targets, trajectory, crafting fields and optional tail. The native parser now shares this implementation and target binding with item use. The reader handles absolute world locations and the native MoveUpdate tail. Unsupported crafting, weight, and relative target forms reject explicitly. Tortoise Handlers/SpellHandler.cpp::HandleCastSpellOpcode reads spell32 and SpellCastTargets. Native ordinary requests therefore use12E, while inventory use remainsAB with its distinct bag/slot/count prefix. No item-shaped normal cast or arbitrary ID mapping is used. The native ordinary path requires a spell from genuine initial/learned server events; the server independently validates active/non-passive knowledge and gameplay requirements.

Pending cast context now records the real request plus caster. An item caster remains its owned item; normal casts use the authenticated player. Both reuse actual server START/GO/failure/cancel correlation, original source response writers and the unique original client castGUID. Prepare/success is never fabricated on outgoing submission. Item-only template cooldown behavior remains conditional on an actual item entry. General forced cooldown messages preserve their existing server-derived handling. Concurrency, projectiles, channels, transport-relative casts and full aura/event coverage remain incomplete.

Absolute cursor locations

Far Sight (Octo spell 6196) requests a destination with target mask 0x40. Its ADD_FARSIGHT effect creates a focus at the destination XYZ while its second effect applies an aura to the caster. Build 70334 serializes each optional source or destination as a packed transport GUID followed by three floats. An empty transport GUID denotes absolute world coordinates. The gateway writes the source XYZ first and the destination XYZ second, after the ordinary Turtle target mask and any bound unit or item. It checks coordinates against Tortoise's map limits and checks a supplied map against the active world. Turtle has no wire field for orientation or an explicit map ID.

The native-ground-cast-request host test checks the outgoing Far Sight bytes and retained cast data, a source-only cast, field order, target bindings and map qualification. The evidence comes from build 70334's SpellPackets.cpp::operator>>(SpellTargetData&) and Tortoise's SpellCastTargets::read, GridDefines.h::IsValidMapCoord and Spell::EffectAddFarsight. This is offline request coverage. The stock cursor and camera behavior still require in-client observation.

Shared object-field omission

Tortoise Objects/Unit.h::GetShapeshiftForm reads UNIT_FIELD_BYTES_1 byte2; byte0 is stand state. The converter previously copied only byte0. Destination UF::UnitData has a separate ShapeshiftForm field at bit90, written by the original UpdateFields.cpp serializer. Source and destination Warrior forms17/18/19 agree in SharedDefines.h and SpellAuraDefines.h. Creation for self/creatures and sparse unit values now preserve that byte independently, including explicit zero. No remap to an unrelated form is made.

The new regression failed against the prior codec; the rebuilt codec passes form transitions/clear and unrelated-byte isolation, alongside health/power fixtures. In actual700633, original GetShapeshiftFormID changed from the previous missing value to17; the stance-dependent action bar populated. Original GetShapeshiftForm reports list index2 while GetNumShapeshiftForms reports1 and GetShapeshiftFormInfo1 reports2457 inactive: client-side list/data presentation still needs reconciliation. The raw source form17 is preserved; the adapter does not alter it merely to hide the list-index discrepancy.

Actual non-damaging normal cast

ops/native_form_cast_test.py accepted genuine zero-cost source spell2457, effect6/aura36/form17. It prepared the test with legitimate .unaura2457, saved, and observed the original client report no form. It then used original /cast Battle Stance to test execution, not a GM cast or packet injection.

Actual700633:3E0176/68 ->Turtle12E ->source131/18 and132/24 ->native69002C/115. The owned request result was0. The real client returned to raw form17, Tortoise saved one2457 aura, and HP5859/money9701/inventory/flags55 were unchanged. Lost metadata0, observer error none, no fallback restoration. Screenshots and public results are in evidence/gameplay/native-normal-spell/.

An earlier fixture incorrectly equated a missing character_spell row with an unknown spell; the server replied "already know" and the test stopped before removing the aura/casting. Player::LearnDefaultSpells adds race/class defaults as dependent spells; _SaveSpells intentionally omits dependent rows. The real playercreateinfo_spell1/1/2457 and source initial spellbook provide the baseline. The corrected test made no GM grant; legitimate native spellbook validation remains intact. SQL character_spell alone is not the live known-spell set.

The source aura baseline is restored by the action under test. If that action fails, the harness labels any GM aura restoration separately and never counts it as cast success. It never retries a failed action or writes SQL. Saved baseline and source-definition guards precede every change.

Validation and limits

Build plus focused item/native lifecycle/source-writer tests4/4 passed. Full regression63/63 passed39.02s before actual deployment. The normal fixture checks real start/go plus native dispatch and saved source state; screenshots were reviewed for the original API/form transition. It proves one authentic instant self-form cast and the shared field fix. It does not prove normal targeted damage/healing, cost deductions, cooldowns, channels, projectile behavior, all classes or complete client spell definitions.

The earlier actual Rend attempt emitted targeting/attack only and displayed Out of range. Do not classify that as transport loss or a successful melee test. Rend's source learning/action persistence is independently documented in NATIVE_TRAINER.md. Four trainer wrapper names and some tooltips remain client-data work, using the installed Octo archives and local Tortoise definitions.

Post-integration source ABI regression now includes unit-values/form transitions as its11th fixture group. Final source opcode +ABI checks2/2 passed10.86s, without rebuilding any library mapped by the live client.