[Bug Fix] Bandolier didn't recognize source weapon on cursor (#2026)

* [Bug Fix] Bandolier didn't recognize source weapon on cursor

* Add TODO comment
This commit is contained in:
Paul Coene 2022-03-06 21:15:22 -05:00 committed by GitHub
parent d6c03b54a1
commit c4eb1f8439
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3332,8 +3332,11 @@ void Client::SetBandolier(const EQApplicationPacket *app)
// removed 'invWhereCursor' argument from above and implemented slots 30, 331-340 checks here
if (slot == INVALID_INDEX) {
if (m_inv.GetItem(EQ::invslot::slotCursor)) {
if (m_inv.GetItem(EQ::invslot::slotCursor)->GetItem()->ID == m_pp.bandoliers[bss->Number].Items[BandolierSlot].ID &&
m_inv.GetItem(EQ::invslot::slotCursor)->GetCharges() >= 1) { // '> 0' the same, but this matches Inventory::_HasItem conditional check
// Below used to check charges but for some reason
// m_inv.GetItem(EQ::invslot::slotCursor)->GetCharges()
// is returning 0. We know it exists, so removed check.
// TODO: Why is 0 being returned for slotCursor.
if (m_inv.GetItem(EQ::invslot::slotCursor)->GetItem()->ID == m_pp.bandoliers[bss->Number].Items[BandolierSlot].ID) {
slot = EQ::invslot::slotCursor;
}
else if (m_inv.GetItem(EQ::invslot::slotCursor)->GetItem()->ItemClass == 1) {