Repository navigation
docs(creature_addon): document how bytes1 is built #1279
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -55,7 +55,22 @@ The model ID of the mount to be used to make the creature appear mounted. The va | |
|
|
||
| ### bytes1 | ||
|
|
||
| The value here overrides the value for the creature's unit field UNIT\_FIELD\_BYTES\_1. | ||
| The value here overrides the value for the creature's unit field `UNIT_FIELD_BYTES_1`. It packs four | ||
| bytes, little-endian: | ||
|
|
||
| `bytes1 = standState | (petTalents << 8) | (standFlags << 16) | (animTier << 24)` | ||
|
|
||
| - byte 0, `& 0xFF` = stand state: standing, sitting, sleeping, kneeling, submerged | ||
| - byte 1, `<< 8` = pet talent points: unused on creatures, always 0 | ||
| - byte 2, `<< 16` = stand flags: creep, untrackable | ||
| - byte 3, `<< 24` = animation tier: 0 Ground, 1 AlwaysStand (`AnimTier` calls it Swim), 2 Hover, 3 Fly, 4 Submerged | ||
|
|
||
| Setting a single field is one shift, so an animation tier of Fly is `3 << 24` = 50331648 and Hover is | ||
| `2 << 24` = 33554432. Fields combine with OR, for example kneeling while flying is `0x03000008` = | ||
| 50331656. `0` leaves the creature standing, with no stand flags and the ground tier. | ||
|
Comment on lines
+68
to
+70
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win Resolve the conflicting meaning of This section defines 🤖 Prompt for AI Agents |
||
|
|
||
| The tier only changes how the client animates the creature; walking, flying and hovering come from | ||
| the movement flags, from [creature\_template\_movement](creature_template_movement) or from a script. | ||
|
Comment on lines
+72
to
+73
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win Separate hover control from animation tier. The paragraph attributes walking, flying, and hovering to movement flags. 🤖 Prompt for AI Agents |
||
|
|
||
| List of known values and what their visual effects on the creature | ||
|
|
||
|
|
||
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.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Document numeric masks for
standFlags.This line names
creepanduntrackablebut does not provide their numeric values or bit masks. Readers cannot construct a non-zerostandFlagsvalue from the formula. Add the masks or link to their authoritative definitions.🤖 Prompt for AI Agents