diff --git a/crates/horizon-client/src/game/lan.rs b/crates/horizon-client/src/game/lan.rs index d3afb3cc1..a0f99bfca 100644 --- a/crates/horizon-client/src/game/lan.rs +++ b/crates/horizon-client/src/game/lan.rs @@ -440,13 +440,16 @@ fn mob_equipment( out: &mut Vec<(u8, Option)>, ) { let e = &m.extra; + // A horse's armour, a llama's carpet, a harness: Horizon keeps the body + // slot's item (6) in `head`. + let body = horizon_client::mobs::drops::head_is_body(m.species()); let slots = [ (0u8, &e.main_hand), (1, &e.off_hand), (2, &e.feet), (3, &e.legs), (4, &e.chest), - (5, &e.head), + (if body { 6 } else { 5 }, &e.head), ]; for (slot, item) in slots { if let Some(item) = item { diff --git a/crates/horizon-client/src/game/remote.rs b/crates/horizon-client/src/game/remote.rs index 9567b8feb..e41aca43b 100644 --- a/crates/horizon-client/src/game/remote.rs +++ b/crates/horizon-client/src/game/remote.rs @@ -2068,13 +2068,22 @@ impl Game<'_> { // player holds and wears (EquipmentSlot ordinals). C::SetEquipment(p) => { self.remote_object_equipment(p.id, &p.slots); - let items: Vec<(u8, Option>)> = p + let items: Vec<(u8, Option>, Option)> = p .slots .iter() - .map(|(slot, stack)| (*slot, stack.as_ref().map(|s| self.item_name(s.item)))) + .map(|(slot, stack)| { + ( + *slot, + stack.as_ref().map(|s| self.item_name(s.item)), + self.to_stack(stack), + ) + }) .collect(); if let Some(m) = self.mobs.iter_mut().find(|m| m.id == p.id as u32) { - for (slot, item) in items { + // The body slot (6: horse armour, llama carpet, harness) + // is kept in `head`, as Horizon's own mobs do. + let body = horizon_client::mobs::drops::head_is_body(m.species()); + for (slot, item, stack) in items { let e = &mut m.extra; match slot { 0 => e.main_hand = item, @@ -2082,7 +2091,9 @@ impl Game<'_> { 2 => e.feet = item, 3 => e.legs = item, 4 => e.chest = item, - 5 => e.head = item, + 5 if !body => e.head = item, + 6 if body => e.head = item, + 7 => m.set_saddle(stack), _ => {} } }