1
Fork 0
mirror of https://github.com/redstrate/Kawari.git synced 2025-06-08 01:17:46 +00:00

Remove some hardcoded values in ActionResult

This commit is contained in:
Joshua Goins 2025-03-30 09:35:53 -04:00
parent e8581cdaba
commit 0b1a67fc9c
3 changed files with 6 additions and 12 deletions

View file

@ -840,18 +840,12 @@ async fn main() {
timestamp: timestamp_secs(), timestamp: timestamp_secs(),
data: ServerZoneIpcData::ActionResult( data: ServerZoneIpcData::ActionResult(
ActionResult { ActionResult {
main_target: ObjectTypeId { main_target: request.target,
object_id: ObjectId(0x106ad804), target_id_again: request.target,
object_type: 0, action_id: request.action_id,
},
target_id_again: ObjectTypeId {
object_id: ObjectId(0x106ad804),
object_type: 0,
},
action_id: 31,
animation_lock_time: 0.6, animation_lock_time: 0.6,
rotation: connection.player_data.rotation, rotation: connection.player_data.rotation,
action_animation_id: 31, action_animation_id: request.action_id as u16, // assuming action id == animation id
flag: 1, flag: 1,
effect_count: effects_builder.effects.len() effect_count: effects_builder.effects.len()
as u8, as u8,

View file

@ -32,7 +32,7 @@ impl Default for ObjectId {
// See https://github.com/aers/FFXIVClientStructs/blob/main/FFXIVClientStructs/FFXIV/Client/Game/Object/GameObject.cs#L158 // See https://github.com/aers/FFXIVClientStructs/blob/main/FFXIVClientStructs/FFXIV/Client/Game/Object/GameObject.cs#L158
#[binrw] #[binrw]
#[brw(little)] #[brw(little)]
#[derive(Debug, Clone, PartialEq, Eq)] #[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct ObjectTypeId { pub struct ObjectTypeId {
pub object_id: ObjectId, pub object_id: ObjectId,
#[brw(pad_after = 3)] #[brw(pad_after = 3)]

View file

@ -1,4 +1,4 @@
use mlua::{FromLua, Lua, MetaMethod, UserData, UserDataMethods, Value}; use mlua::{FromLua, Lua, UserData, UserDataMethods, Value};
use crate::{ use crate::{
common::{ObjectId, ObjectTypeId, Position, timestamp_secs}, common::{ObjectId, ObjectTypeId, Position, timestamp_secs},