* Gets the inventory slot located in the specified mouse position. * @param x Mouse X position. Returns the slot's X position. * @param y Mouse Y position. Returns the slot's Y position. * @return Slot rules, or NULL if none. */
| 371 | * @return Slot rules, or NULL if none. |
| 372 | */ |
| 373 | RuleInventory *Inventory::getSlotInPosition(int *x, int *y) const |
| 374 | { |
| 375 | for (std::map<std::string, RuleInventory*>::iterator i = _game->getRuleset()->getInventories()->begin(); i != _game->getRuleset()->getInventories()->end(); ++i) |
| 376 | { |
| 377 | if (i->second->checkSlotInPosition(x, y)) |
| 378 | { |
| 379 | return i->second; |
| 380 | } |
| 381 | } |
| 382 | return 0; |
| 383 | } |
| 384 | |
| 385 | /** |
| 386 | * Returns the item currently grabbed by the player. |
nothing calls this directly
no test coverage detected