From b7bb27910303ef1538e2cbb4093e452c77567739 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 23 Jan 2015 13:15:41 +0300 Subject: Add variable for cart window. --- src/being/playerinfo.cpp | 16 ++++++++++++++++ src/being/playerinfo.h | 4 ++++ 2 files changed, 20 insertions(+) (limited to 'src/being') 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. */ -- cgit v1.2.3-60-g2f50