summaryrefslogtreecommitdiff
path: root/src/localplayer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/localplayer.cpp')
-rw-r--r--src/localplayer.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/localplayer.cpp b/src/localplayer.cpp
index 76d13a4b..d6acc48f 100644
--- a/src/localplayer.cpp
+++ b/src/localplayer.cpp
@@ -37,6 +37,7 @@
#include "text.h"
#include "gui/gui.h"
+#include "gui/storagewindow.h"
#include "net/messageout.h"
#include "net/protocol.h"
@@ -74,8 +75,8 @@ LocalPlayer::LocalPlayer(Uint32 id, Uint16 job, Map *map):
mTargetTime(-1), mLastAction(-1),
mLastTarget(-1), mWalkingDir(0),
mDestX(0), mDestY(0),
- mInventory(new Inventory(INVENTORY_SIZE)),
- mStorage(new Inventory(STORAGE_SIZE))
+ mInventory(new Inventory(INVENTORY_SIZE, 2)),
+ mStorage(new Inventory(STORAGE_SIZE, 1))
{
// Variable to keep the local player from doing certain actions before a map
// is initialized. e.g. drawing a player's name using the TextManager, since
@@ -694,3 +695,9 @@ void LocalPlayer::loadTargetCursor(std::string filename, int width, int height,
mTargetCursor[index][size] = currentCursor;
}
+void LocalPlayer::setInStorage(bool inStorage)
+{
+ mInStorage = inStorage;
+
+ storageWindow->setVisible(inStorage);
+}