From 692aac3122843c59610684802e25b92cc9f0a33c Mon Sep 17 00:00:00 2001 From: Jared Adams Date: Tue, 26 Jan 2010 15:24:21 -0700 Subject: Fix a few more _SUPPORT ifdefs and namespace PartyTab --- src/game.cpp | 6 +----- src/localplayer.cpp | 5 +---- src/net/ea/gui/partytab.cpp | 4 ++++ src/net/ea/gui/partytab.h | 4 ++++ src/net/ea/partyhandler.cpp | 3 ++- 5 files changed, 12 insertions(+), 10 deletions(-) diff --git a/src/game.cpp b/src/game.cpp index 9ca58461..427f70b6 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -748,14 +748,10 @@ void Game::handleInput() { case KeyboardConfig::KEY_PICKUP: { -#ifdef MANASERV_SUPPORT const Vector &pos = player_node->getPosition(); Uint16 x = (int) pos.x / 32; Uint16 y = (int) pos.y / 32; -#else - Uint16 x = player_node->getTileX(); - Uint16 y = player_node->getTileY(); -#endif + FloorItem *item = floorItemManager->findByCoordinates(x, y); diff --git a/src/localplayer.cpp b/src/localplayer.cpp index 6ec334ed..79ea00af 100644 --- a/src/localplayer.cpp +++ b/src/localplayer.cpp @@ -579,14 +579,11 @@ void LocalPlayer::startWalking(unsigned char dir) if (!mMap || !dir) return; -#ifdef MANASERV_SUPPORT - const Vector &pos = getPosition(); -#endif - if (mAction == WALK && !mPath.empty()) { // Just finish the current action, otherwise we get out of sync #ifdef MANASERV_SUPPORT + const Vector &pos = getPosition(); Being::setDestination(pos.x, pos.y); #else Being::setDestination(getTileX(), getTileY()); diff --git a/src/net/ea/gui/partytab.cpp b/src/net/ea/gui/partytab.cpp index 24bd739b..d555743c 100644 --- a/src/net/ea/gui/partytab.cpp +++ b/src/net/ea/gui/partytab.cpp @@ -35,6 +35,8 @@ #include "utils/gettext.h" #include "utils/stringutils.h" +namespace EAthena { + PartyTab::PartyTab() : ChatTab(_("Party")) { @@ -206,3 +208,5 @@ int PartyTab::getType() const { return ChatTab::PARTY; } + +} // namespace EAthena diff --git a/src/net/ea/gui/partytab.h b/src/net/ea/gui/partytab.h index afbc8fd9..9ab0862a 100644 --- a/src/net/ea/gui/partytab.h +++ b/src/net/ea/gui/partytab.h @@ -24,6 +24,8 @@ #include "gui/widgets/chattab.h" +namespace EAthena { + /** * A tab for a party chat channel. */ @@ -45,4 +47,6 @@ class PartyTab : public ChatTab extern PartyTab *partyTab; +} // namespace EAthena + #endif // EA_PARTYTAB_H diff --git a/src/net/ea/partyhandler.cpp b/src/net/ea/partyhandler.cpp index bd69fa05..55331640 100644 --- a/src/net/ea/partyhandler.cpp +++ b/src/net/ea/partyhandler.cpp @@ -38,11 +38,12 @@ #include "utils/gettext.h" #include "utils/stringutils.h" -PartyTab *partyTab = 0; extern Net::PartyHandler *partyHandler; namespace EAthena { +PartyTab *partyTab = 0; + PartyHandler::PartyHandler(): mShareExp(PARTY_SHARE_UNKNOWN), mShareItems(PARTY_SHARE_UNKNOWN) { -- cgit v1.2.3-70-g09d2