ManaPlus
|
#include <dropshortcut.h>
Public Member Functions | |
DropShortcut () | |
~DropShortcut () | |
void | dropFirst () const |
void | dropItems (const int cnt) |
Public Member Functions inherited from ShortcutBase | |
ShortcutBase (const std::string &itemName, const std::string &colorName, const int maxSize) | |
virtual | ~ShortcutBase () |
void | load () |
void | save () const |
int | getItem (const size_t index) const |
ItemColor | getItemColor (const size_t index) const |
int | getItemCount () const |
int | getItemSelected () const |
void | setItem (const size_t index) |
void | setItems (const size_t index, const int itemId, const ItemColor color) |
void | setItemSelected (const int itemId) |
void | setItemSelected (const Item *const item) |
bool | isItemSelected () const |
void | removeItem (const size_t index) |
void | clear (const bool isSave) |
Private Member Functions | |
bool | dropItem (const int cnt) |
Private Attributes | |
int | mLastDropIndex |
The class which keeps track of the item shortcuts.
Definition at line 33 of file dropshortcut.h.
DropShortcut::DropShortcut | ( | ) |
Constructor.
Definition at line 42 of file dropshortcut.cpp.
References ShortcutBase::clear(), and ShortcutBase::load().
DropShortcut::~DropShortcut | ( | ) |
void DropShortcut::dropFirst | ( | ) | const |
Drop first item.
Definition at line 54 of file dropshortcut.cpp.
References PlayerInfo::dropItem(), Inventory::findItem(), PlayerInfo::getInventory(), ShortcutBase::getItem(), ShortcutBase::getItemColor(), Item::getQuantity(), PlayerInfo::isItemProtected(), LocalPlayer::isServerBuggy(), PacketLimiter::limitPackets(), localPlayer, PacketType::PACKET_DROP, Settings::quickDropCounter, settings, Sfx_false, and Sfx_true.
Referenced by CrazyMoves::crazyMoveAd().
|
private |
Drop item in cicle.
Definition at line 114 of file dropshortcut.cpp.
References DROP_SHORTCUT_ITEMS, PlayerInfo::dropItem(), Inventory::findItem(), PlayerInfo::getInventory(), ShortcutBase::getItem(), ShortcutBase::getItemColor(), Item::getQuantity(), PlayerInfo::isItemProtected(), ItemColor_one, mLastDropIndex, and Sfx_true.
Referenced by dropItems().
void DropShortcut::dropItems | ( | const int | cnt | ) |
Drop all items in cicle.
Definition at line 87 of file dropshortcut.cpp.
References dropItem(), LocalPlayer::isServerBuggy(), PacketLimiter::limitPackets(), localPlayer, PacketType::PACKET_DROP, Settings::quickDropCounter, and settings.
Referenced by CrazyMoves::crazyMoveAd().
|
private |
Definition at line 64 of file dropshortcut.h.
Referenced by dropItem().