summaryrefslogtreecommitdiff
path: root/src/gui/popups
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/popups
parent60859a71dd9794b0216cc7a60146d417e06dbbad (diff)
downloadplus-b96e6eeba6e1511568c8291bd8cb6a6d3706635c.tar.gz
plus-b96e6eeba6e1511568c8291bd8cb6a6d3706635c.tar.bz2
plus-b96e6eeba6e1511568c8291bd8cb6a6d3706635c.tar.xz
plus-b96e6eeba6e1511568c8291bd8cb6a6d3706635c.zip
Remove define EATHENA_SUPPORT from all code.
Now eathena like support enabled always.
Diffstat (limited to 'src/gui/popups')
-rw-r--r--src/gui/popups/beingpopup.cpp8
-rw-r--r--src/gui/popups/itempopup.cpp4
-rw-r--r--src/gui/popups/itempopup.h2
-rw-r--r--src/gui/popups/popupmenu.cpp30
-rw-r--r--src/gui/popups/popupmenu.h4
5 files changed, 0 insertions, 48 deletions
diff --git a/src/gui/popups/beingpopup.cpp b/src/gui/popups/beingpopup.cpp
index 3809ed4d2..75b72c732 100644
--- a/src/gui/popups/beingpopup.cpp
+++ b/src/gui/popups/beingpopup.cpp
@@ -126,7 +126,6 @@ void BeingPopup::show(const int x, const int y, Being *const b)
(*it)->setCaption(std::string());
}
-#ifdef EATHENA_SUPPORT
const ActorTypeT type = b->getType();
if (type == ActorType::Pet)
{
@@ -167,7 +166,6 @@ void BeingPopup::show(const int x, const int y, Being *const b)
}
}
else
-#endif
{
if (!(b->getPartyName().empty()))
{
@@ -199,7 +197,6 @@ void BeingPopup::show(const int x, const int y, Being *const b)
num ++;
}
-#ifdef EATHENA_SUPPORT
if (!b->getBuyBoard().empty())
{
ptr = mLabels[num];
@@ -209,9 +206,7 @@ void BeingPopup::show(const int x, const int y, Being *const b)
ptr->adjustSize();
num ++;
}
-#endif
-#ifdef EATHENA_SUPPORT
if (!b->getSellBoard().empty())
{
ptr = mLabels[num];
@@ -221,7 +216,6 @@ void BeingPopup::show(const int x, const int y, Being *const b)
ptr->adjustSize();
num ++;
}
-#endif
if (!b->getComment().empty())
{
@@ -244,7 +238,6 @@ void BeingPopup::show(const int x, const int y, Being *const b)
num ++;
}
-#ifdef EATHENA_SUPPORT
const ChatObject *const chat = b->getChat();
if (chat)
{
@@ -255,7 +248,6 @@ void BeingPopup::show(const int x, const int y, Being *const b)
ptr->adjustSize();
num ++;
}
-#endif
}
ptr = mLabels[num];
// TRANSLATORS: being popup label
diff --git a/src/gui/popups/itempopup.cpp b/src/gui/popups/itempopup.cpp
index f96a73493..158f8c57c 100644
--- a/src/gui/popups/itempopup.cpp
+++ b/src/gui/popups/itempopup.cpp
@@ -223,9 +223,7 @@ void ItemPopup::setItem(const ItemInfo &item,
// TRANSLATORS: popup label
mItemWeight->setTextWrapped(strprintf(_("Weight: %s"),
Units::formatWeight(item.getWeight()).c_str()), 196);
-#ifdef EATHENA_SUPPORT
mItemCards->setTextWrapped(getCardsString(cards), 196);
-#endif
int minWidth = mItemName->getWidth() + space;
@@ -267,7 +265,6 @@ void ItemPopup::setItem(const ItemInfo &item,
mItemDesc->setPosition(0, 2 * height);
}
-#ifdef EATHENA_SUPPORT
std::string ItemPopup::getCardsString(const int *const cards)
{
if (!cards)
@@ -319,7 +316,6 @@ std::string ItemPopup::getCardsString(const int *const cards)
}
}
}
-#endif
#define caseSetColor(name1, name2) \
case name1: \
diff --git a/src/gui/popups/itempopup.h b/src/gui/popups/itempopup.h
index f862d2754..b9439fe1d 100644
--- a/src/gui/popups/itempopup.h
+++ b/src/gui/popups/itempopup.h
@@ -73,9 +73,7 @@ class ItemPopup final : public Popup
void resetPopup();
private:
-#ifdef EATHENA_SUPPORT
std::string getCardsString(const int *const cards);
-#endif
Label *mItemName A_NONNULLPOINTER;
TextBox *mItemDesc A_NONNULLPOINTER;
diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp
index 4c417036b..e74873a10 100644
--- a/src/gui/popups/popupmenu.cpp
+++ b/src/gui/popups/popupmenu.cpp
@@ -67,11 +67,9 @@
#include "net/adminhandler.h"
#include "net/chathandler.h"
#include "net/guildhandler.h"
-#ifdef EATHENA_SUPPORT
#include "net/homunculushandler.h"
#include "net/mercenaryhandler.h"
#include "net/npchandler.h"
-#endif
#include "net/net.h"
#include "net/pethandler.h"
#include "net/serverfeatures.h"
@@ -163,9 +161,7 @@ void PopupMenu::showPopup(const int x, const int y, const Being *const being)
mY = y;
const std::string &name = mName;
-#ifdef EATHENA_SUPPORT
if (being->getType() != ActorType::SkillUnit)
-#endif
{
mBrowserBox->addRow(name + being->getGenderSignWithSpace());
}
@@ -258,9 +254,7 @@ void PopupMenu::showPopup(const int x, const int y, const Being *const being)
mBrowserBox->addRow("/navigateto 'NAME'", _("Move"));
addPlayerMisc();
addBuySell(being);
-#ifdef EATHENA_SUPPORT
addChat(being);
-#endif
break;
}
@@ -293,9 +287,7 @@ void PopupMenu::showPopup(const int x, const int y, const Being *const being)
// TRANSLATORS: popup menu item
// TRANSLATORS: add comment to npc
mBrowserBox->addRow("addcomment", _("Add comment"));
-#ifdef EATHENA_SUPPORT
addChat(being);
-#endif
break;
case ActorType::Monster:
@@ -339,7 +331,6 @@ void PopupMenu::showPopup(const int x, const int y, const Being *const being)
break;
}
-#ifdef EATHENA_SUPPORT
case ActorType::Mercenary:
// TRANSLATORS: popup menu item
// TRANSLATORS: Mercenary move to master
@@ -435,7 +426,6 @@ void PopupMenu::showPopup(const int x, const int y, const Being *const being)
creatorName.c_str()));
break;
}
-#endif
case ActorType::Avatar:
case ActorType::Unknown:
case ActorType::FloorItem:
@@ -1122,7 +1112,6 @@ void PopupMenu::showEmoteType()
// TRANSLATORS: show emotes for pet
mBrowserBox->addRow("/setemotetype pet", _("Pet"));
-#ifdef EATHENA_SUPPORT
if (serverFeatures->haveServerPets())
{
// TRANSLATORS: popup menu item
@@ -1133,7 +1122,6 @@ void PopupMenu::showEmoteType()
// TRANSLATORS: show emotes for mercenary
mBrowserBox->addRow("/setemotetype merc", _("Mercenary"));
}
-#endif
mBrowserBox->addRow("##3---");
// TRANSLATORS: popup menu item
@@ -1479,7 +1467,6 @@ void PopupMenu::handleLink(const std::string &link,
if (Widget::widgetExists(mWindow))
mWindow->setSticky(true);
}
-#ifdef EATHENA_SUPPORT
else if (link == "join chat" && being)
{
const ChatObject *const chat = being->getChat();
@@ -1511,7 +1498,6 @@ void PopupMenu::handleLink(const std::string &link,
showCraftPopup();
return;
}
-#endif
else if (link == "pet feed")
{
petHandler->feed();
@@ -1799,7 +1785,6 @@ void PopupMenu::showPopup(Window *const parent,
}
mBrowserBox->addRow("##3---");
}
-#ifdef EATHENA_SUPPORT
if (npcHandler)
{
NpcDialog *const dialog = npcHandler->getCurrentNpcDialog();
@@ -1812,7 +1797,6 @@ void PopupMenu::showPopup(Window *const parent,
_("Move to craft..."));
}
}
-#endif
addUseDrop(item, isProtected);
break;
@@ -1846,12 +1830,10 @@ void PopupMenu::showPopup(Window *const parent,
case InventoryType::Trade:
case InventoryType::Npc:
-#ifdef EATHENA_SUPPORT
case InventoryType::Cart:
case InventoryType::Vending:
case InventoryType::Mail:
case InventoryType::Craft:
-#endif
case InventoryType::TypeEnd:
default:
break;
@@ -2687,7 +2669,6 @@ void PopupMenu::addParty(const std::string &nick)
}
}
-#ifdef EATHENA_SUPPORT
void PopupMenu::addChat(const Being *const being)
{
if (!being)
@@ -2702,7 +2683,6 @@ void PopupMenu::addChat(const Being *const being)
mBrowserBox->addRow("##3---");
}
}
-#endif
void PopupMenu::addPlayerMisc()
{
@@ -3197,7 +3177,6 @@ void PopupMenu::showGMPopup(const std::string &name)
case ActorType::FloorItem:
showFloorItemGMCommands();
break;
-#ifdef EATHENA_SUPPORT
case ActorType::Homunculus:
showHomunGMCommands();
break;
@@ -3209,7 +3188,6 @@ void PopupMenu::showGMPopup(const std::string &name)
break;
case ActorType::SkillUnit:
break;
-#endif
default:
case ActorType::Unknown:
if (mItemId != 0)
@@ -3230,7 +3208,6 @@ void PopupMenu::showGMPopup(const std::string &name)
showPopup(getX(), getY());
}
-#ifdef EATHENA_SUPPORT
void PopupMenu::showHomunGMCommands()
{
}
@@ -3262,40 +3239,33 @@ void PopupMenu::showCraftPopup()
showPopup(mX, mY);
}
-#endif
void PopupMenu::addMailCommands()
{
-#ifdef EATHENA_SUPPORT
if (!serverFeatures->haveMail())
return;
// TRANSLATORS: popup menu item
// TRANSLATORS: open mail dialog
mBrowserBox->addRow("/mailto 'NAME'", _("Mail to..."));
-#endif
}
void PopupMenu::addCatchPetCommands()
{
-#ifdef EATHENA_SUPPORT
if (!serverFeatures->haveServerPets())
return;
// TRANSLATORS: popup menu item
// TRANSLATORS: catch pet command
mBrowserBox->addRow("/catchpet :'BEINGID'", _("Taming pet"));
-#endif
}
void PopupMenu::showAdoptCommands()
{
-#ifdef EATHENA_SUPPORT
if (!serverFeatures->haveFamily())
return;
// TRANSLATORS: popup menu item
// TRANSLATORS: adopt child command
mBrowserBox->addRow("/adoptchild 'NAME'", _("Adopt child"));
-#endif
}
void PopupMenu::moveUp()
diff --git a/src/gui/popups/popupmenu.h b/src/gui/popups/popupmenu.h
index cc1ad285f..a7a745873 100644
--- a/src/gui/popups/popupmenu.h
+++ b/src/gui/popups/popupmenu.h
@@ -165,9 +165,7 @@ class PopupMenu final : public Popup, public LinkHandler
void showSkillLevelPopup(const SkillInfo *const info);
-#ifdef EATHENA_SUPPORT
void showCraftPopup();
-#endif
void showEmoteType();
@@ -223,7 +221,6 @@ class PopupMenu final : public Popup, public LinkHandler
void addWindowMenu(const Window *const window);
-#ifdef EATHENA_SUPPORT
void showHomunGMCommands();
void showPetGMCommands();
@@ -231,7 +228,6 @@ class PopupMenu final : public Popup, public LinkHandler
void showMercenaryGMCommands();
void addChat(const Being *const being);
-#endif
void addMailCommands();