summaryrefslogtreecommitdiff
path: root/src/gui/windows/npcdialog.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-07-28 16:03:59 +0300
committerAndrei Karas <akaras@inbox.ru>2016-07-28 16:34:59 +0300
commitb96e6eeba6e1511568c8291bd8cb6a6d3706635c (patch)
treed021843c88d856f86f018547c30f1181290ffcbe /src/gui/windows/npcdialog.cpp
parent60859a71dd9794b0216cc7a60146d417e06dbbad (diff)
downloadmv-b96e6eeba6e1511568c8291bd8cb6a6d3706635c.tar.gz
mv-b96e6eeba6e1511568c8291bd8cb6a6d3706635c.tar.bz2
mv-b96e6eeba6e1511568c8291bd8cb6a6d3706635c.tar.xz
mv-b96e6eeba6e1511568c8291bd8cb6a6d3706635c.zip
Remove define EATHENA_SUPPORT from all code.
Now eathena like support enabled always.
Diffstat (limited to 'src/gui/windows/npcdialog.cpp')
-rw-r--r--src/gui/windows/npcdialog.cpp24
1 files changed, 0 insertions, 24 deletions
diff --git a/src/gui/windows/npcdialog.cpp b/src/gui/windows/npcdialog.cpp
index 8b850d463..16705a414 100644
--- a/src/gui/windows/npcdialog.cpp
+++ b/src/gui/windows/npcdialog.cpp
@@ -39,9 +39,7 @@
#include "gui/popups/popupmenu.h"
-#ifdef EATHENA_SUPPORT
#include "gui/windows/cutinwindow.h"
-#endif
#include "gui/windows/inventorywindow.h"
#include "gui/widgets/browserbox.h"
@@ -133,9 +131,7 @@ NpcDialog::NpcDialog(const BeingId npcId) :
// TRANSLATORS: npc dialog button
mResetButton(new Button(this, _("Reset"), "reset", this)),
mInventory(new Inventory(InventoryType::Npc, 1)),
-#ifdef EATHENA_SUPPORT
mComplexInventory(new ComplexInventory(InventoryType::Craft, 1)),
-#endif
mItemContainer(new ItemContainer(this, mInventory,
10000, ShowEmptyRows_true)),
mItemScrollArea(new ScrollArea(this, mItemContainer,
@@ -268,9 +264,7 @@ NpcDialog::~NpcDialog()
delete2(mItemLinkHandler);
delete2(mItemContainer);
delete2(mInventory);
-#ifdef EATHENA_SUPPORT
delete2(mComplexInventory);
-#endif
delete2(mItemScrollArea);
delete2(mListScrollArea);
delete2(mSkinScrollArea);
@@ -329,10 +323,8 @@ void NpcDialog::action(const ActionEvent &event)
else if (mActionState == NPC_ACTION_CLOSE
|| mActionState == NPC_ACTION_WAIT)
{
-#ifdef EATHENA_SUPPORT
if (cutInWindow)
cutInWindow->hide();
-#endif
closeDialog();
}
else if (mActionState == NPC_ACTION_INPUT)
@@ -478,7 +470,6 @@ void NpcDialog::action(const ActionEvent &event)
}
case NPC_INPUT_ITEM_CRAFT:
{
-#ifdef EATHENA_SUPPORT
restoreVirtuals();
if (!PacketLimiter::limitPackets(
PacketType::PACKET_NPC_INPUT))
@@ -509,7 +500,6 @@ void NpcDialog::action(const ActionEvent &event)
// need send selected item
npcHandler->stringInput(mNpcId, str);
mInventory->clear();
-#endif
break;
}
@@ -545,9 +535,7 @@ void NpcDialog::action(const ActionEvent &event)
mInventory->clear();
break;
case NPC_INPUT_ITEM_CRAFT:
-#ifdef EATHENA_SUPPORT
mComplexInventory->clear();
-#endif
break;
case NPC_INPUT_NONE:
case NPC_INPUT_LIST:
@@ -572,9 +560,7 @@ void NpcDialog::action(const ActionEvent &event)
mInventory->clear();
break;
case NPC_INPUT_ITEM_CRAFT:
-#ifdef EATHENA_SUPPORT
mComplexInventory->clear();
-#endif
break;
case NPC_INPUT_STRING:
case NPC_INPUT_INTEGER:
@@ -609,10 +595,8 @@ void NpcDialog::action(const ActionEvent &event)
npcHandler->listInput(mNpcId, 255);
break;
}
-#ifdef EATHENA_SUPPORT
if (cutInWindow)
cutInWindow->hide();
-#endif
closeDialog();
}
}
@@ -624,14 +608,12 @@ void NpcDialog::action(const ActionEvent &event)
Inventory *const inventory = PlayerInfo::getInventory();
if (inventory)
{
-#ifdef EATHENA_SUPPORT
if (mInputState == NPC_INPUT_ITEM_CRAFT)
{
if (mComplexInventory->addVirtualItem(item, -1, 1))
inventory->virtualRemove(item, 1);
}
else
-#endif
{
if (mInventory->addVirtualItem(item, -1, 1))
inventory->virtualRemove(item, 1);
@@ -814,12 +796,10 @@ void NpcDialog::itemIndexRequest(const int size)
void NpcDialog::itemCraftRequest(const int size A_TMWA_UNUSED)
{
-#ifdef EATHENA_SUPPORT
mActionState = NPC_ACTION_INPUT;
mInputState = NPC_INPUT_ITEM_CRAFT;
mComplexInventory->resize(size);
buildLayout();
-#endif
}
void NpcDialog::move(const int amount)
@@ -1014,11 +994,9 @@ void NpcDialog::placeItemInputControls()
mItemContainer->setMaxColumns(10000);
}
-#ifdef EATHENA_SUPPORT
if (mInputState == NPC_INPUT_ITEM_CRAFT)
mItemContainer->setInventory(mComplexInventory);
else
-#endif
mItemContainer->setInventory(mInventory);
if (mDialogInfo && mDialogInfo->hideText)
@@ -1402,7 +1380,6 @@ void NpcDialog::addCraftItem(Item *const item A_TMWA_UNUSED,
if (!inventory)
return;
-#ifdef EATHENA_SUPPORT
if (mComplexInventory->addVirtualItem(
item,
slot,
@@ -1410,5 +1387,4 @@ void NpcDialog::addCraftItem(Item *const item A_TMWA_UNUSED,
{
inventory->virtualRemove(item, amount);
}
-#endif
}