cInventory: Add listener to shield slot. (#4095)
This commit is contained in:
parent
532731e6f4
commit
e0ff5f5639
@ -28,6 +28,7 @@ cInventory::cInventory(cPlayer & a_Owner) :
|
|||||||
m_ArmorSlots.AddListener(*this);
|
m_ArmorSlots.AddListener(*this);
|
||||||
m_InventorySlots.AddListener(*this);
|
m_InventorySlots.AddListener(*this);
|
||||||
m_HotbarSlots.AddListener(*this);
|
m_HotbarSlots.AddListener(*this);
|
||||||
|
m_ShieldSlots.AddListener(*this);
|
||||||
|
|
||||||
SetEquippedSlotNum(0);
|
SetEquippedSlotNum(0);
|
||||||
}
|
}
|
||||||
@ -792,6 +793,11 @@ void cInventory::OnSlotChanged(cItemGrid * a_ItemGrid, int a_SlotNum)
|
|||||||
{
|
{
|
||||||
Base = invHotbarOffset;
|
Base = invHotbarOffset;
|
||||||
}
|
}
|
||||||
|
else if (a_ItemGrid = &m_ShieldSlots)
|
||||||
|
{
|
||||||
|
Base = invShieldOffset;
|
||||||
|
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ASSERT(!"Unknown ItemGrid calling OnSlotChanged()");
|
ASSERT(!"Unknown ItemGrid calling OnSlotChanged()");
|
||||||
|
Loading…
Reference in New Issue
Block a user