summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/being/playerinfo.cpp16
-rw-r--r--src/being/playerinfo.h4
-rw-r--r--src/game.cpp4
-rw-r--r--src/gui/windows/inventorywindow.cpp3
-rw-r--r--src/gui/windows/inventorywindow.h3
5 files changed, 30 insertions, 0 deletions
diff --git a/src/being/playerinfo.cpp b/src/being/playerinfo.cpp
index 8d8d20071..2016454da 100644
--- a/src/being/playerinfo.cpp
+++ b/src/being/playerinfo.cpp
@@ -56,6 +56,9 @@ PlayerInfoBackend mData;
int mCharId = 0;
Inventory *mInventory = nullptr;
+#ifdef EATHENA_SUPPORT
+Inventory *mCartInventory = nullptr;
+#endif
Equipment *mEquipment = nullptr;
MercenaryInfo *mMercenary = nullptr;
HomunculusInfo *mHomunculus = nullptr;
@@ -199,6 +202,13 @@ Inventory *getStorageInventory()
return inventoryHandler->getStorage();
}
+#ifdef EATHENA_SUPPORT
+Inventory *getCartInventory()
+{
+ return mCartInventory;
+}
+#endif
+
void clearInventory()
{
if (mEquipment)
@@ -406,6 +416,9 @@ void gameDestroyed()
{
delete2(mInventory);
delete2(mEquipment);
+#ifdef EATHENA_SUPPORT
+ delete2(mCartInventory);
+#endif
}
void stateChange(const State state)
@@ -416,6 +429,9 @@ void stateChange(const State state)
{
mInventory = new Inventory(Inventory::INVENTORY);
mEquipment = new Equipment();
+#ifdef EATHENA_SUPPORT
+ mCartInventory = new Inventory(Inventory::CART);
+#endif
}
}
}
diff --git a/src/being/playerinfo.h b/src/being/playerinfo.h
index c49326bb4..807d9d03d 100644
--- a/src/being/playerinfo.h
+++ b/src/being/playerinfo.h
@@ -148,6 +148,10 @@ namespace PlayerInfo
Inventory *getStorageInventory() A_WARN_UNUSED;
+#ifdef EATHENA_SUPPORT
+ Inventory *getCartInventory() A_WARN_UNUSED;
+#endif
+
/**
* Clears the player's inventory and equipment.
*/
diff --git a/src/game.cpp b/src/game.cpp
index 0bdea76d5..f17c4ae65 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -185,6 +185,10 @@ static void createGuiWindows()
miniStatusWindow = new MiniStatusWindow;
inventoryWindow = new InventoryWindow(PlayerInfo::getInventory());
inventoryWindow->postInit();
+#ifdef EATHENA_SUPPORT
+ cartWindow = new InventoryWindow(PlayerInfo::getCartInventory());
+ cartWindow->postInit();
+#endif
shopWindow = new ShopWindow;
shopWindow->postInit();
skillDialog = new SkillDialog;
diff --git a/src/gui/windows/inventorywindow.cpp b/src/gui/windows/inventorywindow.cpp
index 581f9bfc2..e0dd2e8f0 100644
--- a/src/gui/windows/inventorywindow.cpp
+++ b/src/gui/windows/inventorywindow.cpp
@@ -70,6 +70,9 @@
InventoryWindow *inventoryWindow = nullptr;
InventoryWindow *storageWindow = nullptr;
+#ifdef EATHENA_SUPPORT
+InventoryWindow *cartWindow = nullptr;
+#endif
InventoryWindow::WindowList InventoryWindow::invInstances;
InventoryWindow::InventoryWindow(Inventory *const inventory) :
diff --git a/src/gui/windows/inventorywindow.h b/src/gui/windows/inventorywindow.h
index d17ba966d..aba6937a4 100644
--- a/src/gui/windows/inventorywindow.h
+++ b/src/gui/windows/inventorywindow.h
@@ -201,5 +201,8 @@ class InventoryWindow final : public Window,
extern InventoryWindow *inventoryWindow;
extern InventoryWindow *storageWindow;
+#ifdef EATHENA_SUPPORT
+extern InventoryWindow *cartWindow;
+#endif // EATHENA_SUPPORT
#endif // GUI_WINDOWS_INVENTORYWINDOW_H