Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions Tactical/Interface Items.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5769,14 +5769,6 @@ void UpdateAttachmentTooltips(OBJECTTYPE *pObject, UINT8 ubStatusIndex)
//search primary item launchables.xml
usAttachment = Launchable[usLoop][0];
}

if (usAttachment > 0 && !Item[usAttachment].hiddenaddon && !Item[usAttachment].hiddenattachment && ItemIsLegal(usAttachment))
{
if (std::find(attachList.begin(), attachList.end(), usAttachment) == attachList.end())
{
attachList.push_back(usAttachment);
}
}
else
{
//search for launchables made valid by other attachments
Expand All @@ -5785,11 +5777,22 @@ void UpdateAttachmentTooltips(OBJECTTYPE *pObject, UINT8 ubStatusIndex)
while (cnt)
{
if (Launchable[usLoop][1] == *p && AttachmentSlots[usLoopSlotID].nasAttachmentClass & Item[Launchable[usLoop][0]].nasAttachmentClass)
{
usAttachment = Launchable[usLoop][0];
break;
}

cnt--, p++;
}
}

if (usAttachment > 0 && !Item[usAttachment].hiddenaddon && !Item[usAttachment].hiddenattachment && ItemIsLegal(usAttachment))
{
if (std::find(attachList.begin(), attachList.end(), usAttachment) == attachList.end())
{
attachList.push_back(usAttachment);
}
}
}

// check all attachments
Expand Down