| 175 | |
| 176 | |
| 177 | void cSlotArea::ShiftClicked(cPlayer & a_Player, int a_SlotNum, const cItem & a_ClickedItem) |
| 178 | { |
| 179 | // Make a copy of the slot, distribute it among the other areas, then update the slot to contain the leftover: |
| 180 | cItem Slot(*GetSlot(a_SlotNum, a_Player)); |
| 181 | m_ParentWindow.DistributeStack(Slot, a_Player, this, true); |
| 182 | if (Slot.IsEmpty()) |
| 183 | { |
| 184 | // Empty the slot completely, the cilent doesn't like left-over ItemType with zero count |
| 185 | Slot.Empty(); |
| 186 | } |
| 187 | SetSlot(a_SlotNum, a_Player, Slot); |
| 188 | |
| 189 | // Some clients try to guess our actions and not always right (armor slots in 1.2.5), so we fix them: |
| 190 | m_ParentWindow.BroadcastWholeWindow(); |
| 191 | } |
| 192 | |
| 193 | |
| 194 |
nothing calls this directly
no test coverage detected