DetachAttachment
function · charactermodel · orchestration
- Address
0x47a380· 82 bytes, up to0x47a3d1- Signature
void __fastcall (void *model, int32_t attachId)- Meaning
- Opens the hand of an attachment and detaches what hangs there
- Confidence
- verified, proof one
- Finding
- charactermodel/equipment#held-items
- Test
charactermodel::cm_fanout_c_attach_install_select
Finding: Held items in charactermodel: equipment
0x47a0c0(model, record, slot, sheathe type, sheathed, shield, ranged) hangs a weapon or shield model on a character model. Slot 15 is the main hand (attachment 1), 16 the off hand (attachment 2, or 0 for a shield with the shield flag), 17 the ranged slot (1 when the ranged flag is set, else 2). The sheath attachment comes from
0x47a070(sheathe type, hand flag). It detaches both the hand and the sheath attachment first, picks the sheath one when sheathed is set, returns -1 when the model is loaded and lacks the attachment, and loads the record's weapon or shield model, with the record's +0x04 name and +0x0c texture.
The attachment id is returned.
The derivation is in the doc.
Callers 4
- UnequipCharacterSlot charactermodel
- EquipBodySlot charactermodel
- AttachItemModel charactermodel
- DetachHeldItemSlot charactermodel
Callees 4
- OpenHand charactermodel
- CM2Model::IsLoaded models
- CM2Model::HasAttachment models
- CM2Model::DetachAt models
Calls and jumps by a bare address, from tables/calls.tsv.