| 448 | |
| 449 | |
| 450 | void cClientHandle::HandleCreativeInventory(short a_SlotNum, const cItem & a_HeldItem) |
| 451 | { |
| 452 | // This is for creative Inventory changes |
| 453 | if (!m_Player->IsGameModeCreative()) |
| 454 | { |
| 455 | LOGWARNING("Got a CreativeInventoryAction packet from user \"%s\" while not in creative mode. Ignoring.", m_Username.c_str()); |
| 456 | return; |
| 457 | } |
| 458 | if (m_Player->GetWindow()->GetWindowType() != cWindow::wtInventory) |
| 459 | { |
| 460 | LOGWARNING("Got a CreativeInventoryAction packet from user \"%s\" while not in the inventory window. Ignoring.", m_Username.c_str()); |
| 461 | return; |
| 462 | } |
| 463 | |
| 464 | m_Player->GetWindow()->Clicked(*m_Player, 0, a_SlotNum, (a_SlotNum >= 0) ? caLeftClick : caLeftClickOutside, a_HeldItem); |
| 465 | } |
| 466 | |
| 467 | |
| 468 |
no test coverage detected